Overview

Namespaces

  • Alpha
    • Controller
      • Front
    • Exception
    • Model
      • Type
    • Task
    • Util
      • Backup
      • Cache
      • Code
        • Highlight
        • Metric
      • Config
      • Convertor
      • Email
      • Extension
      • Feed
      • File
      • Graph
      • Helper
      • Http
        • Filter
        • Session
      • Image
      • Logging
      • Search
      • Security
    • View
      • Renderer
        • Html
        • Json
      • Widget

Classes

  • ActionLog
  • ActiveRecord
  • ActiveRecordProviderFactory
  • ActiveRecordProviderMySQL
  • ActiveRecordProviderSQLite
  • Article
  • ArticleComment
  • ArticleVote
  • BadRequest
  • BlacklistedClient
  • BlacklistedIP
  • Person
  • Rights
  • Tag

Interfaces

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