phpDocumentor openbiz.bin
[ class tree: openbiz.bin ] [ index: openbiz.bin ] [ all elements ]

Class: BizSystem

Source Location: /BizSystem.php

Class BizSystem

Class Overview

BizSystem class

BizSystem is initialized for each request, it provides infrastructure objects and utility methods which are used in whole request. BizSystem is singleton pattern class that can create instant with BizSystem::instance.

Located in /BizSystem.php [line 41]



		
				Author(s):
		
  • Rocky Swen
API Tags:
Access:  public

Information Tags:
Copyright:  Copyright (c) 2005-2009, Rocky Swen

Methods

[ Top ]
Method Summary
void   __destruct()   Destruct object: save object session variables
boolean   AllowUserAccess()   Check if user can access the given resource action
ClientProxy   ClientProxy()   Get the ClientProxy object this static method wrapping the GetClientProxy method
Configuration   Configuration()   Get the Configuration object this static method wrapping the Configuration method
string   CurrentPageURL()   Get current page URL
ClientProxy   GetClientProxy()   Get the ClientProxy object
Configuration   GetConfiguration()   Get the Configuration object
string   GetCurrentViewName()   Get the current view name
string   GetCurrentViewSet()   Get the current view set
Zend_DB_Adapter   GetDBConnection()   Get the database connection object
string   GetLibFileWithPath()   Get openbiz library php file path by searching modules/package, /bin/package and /bin
string   GetMacroValue()   Evaluate macro, this method can only be used to get profile in 2.0 For example, @macro_var:macro_key. i.e. @profile:ROLE
string   GetMessage()   Get message resource enhanced by Jixian
ObjectFactory   GetObjectFactory()   Get the ObjectFactory object
   GetService()   Get the service object
SessionContext   GetSessionContext()   Get the SessionContext object
Smarty   GetSmartyTemplate()   Get smarty template
string   GetTplFileWithPath()   Get openbiz template file path by searching modules/package, /templates
TypeManager   GetTypeManager()   Get the TypeManager object
array   GetUserProfile()   Get user profile
array   &GetXmlArray()   Get Xml Array.
string   GetXmlFileWithPath()   Get Xml file with path
Zend_View   GetZendTemplate()   Get Zend Template
array   InitUserProfile()   Initialize User Profile
BizSystem   instance()   Create instant of BizSystem
void   log()   Log message to log file
void   logError()  
ObjectFactory   ObjectFactory()   Get get the ObjectFactory object as static method this static method wrapping the GetObjectFactory method
SessionContext   SessionContext()   Get the SessionContext object this static method wrapping the GetObjectFactory method
void   SetCurrentViewName()   Set the current view name
void   SetCurrentViewSet()   Set current view set
TypeManager   TypeManager()   Get the TypeManager object this static method wrapping the GetTypeManager method

[ Top ]
Methods
Destructor __destruct  [line 87]

  void __destruct( )

Destruct object: save object session variables


API Tags:
Access:  public


[ Top ]
AllowUserAccess  [line 244]

  boolean AllowUserAccess( string $res_action  )

Check if user can access the given resource action

Parameters:
string   $res_action:  resource action

API Tags:
Return:  true or false
Access:  public


[ Top ]
ClientProxy  [line 189]

  ClientProxy ClientProxy( )

Get the ClientProxy object this static method wrapping the GetClientProxy method


API Tags:
Return:  the ClientProxy object
Static:  
Access:  public


[ Top ]
Configuration  [line 163]

  Configuration Configuration( )

Get the Configuration object this static method wrapping the Configuration method


API Tags:
Return:  the Configuration object
Static:  
Access:  public


[ Top ]
CurrentPageURL  [line 334]

  string CurrentPageURL( )

Get current page URL


API Tags:
Return:  current page URL
Static:  
Access:  public


[ Top ]
GetClientProxy  [line 173]

  ClientProxy GetClientProxy( )

Get the ClientProxy object


API Tags:
Return:  the ClientProxy object
Access:  public


[ Top ]
GetConfiguration  [line 147]

  Configuration GetConfiguration( )

Get the Configuration object


API Tags:
Return:  the Configuration object
Access:  public


[ Top ]
GetCurrentViewName  [line 288]

  string GetCurrentViewName( )

Get the current view name


API Tags:
Return:  current view name
Access:  public


[ Top ]
GetCurrentViewSet  [line 311]

  string GetCurrentViewSet( )

Get the current view set


API Tags:
Return:  current view set
Access:  public


[ Top ]
GetDBConnection  [line 348]

  Zend_DB_Adapter GetDBConnection( [mixed $dbname = null], string $dbname,  )

Get the database connection object

Parameters:
string   $dbname,:  database name declared in config.xml

API Tags:
Access:  public


[ Top ]
GetLibFileWithPath  [line 483]

  string GetLibFileWithPath( string $className, [mixed $packageName = ""]  )

Get openbiz library php file path by searching modules/package, /bin/package and /bin

Parameters:
string   $className: 

API Tags:
Return:  php library file path
Static:  
Access:  public


[ Top ]
GetMacroValue  [line 390]

  string GetMacroValue( mixed $var, mixed $key, string $var,, string $key,  )

Evaluate macro, this method can only be used to get profile in 2.0 For example, @macro_var:macro_key. i.e. @profile:ROLE

Parameters:
string   $var,:  macro name
string   $key,:  macro key

API Tags:
Access:  public


[ Top ]
GetMessage  [line 523]

  string GetMessage( $msgid, [ $params = array()]  )

