Last active
February 21, 2018 17:44
-
-
Save ppeiris/ead00db985bc6611aa0f65227b94ffe0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Zend\Console\Console; | |
use ZF\Console\Application; | |
use Zend\Console\ColorInterface as Color; | |
use ZF\Console\Dispatcher; | |
use Admin\Forms\NotificationPrimaryInfo; | |
chdir(dirname(__DIR__)); | |
include 'vendor/autoload.php'; | |
$application = Zend\Mvc\Application::init(require 'config/application.config.php'); | |
// grab the servicemanager | |
$services = $application->getServiceManager(); | |
// $buildModel = $services->get('My\BuildModel'); | |
$dispatcher = new Dispatcher($services); | |
// var_dump(AddIntercept::class); | |
// $interceptObj = $services->get("CustomerNotificationApiCollectionHydrator");t | |
$dispatcher->map('addintercept', function ($route, $console) use ($services) { | |
$opts = $route->getMatches(); | |
// HOW TO ACCESS THE CLASS THAT RETURN FROM FACTORY CLASS (in handler) | |
return 0; | |
}); | |
$application = new Application( | |
'addintercept', | |
"1.0", | |
require 'config/console/addintercept.console.config.php', | |
Console::getInstance(), | |
$dispatcher | |
); | |
$exit = $application->run(); | |
exit($exit); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment