Download the PHP package plinker/test without Composer

On this page you can find all versions of the php package plinker/test. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package test

PlinkerRPC - Test/Demo

A test/demo component which has a few basic methods which demostrate how easy it is to define a class to interface to, a range of data types can be sent back from strings, arrays, objects, closures or even self/this for testing/example purposes.

Make sure you check out the components code, there is no complicated voodoo going on, its just a simple PHP class.

Install

Require this package with composer using the following command:

Client

Creating a client instance is done as follows:

<?php
require 'vendor/autoload.php';

/**
 * Initialize plinker client.
 *
 * @param string $server - URL to server listener.
 * @param string $config - server secret, and/or a additional component data
 */
$client = new \Plinker\Core\Client(
    'http://example.com/server.php',
    [
        'secret' => 'a secret password',
        'array' => [
            'key' => 'value'
        ]
    ]
);

// or using global function
$client = plinker_client('http://example.com/server.php', 'a secret password', [
    'array' => [
        'key' => 'value'
    ]
]);

Methods

Once setup, you call the class though its namespace to its method.

This

By calling this you can return the entire class to call locally.

Call

Response

If your wondering where the config array is coming from.. its passed in the connection, see above client section.

Config

This shows a "getter" for the class which returns the config.

Call

Response

An Array

This shows returning a basic array. :/

Call

Response

A Closure

This shows returning a closure (anonymous function) which was serialised with (opis/closure) SerializableClosure.

Call

Response

Run Closure

This shows running a closure (anonymous function) on the server from the client which was serialised with (opis/closure) SerializableClosure. This allows you to neatly mutate any data before its returned back from the server.

Call

Response

An Object

This shows returning an object, in this example a DateTime object.

Call

Response

A String

This shows returning an string, in this example it returns the IP address of the server.

Call

Response

Testing

There are no tests setup for this component.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please contact me via https://cherone.co.uk instead of using the issue tracker.

Credits

Development Encouragement

If you use this project and make money from it or want to show your appreciation, please feel free to make a donation https://www.paypal.me/lcherone, thanks.

Sponsors

Get your company or name listed throughout the documentation and on each github repository, contact me at https://cherone.co.uk for further details.

License

The MIT License (MIT). Please see License File for more information.

See the organisations page for additional components.


All versions of test with dependencies

PHP Build Version
Package Version
Requires opis/closure Version ^3.0.12
plinker/core Version >=0.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package plinker/test contains the following files

Loading the files please wait ....