kakawait/jumper
Composer 安装命令:
composer require kakawait/jumper
包简介
A remote closure executor!
关键字:
README 文档
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) } */
统计信息
- 总下载量: 28
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 46
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2013-05-21