Skip to content

Commit

Permalink
Updating copyright and allowing uri's to be null when content is null.
Browse files Browse the repository at this point in the history
  • Loading branch information
dcarbone committed Apr 4, 2017
1 parent 8f293f1 commit f920213
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,36 +137,36 @@ 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);

/**
* @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);

/**
* @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:
Expand Down
16 changes: 8 additions & 8 deletions src/XMLWriterPlus.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php namespace DCarbone;

/*
Copyright 2012-2016 Daniel Carbone ([email protected])
Copyright 2012-2017 Daniel Carbone ([email protected])
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -152,7 +152,7 @@ public function startDocument($version = 1.0, $encoding = 'UTF-8', $standalone =
/**
* @param string $prefix
* @param string $name
* @param string $uri
* @param string|null $uri
* @return bool
*/
public function startAttributeNS($prefix, $name, $uri = null)
Expand All @@ -164,11 +164,11 @@ 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)
{
list($prefix, $uri) = $this->resolveNamespace($prefix, $uri);
return parent::writeAttributeNS($prefix, $name, $uri, $content);
Expand All @@ -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)
Expand All @@ -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);
Expand Down

0 comments on commit f920213

Please sign in to comment.