eZ\Publish\Core\REST\Server\Controller\Location::loadLocation PHP Méthode

loadLocation() public méthode

Loads a location.
public loadLocation ( string $locationPath ) : RestLocation
$locationPath string
Résultat eZ\Publish\Core\REST\Server\Values\RestLocation
    public function loadLocation($locationPath)
    {
        $location = $this->locationService->loadLocation($this->extractLocationIdFromPath($locationPath));
        if (trim($location->pathString, '/') != $locationPath) {
            throw new Exceptions\NotFoundException("Could not find location with path string {$locationPath}");
        }
        return new Values\CachedValue(new Values\RestLocation($location, $this->locationService->getLocationChildCount($location)), array('locationId' => $location->id));
    }