public function addAccount($perm, $account, $user = NULL) {
    $rule = array('account' => $account);

    if (!empty($user)) {
      $rule['user'] = $user;
    }

    $this->addRule($perm, $rule);

    return $this;
  }
public function addAccount($perm, $account, $user = NULL) {
    $rule = array('account' => $account);

    if (!empty($user)) {
      $rule['user'] = $user;
    }

    $this->addRule($perm, $rule);

    return $this;
  }
public function addAccount ( $ perm , $ account , $ user = NULL ) { $ rule = array ( 'account' => $ account ) ; if ( ! empty ( $ user ) ) { $ rule [ 'user' ] = $ user ; } $ this -> addRule ( $ perm , $ rule ) ; return $ this ; }
Grant ACL access to an account.

Optionally, a user may be given to further limit access.

This is used to restrict access to a particular account and, if so
specified, a specific user on that account.

If just an account is given, any user on that account will be
automatically granted access.

If an account and a user is given, only that user of the account is
granted access.

If $user is an array, every user in the array will be granted
access under the provided account. That is, for each user in the
array, an entry of the form \c account:user will be generated in the
final ACL.

At this time there does not seem to be a way to grant global write
access to an object.

@param int $perm
ACL::READ, ACL::WRITE or ACL::READ_WRITE (which is the same as
ACL::READ|ACL::WRITE).
@param string $account
The name of the account.
@param mixed $user
The name of the user, or optionally an indexed array of user
names.

@retval HPCloud::Storage::ObjectStorage::ACL
@return \HPCloud\Storage\ObjectStorage\ACL
$this for current object so the method can be used in chaining.
Grant ACL access to an account .