PropertyNode.php 723 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. declare(strict_types=1);
  3. namespace Cake\Error\DumpNode;
  4. class PropertyNode implements NodeInterface
  5. {
  6. private $name;
  7. private $visibility;
  8. private $value;
  9. public function __construct(string $name, ?string $visibility, NodeInterface $value)
  10. {
  11. $this->name = $name;
  12. $this->visibility = $visibility;
  13. $this->value = $value;
  14. }
  15. public function getValue(): NodeInterface
  16. {
  17. return $this->value;
  18. }
  19. public function getVisibility(): ?string
  20. {
  21. return $this->visibility;
  22. }
  23. public function getName(): string
  24. {
  25. return $this->name;
  26. }
  27. public function getChildren(): array
  28. {
  29. return [$this->value];
  30. }
  31. }