setPath() public method

set path to theme
public setPath ( string $path ) : void
$path string path to theme
return void
Example #1
0
 /**
  * Test for Theme::getPath
  *
  * @return void
  */
 public function testGetSetPath()
 {
     $this->assertEmpty($this->object->getPath());
     $this->object->setPath('./themes/original');
     $this->assertEquals('./themes/original', $this->object->getPath());
 }
Example #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;
 }