Skip to content

Commit

Permalink
feat(device): Add device detection functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
unicodeveloper committed Jan 19, 2016
1 parent d3cde8e commit 926dca4
Showing 1 changed file with 32 additions and 13 deletions.
45 changes: 32 additions & 13 deletions src/Identify.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,30 @@

namespace Unicodeveloper\Identify;

use Sinergi\BrowserDetector\Browser;
use Sinergi\BrowserDetector\Os;
use Sinergi\BrowserDetector\Device;
use Sinergi\BrowserDetector\Browser;
use Sinergi\BrowserDetector\Language;

class Identify {

/**
* Store the browser object
* Store the os object
* @var object
*/
protected $browser;
protected $os;

/**
* Store the os object
* Store the device object
* @var object
*/
protected $os;
protected $device;

/**
* Store the browser object
* @var object
*/
protected $browser;

/**
* Store the language object
Expand All @@ -32,28 +39,40 @@ class Identify {
public function __construct()
{
$this->os = new Os();
$this->device = new Device();
$this->browser = new Browser();
$this->language = new Language();

}

/**
* Get all the methods applicable to browser detection
* Get all the methods applicable to Os detection
* e.g getName(), getVersion()
* @return \Sinergi\BrowserDetector\Browser
* @return \Sinergi\BrowserDetector\Os
*/
public function browser()
public function os()
{
return $this->browser;
return $this->os;
}

/**
* Get all the methods applicable to Os detection
* Get all the methods applicable to Device detection
* e.g getName()
* @return \Sinergi\BrowserDetector\Device
*/
public function device()
{
return $this->device;
}

/**
* Get all the methods applicable to Browser detection
* e.g getName(), getVersion()
* @return \Sinergi\BrowserDetector\Os
* @return \Sinergi\BrowserDetector\Browser
*/
public function os()
public function browser()
{
return $this->os;
return $this->browser;
}

/**
Expand Down

0 comments on commit 926dca4

Please sign in to comment.