예제 #1
0
 public function getIndex()
 {
     $browser = new Browser();
     $os = new Os();
     $isMac = $os->getName() === Os::OSX;
     // We going to be optimistic and assume that browsers support pasting unless we know they don't
     $browserName = $browser->getName();
     $crapBrowsers = [];
     $canPaste = !$os->isMobile() && !in_array($browserName, $crapBrowsers);
     return View::make('uploader.index', ['isMac' => $isMac, 'canPaste' => $canPaste]);
 }
 /**
  *
  * @param Model\UserAgent        $device
  * @param BrowserDetector\Os     $osRaw
  * @param BrowserDetector\Device $deviceRaw
  */
 private function hydrateDevice(Model\Device $device, BrowserDetector\Os $osRaw, BrowserDetector\Device $deviceRaw)
 {
     $device->setModel($this->getRealResult($deviceRaw->getName(), 'device', 'model'));
     if ($osRaw->isMobile() === true) {
         $device->setIsMobile(true);
     }
 }