Example #1
0
 /**
  * Prepares the component, for instance by initiating its CreateRoutes method
  *
  * @final
  * @access public
  * @param Router $Router
  * @uses Component::GetName
  * @uses Component::GetDirectory
  * @uses Component::CreateRoutes
  * @return void
  */
 public final function Initialize(&$Router)
 {
     /* ------------------------------------------------------------------------------------------------------
           CREATE ROUTES
        ------------------------------------------------------------------------------------------------------ */
     if ($Router) {
         // We have to reset request type, etc.
         $Router->Reset();
         // Register this component as the active component in the router
         $Router->Component($this->GetName(), $this->GetDirectory());
         // Invoke the route creation
         $this->CreateRoutes($Router);
     }
 }