setApplicationDirectory(realpath('app')); $api->setFullErrorReporting(true); /** * setting the application directory automatically is the same * as setting the following directory parameters. * * $api->setCacheDirectory(realpath('app/cache')); * $api->setControllerDirectory(realpath('app/controllers')); * $api->setLogDirectory(realpath('app/log')); * * using the `setApplicationDirectory` method is faster, but the application * dir should then contain the following folders: cache, controllers, log * * In the case of cache and log, if the application directory is set * but the folders don't exist, Asra will attempt to create the dirs in the * specified application directory. the cache and log folders should be writeable. * * @see demo/custom_api to see a set up with custom directory settings */ /** * load a configuration file for mysql */ $api->loadConfig(realpath('app/config/config.ini')); /** * you can add any of the Bootstrap settings in an ini file * instead of calling them on the object */ $api->loadSettings(realpath('app/config/settings.ini')); // -- dispatch it $api->dispatch();