Skip to content

Instantly share code, notes, and snippets.

@guiled
Created January 15, 2014 22:34
Show Gist options
  • Save guiled/8446088 to your computer and use it in GitHub Desktop.
Save guiled/8446088 to your computer and use it in GitHub Desktop.
Custom Kit example in Sohoa Framework
namespace Application\Controller {
use Sohoa\Framework\Kit;
class Main extends Kit
{
public function indexAction()
{
$this->customKit->print();
}
}
}
<?php
namespace Application\Lib\Kit {
class Test extends \Sohoa\Framework\Kit\Kitable {
public function print() {
echo 'OK';
}
}
}
<?php
namespace {
use Sohoa\Framework\Framework;
require_once __DIR__ . '/../vendor/autoload.php';
\Sohoa\Framework\Kit::add('customKit', new \Application\Lib\Kit\Test());
$framework = new Framework();
$framework->run();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment