phpPeanuts  2.2.0
phpPeanuts framework
 All Data Structures Namespaces Files Functions Variables
Public Member Functions | Data Fields
PntFieldPropertyDescriptor Class Reference

Inherits PntPropertyDescriptor.

Public Member Functions

 __construct ($name, $type, $readOnly, $minValue, $maxValue, $minLength, $maxLength, $classDir, $persistent=true)
 
 getPersistent ()
 
 setPersistent ($value)
 
 getDbSortPaths ()
 
 isFieldProperty ()
 
 getColumnName ()
 
 setColumnName ($value)
 
 getTableName ()
 
 setTableName ($aString)
 
 deriveValueFor ($obj)
 
 propagateValue_for ($value, $obj)
 
 getFieldProperties ()
 
 isIdProperty ()
 
- Public Member Functions inherited from PntPropertyDescriptor
 __construct ($name, $type, $readOnly, $minValue, $maxValue, $minLength, $maxLength, $classDir)
 
 getName ()
 
 setName ($aString)
 
 isLegalType ($aString)
 
 getType ()
 
 setType ($aString)
 
 getReadOnly ()
 
 setReadOnly ($aValue)
 
 getMinValue ()
 
 setMinValue ($aValue)
 
 getMaxValue ()
 
 setMaxValue ($aValue)
 
 getMinLength ()
 
 setMinLength ($aValue)
 
 getMaxLength ()
 
 setMaxLength ($aValue)
 
 getPersistent ()
 
 getDbSortPaths ()
 
 setDbSortPaths ($paths)
 
 getClassDir ()
 
 setClassDir ($value)
 
 getOwner ()
 
 setOwner ($anPntClassDescriptor)
 
 getValueValidator ()
 
 getVisible ()
 
 setVisible ($value)
 
 getHoldsId ()
 
 getCompulsory ()
 
 isDerived ()
 
 isFieldProperty ()
 
 isTypePrimitive ()
 
 isMultiValue ()
 
 getIdPropertyDescriptor ()
 
 __toString ()
 
 getValueFor ($obj, $filter=true)
 
 setValue_for ($value, $obj)
 
 getOptionsFor ($obj, $filter=true)
 
 hasOptionsGetter ($obj)
 
 getOptionsFilter ($obj, $filter)
 
 deriveValueFor ($obj)
 
 propagateValue_for ($value, $obj)
 
 isValueInOptionsOf ($obj, $filter=false)
 
 isValue_in ($value, $someObjects)
 
 _getValueFor ($obj)
 
 _setValue_for ($value, $obj)
 
 _getOptionsFor ($obj)
 
 _deriveValueFor ($obj)
 
 _propagateValue_for ($value, $obj)
 
 _getValueValidator ()
 
- Public Member Functions inherited from PntDescriptor
 getName ()
 
 setName ($aString)
 
 getLabel ()
 
 setLabel ($aString)
 
 __toString ()
 
 toString ()
 

Data Fields

 $persistent = PNT_READ_WRITE
 
 $fieldProperties
 
 $tableName
 
- Data Fields inherited from PntPropertyDescriptor
 $name
 
 $type
 
 $minValue
 
 $maxValue
 
 $minLength = 0
 
 $maxLength
 
 $readOnly
 
 $ownerName
 
 $classDir
 
 $isTypePrimitive
 
 $visible
 
- Data Fields inherited from PntDescriptor
 $name
 
 $label
 

Additional Inherited Members

- Static Public Member Functions inherited from PntPropertyDescriptor
static primitiveTypes ()
 

Constructor & Destructor Documentation

__construct (   $name,
  $type,
  $readOnly,
  $minValue,
  $maxValue,
  $minLength,
  $maxLength,
  $classDir,
  $persistent = true 
)

Member Function Documentation

deriveValueFor (   $obj)
Return the property value for the object

Called if no getter method exists. Returns the field value

Parameters
PntObject$objThe object whose property value to answer
getColumnName ( )

Return the name of the databaseColumn mapped to this property Default is to return the property name.

See Also
PntDbClassDescriptor::getFieldMap()
Returns
String columnName
getDbSortPaths ( )

Get the paths that can be used to make the database sort by this property

Returns
Array of string Navigational paths, not null
getFieldProperties ( )
getPersistent ( )

Defines the persistency of the property.

Returns
mixed PNT_NOT (=false), PNT_READ_WRITE (=true), PNT_READ_ONLY
getTableName ( )

Return the name of the database table holding the column mapped to this property Is set at propertydescripter adding to the tableName of the overridden propertyDescriptor. if none, is set to the tableName from the classDescriptor.

See Also
PntDbClassDescriptor::addPropertyDescriptor()
Returns
String tableName
isFieldProperty ( )
isIdProperty ( )
propagateValue_for (   $value,
  $obj 
)
Set the property value for the object

Called if no setter method exists and the property is not readOnly. Sets the field value

Parameters
mixed$valueThe value to set
mixed$objThe object whose property value to set
setColumnName (   $value)

Set the name of the databaseColumn mapped to this property

See Also
PntDbClassDescriptor::getFieldMap()
Returns
String $value the columnName
setPersistent (   $value)

Defines the persistency of the property.

Parameters
mixed$valuePNT_NOT (=false), PNT_READ_WRITE (=true), PNT_READ_ONLY
setTableName (   $aString)

Field Documentation

$fieldProperties
$persistent = PNT_READ_WRITE
$tableName

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