/** * (non-PHPdoc) * @see angelflight/lib/model/om/BasePerson#save($con) */ public function save(PropelPDO $con = null) { if ($this->isColumnModified(PersonPeer::PASSWORD)) { $this->setPassword($this->encryptPassword($this->getPassword())); } parent::save($con); }
/** * Returns a peer instance associated with this om. * * Since Peer classes are not to have any instance attributes, this method returns the * same instance for all member of this class. The method could therefore * be static, but this would prevent one from overriding the behavior. * * @return PersonPeer */ public function getPeer() { if (self::$peer === null) { self::$peer = new PersonPeer(); } return self::$peer; }
/** * Delete a person * Also deletes the person user and photo * @param PropelPDO $con */ public function delete(PropelPDO $con = null) { $photo_path = $this->getPhotoFullPath(); parent::delete($con); if ($this->getUserId()) { $user = sfGuardUserPeer::retrieveByPK($this->getUserId()); $user->delete($con); } $this->deletePhysicalImage($photo_path); }
public function setNameMiddle($str) { parent::_set('name_middle', LsRequestFilter::emptyStringToNull(preg_replace('/[.]/', '', $str))); }
public function rules() { return array_merge(parent::rules()); }