Source for file OCSP_DT_COLLECTION.phpclass

Documentation is available at OCSP_DT_COLLECTION.phpclass

  1. <?php
  2. /**
  3.   * openCSP class file OCSP_DT_COLLECTION.phpclass
  4.   *
  5.   * @project Open CSP-Management
  6.   * @package datatypes
  7.   *
  8.   * @author Peter Krebs <pitlinz@users.sourceforge.net>
  9.   * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  10.   *
  11.   * @since pk-01.08.2008
  12.   * @version $Id: OCSP_DT_COLLECTION.phpclass,v 1.1 2008/08/02 01:03:29 pitlinz Exp $
  13.   */
  14.  
  15.     // ---------------------------------------------------------
  16.     // requirements
  17.     // ---------------------------------------------------------
  18.  
  19. /**
  20.   * openCSP class OCSP_DT_COLLECTION
  21.   *
  22.   * @project Open CSP-Management
  23.   * @package datatypes
  24.   *
  25.   * @author Peter Krebs <pitlinz@users.sourceforge.net>
  26.   * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  27.   *
  28.   * @since pk-01.08.2008
  29.   * @version $Id: OCSP_DT_COLLECTION.phpclass,v 1.1 2008/08/02 01:03:29 pitlinz Exp $
  30.   */
  31. {
  32.     // ---------------------------------------------------------------------------
  33.     // constants
  34.     // ---------------------------------------------------------------------------
  35.     
  36.     /**
  37.      * @constant string CLASS_SRC_FILE
  38.      */
  39.     const CLASS_SRC_FILE = __FILE__;
  40.  
  41.     // ---------------------------------------------------------------------------
  42.     // class (static)
  43.     // ---------------------------------------------------------------------------
  44.     
  45.     /*** class vars ------------------------------------------------------ */
  46.     
  47.     /*** class methods --------------------------------------------------- */
  48.     
  49.     // ---------------------------------------------------------------------------
  50.     // object vars
  51.     // ---------------------------------------------------------------------------
  52.     
  53.     /*** compostion --------------------------------------------------- */
  54.     
  55.     /**
  56.      * array of items represents the collection
  57.      *
  58.      * @var array $myItems 
  59.      */
  60.     protected $myItems = array();
  61.     
  62.     /*** attributes  -------------------------------------------------- */
  63.     
  64.     /**
  65.      * the collection id
  66.      *
  67.      * @var mixed $myId 
  68.      */
  69.     protected $myId = Null;
  70.     
  71.     // ---------------------------------------------------------------------------
  72.     // factory / construct
  73.     // ---------------------------------------------------------------------------
  74.     
  75.     // ---------------------------------------------------------------------------
  76.     // getter / setter
  77.     // ---------------------------------------------------------------------------    
  78.  
  79.     public function getNofItems()
  80.     {
  81.         return sizeof($this->myItems);
  82.     }
  83.     
  84.     // ---------------------------------------------------------------------------
  85.     // item methods
  86.     // ---------------------------------------------------------------------------    
  87.     
  88.     /**
  89.      * adds an item to the collection
  90.      *
  91.      * @param mixed $aItem 
  92.      */
  93.     public function addItem(&$aItem)
  94.     {
  95.         $this->myItems[$aItem;
  96.     }
  97.     
  98.     /**
  99.      * returns the items
  100.      *
  101.      * @return array 
  102.      */
  103.     public function getItems()
  104.     {
  105.         return $this->myItems;
  106.     }
  107.     
  108. }
  109.  
  110. ?>

Documentation generated on Thu, 08 Jan 2009 17:45:36 +0100 by phpDocumentor 1.4.0a2