Overview

Packages

  • Auth
    • Ads
    • Ldap
    • Xoops
  • Autotasks
  • Config
    • Category
    • Item
    • Option
  • Core
    • Filesystem
    • Filters
    • Logger
    • Mail
    • Message
    • Password
    • Security
    • StopSpammer
    • Template
    • Textsanitizer
    • VersionChecker
  • Data
    • Avatar
    • Comment
  • Database
    • Connection
    • Criteria
    • Legacy
    • MySQL
    • PDO
    • Updater
  • Feeds
    • RSS
  • File
  • Form
    • Base
    • Elements
  • ICMS
    • IPF
      • View
  • Image
    • Category
  • Ipf
    • Category
    • Controller
    • Export
    • form
    • Keyhighlighter
    • Member
    • Object
    • Permission
    • richfile
    • Tree
    • urllink
    • View
  • kernel
    • Set
  • Member
    • Group
    • GroupMembership
    • GroupPermission
    • User
  • Messaging
  • Module
  • None
  • Notification
  • Page
  • Plugins
    • Editor
  • Preload
    • Libraries
  • Privmessage
  • Session
  • SmartObject
  • View
    • Block
    • Breadcrumb
    • PageNav
    • PrinterFriendly
    • Template
    • Templates
    • Theme
    • Tree

Classes

  • icms_core_Debug
  • icms_core_Object
  • icms_core_ObjectHandler
  • icms_core_OnlineHandler
  • icms_file_ZipFileHandler
  • icms_image_set_Handler
  • Overview
  • Package
  • Class

Class icms_core_Object

Base class for all objects in the kernel (and beyond)

Direct known subclasses

icms_config_category_Object, icms_config_Item_Object, icms_member_group_membership_Object, icms_member_group_Object, icms_member_groupperm_Object, icms_member_user_Object, icms_module_Object, icms_view_template_file_Object, icms_view_template_set_Object, icms_config_option_Object, icms_data_avatar_Object, icms_data_comment_Object, icms_data_notification_Object, icms_data_privmessage_Object, icms_image_category_Object, icms_image_Object, icms_ipf_Object

Indirect known subclasses

icms_data_file_Object, icms_data_page_Object, icms_data_urllink_Object, icms_ipf_category_Object, icms_ipf_seo_Object, icms_view_block_Object, icms_view_block_position_Object
Package: Core
Category: ICMS
Copyright:

copyright (c) 2000-2003 XOOPS.org You should have received a copy of XOOPS_copyrights.txt with this file. If not, you may obtain a copy from xoops.org


License: GNU General Public License (GPL)
Author: Kazumi Ono (AKA onokazu)
Since: XOOPS
Located at core/Object.php
Methods summary
public
# __construct( )

constructor

constructor

normally, this is called from child classes only

public
# setNew( )

@+

used for new/clone objects

@+

used for new/clone objects

public
# unsetNew( )
public
# isNew( )
public
# setNewConfig( )

@+

used for new config objects when installing/updating module(s)

@+

used for new config objects when installing/updating module(s)

public
# unsetNewConfig( )
public
# isNewConfig( )
public
# setDirty( )

@+

mark modified objects as dirty

@+

mark modified objects as dirty

used for modified objects only

public
# unsetDirty( )
public
# isDirty( )
public
# initVar( string $key, integer $data_type, mixed $value = null, boolean $required = false, integer $maxlength = null, string $options = '' )

initialize variables for the object

initialize variables for the object

Parameters

$key
$data_type
set to one of XOBJ_DTYPE_XXX constants (set to XOBJ_DTYPE_OTHER if no data type ckecking nor text sanitizing is required)
$value
$required
require html form input?
$maxlength
for XOBJ_DTYPE_TXTBOX type only
$options
$option does this data have any select options?
public
# assignVar( string $key, mixed $value )

assign a value to a variable

assign a value to a variable

Parameters

$key
name of the variable to assign
$value
value to assign
public
# assignVars( array $var_arr )

assign values to multiple variables in a batch

assign values to multiple variables in a batch

Parameters

$var_arr
$var_array associative array of values to assign
public
# setVar( string $key, mixed $value, boolean $not_gpc = false )

assign a value to a variable

assign a value to a variable

Parameters

$key
name of the variable to assign
$value
value to assign
$not_gpc
public
# setVars( array $var_arr, boolean $not_gpc = false )

assign values to multiple variables in a batch

assign values to multiple variables in a batch

Parameters

$var_arr
associative array of values to assign
$not_gpc
public
# setFormVars( array $var_arr = null, string $pref = 'xo_', $not_gpc = false )

Assign values to multiple variables in a batch

Assign values to multiple variables in a batch

Meant for a CGI context: - prefixed CGI args are considered safe - avoids polluting of namespace with CGI args

Parameters

$var_arr
associative array of values to assign
$pref
prefix (only keys starting with the prefix will be set)
$not_gpc
public array &
# getVars( )

returns all variables for the object

returns all variables for the object

Returns

array
associative array of key->value pairs
public array
# getValues( mixed $keys = null, string $format = 's', integer $maxDepth = 1 )

Returns the values of the specified variables

Returns the values of the specified variables

Parameters

$keys
An array containing the names of the keys to retrieve, or null to get all of them
$format
Format to use (see getVar)
$maxDepth
Maximum level of recursion to use if some vars are objects themselves

Returns

array
associative array of key->value pairs
public mixed
# getVar( string $key, string $format = 's' )

returns a specific variable for the object in a proper format

returns a specific variable for the object in a proper format

Parameters

$key
key of the object's variable to be returned
$format
format to use for the output

Returns

mixed
formatted value of the variable
public boolean
# cleanVars( )

clean values of all variables of the object for storage. also add slashes whereever needed

clean values of all variables of the object for storage. also add slashes whereever needed

We had to put this method in the icms_ipf_Object because the XOBJ_DTYPE_ARRAY does not work properly at least on PHP 5.1. So we have created a new type XOBJ_DTYPE_SIMPLE_ARRAY to handle 1 level array as a string separated by |

Returns

boolean
true if successful
public
# registerFilter( string $filtername )

dynamically register additional filter for the object

dynamically register additional filter for the object

Parameters

$filtername
name of the filter
public object &
# xoopsClone( )

create a clone(copy) of the current object

create a clone(copy) of the current object

Returns

object
clone
public
# setErrors( string $err_str )

add an error

add an error

Parameters

$err_str
$value error to add
public array
# getErrors( )

return the errors for this object as an array

return the errors for this object as an array

Returns

array
an array of errors
public string
# getHtmlErrors( )

return the errors for this object as html

return the errors for this object as html

Returns

string
html listing the errors
Properties summary
public array $vars

holds all variables(properties) of an object

holds all variables(properties) of an object

# array()
public array $cleanVars

variables cleaned for store in DB

variables cleaned for store in DB

# array()
protected boolean $_isNewConfig

is it a newly created config object?

is it a newly created config object?

# false
API documentation generated by ApiGen