summaryrefslogtreecommitdiff
path: root/src/HTML5
diff options
context:
space:
mode:
authorAsmir Mustafic <[email protected]>2014-06-11 10:05:54 +0200
committerAsmir Mustafic <[email protected]>2014-06-11 10:05:54 +0200
commitd6940c3cc8eebd72627d42a0c0b3139f951716f4 (patch)
treed632d5553e1712f9606ce6ae2b15eb99bcd3b831 /src/HTML5
parent92fbcfdd1e4f788c981dc91fee8336cbd9c2c484 (diff)
PSR-0 vendor namespace
Diffstat (limited to 'src/HTML5')
-rw-r--r--src/HTML5/Elements.php22
-rw-r--r--src/HTML5/Entities.php2
-rw-r--r--src/HTML5/Exception.php2
-rw-r--r--src/HTML5/InstructionProcessor.php12
-rw-r--r--src/HTML5/Parser/CharacterReference.php6
-rw-r--r--src/HTML5/Parser/DOMTreeBuilder.php6
-rw-r--r--src/HTML5/Parser/EventHandler.php2
-rw-r--r--src/HTML5/Parser/FileInputStream.php2
-rw-r--r--src/HTML5/Parser/InputStream.php2
-rw-r--r--src/HTML5/Parser/ParseError.php2
-rw-r--r--src/HTML5/Parser/Scanner.php4
-rw-r--r--src/HTML5/Parser/StringInputStream.php2
-rw-r--r--src/HTML5/Parser/Tokenizer.php8
-rw-r--r--src/HTML5/Parser/TreeBuildingRules.php4
-rw-r--r--src/HTML5/Parser/UTF8Utils.php2
-rw-r--r--src/HTML5/Serializer/HTML5Entities.php4
-rw-r--r--src/HTML5/Serializer/OutputRules.php14
-rw-r--r--src/HTML5/Serializer/RulesInterface.php12
-rw-r--r--src/HTML5/Serializer/Traverser.php2
19 files changed, 55 insertions, 55 deletions
diff --git a/src/HTML5/Elements.php b/src/HTML5/Elements.php
index 678b3ac..31e9e4c 100644
--- a/src/HTML5/Elements.php
+++ b/src/HTML5/Elements.php
@@ -2,12 +2,12 @@
/**
* Provide general element functions.
*/
-namespace HTML5;
+namespace Masterminds\HTML5;
/**
- * This class provides general information about HTML5 elements,
- * including syntactic and semantic issues. Parsers and serializers can
- * use this class as a reference point for information about the rules
+ * This class provides general information about HTML5 elements,
+ * including syntactic and semantic issues. Parsers and serializers can
+ * use this class as a reference point for information about the rules
* of various HTML5 elements.
*
* @todo consider using a bitmask table lookup. There is enough overlap in
@@ -39,8 +39,8 @@ class Elements {
// "pre", "listing"
// "form"
// "plaintext"
- /**
- * Indicates that if a previous event is for a P tag, that element
+ /**
+ * Indicates that if a previous event is for a P tag, that element
* should be considered closed.
*/
const AUTOCLOSE_P = 16;
@@ -82,7 +82,7 @@ class Elements {
"command" => 9, // NORMAL | VOID_TAG
//"data" => 1, // This is highly experimental and only part of the whatwg spec (not w3c). See https://developer.mozilla.org/en-US/docs/HTML/Element/data
"datalist" => 1,
- "dd" => 65, // NORMAL | BLOCK_TAG
+ "dd" => 65, // NORMAL | BLOCK_TAG
"del" => 1,
"details" => 17, // NORMAL | AUTOCLOSE_P,
"dfn" => 1,
@@ -189,7 +189,7 @@ class Elements {
*
* In our case we are only concerned with presentation MathML and not content
* MathML. There is a nice list of this subset at https://developer.mozilla.org/en-US/docs/MathML/Element.
- *
+ *
* @var array
*/
public static $mathml = array(
@@ -520,8 +520,8 @@ class Elements {
*
* This includes html5 elements along with other allowed embedded content
* such as svg and mathml.
- *
- * @param string $name
+ *
+ * @param string $name
* The name of the element.
*
* @return bool
@@ -594,7 +594,7 @@ class Elements {
* Normalize a MathML attribute name to its proper case and form.
*
* Note, all MathML element names are lowercase.
- *
+ *
* @param string $name
* The name of the attribute.
*
diff --git a/src/HTML5/Entities.php b/src/HTML5/Entities.php
index e5de9e2..2174f0d 100644
--- a/src/HTML5/Entities.php
+++ b/src/HTML5/Entities.php
@@ -1,5 +1,5 @@
<?php
-namespace HTML5;
+namespace Masterminds\HTML5;
/** Entity lookup tables. This class is automatically generated. */
class Entities {
public static $byName = array (
diff --git a/src/HTML5/Exception.php b/src/HTML5/Exception.php
index aa650a6..9885ae5 100644
--- a/src/HTML5/Exception.php
+++ b/src/HTML5/Exception.php
@@ -1,5 +1,5 @@
<?php
-namespace HTML5;
+namespace Masterminds\HTML5;
/**
* The base exception for the HTML5 project.
diff --git a/src/HTML5/InstructionProcessor.php b/src/HTML5/InstructionProcessor.php
index cfe7b33..d84ba42 100644
--- a/src/HTML5/InstructionProcessor.php
+++ b/src/HTML5/InstructionProcessor.php
@@ -2,15 +2,15 @@
/**
* A handler for processor instructions.
*/
-namespace HTML5;
+namespace Masterminds\HTML5;
/**
* Provide an processor to handle embedded instructions.
*
- * XML defines a mechanism for inserting instructions (like PHP) into a
- * document. These are called "Processor Instructions." The HTML5 parser
- * provides an opportunity to handle these processor instructions during
- * the tree-building phase (before the DOM is constructed), which makes
+ * XML defines a mechanism for inserting instructions (like PHP) into a
+ * document. These are called "Processor Instructions." The HTML5 parser
+ * provides an opportunity to handle these processor instructions during
+ * the tree-building phase (before the DOM is constructed), which makes
* it possible to alter the document as it is being created.
*
* One could, for example, use this mechanism to execute well-formed PHP
@@ -24,7 +24,7 @@ interface InstructionProcessor {
* The process() function is responsible for doing the following:
* - Determining whether $name is an instruction type it can handle.
* - Determining what to do with the data passed in.
- * - Making any subsequent modifications to the DOM by modifying the
+ * - Making any subsequent modifications to the DOM by modifying the
* DOMElement or its attached DOM tree.
*
* @param DOMElement $element
diff --git a/src/HTML5/Parser/CharacterReference.php b/src/HTML5/Parser/CharacterReference.php
index 526a8b1..2ead49e 100644
--- a/src/HTML5/Parser/CharacterReference.php
+++ b/src/HTML5/Parser/CharacterReference.php
@@ -1,13 +1,13 @@
<?php
-namespace HTML5\Parser;
+namespace Masterminds\HTML5\Parser;
-use \HTML5\Entities;
+use Masterminds\HTML5\Entities;
/**
* Manage entity references.
*
* This is a simple resolver for HTML5 character reference entitites.
- * See \HTML5\Entities for the list of supported entities.
+ * See \Masterminds\HTML5\Entities for the list of supported entities.
*/
class CharacterReference {
diff --git a/src/HTML5/Parser/DOMTreeBuilder.php b/src/HTML5/Parser/DOMTreeBuilder.php
index 964d662..3bf5713 100644
--- a/src/HTML5/Parser/DOMTreeBuilder.php
+++ b/src/HTML5/Parser/DOMTreeBuilder.php
@@ -1,7 +1,7 @@
<?php
-namespace HTML5\Parser;
+namespace Masterminds\HTML5\Parser;
-use HTML5\Elements;
+use Masterminds\HTML5\Elements;
/**
* Create an HTML5 DOM tree from events.
*
@@ -136,7 +136,7 @@ class DOMTreeBuilder implements EventHandler {
* This is used for handling Processor Instructions as they are
* inserted. If omitted, PI's are inserted directly into the DOM tree.
*/
- public function setInstructionProcessor(\HTML5\InstructionProcessor $proc) {
+ public function setInstructionProcessor(\Masterminds\HTML5\InstructionProcessor $proc) {
$this->processor = $proc;
}
diff --git a/src/HTML5/Parser/EventHandler.php b/src/HTML5/Parser/EventHandler.php
index 4034938..4a99aa6 100644
--- a/src/HTML5/Parser/EventHandler.php
+++ b/src/HTML5/Parser/EventHandler.php
@@ -1,5 +1,5 @@
<?php
-namespace HTML5\Parser;
+namespace Masterminds\HTML5\Parser;
/**
* Standard events for HTML5.
diff --git a/src/HTML5/Parser/FileInputStream.php b/src/HTML5/Parser/FileInputStream.php
index c1bb128..ce16fb2 100644
--- a/src/HTML5/Parser/FileInputStream.php
+++ b/src/HTML5/Parser/FileInputStream.php
@@ -1,5 +1,5 @@
<?php
-namespace HTML5\Parser;
+namespace Masterminds\HTML5\Parser;
/**
* The FileInputStream loads a file to be parsed.
diff --git a/src/HTML5/Parser/InputStream.php b/src/HTML5/Parser/InputStream.php
index 713031d..8180909 100644
--- a/src/HTML5/Parser/InputStream.php
+++ b/src/HTML5/Parser/InputStream.php
@@ -1,5 +1,5 @@
<?php
-namespace HTML5\Parser;
+namespace Masterminds\HTML5\Parser;
/**
* Interface for stream readers.
diff --git a/src/HTML5/Parser/ParseError.php b/src/HTML5/Parser/ParseError.php
index 4d5f117..53a0844 100644
--- a/src/HTML5/Parser/ParseError.php
+++ b/src/HTML5/Parser/ParseError.php
@@ -1,5 +1,5 @@
<?php
-namespace HTML5\Parser;
+namespace Masterminds\HTML5\Parser;
/**
* Emit when the parser has an error.
diff --git a/src/HTML5/Parser/Scanner.php b/src/HTML5/Parser/Scanner.php
index cd147e5..18ed821 100644
--- a/src/HTML5/Parser/Scanner.php
+++ b/src/HTML5/Parser/Scanner.php
@@ -1,5 +1,5 @@
<?php
-namespace HTML5\Parser;
+namespace Masterminds\HTML5\Parser;
/**
* The scanner.
@@ -19,7 +19,7 @@ class Scanner {
/**
* Create a new Scanner.
*
- * @param \HTML5\Parser\InputStream $input
+ * @param \Masterminds\HTML5\Parser\InputStream $input
* An InputStream to be scanned.
*/
public function __construct($input) {
diff --git a/src/HTML5/Parser/StringInputStream.php b/src/HTML5/Parser/StringInputStream.php
index ca5fee0..ee1e1ba 100644
--- a/src/HTML5/Parser/StringInputStream.php
+++ b/src/HTML5/Parser/StringInputStream.php
@@ -2,7 +2,7 @@
/**
* Loads a string to be parsed.
*/
-namespace HTML5\Parser;
+namespace Masterminds\HTML5\Parser;
/*
*
diff --git a/src/HTML5/Parser/Tokenizer.php b/src/HTML5/Parser/Tokenizer.php
index f3cf622..c70d92f 100644
--- a/src/HTML5/Parser/Tokenizer.php
+++ b/src/HTML5/Parser/Tokenizer.php
@@ -1,7 +1,7 @@
<?php
-namespace HTML5\Parser;
+namespace Masterminds\HTML5\Parser;
-use HTML5\Elements;
+use Masterminds\HTML5\Elements;
/**
* The HTML5 tokenizer.
@@ -48,9 +48,9 @@ class Tokenizer {
* it a scanner (input) and an event handler (output), and then calling
* the Tokenizer::parse() method.`
*
- * @param \HTML5\Parser\Scanner $scanner
+ * @param \Masterminds\HTML5\Parser\Scanner $scanner
* A scanner initialized with an input stream.
- * @param \HTML5\Parser\EventHandler $eventHandler
+ * @param \Masterminds\HTML5\Parser\EventHandler $eventHandler
* An event handler, initialized and ready to receive
* events.
*/
diff --git a/src/HTML5/Parser/TreeBuildingRules.php b/src/HTML5/Parser/TreeBuildingRules.php
index b87c6b5..73b7fc4 100644
--- a/src/HTML5/Parser/TreeBuildingRules.php
+++ b/src/HTML5/Parser/TreeBuildingRules.php
@@ -1,7 +1,7 @@
<?php
-namespace HTML5\Parser;
+namespace Masterminds\HTML5\Parser;
-use HTML5\Elements;
+use Masterminds\HTML5\Elements;
/**
* Handles special-case rules for the DOM tree builder.
diff --git a/src/HTML5/Parser/UTF8Utils.php b/src/HTML5/Parser/UTF8Utils.php
index 974a670..37e8856 100644
--- a/src/HTML5/Parser/UTF8Utils.php
+++ b/src/HTML5/Parser/UTF8Utils.php
@@ -25,7 +25,7 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-namespace HTML5\Parser;
+namespace Masterminds\HTML5\Parser;
/**
* UTF-8 Utilities
*/
diff --git a/src/HTML5/Serializer/HTML5Entities.php b/src/HTML5/Serializer/HTML5Entities.php
index 5717002..91322c9 100644
--- a/src/HTML5/Serializer/HTML5Entities.php
+++ b/src/HTML5/Serializer/HTML5Entities.php
@@ -3,12 +3,12 @@
* @file
* This contains HTML5 entities to use with serializing.
*
- * The list here is mildly different from the list at \HTML5\Entities because
+ * The list here is mildly different from the list at \Masterminds\HTML5\Entities because
* that list was generated from the w3c. It contains some entities that are
* not entirely proper such as &am; which maps to &. This list is meant to be
* a fallback for PHP versions prior to PHP 5.4 when dealing with encoding.
*/
-namespace HTML5\Serializer;
+namespace Masterminds\HTML5\Serializer;
/**
* A mapping of entities to their html5 representation. Used for older PHP
diff --git a/src/HTML5/Serializer/OutputRules.php b/src/HTML5/Serializer/OutputRules.php
index 3af1cde..2425958 100644
--- a/src/HTML5/Serializer/OutputRules.php
+++ b/src/HTML5/Serializer/OutputRules.php
@@ -6,14 +6,14 @@
* These output rules are likely to generate output similar to the document that
* was parsed. It is not intended to output exactly the document that was parsed.
*/
-namespace HTML5\Serializer;
+namespace Masterminds\HTML5\Serializer;
-use \HTML5\Elements;
+use Masterminds\HTML5\Elements;
/**
* Generate the output html5 based on element rules.
*/
-class OutputRules implements \HTML5\Serializer\RulesInterface {
+class OutputRules implements \Masterminds\HTML5\Serializer\RulesInterface {
const IM_IN_HTML = 1;
const IM_IN_SVG = 2;
@@ -36,7 +36,7 @@ class OutputRules implements \HTML5\Serializer\RulesInterface {
$this->out = $output;
}
- public function setTraverser(\HTML5\Serializer\Traverser $traverser) {
+ public function setTraverser(\Masterminds\HTML5\Serializer\Traverser $traverser) {
$this->traverser = $traverser;
return $this;
@@ -208,7 +208,7 @@ class OutputRules implements \HTML5\Serializer\RulesInterface {
* @param string $text
* The string to put into the output.
*
- * @return HTML5\Serializer\Traverser
+ * @return Masterminds\HTML5\Serializer\Traverser
* $this so it can be used in chaining.
*/
protected function wr($text) {
@@ -219,7 +219,7 @@ class OutputRules implements \HTML5\Serializer\RulesInterface {
/**
* Write a new line character.
*
- * @return HTML5\Serializer\Traverser
+ * @return Masterminds\HTML5\Serializer\Traverser
* $this so it can be used in chaining.
*/
protected function nl() {
@@ -274,7 +274,7 @@ class OutputRules implements \HTML5\Serializer\RulesInterface {
// If a version earlier than 5.4 html5 entities are not entirely handled.
// This manually handles them.
else {
- return strtr($text, \HTML5\Serializer\HTML5Entities::$map);
+ return strtr($text, \Masterminds\HTML5\Serializer\HTML5Entities::$map);
}
}
diff --git a/src/HTML5/Serializer/RulesInterface.php b/src/HTML5/Serializer/RulesInterface.php
index 18ac8ca..86f44af 100644
--- a/src/HTML5/Serializer/RulesInterface.php
+++ b/src/HTML5/Serializer/RulesInterface.php
@@ -3,14 +3,14 @@
* @file
* The interface definition for Rules to generate output.
*/
-namespace HTML5\Serializer;
+namespace Masterminds\HTML5\Serializer;
/**
* To create a new rule set for writing output the RulesInterface needs to be
* implemented. The resulting class can be specified in the options with the
* key of rules.
*
- * For an example implementation see \HTML5\Serializer\OutputRules.
+ * For an example implementation see \Masterminds\HTML5\Serializer\OutputRules.
*/
interface RulesInterface {
@@ -31,12 +31,12 @@ interface RulesInterface {
*
* Note, only one traverser can be used by the rules.
*
- * @param \HTML5\Serializer\Traverser $traverser
+ * @param \Masterminds\HTML5\Serializer\Traverser $traverser
* The traverser used in the rules.
- * @return \HTML5\Serializer\RulesInterface
+ * @return \Masterminds\HTML5\Serializer\RulesInterface
* $this for the current object.
*/
- public function setTraverser(\HTML5\Serializer\Traverser $traverser);
+ public function setTraverser(\Masterminds\HTML5\Serializer\Traverser $traverser);
/**
* Write a document element (\DOMDocument).
@@ -91,7 +91,7 @@ interface RulesInterface {
/**
* Write a processor instruction.
*
- * To learn about processor instructions see \HTML5\InstructionProcessor
+ * To learn about processor instructions see \Masterminds\HTML5\InstructionProcessor
*
* Instead of returning the result write it to the output stream ($output)
* that was passed into the constructor.
diff --git a/src/HTML5/Serializer/Traverser.php b/src/HTML5/Serializer/Traverser.php
index 0794458..bcb9814 100644
--- a/src/HTML5/Serializer/Traverser.php
+++ b/src/HTML5/Serializer/Traverser.php
@@ -1,5 +1,5 @@
<?php
-namespace HTML5\Serializer;
+namespace Masterminds\HTML5\Serializer;
/**
* Traverser for walking a DOM tree.