Example #1
0
 /**
  * idを指定して1つのResourceを取得する
  * @param $id
  * @param $column
  * @return mixed
  */
 public function getResource($id, $column = array())
 {
     $builder = new DbConditions();
     $params = $builder->equal('id', $id);
     if (!empty($column)) {
         $params->select($column);
     }
     return $this->model->find($params->build());
 }
Example #2
0
 /**
  * 先頭にORが来た時
  * @expectedException \KTR\Libs\KtrRuntimeException
  */
 public function testIllegalOR()
 {
     $this->obj->or()->greaterThan('test2', 'value2')->build();
     $this->getExpectedException();
 }