Differential D7908 Diff 17903 src/applications/drydock/blueprint/DrydockLocalHostBlueprintImplementation.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/drydock/blueprint/DrydockLocalHostBlueprintImplementation.php
<?php | <?php | ||||
final class DrydockLocalHostBlueprintImplementation | final class DrydockLocalHostBlueprintImplementation | ||||
extends DrydockBlueprintImplementation { | extends DrydockBlueprintImplementation { | ||||
public function isEnabled() { | public function isEnabled() { | ||||
return false; | return false; | ||||
} | } | ||||
public function getBlueprintName() { | |||||
return pht('Local Host'); | |||||
} | |||||
public function getDescription() { | public function getDescription() { | ||||
return pht('Allocates storage on the local host.'); | return pht( | ||||
'Allows Drydock to run on the local host.'); | |||||
} | } | ||||
public function canAllocateMoreResources(array $pool) { | public function canAllocateMoreResources(array $pool) { | ||||
assert_instances_of($pool, 'DrydockResource'); | assert_instances_of($pool, 'DrydockResource'); | ||||
// The localhost can be allocated only once. | // The localhost can be allocated only once. | ||||
foreach ($pool as $resource) { | foreach ($pool as $resource) { | ||||
if ($resource->getBlueprintClass() == $this->getBlueprintClass()) { | if ($resource->getBlueprintClass() == $this->getBlueprintClass()) { | ||||
▲ Show 20 Lines • Show All 73 Lines • Show Last 20 Lines |