loadInfo() public méthode

Loads theme information
public loadInfo ( ) : boolean
Résultat boolean whether loading them info was successful or not
Exemple #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());
 }
Exemple #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;
 }