JavocSoft PHP Commons Library
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.settings
jvcphplib
.buildpath
.project
LICENSE
README.md
composer.json

README.md

javocsoft-phpclib

JavocSoft PHP Commons Library

DESCRIPTION

This library is a compendium of utility routines and classes that can save you time when coding in PHP.


INSTALLATION & USAGE

To use the library, follow these steps:

1.- Get the library code by using Composer utility. First, create "composer.json" file adding to it these lines:

{
    "require": {
        "javocsoft/jvcphpclib": "1.0.*"        
    }
}

2.- Second, download Composer utility:

    //In Unix/Linux
    curl -sS https://getcomposer.org/installer | php   
    //In Windows system
    Download and install comporser: https://getcomposer.org/Composer-Setup.exe

More about Composer:

See Installation notes: https://getcomposer.org/download/
See getting started: https://getcomposer.org/doc/00-intro.md
See Documentation https://getcomposer.org/doc/03-cli.md

3.- Now, download the library by running composer where we created the file "composer.json".

4.- Configure the library parameters according to your project by setting these parameters:

    define ("INIT_APPNAME","your_app_name");
    define ("INIT_BASEDIR_PATH","your_app_folder\\");
    define ("INIT_LOGS_PATH",INIT_BASEDIR_PATH . "your_log_folder\\");
    define ("INIT_OPENSSL_PATH","your_openssl_folder");
    define ("INIT_ERRORS_ENV_MODE","DEV"); //Or PROD

5.- Add library classes to your project. To achieve this, add the composer "autoload.php" to your code by including it:

    require 'vendor/autoload.php';

6.- Initialize the library:

    jvcphplib\JVCPHPLib::initLibrary();