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

Class: TeraWurflLoader

Source Location: /TeraWurflUtils/TeraWurflLoader.php

Class Overview


Loads the WURFL file from a local file or remote URL into the Tera-WURFL database.


Variables

Methods



Class Details

[line 26]
Loads the WURFL file from a local file or remote URL into the Tera-WURFL database.



[ Top ]


Class Variables

static $PRESERVE_CACHE =  true

[line 43]



Tags:

var:  Reload existing cache during rebuild
access:  public

Type:   bool


[ Top ]

static $TEMP_PREFIX =  '_TMPLOAD_'

[line 47]



Tags:

var:  Temp prefix for loading data
access:  public

Type:   string


[ Top ]

static $WURFL_LOCAL =  "local"

[line 31]



Tags:

var:  WURFL Type Flag
access:  public

Type:   string


[ Top ]

static $WURFL_PATCH =  "patch"

[line 39]



Tags:

var:  WURFL Type Flag
access:  public

Type:   string


[ Top ]

static $WURFL_REMOTE =  "remote"

[line 35]



Tags:

var:  WURFL Type Flag
access:  public

Type:   string


[ Top ]

$devices =

[line 78]



Tags:

var:  Array of devices to be loaded
access:  protected

Type:   array


[ Top ]

$errors =

[line 53]



Tags:

var:  Errors encountered during load
access:  public

Type:   array


[ Top ]

$file =

[line 70]



Tags:

var:  Filename of wurfl.xml
access:  protected

Type:   string


[ Top ]

$last_updated =

[line 61]



Tags:

var:  Last updated string tom wurfl.xml
access:  public

Type:   string


[ Top ]

$mainDevices =  0

[line 98]



Tags:

var:  Count of devices
access:  public

Type:   int


[ Top ]

$parser =

[line 86]



Tags:

var:  XML Parser
access:  protected

Type:   TeraWurflXMLParser


[ Top ]

$patchAddedDevices =  0

[line 102]



Tags:

var:  Count of added devices in patch
access:  public

Type:   int


[ Top ]

$patchMergedDevices =  0

[line 106]



Tags:

var:  Count of merged devices in patch
access:  public

Type:   int


[ Top ]

$table =

[line 66]



Tags:

var:  Table name
access:  protected

Type:   string


[ Top ]

$tables =

[line 82]



Tags:

var:  Array of tables to be used
access:  protected

Type:   array


[ Top ]

$table_prefix =

[line 90]



Tags:

var:  Table prefix
access:  protected

Type:   string


[ Top ]

$temp_table_prefix =

[line 94]



Tags:

var:  Temp Table Prefix
access:  protected

Type:   string


[ Top ]

$timecache =

[line 116]



Tags:

var:  Performance tracking variable
access:  protected

Type:   int


[ Top ]

$timedatabase =

[line 115]



Tags:

var:  Performance tracking variable
access:  protected

Type:   int


[ Top ]

$timeend =

[line 117]



Tags:

var:  Performance tracking variable
access:  protected

Type:   int


[ Top ]

$timepatch =

[line 114]



Tags:

var:  Performance tracking variable
access:  protected

Type:   int


[ Top ]

$timesort =

[line 113]



Tags:

var:  Performance tracking variable
access:  protected

Type:   int


[ Top ]

$timestart =

[line 111]



Tags:

var:  Performance tracking variable
access:  protected

Type:   int


[ Top ]

$timevalidate =

[line 112]



Tags:

var:  Performance tracking variable
access:  protected

Type:   int


[ Top ]

$version =

[line 57]



Tags:

var:  Version string from wurfl.xml
access:  public

Type:   string


[ Top ]

$wurfl =

[line 74]



Tags:

var:  Instance of TeraWurfl
access:  protected

Type:   TeraWurfl


[ Top ]



Class Methods


constructor __construct [line 125]

TeraWurflLoader __construct( TeraWurfl &$wurfl, TeraWurfl $wurfl)

Instantiates a new TeraWurflLoader



Tags:

access:  public


Parameters:

TeraWurfl   $wurfl  
TeraWurfl   &$wurfl  

[ Top ]

method cacheRebuildTime [line 353]

int cacheRebuildTime( )

Get performance information



Tags:

return:  Duration in seconds
access:  public


[ Top ]

method databaseTime [line 350]

int databaseTime( )

Get performance information



Tags:

return:  Duration in seconds
access:  public


[ Top ]

method disableTempPrefix [line 368]

void disableTempPrefix( )

Disables the Temp table prefix



Tags:

access:  protected


[ Top ]

method enableTempPrefix [line 361]

void enableTempPrefix( )

Enables the Temp table prefix



Tags:

access:  protected


[ Top ]

method getParserName [line 327]

string getParserName( )



Tags:

return:  Class name of XML Parser in use
access:  public


[ Top ]

method load [line 143]

bool load( )

Loads the WURFL and patch files into the database



Tags:

return:  Success
access:  public


[ Top ]

method loadIntoDB [line 273]

bool loadIntoDB( )

Loads the WURFL devices into the database.



Tags:

return:  Completed without error
access:  public


[ Top ]

method loadPatches [line 286]

bool loadPatches( )

Loads the patch files from TeraWurflConfig::PATCH_FILE



Tags:

return:  Success
access:  public


[ Top ]

method parseTime [line 338]

int parseTime( )

Get performance information



Tags:

return:  Duration in seconds
access:  public


[ Top ]

method patchTime [line 341]

int patchTime( )

Get performance information



Tags:

return:  Duration in seconds
access:  public


[ Top ]

method sort [line 253]

bool sort( )

Sorts the validated data from $this->devices into their respective UserAgentMatcher tables ($this->tables)

based on the UserAgentMatcher that matches the device's user agent




Tags:

return:  Success
access:  public


[ Top ]

method sortTime [line 347]

int sortTime( )

Get performance information



Tags:

return:  Duration in seconds
access:  public


[ Top ]

method totalLoadTime [line 335]

int totalLoadTime( )

Get performance information



Tags:

return:  Duration in seconds
access:  public


[ Top ]

method validate [line 191]

bool validate( )

Validates the data from the WURFL file or Patch file



Tags:

return:  Valid
access:  public


[ Top ]

method validateTime [line 344]

int validateTime( )

Get performance information



Tags:

return:  Duration in seconds
access:  public


[ Top ]

method validID [line 377]

bool validID( string $id)

Is WURFL Device ID Valid?



Tags:

access:  protected


Parameters:

string   $id   WURFL ID

[ Top ]


Documentation generated on Thu, 03 Oct 2013 15:19:20 -0400 by phpDocumentor 1.4.4