|
Revision 1538, 2.4 kB
(checked in by mikey, 2 years ago)
|
|
refactoring #139, part 4: moved net::stubbles::util::stubGeneralInitializer to net::stubbles::lang::initializer::stubGeneralInitializer, net::stubbles::util::stubRegistryInitializer to net::stubbles::lang::initializer::stubRegistryInitializer and net::stubbles::util::stubRegistryXJConfInitializer to net::stubbles::lang::initializer::stubRegistryXJConfInitializer
|
| Line | |
|---|
| 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 | |
|---|
| 25 | |
|---|
| 26 | |
|---|
| 27 | |
|---|
| 28 | protected $generalInitializer; |
|---|
| 29 | |
|---|
| 30 | |
|---|
| 31 | |
|---|
| 32 | |
|---|
| 33 | public function init() |
|---|
| 34 | { |
|---|
| 35 | $mode = $this->getMode(); |
|---|
| 36 | $mode->registerErrorHandler(); |
|---|
| 37 | $mode->registerExceptionHandler(); |
|---|
| 38 | stubMode::setCurrent($mode); |
|---|
| 39 | } |
|---|
| 40 | |
|---|
| 41 | |
|---|
| 42 | |
|---|
| 43 | |
|---|
| 44 | |
|---|
| 45 | |
|---|
| 46 | protected abstract function getMode(); |
|---|
| 47 | |
|---|
| 48 | |
|---|
| 49 | |
|---|
| 50 | |
|---|
| 51 | |
|---|
| 52 | |
|---|
| 53 | public function getRegistryInitializer() |
|---|
| 54 | { |
|---|
| 55 | return new stubRegistryXJConfInitializer(); |
|---|
| 56 | } |
|---|
| 57 | |
|---|
| 58 | |
|---|
| 59 | |
|---|
| 60 | |
|---|
| 61 | |
|---|
| 62 | |
|---|
| 63 | public function hasGeneralInitializer() |
|---|
| 64 | { |
|---|
| 65 | return (null !== $this->generalInitializer); |
|---|
| 66 | } |
|---|
| 67 | |
|---|
| 68 | |
|---|
| 69 | |
|---|
| 70 | |
|---|
| 71 | |
|---|
| 72 | |
|---|
| 73 | public function getGeneralInitializer() |
|---|
| 74 | { |
|---|
| 75 | return $this->generalInitializer; |
|---|
| 76 | } |
|---|
| 77 | |
|---|
| 78 | |
|---|
| 79 | |
|---|
| 80 | |
|---|
| 81 | |
|---|
| 82 | |
|---|
| 83 | public function getInterceptorInitializer() |
|---|
| 84 | { |
|---|
| 85 | return new stubInterceptorXJConfInitializer(); |
|---|
| 86 | } |
|---|
| 87 | |
|---|
| 88 | |
|---|
| 89 | |
|---|
| 90 | |
|---|
| 91 | |
|---|
| 92 | |
|---|
| 93 | public function getProcessorResolverFactory() |
|---|
| 94 | { |
|---|
| 95 | return new stubProcessorResolverXJConfFactory(); |
|---|
| 96 | } |
|---|
| 97 | } |
|---|
| 98 | ?> |
|---|