Recommend this page to a friend! |
Download .zip |
Info | View files (8) | Download .zip | Reputation | Support forum | Blog | Links |
Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
2008-11-23 (7 years ago) | Not yet rated by the users | Total: 270 | All time: 7,230 This week: 1,113 |
Version | License | PHP version | Categories | |||
convertion_data 1.0 | Artistic License | 5.0 | XML, PHP 5, Data types |
Description | Author | |||||||||||||
This class can be used to convert objects into XML documents and vice-versa. |
|
The objective of this class is to allow both a mapping of an object as an XML, in order to perform various transformations according to the needs of the developer. The first thing is to read either an object or an XML file using the methods of the class which ubRoot nothing more than a more specialized class. Example: $ root = ubRoot: load_object ($ t_a); => returns an object ubRoot $ root = ubRoot: load_xml ( "node.xml"); => returns an object ubRoot After having already been the object ubRoot can obtain information at any of the formats allowing further that if an XML can be given directly to the address where you want to be saved. And said the goal is to explain how to work with the class and specify certain characteristics that make it possible to read the object 1. Of the objects will be taken only the result of the methods that start with "get__" then the attribute name, but the prefix can be changed if desired. 2. In the same way to introduce the values of the class is a necessary method for each attribute you want to use that method must be prefixed "set__", which as in the case of get__ can be changed 3. The objective of using a different code to "get" that is because we are used as a general parameters that we are no map or are recorded in an XML, either because they are measurable or because what saved them is an identifier . The important thing is that it allows great flexibility in developing the data when choosing a class that wants to be map 4. In case of the array is mapped all the information as appropriate. The keys of the settlement are represented as an internal node where the name would be the same key in whether, if the numerical values are taken to a string in the format "_ #" where # is the position in the settlement of this element . 5. Note that in cases where the object is to map out a class you are adding an attribute to this node, "ub_class_name" that represents the name of the class of that object. 6. Where to read an XML is within a node two nodes with the same name as it includes a settlement by that name as a key node and each would become a position of the settlement. 7. Where to read an XML is with several nodes named "_" take it as an arrangement where the name is the node that contains those that have the name "_" and each node of these will turn into a position within of that settlement. 8. Where to read an XML is a node that has an attribute "ub_is_array" will take it as a node at one position |
Files |
File | Role | Description |
---|---|---|
index.php | Example | ejemplo |
load.xml | Aux. | example of xml |
node.php | Class | Clase principal |
readme_en.txt | Doc. | description in english |
readme_es.txt | Doc. | description in spanish |
see.php | Class | especial para verificación |
test_a.php | Class | clases de ejemplo |
test_b.php | Class | clases de ejemplo |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
0% |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.