コード例 #1
0
ファイル: Usuario.class.php プロジェクト: andermall/tcc
 /**
  * Delete the object and its aggregates
  * @param $id object ID
  */
 public function delete($id = NULL)
 {
     // delete the related System_userSystem_user_grupo objects
     $id = isset($id) ? $id : $this->id;
     $repository = new TRepository('UsuarioGrupo');
     $criteria = new TCriteria();
     $criteria->add(new TFilter('usuario_id', '=', $id));
     $repository->delete($criteria);
     // delete the related System_userSystem_user_program objects
     $id = isset($id) ? $id : $this->id;
     $repository = new TRepository('UsuarioFuncionalidade');
     $criteria = new TCriteria();
     $criteria->add(new TFilter('usuario_id', '=', $id));
     $repository->delete($criteria);
     // delete the object itself
     parent::delete($id);
 }
コード例 #2
0
ファイル: Natureza.class.php プロジェクト: andermall/tcc
 /**
  * Constructor method
  */
 public function __construct($id = NULL, $callObjectLoad = TRUE)
 {
     parent::__construct($id, $callObjectLoad);
     parent::addAttribute('descricao');
 }
コード例 #3
0
ファイル: TRecord.php プロジェクト: cbsistem/adiantiframework
 /**
  * Fill the Active Record properties from another Active Record
  * @param $object An Active Record
  */
 public function mergeObject(TRecord $object)
 {
     $data = $object->toArray();
     foreach ($data as $key => $value) {
         $this->data[$key] = $value;
     }
 }