Recommendations from others are noted in (parentheses). The rest are my personal recommendations.
- The Pragmatic Programmer - Hunt & Thomas
<?php | |
// TODO: Implement RecursiveIterator | |
class NodeBranch | |
{ | |
private $_content; | |
private $_children = array(); | |
private $_parent; |
<?php | |
/** | |
* San Francisco parser for State Decoded. | |
* Extends AmericanLegal base classes. | |
* | |
* PHP version 5 | |
* | |
* @license http://www.gnu.org/licenses/gpl.html GPL 3 | |
* @version 0.8 |
<?php | |
/** | |
* San Francisco parser for State Decoded. | |
* Extends AmericanLegal base classes. | |
* | |
* PHP version 5 | |
* | |
* @license http://www.gnu.org/licenses/gpl.html GPL 3 | |
* @version 0.8 |
<?php | |
/** | |
* San Francisco parser for State Decoded. | |
* Extends AmericanLegal base classes. | |
* | |
* PHP version 5 | |
* | |
* @license http://www.gnu.org/licenses/gpl.html GPL 3 | |
* @version 0.8 |
<?php | |
/** | |
* San Francisco parser for State Decoded. | |
* Extends AmericanLegal base classes. | |
* | |
* PHP version 5 | |
* | |
* @license http://www.gnu.org/licenses/gpl.html GPL 3 | |
* @version 0.8 |
<?php | |
/** | |
* San Francisco parser for State Decoded. | |
* Extends AmericanLegal base classes. | |
* | |
* PHP version 5 | |
* | |
* @license http://www.gnu.org/licenses/gpl.html GPL 3 | |
* @version 0.8 |
/* | |
* Patch to make console.log, console.warn, etc work in IE8 & 9 | |
*/ | |
// Default list of functions for console. | |
var logFns = ["log", "info", "warn", "error", "assert", "dir", "clear", "profile", "profileEnd"]; | |
// Define console. | |
if (typeof console == 'undefined') { | |
console = {}; |
function compareDocumentPosition(thisNode, other) { | |
function recursivelyWalk(nodes, cb) { | |
for (var i = 0, len = nodes.length; i < len; i++) { | |
var node = nodes[i]; | |
var ret = cb(node); | |
if (ret) { | |
return ret; | |
} | |
if (node.childNodes && node.childNodes.length) { | |
var ret = recursivelyWalk(node.childNodes, cb); |
/* | |
* Patch to make console.log, console.warn, etc work in IE8 & 9 | |
*/ | |
// Default list of functions for console. | |
var logFns = ["log", "info", "warn", "error", "assert", "dir", "clear", "profile", "profileEnd"]; | |
// Define console. | |
if (typeof console == 'undefined') { | |
console = {}; |