Beispiel #1
0
 function __construct(array $fields = array())
 {
     $this->fields = self::build();
     parent::__construct($fields);
 }
Beispiel #2
0
 public function bindFromModel(Model $model)
 {
     foreach ($this->fields as $key => $value) {
         $this->bind($key, $model->get($key));
     }
 }
Beispiel #3
0
 public static function generateReferences(Model $model, array $fields, array &$values)
 {
     foreach ($fields as $key) {
         $values[] = $model->raw($key);
     }
     $references = array();
     foreach ($values as &$value) {
         $references[] =& $value;
     }
     return $references;
 }