SproutCMS

This is the code documentation for the SproutCMS project

class Kohana

Provides Kohana-specific helper functions. This is where the magic happens!

$Id: Kohana.php 4372 2009-05-28 17:00:34Z ixmatus $

Extending this class

<?php
/**
* New class description goes here
* 
* @author Your Name, 2026-09-16
**/
class NewClassName extends Kohana {
    
    /**
    * Ends the current output buffer with callback in mind
    * PHP doesn't pass the output to the callback defined in ob_start() since 5.4
    **/
    protected function _obEndClean (callback $callback) {
        // Method code goes here
    }
    
    /**
    * Quick debugging of any variable. Any number of parameters can be set.
    **/
    public function debug () {
        // Method code goes here
    }
    
    /**
    * Displays nice backtrace information.
    **/
    public function backtrace (array $trace) {
        // Method code goes here
    }
    
    /**
    * Saves the internal caches: configuration, include paths, etc.
    **/
    public function internalCacheSave () {
        // Method code goes here
    }
    
    /**
    * Retrieves current user agent information:
    * keys:  browser, version, platform, mobile, robot, referrer, languages, charsets
    * tests: is_browser, is_mobile, is_robot, accept_lang, accept_charset
    **/
    public function userAgent (string $key, string $compare) {
        // Method code goes here
    }
    
    /**
    * Returns the value of a key, defined by a 'dot-noted' string, from an array.
    **/
    public function keyString (array $array, string $keys) {
        // Method code goes here
    }
    
    /**
    * Sets values in an array by using a 'dot-noted' string.
    **/
    public function keyStringSet (array $array, string $keys, $fill) {
        // Method code goes here
    }
    
    /**
    * Log exceptions in the database
    **/
    public function logException ((\Exception|\Throwable) $exception) {
        // Method code goes here
    }
    
    /**
    * Exception handler.
    **/
    public function exceptionHandler (object $exception) {
        // Method code goes here
    }
    
    /**
    * Find a resource file in a given directory. Files will be located according
    * to the order of the include paths. Configuration and i18n files will be
    * returned in reverse order.
    **/
    public function findFile (string $directory, string $filename, boolean $required, string $ext) {
        // Method code goes here
    }
    
    /**
    * Fetch an i18n language item.
    **/
    public function lang (string $key, array $args) {
        // Method code goes here
    }
    
    /**
    * Lists all files and directories in a resource path.
    **/
    public function listFiles (string $directory, boolean $recursive, string $path) {
        // Method code goes here
    }
    
    /**
    * Loads the controller and initializes it. Runs the pre_controller,
    * post_controller_constructor, and post_controller events. Triggers
    * a system.404 event when the route cannot be mapped to a controller.
    **/
    public function instance () {
        // Method code goes here
    }
    
    /**
    * Get all include paths. APPPATH is the first path, followed by module
    * paths in the order they are configured.
    **/
    public function includePaths (boolean $process) {
        // Method code goes here
    }
    
    /**
    * Get a config item or group.
    **/
    public function config (string $key, boolean $slash, boolean $required) {
        // Method code goes here
    }
    
    /**
    * Sets a configuration item, if allowed.
    **/
    public function configSet (string $key, string $value) {
        // Method code goes here
    }
    
    /**
    * Load a config file.
    **/
    public function configLoad (string $name, boolean $required) {
        // Method code goes here
    }
    
    /**
    * Clears a config group from the cached configuration.
    **/
    public function configClear (string $group) {
        // Method code goes here
    }
    
    /**
    * Deprecated.
    * 
    * This function has been removed, and it's signature has
    * been left for compatibilty only.
    **/
    public function log ($type, $message) {
        // Method code goes here
    }
    
    /**
    * Disable the find-files and configuration caches
    * This may be required if the caching is causing problems
    **/
    public function disableCache () {
        // Method code goes here
    }
    
    /**
    * Load data from a simple cache file. This should only be used internally,
    * and is NOT a replacement for the Cache library.
    **/
    public function cache (string $name) {
        // Method code goes here
    }
    
    /**
    * Save data to a simple cache file. This should only be used internally, and
    * is NOT a replacement for the Cache library.
    **/
    public function cacheSave (string $name, mixed $data) {
        // Method code goes here
    }
    
    /**
    * Kohana output handler. Called during ob_clean, ob_flush, and their variants.
    **/
    public function outputBuffer (string $output) {
        // Method code goes here
    }
    
    /**
    * Closes all open output buffers, either by flushing or cleaning, and stores the Kohana
    * output buffer for display during shutdown.
    **/
    public function closeBuffers (boolean $flush) {
        // Method code goes here
    }
    
    /**
    * Triggers the shutdown of Kohana by closing the output buffer, runs the system.display event.
    **/
    public function shutdown () {
        // Method code goes here
    }
    
    /**
    * Inserts global Kohana variables into the generated output and prints it.
    **/
    public function render (string $output) {
        // Method code goes here
    }
    
    /**
    * Sets up the PHP environment. Adds error/exception handling, output
    * buffering, and adds an auto-loading method for loading classes.
    * 
    * For security, this function also destroys the $_REQUEST global variable.
    * Using the proper global (GET, POST, COOKIE, etc) is inherently more secure.
    **/
    public function setup () {
        // Method code goes here
    }
    
    /**
    * Converts PHP errors into {@see ErrorException}s
    **/
    public function errorHandler (int $errno, string $errmsg, string $file, int $line) {
        // Method code goes here
    }
    
    /**
    * Displays a 404 page.
    **/
    public function show404 (string $page) {
        // Method code goes here
    }
    
}
?>