Library/ClassDefinition.php
public function addInitMethod(StatementsBlock $statementsBlock)
    {
        if (!$statementsBlock->isEmpty()) {
            $initClassName = $this->getCNamespace().'_'.$this->getName();

            $classMethod = new ClassMethod(
                $this,
                ['internal'],
                'zephir_init_properties_'.$initClassName,
                null,
                $statementsBlock
            );

            $classMethod->setIsInitializer(true);
            $this->addMethod($classMethod);
        }
    }
public function addInitMethod(StatementsBlock $statementsBlock)
    {
        if (!$statementsBlock->isEmpty()) {
            $initClassName = $this->getCNamespace().'_'.$this->getName();

            $classMethod = new ClassMethod(
                $this,
                ['internal'],
                'zephir_init_properties_'.$initClassName,
                null,
                $statementsBlock
            );

            $classMethod->setIsInitializer(true);
            $this->addMethod($classMethod);
        }
    }
public function addInitMethod ( StatementsBlock $ statementsBlock ) { if ( ! $ statementsBlock -> isEmpty ( ) ) { $ initClassName = $ this -> getCNamespace ( ) . '_' . $ this -> getName ( ) ; $ classMethod = new ClassMethod ( $ this , [ 'internal' ] , 'zephir_init_properties_' . $ initClassName , null , $ statementsBlock ) ; $ classMethod -> setIsInitializer ( true ) ; $ this -> addMethod ( $ classMethod ) ; } }
Creates the initialization method.

@param StatementsBlock $statementsBlock
Creates the initialization method .