Alpha Framework alpha--model
[ class tree: alpha--model ] [ index: alpha--model ] [ all elements ]

Source for file BlacklistedClientObject.inc

Documentation is available at BlacklistedClientObject.inc

  1. <?php
  2.  
  3. require_once $config->get('sysRoot').'alpha/model/AlphaDAO.inc';
  4.  
  5. /**
  6.  *
  7.  * A HTTP client that is blacklisted from accessing this application
  8.  * 
  9.  * @package alpha::model
  10.  * @since 1.0
  11.  * @author John Collins <dev@alphaframework.org>
  12.  * @version $Id: BlacklistedClientObject.inc 1341 2011-03-17 15:02:02Z johnc $
  13.  * @license http://www.opensource.org/licenses/bsd-license.php The BSD License
  14.  * @copyright Copyright (c) 2011, John Collins (founder of Alpha Framework).
  15.  *  All rights reserved.
  16.  * 
  17.  *  <pre>
  18.  *  Redistribution and use in source and binary forms, with or
  19.  *  without modification, are permitted provided that the
  20.  *  following conditions are met:
  21.  * 
  22.  *  * Redistributions of source code must retain the above
  23.  *    copyright notice, this list of conditions and the
  24.  *    following disclaimer.
  25.  *  * Redistributions in binary form must reproduce the above
  26.  *    copyright notice, this list of conditions and the
  27.  *    following disclaimer in the documentation and/or other
  28.  *    materials provided with the distribution.
  29.  *  * Neither the name of the Alpha Framework nor the names
  30.  *    of its contributors may be used to endorse or promote
  31.  *    products derived from this software without specific
  32.  *    prior written permission.
  33.  *   
  34.  *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
  35.  *  CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
  36.  *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  37.  *  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  38.  *  DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
  39.  *  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  40.  *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
  41.  *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  42.  *  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  43.  *  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  44.  *  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
  45.  *  OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  46.  *  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  47.  *  </pre>
  48.  *  
  49.  */
  50. class BlacklistedClientObject extends AlphaDAO {
  51.     /**
  52.      * The (unique) client string this is blocked
  53.      * 
  54.      * @var String 
  55.      * @since 1.0
  56.      */
  57.     protected $client;
  58.     
  59.     /**
  60.      * An array of data display labels for the class properties
  61.      * 
  62.      * @var array 
  63.      * @since 1.0
  64.      */
  65.     protected $dataLabels = array('OID'=>'Blacklisted Client ID#','client'=>'Client string');
  66.     
  67.     /**
  68.      * The name of the database table for the class
  69.      * 
  70.      * @var string 
  71.      * @since 1.0
  72.      */
  73.     const TABLE_NAME = 'BlacklistedClient';
  74.     
  75.     /**
  76.      * Constructor for the class
  77.      * 
  78.      * @since 1.0
  79.      */
  80.     public function __construct({
  81.         // ensure to call the parent constructor
  82.         parent::__construct();
  83.         
  84.         $this->client = new String();
  85.         $this->markUnique('client');
  86.     }
  87. }
  88.  
  89. ?>

Documentation generated on Thu, 17 Mar 2011 16:43:54 +0000 by phpDocumentor 1.4.3