_examples[$offset]); } /** * Get an example. * * @param int $offset Offset. * @return string */ public function offsetGet($offset) { if (false === $this->offsetExists($offset)) { return null; } return $this->_examples[$offset]; } /** * Set an example. * * @param int $offset Offset. * @param string $value Example value. * @return \Hoa\Praspel\Model\Description */ public function offsetSet($offset, $value) { if (null === $offset) { $this->_examples[] = $value; } else { $this->_examples[$offset] = $value; } return $this; } /** * Unset an example. * * @param int $offset Offset. * @return void */ public function offsetUnset($offset) { unset($this->_examples[$offset]); return; } /** * Iterator over examples. * * @return \Hoa\Iterator\Map */ public function getIterator() { return new Iterator\Map($this->_examples); } /** * Count number of examples. * * @return int */ public function count() { return count($this->_examples); } }