BrowscapPHP\Formatter\PhpGetBrowser::setData PHP Method

setData() public method

Sets the data (done by the parser)
public setData ( array $settings ) : PhpGetBrowser
$settings array
return PhpGetBrowser
    public function setData(array $settings)
    {
        foreach ($settings as $key => $value) {
            $this->settings[strtolower($key)] = $value;
        }
        return $this;
    }

Usage Example

 /**
  *
  */
 public function testSetGetData()
 {
     $data = array('Browser' => 'test', 'Comment' => 'TestComment');
     self::assertSame($this->object, $this->object->setData($data));
     $return = $this->object->getData();
     self::assertInstanceOf('\\stdClass', $return);
     self::assertSame('test', $return->browser);
     self::assertSame('TestComment', $return->comment);
 }
All Usage Examples Of BrowscapPHP\Formatter\PhpGetBrowser::setData
PhpGetBrowser