Skip to content

Instantly share code, notes, and snippets.

@ppeiris
Last active February 21, 2018 17:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ppeiris/ead00db985bc6611aa0f65227b94ffe0 to your computer and use it in GitHub Desktop.
Save ppeiris/ead00db985bc6611aa0f65227b94ffe0 to your computer and use it in GitHub Desktop.
<?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