Zikula_System_Modules
[ class tree: Zikula_System_Modules ] [ index: Zikula_System_Modules ] [ all elements ]

Source for file PNLogEventArray.class.php

Documentation is available at PNLogEventArray.class.php

  1. <?php
  2. /** ----------------------------------------------------------------------
  3.  *  LICENSE
  4.  *
  5.  *  This program is free software; you can redistribute it and/or
  6.  *  modify it under the terms of the GNU General Public License (GPL)
  7.  *  as published by the Free Software Foundation; either version 2
  8.  *  of the License, or (at your option) any later version.
  9.  *
  10.  *  This program is distributed in the hope that it will be useful,
  11.  *  but WIthOUT ANY WARRANTY; without even the implied warranty of
  12.  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13.  *  GNU General Public License for more details.
  14.  *
  15.  *  To read the license please visit http://www.gnu.org/copyleft/gpl.html
  16.  *  ----------------------------------------------------------------------
  17.  *  Original Author of  OpenStar Module Generator
  18.  *  Author Contact: r.gasch@chello.nl, robert.gasch@value4business.com
  19.  *  Purpose of file:  object array class implementation
  20.  *  Copyright: Value4Business GmbH
  21.  *  ----------------------------------------------------------------------
  22.  * @package Zikula_System_Modules
  23.  * @subpackage SecurityCenter
  24.  */
  25.  
  26.  
  27. /**
  28.  * PNLogEventArray
  29.  *
  30.  * @package Zikula_System_Modules
  31.  * @subpackage SecurityCenter
  32.  */
  33. {
  34.     function PNLogEventArray($init=null$where='')
  35.     {
  36.         $this->PNObjectArray();
  37.  
  38.         $this->_objType       = 'sc_logevent';
  39.         $this->_objField      = 'id';
  40.         $this->_objPath       = 'logevent';
  41.  
  42.         $this->_objJoin[]     array ('join_table'          =>  'users',
  43.                                        'join_field'          =>  'uname',
  44.                                        'object_field_name'   =>  'username',
  45.                                        'compare_field_table' =>  'uid',
  46.                                        'compare_field_join'  =>  'uid');
  47.  
  48.         $this->_init($init$where);
  49.     }
  50.  
  51.  
  52.     function genFilter ($filter array())
  53.     {
  54.         $wheres array();
  55.  
  56.         if (isset($filter['date']&& $filter['date'])
  57.             $wheres["lge_date = '$filter[date]'";
  58.  
  59.         if (isset($filter['uid']&& is_numeric($filter['uid']))
  60.             $wheres["lge_uid = '$filter[uid]'";
  61.  
  62.         if (isset($filter['component']&& $filter['component'])
  63.             $wheres["lge_component = '$filter[component]'";
  64.  
  65.         if (isset($filter['module']&& $filter['module'])
  66.             $wheres["lge_module = '$filter[module]'";
  67.  
  68.         if (isset($filter['function']&& $filter['function'])
  69.             $wheres["lge_function = '$filter[function]'";
  70.  
  71.         $where implode (' AND '$wheres);
  72.         return $where;
  73.     }
  74. }

Documentation generated on Fri, 18 Jul 2008 21:53:55 +0200 by phpDocumentor 1.4.1