Esempio n. 1
0
 /**
  * Set module
  *
  * @param string $value The module.
  */
 private function setModule($value)
 {
     $modules = (array) FrontendModel::getModules();
     if (!in_array((string) $value, $modules)) {
         // when debug is on throw an exception
         if (SPOON_DEBUG) {
             throw new FrontendException('Invalid module.');
         } else {
             exit(SPOON_DEBUG_MESSAGE);
         }
     }
     $this->module = (string) $value;
 }