src/Analyse/Callback/Iterate/ThroughMethods.php
public function callMe()
    {
        $result = $this->dispatchStartEvent();
        /** @var \Brainworxx\Krexx\Service\Reflection\ReflectionClass $reflectionClass */
        $reflectionClass = $this->parameters[static::PARAM_REF];
        $commentAnalysis = $this->pool->createClass('Brainworxx\\Krexx\\Analyse\\Comment\\Methods');

        // Deep analysis of the methods.
        /** @var \ReflectionMethod $reflectionMethod */
        foreach ($this->parameters[static::PARAM_DATA] as $reflectionMethod) {
            $methodData = array();

            // Get the comment from the class, it's parents, interfaces or traits.
            $methodComment = $commentAnalysis->getComment($reflectionMethod, $reflectionClass);
            if (empty($methodComment) === false) {
                $methodData[static::META_COMMENT] = $methodComment;
            }

            // Get declaration place.
            $declaringClass = $reflectionMethod->getDeclaringClass();
            $methodData[static::META_DECLARED_IN] = $this->getDeclarationPlace($reflectionMethod, $declaringClass);

            // Get parameters.
            $paramList = '';
            foreach ($reflectionMethod->getParameters() as $key => $reflectionParameter) {
                ++$key;
                $paramList .= $methodData[static::META_PARAM_NO . $key] = $this->pool
                    ->codegenHandler
                    ->parameterToString($reflectionParameter);
                // We add a comma to the parameter list, to separate them for a
                // better readability.
                $paramList .= ', ';
            }

            // Get declaring keywords.
            $methodData['declaration keywords'] = $this->getDeclarationKeywords(
                $reflectionMethod,
                $declaringClass,
                $reflectionClass
            );

            // Get the connector.
            if ($reflectionMethod->isStatic() === true) {
                $connectorType = Connectors::STATIC_METHOD;
            } else {
                $connectorType = Connectors::METHOD;
            }

            // Update the reflection method, so an event subscriber can do
            // something with it.
            $this->parameters[static::PARAM_REF_METHOD] = $reflectionMethod;

            // Render it!
            $result .= $this->pool->render->renderExpandableChild(
                $this->dispatchEventWithModel(
                    __FUNCTION__ . static::EVENT_MARKER_END,
                    $this->pool->createClass('Brainworxx\\Krexx\\Analyse\\Model')
                        ->setName($reflectionMethod->name)
                        ->setType($methodData['declaration keywords'] . static::TYPE_METHOD)
                        ->setConnectorType($connectorType)
                        // Remove the ',' after the last char.
                        ->setConnectorParameters(trim($paramList, ', '))
                        ->addParameter(static::PARAM_DATA, $methodData)
                        ->setIsPublic($reflectionMethod->isPublic())
                        ->injectCallback(
                            $this->pool->createClass(
                                'Brainworxx\\Krexx\\Analyse\\Callback\\Iterate\\ThroughMethodAnalysis'
                            )
                        )
                )
            );
        }

        return $result;
    }
public function callMe()
    {
        $result = $this->dispatchStartEvent();
        /** @var \Brainworxx\Krexx\Service\Reflection\ReflectionClass $reflectionClass */
        $reflectionClass = $this->parameters[static::PARAM_REF];
        $commentAnalysis = $this->pool->createClass('Brainworxx\\Krexx\\Analyse\\Comment\\Methods');

        // Deep analysis of the methods.
        /** @var \ReflectionMethod $reflectionMethod */
        foreach ($this->parameters[static::PARAM_DATA] as $reflectionMethod) {
            $methodData = array();

            // Get the comment from the class, it's parents, interfaces or traits.
            $methodComment = $commentAnalysis->getComment($reflectionMethod, $reflectionClass);
            if (empty($methodComment) === false) {
                $methodData[static::META_COMMENT] = $methodComment;
            }

            // Get declaration place.
            $declaringClass = $reflectionMethod->getDeclaringClass();
            $methodData[static::META_DECLARED_IN] = $this->getDeclarationPlace($reflectionMethod, $declaringClass);

            // Get parameters.
            $paramList = '';
            foreach ($reflectionMethod->getParameters() as $key => $reflectionParameter) {
                ++$key;
                $paramList .= $methodData[static::META_PARAM_NO . $key] = $this->pool
                    ->codegenHandler
                    ->parameterToString($reflectionParameter);
                // We add a comma to the parameter list, to separate them for a
                // better readability.
                $paramList .= ', ';
            }

            // Get declaring keywords.
            $methodData['declaration keywords'] = $this->getDeclarationKeywords(
                $reflectionMethod,
                $declaringClass,
                $reflectionClass
            );

            // Get the connector.
            if ($reflectionMethod->isStatic() === true) {
                $connectorType = Connectors::STATIC_METHOD;
            } else {
                $connectorType = Connectors::METHOD;
            }

            // Update the reflection method, so an event subscriber can do
            // something with it.
            $this->parameters[static::PARAM_REF_METHOD] = $reflectionMethod;

            // Render it!
            $result .= $this->pool->render->renderExpandableChild(
                $this->dispatchEventWithModel(
                    __FUNCTION__ . static::EVENT_MARKER_END,
                    $this->pool->createClass('Brainworxx\\Krexx\\Analyse\\Model')
                        ->setName($reflectionMethod->name)
                        ->setType($methodData['declaration keywords'] . static::TYPE_METHOD)
                        ->setConnectorType($connectorType)
                        // Remove the ',' after the last char.
                        ->setConnectorParameters(trim($paramList, ', '))
                        ->addParameter(static::PARAM_DATA, $methodData)
                        ->setIsPublic($reflectionMethod->isPublic())
                        ->injectCallback(
                            $this->pool->createClass(
                                'Brainworxx\\Krexx\\Analyse\\Callback\\Iterate\\ThroughMethodAnalysis'
                            )
                        )
                )
            );
        }

        return $result;
    }
