public function setUp()
 {
     Config::initialize();
     Config::request('foo')->doesCommand('test')->whichInvokes('ExceptionThrowingCommand');
     Config::request('div')->doesCommand('test')->whichInvokes('ErrorThrowingCommand');
     Config::logger('fail')->whichInvokes('FortissimoArrayInjectionLogger');
 }
Exemplo n.º 2
0
 *   ->withParam('categories')
 *     ->whoseValueIs('Fatal Error,Recoverable Error')
 * ;
 * @endcode
 *
 * New loggers can be created very easily. See the FortissimoOutputInjectionLogger code for an 
 * example.
 *
 * Loggers that ship with Fortissimo:
 *  - FortissimoOutputInjectionLogger (aka FOIL)
 *  - FortissimoArrayInjectionLogger (aka FAIL)
 *  - SimpleOutputInjectionLogger (aka SOIL)
 *  - SimpleArrayInjectionLogger (aka SAIL)
 *  - FortissimoSyslogLogger (aka... Fizzle?)
 */
Config::logger('foil')->whichInvokes('FortissimoOutputInjectionLogger');
/**
 * @page cache_config Caches
 *
 * Caching support is built into Fortissimo.
 *
 * Fortissimo has built-in support for multiple caching backends. For example, applications could
 * strategically cache some data in memcache and some in APC. Fortissimo includes a simple 
 * implementation of a Memcached caching layer (FortissimoMemcacheCache). 
 * @code
 * <?php
 * Config::cache('memcache')
 *   ->whichInvokes('FortissimoMemcacheCache')
 *   ->withParam('servers')
 *     ->whoseValueIs(array('example.com:11211', 'example.com:11212'))
 *   ->withParam('persistent')
Exemplo n.º 3
0
 public function testLoggers()
 {
     $cfg = Config::logger('lumberjack')->whichInvokes('ImOkay')->getConfiguration();
     $this->assertEquals('ImOkay', $cfg[Config::LOGGERS]['lumberjack']['class']);
 }
Exemplo n.º 4
0
 /**
  * Initialize complex static variables
  * @static
  */
 public static function staticInit()
 {
     self::$logger = Logger::getLogger(__CLASS__);
 }