Functions

oxfunctions.php File Reference

Go to the source code of this file.

Functions

 oxAutoload ($sClass)
if(!function_exists(
'error_404_handler')) 
warningHandler ($iErrorNr, $sErrorText)
 dumpVar ($mVar, $blToFile=false)
if(!function_exists( 'isAdmin'))
if(!function_exists(
'isSearchEngineUrl')) 
debug ($mVar)
 cmpart ($a, $b)
if(!function_exists(
'startProfile')) if(!function_exists(
'stopProfile')) 
oxNew ($sClassName)
 oxNewArticle ($sArtId)
 getDb ($blAssoc=true)
 getStr ()
 ox_get_template ($sTplName, &$sTplSource, $oSmarty)
 ox_get_timestamp ($sTplName, &$iTplTimestamp, $oSmarty)
 ox_get_secure ($sTplName, $oSmarty)
 ox_get_trusted ($sTplName, $oSmarty)

Function Documentation

cmpart ( a,
b 
)

Sorting for crossselling

Parameters:
object $a first compare item
object $b second compre item
Returns:
integer

Start profiling

Parameters:
string $sProfileName name of profile
Returns:
null

Stop profiling

Parameters:
string $sProfileName name of profile
Returns:
null

Definition at line 202 of file oxfunctions.php.

if (!function_exists( 'isAdmin')) if (!function_exists( 'isSearchEngineUrl')) debug ( mVar  ) 

prints anything given into a file, for debugging

Parameters:
mixed $mVar variable to debug
Returns:
null

Definition at line 186 of file oxfunctions.php.

dumpVar ( mVar,
blToFile = false 
)

Dumps $mVar information to vardump.txt file. Used in debugging.

Parameters:
mixed $mVar variable
bool $blToFile marker to write log info to file (must be true to log)
Returns:
null

Returns false as function returning true is supposed to be defined in admin/index.php dir. In OXID you can use isAdmin() to detect if code is executed in admin. Note: It does not detect if admion is logged in just identifies the place where it is called from.

Returns:
bool

Returns search engine url status

Returns:
bool

Definition at line 129 of file oxfunctions.php.

getDb ( blAssoc = true  ) 

Returns current DB handler

Parameters:
bool $blAssoc data fetch mode
Returns:
oxDb

Definition at line 290 of file oxfunctions.php.

getStr (  ) 

Returns string handler

Returns:
oxStr

Definition at line 300 of file oxfunctions.php.

ox_get_secure ( sTplName,
oSmarty 
)

Assumes all templates are secure, returns true.

Parameters:
string $sTplName not used here
object $oSmarty not used here
Returns:
bool

Definition at line 354 of file oxfunctions.php.

ox_get_template ( sTplName,
&$  sTplSource,
oSmarty 
)

Sets template name to passed reference, returns true.

Parameters:
string $sTplName name of template
string &$sTplSource Template source
object $oSmarty not used here
Returns:
bool

Definition at line 314 of file oxfunctions.php.

ox_get_timestamp ( sTplName,
&$  iTplTimestamp,
oSmarty 
)

Sets timestamt to passed timestamp object, returns true.

Parameters:
string $sTplName name of template
string &$iTplTimestamp template timestamp referense
object $oSmarty not used here
Returns:
bool

Definition at line 333 of file oxfunctions.php.

ox_get_trusted ( sTplName,
oSmarty 
)

Does nothing.

Parameters:
string $sTplName not used here
object $oSmarty not used here
Returns:
null

Returns language table index

Parameters:
int $iLangId language id
Returns:
string

Returns language table name

Parameters:
string $sTable table name
int $iLangId language id
Returns:
string

Return the view name of the given table if a view exists, otherwise the table name itself

Parameters:
string $sTable table name
int $iLangId language id [optional]
string $sShopId shop id, otherwise config->myshopid is used [optional]
Returns:
string

Returns request url, which was executed to render current page view

Parameters:
string $sParams Parameters to object
bool $blReturnUrl If return url
Returns:
string

Definition at line 368 of file oxfunctions.php.

oxAutoload ( sClass  ) 

Includes $sClass class file

Parameters:
string $sClass classname
Returns:
null

error_404_handler handler for 404 (page not found) error

Parameters:
string $sUrl url wich was given, can be not specified in some cases
Returns:
void

Definition at line 10 of file oxfunctions.php.

if (!function_exists( 'startProfile')) if (!function_exists( 'stopProfile')) oxNew ( sClassName  ) 

Creates and returns new object. If creation is not available, dies and outputs error message.

Parameters:
string $sClassName Name of class
Exceptions:
oxSystemComponentException in case that class does not exists
Returns:
object

Definition at line 262 of file oxfunctions.php.

oxNewArticle ( sArtId  ) 

Creates, loads returns oxarticle object

Parameters:
string $sArtId product id
Returns:
oxarticle

Definition at line 278 of file oxfunctions.php.

if (!function_exists( 'error_404_handler')) warningHandler ( iErrorNr,
sErrorText 
)

Displays 'nice' HTML formatted user error. Later this method is hooked as error handler by calling set_error_handler('warningHandler', E_USER_WARNING); T2008-07-22 Not used yet

Parameters:
int $iErrorNr error number
string $sErrorText error message
Returns:
null

Definition at line 116 of file oxfunctions.php.