Returns the payload for the error or warning registration.

@param null|string $tagContent The content of the tag.

@return array|void
321971
protected function getReportData(?string $tagContent = null): ?array
    {
        return [
            static::MESSAGE_TAG_CONTENT_FORMAT_INVALID,
            $this->stackPos,
            static::CODE_TAG_CONTENT_FORMAT_INVALID,
            [
                $tagContent,
                $this->getValidPattern()
            ]
        ];
    }
2901
static function p($tag, array $contents, array $p = []) {return
		(new static([self::$P__CONTENTS => $contents, self::$P__TAG => $tag] + $p))->_p();
	}
912835
private function loadTagContentTokens(int $tagPosition, int &$iteratedPosition): array
    {
        $contents = [];
        $myColumn = $this->tokens[$tagPosition]['column'];
        $closingPos = $this->file->findNext([T_DOC_COMMENT_CLOSE_TAG], $position = $tagPosition + 1);

        while ($position < $closingPos) {
            $contentToken = $this->tokens[$position++];

            if (($contentToken['code'] === T_DOC_COMMENT_TAG) && ($contentToken['column'] <= $myColumn)) {
                break;
            }

            if (in_array($contentToken['code'], [T_DOC_COMMENT_STRING, T_DOC_COMMENT_TAG])) {
                $contents[$position] = $contentToken;
            }

            $iteratedPosition = $position;
        }

        return $contents;
    }
1218084
function payload()
    {
        if ( $this->IsFault )
        {
            return json_encode( array(
                'result' => null,
                'error' => array( 'faultCode' => $this->FaultCode, 'faultString' => $this->FaultString ),
                'id' => $this->Id ) );
        }
        else
        {
            return json_encode( array(
                'result' => $this->Value,
                'error' => null,
                'id' => $this->Id ) );
        }
    }
4483
public function tag($tag, $attr = null, $content = null, $close = false)
    {
        $tag = strtolower($tag);

        if (! empty($attr) && is_array($attr)) {
            $attr = $this->Attr->attr($attr);
        }

        if ($close) {
            return sprintf('<%s%s>%s</%1$s>', $tag, $attr, $content);
        } else {
            return sprintf('<%s%s>', $tag, $attr);
        }
    }
385389
public static function encode(TagContext $tagContext): string
    {
        $str = self::TAGS_VERSION_ID;
        /** @var Tag $tag */
        foreach ($tagContext->tags() as $tag) {
            $str .= self::KEYTYPE_STRING;
            $key = $tag->getKey()->getName();
            $buf = '';
            self::encodeUnsigned($buf, strlen($key));
            $str .= $buf . $key;
            $value = $tag->getValue()->getValue();
            $buf = '';
            self::encodeUnsigned($buf, strlen($value));
            $str .= $buf . $value;
        }
        return $str;
    }
1253699
private function checkArgumentItself(?string $tagContent = null): void
    {
        if (!$this->getArgumentTokenOfTag()) {
            throw (new CodeError(
                static::CODE_TAG_MISSING_VARIABLE,
                self::MESSAGE_TAG_MISSING_VARIABLE,
                $this->stackPos
            ))
                ->setPayload([$tagContent])
                ->setToken($this->token);
        }
    }
1316334
public function createLabel($textContent = null, array $attributes = [])
    {
        $label = new Form\Elements\Label($attributes);
        $label->attributes->addAttributeClass('col-form-label');

        if (isset($textContent)) {
            $label->textContent->push($textContent);
        }

        $this->childNodes->push($label);

        return $this->childNodes->last();
    }
567214
public static function getString ($status = FALSE, $tagStart = NULL, $tagEnd = "\n")
	{
		
		// Get messages
		
		$arr	= self::get ($status);
		
		// Set message string
		
		$str	= '';
		
		foreach ($arr as $msg)
		{
			$str	.= $tagStart . $msg . $tagEnd;
		}
		
		// Return message
		
		return $str;
		
	}
296064
@JsonIgnore
    public void encodeAndSetContent(byte[] byteContent) {

        if (byteContent == null) {
            this.content = null;
            return;
        }

        this.content = Base64.getEncoder().encodeToString(byteContent);
        encoding = "base64";
    }
762680
public function prepare($fileContent)
    {
        $replacings = [
            '{name}',
            '{namespace}',
            '{testNamespace}',
            '{table}',
            '{getters}',
            '{interfaceGetters}',
            '{fillable}',
            '{repository}',
            '{directory}',
            '{eloquentTest}',
            '{repositoryTest}',
            '{repositoryTestData}',
        ];

        $replacements = [
            $this->getProvidedName(),
            $this->getAppNamespace(),
            $this->getTestsNamespace(),
            $this->getTable(),
            $this->getSettersGetters($this->fields),
            $this->getSettersGetters($this->fields, true),
            $this->getFillable($this->fields),
            $this->getRepositoryPayloads($this->fields),
            $this->getDirectory(),
            $this->getEloquentTests($this->fields),
            $this->getRepositoryTests($this->fields),
            $this->getRepositoryDataTests($this->fields),
        ];

        return str_replace($replacings, $replacements, $fileContent);
    }
