1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/** |
4
|
|
|
* AppserverIo\Provisioning\StandardProvisionerFactory |
5
|
|
|
* |
6
|
|
|
* NOTICE OF LICENSE |
7
|
|
|
* |
8
|
|
|
* This source file is subject to the Open Software License (OSL 3.0) |
9
|
|
|
* that is available through the world-wide-web at this URL: |
10
|
|
|
* http://opensource.org/licenses/osl-3.0.php |
11
|
|
|
* |
12
|
|
|
* PHP version 5 |
13
|
|
|
* |
14
|
|
|
* @author Tim Wagner <[email protected]> |
15
|
|
|
* @copyright 2018 TechDivision GmbH <[email protected]> |
16
|
|
|
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) |
17
|
|
|
* @link https://github.com/appserver-io/provisioning |
18
|
|
|
* @link http://www.appserver.io |
19
|
|
|
*/ |
20
|
|
|
|
21
|
|
|
namespace AppserverIo\Provisioning; |
22
|
|
|
|
23
|
|
|
use AppserverIo\Psr\Application\ApplicationInterface; |
24
|
|
|
use AppserverIo\Provisioning\Configuration\ProvisionerConfigurationInterface; |
25
|
|
|
|
26
|
|
|
/** |
27
|
|
|
* Factory for the standard provisioner. |
28
|
|
|
* |
29
|
|
|
* @author Tim Wagner <[email protected]> |
30
|
|
|
* @copyright 2018 TechDivision GmbH <[email protected]> |
31
|
|
|
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) |
32
|
|
|
* @link https://github.com/appserver-io/provisioning |
33
|
|
|
* @link http://www.appserver.io |
34
|
|
|
*/ |
35
|
|
|
class StandardProvisionerFactory |
36
|
|
|
{ |
37
|
|
|
|
38
|
|
|
/** |
39
|
|
|
* The main method that creates a new provisioner instance. |
40
|
|
|
* |
41
|
|
|
* @param \AppserverIo\Psr\Application\ApplicationInterface $application The application instance to register the provisioner with |
42
|
|
|
* @param \AppserverIo\Provisioning\Configuration\ProvisionerConfigurationInterface $provisionerConfiguration The provisioner configuration |
43
|
|
|
* |
44
|
|
|
* @return void |
45
|
|
|
*/ |
46
|
|
|
public static function visit(ApplicationInterface $application, ProvisionerConfigurationInterface $provisionerConfiguration) |
47
|
|
|
{ |
48
|
|
|
|
49
|
|
|
// load the initial context |
50
|
|
|
$initialContext = $application->getInitialContext(); |
|
|
|
|
51
|
|
|
|
52
|
|
|
// initialize the bean manager |
53
|
|
|
$provisioner = new StandardProvisioner($initialContext, $provisionerConfiguration); |
54
|
|
|
|
55
|
|
|
// attach the instance |
56
|
|
|
$application->addProvisioner($provisioner, $provisionerConfiguration); |
|
|
|
|
57
|
|
|
} |
58
|
|
|
} |
59
|
|
|
|
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.