Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fixed zf2 application init bug

  • Loading branch information...
commit f4bd5b63f810ac559270bdadbe9e1d765a0a33cd 1 parent cd851b7
heartsentwined authored
Showing with 12 additions and 9 deletions.
  1. +12 −9 src/task/DoctrineEntityTask.php
View
21 src/task/DoctrineEntityTask.php
@@ -65,6 +65,15 @@ public function setFailonerror($value)
*/
public function init()
{
+ }
+
+ /**
+ * main method
+ *
+ * @return void
+ */
+ public function main()
+ {
$wd = getcwd();
$previousDir = '.';
@@ -79,20 +88,14 @@ public function init()
chdir($dir);
}
- $application = Application::init(Yaml::parse('config/application.config.yml'))->run();
+ $application = Application::init(Yaml::parse('config/application.config.yml'));
$this->setEm(
$application->getServiceManager()->get('doctrine.entitymanager.orm_default'));
chdir($wd);
- }
- /**
- * main method
- *
- * @return void
- */
- public function main()
- {
+ /* finish bootstrapping zf2 */
+
$cmf = new DisconnectedClassMetadataFactory();
$cmf->setEntityManager($this->em);
$metadatas = $cmf->getAllMetadata();
Please sign in to comment.
Something went wrong with that request. Please try again.