Overview

Packages

  • alpha::controller
  • alpha::controller::front
  • alpha::exceptions
  • alpha::model
  • alpha::model::types
  • alpha::tasks
  • alpha::tests
  • alpha::util
  • alpha::util::cache
  • alpha::util::codehighlight
  • alpha::util::convertors
  • alpha::util::feeds
  • alpha::util::filters
  • alpha::util::graphs
  • alpha::util::helpers
  • alpha::util::metrics
  • alpha::util::search
  • alpha::view
  • alpha::view::renderers
  • alpha::view::widgets

Classes

  • ActionLogObject
  • AlphaDAO
  • AlphaDAOProviderFactory
  • AlphaDAOProviderMySQL
  • AlphaDAOProviderSQLite
  • ArticleCommentObject
  • ArticleObject
  • ArticleVoteObject
  • BadRequestObject
  • BlacklistedClientObject
  • BlacklistedIPObject
  • PersonObject
  • RightsObject
  • TagObject

Interfaces

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