Zikula: A Flexible Open Source Content Management System
home | forum | international support | contact us

Docs For Class Loader

Class: Loader

Source Location: /pnobjlib/Loader.class.php

Class Overview


Loader

Methods


Inherited Variables

Inherited Methods


Class Details

[line 20] Loader



[ Top ]

Class Methods


method includeOnce [line 289]

bool includeOnce( string $file)

Internal include_once, considerably faster



Tags:

return:  True if file was included - false if not found or included before.
author:  Drak


Parameters:

string   $file  

[ Top ]

method loadAllFiles [line 77]

boolean loadAllFiles( files $files, [path $path = null], [exitOnError $exitOnError = false])

Load all files from the specified location in the pn file tree



Tags:

return:  true


Parameters:

files   $files   An array of filenames to load
path   $path   The path prefix to use (optional) (default='null')
exitOnError   $exitOnError   whether or not exit upon error (optional) (default=true)

[ Top ]

method loadArrayClassFromModule [line 251]

string loadArrayClassFromModule( module $module, base_obj_type $base_obj_type, [exitOnError $exitOnError = false], [prefix $prefix = 'PN'])

Load a PNObjectArray extended class from the given module. The given class name is prefixed with 'PN' and underscores are removed to produce a proper class name.



Tags:

return:  The ClassName which was loaded from the file


Parameters:

module   $module   The module to load from
base_obj_type   $base_obj_type   The base object type for which to load the class
exitOnError   $exitOnError   whether or not exit upon error (optional) (default=true)
prefix   $prefix   Override parameter for the default PN prefix (default=PN)

[ Top ]

method loadClass [line 150]

string loadClass( className $className, [classPath $classPath = 'includes/pnobjlib'], [exitOnError $exitOnError = true])

Load a class file from the specified location in the file tree



Tags:

return:  The file name which was loaded


Parameters:

className   $className   The class-basename to load
classPath   $classPath   The path prefix to use (optional) (default='includes/pnobjlib')
exitOnError   $exitOnError   whether or not exit upon error (optional) (default=true)

[ Top ]

method loadClassFromModule [line 182]

string loadClassFromModule( module $module, base_obj_type $base_obj_type, [array $array = false], [exitOnError $exitOnError = false], [prefix $prefix = 'PN'])

Load a PNObject extended class from the given module. The given class name is prefixed with 'PN' and underscores are removed to produce a proper class name.



Tags:

return:  The ClassName which was loaded from the file


Parameters:

module   $module   The module to load from
base_obj_type   $base_obj_type   The base object type for which to load the class
array   $array   If true, load the array class instead of the single-object class.
exitOnError   $exitOnError   whether or not exit upon error (optional) (default=true)
prefix   $prefix   Override parameter for the default PN prefix (default=PN)

[ Top ]

method loadFile [line 32]

string loadFile( fileName $fileName, [path $path = null], [exitOnError $exitOnError = true], [returnVar $returnVar = null])

Load a file from the specified location in the pn file tree



Tags:

return:  The file which was loaded


Parameters:

fileName   $fileName   The name of the file to load
path   $path   The path prefix to use (optional) (default=null)
exitOnError   $exitOnError   whether or not exit upon error (optional) (default=true)
returnVar   $returnVar   The variable to return from the sourced file (optional) (default=null)

[ Top ]

method loadFiles [line 112]

boolean loadFiles( files $files, [path $path = null], [all $all = false], [exitOnError $exitOnError = false], [returnVar $returnVar = ''])

Load multiple files from the specified location in the pn file tree Note that in it's default invokation, this method exits after the first successful file load.



Tags:

return:  true


Parameters:

files   $files   Array of filenames to load
path   $path   The path prefix to use (optional) (default='null')
all   $all   whether or not to load all files or exit upon 1st successful load (optional) (default=false)
exitOnError   $exitOnError   whether or not exit upon error (optional) (default=true)
returnVar   $returnVar   The variable to return if $all==false (optional) (default=null)

[ Top ]

method loadOneFile [line 93]

boolean loadOneFile( files $files, [path $path = null], [exitOnError $exitOnError = false])

Return after the first successful file load. This corresponds to the default behaviour of loadFiles().



Tags:

return:  true


Parameters:

files   $files   An array of filenames to load
path   $path   The path prefix to use (optional) (default='null')
exitOnError   $exitOnError   whether or not exit upon error (optional) (default=true)

[ Top ]

method requireOnce [line 314]

bool requireOnce( string $file)

Internal require_once, considerably faster



Tags:

author:  Drak


Parameters:

string   $file  

[ Top ]

method _is_included [line 265]

bool _is_included( string $file, [bool $write = false])

cache for results of includes done this was because min version is not PHP5





Parameters:

string   $file  
bool   $write  

[ Top ]

Packages:

Files:

Classes: