Skip to content

Commit

Permalink
Merge pull request #24 from pmill/dev
Browse files Browse the repository at this point in the history
Merged issues 9, 10, 12, 13, 14
  • Loading branch information
pmill committed Apr 5, 2016
2 parents b07a281 + 9fa0930 commit 3926e39
Show file tree
Hide file tree
Showing 51 changed files with 1,781 additions and 0 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ The following features are currently supported:
* List database servers
* List/add/delete databases
* Add database users
* Further functionality can be seen in the examples folder
* Email [email protected] with requests for exposing further functionality

Requirements
Expand Down Expand Up @@ -82,6 +83,13 @@ Unversioned (13 Apr 2013)
* Updated error handling to expose Plesk error code
* Added html entity escaping

0.5.1 (05/04/2016)

* Added mail preferences functionality
* Added wordpress functionality
* Added APS functionality
* Added ssl certificate functionality

Copyright and License
---------------------

Expand Down
17 changes: 17 additions & 0 deletions examples/APS/install_application.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php

require_once("../config.php");

$params = [
'domain-name' => 'example.org',
'package-id' => 1,
];

$request = new \pmill\Plesk\APS\InstallApplication($config, $params);
$info = $request->process();

var_dump($info);

if ($info === false) {
var_dump($request->error->getMessage());
}
12 changes: 12 additions & 0 deletions examples/APS/list_available_packages.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php

require_once("../config.php");

$params = [

];

$request = new \pmill\Plesk\APS\ListAvailablePackages($config, $params);
$info = $request->process();

var_dump($info);
24 changes: 24 additions & 0 deletions examples/MailService/update_preferences.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php

require_once("../config.php");

/*
* Enables
*/
$params = [
'site-id' => 1,
'nonexistent-user' => \pmill\Plesk\Helper\MailPreferences::NONEXISTENT_USER_BOUNCE,
'mailservice' => false,
'webmail' => true,
'spam-protect-sign' => true,
'greylisting' => false,
];

$request = new \pmill\Plesk\MailService\UpdatePreferences($config, $params);

$info = $request->process();
var_dump($info);

if ($info === false) {
var_dump($request->error->getMessage());
}
21 changes: 21 additions & 0 deletions examples/SSL/install_certificate.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php

require_once("../config.php");

$params = [
'name' => 'test-ssl',
'admin' => true,
'csr' => '',
'cert' => '',
'pvt' => '',
'ip-address' => '127.0.0.1',
];

$request = new \pmill\Plesk\SSL\InstallCertificate($config, $params);
$info = $request->process();

var_dump($info);

if ($info === false) {
var_dump($request->error->getMessage());
}
20 changes: 20 additions & 0 deletions examples/Wordpress/activate_plugin.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php

require_once("../config.php");

/*
* Enables
*/
$params = [
'id' => 1,
'plugin_id' => 'wp-super-cache_1.4.8',
];

$request = new \pmill\Plesk\Wordpress\ActivatePlugin($config, $params);

$info = $request->process();
var_dump($info);

if ($info === false) {
var_dump($request->error->getMessage());
}
20 changes: 20 additions & 0 deletions examples/Wordpress/activate_theme.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php

require_once("../config.php");

/*
* Enables
*/
$params = [
'id' => 1,
'theme_id' => 'emmet-lite_1.4.0',
];

$request = new \pmill\Plesk\Wordpress\ActivateTheme($config, $params);

$info = $request->process();
var_dump($info);

if ($info === false) {
var_dump($request->error->getMessage());
}
19 changes: 19 additions & 0 deletions examples/Wordpress/clear_cache.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php

require_once("../config.php");

/*
* Enables
*/
$params = [
'id' => 1,
];

$request = new \pmill\Plesk\Wordpress\ClearCache($config, $params);

$info = $request->process();
var_dump($info);

if ($info === false) {
var_dump($request->error->getMessage());
}
20 changes: 20 additions & 0 deletions examples/Wordpress/deactivate_plugin.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php

require_once("../config.php");

/*
* Enables
*/
$params = [
'id' => 1,
'plugin_id' => 'wp-super-cache_1.4.8',
];

$request = new \pmill\Plesk\Wordpress\DeactivatePlugin($config, $params);

$info = $request->process();
var_dump($info);

