Source for file Klass.php

Documentation is available at Klass.php

  1. <?php
  2. /**
  3.  * Model for handling queries with database table 'klass'.
  4.  * 
  5.  * @author Margus Sellin <margus@bitweb.ee>
  6.  * @copyright Copyright (C) 2011. All rights reserved. Margus Sellin
  7.  * @package Model
  8.  * @project olymp
  9.  * 
  10.  */
  11.     class Model_Klass extends Zend_Db_Table_Abstract {
  12.         /**
  13.          * Database table name
  14.          * @access protected
  15.          * @var string 
  16.          */
  17.         protected $_name = 'klass';
  18.         
  19.         /**
  20.          * Query fetchByName.
  21.          * Database query that fetches a row from 'klass' table where
  22.          * column 'number' equals the given parameter.
  23.          * 
  24.          * @access public
  25.          * @param string $nr Class number
  26.          * @return mixed $result Query resultset
  27.          */
  28.         public function fetchByName($nr)
  29.         {
  30.             $select $this->select();
  31.             $select->from($this)
  32.                     ->where('number = ?'$nr);
  33.             $result $this->fetchRow($select);
  34.             return $result;
  35.         }
  36.     }
  37. ?>

Documentation generated on Mon, 20 Jun 2011 05:43:05 +0300 by phpDocumentor 1.4.1