1
0
Fork 0
mirror of https://github.com/Oreolek/kangana.git synced 2024-06-16 15:01:09 +03:00

Minion integration

This commit is contained in:
Alexander Yakovlev 2014-01-29 20:06:13 +07:00
parent 0c091b4dcf
commit 53647fe2d2
5 changed files with 27 additions and 8 deletions

3
.gitmodules vendored
View file

@ -22,3 +22,6 @@
[submodule "modules/email"]
path = modules/email
url = git@github.com:shadowhand/email.git
[submodule "modules/minion"]
path = modules/minion
url = git@github.com:kohana/minion.git

View file

@ -113,6 +113,7 @@ Kohana::modules(array(
'debug-toolbar' => MODPATH.'debug-toolbar', // Debug toolbar
'kostache' => MODPATH.'kostache', // Logic-less Mustache views
'email' => MODPATH.'email', // Electronic mail class
'minion' => MODPATH.'minion', // CLI framework
));
/**

View file

@ -102,11 +102,21 @@ if ( ! defined('KOHANA_START_MEMORY'))
// Bootstrap the application
require APPPATH.'bootstrap'.EXT;
/**
* Execute the main request. A source of the URI can be passed, eg: $_SERVER['PATH_INFO'].
* If no source is specified, the URI will be automatically detected.
*/
echo Request::factory()
->execute()
->send_headers()
->body();
if (PHP_SAPI == 'cli') // Try and load minion
{
class_exists('Minion_Task') OR die('Please enable the Minion module for CLI support.');
set_exception_handler(array('Minion_Exception', 'handler'));
Minion_Task::factory(Minion_CLI::options())->execute();
}
else
{
/**
* Execute the main request. A source of the URI can be passed, eg: $_SERVER['PATH_INFO'].
* If no source is specified, the URI will be automatically detected.
*/
echo Request::factory(TRUE, array(), FALSE)
->execute()
->send_headers(TRUE)
->body();
}

4
minion Executable file
View file

@ -0,0 +1,4 @@
#!/usr/bin/env php
<?php
include __DIR__.DIRECTORY_SEPARATOR.'index.php';

1
modules/minion Submodule

@ -0,0 +1 @@
Subproject commit cfa623256287ff664bc72372caad02fe2f8a145b