vegas-cmf / database-router
Vegas CMF Database router
Installs: 9
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 7
Forks: 1
Open Issues: 0
pkg:composer/vegas-cmf/database-router
Requires
- php: >=5.4
- ext-phalcon: >=1.3.0,<2
- phalcon/devtools: 1.3.x-dev
- phalcon/incubator: 1.3.*
- vegas-cmf/core: 1.1.*
- vegas-cmf/dao: *
Requires (Dev)
- phpunit/phpunit: 4.0.*
- satooshi/php-coveralls: dev-master
This package is not auto-updated.
Last update: 2022-08-12 09:41:10 UTC
README
INSTALL AT A NEW PROJECT
- use
Vegas\Mvc\Router\Adapter\Mongo
adapter inBootstrap::initRoutes
- register
databaseRouteManager
service - add
route
config in Module
return [
'routes' => [
'route_name' => [
'module' => 'ModuleName',
'controller' => 'Frontend\ControllerName',
'action' => 'index',
],
]
];
- create new route
$routeManager = $this->getDI()->get('databaseRouteManager');
$routeManager->update('route_name', PAGE_OBJECT_ID, /URL);
TEST OLD-SCHOOL
cp ./tests/config.php.sample ./tests/config.php
composer install
php ./vendor/bin/phpunit -c tests/phpunit.xml
TEST DOCKER
cp ./tests/config.php.sample ./tests/config.php
yake composer install
yake up
yake phpunit -c tests/phpunit.xml