phpPeanuts  2.2.0
phpPeanuts framework
 All Data Structures Namespaces Files Functions Variables
Public Member Functions | Static Public Member Functions
PntComparator Class Reference

Inherits PntIdentifiedOption.

Inherited by Comparator.

Public Member Functions

 __construct ($id=null, $label=null, $sqlOperator=null, $addition=null, $preceder=null)
 
 initPropertyDescriptors ()
 
 evaluateValue_against ($value, $value1, $value2)
 
 getSqlOperator ()
 
 sqlFromValue ($value)
 
 comparesToNull ()
 
- Public Member Functions inherited from PntIdentifiedOption
 __construct ($id=null, $label=null)
 
 initPropertyDescriptors ()
 
 getLabel ()
 
- Public Member Functions inherited from PntObject
 __construct ()
 
 copy ()
 
 getClass ()
 
 getClassDescriptor ()
 
 initPropertyDescriptors ()
 
 getOid ()
 
 addFieldProp ($name, $type, $readOnly=false, $minValue=null, $maxValue=null, $minLength=0, $maxLength=null, $classDir=null, $persistent=true)
 
 addDerivedProp ($name, $type, $readOnly=true, $minValue=null, $maxValue=null, $minLength=0, $maxLength=null, $classDir=null)
 
 addMultiValueProp ($name, $type, $readOnly=true, $minValue=null, $maxValue=null, $minLength=0, $maxLength=null, $classDir=null)
 
 getPropertyDescriptor ($propertyName)
 
 get ($propertyName, $filter=true)
 
 set ($propertyName, $value)
 
 getOptions ($name, $filter=true)
 
 getValueValidator ($prop)
 
 validateGetErrorString ($prop, $value, $validateReadOnly=true)
 
 basicGetLabel ()
 
 getLabel ()
 
 __toString ()
 
 release ()
 
 getEditInfo ()
 
 toString ()
 
 _getValueValidator ($prop)
 

Static Public Member Functions

static getInstances ($type=null, $compulsory=false)
 
static getCache ()
 
static getInstance ($comparatorId, $type=null, $compulsory=false)
 
static isMagnitudeType ($type)
 

Additional Inherited Members

- Data Fields inherited from PntIdentifiedOption
 $id
 
 $label
 

Constructor & Destructor Documentation

__construct (   $id = null,
  $label = null,
  $sqlOperator = null,
  $addition = null,
  $preceder = null 
)

SECURITY WARNING: do not pass dynamic values to $id as it will be used in eval. IOW, if $id gets passed php-code, it will be executed possably leading to breach of security

Member Function Documentation

comparesToNull ( )
evaluateValue_against (   $value,
  $value1,
  $value2 
)
static getCache ( )
static
static getInstance (   $comparatorId,
  $type = null,
  $compulsory = false 
)
static
static getInstances (   $type = null,
  $compulsory = false 
)
static

Returns the instances

Returns
Array of instances
getSqlOperator ( )
initPropertyDescriptors ( )
Returns
String the name of the database table the instances are stored in - override for each subclass
static isMagnitudeType (   $type)
static

Needs to be overridden if new maginitude types are added that are not in PntPropertyDescriptor::primitiveTypes PRECONDITION: PntPropertyDescriptor has been included

Returns
boolean wheather magnitude operators can be applied to the type
sqlFromValue (   $value)

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