public function callMe ( ) { $ result = $ this -> dispatchStartEvent ( ) ; /** @var \Brainworxx\Krexx\Service\Reflection\ReflectionClass $reflectionClass */ $ reflectionClass = $ this -> parameters [ static :: PARAM_REF ] ; $ commentAnalysis = $ this -> pool -> createClass ( 'Brainworxx\\Krexx\\Analyse\\Comment\\Methods' ) ; // Deep analysis of the methods. /** @var \ReflectionMethod $reflectionMethod */ foreach ( $ this -> parameters [ static :: PARAM_DATA ] as $ reflectionMethod ) { $ methodData = array ( ) ; // Get the comment from the class, it's parents, interfaces or traits. $ methodComment = $ commentAnalysis -> getComment ( $ reflectionMethod , $ reflectionClass ) ; if ( empty ( $ methodComment ) === false ) { $ methodData [ static :: META_COMMENT ] = $ methodComment ; } // Get declaration place. $ declaringClass = $ reflectionMethod -> getDeclaringClass ( ) ; $ methodData [ static :: META_DECLARED_IN ] = $ this -> getDeclarationPlace ( $ reflectionMethod , $ declaringClass ) ; // Get parameters. $ paramList = '' ; foreach ( $ reflectionMethod -> getParameters ( ) as $ key => $ reflectionParameter ) { ++ $ key ; $ paramList .= $ methodData [ static :: META_PARAM_NO . $ key ] = $ this -> pool -> codegenHandler -> parameterToString ( $ reflectionParameter ) ; // We add a comma to the parameter list, to separate them for a // better readability. $ paramList .= ', ' ; } // Get declaring keywords. $ methodData [ 'declaration keywords' ] = $ this -> getDeclarationKeywords ( $ reflectionMethod , $ declaringClass , $ reflectionClass ) ; // Get the connector. if ( $ reflectionMethod -> isStatic ( ) === true ) { $ connectorType = Connectors :: STATIC_METHOD ; } else { $ connectorType = Connectors :: METHOD ; } // Update the reflection method, so an event subscriber can do // something with it. $ this -> parameters [ static :: PARAM_REF_METHOD ] = $ reflectionMethod ; // Render it! $ result .= $ this -> pool -> render -> renderExpandableChild ( $ this -> dispatchEventWithModel ( __FUNCTION__ . static :: EVENT_MARKER_END , $ this -> pool -> createClass ( 'Brainworxx\\Krexx\\Analyse\\Model' ) -> setName ( $ reflectionMethod -> name ) -> setType ( $ methodData [ 'declaration keywords' ] . static :: TYPE_METHOD ) -> setConnectorType ( $ connectorType ) // Remove the ',' after the last char. -> setConnectorParameters ( trim ( $ paramList , ', ' ) ) -> addParameter ( static :: PARAM_DATA , $ methodData ) -> setIsPublic ( $ reflectionMethod -> isPublic ( ) ) -> injectCallback ( $ this -> pool -> createClass ( 'Brainworxx\\Krexx\\Analyse\\Callback\\Iterate\\ThroughMethodAnalysis' ) ) ) ) ; } return $ result ; }
Simply start to iterate through the methods.

@return string
The rendered markup.
Simply start to iterate through the methods .