AtomikAtomik Framework Main class
Located in /Atomik.php (line 282)
static void
add
(array|string $key, [mixed $value = null], [bool $dimensionize = true], [ &$array = null], array $array)
static bool
dispatchPluggableApplication
(string $plugin, [string $uri = null], [array $config = array()])
static mixed
execute
(string $action, [bool|string $viewContext = true], [bool $triggerError = true])
static array
executeFile
(string $actionFilename, [array $vars = array()], [string $className = null])
static mixed
filter
(mixed $data, [mixed $filter = null], [mixed $options = null], [bool $falseOnFail = true])
static void
listenEvent
(string $event, callback $callback, [int $priority = 50], [bool $important = false])
static bool
loadCustomPlugin
(string $plugin, [array $config = array()], [array $options = array()])
static string|array
path
(string|array $file, [string|array|bool $paths = null], [bool $check = true])
static string
pluginUrl
(string $plugin, string $action, [array $params = array()], [bool $useIndex = true])
static void
prepend
(array|string $key, [mixed $value = null], [bool $dimensionize = true], [ &$array = null], array $array)
static void
registerPluggableApplication
(string $plugin, [string $route = null], [array $config = array()])
static string|bool
render
(string $view, [array $vars = array()], [bool $triggerError = true], [array $dirs = null])
static string
renderLayout
(string $layout, string $content, [array $vars = array()], [bool $triggerError = true], [array $dirs = null])
static void
set
(array|string $key, [mixed $value = null], [bool $dimensionize = true], [ &$array = null], [array $add = false], array $array)
static string
url
([string $action = null], [array $params = true], [bool $useIndex = true], [bool $useBaseAction = true])
static void
_errorHandler
(int $errno, string $errstr, [string $errfile = ''], [int $errline = 0], [mixed $errcontext = null])
static actionFilename (line 2137)
Returns an action's filename
static add (line 1333)
Adds a value to the array pointed by the key
If the first argument is an array, values are merged recursively. The array is first dimensionized You can add values to sub arrays by using a path-like key. For example, to add a value to the array $array[key1][key2] use the key 'key1/key2' If the value pointed by the key is not an array, it will be transformed to one. Can be used on any array by specifying the third argument
static appAsset (line 2353)
Returns the url of an asset file relative to the root application
static appRedirect (line 2674)
Same as Atomik::redirect() but for urls relative to the root application
static appUrl (line 2299)
Returns an url exactly like Atomik::url() but relative to the root application.
static asset (line 2334)
Returns the url of an asset file (ie. an url without index.php) relative to the current application scope
static attachClassListeners (line 2046)
Automatically registers event listeners for methods starting with "on"
static autoload (line 2413)
Class autoloader
static call (line 1960)
Calls a registered method
static debug (line 2774)
Equivalent to var_dump() but can be disabled using the configuration
static delete (line 1486)
Deletes a key from the store
Can delete through sub array using a path-like key Can be used on any array by specifying the second argument
static disableLayout (line 1211)
Disables the layout
static dispatch (line 503)
Dispatches the request
It takes an URI, applies routes, executes the action and renders the view. If $uri is null, the value of the GET parameter specified as the trigger will be used.
static dispatchPluggableApplication (line 1827)
Dispatches a pluggable application
static end (line 1222)
Fires the Atomik::End event and exits the application
static escape (line 2432)
Escapes text so it can be outputted safely
Uses escape profiles defined in the escaping configuration key
static execute (line 859)
Executes an action
Searches for a file called after the action (with the php extension) inside directories set under atomik/dirs/actions. If no file is found, it will search for a view and render it. If neither of them are found, it will throw an exception.
static executeFile (line 959)
Executes the action file inside a clean scope and returns defined variables
static filter (line 2514)
Filters data using PHP's filter extension
static fireEvent (line 2020)
Fires an event
static flash (line 2459)
Saves a message that can be retrieve only once
static friendlify (line 2624)
Makes a string friendly to urls
static get (line 1438)
Gets a value using its associatied key from the store
You can fetch value from sub arrays by using a path-like key. Separate each key with a slash. For example if you want to fetch the value from an $store[key1][key2][key3] you can use key1/key2/key3 Can be used on any array by specifying the third argument
static getLoadedPlugins (line 1775)
Returns all loaded plugins
static getRef (line 1514)
Gets a reference to a value from the store using its associatied key
You can fetch value from sub arrays by using a path-like key. Separate each key with a slash. For example if you want to fetch the value from an $store[key1][key2][key3] you can use key1/key2/key3 Can be used on any array by specifying the second argument
static has (line 1470)
Checks if a key is defined in the store
Can check through sub array using a path-like key Can be used on any array by specifying the second argument
static helper (line 1182)
Executes an helper
static isPluginAvailable (line 1761)
Checks if a plugin is available
static isPluginLoaded (line 1750)
Checks if a plugin is already loaded
static listenEvent (line 1995)
Registers a callback to an event
static loadCustomPlugin (line 1630)
Loads a custom plugin
Options:
static loadCustomPluginIfAvailable (line 1737)
Loads a custom plugin only if it's available
static loadHelper (line 1136)
Loads an helper file
static loadPlugin (line 1607)
Loads a plugin using the configuration specified under plugins
static loadPluginIfAvailable (line 1725)
Loads a plugin only if it's available
static log (line 2732)
Fire an Atomik::Log event to which logger can listen
static logToFile (line 2745)
Default logger: log the message to the file defined in atomik/files/log The message template can be define in atomik/log/message_template
static needed (line 2384)
static noRender (line 1007)
Prevents the view of the actionfrom which it's called to be rendered
static path (line 2083)
Builds a path.
Multiple cases possible:
1) path($setOfPaths, $asArray = false) Returns a path from a set of paths (the set can be a string or an array). If the second argument is true, it returns all paths from the set as an array
2) path($file, $setOfPaths, $check = true) Searches for a file in the set of paths and returns the first one it finds. If $check is set to false, it returns the filename as if it was in the first path from the set of paths. Returns false when $check is true and no file where found.
static pluginAsset (line 2368)
Returns the url of a plugin's asset file following the path template defined in the configuration.
static pluginRedirect (line 2691)
Same as Atomik::redirect() but redirects to a pluggable application
static pluginUrl (line 2314)
Returns an url exactly like Atomik::url() but relative to a plugin
static prepend (line 1349)
Prependes a value to the array pointed by the key
Works the same as add()
static redirect (line 2640)
Redirects to another url
static registerMethod (line 1945)
Registers a method that will be available on the Atomik class when using PHP5.3 or through Atomik::call() for previous versions.
static registerPluggableApplication (line 1796)
Registers a pluggable application
Possible configuration keys are:
static registerSelector (line 1591)
Registers a new selector namespace
A namespace preceed a key. When used, $callback will be called instead of the normal logic. Applies only on get() calls.
static render (line 1039)
Renders a view
Searches for a file called after the view inside directories configured in atomik/dirs/views. If no file is found, an exception is thrown unless $triggerError is false.
static renderException (line 2819)
Renders an exception
static renderFile (line 1071)
Renders a file using a filename which will not be resolved.
static renderLayout (line 1102)
Renders a layout
static reset (line 1570)
Resets the global store
If no argument are specified the store is resetted, otherwise value are set normally and the state is saved.
static route (line 711)
Parses an uri to extract parameters
Routes defines how to extract parameters from an uri. They can have additional default parameters. There are two kind of routes:
You can also name your routes using the @name parameter (which won't be included in the returned params). Named route can then be use with Atomik::url()
static run (line 368)
Starts Atomik
If dispatch is false, you will have to manually dispatch the request and exit.
static set (line 1256)
Sets a key/value pair in the store
If the first argument is an array, values are merged recursively. The array is first dimensionized You can set values from sub arrays by using a path-like key. For example, to set the value inside the array $array[key1][key2] use the key 'key1/key2' Can be used on any array by specifying the third argument
static setView (line 1019)
Modifies the view associted to the action from which it's called
static trigger404 (line 2703)
Triggers a 404 error
static uriMatch (line 666)
Checks if an uri matches the pattern. The pattern can contain the * wildcard at the end to specify that it matches the target and all its child segments.
static url (line 2190)
Returns an url for the action depending on whether url rewriting is used or not. Will return an url relative to the current application scope.
Ie. if a plugin uses this method, it will return an url for an action of itself
Can be used on links starting with a protocol but they will of course not be resolved like action names. Named routes can also be used (only specify the route name - with the @ - as the action)
The item "_merge_GET" can be use in $params to merge GET parameters with specified params.
static viewFilename (line 2158)
Returns a view's filename
static _dimensionizeArray (line 1385)
Recursively checks array for path-like keys (ie. keys containing slashes) and transform them into multi dimensions array
static _errorHandler (line 2804)
Catch errors and throw an ErrorException instead
static _getFlashMessages (line 2482)
Returns the flash messages saved in the session
static _mergeRecursive (line 1363)
Like array_merge() but recursively
static __callStatic (line 1975)
PHP 5.3 magic method to handle calls to undefined method
__call (line 1195)
PHP magic method to handle calls to helper in views
Documentation generated on Sat, 06 Feb 2010 22:07:02 +0000 by phpDocumentor 1.4.3