J-CORE Wiki
Brought to you by:
longstone
An API in JCORE is an HTTP or CLI exposed directory that will load a specific set of plugins.
[API_NAME]/
index.php
config.php
index.php is the "harness" for the API
config.php defines all the settings for the API
/** * JCORE DEFINES * this is where we define the API * first we set the basic file path settings */ define ("JCORE_BASE_DIR", "/var/www/JCORE/CORE/"); define ("JCORE_CONFIG_DIR", "/var/www/JCORE/CONFIG/"); define ("JCORE_CACHE_DIR", "/var/www/JCORE/CACHE/"); define ("JCORE_TMP_DIR", "/var/www/JCORE/CACHE/FILE/"); define ("JCORE_TEMPLATES_DIR", "/var/www/JCORE/TEMPLATES/"); /** * supporting services */ define ("JCORE_LOG_DIR", "/var/log/httpd/"); //make sure you have write access define ("JCORE_FILE_CACHE_DIR", "/var/www/JCORE/CACHE/FILE/"); //make sure you have write access define ("JCORE_PLUGINS_DIR", "/var/www/JCORE/PLUGINS/"); define ("JCORE_PACKAGES_DIR", "/var/www/JCORE/PACKAGES/"); //session_id(JCORE_SESSION_NAME);z
$JCORE_SESSION_NAME = "DEFAULT-API-".getmypid(); define ("JCORE_SESSION_NAME", $JCORE_SESSION_NAME); //a-z, A-Z, 0-9 and '-,' //session_id(JCORE_SESSION_NAME);
#define ("JCORE_SYSTEM_CACHE", "EACCELERATOR"); define ("JCORE_SYSTEM_CACHE", "XCACHE"); define ("JCORE_SYSTEM_CACHE_SERIALIZATION", "JSON"); //JSON/NATIVE/RAW[string]
define ("JCORE_API_DIR", "/var/www/VHOSTS/auth.deluxebusinessservices.com"); define ("JCORE_API_TRANSPORT_IN", "URI"); // ARG/URI/JSONPRC/XML/SOAP define ("JCORE_API_TRANSPORT_OUT", "HTML");
#$BOOTSTRAP["CSN"] = JCORE_SYSTEM_CACHE; - MUST be disabled if no opcode cache $BOOTSTRAP["CACHE_SERIALIZATION"] = 'JSON'; //[JSON/NATIVE] $BOOTSTRAP["UNSERIALIZE_TYPE"] = 'ARRAY'; //[ARRAY/OBJECT]
require_once(JCORE_BASE_DIR.'/LOAD/BOOTSTRAP.php');
$pluginList = array( 'PLUGIN_1', 'PLUGIN_3', 'PLUGIN_***' ); foreach($pluginList AS $key => $pluginName){ $CONFIG_MANAGER->registerPlugin($pluginName); }
Wiki: Application Structure
Wiki: Home
Wiki: Installation
Wiki: Quick Start Guide
Anonymous