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)
        );
    }
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)
        );
    }
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 ) ) ; }
Loads a location.

@param string $locationPath

@return \eZ\Publish\Core\REST\Server\Values\RestLocation
Loads a location .