Exemplo n.º 1
0
 public function attachTo(AbstractTableSection $table)
 {
     $attachedColumn = $table->findColumnByAlias($this->name);
     if (isset($attachedColumn)) {
         if (isset($this->alias)) {
             $attachedColumn->alias = $this->alias;
         }
         $attachedColumn->visible = $this->visible;
     } else {
         $attachedColumn = $this;
         $table->columns[] = $attachedColumn;
     }
     return $attachedColumn;
 }
 public function assemble(Statement $statement, AbstractTableSection $table, $useTableNameAsAlias) {
     return $this->subject->assembleColumnName($table->prepareColumnTableAlias($useTableNameAsAlias))
         . $this->value->assemble($statement, $useTableNameAsAlias);
 }
    public function attachTo(AbstractTableSection $table) {
        list(, $columnName) = ReferencePathHelper::splitReference($this->name);

        $attachedColumn = $table->findColumnByAlias($columnName);
        if (isset($attachedColumn)) {
            if (isset($this->alias)) {
                $attachedColumn->alias = $this->alias;
            }
            $attachedColumn->visible = $this->visible;
        }
        else {
            $attachedColumn = $this;

            $table->columns[] = $attachedColumn;
        }

        return $attachedColumn;
    }
 public function __construct($body, $alias = NULL) {
     parent::__construct($alias);
     $this->body = $body;
 }