Download the PHP package danielcosta/php-dreamhost without Composer
On this page you can find all versions of the php package danielcosta/php-dreamhost. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download danielcosta/php-dreamhost
More information about danielcosta/php-dreamhost
Files in danielcosta/php-dreamhost
Download danielcosta/php-dreamhost
More information about danielcosta/php-dreamhost
Files in danielcosta/php-dreamhost
Vendor danielcosta
Package php-dreamhost
Short Description PHP class for the Dreamhost API
License BSD-3-Clause
Package php-dreamhost
Short Description PHP class for the Dreamhost API
License BSD-3-Clause
Please rate this library. Is it a good library?
Informations about the package php-dreamhost
PHP class for the Dreamhost API 
Interfaces with the Dreamhost API
Installation
Package available on Composer. Autoloading is PSR-0 compatible.
Usage
<?php
use DanielCosta\Dreamhost;
$dh = new Dreamhost('your api key'[,format]);
$dh->exec('command'[, array(arg => value[, ...])]);
Where 'command' is one of the many listed on the Dreamhost Wiki API article.
Method 'exec' returns either an array of associative arrays of the data returned by Dreamhost or throws an exception upon error.
You can define any preferred return format by passing a second argument to class constructor. Defaults to 'json'.
Example
<?php
use DanielCosta\Dreamhost;
$dh = new Dreamhost('6SHU5P2HLDAYECUM'[,format]);
try {
$method = 'api-list_accessible_cmds';
$commands = $dh->exec($method);
// $commands = $dh->$method(); // this should also work
print_r($commands);
} catch (Exception $e) {
echo $e->getMessage(); // contains either the error data returned by dreamhost or a curl error string and number
}
All versions of php-dreamhost with dependencies
PHP Build Version
Package Version
No informations.
The package danielcosta/php-dreamhost contains the following files
Loading the files please wait ....