ZenMagick 0.9.8


org.zenmagick.store.Runtime
\store\Runtime.php at line 34

Class Runtime

ZMObject
└─ZMRuntime
└─Runtime

public class Runtime
extends ZMRuntime

Store runtime.

Author:
DerManoMann
Version:
$Id: Runtime.php 2757 2009-12-18 01:05:38Z dermanomann $

Method Summary
static void

finish()

Finish execution.

static string

getBaseURL(boolean secure)

Get the store base URL.

static string

getContext()

The application context.

static ZMCurrency

getCurrency()

Get the current currency.

static queryFactory

getDB()

Get the database dao.

static ZMLanguage

getDefaultLanguage()

Get the default language.

static ZMLanguage

getLanguage()

Get the language.

static string

getPluginContext()

Get the context for plugins.

static string

getPluginPathPrefix()

Return the base path for plugin URIs.

static ZMTheme

getTheme()

Get the current theme.

static string

getThemeId()

Get the effective theme id.

static string

getThemesDir()

Return the directory containing all themes.

static string

getThemesPathPrefix()

Return the base path for theme URIs.

static void

setTheme(ZMTheme theme)

Set the current theme.

static void

setThemeId(string themeId)

Set the theme id.

Methods inherited from org.zenmagick.core.ZMRuntime
getApplicationPath, getDatabase, getDatabases, getExecutionTime, getInstallationPath, getPluginBasePath, yamlLoad
Methods inherited from org.zenmagick.core.ZMObject
attachMethod, get, getAttachedMethods, getPropertyNames, set, singleton

Method Detail

\store\Runtime.php at line 188

finish

public static void finish()

Finish execution.

Calling this function should be the last line in your script.


\store\Runtime.php at line 199

getBaseURL

public static string getBaseURL(boolean secure)

Get the store base URL.

Parameters:
secure - If set, return a secure URL (if configured); default is false.
Returns:
The store base url.

\store\Runtime.php at line 82

getContext

public static string getContext()

The application context.

Returns:
The application context.

\store\Runtime.php at line 177

getCurrency

public static ZMCurrency getCurrency()

Get the current currency.

Returns:
The current currency.

\store\Runtime.php at line 45

getDB

public static queryFactory getDB()

Get the database dao.

Returns:
*The* zen-cart queryFactory instance.

\store\Runtime.php at line 160

getDefaultLanguage

public static ZMLanguage getDefaultLanguage()

Get the default language.

Returns:
The default language.

\store\Runtime.php at line 151

getLanguage

public static ZMLanguage getLanguage()

Get the language.

Returns:
The current language.

\store\Runtime.php at line 52

getPluginContext

public static string getPluginContext()

Get the context for plugins.

Returns:
Either Plugin::CONTEXT_STOREFRONT or Plugin::CONTEXT_ADMIN.

\store\Runtime.php at line 75

getPluginPathPrefix

public static string getPluginPathPrefix()

Return the base path for plugin URIs.

Returns:
The URL path prefix for all plugins.

\store\Runtime.php at line 129

getTheme

public static ZMTheme getTheme()

Get the current theme.

Returns:
The current theme.

\store\Runtime.php at line 89

getThemeId

public static string getThemeId()

Get the effective theme id.

Returns:
The currently effective theme id.

\store\Runtime.php at line 61

getThemesDir

public static string getThemesDir()

Return the directory containing all themes.

Returns:
The base directory for themes.

\store\Runtime.php at line 68

getThemesPathPrefix

public static string getThemesPathPrefix()

Return the base path for theme URIs.

Returns:
The URL path prefix for all themes.

\store\Runtime.php at line 142

setTheme

public static void setTheme(ZMTheme theme)

Set the current theme.

Parameters:
theme - The theme.

\store\Runtime.php at line 119

setThemeId

public static void setThemeId(string themeId)

Set the theme id.

This will overwrite the configured theme id.

Calling this method is quite expensive, as all theme specific stuff needs to be updated - this is not completely implemented yet.

Parameters:
themeId - The new theme id.

ZenMagick 0.9.8