Gets the return value ReST notation

@return boolean|string
420252
protected function getReturnValue()
    {
        $annotations = array_filter($this->getParser()->getAnnotations(), function ($v) {
            $e = explode(' ', $v);
            return isset($e[0]) && $e[0] == '@return';
        });
        foreach ($annotations as $parameter) {
            $parts = explode(' ', $parameter);

            if (count($parts) < 2) {
                continue;
            }

            $type = array_slice($parts, 1, 1);
            $type = $type[0];

            $comment = implode(' ', array_slice($parts, 2));

            $string = ':returns:';

            return sprintf(
                ':returns: %s%s',
                $type ?: 'unknown',
                $comment ? ' ' . $comment : ''
            );
        }

        return false;
    }
500967
public function getValue()
	{
		$grammar = Manager::connection()->getQueryGrammar();
		return vsprintf( $this->value, array_map(function($val) use($grammar) {
			return $grammar->wrap($val);
		}, $this->replace) );
	}
884592
public function getValue()
    {
        return implode(
            ',',
            [
                $this->bottomLeft->getLatitude(),
                $this->bottomLeft->getLongitude(),
                $this->topRight->getLatitude(),
                $this->topRight->getLongitude(),
            ]
        );
    }
1127603
public function getCallbackResult()
    {
        $class = $this->requestBag->getClassData()['class'];
        if (is_string($class)) {
            $this->requestBag->setClassInstance(new $class);
        } else {
            $this->requestBag->setClassInstance($class);
        }

        // create CallbackResult instance
        $cr = new CallbackResult();

        $env = 'production';
        if ($this->requestBag->getApiConfig()->get('Environment', 'production') == 'development') {
            $cr->setEnvToDevelopment();
            $env = 'development';
        }

        // attach some metadata
        $cr->attachDebugHeader('Class', $class);
        $cr->attachDebugHeader('ClassVersion', $this->requestBag->getClassData()['version']);
        $cr->attachDebugHeader('Method', strtoupper($this->httpRequest()->getRequestMethod()));


        if (!$this->requestBag->getMethodData()) {
            // if no method matched the request
            $cr->setHeaderResponse(404);
            $cr->setErrorResponse('No service matched the request.');

            return $cr;
        }

        // check rate limit
        try {
            $rateControl = RateControl::isWithinRateLimits($this->requestBag, $cr);
            if (!$rateControl) {
                $cr->setHeaderResponse(429);
                $cr->setErrorResponse('Rate control limit reached.');

                return $cr;
            }
        } catch (\Exception $e) {
            throw new RestException('Rate control verification failed. ' . $e->getMessage());
        }

        // verify access role
        try {
            $hasAccess = Security::hasAccess($this->requestBag);
            if (!$hasAccess) {
                $cr->setHeaderResponse(403);
                $cr->setErrorResponse('You don\'t have the required access level.');
                $cr->attachDebugHeader('RequestedRole', $this->requestBag->getMethodData()['role']);

                return $cr;
            }
        } catch (\Exception $e) {
            throw new RestException('Access role verification failed. ' . $e->getMessage());
        }

        // verify cache
        try {
            $cachedResult = Cache::getFromCache($this->requestBag);
        } catch (\Exception $e) {
            throw new RestException('Reading result from cache failed. ' . $e->getMessage());
        }

        // finalize output
        if ($cachedResult) {
            $cr->setData($cachedResult);
            $cr->attachDebugHeader('Cache', 'HIT');
        } else {
            try {
                // Check if we have a Middleware set up
                $middleware = $this->requestBag->getApiConfig()->get('Middleware');
                if ($middleware) {
                    $middleware = new $middleware;
                    if (!$this->isInstanceOf($middleware, MiddlewareInterface::class)) {
                        throw new RestException('Your custom Rest middleware must implement `' . MiddlewareInterface::class . '`');
                    }
                    $this->middleware = $middleware;
                }

                if ($this->middleware) {
                    $result = $this->middleware->getResult($this->requestBag);
                } else {
                    $result = call_user_func_array([
                        $this->requestBag->getClassInstance(),
                        $this->requestBag->getMethodData()['method']
                    ], $this->requestBag->getMethodParameters());
                }

                // check if method has custom headers set
                $cr->setHeaderResponse($this->requestBag->getMethodData()['header']['status']['success']);
                $cr->attachDebugHeader('Cache', 'MISS');

                // add result to output
                $cr->setData($result);

                // check if we need to attach the cache headers
                if ($this->requestBag->getMethodData()['header']['cache']['expires'] > 0) {
                    $cr->setExpiresIn($this->requestBag->getMethodData()['header']['cache']['expires']);
                }

                // cache the result
                Cache::saveResult($this->requestBag, $result);

            } catch (RestErrorException $re) {
                // check if method has custom headers set
                $cr->setHeaderResponse($statusCode = $re->getResponseCode(),
                    $this->requestBag->getMethodData()['header']['status']['errorMessage']);

                // check if a custom http response code is set


                $cr->setErrorResponse($re->getErrorMessage(), $re->getErrorDescription(), $re->getErrorCode());
                $errors = $re->getErrors();
                foreach ($errors as $e) {
                    $cr->addErrorMessage($e);
                }

                if ($env == 'development') {
                    $cr->addDebugMessage([
                        'file'   => $re->getFile(),
                        'line'   => $re->getLine(),
                        'traces' => explode('#', $re->getTraceAsString())
                    ]);
                }
            } catch (\Exception $e) {
                // check if method has custom headers set
                $cr->setHeaderResponse($this->requestBag->getMethodData()['header']['status']['error'],
                    $this->requestBag->getMethodData()['header']['status']['errorMessage']);

                $cr->setErrorResponse('There has been an error processing the request.');
                if ($env == 'development') {
                    $cr->addErrorMessage(['message' => $e->getMessage()]);
                    $cr->addDebugMessage([
                        'file'   => $e->getFile(),
                        'line'   => $e->getLine(),
                        'traces' => explode('#', $e->getTraceAsString())
                    ]);
                }
            }
        }

        return $cr;
    }
