/** * Get a row from the collection * * Checks the array of objects which have already been instantiated. On * no match, uses the factory to create an object from it's stored row data. * * @param int $num * @return iDomain\Domain */ protected function getRow($num) { if ($num >= $this->total || $num < 0) { return null; } if (isset($this->objects[$num])) { return $this->objects[$num]; } $this->objects[$num] = $this->factory->create($this->raw[$num]); return $this->objects[$num]; }
/** * Create * * @param $array * @return \Core\Domain\AbstractDomain */ public function create(array $array) { return $this->factory->create($this->convertKeysToCamel($array)); }