Property | Type | Description | |
---|---|---|---|
$repositoryProperties | array | ||
$serviceCache | array |
Method | Description | |
---|---|---|
getInstance ( ) : Newscoop\Service\Resource\ResourceRespository | Provides the singletone of the resource repository. | |
getRepositoryProperties ( ) : array | Provides the properties of the repository. | |
getResourceFor ( |
Provides the resource for the provided resource id. |
Method | Description | |
---|---|---|
cacheService ( string $key, mixed $service ) : mixed | Provides to the cache the serice instance. | |
configureService ( mixed $service ) : mixed | Configures the provided service instance with all configurations available in the properties of the repository. | |
extractSimpleClassName ( string $className ) : string | Provides the simple class name based on the provided full class name (namespace + simple class name). | |
findInServiceCache ( string $key ) | Find the service instance cached under the specified key. | |
loadProperties ( $path ) : array | Load the property file at the specified path. | |
processConfigurationsPath ( string $className ) : string | Provides the configuration path, where all property files are located. |
Method | Description | |
---|---|---|
__construct ( ) |
protected configureService ( mixed $service ) : mixed | ||
$service | mixed | The service to be configured, not null. |
return | mixed | The configured service instance. |
protected extractSimpleClassName ( string $className ) : string | ||
$className | string | The class name from where to extract the simple class name. |
return | string | The config path. |
protected findInServiceCache ( string $key ) | ||
$key | string | The key to search by, *(not null not empty). |
public static getInstance ( ) : Newscoop\Service\Resource\ResourceRespository | ||
return | Newscoop\Service\Resource\ResourceRespository | The singletone. |
public getRepositoryProperties ( ) : array | ||
return | array | The array containing the properties. |
public getResourceFor ( |
||
$resourceId | The resource id used for obtaining the assigned resource, must not be null or empty. | |
return | mixed | The resource coresponding to the resource id. |
protected loadProperties ( $path ) : array | ||
return | array | The array containing the loaded properties. |
protected processConfigurationsPath ( string $className ) : string | ||
$className | string | The class name for which to locate the property file, this done by convention the class name can contain alaso the namespace which will be removed, the property file will be considered as the simple class name with the 'properties' extension. |
return | string | The config path based on the properties convention for the provided class name. |