PHP Classes

File: aksara/Config/Constants.php

Recommend this page to a friend!
  Packages of Aby Dahana   Aksara   aksara/Config/Constants.php   Download  
File: aksara/Config/Constants.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: Aksara
A CodeIgniter based API and CRUD generator
Author: By
Last change: Page Builder: Finalized component precision styling, fixed property TypeErrors, synchronized media previews, and optimized layout spacing across Card, Alert, and CTA components. (CS-Fix included)
Date: 1 month ago
Size: 5,201 bytes
 

Contents

Class file image Download
<?php

/**
 * This file is part of Aksara CMS, both framework and publishing
 * platform.
 *
 * @author Aby Dahana <abydahana@gmail.com>
 * @copyright (c) Aksara Laboratory <https://aksaracms.com>
 * @license MIT License
 *
 * This source file is subject to the MIT license that is bundled
 * with this source code in the LICENSE.txt file.
 *
 * When the signs come, those who don't believe at "that time"
 * will have only two choices, commit suicide or become brutal.
 */

defined('APP_NAMESPACE') || define('APP_NAMESPACE', 'Aksara');

/*
 | --------------------------------------------------------------------------
 | Composer Path
 | --------------------------------------------------------------------------
 |
 | The path that Composer's autoload file is expected to live. By default,
 | the vendor folder is in the Root directory, but you can customize that here.
 */
defined('COMPOSER_PATH') || define('COMPOSER_PATH', ROOTPATH . 'vendor/autoload.php');

/*
 |--------------------------------------------------------------------------
 | Timing Constants
 |--------------------------------------------------------------------------
 |
 | Provide simple ways to work with the myriad of PHP functions that
 | require information to be in seconds.
 */
defined('SECOND') || define('SECOND', 1);
defined('MINUTE') || define('MINUTE', 60);
defined('HOUR') || define('HOUR', 3600);
defined('DAY') || define('DAY', 86400);
defined('WEEK') || define('WEEK', 604800);
defined('MONTH') || define('MONTH', 2_592_000);
defined('YEAR') || define('YEAR', 31_536_000);
defined('DECADE') || define('DECADE', 315_360_000);

/*
 | --------------------------------------------------------------------------
 | Exit Status Codes
 | --------------------------------------------------------------------------
 |
 | Used to indicate the conditions under which the script is exit()ing.
 | While there is no universal standard for error codes, there are some
 | broad conventions. Three such conventions are mentioned below, for
 | those who wish to make use of them. The CodeIgniter defaults were
 | chosen for the least overlap with these conventions, while still
 | leaving room for others to be defined in future versions and user
 | applications.
 |
 | The three main conventions used for determining exit status codes
 | are as follows:
 |
 | Standard C/C++ Library (stdlibc):
 | http://www.gnu.org/software/libc/manual/html_node/Exit-Status.html
 | (This link also contains other GNU-specific conventions)
 | BSD sysexits.h:
 | http://www.gsp.com/cgi-bin/man.cgi?section=3&topic=sysexits
 | Bash scripting:
 | http://tldp.org/LDP/abs/html/exitcodes.html
 |
 */
defined('EXIT_SUCCESS') || define('EXIT_SUCCESS', 0); // no errors
defined('EXIT_ERROR') || define('EXIT_ERROR', 1); // generic error
defined('EXIT_CONFIG') || define('EXIT_CONFIG', 3); // configuration error
defined('EXIT_UNKNOWN_FILE') || define('EXIT_UNKNOWN_FILE', 4); // file not found
defined('EXIT_UNKNOWN_CLASS') || define('EXIT_UNKNOWN_CLASS', 5); // unknown class
defined('EXIT_UNKNOWN_METHOD') || define('EXIT_UNKNOWN_METHOD', 6); // unknown class member
defined('EXIT_USER_INPUT') || define('EXIT_USER_INPUT', 7); // invalid user input
defined('EXIT_DATABASE') || define('EXIT_DATABASE', 8); // database error
defined('EXIT__AUTO_MIN') || define('EXIT__AUTO_MIN', 9); // lowest automatically-assigned error code
defined('EXIT__AUTO_MAX') || define('EXIT__AUTO_MAX', 125); // highest automatically-assigned error code

/*
 |--------------------------------------------------------------------------
 | Fallback Constants (IDE Stubs)
 |--------------------------------------------------------------------------
 |
 | These constants are normally defined in config.php. We define them here
 | as fallbacks to suppress IDE "undefined constant" warnings and to prevent
 | fatal errors before config.php is generated by the installer.
 */
defined('TIMEZONE') || define('TIMEZONE', 'UTC');
defined('ENVIRONMENT') || define('ENVIRONMENT', 'production');
defined('BASE_URL') || define('BASE_URL', '');
defined('DEMO_MODE') || define('DEMO_MODE', false);
defined('ENCRYPTION_KEY') || define('ENCRYPTION_KEY', '');
defined('COOKIE_NAME') || define('COOKIE_NAME', 'aksara');
defined('SESSION_EXPIRATION') || define('SESSION_EXPIRATION', 0);
defined('DB_DSN') || define('DB_DSN', '');
defined('DB_DRIVER') || define('DB_DRIVER', 'MySQLi');
defined('DB_HOSTNAME') || define('DB_HOSTNAME', 'localhost');
defined('DB_PORT') || define('DB_PORT', 3306);
defined('DB_USERNAME') || define('DB_USERNAME', '');
defined('DB_PASSWORD') || define('DB_PASSWORD', '');
defined('DB_DATABASE') || define('DB_DATABASE', '');
defined('UPLOAD_PATH') || define('UPLOAD_PATH', 'uploads');
defined('MAX_UPLOAD_SIZE') || define('MAX_UPLOAD_SIZE', 0);
defined('DOCUMENT_FORMAT_ALLOWED') || define('DOCUMENT_FORMAT_ALLOWED', '');
defined('IMAGE_FORMAT_ALLOWED') || define('IMAGE_FORMAT_ALLOWED', '');
defined('IMAGE_DIMENSION') || define('IMAGE_DIMENSION', 0);
defined('THUMBNAIL_DIMENSION') || define('THUMBNAIL_DIMENSION', 0);
defined('ICON_DIMENSION') || define('ICON_DIMENSION', 0);