setIsInitializer() public method

Sets if the method is an initializer or not
public setIsInitializer ( boolean $initializer )
$initializer boolean
Esempio n. 1
0
 /**
  * Creates the static initialization method
  *
  * @param StatementsBlock $statementsBlock
  */
 public function addStaticInitMethod(StatementsBlock $statementsBlock)
 {
     $initClassName = $this->getCNamespace() . '_' . $this->getName();
     $classMethod = new ClassMethod($this, array('internal'), 'zephir_init_static_properties_' . $initClassName, null, $statementsBlock);
     $classMethod->setIsInitializer(true);
     $classMethod->setIsStatic(true);
     $this->addMethod($classMethod);
 }