CatalyzCheckup.php 643 B

12345678910111213141516171819202122232425
  1. <?php
  2. class CatalyzCheckup{
  3. protected $testGroups = array();
  4. function logTest($groupName, $testName, $result){
  5. $passed = '<img src="/images/catalyz/accept.png"/>';
  6. $failed = '<img src="/images/catalyz/error.png"/>';
  7. $this->testGroups[$groupName][$testName] = $result?$passed:$failed;
  8. }
  9. function execute(){
  10. $this->CheckDefinedSettings('app_site_url');
  11. $this->CheckDefinedSettings('app_static_url');
  12. return $this->testGroups;
  13. }
  14. public function CheckDefinedSettings($key)
  15. {
  16. $this->logTest('Configuration', sprintf('Settings "%s" is defined', $key), (sfConfig::get($key, null) !== null));
  17. }
  18. }
  19. ?>