Property | Type | Description | |
---|---|---|---|
$atk_version | string | This is a major version of Agile Toolkit. The APP of Agile Toolkit is very well established and changes rarely. Your application would generally be compatible throughout the same major version of Agile Tooolkit. | |
$compat_42 | boolean | Controller_Compat42 | If you want Agile Toolkit to be compatible with 4.2 version, include compatibility controller. | |
$config | array | Once configuration file is read, data is saved inside this property. | |
$config_files | array | If you are loading additional config later, use readConfig() instead Order of this array is important. | |
$config_files_loaded | array | Contains list of loaded config files. | |
$config_location | string | ." or inside "config" sub-folder by setting value to 'config' to better reflect your application layout. | |
$db | DB | In a typical application, one connection to the database is enough for majority of applications. Calling $app->dbConnect will read Database data from config file and store it in $db property. If you requires a more advanced connectivity or multiple connections, you can manually initialize more database connections. | |
$locale | string | This is the default locale for the application. You change this manually inside application APP class or use some controller which will pull this variable out of the URL. This variable will be respected throughout the framework. | |
$logger | Logger | Without logger, APP will dump out errors and exceptions in a very brief and straigtforward way. Logger is a controller which enhances error output and in most cases you do need one. Logger can be further configured to either output detailed errors or show brief message instead. | |
$logger_class | If you want to use your own logger class, redefine this property. | ||
$max_name_length | integer | Agile Toolkit implements a mechanism which will replace common beginning of objects with an abbreviation thus keeping object name length under control. This variable defines the maximum length of the object's $name. Be mindful that some objects will concatinate theri name with fields, so the maximum letgth of GET argument names can exceed this value by the length of your field. We recommend you to increase SUHOSIN get limits if you encounter any problems. Set this value to "false" to turn off name shortening. | |
$pathfinder | PathFinder | PathFinder is a controller which is responsible for locating resources, such as PHP includes, JavaScript files, templates, etc. APP Initializes PathFinder as soon as possible, then defines "Locations" which describe type of data found in different folders. | |
$pm | Controller_PageManager | PageManager object | |
$pr | object | Profiler measures relative time it took in certain parts of your application to help you find a slow-perfoming parts of application. By default $pr points to empty profiler object, which implements empty methods. All the lines referencing $pr myst be prefixed with the 4-symbol sequence "/ ** /" (no spaces). If you want to speed up Agile Toolkit further, you can eliminate all lines started with this sequence from your source code. | |
$unique_hashes | array | As more names are shortened, the substituted part is being placed into this hash and the value contains the new key. This helps to avoid creating many sequential prefixes for the same character sequenece. |
Property | Type | Description | |
---|---|---|---|
$pagemanager_class | string | Change a different Page Manager class. | |
$pagemanager_options | array | Set to array('debug' => true) to debug Page Manager. | |
$pathfinder_class | string | If you would want to use your own PathFinder class, you must change this property and include it. |
Method | Description | |
---|---|---|
_ ( string $str ) : string | Redefine this function to introduce your localization. | |
__construct ( string $realm = null, array $options = [] ) | Regular objects in Agile Toolkit use init() and are added through add(). | |
_beforeInit ( ) | Finds out which page is requested. We don't need this method for CLI, but others might need it. | |
addGlobalMethod ( string $name, callable $callable ) | Agile Toolkit objects allow method injection. This is quite similar to technique used in JavaScript:. | |
addLocation ( array $contents, mixed $obsolete = UNDEFINED ) : PathFinder_Location | Add new location with additional resources. | |
caughtException ( Exception $e ) | Is executed if exception is raised during execution. | |
configExceptionOrDefault ( string $default, string $exceptiontext ) | Executed when trying to access config parameter which is not find in the file. | |
dbConnect ( mixed $dsn = null ) : DB | Use database configuration settings from config file to establish default connection. | |
encodeHtmlChars ( string $s, integer $flags = null, string $encode = null, boolean $double_encode = false ) : string | Encodes HTML special chars. | |
getBaseURL ( ) : string | Returns base URL of this Web application installation. If you require link to a page, you can use URL::useAbsoluteURL();. | |
getConfig ( string $path, mixed $default_value = UNDEFINED ) : string | Load config if necessary and look up corresponding setting. | |
getLogger ( string $class_name = UNDEFINED ) : Logger | Initialize logger or return existing one. | |
getStickyArguments ( ) : array | ||
getVersion ( string $of = 'atk' ) : string | Determine version of Agile Toolkit or specified plug-in. | |
hasGlobalMethod ( string $name ) : boolean | Returns if a global method with such name was defined. | |
locate ( string $type, string $filename = '', string $return = 'relative' ) : string | object | array | Find relative path to the resource respective to the current directory. | |
locatePath ( string $type, string $filename = '' ) : string | object | array | Return full system path to specified resource. | |
locateURL ( string $type, string $filename = '' ) : string | object | array | Calculate URL pointing to specified resource. | |
normalizeClassName ( string | object $name, string $prefix = null ) : string | object | First normalize class name, then add specified prefix to class name if it's passed and not already added. | |
normalizeName ( string $name, string $separator = '_' ) : string | Normalize field or identifier name. Can also be used in URL normalization. | |
outputDebug ( $object, $msg, $shift ) | ||
outputWarning ( $msg, $shift ) | ||
readAllConfig ( ) | Will include all files as they are defined in $this->config_files from folder $config_location. | |
readConfig ( string $file = 'config.php' ) : boolean | Read config file and store it in $this->config. Use getConfig() to access. | |
removeGlobalMethod ( string $name ) | Removes global method. | |
requires ( string $addon = 'atk', string $v, string $location = null ) : boolean | Verifies version. Should be used by addons. For speed improvement, redefine this into empty function. | |
setConfig ( array $config = [], mixed $val = UNDEFINED ) | Manually set configuration option. | |
url ( mixed $page = null, array $arguments = [] ) : URL | Generates URL for specified page. Useful for building links on pages or emails. Returns URL object. | |
versionRequirement ( $v, $location = null ) |
public __construct ( string $realm = null, array $options = [] ) | ||
$realm | string | Will become $app->name |
$options | array |
public _beforeInit ( ) |
public addGlobalMethod ( string $name, callable $callable ) | ||
$name | string | Name of the method |
$callable | callable | Calls your function($object, $arg1, $arg2) |
public addLocation ( array $contents, mixed $obsolete = UNDEFINED ) : PathFinder_Location | ||
$contents | array | |
$obsolete | mixed | |
return | PathFinder_Location |
public caughtException ( Exception $e ) | ||
$e | Exception |
public configExceptionOrDefault ( string $default, string $exceptiontext ) | ||
$default | string | |
$exceptiontext | string |
public getBaseURL ( ) : string | ||
return | string |
public getVersion ( string $of = 'atk' ) : string | ||
$of | string | |
return | string |
public hasGlobalMethod ( string $name ) : boolean | ||
$name | string | Name of the method |
return | boolean | if registered |
public readAllConfig ( ) |
public readConfig ( string $file = 'config.php' ) : boolean | ||
$file | string | Filename |
return | boolean |
public removeGlobalMethod ( string $name ) | ||
$name | string |
public string $atk_version | ||
return | string |
public bool|Controller_Compat42 $compat_42 | ||
return | boolean | Controller_Compat42 |
public array $config | ||
return | array |
public array $config_files | ||
return | array |
public array $config_files_loaded | ||
return | array |
public string $config_location | ||
return | string |
public DB $db | ||
return | DB |
public string $locale | ||
return | string |
public Logger $logger | ||
return | Logger |
public $logger_class |
public int $max_name_length | ||
return | integer |
protected string $pagemanager_class | ||
return | string |
protected array $pagemanager_options | ||
return | array |
public PathFinder $pathfinder | ||
return | PathFinder |
protected string $pathfinder_class | ||
return | string |
public Controller_PageManager $pm | ||
return | Controller_PageManager |
public object $pr | ||
return | object |
public array $unique_hashes | ||
return | array |