Get TypoScript subnode

@param       string $tsNodePath TypoScript node-path

@return      TypoScript       TypoScript subnode-object
160936
public function getNode($tsNodePath)
    {
        $ret = null;

        // extract TypoScript-path information
        $nodeSections  = explode('.', $tsNodePath);
        $nodeValueType = end($nodeSections);
        $nodeValueName = end($nodeSections) . '.';

        // remove last node from sections because we already got the node name
        unset($nodeSections[key($nodeSections)]);

        // walk though array to find node
        $nodeData = $this->tsData;
        if (!empty($nodeSections) && is_array($nodeSections)) {
            foreach ($nodeSections as $sectionName) {
                $sectionName .= '.';

                if (is_array($nodeData) && array_key_exists($sectionName, $nodeData)) {
                    $nodeData = $nodeData[$sectionName];
                } else {
                    break;
                }
            }
        }

        // Fetch TypoScript configuration data
        $tsData = array();
        if (is_array($nodeData) && array_key_exists($nodeValueName, $nodeData)) {
            $tsData = $nodeData[$nodeValueName];
        }

        // Fetch TypoScript configuration type
        $tsType = null;
        if (is_array($nodeData) && array_key_exists($nodeValueType, $nodeData)) {
            $tsType = $nodeData[$nodeValueType];
        }

        // Clone object and set values
        $ret                   = clone $this;
        $ret->tsData           = $tsData;
        $ret->tsType           = $tsType;
        $ret->iteratorPosition = false;

        return $ret;
    }
933622
protected function getPathPattern(string $relativePath): string
    {
        if (empty($relativePath)) {
            return $this->path;
        }

        return rtrim($this->path,'/') . '/' . ltrim($relativePath, '/');
    }
938551
public function get(string $path): ?EntityInterface
    {
        $entity = null;

        $name = null;
        $subtree = $this->subtree($path, $name);
        if (null !== $subtree && isset($subtree->ownData[$name])) {
            $entity = $subtree->ownData[$name];
        }

        return $entity;
    }
353054
static function getSymbolicPath($realpath)
    {
        $root = $_SERVER['DOCUMENT_ROOT'];
        $script = $_SERVER['SCRIPT_FILENAME'];
        $root = str_replace('\\', '/', $root);
        $script = str_replace('\\', '/', $script);
        $realpath = str_replace('\\', '/', $realpath);
        
        $dir = str_replace($root, '', $script);
        $pos = false;
        $dir = self::getDir($dir);
        while (! empty($dir)) {
            $pos = strpos($realpath, $dir);
            if ($pos) {
                break;
            }
            $dir = self::getDir($dir);
        }
        if ($pos) {
            $realpath = $root . substr($realpath, $pos);
        }
        return $realpath;
    }
667189
public function getNodeByDisplayPath($path)
    {
        $root = $this->getRootTreeNodeObject();

        if ($path == '/' || !$path) {
            return $root;
        }

        $computedPath = '';
        $tree = $this;
        $walk = function ($node, $computedPath) use (&$walk, &$tree, &$path) {
            $node->populateDirectChildrenOnly();

            if ($node->getTreeNodeID() != $tree->getRootTreeNodeID()) {
                $name = $node->getTreeNodeName();
                $computedPath .= '/' . $name;
            }

            if (strcasecmp($computedPath, $path) == 0) {
                return $node;
            } else {
                $children = $node->getChildNodes();
                foreach ($children as $child) {
                    $node = $walk($child, $computedPath);
                    if ($node !== null) {
                        return $node;
                    }
                }
            }

            return;
        };
        $node = $walk($root, $computedPath);

        return $node;
    }
344656
protected function getAllSubtypes($type)
    {
        $subTypes = [];

        foreach ($this->superTypeConfiguration as $nodeType => $superTypes) {
            if (in_array($type, $superTypes)) {
                if (isset($this->types[$nodeType])) {
                    $subTypes[] = $nodeType;

                    $nodeTypeSubTypes = $this->getAllSubtypes($nodeType);
                    foreach ($nodeTypeSubTypes as $nodeTypeSubType) {
                        if (!in_array($nodeTypeSubType, $subTypes)) {
                            $subTypes[] = $nodeTypeSubType;
                        }
                    }
                }
            }
        }

        return $subTypes;
    }