Get message resource enhanced by Jixian

Parameters:
   $msgid:  string id of message
   $params:  array array of parameters

API Tags:
Return:  message
Static:  
Access:  public


[ Top ]
GetObjectFactory  [line 99]

  ObjectFactory GetObjectFactory( )

Get the ObjectFactory object


API Tags:
Return:  the ObjectFactory object
Access:  public


[ Top ]
GetService  [line 226]

  GetService( string $service, [mixed $new = 0]  )

Get the service object

Parameters:
string   $service:  service name

API Tags:
Return:  the service object
Access:  public


[ Top ]
GetSessionContext  [line 125]

  SessionContext GetSessionContext( )

Get the SessionContext object


API Tags:
Return:  the SessionContext object
Access:  public


[ Top ]
GetSmartyTemplate  [line 404]

  Smarty GetSmartyTemplate( )

Get smarty template


API Tags:
Return:  smarty object
Static:  
Access:  public


[ Top ]
GetTplFileWithPath  [line 472]

  string GetTplFileWithPath( mixed $templateFile, mixed $packageName, string $className  )

Get openbiz template file path by searching modules/package, /templates

Parameters:
string   $className: 

API Tags:
Return:  php library file path
Static:  
Access:  public


[ Top ]
GetTypeManager  [line 199]

  TypeManager GetTypeManager( )

Get the TypeManager object


API Tags:
Return:  the TypeManager object
Access:  public


[ Top ]
GetUserProfile  [line 271]

  array GetUserProfile( [string $attribute = null]  )

Get user profile

Parameters:
string   $attribute:  user attribute

API Tags:
Return:  user profile array
Access:  public


[ Top ]
GetXmlArray  [line 510]

  array &GetXmlArray( string $xmlFile  )

Get Xml Array.

If xml file has been compiled (has .cmp), load the cmp file as array; otherwise, compile the .xml to .cmp first new 2.2.3, .cmp files will be created in app/cache/metadata_cmp directory. replace '/' with '_' for example, /module/demo/BOEvent.xml has cmp file as _module_demo_BOEvent.xml

Parameters:
string   $xmlFile: 

API Tags:
Static:  
Access:  public


[ Top ]
GetXmlFileWithPath  [line 461]

  string GetXmlFileWithPath( string $xmlobj  )

Get Xml file with path

Search the object metedata file as objname+.xml in metedata directories name convension: demo.BOEvent points to metadata/demo/BOEvent.xml new in 2.2.3, demo.BOEvent can point to modules/demo/BOEvent.xml

Parameters:
string   $xmlobj:  xml object

API Tags:
Return:  xml config file path
Static:  
Access:  public


[ Top ]
GetZendTemplate  [line 414]

  Zend_View GetZendTemplate( )

Get Zend Template


API Tags:
Return:  zend view template object
Static:  
Access:  public


[ Top ]
InitUserProfile  [line 256]

  array InitUserProfile( string $userId  )

Initialize User Profile

Parameters:
string   $userId: 

API Tags:
Return:  Profile array
Access:  public


[ Top ]
instance  [line 62]

  BizSystem instance( )

Create instant of BizSystem


API Tags:
Return:  instant of BizSystem
Static:  
Access:  public


[ Top ]
log  [line 437]

  void log( mixed $priority, mixed $subject, mixed $message, integer $priority., string $subject., string $message., string $file_name  )

Log message to log file

Parameters:
integer   $priority.:  it can be one of following value LOG_EMERG system is unusable = 1 LOG_ALERT action must be taken immediately = LOG_EMERG LOG_CRIT critical conditions = LOG_EMERG LOG_ERR error conditions = 4 LOG_WARNING warning conditions = 5 LOG_NOTICE normal, but significant, condition = 6 LOG_INFO informational message = LOG_NOTICE LOG_DEBUG debug-level message = LOG_NOTICE ### So LOG_EMERG, LOG_ERR, LOG_WARNING and LOG_DEBUG are valid inputs ###
string   $subject.:  the log subject decided by caller function
string   $message.:  the message to be logged in log file
string   $file_name:  file to save to

API Tags:
Static:  
Access:  public


[ Top ]
logError  [line 444]

  void logError( mixed $priority, mixed $subject, mixed $message, [mixed $file_name = NULL]  )


API Tags:
Static:  
Access:  public


[ Top ]
ObjectFactory  [line 115]

  ObjectFactory ObjectFactory( )

Get get the ObjectFactory object as static method this static method wrapping the GetObjectFactory method


API Tags:
Return:  the ObjectFactory object
Static:  
Access:  public


[ Top ]
SessionContext  [line 137]

  SessionContext SessionContext( )

Get the SessionContext object this static method wrapping the GetObjectFactory method


API Tags:
Return:  the SessionContext object
Static:  
Access:  public


[ Top ]
SetCurrentViewName  [line 300]

  void SetCurrentViewName( string $viewname  )

Set the current view name

Parameters:
string   $viewname:  new current view name

API Tags:
Access:  public


[ Top ]
SetCurrentViewSet  [line 323]

  void SetCurrentViewSet( $viewSet  )

Set current view set

Parameters:
   $viewSet: 

API Tags:
Access:  public


[ Top ]
TypeManager  [line 215]

  TypeManager TypeManager( )

Get the TypeManager object this static method wrapping the GetTypeManager method


API Tags:
Return:  the TypeManager object
Static:  
Access:  public


[ Top ]

Documentation generated on Tue, 22 Dec 2009 03:02:38 -0800 by phpDocumentor 1.3.0RC3