Example #1
0
 public function returning()
 {
     $number = func_num_args();
     for ($i = 0; $i < $number; $i++) {
         array_push($this->returning, ColumnManager::getColumn());
     }
     return $this;
 }
Example #2
0
function g($columns = null)
{
    if ($columns instanceof PersistenceModel) {
        $columns = func_num_args();
    }
    $list = array();
    for ($i = 0; $i < $columns; $i++) {
        $col = ColumnManager::getColumn();
        array_push($list, $col);
    }
    return $list;
}
Example #3
0
 public function __set($name, $value)
 {
     if ($value instanceof PersistenceModel) {
         $value = ColumnManager::getColumn();
     } else {
         if (is_string($value)) {
             $value = preg_replace("/(.)'(.)/i", '$1\\\'$2', $value);
         }
     }
     if (Condition::is_operator($name)) {
         self::addCondition(Condition::getInstance($name, $this->relation_name, $value));
     } else {
         $fullname = ($this->relation ? "{$this->relation}." : "") . ($this->name ? "{$this->name}." : "") . $name;
         self::addCondition(Condition::__equ__($fullname, $value));
     }
 }
Example #4
0
 public static function __as__($alias)
 {
     $column = ColumnManager::getColumn();
     return ColumnManager::addColumn(array('column' => $column, 'alias' => $alias));
 }