if ($info === false) {
var_dump($request->error->getMessage());
}
19 changes: 19 additions & 0 deletions examples/Wordpress/disable_auto_updates.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php

require_once("../config.php");

/*
* Enables
*/
$params = [
'id' => 1,
];

$request = new \pmill\Plesk\Wordpress\DisableAutoUpdates($config, $params);

$info = $request->process();
var_dump($info);

if ($info === false) {
var_dump($request->error->getMessage());
}
19 changes: 19 additions & 0 deletions examples/Wordpress/enable_auto_updates.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php

require_once("../config.php");

/*
* Enables
*/
$params = [
'id' => 1,
];

$request = new \pmill\Plesk\Wordpress\EnableAutoUpdates($config, $params);

$info = $request->process();
var_dump($info);

if ($info === false) {
var_dump($request->error->getMessage());
}
19 changes: 19 additions & 0 deletions examples/Wordpress/get_plugin_list.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php

require_once("../config.php");

/*
* Enables
*/
$params = [
'id' => 1,
];

$request = new \pmill\Plesk\Wordpress\GetPluginList($config, $params);

$info = $request->process();
var_dump($info);

if ($info === false) {
var_dump($request->error->getMessage());
}
19 changes: 19 additions & 0 deletions examples/Wordpress/get_security_status.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php

require_once("../config.php");

/*
* Enables
*/
$params = [
'id' => 1,
];

$request = new \pmill\Plesk\Wordpress\GetSecurityStatus($config, $params);

$info = $request->process();
var_dump($info);

if ($info === false) {
var_dump($request->error->getMessage());
}
19 changes: 19 additions & 0 deletions examples/Wordpress/get_theme_list.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php

require_once("../config.php");

/*
* Enables
*/
$params = [
'id' => 1,
];

$request = new \pmill\Plesk\Wordpress\GetThemeList($config, $params);

$info = $request->process();
var_dump($info);

if ($info === false) {
var_dump($request->error->getMessage());
}
20 changes: 20 additions & 0 deletions examples/Wordpress/install_plugin.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php

require_once("../config.php");

/*
* Enables
*/
$params = [
'id' => 1,
'plugin_id' => 'wp-super-cache',
];

$request = new \pmill\Plesk\Wordpress\InstallPlugin($config, $params);

$info = $request->process();
var_dump($info);

if ($info === false) {
var_dump($request->error->getMessage());
}
20 changes: 20 additions & 0 deletions examples/Wordpress/install_theme.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php

require_once("../config.php");

/*
* Enables
*/
$params = [
'id' => 1,
'theme_id' => 'emmet-lite',
];

$request = new \pmill\Plesk\Wordpress\InstallTheme($config, $params);

$info = $request->process();
var_dump($info);

if ($info === false) {
var_dump($request->error->getMessage());
}
11 changes: 11 additions & 0 deletions examples/Wordpress/list_instances.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php

require_once("../config.php");

/*
* Lists all sites, or if subscription_id is supplied lists only that subscriptions sites
*/
$request = new \pmill\Plesk\Wordpress\ListInstances($config);
$info = $request->process();

var_dump($info);
19 changes: 19 additions & 0 deletions examples/Wordpress/remove_instance.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php

require_once("../config.php");

/*
* Enables
*/
$params = [
'id' => 2,
];

$request = new \pmill\Plesk\Wordpress\RemoveInstance($config, $params);

$info = $request->process();
var_dump($info);

if ($info === false) {
var_dump($request->error->getMessage());
}
19 changes: 19 additions & 0 deletions examples/Wordpress/search_plugins.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php

require_once("../config.php");

/*
* Enables
*/
$params = [
'query' => 'Responsify',
];

$request = new \pmill\Plesk\Wordpress\SearchPlugins($config, $params);

$info = $request->process();
var_dump($info);

if ($info === false) {
var_dump($request->error->getMessage());
}
19 changes: 19 additions & 0 deletions examples/Wordpress/search_themes.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php

require_once("../config.php");

/*
* Enables
*/
$params = [
'query' => 'Lite',
];

$request = new \pmill\Plesk\Wordpress\SearchThemes($config, $params);

$info = $request->process();
var_dump($info);

if ($info === false) {
var_dump($request->error->getMessage());
}
Loading

0 comments on commit 3926e39

Please sign in to comment.