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

Inherits PntDescriptor.

Inherited by PntDbClassDescriptor.

Public Member Functions

 __construct ($name=null)
 
 isPropertyDescriptorSet ($propertyName)
 
 getPropertyDescriptors ()
 
refPropertyDescriptors ()
 
 getMultiValuePropertyDescriptors ()
 
 getSingleValuePropertyDescriptors ()
 
 getPropertyDescriptor ($name)
 
 getTwinOf_type ($propName, $type)
 
 addPropertyDescriptor ($anPntPropertyDescriptor)
 
 hasPropertyDescriptor ($name)
 
 getClassDir ()
 
 getLabel ()
 
 getUiColumnPaths ()
 
 getUiFieldPaths ()
 
 getUiPropertyDescriptors ()
 
 getParentclassDescriptor ()
 
 getDefaultLabelProp ($candidates, $reject)
 
 getVerifyOnDelete ()
 
 getPeanutWithId ($id)
 
 getPeanuts ()
 
 getPeanutsWith ($propertyName, $value)
 
 getPeanutsAccordingTo ($spec)
 
 _getPeanuts ()
 
 _getPeanutsWith ($propertyName, $value)
 
 _getPeanutWithId ($id)
 
- Public Member Functions inherited from PntDescriptor
 getName ()
 
 setName ($aString)
 
 getLabel ()
 
 setLabel ($aString)
 
 __toString ()
 
 toString ()
 

Static Public Member Functions

static & getInstances ()
 
static getInstance ($name)
 

Data Fields

 $propertyDescriptors
 
 $name
 
- Data Fields inherited from PntDescriptor
 $name
 
 $label
 

Constructor & Destructor Documentation

__construct (   $name = null)
Parameters
String$nameShould not be null!

Member Function Documentation

_getPeanuts ( )
_getPeanutsWith (   $propertyName,
  $value 
)
_getPeanutWithId (   $id)
addPropertyDescriptor (   $anPntPropertyDescriptor)
getClassDir ( )

Returns the directory of the class file

Returns
String
getDefaultLabelProp (   $candidates,
  $reject 
)

Return a reference to the default property to derive the label from of peanuts described by this. May return null. Caches result

Parameters
Arrayof PntPropertyDescriptor $candidates to get the property from Array of String $reject names of propertyDescriptors not to return
Returns
PntPropertyDescriptor the first visible fieldproperty that is not in $reject and not ending on 'Id'.
static getInstance (   $name)
static

Returns the PntClassDescriptor for the spefied class. ClassDescriptors are cached in a static variable PREREQUISITE: the class must be loaded and support the PntObject metaobjects protocol Class of returned instance depends on what className the static method getClassDescriptorClass on the specified class returns

Parameters
namename of the class to describe
Returns
PntClassDescriptor the instance describing the specified class
static& getInstances ( )
static

Must return a reference to the array so that ohter method can add instances

getLabel ( )
getMultiValuePropertyDescriptors ( )
getParentclassDescriptor ( )
getPeanuts ( )

Returns the instances of the described class

Exceptions
PntReflectionEror
Returns
Array of instances of the described class
getPeanutsAccordingTo (   $spec)

Returns the instances of the described class according to the supplied specification

Parameters
PntSqlSpec
Returns
array of PntObject
Exceptions
PntEror
getPeanutsWith (   $propertyName,
  $value 
)

Returns the instances of the described class with the specfied property value to be equal to the specfied value

Parameters
StringpropertyName
mixedvalue
Returns
Array of instances of the discribed class
Exceptions
PntError
getPeanutWithId (   $id)

Returns the instance of the described class with the id to be equal to the specfied value, or null if none

Parameters
mixedid
Returns
PntObject or null
Exceptions
PntEror
getPropertyDescriptor (   $name)
getPropertyDescriptors ( )
getSingleValuePropertyDescriptors ( )
getTwinOf_type (   $propName,
  $type 
)

Get the twin of a property whose name and type are... If a property implements a role in a relationship, the property that implements the role on the other side is its twin.

Parameters
String$propNameThe name of the property whose twin is requested
String$typeThe type of the property whose twin is requested
Returns
PntPropertyDescriptor the twin or null if not found. Currently only multi value properties will be returned. PRECONDITION: both the properties type and the twins type must be loaded
getUiColumnPaths ( )

Returns the default user interface table column paths If the static method PntObject::getUiColumnPaths() has been overridden, its result will be returned. Otherwise the names of the result of getUiPropertyDescriptors will be returned

Returns
Array of String
getUiFieldPaths ( )

Returns the default user interface field paths If the static method PntObject::getUiFieldPaths() has been overridden, its result will be returned. Otherwise the names of getUiPropertyDescriptors will be returned

Returns
Array of String
getUiPropertyDescriptors ( )

Returns the default user interface single value property descriptors. These are the names of all sinlge value propertyDesctiptors except label, id or *Id but if that would be empty, label

Returns
Array of PntPropertyDescriptor
getVerifyOnDelete ( )
hasPropertyDescriptor (   $name)
isPropertyDescriptorSet (   $propertyName)
& refPropertyDescriptors ( )

Field Documentation

$name
$propertyDescriptors

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