gets our positions and the bundlelist

@param string $content the bundlebundle content

@return array data
519006
private function getContentData($content)
    {
        $res = [];
        $res['startStringPos'] = strpos($content, $this->startString) + strlen($this->startString);
        $res['endStringPos'] = strpos($content, $this->endString);
        $res['bundleList'] = substr($content, $res['startStringPos'], ($res['endStringPos'] - $res['startStringPos']));
        return $res;
    }
207524
private function getTokens($content)
    {
        // fetch non-empty lines
        $lines = preg_split('/\r\n|\r|\n/', $content, -1, PREG_SPLIT_NO_EMPTY);
        $tokens = array();
        foreach ($lines as $line) {
            // throwing tokens after '#' sign
            $commentCharPosition = strpos($line, "#");
            $lineWithoutComments = ($commentCharPosition === false) ? $line : substr($line, 0, strpos($line, "#"));
            // storing current line tokens
            if ($lineWithoutComments) {
                $tokens = array_merge($tokens, preg_split('/\s+/', $lineWithoutComments, -1, PREG_SPLIT_NO_EMPTY));
            }
        }
        return $tokens;
    }
95356
public static function metadata(string $content): array
	{
		if (preg_match_all(self::$metadataPattern, $content, $matches) !== false) {
			$combine = array_combine($matches[1], $matches[2]);

			if ($combine === false) {
				throw new LogicException('Matches count is not equal.');
			}

			return $combine;
		}

		return [];
	}
737977
public function getUnorderedChildrenUids(AbstractClassContent $content)
    {
        return $this->getEntityManager()
            ->getConnection()
            ->executeQuery('SELECT content_uid FROM content_has_subcontent WHERE parent_uid=?', array($content->getUid()))
            ->fetchAll(\PDO::FETCH_COLUMN);
    }
1149853
static public function getFileExt($content)
    {
        $types = array(
            255216 => 'jpg', 7173 => 'gif', 6677 => 'bmp', 13780 => 'png',
            7368   => 'mp3', 4838 => 'wma', 7784 => 'mid', 6063 => 'xml',
        );
        $typeInfo = @unpack("C2chars", substr($content, 0, 2));
        $typeCode = intval($typeInfo['chars1'] . $typeInfo['chars2']);
        return isset($types[$typeCode]) ? $types[$typeCode] : 'mp4';
    }
917539
public static function buildAndGetDocument($content) :array {
		// convert the array to a basic CSV string
		$content = is_array($content) ? self::convertArrayToString($content) : $content;
		// convert the content to the proper charset (if needs be)
		$content = mb_convert_encoding($content, self::destination_charset);
		// prefix it with the BOM characters
		$content = self::getBomCharacters() . $content;
		// return the formatted document
		return [
			$content,
			self::destination_charset
		];
	}
278295
public function parseContent($content) {
        $dc = json_decode($content, true);

        $ret = [];

        foreach ($dc as $key => $content) {
            preg_match("/^(?P<type>[a-z0-9A-Z]*):(?P<path>(?P<id>[a-z0-9A-Z]*):(?P<field>[a-z0-9A-Z]*))$/", $key, $matches);

            $ret[] = [
                'type' => $matches['type'],
                'path' => $matches['path'],
                'id' => $matches['id'],
                'field' => $matches['field'],
                'content' => $content
            ];
        }

        return $ret;
    }
769262
protected function bbCodesHandle($content) {
		$bbCodes = $this->getTagsLocator();
		
		return preg_replace_callback('~\[([a-z]+)\](.*?)\[/\1\]~', function($match) use($bbCodes) {
			array_shift($match);
			list($tag, $value) = $match;
			
			if (preg_match('~\[[a-z]+\]~', $value)) {
				$value = $this->bbCodesHandle($value);
			}
			
			if ($bbCodes->has($tag)) {
				return $bbCodes->get($tag)->render($value);
			}
			
			return $value;
		}, $content);
	}
573719
public function getPosts(Content $content)
    {
        if (isset($this->site->categories[$content->id])) {
            return $this->site->categories[$content->id];
        }
        else {
            if (isset($content->category) && isset($this->site->categories[$content->category])) {
                return $this->site->categories[$content->category];
            }
        }

        return [];
    }
1361167
protected function decodeContent(string $content): array
    {
        $result = json_decode($content, true);
        return is_array($result) ? $result : [];
    }
898625
public function json($content)
    {
        if (is_array($content)) {
            $content = json_encode($content);
        }

        $this->content = $content;

        return $this->header('Content-Type', 'application/json');
    }
300555
public function parse($content)
    {
        if (!$content || strpos($content, '@view') === false) {
            return [];
        }
        $ret = [];

        if (preg_match(self::VIEW_RENDER, $content, $match)) {
            $ret[0] = array_pop($match);
        } else {
            $ret[0] = null;
        }

        if (preg_match(self::VIEW_TEMPLATE_FILE, $content, $match)) {
            $ret[1] = array_pop($match);
        } else {
            $ret[1] = null;
        }

        if (preg_match_all(self::VIEW_PARAMETERS, $content, $match, PREG_SET_ORDER)) {
            $set = [];
            // "all" is excluded
            foreach ($match as $position => $group) {
                $set[$group[1]] = $group[2];
            }

            if ($set){
                $ret[] = $set;
            }

        }

        return $ret;
    }
1343176
private function recursivelyArrayify($content = null)
        {
            $return = [];
            if (false === $content || null === $content) {
                return;
            } else if ($content instanceof Element) {
                $return[] = $content->toArray();
            } else if (!is_array($content)) {
                $return[] = $content;
            } else {
                foreach ($content as $element) {
                    $return[] = $this->recursivelyArrayify($element);
                }
            }
            return $return;
        }
1191419
protected function _getIndexDefinitions( $content )
	{
		$defs = array( );
		$matches = array( );

		if ( preg_match_all('/CREATE [a-zA-Z]* ?INDEX \"?([a-zA-Z0-9_]+)\"? ON \"?([a-zA-Z0-9_]+)\"? .+(\n\n|$)/sU', $content, $matches, PREG_SET_ORDER) === false ) {
			throw new MW_Setup_Exception('Unable to get index definitions');
		}

		foreach ( $matches as $match ) {
			$name = $match[2] . '.' . $match[1];
			$defs[$name] = $match[0];
		}

		return $defs;
	}
1051268
protected function parseContent($content)
    {
        $content = preg_replace_callback($this->shortcodeRegex(), [$this, 'doShortcodeTag'], $content);
        if (!$this->isFinishedParse()) {
            $content = $this->parseContent($content);
        }
        return $content;
    }
686730
protected function _parseFormEntities($content) {
		preg_match_all('/\$this-\>Form->create\(\$(\w+)\W/i', $content, $matches);
		if (empty($matches[1])) {
			return [];
		}

		$result = [];

		$entities = array_unique($matches[1]);
		foreach ($entities as $entity) {
			$entityName = Inflector::camelize(Inflector::underscore($entity));

			$className = App::className(($this->getConfig(static::CONFIG_PLUGIN) ? $this->getConfig(static::CONFIG_PLUGIN) . '.' : '') . $entityName, 'Model/Entity');
			if (!$className) {
				continue;
			}

			$annotation = AnnotationFactory::createOrFail(VariableAnnotation::TAG, '\\' . $className, '$' . $entity);

			$result[$entity] = $annotation;
		}

		return $result;
	}
314315
private function parseContent($content = '')
    {

        list($time, $content) = explode("#", $content);
        return [
            $time, gzuncompress($content)
        ];

    }