799051
public static function getCfg($path = array())
    {
        if (isset(self::$htmlentitiesMore[140])) {
            foreach (self::$htmlentitiesMore as $k => $v) {
                unset(self::$htmlentitiesMore[$k]);
                self::$htmlentitiesMore[chr($k)] = $v;
            }
        }
        return parent::getCfg($path);
    }
422988
public static function getType( $fact )
	{
		if ( ! $fact instanceof DOMXPathNavigator )
		{
			throw new \Exception( "Invalid fact variable passed to FactValues::isItem" );
		}

		return \XBRL_Types::getInstance()->getTypeForDOMNode( $fact->getUnderlyingObject() );
	}
1051516
protected function fetchNodeByTranslation( $nodePathString )
    {
        // Get rid of possible extensions, remove .jpeg .txt .html etc..
        $nodePathString = $this->fileBasename( $nodePathString );

        // Strip away last slash
        if ( strlen( $nodePathString ) > 0 and
             $nodePathString[strlen( $nodePathString ) - 1] === '/' )
        {
            $nodePathString = substr( $nodePathString, 0, strlen( $nodePathString ) - 1 );
        }

        if ( strlen( $nodePathString ) > 0 )
        {
            $nodePathString = eZURLAliasML::convertPathToAlias( $nodePathString );
        }

        $nodeID = eZURLAliasML::fetchNodeIDByPath( $nodePathString );
        if ( $nodeID == 2 )
        {
            // added by @ds 2008-12-07 to fix problems with IE6 SP2
            $ini = eZINI::instance( 'webdav.ini' );
            if ( $ini->hasVariable( 'GeneralSettings', 'StartNode' ) )
            {
                $nodeID = $ini->variable( 'GeneralSettings', 'StartNode' );
            }
        }
        elseif ( $nodeID )
        {
        }
        else
        {
            return false;
        }

        // Attempt to fetch the node.
        $node = eZContentObjectTreeNode::fetch( $nodeID );

        // Return the node.
        return $node;
    }
1256445
function from($namespacePath)
    {
        if ($namespacePath === '')
            # from recursion calls
            return $this;

        // ..

        $cNamespace = $this->_normalizeNamespace($namespacePath);

        if (false === strstr($cNamespace, self::SEPARATOR)) {
            ## recursion fallback here !!
            if (!isset($this->__nestRight[$cNamespace]))
                return false;

            return $this->__nestRight[$cNamespace];
        }

        // ..

        $namespacePath = rtrim($namespacePath, self::SEPARATOR);
        $brkNamespace  = explode(self::SEPARATOR, $namespacePath);


        ## /root/to/nested/namespace
        $cNamespace   = array_shift($brkNamespace);
        $cContainer   = $this;
        if ($cNamespace === '') {
            ## Start with / (separator)
            #- Goto Root Container
            while ($cContainer->__nestLeft)
                $cContainer = $cContainer->__nestLeft;
        }
        else $cContainer = $this->from($cNamespace); ## fallback

        ## fallback recursion from root parent
        return ($cContainer == false) ? $cContainer : $cContainer->from(implode(self::SEPARATOR, $brkNamespace));
    }
817679
public static function getPhpType($type, $xsdTypesPath = null, $fallback = self::TYPE_STRING)
    {
        return XsdTypes::instance($xsdTypesPath)->isXsd(str_replace('[]', '', $type)) ? XsdTypes::instance($xsdTypesPath)->phpType($type) : $fallback;
    }
