Example #1
0
 /**
  * System of Singleton, Constructor have to be
  * called only by the class Factory !!
  * (in order to be working on php < 5.3)
  */
 public function __construct()
 {
     // 1 => Singleton
     // 2 => Called Class
     // 3 => Factory ! (or have to be)
     $calling = Tools::getCallingClass(3);
     assert('$calling == "Factory"');
 }
Example #2
0
 /**
  * Constructor have to only be called by View
  *
  * @param String $file
  */
 public function __construct($file, $type)
 {
     // Pass by a variable because assert will change the call events ^^
     $calling = Tools::getCallingClass();
     assert('$calling == "View"');
     $this->file = View::getFileName($file, $type);
     $this->type = $type;
 }