[
class tree: tangra_lib
] [
index: tangra_lib
] [
all elements
]
tangra_lib
Packages:
tangra_lib
Source for file tangra_module_category.class.php
Documentation is available at
tangra_module_category.class.php
<?php
// $Id$
/**
* Contains class Tangra_Module_Category
*
*
@package
tangra_lib
*
@subpackage
modules_manager
*/
/**
* Tangra module category
*
*
@package
tangra_lib
*
@subpackage
modules_manager
*/
class
Tangra_Module_Category
extends
Tangra_Class
{
/**
* ID
*
*
@var
integer
*
@internal
*/
private
$id
;
/**
* HID (human id)
*
*
@var
string
*
@internal
*/
private
$hid
;
/**
* Name of the category
*
*
@var
string
*
@internal
*/
private
$name
;
/**
* Enter description here...
*
*
@var
unknown_type
*
@internal
*/
private
$description
;
/**
* Sets ID
*
*
@param
integer
$id
*/
public
function
set_id
(
$id
)
{
tangra_if_not_int_throw_e
(
$id
)
;
$this
->
id
=
$id
;
}
/**
* Gets ID
*
*
@return
integer
*/
public
function
get_id
(
)
{
return
$this
->
id
;
}
/**
* Sets HID
*
*
@param
string
$hid
Must be alphanumeric, starting with letter, underscore allowed, 100 characters max
*/
public
function
set_hid
(
$hid
)
{
if
(
ereg
(
"[a-z0-9_]{1,100}"
,
$hid
))
{
$this
->
hid
=
$hid
;
}
else
{
throw
TE_TCMS_Exception
(
'Invalid hid: '
.
$hid
.
'. Must conform ereg("[a-z0-9_]{1,100}").'
)
;
}
}
/**
* Gets HID
*
*
@return
string
*/
public
function
get_hid
(
)
{
return
$this
->
hid
;
}
/**
* Sets name of the category
*
*
@param
string
$name
*/
public
function
set_name
(
$name
)
{
$this
->
name
=
$name
;
}
/**
* Gets name of the category
*
*
@return
string
*/
public
function
get_name
(
)
{
return
$this
->
name
;
}
/**
* Sets description
*
*
@param
string
$description
*/
public
function
set_description
(
$description
)
{
$this
->
description
=
$description
;
}
/**
* Gets description
*
*
@return
unknown
*/
public
function
get_description
(
)
{
return
$this
->
description
;
}
}