Prado\Web\TAssetManager::getBasePath PHP Méthode

getBasePath() public méthode

public getBasePath ( ) : string
Résultat string the root directory storing published asset files
    public function getBasePath()
    {
        return $this->_basePath;
    }

Usage Example

 public function testSetBasePath()
 {
     $manager = new TAssetManager();
     // First try, invalid directory
     try {
         $manager->setBasePath('invalid');
         self::fail('Expected TInvalidDataValueException not thrown');
     } catch (TInvalidDataValueException $e) {
     }
     // Next, standard asset directory, should work
     $manager->setBasePath('AssetAlias');
     self::assertEquals(self::$assetDir, $manager->getBasePath());
     // Finally, test to change after init
     $manager->init(null);
     try {
         $manager->setBasePath('test');
         self::fail('Expected TInvalidOperationException not thrown');
     } catch (TInvalidOperationException $e) {
     }
 }