Home > Backend Development > PHP Tutorial > Phalcon multi-module configuration problem

Phalcon multi-module configuration problem

WBOY
Release: 2016-08-04 09:22:17
Original
1315 people have browsed it

The official manual has the following code to register multiple modules

<code>// 注册模块
$application->registerModules(
    array(
        'frontend' => array(
            'className' => 'Multiple\Frontend\Module',
            'path'      => '../apps/frontend/Module.php',
        ),
        'backend'  => array(
            'className' => 'Multiple\Backend\Module',
            'path'      => '../apps/backend/Module.php',
        )
    )
);</code>
Copy after login
Copy after login

Where 'className' => 'MultipleFrontendModule', what does it mean? According to the official file configuration, the following is always displayed:

'MultipleFrontendModule' wasn't found in the dependency injection container

Reply content:

The official manual has the following code to register multiple modules

<code>// 注册模块
$application->registerModules(
    array(
        'frontend' => array(
            'className' => 'Multiple\Frontend\Module',
            'path'      => '../apps/frontend/Module.php',
        ),
        'backend'  => array(
            'className' => 'Multiple\Backend\Module',
            'path'      => '../apps/backend/Module.php',
        )
    )
);</code>
Copy after login
Copy after login

Where 'className' => 'MultipleFrontendModule', what does it mean? According to the official file configuration, the following is always displayed:

'MultipleFrontendModule' wasn't found in the dependency injection container

  1. Does the file apps/frontend/Module.php exist and the path is correct

  2. In this file, is there a class named Module?

  3. Whether the namespace of this class is
  4. MutipleFrontend

  5. Let’s check them one by one (slip
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template