wCMF  3.6
 All Classes Namespaces Files Functions Variables Groups Pages
class.DataConverter.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.DataConverter.php 1462 2014-02-04 23:52:27Z iherwig $
18  */
19 require_once(BASE."wcmf/lib/util/class.Message.php");
20 
21 /**
22  * @class DataConverter
23  * @ingroup Converter
24  * @brief DataConverter is the base class for all converter classes.
25  * It defines the interface for converting data between storage and application.
26  *
27  * @author ingo herwig <ingo@wemove.com>
28  */
30 {
31  /**
32  * Convert data after reading from storage.
33  * This method is called by PersistenceMapper classes after reading the data from the storage.
34  * @param data The data from storage.
35  * @param type The type of data.
36  * @param name The name of the data item.
37  * @return The converted data.
38  */
39  function convertStorageToApplication($data, $type, $name)
40  {
41  return $data;
42  }
43  /**
44  * Convert data before writing to storage.
45  * This method is called by PersistenceMapper classes before storing the data to the storage.
46  * @param data The data from application.
47  * @param type The type of data.
48  * @param name The name of the data item.
49  * @return The converted data.
50  */
51  function convertApplicationToStorage($data, $type, $name)
52  {
53  return $data;
54  }
55 }
56 ?>
convertStorageToApplication($data, $type, $name)
convertApplicationToStorage($data, $type, $name)
DataConverter is the base class for all converter classes. It defines the interface for converting da...