Gumbo_Constraint



Input Constraint Class

Author(s): Michael Luster <mluster79@yahoo.com>
License:New BSD License
Copyright:Copyright (c) 2007, iBayou, Michael Luster
Link:http://sourceforge.net/projects/phpgumbo
Version:0.0.1

Implements interfaces:

Class Variables

array $_cases = array () [line 42]
int $_key =  0 [line 40]
string|array $_method [line 38]

Class Methods

public Gumbo_Constraint __construct ( [string $func], [string|StdClass $cls], [int $key] ) [line 52]

Constructor (extra arguments are the various Case parameters)

Parameter(s):

  • (string) $func :: function/method name
  • (string|StdClass) $cls :: class name or object
  • (int) $key :: location to place data in argument of function/method

[ Top ]
public void addCase ( mixed $val ) [line 93]

Adds a Case to the Constraint Method (accepts additional arguments)

Parameter(s):

  • (mixed) $val
Implementation of:
Gumbo_Interface_Constraint::addCase()

[ Top ]
public array getCases ( ) [line 191]

Returns the Case Arguments (extra parameters sent to the function)

Implementation of:
Gumbo_Interface_Constraint::getCases()

[ Top ]
public int getKey ( ) [line 183]

Returns the Key

Implementation of:
Gumbo_Interface_Constraint::getKey()

[ Top ]
public string|array getMethod ( ) [line 175]

Returns the Function|Method

Implementation of:
Gumbo_Interface_Constraint::getMethod()

[ Top ]
public void resetCases ( ) [line 103]

Resets all Case Argument

  • postcondition:  !getCases()
Implementation of:
Gumbo_Interface_Constraint::resetCases()

[ Top ]
public void setKey ( int $key ) [line 150]

Sets the Key, which indicates the location the 'data' argument should be placed (starts at 0 for 1st position)

Parameter(s):

  • (int) $key
  • precondition:  $key>0
Implementation of:
Gumbo_Interface_Constraint::setKey()

[ Top ]
public void setMethod ( string $func, [string|StdClass $obj] ) [line 116]

Sets the Function|Method

Parameter(s):

  • (string) $func
  • (string|StdClass) $obj
  • throws:  Gumbo_Exception
Implementation of:
Gumbo_Interface_Constraint::setMethod()

[ Top ]
public mixed test ( mixed $data ) [line 66]

Tests the Constraint, returning either boolean or formatted data

Parameter(s):

  • (mixed) $data
Implementation of:
Gumbo_Interface_Constraint::test()

[ Top ]