Esempio n. 1
0
 /**
  * Constructor
  * @since Version 3.2
  */
 public function __construct()
 {
     foreach (func_get_args() as $arg) {
         if (filter_var($arg, FILTER_VALIDATE_INT)) {
             $this->id = $arg;
         }
     }
     parent::__construct();
     if (!empty($this->id)) {
         $this->fetch();
     }
 }
Esempio n. 2
0
 /**
  * Constructor
  * @since Version 3.2
  */
 public function __construct()
 {
     foreach (func_get_args() as $arg) {
         if (filter_var($arg, FILTER_VALIDATE_INT)) {
             $this->id = $arg;
         }
     }
     parent::__construct();
     if (!empty($this->id)) {
         try {
             $this->fetch();
         } catch (Exception $e) {
             throw new \Exception($e->getMessage());
         }
     }
 }
Esempio n. 3
0
 /**
  * Constructor
  * @since Version 3.2
  */
 public function __construct()
 {
     foreach (func_get_args() as $arg) {
         if (filter_var($arg, FILTER_VALIDATE_INT)) {
             $this->id = $arg;
         }
     }
     parent::__construct();
     if (empty($this->id)) {
         return;
     }
     $this->mckey = sprintf("railpage:downloads.download=%d", $this->id);
     // Populate the object vars
     $this->fetch();
 }