kakawait / jumper
A remote closure executor!
1.0.1
2014-03-21 11:18 UTC
Requires
- php: >=5.3.3
- jeremeamia/superclosure: ~1
- kakawait/tiny-php: 0.0.1
- phpseclib/phpseclib: ~0.3
Requires (Dev)
- mikey179/vfsstream: ~1.2
- mockery/mockery: ~0.9
- phpunit/phpunit: ~4
This package is not auto-updated.
Last update: 2024-12-16 15:44:11 UTC
README
Allow you to execute PHP Closure in other distant computer via SSH and without client/server setup.
Source computer dependency: PHP >= 5.3 (so might work on windows but untested)
Target computer dependencies: PHP >= 5.3, SSHd
<?php require 'vendor/autoload.php'; $authentication = new \Jumper\Communicator\Authentication\Rsa('root', $_SERVER['HOME'] . '/.ssh/id_rsa'); $communicator = new \Jumper\Communicator\Ssh($authentication, array('host' => '127.0.0.1')); $executor = new \Jumper\Executor($communicator, new Jumper\Stringifier\Native()); $array = array(2, 1, 4, 3); $rsortedArray = $executor->run( function() use ($array) { rsort($array); return $array; } ); var_dump($rsortedArray); // should print /* array(4) { [0]=> int(4) [1]=> int(3) [2]=> int(2) [3]=> int(1) } */