/** * @return Nano_Message * @param boolean $reset */ public static function instance($reset = false) { if (null == self::$instance || true === $reset) { self::$instance = new self(); if (isset(Nano::config('web')->lang)) { self::$instance->lang(Nano::config('web')->lang); } } return self::$instance; }
public function testFormatMessages() { self::assertNull(Nano_Message::instance()->f('f1', 1, 's')); Nano_Message::instance()->load('test'); self::assertEquals('format 01 s', Nano_Message::instance()->f('f1', 1, 's')); }
/** * @return Nano_Message */ public static function message() { return Nano_Message::instance(); }