Source for file weatherForecast.php

Documentation is available at weatherForecast.php

  1. <?php
  2. /* SVN FILE: $Id: weatherForecast.php 9 2009-10-13 13:20:24Z Chris $ */
  3. /**
  4.  * Weather forecast view
  5.  *
  6.  * @filesource
  7.  * @copyright    Copyright 2008 PBM Web Development - All Rights Reserved
  8.  * @package      weatherForecast
  9.  * @subpackage   weatherForecast.views
  10.  * @since        V1.0.0
  11.  * @version      $Revision: 9 $
  12.  * @modifiedby   $LastChangedBy: Chris $
  13.  * @lastmodified $Date: 2009-10-13 14:20:24 +0100 (Tue, 13 Oct 2009) $
  14.  * @license      http://www.opensource.org/licenses/bsd-license.php The BSD License
  15.  */
  16.  
  17.   $caption $forecast->location->name CHtml::tag('abbr'array('class' => 'geo''title' => $forecast->location->lat ';' $forecast->location->long)''' Forecast';
  18.  
  19.   $thead $tbody array();
  20.   $thead[0]['&nbsp;';
  21.   $tbody[0]['&nbsp;';
  22.   $tbody[1]['&nbsp;';
  23.   $tbody[2][array(Yii::t('weatherForecast''Temp')'htmlOptions' => array('scope' => 'row'));
  24.   $tbody[3][array(Yii::t('weatherForecast''Wind')'htmlOptions' => array('scope' => 'row'));
  25.   $tbody[4][array(Yii::t('weatherForecast''Pressure')'htmlOptions' => array('scope' => 'row'));
  26.   $tbody[0]['htmlOptions'array('class' => 'icons');
  27.   $tbody[1]['htmlOptions'array('class' => 'description');
  28.   $tbody[2]['htmlOptions'array('class' => 'temperature');
  29.   $tbody[3]['htmlOptions'array('class' => 'wind');
  30.   $tbody[4]['htmlOptions'array('class' => 'pressure');
  31.  
  32.   foreach ($forecast->days as $key => $day{
  33.     $thead[0][array($key == Yii::t('weatherForecast''Current Conditions'$day->date'htmlOptions' => array('scope' => 'col'));
  34.     $tbody[0][CHtml::image($day->symbol'');
  35.     $tbody[1][Yii::t('weatherForecast'$day->description);
  36.     $tbody[2][$key == ?
  37.       $day->temperature->value '&#176;' $day->temperature->units :
  38.       Yii::t('weatherForecast''High'':' $day->maxTemperature->value '&#176;' $day->maxTemperature->units '<br/>' .
  39.       Yii::t('weatherForecast''Low')  ':' $day->minTemperature->value '&#176;'   $day->minTemperature->units;
  40.     $tbody[3][$day->windDirection->value $day->windDirection->units  ', ' $day->windSpeed->value $day->windSpeed->units;
  41.     $tbody[4][$day->pressure->value $day->pressure->units ($key == ', ' $day->pressureTrend '');
  42.   // foreach
  43.  
  44.   $tfoot[0][array(Yii::t('weatherForecast''Issued'": {$forecast->issued}"'htmlOptions' => array('colspan' => $forecast->days->count + 1));
  45.   $tfoot[1][array(Yii::t('weatherForecast''Data provided by '$forecast->provider'htmlOptions' => array('colspan' => $forecast->days->count + 1));
  46.  
  47.   echo $this->renderTable(compact('caption''thead''tbody''tfoot')array('class'=>'weather-forecast'));
  48. ?>

Documentation generated on Tue, 13 Oct 2009 14:44:48 +0100 by phpDocumentor 1.4.2