Project

General

Profile

« Previous | Next » 

Revision 2131

Added by darkviper almost 9 years ago

  1. msgQueue fixed index error
    ! WbDatabase added compatibility layer to ::fetchAll() to prevent from incomplete compiled PHP

View differences:

msgQueue.php
1 1
<?php
2

  
3
/*
4
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
5
 *
6
 * This program is free software: you can redistribute it and/or modify
7
 * it under the terms of the GNU General Public License as published by
8
 * the Free Software Foundation, either version 3 of the License, or
9
 * (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
18
 */
19

  
2 20
/**
3
 * Description of class
21
 * msgQueue.php
4 22
 *
5
 * @author wkl
23
 * @category     Core
24
 * @package      Core_Helpers
25
 * @copyright    Manuela v.d.Decken <manuela@isteam.de>
26
 * @author       Manuela v.d.Decken <manuela@isteam.de>
27
 * @license      http://www.gnu.org/licenses/gpl.html   GPL License
28
 * @version      0.0.1
29
 * @revision     $Revision$
30
 * @link         $HeadURL$
31
 * @lastmodified $Date$
32
 * @since        File available since 09.05.2015
33
 * @description  provides a message queue to display system messages on each screens
6 34
 */
7 35
class msgQueue {
8 36

  
......
25 53
 * constructor
26 54
 */
27 55
    protected function __construct() {
28
        $this->aLogs = array();
56
        self::clear();
29 57
    }
30 58
/** disable cloning */
31 59
    private function __clone() { }
......
59 87
    public static function clear($iStatus = self::ALL)
60 88
    {
61 89
        if ($iStatus == self::ALL) {
62
            self::getInstance()->aLogs = array();
90
            self::getInstance()->aLogs = array(
91
                self::ERROR   => array(),
92
                self::SUCCESS => array(),
93
                self::WARN    => array(),
94
                self::LOG     => array()
95
            );
63 96
        } else {
64 97
            if (isset(self::getInstance()->aLogs[$iStatus])) {
65 98
                self::getInstance()->aLogs[$iStatus] = array();

Also available in: Unified diff