Overview

Namespaces

  • None
  • PHP
  • picon

Classes

  • AbstractAjaxBehaviour
  • AbstractAssociatedMarkupSource
  • AbstractBehaviour
  • AbstractCallableOption
  • AbstractChoice
  • AbstractColumn
  • AbstractContextLoader
  • AbstractDatabaseDriver
  • AbstractInjectedDataProvider
  • AbstractJQueryBehaviour
  • AbstractJQueryUIBehaviour
  • AbstractLink
  • AbstractMarkupSource
  • AbstractMultipleChoice
  • AbstractOption
  • AbstractPageClassAuthorisationStrategy
  • AbstractRepeater
  • AbstractSingleChoice
  • AbstractTextComponent
  • AbstractToolbar
  • AbstractValidator
  • AjaxButton
  • AjaxEventBehaviour
  • AjaxFormComponentUpdateBehavior
  • AjaxFormSubmitBehavior
  • AjaxLink
  • AjaxRequestTarget
  • AllowAllAuthorisationStrategy
  • AnnotationRule
  • ApplicationConfigLoadListener
  • ApplicationContext
  • ApplicationContextLoadListener
  • ApplicationInitializer
  • ApplicationInitializerConfigLoadListenerCollection
  • ApplicationInitializerContextLoadListenerCollection
  • ApplicationProfile
  • Args
  • ArrayModel
  • ArrayOption
  • AttributeAppender
  • AttributeModifier
  • AutoContextLoader
  • AutoLoader
  • BasicModel
  • BooleanModel
  • BooleanOption
  • Border
  • BorderMarkupSourcingStratagy
  • BorderResolver
  • Button
  • CacheManager
  • CallbackAjaxCallDecorator
  • CallbackColumn
  • CallbackFunctionOption
  • CallbackOption
  • CallbackRowMapper
  • Check
  • CheckBox
  • CheckBoxGroup
  • CheckChoice
  • ChoiceRenderer
  • ClassNameRule
  • ClassNamespaceRule
  • ClassScanner
  • Comment
  • ComonDomainBase
  • Component
  • ComponentAfterRenderListenerCollection
  • ComponentAuthorisationListener
  • ComponentBeforeRenderListenerCollection
  • ComponentInitializationListenerCollection
  • ComponentInjector
  • ComponentInstantiationListenerCollection
  • ComponentRenderHeadListenerCollection
  • ComponentResolverHelper
  • ComponentTag
  • CompoundPropertyModel
  • Config
  • ConfigLoader
  • ContextLoaderFactory
  • DaoSupport
  • DataBaseTemplate
  • DataGridView
  • DataSource
  • DataSourceConfig
  • DataSourceFactory
  • DataSourceType
  • DataTable
  • DateField
  • DatePickerBehaviour
  • DefaultDataTable
  • DefaultJQueryUIBehaviour
  • DefaultMarkupSource
  • DefaultNotAuthorisedListener
  • DialogBehavior
  • DirectToPageComponentNotAuthorisedListener
  • DraggableBehaviour
  • DropDown
  • EmailAddressValidator
  • EmptyPanel
  • Enum
  • ExceptionPageRequestTarget
  • ExtendResolver
  • FeedbackMessage
  • FeedbackModel
  • FeedbackPanel
  • FileModel
  • FileUploadField
  • Form
  • FormComponent
  • FormComponentLabel
  • FormComponentPanel
  • FunctionOption
  • GridItem
  • GridView
  • HeaderContainer
  • HeaderPartContainer
  • HeaderResolver
  • HeaderResponse
  • HeaderToolbar
  • IdenticalValueValidator
  • Identifier
  • Injector
  • JQueryRenderHeadListener
  • JQueryUIRenderHeadListener
  • Label
  • LabeledMarkupContainer
  • Link
  • ListenerCollection
  • ListenerRequestResolver
  • ListenerRequestTarget
  • ListItem
  • ListMultiple
  • ListView
  • Localizer
  • ManualContextLoader
  • MarkupContainer
  • MarkupElement
  • MarkupLoader
  • MarkupParser
  • MarkupUtils
  • MaximumLengthValidator
  • MaximumValidator
  • MinimumLengthValidator
  • MinimumValidator
  • ModalWindow
  • MySqlDriver
  • MySqliDriver
  • NavigationLink
  • NavigationToolbar
  • Navigator
  • NumbericOption
  • NumericValidator
  • Objects
  • Options
  • PageInstanceRequestResolver
  • PageInstanceRequestTarget
  • PageMap
  • PageMapInitializationListenerCollection
  • PageNotFoundPage
  • PageNotFoundRequestTarget
  • PageRequestResolver
  • PageRequestTarget
  • PageRequestWithListenerTarget
  • PaginatingGridView
  • Panel
  • PanelMarkupSource
  • PanelResolver
  • PasswordField
  • PatternValidator
  • PiconApplication
  • PiconErrorHandler
  • PiconSerializer
  • PiconTag
  • PopupSettings
  • PropertyColumn
  • PropertyModel
  • PropertyOption
  • PropertyResolver
  • Radio
  • RadioChoice
  • RadioGroup
  • RangeLengthValidator
  • RangeValidator
  • RedirectRequestTarget
  • RepeatingView
  • RequestCycle
  • RequestResolverCollection
  • RequiredTextField
  • ResourceReference
  • ResourceRequestResolver
  • ResourceRequestTarget
  • SerializableClosure
  • SortableBehavior
  • StaticTabPanel
  • StringValidator
  • SubClassRule
  • Tab
  • TabCollection
  • TabPanel
  • TextArea
  • TextElement
  • TextField
  • TransparentMarkupContainer
  • ValidatableFormComponentWrapper
  • ValidationResponse
  • WebApplicationSecuritySettings
  • WebComponent
  • WebPage
  • WebRequest
  • WebResponse
  • WrappedCompoundModel
  • XMLDocument
  • XMLParser
  • XMLTag
  • XmlTagType