1311735
public function parse(array $tag, $content) {

        // If more than 1 http:// is found in the string, possible XSS attack
        if ((mb_substr_count($content, 'http://') + mb_substr_count($content, 'https://')) > 1) {
            return null;
        }

        $tag['attributes']['src'] = $content;

        if (!empty($tag['attributes']['default'])) {
            list($width, $height) = explode('x', $tag['attributes']['default']);

            $tag['attributes']['width'] = $width;
            $tag['attributes']['height'] = $height;
        }

        if (empty($tag['attributes']['alt'])) {
            $tag['attributes']['alt'] = '';
        }

        return parent::parse($tag, $content);
    }
225854
protected function addTagContentFields(Document  $document, $tagContent = [])
    {
        foreach ($tagContent as $fieldName => $fieldValue) {
            $document->setField($fieldName, $fieldValue);
        }
    }
4067
function content()
    {
        if ( $this->Content === null )
        {
            $eventType = $this->eventType();
            $this->Content = $eventType->eventContent( $this );
        }
        return $this->Content;
    }
492580
public function _if($tag,$content) {
        $condition  =   $this->parseCondition($tag['condition']);
        $parseStr   =   '<?php if('.$condition.'): ?>'.$content.'<?php endif; ?>';
        return $parseStr;
    }
728617
function payload( )
    {
        $contentType = $this->ContentType;
        // accommodate re-serializing content after we got a forced content-type
        if ( $pos = strpos( $contentType, ';' ) !== false )
        {
            $contentType = substr( $contentType, 0, $pos );
        }
        if ( $contentType == '' )
        {
            $contentType = $this->defaultContentType;
        }

        if ( $this->IsFault )
        {
            // default representation of an error, hand picked
            $value = array( 'faultCode' => $this->FaultCode, 'faultString' => $this->FaultString );
            // send an HTTP error code, since there is no other way to make sure
            // that the client can tell apart error responses from valid array responses
            // try some meaningful mapping (it's REST, baby!)
            switch( $this->FaultCode )
            {
                case ggWebservicesServer::INVALIDMETHODERROR:
                    header( $_SERVER['SERVER_PROTOCOL'].' 404 Not Found' );
                    break;
                case ggWebservicesServer::INVALIDPARAMSERROR:
                case ggWebservicesServer::INVALIDCOMPRESSIONERROR:
                case ggWebservicesServer::INVALIDREQUESTERROR:
                    header( $_SERVER['SERVER_PROTOCOL'].' 400 Bad Request' );
                    break;
                case ggWebservicesServer::INVALIDAUTHERROR:
                    header( $_SERVER['SERVER_PROTOCOL'].' 403 Forbidden' );
                    break;
                default:
                    header( $_SERVER['SERVER_PROTOCOL'].' 500 Internal Server Error' );
            }
        }
        else
        {
            $value = $this->Value;
        }

        switch( $contentType )
        {
            case 'php':
            case 'application/x-httpd-php':
                return var_export( $value );
            case 'phps':
            case 'application/vnd.php.serialized':
                return serialize( $value );
            case 'application/json':
                $json = json_encode( $value, JSON_FORCE_OBJECT );
                if ( $this->JsonpCallback != false )
                {
                    $json = $this->JsonpCallback . '(' . $json . ')';
                }
                return $json;
            case 'text/plain':
                return is_string( $value ) ? $value : var_export( $value, true );
            case 'text/html':
                // in theory both html and body tags are not mandatory. But getting here is just a case of bad coding anyway
                return is_string( $value ) ? $value : '<html><body>' . htmlspecialchars( print_r( $value, true ) ) . '</body></html>';
            default:
                header('HTTP/1.1 406 Not Acceptable');
                // two 'non standard but existing' mimetype defs for php code and serialized
                return "REST responses cannot be serialized as '$contentType'. Currently supported: application/json, application/x-httpd-php, application/vnd.php.serialized";
        }

    }
1241694
private function loadTagContent(): ?string
    {
        $contents = [];
        $nextOrClosingPos = $this->file->findNext([T_DOC_COMMENT_CLOSE_TAG, T_DOC_COMMENT_TAG], $this->stackPos + 1);
        $positionsTillEnd = TokenHelper::findNextAll($this->file->getBaseFile(), [T_DOC_COMMENT_STRING], $this->stackPos, $nextOrClosingPos);

        foreach ($positionsTillEnd as $position) {
            $contents[] = $this->tokens[$position]['content'];
        }

        return $contents ? implode(' ', $contents) : null;
    }