BrowscapPHP\Helper\IniLoader::setRemoteFilename PHP Method

setRemoteFilename() public method

sets the name of the local ini file
public setRemoteFilename ( string $name = null ) : IniLoader
$name string the file name
return IniLoader
    public function setRemoteFilename($name = null)
    {
        if (empty($name)) {
            throw new Exception('the filename can not be empty', Exception::INI_FILE_MISSING);
        }
        $this->remoteFilename = $name;
        return $this;
    }

Usage Example

Example #1
0
 /**
  *
  */
 public function testGetRemoteIniUrl()
 {
     $this->object->setRemoteFilename(IniLoader::PHP_INI_LITE);
     self::assertSame('http://browscap.org/stream?q=Lite_PHP_BrowscapINI', $this->object->getRemoteIniUrl());
     $this->object->setRemoteFilename(IniLoader::PHP_INI);
     self::assertSame('http://browscap.org/stream?q=PHP_BrowscapINI', $this->object->getRemoteIniUrl());
     $this->object->setRemoteFilename(IniLoader::PHP_INI_FULL);
     self::assertSame('http://browscap.org/stream?q=Full_PHP_BrowscapINI', $this->object->getRemoteIniUrl());
 }