public function propertyPath($data, $propertyPath)
    {
        if (null !== $propertyPath && !$propertyPath instanceof PropertyPathInterface) {
            $propertyPath = new PropertyPath($propertyPath);
        }

        if ($propertyPath instanceof PropertyPathInterface && (\is_object($data) || $data instanceof \ArrayAccess)) {
            $data = $this->propertyAccessor->getValue($data, $propertyPath);
        }

        return $data;
    }
public function propertyPath($data, $propertyPath)
    {
        if (null !== $propertyPath && !$propertyPath instanceof PropertyPathInterface) {
            $propertyPath = new PropertyPath($propertyPath);
        }

        if ($propertyPath instanceof PropertyPathInterface && (\is_object($data) || $data instanceof \ArrayAccess)) {
            $data = $this->propertyAccessor->getValue($data, $propertyPath);
        }

        return $data;
    }
public function propertyPath ( $ data , $ propertyPath ) { if ( null !== $ propertyPath && ! $ propertyPath instanceof PropertyPathInterface ) { $ propertyPath = new PropertyPath ( $ propertyPath ) ; } if ( $ propertyPath instanceof PropertyPathInterface && ( \ is_object ( $ data ) || $ data instanceof \ ArrayAccess ) ) { $ data = $ this -> propertyAccessor -> getValue ( $ data , $ propertyPath ) ; } return $ data ; }
Get the data defined by property path.

@param mixed                             $data         The data
@param PropertyPathInterface|string|null $propertyPath The property path

@return mixed
Get the data defined by property path .