Patched to Drupal 8.4.8 level. See https://www.drupal.org/sa-core-2018-004 and patch...
[yaffs-website] / web / core / lib / Drupal / Core / Config / Schema / TypedConfigInterface.php
1 <?php
2
3 namespace Drupal\Core\Config\Schema;
4
5 use Drupal\Core\TypedData\TraversableTypedDataInterface;
6
7 /**
8  * Interface for a typed configuration object that contains multiple elements.
9  *
10  * A list of typed configuration contains any number of items whose type
11  * will depend on the configuration schema but also on the configuration
12  * data being parsed.
13  *
14  * When implementing this interface which extends Traversable, make sure to list
15  * IteratorAggregate or Iterator before this interface in the implements clause.
16  */
17 interface TypedConfigInterface extends TraversableTypedDataInterface {
18
19   /**
20    * Determines whether the data structure is empty.
21    *
22    * @return bool
23    *   TRUE if the data structure is empty, FALSE otherwise.
24    */
25   public function isEmpty();
26
27   /**
28    * Gets an array of contained elements.
29    *
30    * @return array
31    *   Array of \Drupal\Core\TypedData\TypedDataInterface objects.
32    */
33   public function getElements();
34
35   /**
36    * Gets a contained typed configuration element.
37    *
38    * @param $name
39    *   The name of the property to get; e.g., 'title' or 'name'. Nested
40    *   elements can be get using multiple dot delimited names, for example,
41    *   'page.front'.
42    *
43    * @return \Drupal\Core\TypedData\TypedDataInterface
44    *   The property object.
45    *
46    * @throws \InvalidArgumentException
47    *   If an invalid property name is given.
48    */
49   public function get($name);
50
51   /**
52    * Returns an array of all property values.
53    *
54    * @return array
55    *   An array of property values, keyed by property name.
56    */
57   public function toArray();
58
59 }