AppserverIo\Appserver\Core\Api\DeploymentService::load PHP Method

load() public method

Returns the deployment with the passed UUID.
See also: ServiceInterface::load()
public load ( integer $uuid ) : DeploymentNode
$uuid integer UUID of the deployment to return
return AppserverIo\Appserver\Core\Api\Node\DeploymentNode The deployment with the UUID passed as parameter
    public function load($uuid)
    {
        $deploymentNodes = $this->findAll();
        if (array_key_exists($uuid, $deploymentNodes)) {
            return $deploymentNodes[$uuid];
        }
    }

Usage Example

 /**
  * Test if the load() method returns the NULL for an invalid primary key.
  *
  * @return null
  */
 public function testLoadWithInvalidPrimaryKey()
 {
     $this->assertNull($this->service->load('invalidPrimaryKey'));
 }