コード例 #1
0
ファイル: Record.php プロジェクト: vallevista/etm2.temp
 public function bindPublisher()
 {
     $bean = $this->_bean;
     if ($bean === null) {
         return $this;
     }
     $this->publisher = Publisher::fromBean($bean->publisher);
     return $this;
 }
コード例 #2
0
ファイル: Publisher.php プロジェクト: vallevista/etm2.temp
 public static function searchByName($name, $limit = 10)
 {
     $beans = R::findAll('publisher', ' name like :name order by name limit :limit ', ['limit' => $limit, 'name' => '%' . $name . '%']);
     $publishers = [];
     foreach ($beans as $bean) {
         $publishers[] = Publisher::fromBean($bean);
     }
     return $publishers;
 }