Interfaces

  • AjaxCallDecorator
  • ApplicationInitializerConfigLoadListener
  • ApplicationInitializerContextLoadListener
  • AuthorisationStrategy
  • Behaviour
  • BehaviourListener
  • CallDecoratorWrapper
  • ChoiceGroup
  • ClassScannerRule
  • Column
  • ComponentAfterRenderListener
  • ComponentAwareModel
  • ComponentBeforeRenderListener
  • ComponentInheritedModel
  • ComponentInitializationListener
  • ComponentInstantiationListener
  • ComponentNotAuthorisedListener
  • ComponentRenderHeadListener
  • ComponentResolver
  • CompoundModel
  • DatabaseDriver
  • DataBaseOperations
  • DataProvider
  • Detachable
  • Equalable
  • FormSubmitListener
  • FormSubmitter
  • Identifiable
  • InitializingBean
  • InjectOnWakeup
  • LinkListener
  • Listener
  • MarkupSource
  • Model
  • Pageable
  • PageMapInitializationListener
  • Request
  • RequestablePage
  • RequestResolver
  • RequestTarget
  • Response
  • RowMapper
  • Validatable
  • Validator
  • XmlElement

Exceptions

  • ConfigException
  • ConversionException
  • RestartRequestOnPageException
  • SQLException
  • UnAuthorisdeException
  • Overview
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Todo

Class Component

Component sersvices as the hightest and most abstract super class for all components.

Component supports complex serialisation @see PiconSerializer Component automatically injects resources on instantiation @see Injector

A component must have a unique ID that is passed in the constructor. The ID need only be unique amoung sibling component in the component hierarchy.

Components are organised into a simple hierachy. With the exception of the ultimate parent at the top of the hierarchy, a component will always have a parent.

If the component is an instance of MarkupContainer it can have children added to it.

picon\Component implements picon\InjectOnWakeup, picon\Identifiable, picon\Detachable

Direct known subclasses

picon\MarkupContainer, picon\WebComponent

Indirect known subclasses

