PHP code example of generoi / robo-genero
1. Go to this page and download the library: Download generoi/robo-genero library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
generoi / robo-genero example snippets
use Robo\Robo;
use Generoi\Robo\Task\loadTasks;
use Generoi\Robo\Command\loadCommands;
class RoboFile extends \Robo\Tasks
{
use loadTasks;
use loadCommands;
/**
* Pull uploads directory from remote to local.
*
* @param string $source Source alias eg. `production`
* @return \Robo\Result
*/
public function filesPull(string $source, $options = ['exclude' => null, 'dry-run' => false])
{
return $this->rsyncPull("{$source}:%files", $options);
}
/**
* Push uploads directory from local to remote.
*
* @param string $destination Destination alias eg. `production`
* @return \Robo\Result
*/
public function filesPush(string $destination, $options = ['exclude' => null, 'dry-run' => true])
{
return $this->rsyncPush("{$destination}:%files", $options);
}
}