From f92021342dc2145c7e167a7ff353910ac0920731 Mon Sep 17 00:00:00 2001 From: Daniel Paul Carbone Date: Tue, 4 Apr 2017 11:02:28 -0500 Subject: [PATCH] Updating copyright and allowing uri's to be null when content is null. --- README.md | 14 +++++++------- src/XMLWriterPlus.php | 16 ++++++++-------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 478880e..041be7c 100644 --- a/README.md +++ b/README.md @@ -137,7 +137,7 @@ These methods interact with an internal associative array of ``` $prefix => $uri /** * @param string $prefix * @param string $name - * @param string $uri + * @param string|null $uri * @return bool */ public function startAttributeNS($prefix, $name, $uri = null); @@ -145,16 +145,16 @@ public function startAttributeNS($prefix, $name, $uri = null); /** * @param string $prefix * @param string $name - * @param string $uri + * @param string|null $uri * @param string|null $content * @return bool */ -public function writeAttributeNS($prefix, $name, $uri, $content = null); +public function writeAttributeNS($prefix, $name, $uri = null, $content = null); /** * @param string $prefix * @param string $name - * @param string $uri + * @param string|null $uri * @return bool */ public function startElementNS($prefix, $name, $uri = null); @@ -162,11 +162,11 @@ public function startElementNS($prefix, $name, $uri = null); /** * @param string $prefix * @param string $name - * @param string $uri - * @param null|string $content + * @param string|null $uri + * @param string|null $content * @return bool */ -public function writeElementNS($prefix, $name, $uri, $content = null); +public function writeElementNS($prefix, $name, $uri = null, $content = null); ``` Have all been modified to update this internal array. So if you do: diff --git a/src/XMLWriterPlus.php b/src/XMLWriterPlus.php index b7464b1..701b3bb 100644 --- a/src/XMLWriterPlus.php +++ b/src/XMLWriterPlus.php @@ -1,7 +1,7 @@ resolveNamespace($prefix, $uri); return parent::writeAttributeNS($prefix, $name, $uri, $content); @@ -177,7 +177,7 @@ public function writeAttributeNS($prefix, $name, $uri, $content = null) /** * @param string $prefix * @param string $name - * @param string $uri + * @param string|null $uri * @return bool */ public function startElementNS($prefix, $name, $uri = null) @@ -189,11 +189,11 @@ public function startElementNS($prefix, $name, $uri = null) /** * @param string $prefix * @param string $name - * @param string $uri - * @param null|string $content + * @param string|null $uri + * @param string|null $content * @return bool */ - public function writeElementNS($prefix, $name, $uri, $content = null) + public function writeElementNS($prefix, $name, $uri = null, $content = null) { list($prefix, $uri) = $this->resolveNamespace($prefix, $uri); return parent::writeElementNS($prefix, $name, $uri, $content);