XCL Web Application Platform 2.5.0
The XoopsCube Legacy Project
Loading...
Searching...
No Matches
XCube_GenericArrayProperty Class Reference

[Abstract] Defines common array property class which implements XCube_PropertyInterface. More...

Inheritance diagram for XCube_GenericArrayProperty:
XCube_PropertyInterface XCube_AbstractArrayProperty XCube_BoolArrayProperty XCube_FileArrayProperty XCube_FloatArrayProperty XCube_IntArrayProperty XCube_StringArrayProperty XCube_TextArrayProperty XCube_ImageFileArrayProperty

Public Member Functions

 __construct ( $classname, $name)
 Constructor.
 
 set ( $arg1, $arg2=null)
 Sets a value. And the value is casted by the property's type'.
 
 add ( $arg1, $arg2=null)
 
 _set ( $index, $value)
 This member function helps set().
 
 get ( $index=null)
 Gets values of this property.
 
 reset ()
 Resets all properties of this.
 
 isArray ()
 Gets a value indicating whether this object expresses Array.
 
 isNull ()
 Gets a value indicating whether this object is null.
 
 toNumber ()
 Gets a value as integer — but, gets null always.
 
 toString ()
 Gets a value as string — but, gets 'Array' always.
 
 toHTML ()
 Gets a value as encoded HTML code — but, gets 'Array' always.
 
 hasFetchControl ()
 Gets a value indicating whether this object has a fetch control.
 
- Public Member Functions inherited from XCube_PropertyInterface
 __construct ( $name)
 Constructor.
 
 set ( $value)
 [Abstract] Sets $value as raw value to this property. And the value is defined by the property's type'.
 
 get ()
 [Abstract] Gets the value of this property.
 
 setValue ( $arg0=null, $arg1=null)
 
 getValue ( $arg0=null)
 
 fetch (&$form)
 

Data Fields

 $mName
 string
 
 $mProperties = []
 XCube_AbstractProperty[] - std::map<mixed_key, mixed_value>
 
 $mPropertyClassName
 string - <T>
 

Detailed Description

[Abstract] Defines common array property class which implements XCube_PropertyInterface.

This class is a kind of template-class — XCube_GenericArrayProperty<T>. Developers should know about sub-classes of XCube_AbstractProperty.

Definition at line 239 of file XCube_Property.class.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( $classname,
$name )

Constructor.

Parameters
string$classname- <T>
string$name- A name of the property.

Definition at line 268 of file XCube_Property.class.php.

Member Function Documentation

◆ _set()

_set ( $index,
$value )

This member function helps set().

Parameters
string$index
mixed$value
Returns
void

Definition at line 327 of file XCube_Property.class.php.

◆ add()

add ( $arg1,
$arg2 = null )
Parameters
$arg1
null$arg2

Definition at line 308 of file XCube_Property.class.php.

◆ get()

get ( $index = null)

Gets values of this property.

Parameters
mixed$index- If $indes is null, gets array (std::map<mixed_key, mixed_value>).
Returns
mixed

Definition at line 342 of file XCube_Property.class.php.

◆ hasFetchControl()

hasFetchControl ( )

Gets a value indicating whether this object has a fetch control.

Returns
bool

Reimplemented from XCube_PropertyInterface.

Reimplemented in XCube_FileArrayProperty.

Definition at line 420 of file XCube_Property.class.php.

◆ isArray()

isArray ( )

Gets a value indicating whether this object expresses Array.

Returns
bool
Remarks
This class is a base class for array properties, so a sub-class of this does not override this method.

Reimplemented from XCube_PropertyInterface.

Definition at line 374 of file XCube_Property.class.php.

◆ isNull()

isNull ( )

Gets a value indicating whether this object is null.

Returns
bool

Reimplemented from XCube_PropertyInterface.

Definition at line 383 of file XCube_Property.class.php.

◆ reset()

reset ( )

Resets all properties of this.

Definition at line 360 of file XCube_Property.class.php.

◆ set()

set ( $arg1,
$arg2 = null )

Sets a value. And the value is casted by the property's type'.

This member function has two signatures.

set(something[] values);
Fetches values from the array.
set(mixed key, mixed value);
Set values with index 'key'.
Parameters
$arg1
null$arg2

Definition at line 288 of file XCube_Property.class.php.

◆ toHTML()

toHTML ( )

Gets a value as encoded HTML code — but, gets 'Array' always.

Returns
string - HTML
Deprecated

Reimplemented from XCube_PropertyInterface.

Definition at line 411 of file XCube_Property.class.php.

◆ toNumber()

toNumber ( )

Gets a value as integer — but, gets null always.

Returns
int

Reimplemented from XCube_PropertyInterface.

Definition at line 392 of file XCube_Property.class.php.

◆ toString()

toString ( )

Gets a value as string — but, gets 'Array' always.

Returns
string

Reimplemented from XCube_PropertyInterface.

Definition at line 401 of file XCube_Property.class.php.

Field Documentation

◆ $mName

$mName

string

Definition at line 244 of file XCube_Property.class.php.

◆ $mProperties

$mProperties = []

XCube_AbstractProperty[] - std::map<mixed_key, mixed_value>

Definition at line 250 of file XCube_Property.class.php.

◆ $mPropertyClassName

$mPropertyClassName

string - <T>

If this class is XCube_GenericArrayProperty<T>, mPropertyClassName is <T>.

Definition at line 258 of file XCube_Property.class.php.


The documentation for this class was generated from the following file: