TeraWurflUtils
[ class tree: TeraWurflUtils ] [ index: TeraWurflUtils ] [ all elements ]

Class: TeraWurflDeviceImage

Source Location: /TeraWurflUtils/TeraWurflDeviceImage.php

Class Overview


Finds an image for devices detected with Tera-WURFL


Variables

Methods



Class Details

[line 20]
Finds an image for devices detected with Tera-WURFL



[ Top ]


Class Variables

$baseURL =

[line 22]



Tags:

access:  protected

Type:   mixed


[ Top ]

$descend =  true

[line 28]



Tags:

access:  protected

Type:   mixed


[ Top ]

$deviceID =

[line 25]



Tags:

access:  protected

Type:   mixed


[ Top ]

$image =

[line 27]



Tags:

access:  protected

Type:   mixed


[ Top ]

$imageExt =  '.gif'

[line 26]



Tags:

access:  protected

Type:   mixed


[ Top ]

$imagesDirectory =

[line 23]



Tags:

access:  protected

Type:   mixed


[ Top ]

$wurfl =

[line 24]



Tags:

access:  protected

Type:   mixed


[ Top ]



Class Methods


constructor __construct [line 35]

void __construct( TeraWurfl &$wurfl)

Creates a new TeraWurflDeviceImage



Tags:

access:  public


Parameters:

TeraWurfl   &$wurfl   The instance of TeraWurfl (or TeraWurflRemoteClient) that detected the device

[ Top ]

method getImage [line 63]

string getImage( )

If you set the BaseURL, returns the path and filename of the device image (http://domain.com/device_pix/apple_iphone_ver1.gif),

otherwise returns only the filename (apple_iphone_ver1.gif)




Tags:

return:  Device image filename
access:  public


[ Top ]

method imageExists [line 117]

bool imageExists( string $deviceID)

Check if a device image exists for the given deviceID



Tags:

return:  Device image exists
access:  protected


Parameters:

string   $deviceID   Device ID (WURFL ID)

[ Top ]

method setBaseURL [line 47]

void setBaseURL( string $baseURL)

Sets the base URL of the device images Must end with "/".



Tags:

access:  public


Parameters:

string   $baseURL   Web-accessible location of the device images (e.g. "http://domain.com/device_pix/" or "../device_pix/")

[ Top ]

method setDescendToFindImage [line 73]

void setDescendToFindImage( bool $descend)

Set to false to prevent the image searching function from looking through the device's parent devices to find a very similar device image if the exact device image is not found.



Tags:

access:  public


Parameters:

bool   $descend   false prevents using the device image from a different version of the device

[ Top ]

method setImage [line 80]

void setImage( )

Sets the internal $this->image var with the complete path to the device image



Tags:

access:  protected


[ Top ]

method setImagesDirectory [line 55]

void setImagesDirectory( string $dir)

Sets the local directoy of the device images on the filesystem



Tags:

access:  public


Parameters:

string   $dir   Local filesystem directory where the device images are located (e.g. "C:/device_pix/" or "../../device_pix/")

[ Top ]

method __toString [line 120]

void __toString( )



Tags:

access:  public


[ Top ]


Documentation generated on Sun, 19 Sep 2010 00:16:02 +0000 by phpDocumentor 1.4.3