/** * Constructor for model * * @access public * * @param boolean $new is new model? * * @result void * @throws Exception */ public function __construct($new = true) { parent::__construct(); if (!static::$tableName) { throw new Exception('Table name not set in `' . __CLASS__ . '`` model.'); } $this->_isNewRecord = $new; }
/** * Constructor for model * * @access public * * @param IContainer $container * @param boolean $new is new model? * * @result void */ public function __construct(IContainer $container, $new = true) { parent::__construct($container); $this->_isNewRecord = $new; }