Jarves\Jarves::getConfig PHP 메소드

getConfig() 공개 메소드

Returns a configuration for a bundle.
public getConfig ( $bundleName ) : Bundle | null
$bundleName
리턴 Jarves\Configuration\Bundle | null
    public function getConfig($bundleName)
    {
        $bundle = $this->getBundle($bundleName);
        if ($bundle) {
            return $this->getConfigs()->getConfig($bundle->getName());
        }
        return null;
    }

Usage Example

예제 #1
0
파일: Objects.php 프로젝트: jarves/jarves
 /**
  * Returns the namespace of the bundle of the object key.
  *
  * JarvesBundle/node => JarvesBundle.
  * bundleWithNameSpace/myObject => Bundle\With\Namespace.
  *
  * @param  string $objectKey
  *
  * @return string
  */
 public function getNamespace($objectKey)
 {
     $objectKey = Objects::normalizeObjectKey($objectKey);
     $temp = explode('/', $objectKey);
     $config = $this->jarves->getConfig($temp[0]);
     return $config ? $config->getBundleClass()->getNamespace() : null;
 }
All Usage Examples Of Jarves\Jarves::getConfig