+ return array($this->hook, $matched, $remain, $aliased);
+ }
+
+ public function findNearestChild(array $path)
+ {
+ return $this->findNearestChildAux($path, array(), array());
+ }
+}
+
+abstract class Platal
+{
+ private $mods;
+ private $hooks;
+
+ protected $https;
+
+ public $ns;
+ public $path;
+ public $argv = array();
+
+ static private $_page = null;
+
+ public function __construct()
+ {
+ global $platal, $session, $globals;
+ $platal = $this;
+
+ /* Assign globals first, then call init: init must be used for operations
+ * that requires access to the content of $globals (e.g. XDB requires
+ * $globals to be assigned.
+ */
+ $globals = $this->buildGlobals();
+ $globals->init();
+
+ /* Get the current session: assign first, then activate the session.
+ */
+ $session = $this->buildSession();
+ if (!$session->startAvailableAuth()) {
+ Platal::page()->trigError("Données d'authentification invalides.");
+ }
+
+ $modules = func_get_args();
+ if (isset($modules[0]) && is_array($modules[0])) {
+ $modules = $modules[0];