public function parse($content)
    {
        // if there is no path it's not needed to try to get a clean one
        if (empty($content)) return [];

        $path = $this->getCleanPath($content);
        $pathParts = [$this->delimiter];
        // check if there is even a need for further checks
        if (mb_strpos($path, $this->delimiter) === false) {
            if (!$path) {
                return [$this->delimiter];
            }

            // set the root and the path
            $tmpPathParts = [
                $this->delimiter,
                $path
            ];

            return $tmpPathParts;
        }

        // if there's a deeper path it's time to walk through it and clean the empty parts etc
        $tmpPathParts = explode($this->delimiter, $path);


        // walk through the array and remove the empty entries
        for ($i = 0, $c = count($tmpPathParts); $i < $c; $i++) {
            if (!$tmpPathParts[$i]) unset($tmpPathParts[$i]);
        }

        // prepend the default delimiter
        $pathParts = array_merge($pathParts, $tmpPathParts);

        // path parts
        return $pathParts;
    }
public function parse($content)
    {
        // if there is no path it's not needed to try to get a clean one
        if (empty($content)) return [];

        $path = $this->getCleanPath($content);
        $pathParts = [$this->delimiter];
        // check if there is even a need for further checks
        if (mb_strpos($path, $this->delimiter) === false) {
            if (!$path) {
                return [$this->delimiter];
            }

            // set the root and the path
            $tmpPathParts = [
                $this->delimiter,
                $path
            ];

            return $tmpPathParts;
        }

        // if there's a deeper path it's time to walk through it and clean the empty parts etc
        $tmpPathParts = explode($this->delimiter, $path);


        // walk through the array and remove the empty entries
        for ($i = 0, $c = count($tmpPathParts); $i < $c; $i++) {
            if (!$tmpPathParts[$i]) unset($tmpPathParts[$i]);
        }

        // prepend the default delimiter
        $pathParts = array_merge($pathParts, $tmpPathParts);

        // path parts
        return $pathParts;
    }
public function parse ( $ content ) { // if there is no path it's not needed to try to get a clean one if ( empty ( $ content ) ) return [ ] ; $ path = $ this -> getCleanPath ( $ content ) ; $ pathParts = [ $ this -> delimiter ] ; // check if there is even a need for further checks if ( mb_strpos ( $ path , $ this -> delimiter ) === false ) { if ( ! $ path ) { return [ $ this -> delimiter ] ; } // set the root and the path $ tmpPathParts = [ $ this -> delimiter , $ path ] ; return $ tmpPathParts ; } // if there's a deeper path it's time to walk through it and clean the empty parts etc $ tmpPathParts = explode ( $ this -> delimiter , $ path ) ; // walk through the array and remove the empty entries for ( $ i = 0 , $ c = count ( $ tmpPathParts ) ; $ i < $ c ; $ i ++ ) { if ( ! $ tmpPathParts [ $ i ] ) unset ( $ tmpPathParts [ $ i ] ) ; } // prepend the default delimiter $ pathParts = array_merge ( $ pathParts , $ tmpPathParts ) ; // path parts return $ pathParts ; }
parse method that fills the collection

@param string $content

@return array
parse method that fills the collection