Merge branch 'master' of https://git.mcnd.ca/mcndave/lean
This commit is contained in:
		
						commit
						0cc9a8a893
					
				| @ -2,6 +2,10 @@ | |||||||
| 
 | 
 | ||||||
| use Ulmus\Container\AdapterProxy; | use Ulmus\Container\AdapterProxy; | ||||||
| 
 | 
 | ||||||
|  | use Psr\Container\ContainerInterface; | ||||||
|  | 
 | ||||||
|  | use Ulmus\ConnectionAdapter; | ||||||
|  | 
 | ||||||
| use function DI\autowire, DI\create, DI\get, DI\add; | use function DI\autowire, DI\create, DI\get, DI\add; | ||||||
| 
 | 
 | ||||||
| return [ | return [ | ||||||
|  | |||||||
| @ -6,58 +6,41 @@ use function DI\autowire, DI\create, DI\get; | |||||||
| 
 | 
 | ||||||
| $dir = getenv("META_PATH") . "/definitions"; | $dir = getenv("META_PATH") . "/definitions"; | ||||||
| 
 | 
 | ||||||
| return array_merge( | return [ | ||||||
|     Lean\Lean::autoloadDefinitionsFromComposerExtra(), |     '%APPKEY%' => [ | ||||||
| 
 |         'picea' => [ | ||||||
|     [ |             'context' => "%ESCAPED_NAMESPACE%\\View", | ||||||
|         '%APPKEY%' => [ |             'asset' => [], | ||||||
|             'picea' => [ |             'extensions' => [], | ||||||
|                 'context' => "%ESCAPED_NAMESPACE%\\View", |  | ||||||
|                 'asset' => [], |  | ||||||
|                 'extensions' => [], |  | ||||||
|             ], |  | ||||||
| 
 |  | ||||||
|             'ulmus' => [ |  | ||||||
|                 'entities' => [ '%ESCAPED_NAMESPACE%\\Entity' => getenv("PROJECT_PATH") . '/src/Entity/' ], |  | ||||||
|             ], |  | ||||||
| 
 |  | ||||||
|             'routes' => [ |  | ||||||
|                 '%ESCAPED_NAMESPACE%\\Controller' => getenv("PROJECT_PATH") . '/src/Controller/', |  | ||||||
|             ], |  | ||||||
| 
 |  | ||||||
|             'events' => [ |  | ||||||
|                 '%ESCAPED_NAMESPACE%\\Controller' => implode(DIRECTORY_SEPARATOR, [ getenv("PROJECT_PATH"), 'src', 'Controller', '' ]), |  | ||||||
|             ], |  | ||||||
| 
 |  | ||||||
|             'cronard' => [ |  | ||||||
|                 '%ESCAPED_NAMESPACE%\\Controller' => implode(DIRECTORY_SEPARATOR, [ getenv("PROJECT_PATH"), 'src', 'Controller', '' ]), |  | ||||||
|             ], |  | ||||||
| 
 |  | ||||||
|             'cli' => [ |  | ||||||
|                 '%ESCAPED_NAMESPACE%\\Controller' => implode(DIRECTORY_SEPARATOR, [ getenv("PROJECT_PATH"), 'src', 'Controller', '' ]), |  | ||||||
|             ], |  | ||||||
| 
 |  | ||||||
|             'taxus' => [ |  | ||||||
|                 [ new Privilege("dev", "Is a developper of this application."), "is_dev" ], |  | ||||||
|                 [ new Privilege("admin", "Can manage mostly everything from this application."), "is_admin" ], |  | ||||||
|                 [ new Privilege("user", "Is an authenticated user."), "is_user" ], |  | ||||||
|                 [ new Privilege("anonymous", "Is an anonymous (unauthenticated) user."), "is_anonymous" ], |  | ||||||
|             ] |  | ||||||
|         ], |         ], | ||||||
| 
 | 
 | ||||||
|         'app.middlewares' => [], |         'ulmus' => [ | ||||||
|  |             'entities' => [ '%ESCAPED_NAMESPACE%\\Entity' => getenv("PROJECT_PATH") . '/src/Entity/' ], | ||||||
|  |         ], | ||||||
|  | 
 | ||||||
|  |         'routes' => [ | ||||||
|  |             '%ESCAPED_NAMESPACE%\\Controller' => getenv("PROJECT_PATH") . '/src/Controller/', | ||||||
|  |         ], | ||||||
|  | 
 | ||||||
|  |         'events' => [ | ||||||
|  |             '%ESCAPED_NAMESPACE%\\Controller' => implode(DIRECTORY_SEPARATOR, [ getenv("PROJECT_PATH"), 'src', 'Controller', '' ]), | ||||||
|  |         ], | ||||||
|  | 
 | ||||||
|  |         'cronard' => [ | ||||||
|  |             '%ESCAPED_NAMESPACE%\\Controller' => implode(DIRECTORY_SEPARATOR, [ getenv("PROJECT_PATH"), 'src', 'Controller', '' ]), | ||||||
|  |         ], | ||||||
|  | 
 | ||||||
|  |         'cli' => [ | ||||||
|  |             '%ESCAPED_NAMESPACE%\\Controller' => implode(DIRECTORY_SEPARATOR, [ getenv("PROJECT_PATH"), 'src', 'Controller', '' ]), | ||||||
|  |         ], | ||||||
|  | 
 | ||||||
|  |         'taxus' => [ | ||||||
|  |             [ new Privilege("dev", "Is a developper of this application."), "is_dev" ], | ||||||
|  |             [ new Privilege("admin", "Can manage mostly everything from this application."), "is_admin" ], | ||||||
|  |             [ new Privilege("user", "Is an authenticated user."), "is_user" ], | ||||||
|  |             [ new Privilege("anonymous", "Is an anonymous (unauthenticated) user."), "is_anonymous" ], | ||||||
|  |         ] | ||||||
|     ], |     ], | ||||||
| 
 | 
 | ||||||
|     require("$dir/auth.php"), |     'app.middlewares' => [], | ||||||
|     require("$dir/storage.php"), | ]; | ||||||
|     require("$dir/security.php"), |  | ||||||
|     require("$dir/env/" . getenv('APP_ENV') . ".php"), |  | ||||||
|     [ |  | ||||||
|         'config' => function () { |  | ||||||
|             return array_merge_recursive( |  | ||||||
|                 Lean\Lean::autoloadConfigFromComposerExtra(), |  | ||||||
|                 require(getenv("META_PATH")."/config.php") |  | ||||||
|             ); |  | ||||||
|         } |  | ||||||
|     ] |  | ||||||
| ); |  | ||||||
|  | |||||||
| @ -19,7 +19,6 @@ return [ | |||||||
| 
 | 
 | ||||||
|     AdapterProxy::class => function (ContainerInterface $c) { |     AdapterProxy::class => function (ContainerInterface $c) { | ||||||
|         return new AdapterProxy( |         return new AdapterProxy( | ||||||
|             $c->get('lean:adapter.sqlite'), |  | ||||||
|             $c->get(ConnectionAdapter::class) |             $c->get(ConnectionAdapter::class) | ||||||
|         ); |         ); | ||||||
|     }, |     }, | ||||||
|  | |||||||
| @ -23,8 +23,6 @@ new class(dirname(__DIR__)) extends \Lean\Kernel { | |||||||
|     { |     { | ||||||
|         $this->errorLogPath = getenv("LOGS_PATH") . DIRECTORY_SEPARATOR. date("Y-m").".log"; |         $this->errorLogPath = getenv("LOGS_PATH") . DIRECTORY_SEPARATOR. date("Y-m").".log"; | ||||||
| 
 | 
 | ||||||
|         $this->definitionFilePaths = Lean::getDefinitionsPathsFromComposer(); |  | ||||||
| 
 |  | ||||||
|         return parent::initializeEngine(); |         return parent::initializeEngine(); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user