Library/CompilerFile.php
public function preCompileInterface($namespace, $topStatement, $docblock)
    {
        $classDefinition = new ClassDefinition($namespace, $topStatement['name']);
        $classDefinition->setIsExternal($this->external);

        if (isset($topStatement['extends'])) {
            foreach ($topStatement['extends'] as &$extend) {
                $extend['value'] = $this->getFullName($extend['value']);
            }
            $classDefinition->setImplementsInterfaces($topStatement['extends']);
        }

        $classDefinition->setType('interface');

        if (\is_array($docblock)) {
            $classDefinition->setDocBlock($docblock['value']);
        }

        if (isset($topStatement['definition'])) {
            $definition = $topStatement['definition'];

            /*
             * Register constants
             */
            if (isset($definition['constants'])) {
                foreach ($definition['constants'] as $constant) {
                    $classConstant = new ClassConstant(
                        $constant['name'],
                        isset($constant['default']) ? $constant['default'] : null,
                        isset($constant['docblock']) ? $constant['docblock'] : null
                    );
                    $classDefinition->addConstant($classConstant);
                }
            }

            /*
             * Register methods
             */
            if (isset($definition['methods'])) {
                foreach ($definition['methods'] as $method) {
                    $classMethod = new ClassMethod(
                        $classDefinition,
                        $method['visibility'],
                        $method['name'],
                        isset($method['parameters']) ? new ClassMethodParameters($method['parameters']) : null,
                        null,
                        isset($method['docblock']) ? $method['docblock'] : null,
                        isset($method['return-type']) ? $method['return-type'] : null,
                        $method
                    );
                    $classDefinition->addMethod($classMethod, $method);
                }
            }
        }

        $this->classDefinition = $classDefinition;
    }
public function preCompileInterface($namespace, $topStatement, $docblock)
    {
        $classDefinition = new ClassDefinition($namespace, $topStatement['name']);
        $classDefinition->setIsExternal($this->external);

        if (isset($topStatement['extends'])) {
            foreach ($topStatement['extends'] as &$extend) {
                $extend['value'] = $this->getFullName($extend['value']);
            }
            $classDefinition->setImplementsInterfaces($topStatement['extends']);
        }

        $classDefinition->setType('interface');

        if (\is_array($docblock)) {
            $classDefinition->setDocBlock($docblock['value']);
        }

        if (isset($topStatement['definition'])) {
            $definition = $topStatement['definition'];

            /*
             * Register constants
             */
            if (isset($definition['constants'])) {
                foreach ($definition['constants'] as $constant) {
                    $classConstant = new ClassConstant(
                        $constant['name'],
                        isset($constant['default']) ? $constant['default'] : null,
                        isset($constant['docblock']) ? $constant['docblock'] : null
                    );
                    $classDefinition->addConstant($classConstant);
                }
            }

            /*
             * Register methods
             */
            if (isset($definition['methods'])) {
                foreach ($definition['methods'] as $method) {
                    $classMethod = new ClassMethod(
                        $classDefinition,
                        $method['visibility'],
                        $method['name'],
                        isset($method['parameters']) ? new ClassMethodParameters($method['parameters']) : null,
                        null,
                        isset($method['docblock']) ? $method['docblock'] : null,
                        isset($method['return-type']) ? $method['return-type'] : null,
                        $method
                    );
                    $classDefinition->addMethod($classMethod, $method);
                }
            }
        }

        $this->classDefinition = $classDefinition;
    }
public function preCompileInterface ( $ namespace , $ topStatement , $ docblock ) { $ classDefinition = new ClassDefinition ( $ namespace , $ topStatement [ 'name' ] ) ; $ classDefinition -> setIsExternal ( $ this -> external ) ; if ( isset ( $ topStatement [ 'extends' ] ) ) { foreach ( $ topStatement [ 'extends' ] as & $ extend ) { $ extend [ 'value' ] = $ this -> getFullName ( $ extend [ 'value' ] ) ; } $ classDefinition -> setImplementsInterfaces ( $ topStatement [ 'extends' ] ) ; } $ classDefinition -> setType ( 'interface' ) ; if ( \ is_array ( $ docblock ) ) { $ classDefinition -> setDocBlock ( $ docblock [ 'value' ] ) ; } if ( isset ( $ topStatement [ 'definition' ] ) ) { $ definition = $ topStatement [ 'definition' ] ; /*
             * Register constants
             */ if ( isset ( $ definition [ 'constants' ] ) ) { foreach ( $ definition [ 'constants' ] as $ constant ) { $ classConstant = new ClassConstant ( $ constant [ 'name' ] , isset ( $ constant [ 'default' ] ) ? $ constant [ 'default' ] : null , isset ( $ constant [ 'docblock' ] ) ? $ constant [ 'docblock' ] : null ) ; $ classDefinition -> addConstant ( $ classConstant ) ; } } /*
             * Register methods
             */ if ( isset ( $ definition [ 'methods' ] ) ) { foreach ( $ definition [ 'methods' ] as $ method ) { $ classMethod = new ClassMethod ( $ classDefinition , $ method [ 'visibility' ] , $ method [ 'name' ] , isset ( $ method [ 'parameters' ] ) ? new ClassMethodParameters ( $ method [ 'parameters' ] ) : null , null , isset ( $ method [ 'docblock' ] ) ? $ method [ 'docblock' ] : null , isset ( $ method [ 'return-type' ] ) ? $ method [ 'return-type' ] : null , $ method ) ; $ classDefinition -> addMethod ( $ classMethod , $ method ) ; } } } $ this -> classDefinition = $ classDefinition ; }
Creates a definition for an interface.

@param string $namespace
@param array  $topStatement
@param array  $docblock
Creates a definition for an interface .