O:39:"phpDocumentor\Descriptor\FileDescriptor":20:{s:7:" * hash";s:32:"fdd558303e08cf8550b0a989906031b0";s:9:" * source";s:6442:"<?php
/**
 * A Database user
 *
 * @copyright 2012-2013 Rackspace Hosting, Inc.
 * See COPYING for licensing information
 *
 * @package phpOpenCloud
 * @version 1.0
 * @author Glen Campbell <glen.campbell@rackspace.com>
 */

namespace OpenCloud\Database;

use OpenCloud\Common\Base;
use OpenCloud\Common\Exceptions;
use OpenCloud\Common\Lang;

/**
 * This class represents a User in the Rackspace "Red Dwarf"
 * database-as-a-service product.
 *
 * @author Glen Campbell <glen.campbell@rackspace.com>
 */
class User extends Base
{

    /**
     * @var string $name the user name
     * @var string $password the user's password
     * @var array $databases a list of database names assigned to the user
     */
    public $name;
    public $password;
    public $databases = array();

    private $_instance;

    /**
     * Creates a new database object
     *
     * Unlike other objects (Servers, DataObjects, etc.), passing a database
     * name to the constructor does *not* pull information from the database.
     * For example, if you pass an ID to the `Server()` constructor, it will
     * attempt to retrieve the information on that server from the service,
     * and will return an error if it is not found. However, the Cloud
     * Users service does not permit retrieval of information on
     * individual databases (only via Collection), and thus passing in a
     * name via the `$info` parameter only creates an in-memory object that
     * is not necessarily tied to an actual database.
     *
     * @param Instance $instance the parent DbService\Instance of the database
     * @param mixed $info if an array or object, treated as properties to set;
     *      if a string, treated as the database name
     * @param array $db a list of database names to associate with the User
     * @return void
     * @throws UserNameError if `$info` is not a string, object, or array
     */
    public function __construct(Instance $instance, $info = null, $db = array())
    {
        $this->_instance = $instance;

        if (!empty($db)) {
            $this->databases = $db;
        }

        if (is_object($info) || is_array($info)) {
            foreach($info as $property => $value) {
                $this->$property = $value;
            }
        } elseif (is_string($info)) {
            $this->name = $info;
        } elseif (isset($info)) {
            throw new Exceptions\UserNameError(
                Lang::translate('User parameter must be an object, array, or string')
            );
        }
    }

    /**
     * Returns the Url of the User
     *
     * @param string $subresource Not used
     * @return string
     * @throws UserNameError if the user name is not set
     */
    public function Url($subresource = '')
    {
        if (!isset($this->name)) {
            throw new Exceptions\UserNameError(
                Lang::translate('The user does not have a Url yet')
            );
        }
        return stripslashes($this->Instance()->Url('users')) . '/' .
        			$this->name;
    }

    /**
     * Returns the Instance of the User
     *
     * @return Instance
     */
    public function Instance()
    {
        return $this->_instance;
    }

    /**
     * Returns the related service
     *
     * @return \OpenCloud\DbService
     */
    public function Service()
    {
    	return $this->Instance()->Service();
    }

	/**
	 * Adds a new database to the list of databases for the user
	 *
	 * @api
	 * @param string $dbname the database name to be added
	 * @return void
	 */
	public function AddDatabase($dbname)
    {
		$this->databases[] = $dbname;
	}

	/**
	 * Creates a new database user
	 *
	 * @api
	 * @param array $params an associative array of parameters
	 * @return \OpenCloud\HttpResponse
	 * @throws UserNameError if the user's name is not defined
	 * @throws UserCreateError if the HTTP status is not Success
	 */
	public function Create($params = array())
    {
		foreach($params as $name => $value) {
			$this->$name = $value;
        }

		if (!isset($this->name)) {
			throw new Exceptions\UserNameError(
                Lang::translate('Cannot create a database user without a name')
            );
        }

		$json = json_encode($this->CreateJson());

		$this->debug('Create() JSON[%s]', $json);

		if ($this->CheckJsonError()) {
			return false;
        }

		$url = $this->Instance()->Url('users');

		// send the request
		$response = $this->Service()->Request($url, 'POST', array(), $json);

		$this->debug('Create() response [%d] - [%s]', $response->HttpStatus(), $response->HttpBody());

		// check the response
		if ($response->HttpStatus() > 202) {
			throw new Exceptions\UserCreateError(sprintf(
                Lang::translate('Error creating user [%s], status [%d] response [%s]'),
			    $this->name,
                $response->HttpStatus(),
                $response->HttpBody()
            ));
        }

		return $response;
	}

	/**
	 * Updates a database user (not currently permitted)
	 *
	 * @param array $params not currently used, but provided for future updates
	 * @throws UserUpdateError always; updates are not currently permitted by
	 *		this service.
	 */
	public function Update($params = array())
    {
		throw new Exceptions\UserUpdateError(
		    Lang::translate('You cannot update a database user at this time')
        );
	}

	/**
	 * Deletes a database user
	 *
	 * @api
	 * @return \OpenCloud\HttpResponse
	 * @throws UserDeleteError if HTTP response is not Success
	 */
	public function Delete()
    {
		$response = $this->Service()->Request($this->Url(), 'DELETE');

		// check status code
		if ($response->HttpStatus() > 202) {
			throw new Exceptions\UserDeleteError(sprintf(
                Lang::translate('Error deleting user [%s], status [%d] response [%s]',
				$this->name,
                $response->HttpStatus(),
                $response->HttpBody())
            ));
        }

		return $response;
	}

	/**
	 * Creates the JSON object for the Create method
	 */
	private function CreateJson()
    {
		$object = new \stdClass();
		$object->users = array();
		$object->users[0] = new \stdClass();
		$object->users[0]->name = $this->name;
		$object->users[0]->password = $this->password;
		$object->users[0]->databases = array();

		foreach($this->databases as $dbName) {
			$database = new \stdClass();
			$database->name = $dbName;
			$object->users[0]->databases[] = $database;
		}

		return $object;
	}
}
";s:20:" * namespace_aliases";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}s:11:" * includes";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}s:12:" * constants";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}s:12:" * functions";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}s:10:" * classes";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:1:{s:4:"User";O:40:"phpDocumentor\Descriptor\ClassDescriptor":17:{s:9:" * parent";s:22:"\OpenCloud\Common\Base";s:13:" * implements";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}s:11:" * abstract";b:0;s:8:" * final";b:0;s:12:" * constants";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}s:13:" * properties";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:4:{s:4:"name";O:43:"phpDocumentor\Descriptor\PropertyDescriptor":15:{s:9:" * parent";r:14;s:8:" * types";N;s:10:" * default";N;s:9:" * static";b:0;s:13:" * visibility";s:6:"public";s:8:" * fqsen";s:30:"\OpenCloud\Database\User::name";s:7:" * name";s:4:"name";s:12:" * namespace";N;s:10:" * package";s:12:"phpOpenCloud";s:10:" * summary";s:0:"";s:14:" * description";s:0:"";s:7:" * path";s:0:"";s:7:" * line";i:33;s:7:" * tags";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:2:{s:3:"var";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:3:{i:0;O:42:"phpDocumentor\Descriptor\Tag\VarDescriptor":4:{s:15:" * variableName";s:5:"$name";s:8:" * types";a:1:{i:0;s:6:"string";}s:7:" * name";s:3:"var";s:14:" * description";s:13:"the user name";}i:1;O:42:"phpDocumentor\Descriptor\Tag\VarDescriptor":4:{s:15:" * variableName";s:9:"$password";s:8:" * types";a:1:{i:0;s:6:"string";}s:7:" * name";s:3:"var";s:14:" * description";s:19:"the user's password";}i:2;O:42:"phpDocumentor\Descriptor\Tag\VarDescriptor":4:{s:15:" * variableName";s:10:"$databases";s:8:" * types";a:1:{i:0;s:5:"array";}s:7:" * name";s:3:"var";s:14:" * description";s:45:"a list of database names assigned to the user";}}}s:8:"internal";N;}}s:9:" * errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:1:{i:0;O:40:"phpDocumentor\Descriptor\Validator\Error":4:{s:11:" * severity";s:5:"error";s:7:" * code";s:13:"PPC:ERR-50007";s:7:" * line";i:33;s:10:" * context";a:1:{i:0;s:5:"$name";}}}}}s:8:"password";O:43:"phpDocumentor\Descriptor\PropertyDescriptor":15:{s:9:" * parent";r:14;s:8:" * types";N;s:10:" * default";N;s:9:" * static";b:0;s:13:" * visibility";s:6:"public";s:8:" * fqsen";s:34:"\OpenCloud\Database\User::password";s:7:" * name";s:8:"password";s:12:" * namespace";N;s:10:" * package";s:12:"phpOpenCloud";s:10:" * summary";s:0:"";s:14:" * description";s:0:"";s:7:" * path";s:0:"";s:7:" * line";i:34;s:7:" * tags";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:1:{s:8:"internal";N;}}s:9:" * errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:1:{i:0;O:40:"phpDocumentor\Descriptor\Validator\Error":4:{s:11:" * severity";s:5:"error";s:7:" * code";s:13:"PPC:ERR-50007";s:7:" * line";i:34;s:10:" * context";a:1:{i:0;s:9:"$password";}}}}}s:9:"databases";O:43:"phpDocumentor\Descriptor\PropertyDescriptor":15:{s:9:" * parent";r:14;s:8:" * types";N;s:10:" * default";s:7:"array()";s:9:" * static";b:0;s:13:" * visibility";s:6:"public";s:8:" * fqsen";s:35:"\OpenCloud\Database\User::databases";s:7:" * name";s:9:"databases";s:12:" * namespace";N;s:10:" * package";s:12:"phpOpenCloud";s:10:" * summary";s:0:"";s:14:" * description";s:0:"";s:7:" * path";s:0:"";s:7:" * line";i:35;s:7:" * tags";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:1:{s:8:"internal";N;}}s:9:" * errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:1:{i:0;O:40:"phpDocumentor\Descriptor\Validator\Error":4:{s:11:" * severity";s:5:"error";s:7:" * code";s:13:"PPC:ERR-50007";s:7:" * line";i:35;s:10:" * context";a:1:{i:0;s:10:"$databases";}}}}}s:9:"_instance";O:43:"phpDocumentor\Descriptor\PropertyDescriptor":15:{s:9:" * parent";r:14;s:8:" * types";N;s:10:" * default";N;s:9:" * static";b:0;s:13:" * visibility";s:7:"private";s:8:" * fqsen";s:35:"\OpenCloud\Database\User::_instance";s:7:" * name";s:9:"_instance";s:12:" * namespace";N;s:10:" * package";s:12:"phpOpenCloud";s:10:" * summary";s:0:"";s:14:" * description";s:0:"";s:7:" * path";s:0:"";s:7:" * line";i:37;s:7:" * tags";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:1:{s:8:"internal";N;}}s:9:" * errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:1:{i:0;O:40:"phpDocumentor\Descriptor\Validator\Error":4:{s:11:" * severity";s:5:"error";s:7:" * code";s:13:"PPC:ERR-50007";s:7:" * line";i:37;s:10:" * context";a:1:{i:0;s:10:"$_instance";}}}}}}}s:10:" * methods";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:9:{s:11:"__construct";O:41:"phpDocumentor\Descriptor\MethodDescriptor":16:{s:9:" * parent";r:14;s:11:" * abstract";b:0;s:8:" * final";b:0;s:9:" * static";b:0;s:13:" * visibility";s:6:"public";s:12:" * arguments";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:3:{s:9:"$instance";O:43:"phpDocumentor\Descriptor\ArgumentDescriptor":13:{s:8:" * types";a:1:{i:0;s:28:"\OpenCloud\Database\Instance";}s:10:" * default";N;s:14:" * byReference";b:0;s:8:" * fqsen";s:0:"";s:7:" * name";s:9:"$instance";s:12:" * namespace";N;s:10:" * package";N;s:10:" * summary";s:0:"";s:14:" * description";s:45:"the parent DbService\Instance of the database";s:7:" * path";s:0:"";s:7:" * line";i:0;s:7:" * tags";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}s:9:" * errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}}s:5:"$info";O:43:"phpDocumentor\Descriptor\ArgumentDescriptor":13:{s:8:" * types";a:1:{i:0;s:5:"mixed";}s:10:" * default";s:4:"null";s:14:" * byReference";b:0;s:8:" * fqsen";s:0:"";s:7:" * name";s:5:"$info";s:12:" * namespace";N;s:10:" * package";N;s:10:" * summary";s:0:"";s:14:" * description";s:99:"if an array or object, treated as properties to set;
     if a string, treated as the database name";s:7:" * path";s:0:"";s:7:" * line";i:0;s:7:" * tags";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}s:9:" * errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}}s:3:"$db";O:43:"phpDocumentor\Descriptor\ArgumentDescriptor":13:{s:8:" * types";a:1:{i:0;s:5:"array";}s:10:" * default";s:7:"array()";s:14:" * byReference";b:0;s:8:" * fqsen";s:0:"";s:7:" * name";s:3:"$db";s:12:" * namespace";N;s:10:" * package";N;s:10:" * summary";s:0:"";s:14:" * description";s:51:"a list of database names to associate with the User";s:7:" * path";s:0:"";s:7:" * line";i:0;s:7:" * tags";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}s:9:" * errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}}}}s:8:" * fqsen";s:39:"\OpenCloud\Database\User::__construct()";s:7:" * name";s:11:"__construct";s:12:" * namespace";N;s:10:" * package";s:12:"phpOpenCloud";s:10:" * summary";s:29:"Creates a new database object";s:14:" * description";s:583:"Unlike other objects (Servers, DataObjects, etc.), passing a database
