public static function getFlashMessages($label = null, $delete = true) {
        if (!Atomik::has('session.__FLASH')) {
            return array();
        }
        
        if ($label === null) {
        	if ($delete) {
            	return Atomik::delete('session.__FLASH');
        	}
        	return Atomik::get('session.__FLASH');
        }
        
        if (!Atomik::has("session.__FLASH.$label")) {
            return array();
        }
        
        if ($delete) {
        	return Atomik::delete("session.__FLASH.$label");
        }
        return Atomik::get("session.__FLASH.$label");
    }
public static function getFlashMessages($label = null, $delete = true) {
        if (!Atomik::has('session.__FLASH')) {
            return array();
        }
        
        if ($label === null) {
        	if ($delete) {
            	return Atomik::delete('session.__FLASH');
        	}
        	return Atomik::get('session.__FLASH');
        }
        
        if (!Atomik::has("session.__FLASH.$label")) {
            return array();
        }
        
        if ($delete) {
        	return Atomik::delete("session.__FLASH.$label");
        }
        return Atomik::get("session.__FLASH.$label");
    }
public static function getFlashMessages ( $ label = null , $ delete = true ) { if ( ! Atomik :: has ( 'session.__FLASH' ) ) { return array ( ) ; } if ( $ label === null ) { if ( $ delete ) { return Atomik :: delete ( 'session.__FLASH' ) ; } return Atomik :: get ( 'session.__FLASH' ) ; } if ( ! Atomik :: has ( "session.__FLASH.$label" ) ) { return array ( ) ; } if ( $ delete ) { return Atomik :: delete ( "session.__FLASH.$label" ) ; } return Atomik :: get ( "session.__FLASH.$label" ) ; }
Returns the flash messages saved in the session

@internal
@param string $label Whether to only retreives messages from this label. When null or 'all', returns all messages
@param bool $delete Whether to delete messages once retrieved
@return array An array of messages if the label is specified or an array of array message
Returns the flash messages saved in the session