Overview

Namespaces

  • Nethgui
    • Adapter
    • Authorization
    • Component
    • Controller
      • Collection
      • Table
    • Exception
    • Log
    • Model
    • Module
      • Help
      • Notification
    • Renderer
    • Serializer
    • System
    • Test
      • Tool
      • Unit
        • Nethgui
          • Adapter
            • ParameterSet
          • Authorization
          • Log
          • Module
            • Notification
          • Renderer
          • Serializer
          • System
          • Utility
          • View
        • Test
          • Tool
    • Utility
    • View
    • Widget
      • Xhtml
  • None
  • Test
    • Tool

Classes

  • AbstractController
  • CollectionController
  • CompositeController
  • ListComposite
  • NullRequest
  • RequestTest
  • TableController
  • TabsController

Interfaces

  • RequestHandlerInterface
  • RequestInterface
  • ValidationReportInterface
  • Overview
  • Namespace
  • Class
  • Deprecated

Class AbstractController

Nethgui\Module\AbstractModule implements Nethgui\Module\ModuleInterface, Nethgui\View\ViewableInterface, Nethgui\Log\LogConsumerInterface, Nethgui\Utility\PhpConsumerInterface, Nethgui\Authorization\AuthorizationAttributesProviderInterface, Nethgui\System\PlatformConsumerInterface, Nethgui\Authorization\PolicyEnforcementPointInterface
Extended by Nethgui\Controller\AbstractController implements Nethgui\Controller\RequestHandlerInterface

Direct known subclasses

Nethgui\Controller\Collection\AbstractAction, Nethgui\Controller\Table\AbstractAction, Nethgui\Module\Help\Common, Nethgui\Module\Language, Nethgui\Module\Login, Nethgui\Module\Logout, Nethgui\Module\Menu, Nethgui\Module\Resource, Nethgui\Module\Tracker, Nethgui\Test\Unit\Nethgui\Module\ConcreteStandardModule1

Indirect known subclasses

Nethgui\Controller\Table\Help, Nethgui\Controller\Table\Modify, Nethgui\Controller\Table\PluggableAction, Nethgui\Controller\Table\Read, Nethgui\Controller\Table\RowAbstractAction, Nethgui\Controller\Table\RowPluginAction, Nethgui\Module\Help\Read, Nethgui\Module\Help\Show, Nethgui\Module\Help\Template
Abstract
Namespace: Nethgui\Controller
Author: Davide Principi davide.principi@nethesis.it
Since: 1.0
Api
Located at Controller/AbstractController.php
Methods summary
public
# __construct( string $identifier = NULL )

Parameters

$identifier

Overrides

Nethgui\Module\AbstractModule::__construct()
protected Nethgui\Controller\AbstractController
# declareParameter( string $parameterName, mixed $validator = FALSE, mixed $valueProvider = NULL )

Declare a Module parameter.

Declare a Module parameter.

  • A parameter is validated through $validationRule. It obtains its value from $valueProvider.
  • A value provider can be a callback function or an adapter object.
  • The callback function can return the parameter value or an adapter itself.

NOTE: If you are using an adapter keep in mind that the Host Configuration link is available after initialization only: don't call in class constructor in this case!

Parameters

$parameterName
The name of the parameter
$validator
Optional - A regular expression catching the correct value format OR An constant-integer corresponding to a predefined validator OR boolean FALSE for a readonly parameter
$valueProvider
Optional - A callback function, an adapter instance or an array of arguments to create an adapter

Returns

Nethgui\Controller\AbstractController

See

\Nethgui\System\PlatformInterface::getIdentityAdapter()
\Nethgui\System\PlatformInterface::getMapAdapter()
protected Nethgui\System\ValidatorInterface
# getValidator( string $parameterName )

Get the validator object for the given parameter.

Get the validator object for the given parameter.

You must declare the parameter prior to call this method.

Parameters

$parameterName
The name of the validated parameter

Returns

Nethgui\System\ValidatorInterface
The validator object associated to the given parameter

Api

protected Nethgui\System\Validator
# createValidator( integer $ruleCode = NULL )

Parameters

$ruleCode
See \Nethgui\System\PlatformInterface::createValidator()

Returns

Nethgui\System\Validator
public
# bind( Nethgui\Controller\RequestInterface $request )

Put the request into the object internal state

Parameters

$request

Api

Implementation of

Nethgui\Controller\RequestHandlerInterface::bind()
public
# validate( Nethgui\Controller\ValidationReportInterface $report )

Validate object state

Validate object state

Errors must be sent to $report.

Api

Implementation of

Nethgui\Controller\RequestHandlerInterface::validate()
public
# process( )

Save parameters on mutation

Save parameters on mutation

Implementation of

Nethgui\Controller\RequestHandlerInterface::process()
protected boolean
# saveParameters( )

Save parameters values, transferring data to adapters.

Save parameters values, transferring data to adapters.

Returns

boolean
protected
# onParametersSaved( $changedParameters )
public mixed
# nextPath( )

Get the path to the next module. Relative paths resolving is deferred to implementors.

Get the path to the next module. Relative paths resolving is deferred to implementors.

Executed after process(), the user agent is directed to the designated module.

If boolean FALSE is returned then no action takes place.

Returns

mixed
boolean FALSE, string path (absolute), array request

Api

Implementation of

Nethgui\Controller\RequestHandlerInterface::nextPath()
public
# prepareView( Nethgui\View\ViewInterface $view )

Prepare view layer data, putting it into $view.

Prepare view layer data, putting it into $view.

Parameters

$view
The view to put the data into

See

ViewInterface

Api

Overrides

Nethgui\Module\AbstractModule::prepareView()
protected Nethgui\Controller\RequestInterface
# getRequest( )

Returns

Nethgui\Controller\RequestInterface
Methods inherited from Nethgui\Module\AbstractModule
asAuthorizationString(), getAttributesProvider(), getAuthorizationAttribute(), getIdentifier(), getLog(), getParent(), getPhpWrapper(), getPlatform(), getPolicyDecisionPoint(), getViewTemplate(), hasPlatform(), initialize(), initializeAttributes(), isInitialized(), setLog(), setParent(), setPhpWrapper(), setPlatform(), setPolicyDecisionPoint(), setViewTemplate()
Constants inherited from Nethgui\Module\ModuleInterface
ACTION_INSTANTIATE
Constants inherited from Nethgui\Controller\RequestHandlerInterface
ACTION_MUTATE, ACTION_QUERY
Properties summary
protected Nethgui\Adapter\ParameterSet $parameters

This collection holds the parameter values as primitive datatype or adapter objects.

This collection holds the parameter values as primitive datatype or adapter objects.

Api

#
Nethgui Framework API documentation generated by ApiGen