Browscap\Writer\WriterInterface::getType PHP Method

getType() public method

returns the Type of the writer
public getType ( ) : string
return string
    public function getType();

Usage Example

 /**
  * Determine if the specified property is an "extra" property (that should
  * be included in the "full" versions of the files)
  *
  * @param string $propertyName
  * @param \Browscap\Writer\WriterInterface $writer
  * @return boolean
  */
 public function isOutputProperty($propertyName, WriterInterface $writer = null)
 {
     $outputProperties = array('Comment' => 1, 'Browser' => 1, 'Browser_Maker' => 1, 'Browser_Modus' => 1, 'Platform' => 1, 'Platform_Name' => 1, 'Platform_Description' => 1, 'Device_Name' => 1, 'Platform_Maker' => 1, 'Device_Code_Name' => 1, 'Device_Maker' => 1, 'Device_Brand_Name' => 1, 'RenderingEngine_Name' => 1, 'RenderingEngine_Description' => 1, 'RenderingEngine_Maker' => 1, 'Parent' => 1, 'Browser_Type' => 1, 'Device_Type' => 1, 'Device_Pointing_Method' => 1, 'Browser_Bits' => 1, 'Platform_Bits' => 1, 'Platform_Version' => 1, 'RenderingEngine_Version' => 1, 'Version' => 1, 'CssVersion' => 1, 'AolVersion' => 1, 'MajorVer' => 1, 'MinorVer' => 1, 'Alpha' => 1, 'Beta' => 1, 'Win16' => 1, 'Win32' => 1, 'Win64' => 1, 'Frames' => 1, 'IFrames' => 1, 'Tables' => 1, 'Cookies' => 1, 'BackgroundSounds' => 1, 'JavaScript' => 1, 'VBScript' => 1, 'JavaApplets' => 1, 'ActiveXControls' => 1, 'isMobileDevice' => 1, 'isTablet' => 1, 'isSyndicationReader' => 1, 'Crawler' => 1);
     if (isset($outputProperties[$propertyName])) {
         return true;
     }
     if (null !== $writer && in_array($writer->getType(), array('csv', 'xml'))) {
         $additionalProperties = array('PropertyName', 'MasterParent', 'LiteMode');
         if (in_array($propertyName, $additionalProperties)) {
             return true;
         }
     }
     return false;
 }