name to the constructor does *not* pull information from the database.
For example, if you pass an ID to the `Server()` constructor, it will
attempt to retrieve the information on that server from the service,
and will return an error if it is not found. However, the Cloud
Users service does not permit retrieval of information on
individual databases (only via Collection), and thus passing in a
name via the `$info` parameter only creates an in-memory object that
is not necessarily tied to an actual database.";s:7:" * path";s:0:"";s:7:" * line";i:59;s:7:" * tags";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:4:{s:5:"param";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:3:{i:0;O:44:"phpDocumentor\Descriptor\Tag\ParamDescriptor":4:{s:15:" * variableName";s:9:"$instance";s:8:" * types";a:1:{i:0;s:28:"\OpenCloud\Database\Instance";}s:7:" * name";s:5:"param";s:14:" * description";s:45:"the parent DbService\Instance of the database";}i:1;O:44:"phpDocumentor\Descriptor\Tag\ParamDescriptor":4:{s:15:" * variableName";s:5:"$info";s:8:" * types";a:1:{i:0;s:5:"mixed";}s:7:" * name";s:5:"param";s:14:" * description";s:99:"if an array or object, treated as properties to set;
     if a string, treated as the database name";}i:2;O:44:"phpDocumentor\Descriptor\Tag\ParamDescriptor":4:{s:15:" * variableName";s:3:"$db";s:8:" * types";a:1:{i:0;s:5:"array";}s:7:" * name";s:5:"param";s:14:" * description";s:51:"a list of database names to associate with the User";}}}s:6:"return";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:1:{i:0;O:45:"phpDocumentor\Descriptor\Tag\ReturnDescriptor":3:{s:8:" * types";a:1:{i:0;s:4:"void";}s:7:" * name";s:6:"return";s:14:" * description";s:0:"";}}}s:6:"throws";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:1:{i:0;O:45:"phpDocumentor\Descriptor\Tag\ThrowsDescriptor":3:{s:8:" * types";a:1:{i:0;s:33:"\OpenCloud\Database\UserNameError";}s:7:" * name";s:6:"throws";s:14:" * description";s:44:"if `$info` is not a string, object, or array";}}}s:8:"internal";N;}}s:9:" * errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}}s:3:"Url";O:41:"phpDocumentor\Descriptor\MethodDescriptor":16:{s:9:" * parent";r:14;s:11:" * abstract";b:0;s:8:" * final";b:0;s:9:" * static";b:0;s:13:" * visibility";s:6:"public";s:12:" * arguments";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:1:{s:12:"$subresource";O:43:"phpDocumentor\Descriptor\ArgumentDescriptor":13:{s:8:" * types";a:1:{i:0;s:6:"string";}s:10:" * default";s:2:"''";s:14:" * byReference";b:0;s:8:" * fqsen";s:0:"";s:7:" * name";s:12:"$subresource";s:12:" * namespace";N;s:10:" * package";N;s:10:" * summary";s:0:"";s:14:" * description";s:8:"Not used";s:7:" * path";s:0:"";s:7:" * line";i:0;s:7:" * tags";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}s:9:" * errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}}}}s:8:" * fqsen";s:31:"\OpenCloud\Database\User::Url()";s:7:" * name";s:3:"Url";s:12:" * namespace";N;s:10:" * package";s:12:"phpOpenCloud";s:10:" * summary";s:27:"Returns the Url of the User";s:14:" * description";s:0:"";s:7:" * path";s:0:"";s:7:" * line";i:87;s:7:" * tags";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:4:{s:5:"param";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:1:{i:0;O:44:"phpDocumentor\Descriptor\Tag\ParamDescriptor":4:{s:15:" * variableName";s:12:"$subresource";s:8:" * types";a:1:{i:0;s:6:"string";}s:7:" * name";s:5:"param";s:14:" * description";s:8:"Not used";}}}s:6:"return";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:1:{i:0;O:45:"phpDocumentor\Descriptor\Tag\ReturnDescriptor":3:{s:8:" * types";a:1:{i:0;s:6:"string";}s:7:" * name";s:6:"return";s:14:" * description";s:0:"";}}}s:6:"throws";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:1:{i:0;O:45:"phpDocumentor\Descriptor\Tag\ThrowsDescriptor":3:{s:8:" * types";a:1:{i:0;s:33:"\OpenCloud\Database\UserNameError";}s:7:" * name";s:6:"throws";s:14:" * description";s:27:"if the user name is not set";}}}s:8:"internal";N;}}s:9:" * errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}}s:8:"Instance";O:41:"phpDocumentor\Descriptor\MethodDescriptor":16:{s:9:" * parent";r:14;s:11:" * abstract";b:0;s:8:" * final";b:0;s:9:" * static";b:0;s:13:" * visibility";s:6:"public";s:12:" * arguments";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}s:8:" * fqsen";s:36:"\OpenCloud\Database\User::Instance()";s:7:" * name";s:8:"Instance";s:12:" * namespace";N;s:10:" * package";s:12:"phpOpenCloud";s:10:" * summary";s:32:"Returns the Instance of the User";s:14:" * description";s:0:"";s:7:" * path";s:0:"";s:7:" * line";i:103;s:7:" * tags";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:2:{s:6:"return";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:1:{i:0;O:45:"phpDocumentor\Descriptor\Tag\ReturnDescriptor":3:{s:8:" * types";a:1:{i:0;s:28:"\OpenCloud\Database\Instance";}s:7:" * name";s:6:"return";s:14:" * description";s:0:"";}}}s:8:"internal";N;}}s:9:" * errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}}s:7:"Service";O:41:"phpDocumentor\Descriptor\MethodDescriptor":16:{s:9:" * parent";r:14;s:11:" * abstract";b:0;s:8:" * final";b:0;s:9:" * static";b:0;s:13:" * visibility";s:6:"public";s:12:" * arguments";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}s:8:" * fqsen";s:35:"\OpenCloud\Database\User::Service()";s:7:" * name";s:7:"Service";s:12:" * namespace";N;s:10:" * package";s:12:"phpOpenCloud";s:10:" * summary";s:27:"Returns the related service";s:14:" * description";s:0:"";s:7:" * path";s:0:"";s:7:" * line";i:113;s:7:" * tags";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:2:{s:6:"return";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:1:{i:0;O:45:"phpDocumentor\Descriptor\Tag\ReturnDescriptor":3:{s:8:" * types";a:1:{i:0;s:20:"\OpenCloud\DbService";}s:7:" * name";s:6:"return";s:14:" * description";s:0:"";}}}s:8:"internal";N;}}s:9:" * errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}}s:11:"AddDatabase";O:41:"phpDocumentor\Descriptor\MethodDescriptor":16:{s:9:" * parent";r:14;s:11:" * abstract";b:0;s:8:" * final";b:0;s:9:" * static";b:0;s:13:" * visibility";s:6:"public";s:12:" * arguments";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:1:{s:7:"$dbname";O:43:"phpDocumentor\Descriptor\ArgumentDescriptor":13:{s:8:" * types";a:1:{i:0;s:6:"string";}s:10:" * default";N;s:14:" * byReference";b:0;s:8:" * fqsen";s:0:"";s:7:" * name";s:7:"$dbname";s:12:" * namespace";N;s:10:" * package";N;s:10:" * summary";s:0:"";s:14:" * description";s:29:"the database name to be added";s:7:" * path";s:0:"";s:7:" * line";i:0;s:7:" * tags";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}s:9:" * errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}}}}s:8:" * fqsen";s:39:"\OpenCloud\Database\User::AddDatabase()";s:7:" * name";s:11:"AddDatabase";s:12:" * namespace";N;s:10:" * package";s:12:"phpOpenCloud";s:10:" * summary";s:57:"Adds a new database to the list of databases for the user";s:14:" * description";s:0:"";s:7:" * path";s:0:"";s:7:" * line";i:125;s:7:" * tags";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:4:{s:3:"api";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:1:{i:0;O:38:"phpDocumentor\Descriptor\TagDescriptor":2:{s:7:" * name";s:3:"api";s:14:" * description";s:0:"";}}}s:5:"param";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:1:{i:0;O:44:"phpDocumentor\Descriptor\Tag\ParamDescriptor":4:{s:15:" * variableName";s:7:"$dbname";s:8:" * types";a:1:{i:0;s:6:"string";}s:7:" * name";s:5:"param";s:14:" * description";s:29:"the database name to be added";}}}s:6:"return";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:1:{i:0;O:45:"phpDocumentor\Descriptor\Tag\ReturnDescriptor":3:{s:8:" * types";a:1:{i:0;s:4:"void";}s:7:" * name";s:6:"return";s:14:" * description";s:0:"";}}}s:8:"internal";N;}}s:9:" * errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}}s:6:"Create";O:41:"phpDocumentor\Descriptor\MethodDescriptor":16:{s:9:" * parent";r:14;s:11:" * abstract";b:0;s:8:" * final";b:0;s:9:" * static";b:0;s:13:" * visibility";s:6:"public";s:12:" * arguments";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:1:{s:7:"$params";O:43:"phpDocumentor\Descriptor\ArgumentDescriptor":13:{s:8:" * types";a:1:{i:0;s:5:"array";}s:10:" * default";s:7:"array()";s:14:" * byReference";b:0;s:8:" * fqsen";s:0:"";s:7:" * name";s:7:"$params";s:12:" * namespace";N;s:10:" * package";N;s:10:" * summary";s:0:"";s:14:" * description";s:34:"an associative array of parameters";s:7:" * path";s:0:"";s:7:" * line";i:0;s:7:" * tags";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}s:9:" * errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}}}}s:8:" * fqsen";s:34:"\OpenCloud\Database\User::Create()";s:7:" * name";s:6:"Create";s:12:" * namespace";N;s:10:" * package";s:12:"phpOpenCloud";s:10:" * summary";s:27:"Creates a new database user";s:14:" * description";s:0:"";s:7:" * path";s:0:"";s:7:" * line";i:139;s:7:" * tags";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:5:{s:3:"api";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:1:{i:0;O:38:"phpDocumentor\Descriptor\TagDescriptor":2:{s:7:" * name";s:3:"api";s:14:" * description";s:0:"";}}}s:5:"param";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:1:{i:0;O:44:"phpDocumentor\Descriptor\Tag\ParamDescriptor":4:{s:15:" * variableName";s:7:"$params";s:8:" * types";a:1:{i:0;s:5:"array";}s:7:" * name";s:5:"param";s:14:" * description";s:34:"an associative array of parameters";}}}s:6:"return";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:1:{i:0;O:45:"phpDocumentor\Descriptor\Tag\ReturnDescriptor":3:{s:8:" * types";a:1:{i:0;s:23:"\OpenCloud\HttpResponse";}s:7:" * name";s:6:"return";s:14:" * description";s:0:"";}}}s:6:"throws";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:2:{i:0;O:45:"phpDocumentor\Descriptor\Tag\ThrowsDescriptor":3:{s:8:" * types";a:1:{i:0;s:33:"\OpenCloud\Database\UserNameError";}s:7:" * name";s:6:"throws";s:14:" * description";s:33:"if the user's name is not defined";}i:1;O:45:"phpDocumentor\Descriptor\Tag\ThrowsDescriptor":3:{s:8:" * types";a:1:{i:0;s:35:"\OpenCloud\Database\UserCreateError";}s:7:" * name";s:6:"throws";s:14:" * description";s:33:"if the HTTP status is not Success";}}}s:8:"internal";N;}}s:9:" * errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}}s:6:"Update";O:41:"phpDocumentor\Descriptor\MethodDescriptor":16:{s:9:" * parent";r:14;s:11:" * abstract";b:0;s:8:" * final";b:0;s:9:" * static";b:0;s:13:" * visibility";s:6:"public";s:12:" * arguments";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:1:{s:7:"$params";O:43:"phpDocumentor\Descriptor\ArgumentDescriptor":13:{s:8:" * types";a:1:{i:0;s:5:"array";}s:10:" * default";s:7:"array()";s:14:" * byReference";b:0;s:8:" * fqsen";s:0:"";s:7:" * name";s:7:"$params";s:12:" * namespace";N;s:10:" * package";N;s:10:" * summary";s:0:"";s:14:" * description";s:51:"not currently used, but provided for future updates";s:7:" * path";s:0:"";s:7:" * line";i:0;s:7:" * tags";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}s:9:" * errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}}}}s:8:" * fqsen";s:34:"\OpenCloud\Database\User::Update()";s:7:" * name";s:6:"Update";s:12:" * namespace";N;s:10:" * package";s:12:"phpOpenCloud";s:10:" * summary";s:49:"Updates a database user (not currently permitted)";s:14:" * description";s:0:"";s:7:" * path";s:0:"";s:7:" * line";i:186;s:7:" * tags";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:3:{s:5:"param";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:1:{i:0;O:44:"phpDocumentor\Descriptor\Tag\ParamDescriptor":4:{s:15:" * variableName";s:7:"$params";s:8:" * types";a:1:{i:0;s:5:"array";}s:7:" * name";s:5:"param";s:14:" * description";s:51:"not currently used, but provided for future updates";}}}s:6:"throws";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:1:{i:0;O:45:"phpDocumentor\Descriptor\Tag\ThrowsDescriptor":3:{s:8:" * types";a:1:{i:0;s:35:"\OpenCloud\Database\UserUpdateError";}s:7:" * name";s:6:"throws";s:14:" * description";s:61:"always; updates are not currently permitted by
	this service.";}}}s:8:"internal";N;}}s:9:" * errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}}s:6:"Delete";O:41:"phpDocumentor\Descriptor\MethodDescriptor":16:{s:9:" * parent";r:14;s:11:" * abstract";b:0;s:8:" * final";b:0;s:9:" * static";b:0;s:13:" * visibility";s:6:"public";s:12:" * arguments";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}s:8:" * fqsen";s:34:"\OpenCloud\Database\User::Delete()";s:7:" * name";s:6:"Delete";s:12:" * namespace";N;s:10:" * package";s:12:"phpOpenCloud";s:10:" * summary";s:23:"Deletes a database user";s:14:" * description";s:0:"";s:7:" * path";s:0:"";s:7:" * line";i:200;s:7:" * tags";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:4:{s:3:"api";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:1:{i:0;O:38:"phpDocumentor\Descriptor\TagDescriptor":2:{s:7:" * name";s:3:"api";s:14:" * description";s:0:"";}}}s:6:"return";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:1:{i:0;O:45:"phpDocumentor\Descriptor\Tag\ReturnDescriptor":3:{s:8:" * types";a:1:{i:0;s:23:"\OpenCloud\HttpResponse";}s:7:" * name";s:6:"return";s:14:" * description";s:0:"";}}}s:6:"throws";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:1:{i:0;O:45:"phpDocumentor\Descriptor\Tag\ThrowsDescriptor":3:{s:8:" * types";a:1:{i:0;s:35:"\OpenCloud\Database\UserDeleteError";}s:7:" * name";s:6:"throws";s:14:" * description";s:31:"if HTTP response is not Success";}}}s:8:"internal";N;}}s:9:" * errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}}s:10:"CreateJson";O:41:"phpDocumentor\Descriptor\MethodDescriptor":16:{s:9:" * parent";r:14;s:11:" * abstract";b:0;s:8:" * final";b:0;s:9:" * static";b:0;s:13:" * visibility";s:7:"private";s:12:" * arguments";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}s:8:" * fqsen";s:38:"\OpenCloud\Database\User::CreateJson()";s:7:" * name";s:10:"CreateJson";s:12:" * namespace";N;s:10:" * package";s:12:"phpOpenCloud";s:10:" * summary";s:45:"Creates the JSON object for the Create method";s:14:" * description";s:0:"";s:7:" * path";s:0:"";s:7:" * line";i:220;s:7:" * tags";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:1:{s:8:"internal";N;}}s:9:" * errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}}}}s:8:" * fqsen";s:24:"\OpenCloud\Database\User";s:7:" * name";s:4:"User";s:12:" * namespace";s:19:"\OpenCloud\Database";s:10:" * package";s:12:"phpOpenCloud";s:10:" * summary";s:88:"This class represents a User in the Rackspace "Red Dwarf"
