loadInfo() public method

Loads theme information
public loadInfo ( ) : boolean
return boolean whether loading them info was successful or not
Beispiel #1
0
 /**
  * Test for Theme::loadInfo
  *
  * @return void
  */
 public function testLoadInfo()
 {
     $this->object->setPath('./themes/original');
     $infofile = $this->object->getPath() . '/info.inc.php';
     $this->assertTrue($this->object->loadInfo());
     $this->assertEquals(filemtime($infofile), $this->object->mtime_info);
     $this->object->setPath('./themes/original');
     $this->object->mtime_info = filemtime($infofile);
     $this->assertTrue($this->object->loadInfo());
     $this->assertEquals('Original', $this->object->getName());
 }
Beispiel #2
0
 /**
  * returns theme object loaded from given folder
  * or false if theme is invalid
  *
  * @param string $folder path to theme
  *
  * @return Theme|false
  * @static
  * @access public
  */
 public static function load($folder)
 {
     $theme = new Theme();
     $theme->setPath($folder);
     if (!$theme->loadInfo()) {
         return false;
     }
     $theme->checkImgPath();
     return $theme;
 }