|
@@ 810-825 (lines=16) @@
|
| 807 |
|
* |
| 808 |
|
* @return void |
| 809 |
|
*/ |
| 810 |
|
public function initializeManagers() |
| 811 |
|
{ |
| 812 |
|
|
| 813 |
|
// initialize the registered managers |
| 814 |
|
/** @var \AppserverIo\Psr\Application\ManagerInterface $manager */ |
| 815 |
|
foreach ($this->getManagers() as $manager) { |
| 816 |
|
// log the manager we want to initialize |
| 817 |
|
\debug(sprintf('Now register manager %s for application %s', get_class($manager), $this->getName())); |
| 818 |
|
|
| 819 |
|
// initialize the manager instance |
| 820 |
|
$manager->initialize($this); |
| 821 |
|
|
| 822 |
|
// log the manager we've successfully registered |
| 823 |
|
\debug(sprintf('Now registered manager %s for application %s', get_class($manager), $this->getName())); |
| 824 |
|
} |
| 825 |
|
} |
| 826 |
|
|
| 827 |
|
/** |
| 828 |
|
* Invokes the postStartup() method lifecycle callback of the registered managers. |
|
@@ 832-847 (lines=16) @@
|
| 829 |
|
* |
| 830 |
|
* @return void |
| 831 |
|
*/ |
| 832 |
|
public function postStartupManagers() |
| 833 |
|
{ |
| 834 |
|
|
| 835 |
|
// initialize the registered managers |
| 836 |
|
/** @var \AppserverIo\Psr\Application\ManagerInterface $manager */ |
| 837 |
|
foreach ($this->getManagers() as $manager) { |
| 838 |
|
// log the manager we want to invoke the postStartup() lifecycle callback |
| 839 |
|
\debug(sprintf('Now invoke the postStartup() lifecycle callback of manager %s for application %s', get_class($manager), $this->getName())); |
| 840 |
|
|
| 841 |
|
// invoke the manager's postStartup() lifecycle callback |
| 842 |
|
$manager->postStartup($this); |
| 843 |
|
|
| 844 |
|
// log the manager we've successfully invoked the postStartup() lifecycle callback |
| 845 |
|
\debug(sprintf('Successfully invoked the postStartup() lifecycle callback of manager %s for application %s', get_class($manager), $this->getName())); |
| 846 |
|
} |
| 847 |
|
} |
| 848 |
|
|
| 849 |
|
/** |
| 850 |
|
* Stops the application instance. |