src/Analyse/Callback/Iterate/ThroughGetter.php
protected function retrievePropertyValue(\ReflectionMethod $reflectionMethod, Model $model)
    {
        /** @var \Brainworxx\Krexx\Service\Reflection\ReflectionClass $reflectionClass */
        $reflectionClass = $this->parameters[static::PARAM_REF];
        $refProp = $this->getReflectionProperty($reflectionClass, $reflectionMethod);
        $nothingFound = true;
        $value = null;

        if (empty($refProp) === false) {
            // We've got ourselves a possible result!
            $nothingFound = false;
            $value = $reflectionClass->retrieveValue($refProp);
            $model->setData($value);
            if ($value === null) {
                // A NULL value might mean that the values does not
                // exist, until the getter computes it.
                $model->addToJson(static::META_HINT, $this->pool->messages->getHelp('getterNull'));
            }
        }

        // Give the plugins the opportunity to do something with the value, or
        // try to resolve it,  if nothing was found.
        // We also add the stuff, that we were able to do so far.
        $this->parameters[static::PARAM_ADDITIONAL] = array(
            'nothingFound' => $nothingFound,
            'value' => $value,
            'refProperty' => $refProp,
            'refMethod' => $reflectionMethod
        );
        $this->dispatchEventWithModel(__FUNCTION__ . '::resolving', $model);

        if ($this->parameters[static::PARAM_ADDITIONAL]['nothingFound'] === true) {
            // Found nothing  :-(
            // We literally have no info. We need to tell the user.
            $model->setType(static::TYPE_UNKNOWN)
                ->setNormal(static::TYPE_UNKNOWN);
            // We render this right away, without any routing.
            return $this->pool->render->renderSingleChild($model);
        }

        return $this->pool->routing->analysisHub(
            $this->dispatchEventWithModel(
                __FUNCTION__ . static::EVENT_MARKER_END,
                $model
            )
        );
    }
protected function retrievePropertyValue(\ReflectionMethod $reflectionMethod, Model $model)
    {
        /** @var \Brainworxx\Krexx\Service\Reflection\ReflectionClass $reflectionClass */
        $reflectionClass = $this->parameters[static::PARAM_REF];
        $refProp = $this->getReflectionProperty($reflectionClass, $reflectionMethod);
        $nothingFound = true;
        $value = null;

        if (empty($refProp) === false) {
            // We've got ourselves a possible result!
            $nothingFound = false;
            $value = $reflectionClass->retrieveValue($refProp);
            $model->setData($value);
            if ($value === null) {
                // A NULL value might mean that the values does not
                // exist, until the getter computes it.
                $model->addToJson(static::META_HINT, $this->pool->messages->getHelp('getterNull'));
            }
        }

        // Give the plugins the opportunity to do something with the value, or
        // try to resolve it,  if nothing was found.
        // We also add the stuff, that we were able to do so far.
        $this->parameters[static::PARAM_ADDITIONAL] = array(
            'nothingFound' => $nothingFound,
            'value' => $value,
            'refProperty' => $refProp,
            'refMethod' => $reflectionMethod
        );
        $this->dispatchEventWithModel(__FUNCTION__ . '::resolving', $model);

        if ($this->parameters[static::PARAM_ADDITIONAL]['nothingFound'] === true) {
            // Found nothing  :-(
            // We literally have no info. We need to tell the user.
            $model->setType(static::TYPE_UNKNOWN)
                ->setNormal(static::TYPE_UNKNOWN);
            // We render this right away, without any routing.
            return $this->pool->render->renderSingleChild($model);
        }

        return $this->pool->routing->analysisHub(
            $this->dispatchEventWithModel(
                __FUNCTION__ . static::EVENT_MARKER_END,
                $model
            )
        );
    }
protected function retrievePropertyValue ( \ ReflectionMethod $ reflectionMethod , Model $ model ) { /** @var \Brainworxx\Krexx\Service\Reflection\ReflectionClass $reflectionClass */ $ reflectionClass = $ this -> parameters [ static :: PARAM_REF ] ; $ refProp = $ this -> getReflectionProperty ( $ reflectionClass , $ reflectionMethod ) ; $ nothingFound = true ; $ value = null ; if ( empty ( $ refProp ) === false ) { // We've got ourselves a possible result! $ nothingFound = false ; $ value = $ reflectionClass -> retrieveValue ( $ refProp ) ; $ model -> setData ( $ value ) ; if ( $ value === null ) { // A NULL value might mean that the values does not // exist, until the getter computes it. $ model -> addToJson ( static :: META_HINT , $ this -> pool -> messages -> getHelp ( 'getterNull' ) ) ; } } // Give the plugins the opportunity to do something with the value, or // try to resolve it,  if nothing was found. // We also add the stuff, that we were able to do so far. $ this -> parameters [ static :: PARAM_ADDITIONAL ] = array ( 'nothingFound' => $ nothingFound , 'value' => $ value , 'refProperty' => $ refProp , 'refMethod' => $ reflectionMethod ) ; $ this -> dispatchEventWithModel ( __FUNCTION__ . '::resolving' , $ model ) ; if ( $ this -> parameters [ static :: PARAM_ADDITIONAL ] [ 'nothingFound' ] === true ) { // Found nothing  :-( // We literally have no info. We need to tell the user. $ model -> setType ( static :: TYPE_UNKNOWN ) -> setNormal ( static :: TYPE_UNKNOWN ) ; // We render this right away, without any routing. return $ this -> pool -> render -> renderSingleChild ( $ model ) ; } return $ this -> pool -> routing -> analysisHub ( $ this -> dispatchEventWithModel ( __FUNCTION__ . static :: EVENT_MARKER_END , $ model ) ) ; }
Try to get a possible return value and render the result.

@param \ReflectionMethod $reflectionMethod
A reflection ot the method we are analysing
@param Model $model
The model so far.

@return string
The rendered markup.
Try to get a possible return value and render the result .