Project

General

Profile

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

    
20
/**
21
 * ModuleReorgAbstract.php
22
 *
23
 * @category     Core
24
 * @package      Core_ModuleInterface
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: 2070 $
30
 * @link         $HeadURL: svn://isteam.dynxs.de/wb-archiv/branches/2.8.x/wb/framework/ModuleReorgAbstract.php $
31
 * @lastmodified $Date: 2014-01-03 02:21:42 +0100 (Fri, 03 Jan 2014) $
32
 * @since        File available since 19.10.2013
33
 * @description  This class provides the basics for modul depending reorganisation classes
34
 */
35
abstract class ModuleReorgAbstract {
36

    
37
/** registry object */
38
	protected $oReg = null;
39
/** database object */
40
	protected $oDb  = null;
41
/** collector of return values */
42
	protected $aReport = null;
43
/** set kind of return values */
44
	protected $bDetailedLog = false;
45

    
46
/** show minimal log entries */
47
	const LOG_SHORT    = 0;
48
/** show extended log entries */
49
	const LOG_EXTENDED = 1;
50

    
51
/**
52
 * execute reorganisation
53
 * @return boolean
54
 */
55
	abstract public function execute();
56

    
57
/**
58
 * constructor
59
 * @param int $bDetailedLog  can be LOG_EXTENDED or LOG_SHORT
60
 */
61
	final public function __construct($bDetailedLog = self::LOG_SHORT) {
62
		$this->bDetailedLog = (bool)($bDetailedLog & self::LOG_EXTENDED);
63
		$this->oDb          = WbDatabase::getInstance();
64
		$this->oReg         = WbAdaptor::getInstance();
65
	}
66
/**
67
 * getReport
68
 * @return array
69
 * @description a report about the whoole reorganisation<br />
70
 */
71
	public function getReport()
72
	{
73
		return $this->aReport;
74
	}
75

    
76
} // end of class ModuleReorgAbstract
(5-5/36)