Methods summary
public
|
|
public
ViewInterface
|
#
copyFrom( Traversable $data )
Assign data to the View state.
Assign data to the View state.
Parameters
Returns
ViewInterface
Api
Implementation of
|
public
|
#
getIterator( )
Implementation of
IteratorAggregate::getIterator()
|
public
Nethgui\Module\ModuleInterface
|
#
getModule( )
The module associated to this view.
The module associated to this view.
Returns
Api
Implementation of
|
public
|
#
offsetExists( $offset )
Implementation of
ArrayAccess::offsetExists()
|
public
|
#
offsetGet( $offset )
Implementation of
ArrayAccess::offsetGet()
|
public
|
#
offsetSet( $offset, $value )
Implementation of
ArrayAccess::offsetSet()
|
public
|
#
offsetUnset( $offset )
Implementation of
ArrayAccess::offsetUnset()
|
public
ViewInterface
|
#
setTemplate( string|callable|boolean $template )
Set the template to be applied to the view
Set the template to be applied to the view
If a string is given, it identifies a PHP Template script (ie. Nethgui\Template\Main);
If a callback function is given, it is invoked with an array representing the view state as argument and is expected to return a string representing the view;
If a boolean FALSE, is given the view is rendered as an empty string.
Parameters
- $template
- The template converting the view state to a string
Returns
ViewInterface
Api
Implementation of
|
public
string|callable|boolean
|
#
getTemplate( )
TODO
Returns
string|callable|boolean
See
Api
Implementation of
|
public
Nethgui\View\ViewInterface
|
#
spawnView( Nethgui\Module\ModuleInterface $module, boolean $register = FALSE )
Create a new view object associated to $module
Create a new view object associated to $module
Parameters
- $module
- The associated $module
- $register
- If TRUE the returned view is added to the current object with key equal to the module identifier
Returns
Api
Implementation of
|
public
string
|
#
translate( string $message, array $args = array() )
A method to translate a message according to the user language preferences.
A method to translate a message according to the user language preferences.
Parameters
Returns
string
See
Api
Implementation of
|
public
Nethgui\View\TranslatorInterface
|
#
getTranslator( )
Access to the object performing string translations
Access to the object performing string translations
Returns
See
Api
Implementation of
|
public
array
|
#
getModulePath( )
Gets the array of the current module identifier plus all identifiers of
the ancestor modules, starting from the root.
Gets the array of the current module identifier plus all identifiers of
the ancestor modules, starting from the root.
Returns
array
See
ModuleInterface::getParent()
ModuleInterface::getIdentifier()
Api
Implementation of
|
public
string
|
#
getUniqueId( string $parts = '' )
Generate a unique identifier for the given $path. If no parts are given
the identifier refers the the module referenced by the view.
Generate a unique identifier for the given $path. If no parts are given
the identifier refers the the module referenced by the view.
Parameters
- $parts
- $path Relative to the current module
Returns
string
Api
Implementation of
|
public
string
|
#
getClientEventTarget( string $name )
Get the target control identifier for the given view member
Get the target control identifier for the given view member
Parameters
Returns
string
See
358
Api
Implementation of
|
public
string
|
#
getModuleUrl( string $path = '' )
Return an absolute url path.
Return an absolute url path.
Parameters
- $path
- Relative to the current module
Returns
string
See
Api
Implementation of
|
public
Nethgui\Log\LogConsumerInterface
|
#
setLog( Nethgui\Log\LogInterface $log )
Change the log attached to the interface implementor
Change the log attached to the interface implementor
Parameters
Returns
Api
Implementation of
|
public
Nethgui\Log\LogInterface
|
#
getLog( )
The log attached to the interface implementor
The log attached to the interface implementor
Returns
Api
Implementation of
|
public
array
|
#
resolvePath( string $path )
Obtain the complete path list, starting from root.
Obtain the complete path list, starting from root.
An heading '/' character treat the $path as absolute, otherwise the
$path is considered relative to the current module and a '..' substring
goes one level up.
Parameters
Returns
array The path parts, starting from root
See
Api
Implementation of
|
public
string
|
#
getPathUrl( )
The path component of an URL with a leading slash and trailing
The path component of an URL with a leading slash and trailing
Returns
string
Example
/my/path/to/the/app/
Api
Implementation of
|
public
string
|
#
getSiteUrl( )
The web site URL without trailing slash
The web site URL without trailing slash
Returns
string
Example
http://www.example.org:8080
Api
Implementation of
|
public
string
|
#
getTargetFormat( )
Get the requested resource format
Get the requested resource format
Deprecated
since 1.6
Returns
string
Api
Implementation of
|
public
Nethgui\View\LegacyCommandBag
|
#
getCommandList( string $selector = '' )
Get a command list for the given selector
Get a command list for the given selector
The returned command list is ready to execute().
NOTE: only view objects correctly deliver commands to the client-side.
Widget commands are delivered to widget objects and executed server-side
only.
Deprecated
since version 1.6
Parameters
- $selector
- Routes the command list to the receiver appointed by this parameter.
Returns
Api
Implementation of
|
public
boolean
|
#
hasCommandList( $selector = '' )
Check if one or more commands has been added to the selected command list
Check if one or more commands has been added to the selected command list
Deprecated
since version 1.6
Returns
boolean TRUE, if some command has been added to the list
Api
Implementation of
|