diff options
author | Nicolas LÅ“uillet <nicolas.loeuillet@gmail.com> | 2013-08-03 19:26:54 +0200 |
---|---|---|
committer | Nicolas LÅ“uillet <nicolas.loeuillet@gmail.com> | 2013-08-03 19:26:54 +0200 |
commit | 4f5b44bd3bd490309eb2ba7b44df4769816ba729 (patch) | |
tree | 6cefe170dfe0a5a361cb1e2d1fc4d580a3316d02 /vendor/symfony/property-access/Symfony/Component/PropertyAccess/PropertyPathInterface.php | |
parent | 2b840e0cfb63a453bea67a98541f3df9c273c5f5 (diff) | |
download | wallabag-4f5b44bd3bd490309eb2ba7b44df4769816ba729.tar.gz wallabag-4f5b44bd3bd490309eb2ba7b44df4769816ba729.tar.zst wallabag-4f5b44bd3bd490309eb2ba7b44df4769816ba729.zip |
twig implementation
Diffstat (limited to 'vendor/symfony/property-access/Symfony/Component/PropertyAccess/PropertyPathInterface.php')
-rw-r--r-- | vendor/symfony/property-access/Symfony/Component/PropertyAccess/PropertyPathInterface.php | 86 |
1 files changed, 86 insertions, 0 deletions
diff --git a/vendor/symfony/property-access/Symfony/Component/PropertyAccess/PropertyPathInterface.php b/vendor/symfony/property-access/Symfony/Component/PropertyAccess/PropertyPathInterface.php new file mode 100644 index 00000000..95f34ffa --- /dev/null +++ b/vendor/symfony/property-access/Symfony/Component/PropertyAccess/PropertyPathInterface.php | |||
@@ -0,0 +1,86 @@ | |||
1 | <?php | ||
2 | |||
3 | /* | ||
4 | * This file is part of the Symfony package. | ||
5 | * | ||
6 | * (c) Fabien Potencier <fabien@symfony.com> | ||
7 | * | ||
8 | * For the full copyright and license information, please view the LICENSE | ||
9 | * file that was distributed with this source code. | ||
10 | */ | ||
11 | |||
12 | namespace Symfony\Component\PropertyAccess; | ||
13 | |||
14 | /** | ||
15 | * A sequence of property names or array indices. | ||
16 | * | ||
17 | * @author Bernhard Schussek <bschussek@gmail.com> | ||
18 | */ | ||
19 | interface PropertyPathInterface extends \Traversable | ||
20 | { | ||
21 | /** | ||
22 | * Returns the string representation of the property path | ||
23 | * | ||
24 | * @return string The path as string | ||
25 | */ | ||
26 | public function __toString(); | ||
27 | |||
28 | /** | ||
29 | * Returns the length of the property path, i.e. the number of elements. | ||
30 | * | ||
31 | * @return integer The path length | ||
32 | */ | ||
33 | public function getLength(); | ||
34 | |||
35 | /** | ||
36 | * Returns the parent property path. | ||
37 | * | ||
38 | * The parent property path is the one that contains the same items as | ||
39 | * this one except for the last one. | ||
40 | * | ||
41 | * If this property path only contains one item, null is returned. | ||
42 | * | ||
43 | * @return PropertyPath The parent path or null | ||
44 | */ | ||
45 | public function getParent(); | ||
46 | |||
47 | /** | ||
48 | * Returns the elements of the property path as array | ||
49 | * | ||
50 | * @return array An array of property/index names | ||
51 | */ | ||
52 | public function getElements(); | ||
53 | |||
54 | /** | ||
55 | * Returns the element at the given index in the property path | ||
56 | * | ||
57 | * @param integer $index The index key | ||
58 | * | ||
59 | * @return string A property or index name | ||
60 | * | ||
61 | * @throws Exception\OutOfBoundsException If the offset is invalid | ||
62 | */ | ||
63 | public function getElement($index); | ||
64 | |||
65 | /** | ||
66 | * Returns whether the element at the given index is a property | ||
67 | * | ||
68 | * @param integer $index The index in the property path | ||
69 | * | ||
70 | * @return Boolean Whether the element at this index is a property | ||
71 | * | ||
72 | * @throws Exception\OutOfBoundsException If the offset is invalid | ||
73 | */ | ||
74 | public function isProperty($index); | ||
75 | |||
76 | /** | ||
77 | * Returns whether the element at the given index is an array index | ||
78 | * | ||
79 | * @param integer $index The index in the property path | ||
80 | * | ||
81 | * @return Boolean Whether the element at this index is an array index | ||
82 | * | ||
83 | * @throws Exception\OutOfBoundsException If the offset is invalid | ||
84 | */ | ||
85 | public function isIndex($index); | ||
86 | } | ||