as_array() public static method

Returns the current notices.
public static as_array ( ) : array
return array
Esempio n. 1
0
 /**
  * Displays notifications
  *
  * If notification type omitted, displays all notification types
  *
  * @param   string  Notification type
  * @param   string  View type
  * @return	void
  */
 public static function render($type = NULL, $view = NULL)
 {
     switch ($view) {
         case 'json':
             $output = json_encode(Notice::as_array($type));
             break;
         default:
             $output = View::factory(Notice::$view)->set('notifications', Notice::as_array($type))->render();
     }
     // Clear the notifications after rendering
     Notice::clear($type);
     return $output;
 }
Esempio n. 2
0
 /**
  * Returns notices
  *
  * @return  string
  */
 public function notices()
 {
     return Notice::as_array();
 }