1 <?php 2 3 namespace PhpXmlRpc\Traits; 4 5 use PhpXmlRpc\Helper\XMLParser; 6 7 trait ParserAware 8 { 9 protected static $parser; 10 11 /// @todo feature-creep: allow passing in $options (but then, how to deal with changing options between invocations?) 12 public function getParser() 13 { 14 if (self::$parser === null) { 15 self::$parser = new XMLParser(); 16 } 17 return self::$parser; 18 } 19 20 /** 21 * @param $parser 22 * @return void 23 */ 24 public static function setParser($parser) 25 { 26 self::$parser = $parser; 27 } 28 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body