ErrorPage, picon\AbstractChoice, picon\Border, picon\Button, picon\Check, picon\CheckBox, picon\CheckBoxGroup, picon\CheckChoice, picon\DataGridView, picon\DataTable, picon\DateField, picon\DefaultDataTable, picon\AbstractLink, picon\DropDown, picon\EmptyPanel, picon\FeedbackPanel, picon\FileUploadField, picon\Form, picon\FormComponent, picon\FormComponentLabel, picon\FormComponentPanel, picon\GridItem, picon\GridView, picon\AbstractMultipleChoice, picon\HeaderContainer, picon\HeaderPartContainer, picon\HeaderToolbar, picon\Label, picon\LabeledMarkupContainer, picon\Link, picon\ListItem, picon\ListMultiple, picon\ListView, picon\ModalWindow, picon\AbstractRepeater, picon\NavigationLink, picon\NavigationToolbar, picon\Navigator, picon\PageNotFoundPage, picon\PaginatingGridView, picon\Panel, picon\PasswordField, picon\Radio, picon\RadioChoice, picon\RadioGroup, picon\AbstractSingleChoice, picon\RepeatingView, picon\RequiredTextField, picon\StaticTabPanel, picon\TabPanel, picon\TextArea, picon\TextField, picon\TransparentMarkupContainer, picon\WebPage, SessionExpiredPage, picon\AbstractTextComponent, picon\AbstractToolbar, picon\AjaxButton, picon\AjaxLink
Abstract
Namespace: picon
Package: web
Author: Martin Cassidy
Todo: finish adding state flags so that checks can be run to ensure overriden methods are calling the parent implementation
Located at web/Component.php
Methods summary
public
# __construct( string $id, picon\Model $model = null )

Create a new component. Any overrides of the constructor must call the super.

Create a new component. Any overrides of the constructor must call the super.

Parameters

$id
string
the ID of this component
$model
protected
# onInitialize( )

Called when the component hierarchy above this compoent is complete If overriding this method you MUST call parent::onInitialize()

Called when the component hierarchy above this compoent is complete If overriding this method you MUST call parent::onInitialize()

final protected
# fireInitialize( )
public
# internalInitialize( )
public
# add( & $object )
final protected
# addBehaviour( picon\Behaviour & $behaviour )
public
# getMarkup( )

Gets the markup for this component

Gets the markup for this component

public
# beforePageRender( )

Called just before the page is rendered for all of its components

Called just before the page is rendered for all of its components

public
# afterPageRender( )

Called just after a page is rendered

Called just after a page is rendered

public
# beforeComponentRender( )

Called just before a component is rendered

Called just before a component is rendered

public
# isInitialized( )
public
# isBeforePageRender( )
public
# afterComponentRender( )

Called just after the component is rendered

Called just after the component is rendered

public
# render( )
final protected
# internalRenderComponent( )

Renders this component

Renders this component

public
# renderElement( picon\MarkupElement $element )
protected
# renderAll( Array $markup = null )

Render all of the markup elements in the array

Render all of the markup elements in the array

Parameters

$markup
Array
An array of markup elements
abstract protected
# onRender( )
protected
# onComponentTag( picon\ComponentTag $tag )

This is called imediatly before the tag is written to the output This method allows direct manipulation of the object representing the actual markup element that is to be rendered.

This is called imediatly before the tag is written to the output This method allows direct manipulation of the object representing the actual markup element that is to be rendered.

When overriding this method you must remember to call the super.

Parameters

$tag
picon\ComponentTag
The tag being rendered
public
# getMarkupId( )

Generates and returns a markup id for this component

Generates and returns a markup id for this component

public
# setMarkupId( string $id )

Manually set the markup id. Note, using this makes it your responsability to ensure the id is unique

Manually set the markup id. Note, using this makes it your responsability to ensure the id is unique

Parameters

$id
string
public
# setOutputMarkupId( boolean $output )

Parameters

$output
boolean
protected
# onComponentTagBody( picon\ComponentTag $tag )

Render the body of the component

Render the body of the component

Parameters

$tag
picon\ComponentTag
protected
# checkComponentTag( picon\ComponentTag $tag, String $tagName )

Checks that a component tag is a tag of the required name Throws an IllegalStateException if it is not

Checks that a component tag is a tag of the required name Throws an IllegalStateException if it is not

Parameters

$tag
picon\ComponentTag
The tag to check
$tagName
String
The tag name that should match
protected
# checkComponentTagAttribute( picon\ComponentTag $tag, String $attribute, String $value )

Checks that a component tag as an attribute and that the attribute has the required value Throws an IllegalStateException if it is not

Checks that a component tag as an attribute and that the attribute has the required value Throws an IllegalStateException if it is not

Parameters

$tag
picon\ComponentTag
The tag to check
$attribute
String
The attribute to find
$value
String
The value the attribute will have
public
# visitParents( picon\Identifier $identifier, closure $callback )

Visit all the parent components of this components and execute a callback on each

