PMA\libraries\ThemeManager::makeBc PHP Метод

makeBc() публичный Метод

enables backward compatibility
public makeBc ( ) : void
Результат void
    public function makeBc()
    {
        $GLOBALS['theme'] = $this->theme->getId();
        $GLOBALS['pmaThemePath'] = $this->theme->getPath();
        $GLOBALS['pmaThemeImage'] = $this->theme->getImgPath();
        /**
         * load layout file if exists
         */
        if (file_exists($this->theme->getLayoutFile())) {
            include $this->theme->getLayoutFile();
        }
    }

Usage Example

 /**
  * Test for makeBc
  *
  * @return void
  */
 public function testMakeBc()
 {
     $tm = new ThemeManager();
     $this->assertNull($tm->makeBc());
     $this->assertEquals($GLOBALS['theme'], 'pmahomme');
     $this->assertEquals($GLOBALS['pmaThemePath'], './themes/pmahomme');
     $this->assertEquals($GLOBALS['pmaThemeImage'], './themes/pmahomme/img/');
 }