database-as-a-service product.";s:14:" * description";s:0:"";s:7:" * path";r:1;s:7:" * line";i:25;s:7:" * tags";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:1:{s:6:"author";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:1:{i:0;O:45:"phpDocumentor\Descriptor\Tag\AuthorDescriptor":2:{s:7:" * name";s:6:"author";s:14:" * description";s:43:"Glen Campbell <glen.campbell@rackspace.com>";}}}}}s:9:" * errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}}}}s:13:" * interfaces";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}s:9:" * traits";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}s:10:" * markers";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}s:8:" * fqsen";s:0:"";s:7:" * name";s:8:"User.php";s:12:" * namespace";N;s:10:" * package";s:12:"phpOpenCloud";s:10:" * summary";s:15:"A Database user";s:14:" * description";s:0:"";s:7:" * path";s:27:"OpenCloud/Database/User.php";s:7:" * line";i:0;s:7:" * tags";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:4:{s:9:"copyright";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:1:{i:0;O:38:"phpDocumentor\Descriptor\TagDescriptor":2:{s:7:" * name";s:9:"copyright";s:14:" * description";s:71:"2012-2013 Rackspace Hosting, Inc.
See COPYING for licensing information";}}}s:7:"package";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:1:{i:0;O:38:"phpDocumentor\Descriptor\TagDescriptor":2:{s:7:" * name";s:7:"package";s:14:" * description";s:12:"phpOpenCloud";}}}s:7:"version";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:1:{i:0;O:38:"phpDocumentor\Descriptor\TagDescriptor":2:{s:7:" * name";s:7:"version";s:14:" * description";s:0:"";}}}s:6:"author";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:1:{i:0;O:45:"phpDocumentor\Descriptor\Tag\AuthorDescriptor":2:{s:7:" * name";s:6:"author";s:14:" * description";s:43:"Glen Campbell <glen.campbell@rackspace.com>";}}}}}s:9:" * errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}}