PHP code example of pawella / svn-tool

1. Go to this page and download the library: Download pawella/svn-tool 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/ */

    

pawella / svn-tool example snippets




vnTool\Service;
use Zend\Cache\StorageFactory;


$service = new Service();

/**
 * Usage caching is optional.
 */
$cache = StorageFactory::factory([
    'adapter' => [
        'name'    => 'Filesystem',
        'options' => [
            'ttl' => 60,
            'cache_dir' => __DIR__.'/../cache'
        ],
    ],
    'plugins' => [
        'exception_handler' => ['throw_exceptions' => false],
        'Serializer'
    ],
]);
$service->setCache($cache);

$service->setRepositories([
    'https://userByRepo:[email protected]/svn/repository',
    'https://userByRepo:[email protected]/repository'
]);

$service->responseJsonPackage();