/**
  * Builds everything, initiated from ant
  */
 public static function build()
 {
     echo "\nStarting build " . ModulaiseController::$buildTag . "\n--------------------------------------------------------------------------------\n\n";
     // time the build
     $timeparts = explode(' ', microtime());
     $starttime = $timeparts[1] . substr($timeparts[0], 1);
     $timeparts = explode(' ', microtime());
     // build the pages
     ModulaiseBuild::buildPages();
     // build css and javascript
     ModulaiseBuild::buildCompiled();
     // show total time elapsed
     $endtime = $timeparts[1] . substr($timeparts[0], 1);
     echo "\nBuild completed\n--------------------------------------------------------------------------------\nBuild script time       : " . bcsub($endtime, $starttime, 6) . " seconds\n\n";
 }
 /**
  * Initiates index action
  */
 public static function indexAction()
 {
     switch (isset($_REQUEST["action"]) ? $_REQUEST["action"] : "") {
         case "build":
             // Builds the page
             require_once "modulaise-build.php";
             ModulaiseBuild::build();
             break;
         case "getAntProperties":
             // Get ant properties
             require_once "modulaise-get-ant-properties.php";
             AntPropertiesWriter::getAntProperties();
             break;
         case "printPane":
             $debug = false;
             // If we are going to show export pane
             if (isset($_REQUEST["buildMode"]) && $_REQUEST["buildMode"] == "SHOW_EXPORT") {
                 self::$buildMode = SHOW_EXPORT;
             }
             // create a dummy page
             self::createPage("nullstring", "nullstring");
             $paneName = $_REQUEST["pane"];
             if ($debug) {
                 $panes = self::getPaneNames();
                 foreach ($panes as $key => $value) {
                     echo $key . "=" . $value . "\n";
                 }
                 $paneHasContent = self::paneHasContent($paneName);
                 echo "pane has content = '" . (true === $paneHasContent) . "'\n";
             }
             // if the requested pane has content print it - otherwise print a no content comment
             self::printPane($_REQUEST["pane"]);
             break;
         default:
             // Prints the index page
             require_once "modulaise-index-page.php";
             ModulaiseIndexPage::printPage();
             break;
     }
 }