Add an empty line in the backtrace element.

In some occasions the trace is empty, the API expects at least one
<line>-element. So if there is no trace we add an empty line.
Merge pull request #1 from tijsverkoyen/empty-line

Add an empty line in the backtrace element.
Clean up vertical alignment of example code in README
Update README.md
Backtrace: add first line (origin of Exception)

Before, the backtrace only captured and formatted the return value of
->getTrace().  According to a comment in the docs:

From: http://www.php.net/manual/en/exception.gettrace.php#107563
 > Two important points about this function which are not documented:
 >
 > 1) [->getTrace()] does not include the file / line at which the
 >    exception is thrown; that entry is only recorded in the top-level
 >    getFile/Line methods.

This change ensures that the file and line the exception was actually
created on are passed through as part of the backtrace.
Merge pull request #4 from iFixit/backtrace-first-line

Backtrace: add first line (origin of Exception)
Backtrace: filter trace of first line
Merge pull request #5 from iFixit/backtrace-first-line

Backtrace: filter trace of first line
Parameters and Session: allow non-string values

Allow using values that are not strings (i.e. numeric)

Previously, if your $_SESSION contained ints or floats,
is_string($arg) would be false, $value would never be set and the result
would not be what you expected.

Previously:
===========
Session input              output (in errbit)
[                          {
  "thingA" => 10,            "key" => "thingB"
  "thingB" => 7            }
]

Now:
====
Session input              output (in errbit)
[                          {
  "thingA" => 10,            "thingA" => "10",
  "thingB" => 7              "thingB" => "7"
]                          }
Merge pull request #6 from iFixit/non-string-array-values

Parameters and Session: allow non-string values
fix syntax error for php < 5.4
Merge pull request #7 from maintux/master

Fix syntax error for PHP < 5.4
Tests: add beginnings of xmlBuilder test

Fleshing this out soon cause there is definitely a bug.
Tests: flesh out more of the XMLBuilderTest

Hum... still no bugs.
Tests: Fix a bug in XMLBuilder

There it is!

is_callable() is a not the right thing to use here cause
is_callable('next') == true because next() is a defined php function.

Obviously there are tons of string that are defined php functions.
All anonymous functions are just instances of the Closure class.
Tests: add failing tests

Ok, found the bug. SimpleXMLElement doesn't allow you to create tags
with a falsy value using the Object attribute setters.

This doesn't create a new child tag.
$this->_xml->{$tagname} = "" or false or 0;
XMLBuilder: fix the falsy value bug

So, SimpleXML SUCKS. I've replaced it with DOMDocument. Most people
advise using DOMDOcument because SimpleXML has so many quirks and
limited / broken support for DOM modification.

I spent several hours futzing with it. Trying to add an
Element with no "value" or at least a falsy value. I was able to get it
to add the Element, but it would always mess up the rest of the
document. The doc would bw wrapped in a base element and the XML version
declaration would be at the top.

This now seems to work just fine, and the several are now fixed and
tested.
XMLBuilder: encode "value" of xml tags

Add some tests and encode entities in the "value" string.

Apparently DOMDocument tries to parse the "value" of tags before trying
to encode it (doesn't make sense). It was failing on values like "&am"
and "&lt" with an "unterminated entity reference" error.
Merge pull request #8 from iFixit/parameters-fix-xmlbuilder

Fix XMLBuilder