-/**
- * This definition decorates another definition.
- *
- * @author Johannes M. Schmitt <schmittjoh@gmail.com>
- */
-class DefinitionDecorator extends Definition
-{
- private $parent;
- private $changes = array();
-
- /**
- * @param string $parent The id of Definition instance to decorate
- */
- public function __construct($parent)
- {
- parent::__construct();
-
- $this->parent = $parent;
- }
-
- /**
- * Returns the Definition being decorated.
- *
- * @return string
- */
- public function getParent()
- {
- return $this->parent;
- }
-
- /**
- * Returns all changes tracked for the Definition object.
- *
- * @return array An array of changes for this Definition
- */
- public function getChanges()
- {
- return $this->changes;
- }
-
- /**
- * {@inheritdoc}
- */
- public function setClass($class)
- {
- $this->changes['class'] = true;
-
- return parent::setClass($class);
- }
-
- /**
- * {@inheritdoc}
- */
- public function setFactory($callable)
- {
- $this->changes['factory'] = true;
-
- return parent::setFactory($callable);
- }
-
- /**
- * {@inheritdoc}
- */
- public function setConfigurator($callable)
- {
- $this->changes['configurator'] = true;
-
- return parent::setConfigurator($callable);
- }
-
- /**
- * {@inheritdoc}
- */
- public function setFile($file)
- {
- $this->changes['file'] = true;
-
- return parent::setFile($file);
- }
-
- /**
- * {@inheritdoc}
- */
- public function setPublic($boolean)
- {
- $this->changes['public'] = true;
-
- return parent::setPublic($boolean);
- }
-
- /**
- * {@inheritdoc}
- */
- public function setLazy($boolean)
- {
- $this->changes['lazy'] = true;
-
- return parent::setLazy($boolean);
- }
-
- /**
- * {@inheritdoc}
- */
- public function setDecoratedService($id, $renamedId = null, $priority = 0)
- {
- $this->changes['decorated_service'] = true;
-
- return parent::setDecoratedService($id, $renamedId, $priority);
- }
-
- /**
- * {@inheritdoc}
- */
- public function setDeprecated($boolean = true, $template = null)
- {
- $this->changes['deprecated'] = true;
-
- return parent::setDeprecated($boolean, $template);
- }