Beispiel #1
0
 /**
 		Class constructor
 			@param $boot bool
 			@public
 	**/
 function __construct($boot = FALSE)
 {
     if ($boot) {
         F3::start();
     }
     // Allow application to override framework methods?
     if (F3::ref('EXTEND')) {
         // User assumes risk
         return;
     }
     // Get all framework methods not defined in this class
     $def = array_diff(get_class_methods('F3'), get_class_methods(__CLASS__));
     // Check for conflicts
     $class = new ReflectionClass($this);
     foreach ($class->getMethods() as $func) {
         if (in_array($func->name, $def)) {
             trigger_error(sprintf(self::TEXT_Conflict, get_called_class() . '->' . $func->name));
         }
     }
 }
Beispiel #2
0
            if (!$_flag) {
                // Call pre-order handler for specified node type
                if (is_null($_type) || $_node->nodeType == $_type) {
                    call_user_func($_pre);
                }
                if ($_node->firstChild) {
                    // Descend to branch
                    $_node = $_node->firstChild;
                    continue;
                }
            }
            if ($_node->isSameNode($_root)) {
                // Root node reached; Exit loop
                break;
            }
            // Post-order sequence
            if ($_node->nextSibling) {
                // Stay on same level
                $_flag = FALSE;
                $_node = $_node->nextSibling;
            } else {
                // Ascend to parent node
                $_flag = TRUE;
                $_node = $_node->parentNode;
            }
        }
    }
}
// Quietly initialize the framework
F3::start();