You are here

public static function SimpleActiveRecord::runInitialize in Rotating Banner 7.2

Same name and namespace in other branches
  1. 7 rotating_banner.classes.inc \SimpleActiveRecord::runInitialize()

Disclaimer: This is a hack. The PDO::FETCH_CLASS does not behave as documented. It is supposed to run the constructor *after* the properties have been assigned and in some versions of PHP, it does that.

However, as of http://bugs.php.net/bug.php?id=46292, it does not. This method receives a list of Objects and runs a ->initialize() method on them. This is basically another constructor which can be run afterwards.

4 calls to SimpleActiveRecord::runInitialize()
RotatingBanner::get in ./rotating_banner.classes.inc
Get by Id
RotatingBanner::getAll in ./rotating_banner.classes.inc
RotatingBannerSlide::get in ./rotating_banner.classes.inc
RotatingBannerSlide::getByRotatingBanner in ./rotating_banner.classes.inc

File

./rotating_banner.classes.inc, line 277

Class

SimpleActiveRecord

Code

public static function runInitialize(&$result) {
  foreach ($result as &$row) {
    $row
      ->initialize();
  }
}