Interface DeviceInterface

Class Device A representation of a device

Direct known implementers

Concrete\Core\Device\Device

Namespace: Concrete\Core\Device
Package: Concrete\Core\Device
Located at src/Device/DeviceInterface.php

Methods summary

public string
# getHandle( )

Get the device handle

public string
# getName( )

Get the device name

public string
# getBrand( )

Get the device brand

public string
# getUserAgent( )

Get the device user agent

public integer
# getWidth( )

Get the screen width of the device in pixels Be sure to adjust this by the device pixel ratio

public integer
# getHeight( )

Get the screen height of the device in pixels Be sure to adjust this by the device pixel ratio

public integer
# getType( )

Get the devices type this is an int that maps to a constant on this class, UNKNOWN MOBILE TABLET or DESKTOP If testing against a device and not against "UNKNOWN", do not test this directly against a device type, instead use bitwise AND to test for the enum you'd like to test:

public integer
# getPixelRatio( )

Get the device pixel ratio

public string
# getViewportHTML( )

Get the HTML for this device's viewport

public string
# getIconClass( )

Get the class to be used for this device's icon

public boolean
# isMobile( )
public boolean
# isTablet( )
public boolean
# isDesktop( )
public string
# getDefaultOrientation( )

Get the device's default orientation

public static static
# configConstructor( $handle, array $config )

Construct from given configuration

Constants summary

integer UNKNOWN

Device type constants, combine them like so:

# 0
integer MOBILE
# 1
integer TABLET
# 2
integer DESKTOP
# 4