/** * 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(); } }
/** * 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()); } } }
/** * 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(); }