setBillable() public method

Sets the billable values as array.
public setBillable ( array $billable )
$billable array
コード例 #1
0
ファイル: basics.php プロジェクト: kimai/kimai
require_once WEBROOT . 'includes/func.php';
// The $kga (formerly Kimai Global Array) is initialized here
// It was replaced by an proxy object, but until refactored it is still used as array in a lot of places
require_once WEBROOT . 'includes/autoconf.php';
$kga = new Kimai_Config(array('server_prefix' => $server_prefix, 'server_hostname' => $server_hostname, 'server_database' => $server_database, 'server_username' => $server_username, 'server_password' => $server_password, 'server_charset' => $server_charset, 'defaultTimezone' => $defaultTimezone, 'password_salt' => isset($password_salt) ? $password_salt : ''));
// will inject the version variables into the Kimai_Config object
include WEBROOT . 'includes/version.php';
// write vars from autoconf.php into kga
if (isset($language)) {
    $kga->setLanguage($language);
}
if (isset($authenticator)) {
    $kga->setAuthenticator($authenticator);
}
if (isset($billable)) {
    $kga->setBillable($billable);
}
if (isset($skin)) {
    $kga->setSkin($skin);
}
date_default_timezone_set($defaultTimezone);
Kimai_Registry::setConfig($kga);
// ============ global namespace cleanup ============
// remove some variables from the global namespace, that should either be
// not accessible or which are available through the kga config object
$cleanup = array('server_prefix', 'server_hostname', 'server_database', 'server_username', 'server_password', 'server_charset', 'language', 'password_salt', 'authenticator', 'defaultTimezone', 'billable', 'skin');
foreach ($cleanup as $varName) {
    if (isset(${$varName})) {
        unset(${$varName});
    }
}