Skip to content

Resources: ServerTypes

Danny Li edited this page Feb 4, 2018 · 1 revision

Special methods

The ServerTypes resource does not have any special methods.

ServerType object

The ServerType object has the following methods:

<?php
use Exploriment\HetznerCloud;

// retrieve the server type
$server_type = HetznerCloud\ServerTypes::find(1);

// returns the server type ID (int)
$server_type->getId();

// returns the server type name (string)
$server_type->getName();

// returns the server type description (string)
$server_type->getDescription();

// returns the number of CPU cores (int)
$server_type->getCores();

// returns the amount of memory in GB (float)
$server_type->getMemory();

// returns the disk size in GB (float)
$server_type->getDisk();

// returns the prices in different locations
$server_type->getPrices();

// returns the type of server boot drive (string)
$server_type->getStorageType();

// storage type = local? (boolean)
$server_type->isLocal();

// storage type = network? (boolean)
$server_type->isNetwork();
Clone this wiki locally