Exemplo n.º 1
0
 /**
  * Get member if exists
  *
  * @return Sppc_Member
  */
 public function getMember()
 {
     if (is_null($this->_member)) {
         $memberModel = new Sppc_MemberModel();
         $rowset = $memberModel->find($this->getId());
         if (count($rowset)) {
             $this->_member = $rowset->current();
         } else {
             $this->_member = false;
         }
     }
     if ($this->_member === false) {
         return null;
     }
     return $this->_member;
 }
Exemplo n.º 2
0
 /**
  * Add custom logic on row insert
  * @return void
  */
 protected function _insert()
 {
     $memberModel = new Sppc_MemberModel();
     $member = $memberModel->createRow($this->getEntity());
     $member->save();
 }