@param string $content

@return null|\SplFixedArray
774657
public function parse($content)
    {
        if (strpos($content, '@ORM') === false) {
            return null;
        }

        if (preg_match(self::PATTERN, $content, $matches)) {
            return (new \SplFixedArray(2))->fromArray([$matches[1], $matches[2]]);
        }

        return null;
    }
323159
protected function createText($content)
	{
		return (trim($content) === '')
		     ? $this->createElement('xsl:text', $content)
		     : $this->ownerDocument->createTextNode($content);
	}
716009
private static function GetUpperContentRights(Content $content)
    {
        if ($content->GetPageContent())
        {
            $area = $content->GetPageContent()->GetArea();
            if ($area->GetLocked())
            {
                return null;
            }
            $pageRights = self::FindPageRights($content->GetPageContent()->GetPage());
            if ($pageRights)
            {
                return $pageRights->GetContentRights();
            }
        }
        else if ($content->GetLayoutContent())
        {
            $area = $content->GetLayoutContent()->GetArea();
            if ($area->GetLocked())
            {
                return null;
            }
            $layoutRights = $content->GetLayoutContent()->GetArea()->GetLayout()->GetUserGroupRights();
            if ($layoutRights)
            {
                return $layoutRights->GetContentRights();
            }
        }
        else if ($content->GetContainerContent())
        {
            $containerRights = $content->GetContainerContent()->GetContainer()->GetUserGroupRights();
            if ($containerRights)
            {
                return $containerRights->GetContentRights();
            }
        }
        return null;
    }
929942
protected function serialize($content)
    {
        if (!empty($content)) {
            if (is_object($content)) {
                $content = $this->serializer->serialize($content, 'json');
            }
        }

        return $content;
    }
1106849
protected function _getSetOfLines($content)
    {
        if (!is_array($content)) $content = array( $content );
        reset($content);
        if (!is_array(current($content))) {
            $content = array( 0=>$content );
        }
        return $content;
    }
961785
public function arrayToJson($content = null)
    {
        if ($this->getJsonEncodeArray() && is_array($content)) {
            $this->header('Content-Type: application/json');
            return json_encode($content);
        }

        return $content;
    }
494412
protected function determineExtension($content)
    {
        $filename = \Yii::getAlias('@runtime/' . uniqid());
        file_put_contents($filename, $content);

        $mime = FileHelper::getMimeType($filename);

        $extensions = FileHelper::getExtensionsByMimeType($mime);

        unlink($filename);

        return ArrayHelper::getValue($extensions, max(count($extensions) - 1, 0));
    }
731593
public static function detectByContent($content)
    {
        if ( ! class_exists('finfo') || ! is_string($content)) {
            return null;
        }
        try {
            $finfo = new finfo(FILEINFO_MIME_TYPE);

            return $finfo->buffer($content) ?: null;
        // @codeCoverageIgnoreStart
        } catch( ErrorException $e ) {
            // This is caused by an array to string conversion error.
        }
    }
920896
public function compile($content)
    {
        if( ! $this->count()) return $content;

        $pattern = $this->getRegex();

        return preg_replace_callback("/{$pattern}/s", [&$this, 'render'], $content);
    }
169030
public function fill($content)
    {
        if ($this->hasInstructions($content)) {
            $instructions = $this->getInstructions();
            foreach ($instructions as $instruction) {
                $content = $this->parseInstructions($content, $instruction);
            }
        }
        return $this->fillContent($content);
    }
4853
public function purify($content)
	{
		if(is_array($content))
			$content=array_map(array($this,'purify'),$content);
		else
			$content=$this->getPurifier()->purify($content);
		return $content;
	}
674529
public static function fromString(string $content)
    {
        $arr = \json_decode($content, JSON_PRETTY_PRINT);
        $arr = attrToArray($arr);
        return fromArray($arr);
    }
151977
protected function string($content)
    {
        // Check if not is string ...
        if (false === is_string($content)) {
            // ... and make string of it.
            $content = var_export($content, true);
        }

        return $content;
    }
563154
public function getMD($content)
    {
        $funcArr = ["yamlfrontmatter", "shortcode", "markdown", "titlefromheader"];
        $textFilter = new textFilter();
        return $textFilter->parse($content, $funcArr)->text;
    }
1065433
public function parseJs($content)
    {
        $matches = $results = array();

        $pattern = '~[^\w]Gplcart\s*\.\s*text\s*\(\s*((?:(?:\'(?:\\\\\'|[^\'])*\'|"(?:\\\\"|[^"])*")(?:\s*\+\s*)?)+)\s*[,\)]~s';
        preg_match_all($pattern, $content, $matches);

        foreach ($matches[1] as $strings) {
            foreach ((array) $strings as $string) {
                $results[] = implode('', preg_split('~(?<!\\\\)[\'"]\s*\+\s*[\'"]~s', substr($string, 1, -1)));
            }
        }

        return $results;
    }
869204
public static function getStreamExt($content)
    {
        $finfo = new finfo(FILEINFO_MIME);

        $mime = $finfo->buffer($content);

        return isset(self::$extensionMap[$mime]) ? self::$extensionMap[$mime] : '';
    }
720332
protected function getEOL($content)
    {
        static $eols = [
            "\r\n",
            "\n",
            "\r",
        ];
        foreach($eols as $eol)
        {
            if(strpos($content, $eol))
            {
                return $eol;
            }
        }
        return PHP_EOL;
    }