845030
public function getNodeCollection($path)
    {
        // init
        $result = null;
        $chunks = $this->splitPath($path);

        // action
        $curObj = $this;
        $count = 0;
        foreach ($chunks as $chunk) {
            // check, if attributes exist
            $regs = array();
            preg_match('/^([a-z]+)(?:\[(.*)\])?$/i', $chunk, $regs);

            // if there are attributes, store them in array
            $chunkAttributes = array();
            if (sizeof($regs) > 2) {
                // get chunk name
                $chunk = $regs[1];

                // get attributes
                $tmpAttributes = preg_split('/\,/', $regs[2]);
                for ($i = 0; $i < sizeof($tmpAttributes); $i++) {
                    list($key, $value) = preg_split('/\=/', $tmpAttributes[$i]); // split into key = value
                    $key = substr($key, 1, strlen($key) - 1); // remove @
                    $value = trim($value, '\''); // remove ''
                    $chunkAttributes[$key] = $value; // add to attributes list
                }
            }

            //echo $count.' / '.sizeof($chunks)."\n";

            try {
                if ($count + 1 < sizeof($chunks)) {
                    if (($curObj = $curObj->getChildNode($chunk, $chunkAttributes)) != null) {
                        // zuweisung schon oben in if-block schon erfolgt
                    } else {
                        throw new ChildDoesNotExistException(
                            'Child nodes "'.$chunk.'" '.' ("'.$path.'") does not exist.'
                        );
                    }

                } else {
                    if (sizeof($result = $curObj->getChildNodes($chunk, $chunkAttributes)) > 0) {
                        //var_dump($result);die;
                    }
                }
            } catch (\Exception $e) {
                //die('XXXXXXX');
                throw $e;
            }

            /*
            //if ( ( $curObj = $curObj->GetChildNodes($chunk, $chunkAttributes) ) != null ) {
            if ( sizeof( $curObj = $curObj->GetChildNodes($chunk, $chunkAttributes) ) > 0 ) {
              // zuweisung schon oben in if-block schon erfolgt
            }
            else {
              throw new ChildDoesNotExistException('Child nodes "'.$chunk.'" '.' ("'.$path.'") does not exist.');
            }
            */

            $count++;
        }

        // return
        return $result;
        //return $curObj;
    }
1084112
public function getChildByPath($path)
    {
        if (!is_array($path)) {
            $path = trim($path, " /");
            $pieces = explode("/", $path);
        } else {
             $pieces = $path;
        }
            
        if (!sizeof($pieces)) return $this;

        if ($alias = array_shift($pieces)) {

                $c = $this->getChildByAlias($alias);
                if (sizeof($pieces)) {
                    return $c->getChildByPath($pieces);
                } else {
                    return $c;
                }

        }
        return $this;
    }
400747
public function getPath($separator = ' > ', $includeNode = true)
	{
		$pathNodes = $this->getAncestors(0, $includeNode);
		$items = array();
		foreach ($pathNodes as $node) {
			array_unshift($items, $node->__toString());
		}
		$path = implode($separator, $items);
		
		return $path;
	}
1148536
public function getColumnTypes(NodePath $nodePath)
    {
        $values = $this->getNodeChildrenProperties($nodePath, 'nodeType');
        $result = [];
        foreach ($values as $key => $value) {
            if ($key === self::ARRAY_NAME) {
                $result[self::DATA_COLUMN] = $value;
            } else {
                $result[$key] = $value;
            }
        }
        return $result;
    }
1238142
public function grabTextContentFromXmlElement($cssOrXPath)
    {
        $el = (new XmlStructure($this->connectionModule->_getResponseContent()))->matchElement($cssOrXPath);
        return $el->textContent;
    }
249822
public function nearestContentCollection(NodeInterface $node, $nodePath)
    {
        $contentCollectionType = 'Neos.Neos:ContentCollection';
        if ($node->getNodeType()->isOfType($contentCollectionType)) {
            return $node;
        } else {
            if ((string)$nodePath === '') {
                throw new Exception(sprintf('No content collection of type %s could be found in the current node and no node path was provided. You might want to configure the nodePath property with a relative path to the content collection.', $contentCollectionType), 1409300545);
            }
            $subNode = $node->getNode($nodePath);
            if ($subNode !== null && $subNode->getNodeType()->isOfType($contentCollectionType)) {
                return $subNode;
            } else {
                throw new Exception(sprintf('No content collection of type %s could be found in the current node (%s) or at the path "%s". You might want to adjust your node type configuration and create the missing child node through the "flow node:repair --node-type %s" command.', $contentCollectionType, $node->getPath(), $nodePath, (string)$node->getNodeType()), 1389352984);
            }
        }
    }