for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php /** MicroFlashInjector */
namespace Micro\Web;
use Micro\Base\Exception;
use Micro\Base\Injector;
/**
* Class FlashInjector
*
* @author Oleg Lunegov <[email protected]>
* @link https://github.com/linpax/microphp-framework
* @copyright Copyright © 2013 Oleg Lunegov
* @license /LICENSE
* @package Micro
* @subpackage Web
* @version 1.0
* @since 1.0
*/
class FlashInjector extends Injector
{
* @return FlashMessage
* @throws Exception
public function build()
$flash = $this->get('flash');
if (!($flash instanceof FlashMessage)) {
throw new Exception('Component `flash` not configured');
}
return $flash;