예제 #1
0
파일: Base.php 프로젝트: lerre/framework
 /**
  * Returns an array of column objects for the table associated 
  * with this class.
  * 
  * @return  array
  */
 public function columns()
 {
     if (empty($this->_columns)) {
         $this->_columns = $this->connection->columns($this->tableName(), "{$this->_className} Columns");
         foreach ($this->_columns as $col) {
             $col->setPrimary($col->getName() == $this->_primaryKey);
         }
     }
     return $this->_columns;
 }