Example #1
0
 /**
  * Important to execute this in any child classes
  * preferably BEFORE running any of your own code
  */
 public function __construct()
 {
     if (!defined('SYNERGY_LIBRARY_PATH')) {
         define('SYNERGY_LIBRARY_PATH', dirname(dirname(__FILE__)));
     }
     Project::setObject($this);
     // record when this object was instantiated
     $this->projectLaunchTime = new \DateTime();
     // Set our random logging ID using the log scope
     if (method_exists(Project::getLogger(), 'setTag')) {
         /** @noinspection PhpUndefinedMethodInspection */
         Project::getLogger()->setTag(Tools::randomString(6, '0123456789ABCDEF'));
     }
 }