908436
private function result()
    {

        $ok = false;
        if (!$this->ok) {
            $ok = $this->onError();
        }
        if (!$ok) {
            if (!$this->ok) {

// If not valid, return an error message to the tool consumer if a return URL is provided
                if (!empty($this->returnUrl)) {
                    $errorUrl = $this->returnUrl;
                    if (strpos($errorUrl, '?') === false) {
                        $errorUrl .= '?';
                    } else {
                        $errorUrl .= '&';
                    }
                    if ($this->debugMode && !is_null($this->reason)) {
                        $errorUrl .= 'lti_errormsg=' . urlencode("Debug error: $this->reason");
                    } else {
                        $errorUrl .= 'lti_errormsg=' . urlencode($this->message);
                        if (!is_null($this->reason)) {
                            $errorUrl .= '&lti_errorlog=' . urlencode("Debug error: $this->reason");
                        }
                    }
                    if (!is_null($this->consumer) && isset($_POST['lti_message_type']) && ($_POST['lti_message_type'] === 'ContentItemSelectionRequest')) {
                        $formParams = array();
                        if (isset($_POST['data'])) {
                            $formParams['data'] = $_POST['data'];
                        }
                        $version = (isset($_POST['lti_version'])) ? $_POST['lti_version'] : self::LTI_VERSION1;
                        $formParams = $this->consumer->signParameters($errorUrl, 'ContentItemSelection', $version, $formParams);
                        $page = self::sendForm($errorUrl, $formParams);
                        echo $page;
                    } else {
                        header("Location: {$errorUrl}");
                    }
                    exit;
                } else {
                    if (!is_null($this->errorOutput)) {
                        echo $this->errorOutput;
                    } else if ($this->debugMode && !empty($this->reason)) {
                        echo "Debug error: {$this->reason}";
                    } else {
                        echo "Error: {$this->message}";
                    }
                }
            } else if (!is_null($this->redirectUrl)) {
                header("Location: {$this->redirectUrl}");
                exit;
            } else if (!is_null($this->output)) {
                echo $this->output;
            }
        }

    }
1232059
public function value()
    {
        $escape = isset($this->default["escape-values"])
            ? $this->default["escape-values"]
            : true;

        return $escape
            ? $this->getEscapedValue()
            : $this->getRawValue();
    }
