2017 © Pedro Peláez
 

library virtualizor-php

A Wrapper for the Virtualizor API

image

bennetgallein/virtualizor-php

A Wrapper for the Virtualizor API

  • Wednesday, May 30, 2018
  • by BennetPHP
  • Repository
  • 1 Watchers
  • 0 Stars
  • 4 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Virtualizor API Wrapper Build Status

This is a wrapper for the API for Virtualizor. Documentation for this Version of the API can be found here: http://virtualizor.com/admin-api/#virtual-servers . Own Documentation will follow., (*1)

Installation

Install this library via composer is pretty easy., (*2)

composer require bennetgallein/virtualizor-php

And then you can get started with your project., (*3)

Object Description:

Every call starts by Initializing the Virtualizor Object. Once initialized you can use it over and over again., (*4)

$virt = new \Virtualizor\Virtualizor("ip", "key", "pass", "port");

ServerInfo

Get some information about the master, (*5)

$info = json_decode($virt->serverInfo());

VirtualServer:

Create a new VirtualServer Object by using the following:, (*6)

$virtualobject = $virt->vps();

Add Attributes and set the Act Method, then execute the query., (*7)

$vps = $virtualobject->setAct(\Virtualizor\Objects\VirtualServer::REBUILD)->setHostname("hostname_1")->exec();

IPPool

Create a new IPPool Object by using the following:, (*8)

$virtualobject = $virt->ippool();

List all pools:, (*9)

$pools = $virtualobject->setAct(\Virtualizor\Objects\IPPool::LISTPOOLS)->exec();

OSTemplates

Create a new OSTemplates Object by using the following:, (*10)

$virtualobject = $virt->ostemplates();

List all templates:, (*11)

$ostemplates = $virtualobject->setAct(\Virtualizor\Objects\OSTemplates::LISTOS)->exec();

The Versions

30/05 2018

dev-master

9999999-dev

A Wrapper for the Virtualizor API

  Sources   Download

MIT

The Development Requires