Esempio n. 1
0
 /**
  * @param FQSEN|null $fqsen
  * The fully qualified name of the scope in which the
  * constant is defined or null if its a global constant
  *
  * @param string $name
  * The name of the constant
  *
  * @return ClassConstant
  * Get the constant with the given FQSEN
  */
 public function getConstant(FQSEN $fqsen = null, string $name) : ClassConstant
 {
     if (empty($this->constant_map[(string) $fqsen][$name]) && Database::isEnabled()) {
         $this->constant_map[(string) $fqsen][$name] = ConstantModel::read(Database::get(), (string) $fqsen . '|' . $name)->getConstant();
     }
     return $this->constant_map[(string) $fqsen][$name];
 }