OutputStrategy.php
1 <?php
2 /**
3  * wCMF - wemove Content Management Framework
4  * Copyright (C) 2005-2020 wemove digital solutions GmbH
5  *
6  * Licensed under the terms of the MIT License.
7  *
8  * See the LICENSE file distributed with this work for
9  * additional information.
10  */
12 
14 
15 /**
16  * OutputStrategy defines the interface for classes that write an
17  * object's content to a destination (called 'document') using a special format.
18  * OutputStrategy implements the 'Strategy Pattern'.
19  *
20  * @author ingo herwig <ingo@wemove.com>
21  */
22 interface OutputStrategy {
23 
24  /**
25  * Write the document header.
26  */
27  public function writeHeader();
28 
29  /**
30  * Write the document footer.
31  */
32  public function writeFooter();
33 
34  /**
35  * Write the object's content.
36  * @param $obj The object to write.
37  */
38  public function writeObject(PersistentObject $obj);
39 }
40 ?>
writeObject(PersistentObject $obj)
Write the object's content.
writeFooter()
Write the document footer.
OutputStrategy defines the interface for classes that write an object's content to a destination (cal...
writeHeader()
Write the document header.
PersistentObject defines the interface of all persistent objects.