Example #1
0
 protected function __construct(DBInterfaces\IDatabaseConnection $connection, $name, array $fieldNames, $alias = '')
 {
     parent::__construct($connection);
     $this->name = $name;
     $this->alias = $alias;
     foreach ($fieldNames as $key => $fieldName) {
         $alias = '';
         if (is_string($key)) {
             $alias = $key;
         }
         $this->fields[$fieldName] = $this->CreateField($fieldName, $this->RawSelectableName(), $alias);
     }
 }
Example #2
0
 /**
  * Creates a new Select object. 
  * @param bool $distinct Perform Distinct selecition
  * @param SelectList $selectList
  * @param Source $source
  * @param Condition $condition
  * @param OrderList $orderList
  * @param GroupList $groupList
  */
 protected function __construct(DBInterfaces\IDatabaseConnection $connection, $distinct, SelectList $selectList, Source $source, Condition $condition = null, OrderList $orderList = null, GroupList $groupList = null, $offset = 0, $count = 0)
 {
     parent::__construct($connection);
     $this->distinct = (bool) $distinct;
     $this->selectList = $selectList;
     $this->source = $source;
     $this->condition = $condition;
     $this->orderList = $orderList;
     $this->groupList = $groupList;
     if ($count) {
         $this->offset = (int) $offset;
         $this->count = (int) $count;
     }
 }
Example #3
0
 protected function __construct(DBInterfaces\IDatabaseConnection $connection, Table $table = null)
 {
     parent::__construct($connection);
     $this->tables[] = $table;
 }