927789
public function getValue($returnObject = false){

        $returnValue = null;

        if(!is_null($this->value)){
            $returnValue = ($returnObject) ? $this->value : $this->value->getValue(); //return mixed
        }

        return $returnValue;
    }
627349
public function Value()
    {
        // Show invalid value back to user in case of error
        if ($this->value === null || $this->value === false) {
            return $this->originalValue;
        }
        $formatter = $this->getFormatter();
        return $formatter->format($this->value, $this->getNumberType());
    }
675964
public function rest()
    {
        $rest = substr($this->src, $this->index);
        if ($rest === false) {
            $rest = '';
        }
        return $rest;
    }
504746
public function getFirstExpression()
    {
        $returnValue = null;

        
        if(empty($this->firstExpression)){
        	$property = new core_kernel_classes_Property(RulesRdf::PROPERTY_FIRST_EXPRESSION);
			$this->firstExpression = new core_kernel_rules_Expression($this->getUniquePropertyValue($property)->getUri());
        }
		$returnValue = $this->firstExpression;
        

        return $returnValue;
    }
118138
public function FunctionDeclaration()
    {
        $token = $this->lexer->lookahead;
        $funcName = strtolower($token['value']);

        // Check for built-in functions first!
        switch (true) {
            case (isset(self::$_STRING_FUNCTIONS[$funcName])):
                return $this->FunctionsReturningStrings();

            case (isset(self::$_NUMERIC_FUNCTIONS[$funcName])):
                return $this->FunctionsReturningNumerics();

            case (isset(self::$_DATETIME_FUNCTIONS[$funcName])):
                return $this->FunctionsReturningDatetime();

            default:
                return $this->CustomFunctionDeclaration();
        }
    }
554950
public function get()
    {
        $result = null;
        switch ($this->format) {
            case 'nvp':
                $result = http_build_query($this->data);
                break;

            case 'json':
            default:
                $result = json_encode($this->data, JSON_PRETTY_PRINT);
                break;
        }

        return $result;
    }
1264517
public function getReturnType()
    {
        $isBuiltin  = false;
        $returnType = $this->functionLikeNode->getReturnType();
        $isNullable = $returnType instanceof NullableType;

        if ($isNullable) {
            $returnType = $returnType->type;
        }
        if ($returnType instanceof Identifier) {
            $isBuiltin = true;
            $returnType = $returnType->toString();
        } elseif (is_object($returnType)) {
            $returnType = $returnType->toString();
        } elseif (is_string($returnType)) {
            $isBuiltin = true;
        } else {
            return null;
        }

        return new ReflectionType($returnType, $isNullable, $isBuiltin);
    }
968814
public function getValue()
    {
        $value = parent::getValue();

        if (is_string($value)) {
            $value = explode(',', $value);
        }

        return $value;
    }
561573
public function getValue()
    {
        $options = parent::getValue();

        if (count($options)) {
            if (empty( $options[0] )) {
                $collection = $options->getValues();
                return $collection[0]->getName();
            }

            return $options[0]->getName();

        }

        return '';
    }
281964
public function getResult ()
	{
		
		// If the status is not set
		
		if (!isset ($this->result['status']))
		{
			
			// Set it
			
			$this->result['status']	= 'fail';
			
			// If no message is set
			
			if (!isset ($this->result['message']))
			{
				
				// Set it
				
				$this->result['message']	= 'no method return status set';
				
			}
			
		}
		
		// Return result
		
		return $this->result;
		
	}
192308
public function getDefaultValueString()
    {
        $defaultValue = $this->getDefaultValue();

        if (null === $defaultValue) {
            return 'null';
        }

        if ($this->isNumericType()) {
            return (float) $defaultValue->getValue();
        }

        if ($this->isTextType() || $this->getDefaultValue()->isExpression()) {
            return sprintf("'%s'", str_replace("'", "\'", $defaultValue->getValue()));
        }

        if ($this->getType() === PropelTypes::BOOLEAN) {
            return $this->booleanValue($defaultValue->getValue()) ? 'true' : 'false';
        }

        return sprintf("'%s'", $defaultValue->getValue());
    }