Core  3.2
PHP API documentation
 All Data Structures Namespaces Files Functions Variables Pages
TwoDimensionStruct Class Reference
+ Collaboration diagram for TwoDimensionStruct:

Public Member Functions

 __construct (Array $data=null)
 
 getRow ($x)
 
 setRow ($x, Array $row, $force=false)
 
 insertRow ($x, Array $row=array(), $force=false)
 
 addRow (Array $row=array(), $x=null)
 
 deleteRow ($x)
 
 setColumn ($y, Array $column, $force=false)
 
 insertColumn ($y, Array $column=array(), $force=false)
 
 addColumn (Array $column=array(), $y=null)
 
 deleteColumn ($y)
 
 getColumn ($y)
 
 setValue ($x, $y, $value, $force=false)
 
 getValue ($x, $y)
 
 getArray ()
 
 getEmptyValue ()
 
 setEmptyValue ($emptyValue)
 
 getLastErrorMessage ()
 
 getAllErrorMessages ()
 

Detailed Description

A two dim struct

This struct gives some helpers to manipulate rows and columns (addRow, addColumn, insertColumn etc...)

Author
Anakeen

Definition at line 14 of file Class.twoDimensionalArray.php.

Constructor & Destructor Documentation

__construct ( Array  $data = null)

Construct a two dim object

Parameters
array$datatwo dim array to init the object
Returns
TwoDimensionStruct

Definition at line 31 of file Class.twoDimensionalArray.php.

+ Here is the call graph for this function:

Member Function Documentation

addColumn ( Array  $column = array(),
  $y = null 
)

Add a column

Parameters
array$columnvalues
int$ynumber of the column
Returns
TwoDimensionStruct|NULL

Definition at line 206 of file Class.twoDimensionalArray.php.

+ Here is the call graph for this function:

addRow ( Array  $row = array(),
  $x = null 
)

Add a row at the end of the struct or

Parameters
array$rowvalues
int$xnumber of the row
Returns
TwoDimensionStruct|NULL

Definition at line 124 of file Class.twoDimensionalArray.php.

+ Here is the call graph for this function:

deleteColumn (   $y)

Delete the column

Parameters
int$ynumber of the column
Returns
boolean|NULL

Definition at line 224 of file Class.twoDimensionalArray.php.

deleteRow (   $x)

delete a row

Parameters
int$xnumber of the row
Returns
TwoDimensionStruct|NULL

Definition at line 142 of file Class.twoDimensionalArray.php.

getAllErrorMessages ( )

Get all the array message

Returns
array

Definition at line 381 of file Class.twoDimensionalArray.php.

getArray ( )

Get the two dim array

Returns
array

Definition at line 318 of file Class.twoDimensionalArray.php.

+ Here is the call graph for this function:

getColumn (   $y)

get a column

Parameters
int$ynumber of the column
Returns
array|NULL

Definition at line 242 of file Class.twoDimensionalArray.php.

getEmptyValue ( )

Get the default empty value

Returns
string the $emptyValue

Definition at line 337 of file Class.twoDimensionalArray.php.

getLastErrorMessage ( )

Get the last error message

Returns
string|NULL

Definition at line 367 of file Class.twoDimensionalArray.php.

getRow (   $x)

Get the x row

Parameters
int$xnumber of the row
Returns
array|NULL

Definition at line 53 of file Class.twoDimensionalArray.php.

getValue (   $x,
  $y 
)

Get a value

Parameters
int$xnumber of the row
int$ynumber of the column
Returns
string|NULL

Definition at line 300 of file Class.twoDimensionalArray.php.

insertColumn (   $y,
Array  $column = array(),
  $force = false 
)

Insert a column

Parameters
int$ynumber of the column
array$columnvalues
boolean$forceforce the add
Returns
TwoDimensionStruct|NULL

Definition at line 185 of file Class.twoDimensionalArray.php.

+ Here is the call graph for this function:

insertRow (   $x,
Array  $row = array(),
  $force = false 
)

Insert a row at $x

Parameters
int$xnumber of the row
array$rowvalues
boolean$forceforce to add if the row is bigger than the column size
Returns
TwoDimensionStruct|NULL

Definition at line 103 of file Class.twoDimensionalArray.php.

+ Here is the call graph for this function:

setColumn (   $y,
Array  $column,
  $force = false 
)

Set a column values

Parameters
int$ynumber of the column
array$columnvalues
boolean$forceforce to add if the column is bigger than the row size
Returns
TwoDimensionStruct|NULL

Definition at line 162 of file Class.twoDimensionalArray.php.

+ Here is the call graph for this function:

setEmptyValue (   $emptyValue)

Set a default emptyValue

Parameters
string$emptyValue
Returns
TwoDimensionStruct

Definition at line 348 of file Class.twoDimensionalArray.php.

setRow (   $x,
Array  $row,
  $force = false 
)

Set the values for a row

Parameters
int$xnumber of the row
array$rowvalues
boolean$forceforce to add if the row is bigger than the column size or $x > the row number
Returns
TwoDimensionStruct|NULL

Definition at line 80 of file Class.twoDimensionalArray.php.

+ Here is the call graph for this function:

setValue (   $x,
  $y,
  $value,
  $force = false 
)

Set a value

Parameters
int$xnumber of the row
int$ynumber of the column
string$valuevalue to set
boolean$forceforce the add if x and y are outside the array
Returns
NULL|TwoDimensionStruct

Definition at line 270 of file Class.twoDimensionalArray.php.


The documentation for this class was generated from the following file:
← centre documentaire © anakeen