1<?php 2 3namespace Sabre\Xml; 4 5/** 6 * Implementing the XmlDeserializable interface allows you to use a class as a 7 * deserializer for a specific element. 8 * 9 * @copyright Copyright (C) 2009-2015 fruux GmbH (https://fruux.com/). 10 * @author Evert Pot (http://evertpot.com/) 11 * @license http://sabre.io/license/ Modified BSD License 12 */ 13interface XmlDeserializable { 14 15 /** 16 * The deserialize method is called during xml parsing. 17 * 18 * This method is called statically, this is because in theory this method 19 * may be used as a type of constructor, or factory method. 20 * 21 * Often you want to return an instance of the current class, but you are 22 * free to return other data as well. 23 * 24 * You are responsible for advancing the reader to the next element. Not 25 * doing anything will result in a never-ending loop. 26 * 27 * If you just want to skip parsing for this element altogether, you can 28 * just call $reader->next(); 29 * 30 * $reader->parseInnerTree() will parse the entire sub-tree, and advance to 31 * the next element. 32 * 33 * @param Reader $reader 34 * @return mixed 35 */ 36 static function xmlDeserialize(Reader $reader); 37 38} 39