/** * Discloses all values of the object that should be visible in the view layer. * * @param mixed $key * @access public * @return mixed */ public function disclose($key = null) { $this->_discloseAttr = array('sendMethod'); foreach ($this->_discloseNotEmpty as $attr) { if (!empty($this->{$attr})) { $this->_discloseAttr[] = $attr; } } return parent::disclose($key); }
/** * Validate object * @return bool */ protected function validate() { return count($this->details) > 0 && parent::validate(); }
/** * Adopt the data from $self * @param AbstractModel $self * @return self */ protected function reload(AbstractModel $self) { $this->_initVars(); $this->extract($self->selfToArray(), false); return $this; }
/** * Copy the contact * @param array $filter * @return self */ public function copy(array $filter = array()) { return parent::copy(array('customerId')); }