hasConstant() public method

Verify if class has constant
public hasConstant ( string $name ) : boolean
$name string
return boolean
Esempio n. 1
0
 /**
  * Verify if class or parent class has constant
  *
  * @param  string $name
  * @return bool
  */
 public function hasConstant($name)
 {
     if ($this->classScanner->hasConstant($name)) {
         return true;
     }
     foreach ($this->parentClassScanners as $pClassScanner) {
         if ($pClassScanner->hasConstant($name)) {
             return true;
         }
     }
     return false;
 }