Support Joomla!
Main
News
Help
Forum
Extensions
Shop
Developers
Joomla! 1.5 Documentation
Home
API reference wiki
Browse SVN repository
Packages
Select a package...
Unknown
Cache_Lite
com-tecnick-tcpdf
core
Joomla-Framework
OpenID
patError
patTemplate
PEAR
phpGACL
PHPMailer
PHP_Compat
utf8
Yadis
Package: Joomla-Framework
Other documents
Changelog
To do
To do (2)
Element index (all)
Error log
Install
Copyright
License
Developer Network License
The Joomla! Developer Network content is © copyright 2006 by the individual contributors and can be used in accordance with the
Creative Commons License, Attribution- NonCommercial- ShareAlike 2.5
Source code for file /joomla/database/table/module.php
Documentation is available at
module.php
<?php
/**
*
@version
$Id: module.php 6529 2007-02-08 06:57:00Z pasamio $
*
@package
Joomla.Framework
*
@subpackage
Table
*
@copyright
Copyright (C) 2005 - 2007 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
->
_error
=
JText
::
sprintf
(
'must contain a title'
,
JText
::
_
(
'Module'
) )
;
return
false
;
}
// limitation has been removed
// check for existing title
//$this->_db->setQuery( 'SELECT id FROM #__modules'
//. ' WHERE title="'.$this->title.'"'
//);
// check for module of same name
//$xid = intval( $this->_db->loadResult() );
//if ($xid && $xid != intval( $this->id )) {
// $this->_error = "There is a module already with that name, please try again.";
// 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
)
;
}
}
?>
Documentation generated on Mon, 05 Mar 2007 21:10:58 +0000 by
phpDocumentor 1.3.1