wCMF  3.6
 All Classes Namespaces Files Functions Variables Groups Pages
class.DefaultOutputStrategy.php
Go to the documentation of this file.
1 <?php
2 /**
3  * wCMF - wemove Content Management Framework
4  * Copyright (C) 2005-2014 wemove digital solutions GmbH
5  *
6  * Licensed under the terms of any of the following licenses
7  * at your choice:
8  *
9  * - GNU Lesser General Public License (LGPL)
10  * http://www.gnu.org/licenses/lgpl.html
11  * - Eclipse Public License (EPL)
12  * http://www.eclipse.org/org/documents/epl-v10.php
13  *
14  * See the license.txt file distributed with this work for
15  * additional information.
16  *
17  * $Id: class.DefaultOutputStrategy.php 1462 2014-02-04 23:52:27Z iherwig $
18  */
19 require_once(BASE."wcmf/lib/output/class.OutputStrategy.php");
20 require_once(BASE."wcmf/lib/util/class.Log.php");
21 
22 /**
23  * @class DefaultOutputStrategy
24  * @ingroup Output
25  * @brief This OutputStrategy outputs an object's content to the Log category DefaultOutputStrategy.
26  * Classes used must implement the toString() method.
27  *
28  * @author ingo herwig <ingo@wemove.com>
29  */
31 {
32  /**
33  * Write the document header.
34  */
35  function writeHeader()
36  {
37  Log::info("DOCUMENT START.", __CLASS__);
38  }
39  /**
40  * Write the document footer.
41  */
42  function writeFooter()
43  {
44  Log::info("DOCUMENT END.", __CLASS__);
45  }
46  /**
47  * Write the object's content.
48  * @param obj The object to write.
49  */
50  function writeObject(&$obj)
51  {
52  Log::info($obj->toString(), __CLASS__);
53  }
54 }
55 ?>
OutputStrategy is used to write an object's content to a destination (called 'document') using a spec...
info($message, $category)
Definition: class.Log.php:49
This OutputStrategy outputs an object's content to the Log category DefaultOutputStrategy. Classes used must implement the toString() method.