コード例 #1
0
ファイル: ClassDefinition.php プロジェクト: NumbDai/zephir
 /**
  * Adds a method to the class definition
  *
  * @param ClassMethod $method
  * @param array $statement
  */
 public function addMethod(ClassMethod $method, $statement = null)
 {
     $methodName = strtolower($method->getName());
     if (isset($this->methods[$methodName])) {
         throw new CompilerException("Method '" . $method->getName() . "' was defined more than one time", $statement);
     }
     $this->methods[$methodName] = $method;
 }