for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* @author Sergey Nehaenko <[email protected]>
* @license GPL
* @copyright Sergey Nehaenko © 2016
* @version 2.0
* @project browser-detector
*/
namespace EndorphinStudio\Detector;
class Data
{
* @var string Name
public $Name = 'N\A';
/** @var string Type */
public $Type = 'N\A';
* Data constructor.
* @param \SimpleXMLElement $xmlData Xml data from file
public function __construct($xmlData)
if($xmlData != null)
foreach ($xmlData->children() as $child) {
switch ($child->getName()) {
case 'name':
$this->Name = $child->__toString();
break;
case 'type':
$this->Type = $child->__toString();
}