- protected function getProcessor( $type ) {
- if ( !isset( $this->processors[$type] ) ) {
- $processor = $type === 'default' ? new ExtensionProcessor() : new $type();
- if ( !$processor instanceof Processor ) {
- throw new Exception( "$type is not a Processor" );
- }
- $this->processors[$type] = $processor;
- }
-
- return $this->processors[$type];
- }
-