/** * Initializes the options for the object * * Called from {@link __construct()} as a first step of object instantiation. * * @param object An optional KConfig object with configuration options. * @return void */ protected function _initialize(KConfig $config) { $config->append(array( 'data' => null, 'new' => true, 'identity_column' => null )); parent::_initialize($config); }
/** * Checks if the collection contains a specific row * * @param KObjectHandlable|KDatabaseRowInterface $row * @throws \InvalidArgumentException if the object doesn't implement KDatabaseRowInterface * @return bool Returns TRUE if the object is in the set, FALSE otherwise */ public function contains(KObjectHandlable $row) { if (!$row instanceof KDatabaseRowInterface) { throw new InvalidArgumentException('Entity needs to implement KModelEntityInterface'); } return parent::contains($row); }
/** * Forwards the $method to each of the objects and return an array of * objects, scarlar or a single boolean value * * @param string $method * @param array $arguments * @return mixed */ public function __call($method, $arguments = array()) { if (isset($this->_mixed_methods[$method])) { return parent::__call($method, $arguments); } return $this->_forward('method', $method, $arguments); }