Creating a new Station object

  1. <?php
  2.   // Only XML document URI
  3.   $station new Station('all-sensors.xml');
  4.  
  5.   // OR With assigned sensors
  6.   $sensors array('thb0''th0''rain0''wind0');
  7.   // OR
  8.   $sensors array(
  9.     'S_INSIDE' => 'thb0',
  10.     'S_OUTSIDE'=> 'th0'
  11.     'S_RAIN'   => 'rain0'
  12.     'S_WIND'   => 'wind0');
  13.  
  14.   $station new Station('all-sensors.xml'$sensors);
  15.  
  16.   // OR with assigned units
  17.   $units array('local''hpa''c''mm''kmh');
  18.   // OR
  19.   $units array(
  20.     'U_DATE' => 'local',
  21.     'U_PRES' => 'hpa',
  22.     'U_TEMP' => 'c',
  23.     'U_RAIN' => 'mm',
  24.     'U_WIND' => 'kmh');
  25.  
  26.   $station new Station('all-sensors.xml'$sensors$units);

Documentation generated on Mon, 17 Oct 2011 16:46:21 +0200 by phpDocumentor 1.4.3