public function getMetadataFor($className)
    {
        if (!$this->isService($className)) {
            throw Exception::classIsNotMappedService($className);
        }

        if (!isset($this->loadedMetadata[$className])) {
            $this->loadMetadata($className);
        }

        if ($this->cache) {
            $cacheId = $this->cachePrefix . $className . $this->cacheSuffix;

            if (($cached = $this->cache->fetch($cacheId)) !== false) {
                $this->loadedMetadata[$className] = $cached;
            } else {
                $this->loadMetadata($className);
                $this->cache->save($cacheId, $this->loadedMetadata[$className], null);
            }
        } else {
            $this->loadMetadata($className);
        }

        return $this->loadedMetadata[$className];
    }
public function getMetadataFor($className)
    {
        if (!$this->isService($className)) {
            throw Exception::classIsNotMappedService($className);
        }

        if (!isset($this->loadedMetadata[$className])) {
            $this->loadMetadata($className);
        }

        if ($this->cache) {
            $cacheId = $this->cachePrefix . $className . $this->cacheSuffix;

            if (($cached = $this->cache->fetch($cacheId)) !== false) {
                $this->loadedMetadata[$className] = $cached;
            } else {
                $this->loadMetadata($className);
                $this->cache->save($cacheId, $this->loadedMetadata[$className], null);
            }
        } else {
            $this->loadMetadata($className);
        }

        return $this->loadedMetadata[$className];
    }
public function getMetadataFor ( $ className ) { if ( ! $ this -> isService ( $ className ) ) { throw Exception :: classIsNotMappedService ( $ className ) ; } if ( ! isset ( $ this -> loadedMetadata [ $ className ] ) ) { $ this -> loadMetadata ( $ className ) ; } if ( $ this -> cache ) { $ cacheId = $ this -> cachePrefix . $ className . $ this -> cacheSuffix ; if ( ( $ cached = $ this -> cache -> fetch ( $ cacheId ) ) !== false ) { $ this -> loadedMetadata [ $ className ] = $ cached ; } else { $ this -> loadMetadata ( $ className ) ; $ this -> cache -> save ( $ cacheId , $ this -> loadedMetadata [ $ className ] , null ) ; } } else { $ this -> loadMetadata ( $ className ) ; } return $ this -> loadedMetadata [ $ className ] ; }
Returns ServiceMetadata for the specified class.

@param  string                                   $className
@throws \BedRest\Service\Mapping\Exception
@return \BedRest\Service\Mapping\ServiceMetadata
Returns ServiceMetadata for the specified class .