Exemplo n.º 1
0
 public function __construct($name, array $columns, array $relation, $isRef)
 {
     $this->model = C::camelhead($name);
     $this->label = C::human($name);
     $this->name = $name;
     $this->relation = $relation;
     $this->isRef = $isRef;
     foreach ($columns as $key => $column) {
         $column = new Column($column, isset($relation[$column['Field']]) ? $relation[$column['Field']] : array());
         !$column->isPrimaryKey || array_push($this->primary_key, $column->Field);
         $this->column[$column->Field] = $column;
     }
 }
Exemplo n.º 2
0
 public function __construct(array $def, array $rel = array())
 {
     $this->def = $def;
     $this->rel = $rel;
     $this->name = C::camelhead($def['Field']);
     $this->label = C::human($def['Field']);
 }