Open Journal Systems  2.4.3
 All Classes Namespaces Functions Variables Groups Pages
PKPApplication Class Reference
Inheritance diagram for PKPApplication:
Application

Public Member Functions

 buildErrorMessage ($errorno, $errstr, $errfile, $errline)
 
 defineExposedConstant ($name, $value)
 
 errorHandler ($errorno, $errstr, $errfile, $errline)
 
 execute ()
 
getApplication ()
 
 getContextDepth ()
 
 getContextList ()
 
getCurrentVersion ()
 
 getDAOMap ()
 
getDispatcher ()
 
getEnabledProducts ($category=null, $mainContextId=null)
 
getExposedConstants ()
 
 getJSLocaleKeys ()
 
 getName ()
 
 getNameKey ()
 
 getPluginCategories ()
 
 getQualifiedDAOName ($name)
 
getRequest ()
 
 getVersionDescriptorUrl ()
 
instantiateHelp ()
 

Detailed Description

Class describing this application.

Definition at line 39 of file PKPApplication.inc.php.

Member Function Documentation

PKPApplication::buildErrorMessage (   $errorno,
  $errstr,
  $errfile,
  $errline 
)

Auxiliary function to errorHandler that returns a formatted error message. Error type formatting code adapted from ash, http://ca3.php.net/manual/en/function.set-error-handler.php

Parameters
$errornostring
$errstrstring
$errfilestring
$errlinestring
Returns
$message string

Definition at line 409 of file PKPApplication.inc.php.

References DBConnection\getConn(), getName(), Config\getVar(), Core\serverPHPOS(), and Core\serverPHPVersion().

Referenced by errorHandler().

PKPApplication::defineExposedConstant (   $name,
  $value 
)

Define a constant so that it can be exposed to the JS front-end.

Parameters
$namestring
$valuemixed

Definition at line 522 of file PKPApplication.inc.php.

References getExposedConstants().

PKPApplication::errorHandler (   $errorno,
  $errstr,
  $errfile,
  $errline 
)

Custom error handler

NB: Custom error handlers are called for all error levels independent of the error_reporting parameter.

Parameters
$errornostring
$errstrstring
$errfilestring
$errlinestring

Definition at line 383 of file PKPApplication.inc.php.

References buildErrorMessage(), and Config\getVar().

PKPApplication::execute ( )

This executes the application by delegating the request to the dispatcher.

Definition at line 187 of file PKPApplication.inc.php.

References getDispatcher(), and getRequest().

& PKPApplication::getApplication ( )

Get the current application object

Returns
Application

Definition at line 137 of file PKPApplication.inc.php.

References Registry\get().

Referenced by UsageEventPlugin\_buildUsageEvent(), BlockPlugin\_getContextSpecificHomepageHook(), PKPPlugin\_getContextSpecificInstallationHook(), Core\_getUrlComponents(), O4DOIExportDom\_headerElement(), SolrWebService\_makeRequest(), SiteSettingsForm\display(), UserRolesRequiredPolicy\effect(), QuickSubmitForm\execute(), FunctionalDoiExportTest\fakeRouter(), ThesisFeedGatewayPlugin\fetch(), Version\fromString(), PluginRegistry\getCategories(), ThesisFeedBlockPlugin\getContents(), Core\getContextPaths(), PKPPlugin\getContextSpecificSetting(), VersionDAO\getCurrentVersion(), DAORegistry\getDAO(), Journal\getDefaultMetricType(), getDispatcher(), PKPHelp\getHelp(), VersionCheck\getLatestVersion(), Journal\getMetrics(), PKPPlugin\getSettingMainContext(), VersionDAO\getVersionHistory(), IssueGalley\getViews(), ArticleGalley\getViews(), PublishedArticle\getViews(), PKPPlugin\installContextSpecificSettings(), PKPPlugin\installSiteSettings(), PluginRegistry\loadCategory(), NotificationHandler\notificationFeed(), TemplateBasedFilter\process(), UsageStatsPlugin\register(), Nlm30XmlFilterTestCase\setUp(), FunctionalPubIdsImportExportTest\setUp(), Nlm30CitationSchemaCitationOutputFormatFilterTest\setUp(), FunctionalNativeImportTest\setUp(), SolrWebServiceTest\setUp(), LucenePluginTest\setUp(), HandlerValidatorRolesTest\testHandlerValidatorRoles(), OAIMetadataFormat_DCTest\testToXml(), PKPPlugin\updateContextSpecificSetting(), and Form\validate().

