|
XMLUtils
#phorm/utils/XMLUtils.php IntroductionStatic methods responsible for converting ArrayCollections of IDatabaseRecord objects into XML. Public Static Methods
ExamplesGenerate XML for 5 Articles include_once $_SERVER['DOCUMENT_ROOT'].'/model.php'; include_once $_SERVER['DOCUMENT_ROOT'].'/phorm/utils/XMLUtils.php'; $obj = new Articles(); $obj->limit = 5; $arrayCollection = $obj->records(); XMLUtils::collectionToXML($arrayCollection); Generate XML for 5 Articles do not follow ForeignKey's or ManyToMany Relationships by specifying the number of levels. include_once $_SERVER['DOCUMENT_ROOT'].'/model.php'; include_once $_SERVER['DOCUMENT_ROOT'].'/phorm/utils/XMLUtils.php'; $obj = new Articles(); $obj->limit = 5; $arrayCollection = $obj->records(); XMLUtils::collectionToXML($arrayCollection, 1);
| |||||||||