Пример #1
0
 /**
  * Instancia Model e opcionalmente inicializa atributos com $data.
  * @param mixed $data
  */
 public function __construct($data = NULL)
 {
     parent::__construct();
     $this->_className = get_class($this);
     $p = strrpos($this->_className, '\\');
     $this->_namespace = substr($this->_className, 0, $p);
     $this->_map = $this->ORMMap();
     $this->onCreate($data);
 }
Пример #2
0
 public function setUser(\Maestro\Persistence\PersistentObject $user)
 {
     $user->getForRegisterLogin();
     $this->login = $user->getLogin();
     $this->name = $user->getName();
     $this->idUser = $user->getId();
     $this->setGroups($user->getArrayGroups());
     $this->setRights($user->getRights());
     $this->weakPass = $user->weakPassword();
     $this->weakPass = false;
 }
Пример #3
0
 public function getUpdateCriteria(PersistentObject $object)
 {
     $classMap = $object->getClassMap();
     $criteria = new UpdateCriteria($classMap, $this);
     $criteria->setTransaction($object->getTransaction());
     return $criteria;
 }