The client requires PHP version 7.2 or higher (http://php.net/manual/en/install.php) and Composer Dependency Manager (https://getcomposer.org/download/).
The client additionally requires PHP Multibyte String extension. Depending on you PHP configuration you may need to additionally install/configure it (http://php.net/manual/en/mbstring.installation.php)
This is a recommended way for users. Run from your application root
composer require gridgain/gridgain-client
To use the client in your application, include vendor/autoload.php file, generated by Composer, to your source code, eg.
require_once __DIR__ . '/vendor/autoload.php';
This way is more suitable for developers or if you install client from zip archive.
- Download and/or unpack GridGain PHP client sources to
gridgain_client_path - Go to
gridgain_client_pathfolder - Execute
composer install --no-devcommand
cd gridgain_client_path
composer install --no-devTo use the client in your application, include vendor/autoload.php file, generated by Composer, to your source code, eg.
require_once "<gridgain_client_path>/vendor/autoload.php";
To update version of client used in your project, just update version in your "require" section of composer.json and run the following command:
composer update gridgain/gridgain-client
PHP Thin Client contains examples to demonstrate the main behavior of the client.
Examples are installed during installation of the whole GridGain client from sources.
-
Run GridGain server - locally or remotely - if not run yet.
-
If needed, modify
ENDPOINTconstant in an example source file - GridGain node endpoint. The default value is127.0.0.1:10800. -
Run an example by calling
php <example_file_name>.php, eg:
cd gridgain_client_path/examples
php CachePutGetExample.php
Refer to Examples ReadMe for detailed descriptions of examples.
For more information, see GridGain PHP Thin Client documentation.