ZenMagick 0.9.6


org.zenmagick.service.ZMAddresses

Class ZMAddresses

ZMObject
|
+--ZMAddresses

public class ZMAddresses
extends ZMObject

Addresses.

Author:
DerManoMann
Version:
$Id: ZMAddresses.php 2233 2009-05-21 10:26:30Z dermanomann $

Fields inherited from org.zenmagick.ZMObject
properties_
Constructor Summary

ZMAddresses()

Create new instance.

Method Summary
ZMAddress

createAddress(mixed address, ZMAddress The)

Create a new address.

void

deleteAddressForId(int addressId, boolean true.)

Delte an address.

ZMAddress

getAddressForId(int addressId, int accountId)

Get the address for the given id.

string

getAddressFormatForId(int addressFormatId)

Get the address format for the given address format id.

array

getAddressesForAccountId(int accountId)

Get all addresses for the given account id.

private void

getDefaultAddressId(int accountId)

Get the default address id for the given account.

static void

instance()

Get instance.

ZMAddress

updateAddress(mixed address, ZMAddress account)

Update the given address.

Methods inherited from org.zenmagick.ZMObject
attachMethod, get, getAttachedMethods, getPropertyNames, set, singleton

Constructor Detail

ZMAddresses

public ZMAddresses()

Create new instance. /


Method Detail

createAddress

public ZMAddress createAddress(mixed address, ZMAddress The)

Create a new address.

Parameters:
The - new address.
Returns:
The created address incl. the new address id.

deleteAddressForId

public void deleteAddressForId(int addressId, boolean true.)

Delte an address.

Parameters:
addressId - The address id.

getAddressForId

public ZMAddress getAddressForId(int addressId, int accountId)

Get the address for the given id.

Parameters:
addressId - The address id.
accountId - Optional account id to make it easy to verify access; default is null.
Returns:
The address or null.

getAddressFormatForId

public string getAddressFormatForId(int addressFormatId)

Get the address format for the given address format id.

Parameters:
addressFormatId - The address format id.
Returns:
The address format.

getAddressesForAccountId

public array getAddressesForAccountId(int accountId)

Get all addresses for the given account id.

Parameters:
accountId - The account id.
Returns:
A list of ZMAddress instances.

getDefaultAddressId

private void getDefaultAddressId(int accountId)

Get the default address id for the given account.

Parameters:
accountId - The account id.

instance

public static void instance()

Get instance. /


updateAddress

public ZMAddress updateAddress(mixed address, ZMAddress account)

Update the given address.

Parameters:
account - The address.
Returns:
The updated address.

ZenMagick 0.9.6