Download the PHP package cleverage/php-trac without Composer
On this page you can find all versions of the php package cleverage/php-trac. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download cleverage/php-trac
More information about cleverage/php-trac
Files in cleverage/php-trac
Download cleverage/php-trac
More information about cleverage/php-trac
Files in cleverage/php-trac
Vendor cleverage
Package php-trac
Short Description Api for querying Trac RPC
License MIT
Homepage https://github.com/cleverage/php-trac
Package php-trac
Short Description Api for querying Trac RPC
License MIT
Homepage https://github.com/cleverage/php-trac
Please rate this library. Is it a good library?
Informations about the package php-trac
CleverAge\Trac
Interface PHP 5.3+ to query TRAC via its RPC
api. JSON
version is actually
used.
Installation
With composer : php composer.phar require "cleverage/php-trac": "dev-master"
It needs Buzz (default with Curl) or Guzzle to proceed HTTP queries.
Compatibility
Tested with Trac 0.12 and API version 1.1.2-r12546.
Exemples
$tracOptions = array(
'url' => 'http://www.mytrac.org',
);
$client = new \CleverAge\Trac\HttpClient\Guzzle\GuzzleHttpClient();
// $client = new \CleverAge\Trac\HttpClient\Buzz\BuzzHttpClient();
$trac = new \CleverAge\Trac\TracApi($tracOptions, $client);
$ticket = $trac->getTicketById(101);
echo $ticket->id. ' : '.$ticket->status;
$tickets = $trac->getTicketByStatus($status='closed', $limit=100);
foreach ($tickets as $ticket) {
echo $ticket->id. ' : '.$ticket->status;
}
Options
url
(required): The trac main urlticket.class
: The class object to use when getting tickets. Default isCleverAge\Trac\Ticket
.auth
: Supports none and Basic http. UseCleverAge\Trac\TracApi::AUTH_*
constants, default isAUTH_NONE
.- if
auth
isAUTH_BASIC
, then you must provideuser.login
anduser.password
.
- if
Performances
If you use Guzzle HttpClient, some requests are parallelized, so it improves performances, using MultiCurl :
$tracOptions = array(
'url' => 'http://www.mytrac.org',
);
$client = new \CleverAge\Trac\HttpClient\Guzzle\GuzzleHttpClient();
$client->setParallelLimit(10); // default is 5
$trac = new \CleverAge\Trac\TracApi($tracOptions, $client);
$tickets = $trac->getManyTicketsByIds(array(100, 101, 102, 103));
foreach ($tickets as $ticket) {
echo $ticket->id. ' : '.$ticket->status;
}
All versions of php-trac with dependencies
PHP Build Version
Package Version
The package cleverage/php-trac contains the following files
Loading the files please wait ....