Пример #1
0
 function __construct($arg)
 {
     if (is_int($arg)) {
         // id
         parent::__construct($arg);
     } elseif (is_object($arg) || is_array($arg)) {
         foreach ($arg as $attribute => $value) {
             $this[$attribute] = $value;
         }
         parent::__construct();
     }
 }
Пример #2
0
 public static function fromId($id, $table = null, $id_column = null)
 {
     $results = parent::fromId($id, self::$table, self::$id_column);
     // TODO: Change the autogenerated stub
     return self::fillValues($results);
 }