Esempio n. 1
0
 function newSelection(IdentityObject $obj)
 {
     $fields = implode(',', $obj->getObjectFields());
     $core = "SELECT {$fields} FROM space";
     list($where, $values) = $this->buildWhere($obj);
     return array($core . " " . $where, $values);
 }
Esempio n. 2
0
 function buildWhere(IdentityObject $obj)
 {
     if ($obj->isVoid()) {
         return array("", array());
     }
     $compstrings = array();
     $values = array();
     foreach ($obj->getComps() as $comp) {
         $compstrings[] = "{$comp['name']} {$comp['operator']} ?";
         $values[] = $comp['value'];
     }
     $where = "WHERE " . implode(" AND ", $compstrings);
     return array($where, $values);
 }
Esempio n. 3
0
 function __construct($field = null)
 {
     parent::__construct($field, array('name', 'id', 'venue'));
 }
Esempio n. 4
0
 function __construct($field = null)
 {
     parent::__construct($field, array('name', 'id', 'start', 'duration', 'space'));
 }
 public function __construct($field = null)
 {
     parent::__construct($field, array('id', 'sitting_time', 'name'));
 }