AppserverIo\Appserver\Application\Application::addProvisioner PHP Method

addProvisioner() public method

Injects the provisioner instance and the configuration.
public addProvisioner ( AppserverIo\Psr\Application\ProvisionerInterface $provisioner, AppserverIo\Appserver\Core\Api\Node\ProvisionerNodeInterface $configuration ) : void
$provisioner AppserverIo\Psr\Application\ProvisionerInterface A provisioner instance
$configuration AppserverIo\Appserver\Core\Api\Node\ProvisionerNodeInterface The provisioner configuration
return void
    public function addProvisioner(ProvisionerInterface $provisioner, ProvisionerNodeInterface $configuration)
    {
        // bind the provisioner callback to the naming directory => the application itself
        $this->getNamingDirectory()->bind(sprintf('php:global/%s/%s', $this->getUniqueName(), $configuration->getName()), array(&$this, 'getProvisioner'), array($configuration->getName()));
        // add the provisioner instance to the application
        $this->provisioners[$configuration->getName()] = $provisioner;
    }