src/Articus/DataTransfer/Metadata/Reader/Annotation.php
public function getMetadata($className, $subset)
	{
		$classMetadataCacheKey = $this->getClassMetadataCacheKey($className);
		$classMetadata = $this->cacheStorage->getItem($classMetadataCacheKey);
		if ($classMetadata === null)
		{
			$classMetadata = $this->readClassMetadata($className);
			$this->cacheStorage->addItem($classMetadataCacheKey, $classMetadata);
		}
		if (!is_array($classMetadata))
		{
			throw new \LogicException(sprintf('Invalid metadata for class %s.', $className));
		}
		if (!isset($classMetadata[$subset]))
		{
			throw new \LogicException(sprintf('No metadata for subset "%s" in class %s.', $subset, $className));
		}
		$subsetMetadata = $classMetadata[$subset];
		if (!($subsetMetadata instanceof DT\Metadata))
		{
			throw new \LogicException(sprintf('Invalid metadata for subset "%s" in class %s.', $subset, $className));
		}
		return $subsetMetadata;
	}
public function getMetadata($className, $subset)
	{
		$classMetadataCacheKey = $this->getClassMetadataCacheKey($className);
		$classMetadata = $this->cacheStorage->getItem($classMetadataCacheKey);
		if ($classMetadata === null)
		{
			$classMetadata = $this->readClassMetadata($className);
			$this->cacheStorage->addItem($classMetadataCacheKey, $classMetadata);
		}
		if (!is_array($classMetadata))
		{
			throw new \LogicException(sprintf('Invalid metadata for class %s.', $className));
		}
		if (!isset($classMetadata[$subset]))
		{
			throw new \LogicException(sprintf('No metadata for subset "%s" in class %s.', $subset, $className));
		}
		$subsetMetadata = $classMetadata[$subset];
		if (!($subsetMetadata instanceof DT\Metadata))
		{
			throw new \LogicException(sprintf('Invalid metadata for subset "%s" in class %s.', $subset, $className));
		}
		return $subsetMetadata;
	}
public function getMetadata ( $ className , $ subset ) { $ classMetadataCacheKey = $ this -> getClassMetadataCacheKey ( $ className ) ; $ classMetadata = $ this -> cacheStorage -> getItem ( $ classMetadataCacheKey ) ; if ( $ classMetadata === null ) { $ classMetadata = $ this -> readClassMetadata ( $ className ) ; $ this -> cacheStorage -> addItem ( $ classMetadataCacheKey , $ classMetadata ) ; } if ( ! is_array ( $ classMetadata ) ) { throw new \ LogicException ( sprintf ( 'Invalid metadata for class %s.' , $ className ) ) ; } if ( ! isset ( $ classMetadata [ $ subset ] ) ) { throw new \ LogicException ( sprintf ( 'No metadata for subset "%s" in class %s.' , $ subset , $ className ) ) ; } $ subsetMetadata = $ classMetadata [ $ subset ] ; if ( ! ( $ subsetMetadata instanceof DT \ Metadata ) ) { throw new \ LogicException ( sprintf ( 'Invalid metadata for subset "%s" in class %s.' , $ subset , $ className ) ) ; } return $ subsetMetadata ; }
Returns metadata for specified subset of class fields
@param string $className
@param string $subset
@return DT\Metadata
Returns metadata for specified subset of class fields