PHPackages                             purple-dbu/vcloud-sdk-helpers - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. purple-dbu/vcloud-sdk-helpers

ActiveLibrary[API Development](/categories/api)

purple-dbu/vcloud-sdk-helpers
=============================

Utility classes for vCloud Director PHP SDK

v1.2.4(12y ago)0641MITJavaScriptPHP &gt;=5.3.2

Since Dec 5Pushed 12y ago2 watchersCompare

[ Source](https://github.com/purple-dbu/vcloud-sdk-php-helpers)[ Packagist](https://packagist.org/packages/purple-dbu/vcloud-sdk-helpers)[ Docs](https://github.com/purple-dbu/vcloud-sdk-php-helpers)[ RSS](/packages/purple-dbu-vcloud-sdk-helpers/feed)WikiDiscussions master Synced today

READMEChangelog (5)Dependencies (11)Versions (10)Used By (0)

vcloud-sdk-php-helpers
======================

[](#vcloud-sdk-php-helpers)

Utility classes for vCloud Director PHP SDK

[![Build Status](https://camo.githubusercontent.com/17c2c837ffaee8dbbc5b9ff65581665b6bda3e23ddfdb840eaf5b5a8cfa0fc4c/68747470733a2f2f7472617669732d63692e6f72672f707572706c652d6462752f76636c6f75642d73646b2d7068702d68656c706572732e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/purple-dbu/vcloud-sdk-php-helpers)[![Coverage Status](https://camo.githubusercontent.com/a1202c65cc2b6bc636e09dd6bad5ccf5ae73dcb777f630a8f7d6926e16c75cdc/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f707572706c652d6462752f76636c6f75642d73646b2d7068702d68656c706572732f62616467652e706e673f6272616e63683d6d6173746572)](https://coveralls.io/r/purple-dbu/vcloud-sdk-php-helpers?branch=master)[![Dependency Status](https://camo.githubusercontent.com/9d906a42ddd10e20feda277624acffd644203f493182ca3b392e224da3865554/68747470733a2f2f7777772e76657273696f6e6579652e636f6d2f757365722f70726f6a656374732f3532376663346438363332626163383234313030303032642f62616467652e706e67)](https://www.versioneye.com/user/projects/527fc4d8632bac824100002d)

[![Latest Stable Version](https://camo.githubusercontent.com/35d3eb96b43d613c3b9f303a7c39c6babd24ef43d974567f7ea8a0f1b3cf3e81/68747470733a2f2f706f7365722e707567782e6f72672f707572706c652d6462752f76636c6f75642d73646b2d68656c706572732f762f737461626c652e706e67)](https://packagist.org/packages/purple-dbu/vcloud-sdk-helpers)

Installation
------------

[](#installation)

Installation can be done via [Composer](http://getcomposer.org/). All you need is to add this to your `composer.json`:

```
  "repositories": [
    {
      "type": "pear",
      "url": "http://pear.php.net"
    }
  ],
  "require": {
    "purple-dbu/vcloud-sdk-helpers": "1.1.3"
  }
```

Usage
-----

[](#usage)

For full usage instructions, please read the [API Documentation](http://purple-dbu.github.io/vcloud-sdk-php-helpers/).

### Right Helper

[](#right-helper)

The Right Helper gives you the ability to manipulate user rights with ease. It helps you determining the current logged user rights.

#### Determine whether the current user is administrator of his organization, or not

[](#determine-whether-the-current-user-is-administrator-of-his-organization-or-not)

```
$service = \VMware_VCloud_SDK_Service::getService();
$service->login(...);

\VCloud\Helpers\Right::create($service)->isCurrentUserOrganizationAdmin();

// => true|false depending on currently logged user rights
```

### Query Helper

[](#query-helper)

The Query Helper gives you the ability to manipulate the vCloud SDK Query Service with ease. It provides abstraction for pagination.

#### Get all results for query 'adminVApp'

[](#get-all-results-for-query-adminvapp)

```
$service = \VMware_VCloud_SDK_Service::getService();
$service->login(...);

\VCloud\Helpers\Query::create($service)->queryRecords(\VMware_VCloud_SDK_Query_Types::ADMIN_VAPP);

// => array(
//        \VMware_VCloud_API_QueryResultAdminVAppRecordType,
//        ...
//    )
```

#### Get the query result for 'adminVApp' with id 'c47ddf20-05de-44f5-b79e-c463992ffd3f'

[](#get-the-query-result-for-adminvapp-with-id-c47ddf20-05de-44f5-b79e-c463992ffd3f)

```
$service = \VMware_VCloud_SDK_Service::getService();
$service->login(...);

\VCloud\Helpers\Query::create($service)->queryRecord(
    \VMware_VCloud_SDK_Query_Types::ADMIN_VAPP,
    'id==c47ddf20-05de-44f5-b79e-c463992ffd3f'
);

// => \VMware_VCloud_API_QueryResultAdminVAppRecordType
// OR null if no vApp exist with such id
```

### Exception Helper

[](#exception-helper)

The Exception Helper gives you the ability to manipulate vCloud SDK exceptions (VMware\_VCloud\_SDK\_Exception) with ease. It allows extracting the error codes and messages from the original exception message, with is just raw XML of the form:

```

```

#### Get the error message

[](#get-the-error-message)

```
...
catch(\VMware_VCloud_SDK_Exception $e) {
    \VCloud\Helpers\Exception::create($e)->getMessage($e);

    // => (string) The message contained in the error XML
}
```

#### Get the error code

[](#get-the-error-code)

```
...
catch(\VMware_VCloud_SDK_Exception $e) {
    \VCloud\Helpers\Exception::create($e)->getMajorErrorCode($e);

    // => (int) The major error code contained in the error XML
}
```

### Metadata helper

[](#metadata-helper)

The Metadata Helper gives you the ability to manipulate metadata on vCloud objects with ease. It helps finding objects with a particular metadata (to either one particular value, or any value).

#### Get all vApp Template with a given metadata set (any value)

[](#get-all-vapp-template-with-a-given-metadata-set-any-value)

```
$service = \VMware_VCloud_SDK_Service::getService();
$service->login(...);

\VCloud\Helpers\Metadata::create($service)->getObjects(
    \VMware_VCloud_SDK_Query_Types::ADMIN_VAPP_TEMPLATE,
    'myMetadata'
);

// => array(
//        \VMware_VCloud_SDK_VAppTemplate,
//        ...
//    )
// The result array contains all the vApp Templates that hold a metadata named
// "myMetadata"
```

#### Get the first vApp Template with a given metadata set to a particular value

[](#get-the-first-vapp-template-with-a-given-metadata-set-to-a-particular-value)

```
$service = \VMware_VCloud_SDK_Service::getService();
$service->login(...);

\VCloud\Helpers\Metadata::create($service)->getObject(
    \VMware_VCloud_SDK_Query_Types::ADMIN_VAPP_TEMPLATE,
    'someId',
    '23d6deb1-1778-4325-8289-2f150d122675'
);

// => \VMware_VCloud_SDK_VAppTemplate
//
// The result vApp Template is the first vApp Template that holds a metadata
// named "someId" with the value "23d6deb1-1778-4325-8289-2f150d122675"
```

Licensing
---------

[](#licensing)

This project is released under [MIT License](LICENSE) license. If this license does not fit your requirement for whatever reason, but you would be interested in using the work (as defined below) under another license, please contact Purple DBU at .

Contributing
------------

[](#contributing)

Contributions (issues ♥, pull requests ♥♥♥) are more than welcome! Feel free to clone, fork, modify, extend, etc, as long as you respect the [license terms](LICENSE).

### Requirements

[](#requirements)

You need to have the following software installed:

- git
- make
- curl
- php &gt;= 5.3.2

You need to have a working vCloud Director installation.

### Getting started

[](#getting-started)

To start contributing, the best is to follow these steps:

1. Create a GitHub account
2. Create your own fork of this project
3. Clone it to your machine: `git clone https://github.com//vcloud-sdk-php-helpers.git`
4. Go to the project's root directory: `cd vcloud-sdk-php-helpers`
5. Create the file *tests/config.php*: `cp tests/config.php.dist tests/config.php`
6. Edit `tests/config.php` and set values according to your vCloud Director configuration
7. Install dependencies: `make dependencies`
8. Run tests: `make test`

### Common tasks

[](#common-tasks)

- Update dependencies: `make dependencies`
- Clean dependencies: `make clean`
- Check code quality: `make lint`
- Run integration tests: `make integration`
- Generate stubs for unit tests: `make stubs`
- Run unit tests: `make test`
- Generate API documentation: `make doc`
- Publish API documentation: `make publish`

### Versioning

[](#versioning)

Using [Semver](http://semver.org/) as a base for versioning, this project also follow additional guidelines for version numbering. each version is in the format `x.y.z` where:

- Each modification of `x` introduces backward compatibility breaks
- Each modification of `y` introduces a new feature
- Modifications of `y` are simply corrections of existing patches

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~14 days

Recently: every ~3 days

Total

10

Last Release

4409d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1246795?v=4)[Alex Mercier](/maintainers/amercier)[@amercier](https://github.com/amercier)

---

Top Contributors

[![amercier](https://avatars.githubusercontent.com/u/1246795?v=4)](https://github.com/amercier "amercier (126 commits)")

---

Tags

apisdkhelpersVMwarevclouddirector

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/purple-dbu-vcloud-sdk-helpers/health.svg)

```
[![Health](https://phpackages.com/badges/purple-dbu-vcloud-sdk-helpers/health.svg)](https://phpackages.com/packages/purple-dbu-vcloud-sdk-helpers)
```

###  Alternatives

[deepseek-php/deepseek-php-client

deepseek PHP client is a robust and community-driven PHP client library for seamless integration with the Deepseek API, offering efficient access to advanced AI and data processing capabilities.

47073.9k5](/packages/deepseek-php-deepseek-php-client)[jstolpe/instagram-graph-api-php-sdk

Instagram Graph API PHP SDK

13998.4k2](/packages/jstolpe-instagram-graph-api-php-sdk)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
