Files
@ c7d7e38b2269
Branch filter:
Location: hot67beta/libraries/joomla/database/table/module.php
c7d7e38b2269
2.6 KiB
text/x-php
Initial import of the site.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 | <?php
/**
* @version $Id: module.php 10381 2008-06-01 03:35:53Z pasamio $
* @package Joomla.Framework
* @subpackage Table
* @copyright Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.
* @license GNU/GPL, see LICENSE.php
* Joomla! is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/
// Check to ensure this file is within the rest of the framework
defined('JPATH_BASE') or die();
/**
* Module table
*
* @package Joomla.Framework
* @subpackage Table
* @since 1.0
*/
class JTableModule extends JTable
{
/** @var int Primary key */
var $id = null;
/** @var string */
var $title = null;
/** @var string */
var $showtitle = null;
/** @var int */
var $content = null;
/** @var int */
var $ordering = null;
/** @var string */
var $position = null;
/** @var boolean */
var $checked_out = 0;
/** @var time */
var $checked_out_time = 0;
/** @var boolean */
var $published = null;
/** @var string */
var $module = null;
/** @var int */
var $numnews = null;
/** @var int */
var $access = null;
/** @var string */
var $params = null;
/** @var string */
var $iscore = null;
/** @var string */
var $client_id = null;
/** @var string */
var $control = null;
/**
* Contructore
*
* @access protected
* @param database A database connector object
*/
function __construct( &$db ) {
parent::__construct( '#__modules', 'id', $db );
}
/**
* Overloaded check function
*
* @access public
* @return boolean True if the object is ok
* @see JTable:bind
*/
function check()
{
// check for valid name
if (trim( $this->title ) == '') {
$this->setError(JText::sprintf( 'must contain a title', JText::_( 'Module') ));
return false;
}
return true;
}
/**
* Overloaded bind function
*
* @access public
* @param array $hash named array
* @return null|string null is operation was satisfactory, otherwise returns an error
* @see JTable:bind
* @since 1.5
*/
function bind($array, $ignore = '')
{
if (is_array( $array['params'] ))
{
$registry = new JRegistry();
$registry->loadArray($array['params']);
$array['params'] = $registry->toString();
}
if (isset( $array['control'] ) && is_array( $array['control'] ))
{
$registry = new JRegistry();
$registry->loadArray($array['control']);
$array['control'] = $registry->toString();
}
return parent::bind($array, $ignore);
}
}
|