Skip to content

Instantly share code, notes, and snippets.

@mikemix
Last active August 29, 2015 13:56
Show Gist options
  • Save mikemix/8973990 to your computer and use it in GitHub Desktop.
Save mikemix/8973990 to your computer and use it in GitHub Desktop.
ZF2 application classmap generator
REM Created by Michal Zukowski (github.com/mikemix)
REM
REM Put this file inside ZF2_ROOT/bin directory for your convenience.
REM You are welcome.
REM
REM To make use of generated class map, configure your Module.php file as follows
REM
REM /**
REM * @return array
REM */
REM public function getAutoloaderConfig()
REM {
REM return array(
REM 'Zend\Loader\ClassMapAutoloader' => array( // use the classmap
REM __DIR__ . '/autoload_classmap.php',
REM ),
REM 'Zend\Loader\StandardAutoloader' => array( // fallback method
REM 'namespaces' => array(
REM __NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__,
REM ),
REM ),
REM );
REM }
@ECHO OFF
for /D %%i in (.\module\*) do (
vendor\bin\classmap_generator.php.bat -l %%i
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment