vendor/jacquesbh/eater/src/EaterInterface.php line 47

Open in your IDE?
  1. <?php
  2. namespace Jacquesbh\Eater;
  3. use ArrayAccess;
  4. use Countable;
  5. use Iterator;
  6. use IteratorAggregate;
  7. use JsonSerializable;
  8. interface EaterInterface extends ArrayAccessIteratorAggregateJsonSerializableCountable
  9. {
  10.     /**
  11.      * @param array|EaterInterface|null $data
  12.      *
  13.      * @SuppressWarnings(PHPMD.BooleanArgumentFlag)
  14.      */
  15.     public function addData($databool $recursive false): self;
  16.     /**
  17.      * @param mixed $name
  18.      * @param mixed $value
  19.      *
  20.      * @SuppressWarnings(PHPMD.BooleanArgumentFlag)
  21.      */
  22.     public function setData($name null$value nullbool $recursive false): self;
  23.     /**
  24.      * @return mixed
  25.      */
  26.     public function getData(string $name nullstring $field null);
  27.     public function hasData(string $name null): bool;
  28.     public function unsetData(string $name null): self;
  29.     /**
  30.      * @param mixed $offset
  31.      */
  32.     public function offsetExists($offset): bool;
  33.     /**
  34.      * @param mixed $offset
  35.      *
  36.      * @return mixed
  37.      */
  38.     public function offsetGet($offset);
  39.     /**
  40.      * @param mixed $offset
  41.      * @param mixed $value
  42.      */
  43.     public function offsetSet($offset$value): void;
  44.     /**
  45.      * @param mixed $offset
  46.      */
  47.     public function offsetUnset($offset): void;
  48.     /**
  49.      * Format a string for storage
  50.      */
  51.     public function format(string $str): string;
  52.     /**
  53.      * Merge an other Eater (or array)
  54.      *
  55.      * @param EaterInterface|array $eater
  56.      */
  57.     public function merge($eater): self;
  58.     /**
  59.      * Retrun a new external Iterator, used internally for foreach loops.
  60.      */
  61.     public function getIterator(): Iterator;
  62.     /**
  63.      * Retrun the number of datas contained in the current Eater object.
  64.      * This does not include datas contained by child Eater instances.
  65.      */
  66.     public function count(): int;
  67. }