Visit all the parent components of this components and execute a callback on each

Parameters

$identifier
picon\Identifier
The identifier of the parent to look for
$callback
closure
The callback to run
public
# getPage( )
protected
# setParent( $parent )
final public
# getApplication( )
final public
# getRequestCycle( )
final public
# getRequest( )
final public
# getResponse( )
public
# getId( )
public static
# getIdentifier( )

Implementation of

picon\Identifiable::getIdentifier
public boolean
# isStateless( )

Gets whether or not this component is stateless

Gets whether or not this component is stateless

Returns

boolean
public
# get( $id )
public type
# generateUrlFor( mixed $for )

Generate a URL for a particular action:

Generate a URL for a particular action:

WebPage Identifier - Generates a URL for the web page WebPage Instance - Generate a URL for the page instance

Parameters

$for
mixed

Returns

type
public type
# urlForPage( picon\Identifier $page )

Parameters

$page
picon\Identifier

Returns

type

Todo

this should use a request target
public
# urlForPageInstance( picon\WebPage $pageInstance )
public type
# urlForListener( picon\Listener $listener )

Parameters

$listener
picon\Identifier
$page

Returns

type

Todo

this should use a request target
public
# getComponentPath( )
protected
# newMarkupSource( )
public
# setPage( mixed $page )

Set the current page

Set the current page

Parameters

$page
mixed
An instance of web page or an Identifier for a web page

Todo

add page params
public picon\Model
# getModel( )

Returns

picon\Model
The model for this component

Todo

add support for model inheritence (compound models)
public
# setMarkup( picon\MarkupElement $markup )
public
# setModel( picon\Model & $model )
protected
# getMarkUpSource( )
public
# getParent( )
public
# setModelObject( & $object )
public
# getModelObject( )
public string
# getModelObjectAsString( )

Returns

string
a representation of the model object as a string

Todo

should really create converters for primatives
public
# fatel( $message )
public
# error( $message )
public
# warning( $message )
public
# info( $message )
public
# success( $message )
public
# hasMessage( $level = null )
public
# hasErrorMessage( )
final public
# renderHeadContainer( picon\HeaderContainer $container, picon\HeaderResponse $headerResponse )

Called by the header container when the HTML <head> is rendering

Called by the header container when the HTML <head> is rendering

Parameters

$container
picon\HeaderContainer
$headerResponse
picon\HeaderResponse
public
# renderHead( picon\HeaderResponse $headerResponse )

Called for each component when the HTML <head> is rendering.

Called for each component when the HTML <head> is rendering.

Parameters

$headerResponse
picon\HeaderResponse
The response to write to
public
# setRenderBodyOnly( boolean $renderBodyOnly )

Sets whether this component will render its open and close tags

Sets whether this component will render its open and close tags

Parameters

$renderBodyOnly
boolean
public
# setVisible( $visible )
public
# getBehaviours( )
public
# getBehaviourById( $id )
public
# isAuto( )
public
# detach( )

Implementation of

picon\Detachable::detach
public
# getLocalizer( )
public
# getComponentKey( $suffix )
public
# isRendered( )
public
# setBeforePageRenderCallback( $beforePageRenderCallback )
public
# setBeforeComponentRenderCallback( $beforeComponentRenderCallback )
public
# setAfterPageRenderCallback( $afterPageRenderCallback )
public
# setAfterComponentRenderCallback( $afterComponentRenderCallback )
public
# setOnComponentTagCallback( $onComponentTagCallback )
public
# setOnComponentTagBodyCallback( $onComponentTagBodyCallback )
public
# setRenderHeadCallback( $renderHeadCallback )
Constants summary
string TYPE_STRING 'string'
#
string TYPE_FLOAT 'float'
#
string TYPE_BOOL 'boolean'
#
string TYPE_DOUBLE 'double'
#
string TYPE_INT 'integer'
#
string TYPE_ARRAY 'array'
#
integer VISITOR_CONTINUE_TRAVERSAL 1
#
integer VISITOR_STOP_TRAVERSAL 2
#
integer VISITOR_CONTINUE_TRAVERSAL_NO_DEEPER 3
#
string PATH_SEPERATOR ':'
#
Properties summary
protected boolean $added false
#

true if this component is in the hierarchy

true if this component is in the hierarchy

Picon Framework API documentation generated by ApiGen 2.7.0