/**
  * Checks the environment and returns a status value. Return value is one of STARTUP_STATUS_* defines.
  * @access public
  * @return integer
  */
 function getStatus()
 {
     debug::output("ExtensionRequirement - checking to make sure PHP loaded {$this->_extension}.", 7, "StartupCheck");
     if (!extension_loaded($this->_extension)) {
         $prefix = PHP_SHLIB_SUFFIX == 'dll' ? 'php_' : '';
         if (!@dl($prefix . $this->_extension . "." . PHP_SHLIB_SUFFIX)) {
             StartupCheck::error(dgettext("polyphony", sprintf("ExtensionRequirement - PHP extension <b>%s</b> is neither loaded nor could we load it dynamically.", $this->_extension)));
             return STARTUP_STATUS_ERROR;
         }
     }
     return STARTUP_STATUS_OK;
 }
 /**
  * Checks the environment and returns a status value. Return value is one of STARTUP_STATUS_* defines.
  * @access public
  * @return integer
  */
 function getStatus()
 {
     $harmoniVer = $this->_harmoni->getVersionNumber();
     $harmoniVerStr = $this->_harmoni->getVersionStr();
     debug::output("HarmoniVersionRequirement - checking to make sure Harmoni (currently {$harmoniVer}) is greater than " . $this->_version, 7, "StartupCheck");
     if ($this->_version <= $harmoniVer) {
         // everything's OK!
         return STARTUP_STATUS_OK;
     } else {
         // we got trouble
         StartupCheck::error(sprintf(dgettext("polyphony", "HarmoniVersionRequirement - program execution could not proceed. I must be running under the Harmoni framework version <i>%s</i> or newer. However, we detected you only have version <i>%s</i> installed."), $this->_versionStr, $harmoniVerStr));
         return STARTUP_STATUS_ERROR;
     }
 }
 /**
  * Checks the environment and returns a status value. Return value is one of STARTUP_STATUS_* defines.
  * @access public
  * @return integer
  */
 function getStatus()
 {
     debug::output("PHPConfigValueRequirement - checking config directive {$this->_key}.", 7, "StartupCheck");
     // let's check if the value is good or not
     if ($this->_opt == PHPINI_EQUAL || $this->_opt == PHPINI_BOOLEAN) {
         if (($curr = ini_get($this->_key)) === $this->_value) {
             return STARTUP_STATUS_OK;
         } else {
             StartupCheck::error(sprintf(dgettext("polyphony", "PHPConfigValueRequirement - program could not proceed: a required php.ini value is not set properly for this program. I checked the <b>%s</b> directive and got <i>%s</i> when I wanted to get <i>%s</i>."), $this->_key, $this->_opt == PHPINI_BOOLEAN ? $curr == "1" ? "true" : "false" : $curr, $this->_opt == PHPINI_BOOLEAN ? $this->_value == "1" ? "true" : "false" : $curr));
             return STARTUP_STATUS_ERROR;
         }
     } else {
         if ($this->_opt == PHPINI_GREATER) {
             $curr = ini_get($this->_key);
             if ($curr > $this->_value) {
                 return STARTUP_STATUS_OK;
             } else {
                 StartupCheck::error(sprintf(dgettext("polyphony", "PHPConfigValueRequirement - program could not proceed: a required php.ini value is not set properly for this program. I checked the <b>%s</b> directive and got <i>%s</i> when I wanted it to be greater than <i>%s</i>."), $this->_key, $this->_opt == PHPINI_BOOLEAN ? $curr == "1" ? "true" : "false" : $curr, $this->_opt == PHPINI_BOOLEAN ? $this->_value == "1" ? "true" : "false" : $curr));
                 return STARTUP_STATUS_ERROR;
             }
         } else {
             if ($this->_opt == PHPINI_LESS) {
                 $curr = ini_get($this->_key);
                 if ($curr < $this->_value) {
                     return STARTUP_STATUS_OK;
                 } else {
                     StartupCheck::error(sprintf(dgettext("polyphony", "PHPConfigValueRequirement - program could not proceed: a required php.ini value is not set properly for this program. I checked the <b>%s</b> directive and got <i>%s</i> when I wanted it to be less than <i>%s</i>."), $this->_key, $this->_opt == PHPINI_BOOLEAN ? $curr == "1" ? "true" : "false" : $curr, $this->_opt == PHPINI_BOOLEAN ? $this->_value == "1" ? "true" : "false" : $curr));
                     return STARTUP_STATUS_ERROR;
                 }
             } else {
                 // ?
             }
         }
     }
 }