1 | <?php |
||
21 | class ServiceManagerConfig implements ConfigInterface |
||
22 | { |
||
23 | /** |
||
24 | * Services that can be instantiated without factories. |
||
25 | * |
||
26 | * @var array |
||
27 | */ |
||
28 | protected $invokables = array( |
||
29 | 'SharedEventManager' => 'Zend\EventManager\SharedEventManager', |
||
30 | ); |
||
31 | |||
32 | /** |
||
33 | * Service factories. |
||
34 | * |
||
35 | * @var array |
||
36 | */ |
||
37 | protected $factories = array( |
||
38 | 'Config' => 'PPI\Framework\ServiceManager\Factory\ConfigFactory', |
||
39 | 'EventManager' => 'PPI\Framework\ServiceManager\Factory\EventManagerFactory', |
||
40 | 'ModuleDefaultListener' => 'PPI\Framework\ServiceManager\Factory\ModuleDefaultListenerFactory', |
||
41 | 'ModuleManager' => 'PPI\Framework\ServiceManager\Factory\ModuleManagerFactory', |
||
42 | ); |
||
43 | |||
44 | /** |
||
45 | * Abstract factories. |
||
46 | * |
||
47 | * @var array |
||
48 | */ |
||
49 | protected $abstractFactories = array(); |
||
50 | |||
51 | /** |
||
52 | * Aliases. |
||
53 | * |
||
54 | * @var array |
||
55 | */ |
||
56 | protected $aliases = array( |
||
57 | 'Zend\EventManager\EventManagerInterface' => 'EventManager', |
||
58 | 'Zend\ServiceManager\ServiceLocatorInterface' => 'ServiceManager', |
||
59 | 'Zend\ServiceManager\ServiceManager' => 'ServiceManager', |
||
60 | ); |
||
61 | |||
62 | /** |
||
63 | * Shared services. |
||
64 | * |
||
65 | * Services are shared by default; this is primarily to indicate services |
||
66 | * that should NOT be shared |
||
67 | * |
||
68 | * @var array |
||
69 | */ |
||
70 | protected $shared = array( |
||
71 | 'EventManager' => false, |
||
72 | ); |
||
73 | |||
74 | /** |
||
75 | * Constructor. |
||
76 | * |
||
77 | * Merges internal arrays with those passed via configuration |
||
78 | * |
||
79 | * @param array $configuration |
||
80 | */ |
||
81 | public function __construct(array $configuration = array()) |
||
103 | |||
104 | /** |
||
105 | * Configure the provided service manager instance with the configuration |
||
106 | * in this class. |
||
107 | * |
||
108 | * In addition to using each of the internal properties to configure the |
||
109 | * service manager, also adds an initializer to inject ServiceManagerAware |
||
110 | * and ServiceLocatorAware classes with the service manager. |
||
111 | * |
||
112 | * @param ServiceManager $serviceManager |
||
113 | */ |
||
114 | public function configureServiceManager(ServiceManager $serviceManager) |
||
162 | } |
||
163 |
This error could be the result of:
1. Missing dependencies
PHP Analyzer uses your
composer.json
file (if available) to determine the dependencies of your project and to determine all the available classes and functions. It expects thecomposer.json
to be in the root folder of your repository.Are you sure this class is defined by one of your dependencies, or did you maybe not list a dependency in either the
require
orrequire-dev
section?2. Missing use statement
PHP does not complain about undefined classes in
ìnstanceof
checks. For example, the following PHP code will work perfectly fine:If you have not tested against this specific condition, such errors might go unnoticed.