__construct() 공개 메소드

public __construct ( )
예제 #1
0
 /**
  * Constructor.
  * @param int $idSite If creating settings for a new site that is not created yet, use idSite = 0
  * @param string|null $idMeasurableType If null, idType will be detected from idSite
  * @throws Exception
  */
 public function __construct($idSite, $idMeasurableType = null)
 {
     parent::__construct();
     $this->idSite = (int) $idSite;
     if (!empty($idMeasurableType)) {
         $this->idMeasurableType = $idMeasurableType;
     } elseif (!empty($idSite)) {
         $this->idMeasurableType = Site::getTypeFor($idSite);
     } else {
         throw new Exception('No idType specified for ' . get_class($this));
     }
     $this->init();
 }
예제 #2
0
 /**
  * Constructor.
  */
 public function __construct()
 {
     parent::__construct();
     $this->init();
 }