PKPApplication::getContextDepth ( )

Get the "context depth" of this application, i.e. the number of parts of the URL after index.php that represent the context of the current request (e.g. Journal [1], or Conference and Scheduled Conference [2]).

Returns
int

Definition at line 217 of file PKPApplication.inc.php.

Referenced by getEnabledProducts().

PKPApplication::getContextList ( )

Get the list of the contexts available for this application i.e. the various parameters that are needed to represent the (e.g. array('journal') or array('conference', 'schedConf'))

Returns
Array

Definition at line 228 of file PKPApplication.inc.php.

Referenced by getEnabledProducts().

& PKPApplication::getCurrentVersion ( )

Return the current version of the application.

Returns
Version

Definition at line 301 of file PKPApplication.inc.php.

References getEnabledProducts(), and getName().

PKPApplication::getDAOMap ( )

Get the map of DAOName => full.class.Path for this application.

Returns
array

Definition at line 311 of file PKPApplication.inc.php.

Referenced by getQualifiedDAOName().

& PKPApplication::getDispatcher ( )

Get the dispatcher implementation singleton

Returns
Dispatcher

Definition at line 163 of file PKPApplication.inc.php.

References Registry\get(), and getApplication().

Referenced by execute().

& PKPApplication::getEnabledProducts (   $category = null,
  $mainContextId = null 
)

This function retrieves all enabled product versions once from the database and caches the result for further access.

Parameters
$categorystring
$mainContextIdinteger Optional ID of the top-level context (e.g. Journal, Conference, Press) to query for enabled products
Returns
array

Definition at line 253 of file PKPApplication.inc.php.

References getContextDepth(), getContextList(), DAORegistry\getDAO(), and getRequest().

Referenced by getCurrentVersion().

& PKPApplication::getExposedConstants ( )

Get an associative array of defined constants that should be exposed to the JS front-end.

Returns
array

Definition at line 534 of file PKPApplication.inc.php.

Referenced by defineExposedConstant().

PKPApplication::getJSLocaleKeys ( )

Get an array of locale keys that define strings that should be made available to JavaScript classes in the JS front-end.

Returns
array

Definition at line 544 of file PKPApplication.inc.php.

PKPApplication::getName ( )

Get the symbolic name of this application

Returns
string

Definition at line 197 of file PKPApplication.inc.php.

Referenced by buildErrorMessage(), and getCurrentVersion().

PKPApplication::getNameKey ( )

Get the locale key for the name of this application.

Returns
string

Definition at line 205 of file PKPApplication.inc.php.

PKPApplication::getPluginCategories ( )

Get the list of plugin categories for this application.

Definition at line 292 of file PKPApplication.inc.php.

PKPApplication::getQualifiedDAOName (   $name)

Return the fully-qualified (e.g. page.name.ClassNameDAO) name of the given DAO.

Parameters
$namestring
Returns
string

Definition at line 358 of file PKPApplication.inc.php.

References Registry\get(), and getDAOMap().

PKPApplication::getVersionDescriptorUrl ( )

Get the URL to the XML descriptor for the current version of this application.

Returns
string

Definition at line 238 of file PKPApplication.inc.php.

& PKPApplication::instantiateHelp ( )

Instantiate the help object for this application.

Returns
object

Definition at line 368 of file PKPApplication.inc.php.


The documentation for this class was generated from the following file: