Beispiel #1
0
 /**
  * Constructor.
  */
 function __construct($results, $meta, $model_name)
 {
     if ($results) {
         $records = array();
         foreach ((array) $results as $key => $result) {
             if ($result instanceof ModelRecord == false) {
                 $result = new ModelRecord($result, $model_name);
             }
             $records[$key] = $result;
         }
         $this->meta = $meta;
         parent::__construct($records, $model_name);
     }
 }
Beispiel #2
0
 /**
  * Constructor.
  */
 function __construct(&$values, $model_name)
 {
     if (is_array($values)) {
         parent::__construct($values, $model_name);
     }
 }