CMC for PHP
  • Namespace
  • Class
  • Tree

Namespaces

  • cmc
    • core
      • ui
    • db
      • mysqli
    • error
    • ui
      • widgets
  • PHP

Classes

  • dynframe
  • dynview
  • frame
  • view

CMC for PHP is a web framework for PHP.
Copyright (c) 2014 by Calmarsoft company http://calmarsoft.com (FRANCE). All rights reserved.
Project information available here.

Class view

base document of actual page

it is loaded from different materials, as defined by special tags

cmc\ui\view implements cmc\core\ISerializable

Direct known subclasses

cmc\ui\dynview

Namespace: cmc\ui
Copyright: Copyright (c) Calmarsoft company (FRANCE) (http://calmarsoft.com)
License: GNU General Public License version 3
Version: 0.9
Link: CMC Project
Located at ui/view.php

Methods summary

public true
# is_dynamic( )

Returns

true
public boolean
# load( type $lang, type $path )

material load entry point

material load entry point

the function will take care of material links using above private subroutines

Parameters

$lang
type
$lang
$path
type
$path

Returns

boolean
public string
# getLogicPath( )

localized logical view path

localized logical view path

Returns

string
public
# framesInit( )

initializes frames to be used in this view

initializes frames to be used in this view

public type
# getFrame( type $cmcId )

Retrieves a frame instance from Id

Retrieves a frame instance from Id

Parameters

$cmcId
type
$cmcId

Returns

type
public null|resource
# getImageData( )

gets the image data, in case of image answer

gets the image data, in case of image answer

Returns

null|resource
public
# setImageAnswer( resource $imgData )

used to define the image answer for the view also changs the answer type to image type (called from a frame implementation)

used to define the image answer for the view also changs the answer type to image type (called from a frame implementation)

Parameters

$imgData
resource
$imgData
public boolean|DOMNode
# getSectionDOMElement( string $secId, string $xpath )

seeks a DOM element inside a section will return the first element if there is a multiple match

seeks a DOM element inside a section will return the first element if there is a multiple match

Parameters

$secId
string
$secId
$xpath
string
$xpath

Returns

boolean|DOMNode
public boolean|DOMNodeList
# getSectionDOMElements( string $secId, string $xpath )

seeks DOM elements inside a section

seeks DOM elements inside a section

Parameters

$secId
string
$secId
$xpath
string
$xpath

Returns

boolean|DOMNodeList
public boolean|DOMNode
# getDOMElement( string $path )

seeks a DOM element in the whole view

seeks a DOM element in the whole view

Parameters

$path
string
$path

Returns

boolean|DOMNode
public DOMNode
# getDOMSubElement( DOMNode $parent, string $path )

seeks a DOM element from a DOM parent element

seeks a DOM element from a DOM parent element

Parameters

$parent
DOMNode
$parent
$path
string
$path

Returns

DOMNode
public
# addScriptCode( string $scriptCode )

adds some custom script code in the view, in main section position

adds some custom script code in the view, in main section position

Parameters

$scriptCode
string
$scriptCode
public
# addBottomScriptCode( type $scriptcode )

adds some custom sript code in the view, in bottom section position

adds some custom sript code in the view, in bottom section position

Parameters

$scriptcode
type
$scriptcode
public array
# getSections( )

returns the associative array of sections

returns the associative array of sections

Name=>DOMNode

Returns

array
public strings
# getName( )

returns the view name

returns the view name

Returns

strings
public cmc\app
# getapp( )

returns the CMC application

returns the CMC application

Returns

cmc\app
public
# setapp( cmc\app $app )

rebinds the application to the object

rebinds the application to the object

Parameters

$app
cmc\app
$app
public
# setResponseCode( integer $code )

defines an HTTP response code

defines an HTTP response code

Parameters

$code
integer
$code
public integer
# getResponseCode( )

returns the current HTTP response code

returns the current HTTP response code

Returns

integer
public static cmc\ui\view
# create( cmc\app $app )

creates a new view instance

creates a new view instance

Parameters

$app
cmc\app
$app

Returns

cmc\ui\view
public boolean
# renderView( cmc\sess $sess )

final rendering process

final rendering process

at this stage, all frames have been executed the rendering is directly done if available, or returns false in case of error

Parameters

$sess
cmc\sess
$sess

Returns

boolean
public boolean
# materialChanged( )

used to check if the material items have changed

used to check if the material items have changed

it checks all files needed to build the material, EXCEPT php source files (like frame implementation) This is used to rebuild the view instead of reloading the static part from the cache

Returns

boolean
public boolean
# ValidForSave( )

used to check if the view safely can be written in the cache

used to check if the view safely can be written in the cache

Returns

boolean
public cmc\core\ui\material
# material( )

returns material instance

returns material instance

Returns

cmc\core\ui\material
public
# OnSerialize( )

called before serialize

called before serialize

Implementation of

cmc\core\ISerializable::OnSerialize()
public
# OnUnserialize( )

called after unserialize

called after unserialize

Implementation of

cmc\core\ISerializable::OnUnserialize()

Magic methods summary

Constants summary

string className __CLASS__
#

Properties summary

protected mixed $_app
#
protected integer $_respCode
#
protected mixed $_currentmaterial
#
protected mixed $_viewname
#
protected mixed $_sections
#
protected mixed $_viewLogicPath
#
protected mixed $_frames
#
protected mixed $_material_mdt
#
CMC for PHP API documentation generated by ApiGen 2.8.0