/**
  * @inheritdoc
  *
  * @param SS_HTTPRequest $request
  * @param SS_HTTPResponse $response
  * @param DataModel $model
  *
  * @return bool
  */
 public function postRequest(SS_HTTPRequest $request, SS_HTTPResponse $response, DataModel $model)
 {
     $mime = $response->getHeader("Content-Type");
     if (!$mime || strpos($mime, "text/html") !== false) {
         $tags = $this->tagProvider->forTemplate();
         if ($tags && !static::$installed) {
             $content = $response->getBody();
             $content = preg_replace("/(<\\/head[^>]*>)/i", $tags . "\\1", $content);
             $response->setBody($content);
             static::$installed = true;
         }
     }
 }
 /**
  * Get associative array of installed module name and their path.
  *
  * @return arrays
  */
 public static function get_installed()
 {
     if (static::$installed) {
         return static::$installed;
     }
     $data = array();
     foreach (static::$paths as $path) {
         $files = new \FileSystemIterator($path);
         foreach ($files as $file) {
             $data[$file->getFileName()] = $file->getRealPath();
         }
     }
     return static::$installed = $data;
 }