Пример #1
0
 /**
  * @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;
 }
Пример #2
0
 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'));
 }
Пример #3
0
 /**
  * @return Nano_Message
  */
 public static function message()
 {
     return Nano_Message::instance();
 }