setDefinitionCache(new \Doctrine\Common\Cache\ArrayCache()); $builder->addDefinitions($definitionsPath); self::$container = $builder->build(); } public static function get($className) { return self::$container->get($className); } } Injector::init();