Webiny\Component\TwitterOAuth\Bridge\TwitterOAuth::setLibrary PHP Метод

setLibrary() публичный статический Метод

Change the default library used for the driver.
public static setLibrary ( string $pathToClass )
$pathToClass string Path to the new bridge class. The class must implement \Webiny\Component\TwitterOAuth\Bridge\TwitterOAuthInterface.
    public static function setLibrary($pathToClass)
    {
        self::$library = $pathToClass;
    }

Usage Example

Пример #1
0
 public function testGetInstance()
 {
     TwitterOAuth::setConfig(realpath(__DIR__ . '/ExampleConfig.yaml'));
     Request::getInstance()->setCurrentUrl('http://admin.w3.com/batman-is-better-than-superman/?batman=one&superman=two');
     // other tests might change the library, which can cause this test to fail
     Bridge::setLibrary('\\Webiny\\Component\\TwitterOAuth\\Bridge\\League\\TwitterOAuth');
     $instance = TwitterOAuthLoader::getInstance('MyTwitterApp');
     $this->assertInstanceOf('\\Webiny\\Component\\TwitterOAuth\\TwitterOAuth', $instance);
 }
All Usage Examples Of Webiny\Component\TwitterOAuth\Bridge\TwitterOAuth::setLibrary