Neos\FluidAdaptor\Core\ViewHelper\TemplateVariableContainer::getByPath PHP Method

getByPath() public method

If the second argument is provided, it must be an array of accessor names which can be used to extract each value in the dotted path.
public getByPath ( string $path, array $accessors = [] ) : mixed
$path string
$accessors array
return mixed
    public function getByPath($path, array $accessors = [])
    {
        $propertyPathSegments = explode('.', $path);
        $subject = $this->variables;
        foreach ($propertyPathSegments as $propertyName) {
            if ($subject === null) {
                break;
            }
            try {
                $subject = ObjectAccess::getProperty($subject, $propertyName);
            } catch (PropertyNotAccessibleException $exception) {
                $subject = null;
            }
            if ($subject instanceof TemplateObjectAccessInterface) {
                $subject = $subject->objectAccess();
            }
        }
        if ($subject === null) {
            $subject = $this->getBooleanValue($path);
        }
        return $subject;
    }
TemplateVariableContainer