protected function MostPopularLastRun::MostPopularLastRun in Drupal Most Popular 6
Same name and namespace in other branches
- 7 classes/lastrun.php \MostPopularLastRun::MostPopularLastRun()
Constructs a new MostPopularLastRun object, only used internally.
Parameters
array|object $object: An object containing values to populate this object with.
boolean $new: True if this is a new object, false if it already exists in the database.
File
- classes/
lastrun.php, line 37 - Defines a wrapper for the mostpopular_last_run table.
Class
- MostPopularLastRun
- @file Defines a wrapper for the mostpopular_last_run table.
Code
protected function MostPopularLastRun($object, $new = FALSE) {
if (is_array($object)) {
$object = (object) $object;
}
$this->sid = $object->sid;
$this->iid = $object->iid;
$this->last_run = $object->last_run;
$this->throttle = $object->throttle;
$this->new = $new;
// If the throttle isn't set, use the defaults instead
if (!isset($this->throttle)) {
$defaults = self::getDefaultThrottles($this->sid);
$this->throttle = $defaults[$this->sid][$this->iid];
}
}