/pickles.php

Description

Core PICKLES Include File

This is the file that you include on the page you're instantiating the controller from (typically index.php). The path to the PICKLES code base is established as well as the path that Smarty will use to store the compiled pages.

PHP version 5

Licensed under The MIT License Redistribution of these files must retain the above copyright notice.

Includes
Strict Standards: Only variables should be passed by reference in /usr/local/Cellar/php53/5.3.13/lib/php/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/Smarty_Compiler.class.php on line 712 Warning: strftime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for 'EDT/-4.0/DST' instead in /usr/local/Cellar/php53/5.3.13/lib/php/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/Smarty_Compiler.class.php on line 370
require ($jar_file) (line 96)
Constants
Strict Standards: Only variables should be passed by reference in /usr/local/Cellar/php53/5.3.13/lib/php/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/Smarty_Compiler.class.php on line 712 Warning: strftime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for 'EDT/-4.0/DST' instead in /usr/local/Cellar/php53/5.3.13/lib/php/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/Smarty_Compiler.class.php on line 370
DISPLAY_JSON = 'JSON' (line 48)
DISPLAY_PHP = 'PHP' (line 49)
DISPLAY_RSS = 'RSS' (line 50)
DISPLAY_XML = 'XML' (line 51)
IS_CLI = !isset($_SERVER['REQUEST_METHOD']) (line 57)
JSON_AVAILABLE = function_exists('json_encode') (line 54)
LOG_PATH = PRIVATE_PATH.'logs/' (line 45)
PICKLES_CLASS_PATH = PICKLES_PATH.'classes/' (line 34)
PICKLES_PATH = dirname(__FILE__).'/' (line 33)
PICKLES_START_TIME = microtime(true) (line 30)
PRIVATE_PATH = SITE_PATH.'private/' (line 44)
SITE_CLASS_PATH = SITE_PATH.'classes/' (line 39)
SITE_MODEL_PATH = SITE_PATH.'models/' (line 40)
SITE_MODULE_PATH = SITE_PATH.'modules/' (line 41)
SITE_PATH = getcwd().'/../' (line 37)
SITE_TEMPLATE_PATH = SITE_PATH.'templates/' (line 42)
Functions
Strict Standards: Only variables should be passed by reference in /usr/local/Cellar/php53/5.3.13/lib/php/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/Smarty_Compiler.class.php on line 712 Warning: strftime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for 'EDT/-4.0/DST' instead in /usr/local/Cellar/php53/5.3.13/lib/php/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/Smarty_Compiler.class.php on line 370
readFileContents (line 62)
void readFileContents ( $directory)
  • $directory
__autoload (line 153)

Magic function to automatically load classes

Attempts to load a core PICKLES class or a site level data model or module class. If Smarty is being requested, will load the proper class from the vendors directory

  • return: Return value of require_once() or false (default)
boolean __autoload (string $class)
  • string $class: Name of the class to be loaded
__handleError (line 206)

Error handling function that thinks it's magical

Catches errors (warnings and the like) and throws it back out as an ErrorException. This really helps trapping complex errors that need a ton of sanity checks, just try / catch and you're good. Also, this isn't a magic function, but I opted to use the __ prefix to help avoid a naming collision since namespace support is 5.3+ and PICKLES strives to be 5.0+ compatible.

Keep in mind that fatal errors cannot and will not be handled.

  • return: not really returned, but worth documenting
ErrorException __handleError (integer $errno, string $errstr, string $errfile, integer $errline, array $errcontext)
  • integer $errno: the level of the error raised
  • string $errstr: the error message
  • string $errfile: filename that the error was raised in
  • integer $errline: line number the error was raised at
  • array $errcontext: array of every variable that existed in scope
__handleException (line 227)

Top level exception handling function

Catches uncaught exceptions and displays them.

void __handleException (object $exception)
  • object $exception: the exception

Documentation generated on Wed, 03 Oct 2012 17:46:06 -0400 by phpDocumentor 1.4.4