| 1 |
<?php |
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
stubClassLoader::load('net::stubbles::lang::stubMode', |
|---|
| 10 |
'net::stubbles::ipo::interceptors::stubInterceptorXJConfInitializer', |
|---|
| 11 |
'net::stubbles::lang::initializer::stubRegistryXJConfInitializer', |
|---|
| 12 |
'net::stubbles::websites::stubWebsiteInitializer', |
|---|
| 13 |
'net::stubbles::websites::processors::stubProcessorResolverXJConfFactory' |
|---|
| 14 |
); |
|---|
| 15 |
|
|---|
| 16 |
|
|---|
| 17 |
|
|---|
| 18 |
|
|---|
| 19 |
|
|---|
| 20 |
|
|---|
| 21 |
abstract class stubAbstractWebsiteInitializer extends stubBaseObject implements stubWebsiteInitializer |
|---|
| 22 |
{ |
|---|
| 23 |
|
|---|
| 24 |
* general purpose initializer |
|---|
| 25 |
* |
|---|
| 26 |
* @var stubGeneralInitializer |
|---|
| 27 |
*/ |
|---|
| 28 |
protected $generalInitializer; |
|---|
| 29 |
|
|---|
| 30 |
|
|---|
| 31 |
* initializing method |
|---|
| 32 |
*/ |
|---|
| 33 |
public function init() |
|---|
| 34 |
{ |
|---|
| 35 |
$mode = $this->getMode(); |
|---|
| 36 |
$mode->registerErrorHandler(); |
|---|
| 37 |
$mode->registerExceptionHandler(); |
|---|
| 38 |
stubMode::setCurrent($mode); |
|---|
| 39 |
} |
|---|
| 40 |
|
|---|
| 41 |
|
|---|
| 42 |
* returns the mode to be used |
|---|
| 43 |
* |
|---|
| 44 |
* @return stubMode |
|---|
| 45 |
*/ |
|---|
| 46 |
protected abstract function getMode(); |
|---|
| 47 |
|
|---|
| 48 |
|
|---|
| 49 |
* returns the registry initializer to be used |
|---|
| 50 |
* |
|---|
| 51 |
* @return stubRegistryInitializer |
|---|
| 52 |
*/ |
|---|
| 53 |
public function getRegistryInitializer() |
|---|
| 54 |
{ |
|---|
| 55 |
return new stubRegistryXJConfInitializer(); |
|---|
| 56 |
} |
|---|
| 57 |
|
|---|
| 58 |
|
|---|
| 59 |
* checks whether a general purpose initializer is set |
|---|
| 60 |
* |
|---|
| 61 |
* @return bool |
|---|
| 62 |
*/ |
|---|
| 63 |
public function hasGeneralInitializer() |
|---|
| 64 |
{ |
|---|
| 65 |
return (null !== $this->generalInitializer); |
|---|
| 66 |
} |
|---|
| 67 |
|
|---|
| 68 |
|
|---|
| 69 |
* returns the general purpose initializer |
|---|
| 70 |
* |
|---|
| 71 |
* @return stubGeneralInitializer |
|---|
| 72 |
*/ |
|---|
| 73 |
public function getGeneralInitializer() |
|---|
| 74 |
{ |
|---|
| 75 |
return $this->generalInitializer; |
|---|
| 76 |
} |
|---|
| 77 |
|
|---|
| 78 |
|
|---|
| 79 |
* returns the interceptor initializer to be used |
|---|
| 80 |
* |
|---|
| 81 |
* @return stubInterceptorInitializer |
|---|
| 82 |
*/ |
|---|
| 83 |
public function getInterceptorInitializer() |
|---|
| 84 |
{ |
|---|
| 85 |
return new stubInterceptorXJConfInitializer(); |
|---|
| 86 |
} |
|---|
| 87 |
|
|---|
| 88 |
|
|---|
| 89 |
* returns the factory to be used to resolve the processor |
|---|
| 90 |
* |
|---|
| 91 |
* @return stubProcessorResolverFactory |
|---|
| 92 |
*/ |
|---|
| 93 |
public function getProcessorResolverFactory() |
|---|
| 94 |
{ |
|---|
| 95 |
return new stubProcessorResolverXJConfFactory(); |
|---|
| 96 |
} |
|---|
| 97 |
} |
|---|
| 98 |
?> |
|---|