php - ZF2 How to add new folder in src Folder except regular folders -


this normal folder structure src folder:

src/     aplicationfolder/         model/         controller/         entity/         document/         form/ 

so need add new folder next form folder, have add configuration related class map.

my autoload config follows:

'config_glob_paths' => array(         'config/autoload/{,*.}{global,local}.php',     ), 

here getautoloaderconfig() configuration code:

public function getautoloaderconfig(){     return array(         'zend\loader\classmapautoloader' => array(             __dir__ . '/autoload_classmap.php',         ),         'zend\loader\standardautoloader' => array(             'namespaces' => array(                 __namespace__ => __dir__ . '/src/' . __namespace__,             ),         ),     ); } 

since using both autoloaders, don't need anything, standard autoloader should handle files add. however, when you're ready move app production, can regenerate classmap file (for improved performance) using provided classmap generator (should in vendor folder if installed zf composer).

cd module folder (the 1 module.php in), , run:

php ../../vendor/bin/classmap_generator.php 

Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -