class MetadataProcessor in Configuration Management 7.3
Hierarchy
- class \Configuration\Processors\AbstractProcessor implements ProcessorInterface
- class \Configuration\Processors\MetadataProcessor
Expanded class hierarchy of MetadataProcessor
File
- src/
Processors/ MetadataProcessor.php, line 7
Namespace
Configuration\ProcessorsView source
class MetadataProcessor extends AbstractProcessor {
public static function availableProcessors() {
return array(
'AddDependencies',
'RemoveDependencies',
'AddParts',
'RemoveParts',
'AddModules',
'RemoveModules',
);
}
public function apply(Configuration $configuration, $properties = array()) {
switch ($this
->getName()) {
case 'AddDependencies':
foreach ($properties as $dependency) {
$this->configuration_manager
->newDependency($configuration, $dependency);
}
break;
case 'AddParts':
foreach ($properties as $part) {
$this->configuration_manager
->newPart($configuration, $dependency);
}
break;
case 'AddModules':
foreach ($properties as $module) {
$configuration
->addModule($module);
}
break;
case 'RemoveDependencies':
foreach ($properties as $dependency) {
$configuration
->removeDependency($dependency);
}
break;
case 'RemoveParts':
foreach ($properties as $part) {
$configuration
->removePart($part);
}
break;
case 'RemoveModules':
foreach ($properties as $module) {
$configuration
->removeModule($module);
}
break;
}
}
public function revert(Configuration $configuration, $properties = array()) {
// Nothing to do. This proccesors are not reversible.
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
AbstractProcessor:: |
protected | property | ||
AbstractProcessor:: |
protected | property | ||
AbstractProcessor:: |
public | function | ||
AbstractProcessor:: |
public static | function | ||
AbstractProcessor:: |
public | function | ||
MetadataProcessor:: |
public | function |
Overrides AbstractProcessor:: |
|
MetadataProcessor:: |
public static | function |
Overrides AbstractProcessor:: |
|
MetadataProcessor:: |
public | function |
Overrides AbstractProcessor:: |