控制台应用,yzncms本身基于tp5.1框架,里面的队列用不了,bug,坑
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

PropertyPathIterator.php 1.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Symfony\Component\PropertyAccess;
  11. /**
  12. * Traverses a property path and provides additional methods to find out
  13. * information about the current element.
  14. *
  15. * @author Bernhard Schussek <bschussek@gmail.com>
  16. *
  17. * @extends \ArrayIterator<int, string>
  18. */
  19. class PropertyPathIterator extends \ArrayIterator implements PropertyPathIteratorInterface
  20. {
  21. protected $path;
  22. public function __construct(PropertyPathInterface $path)
  23. {
  24. parent::__construct($path->getElements());
  25. $this->path = $path;
  26. }
  27. /**
  28. * {@inheritdoc}
  29. */
  30. public function isIndex()
  31. {
  32. return $this->path->isIndex($this->key());
  33. }
  34. /**
  35. * {@inheritdoc}
  36. */
  37. public function isProperty()
  38. {
  39. return $this->path->isProperty($this->key());
  40. }
  41. }