PHP Class Sonata\CustomerBundle\Entity\BaseAddress

Inheritance: implements Sonata\Component\Customer\AddressInterface
Show file Open project: sonata-project/ecommerce Class Usage Examples

Protected Properties

Property Type Description
$address1 string
$address2 string
$address3 string
$city string
$countryCode string
$createdAt datetime
$current boolean
$customer
$firstname string
$lastname string
$name string
$phone string
$postcode string
$type integer
$updatedAt datetime

Public Methods

Method Description
__construct ( )
__toString ( )
formatAddress ( array $address, string $sep = ', ' ) : string Formats an address in an array form.
getAddress1 ( ) : string Get address1.
getAddress2 ( ) : string Get address2.
getAddress3 ( ) : string Get address3.
getAddressArrayForRender ( ) : array
getCity ( ) : string Get city.
getCountryCode ( ) : string Get countryCode.
getCreatedAt ( ) : Datetime Get createdAt.
getCurrent ( ) : boolean Get current.
getCustomer ( )
getFirstname ( ) : string Get firstname.
getFullAddress ( string $sep = ', ' ) : string
getFullAddressHtml ( ) : string
getLastname ( ) : string Get lastname.
getName ( )
getPhone ( ) : string Get phone.
getPostcode ( ) : string Get postcode.
getType ( ) : integer Get type.
getTypeCode ( )
getTypesList ( )
getUpdatedAt ( ) : Datetime Get updatedAt.
prePersist ( )
preUpdate ( )
setAddress1 ( string $address1 ) Set address1.
setAddress2 ( string $address2 ) Set address2.
setAddress3 ( string $address3 ) Set address3.
setCity ( string $city ) Set city.
setCountryCode ( string $countryCode ) Set countryCode.
setCreatedAt ( DateTime $createdAt = null ) Set createdAt.
setCurrent ( boolean $current ) Set current.
setCustomer ( Sonata\Component\Customer\CustomerInterface $customer )
setFirstname ( string $firstname ) Set firstname.
setLastname ( string $lastname ) Set lastname.
setName ( $name )
setPhone ( string $phone ) Set phone.
setPostcode ( string $postcode ) Set postcode.
setType ( integer $type ) Set type.
setUpdatedAt ( DateTime $updatedAt = null ) Set updatedAt.

Method Details

__construct() public method

public __construct ( )

__toString() public method

public __toString ( )

formatAddress() public static method

Formats an address in an array form.
public static formatAddress ( array $address, string $sep = ', ' ) : string
$address array The address array (required keys: firstname, lastname, address1, postcode, city, country_code)
$sep string The address separator
return string

getAddress1() public method

Get address1.
public getAddress1 ( ) : string
return string

getAddress2() public method

Get address2.
public getAddress2 ( ) : string
return string

getAddress3() public method

Get address3.
public getAddress3 ( ) : string
return string

getAddressArrayForRender() public method

public getAddressArrayForRender ( ) : array
return array

getCity() public method

Get city.
public getCity ( ) : string
return string

getCountryCode() public method

Get countryCode.
public getCountryCode ( ) : string
return string

getCreatedAt() public method

Get createdAt.
public getCreatedAt ( ) : Datetime
return Datetime

getCurrent() public method

Get current.
public getCurrent ( ) : boolean
return boolean

getCustomer() public method

public getCustomer ( )

getFirstname() public method

Get firstname.
public getFirstname ( ) : string
return string

getFullAddress() public method

public getFullAddress ( string $sep = ', ' ) : string
$sep string
return string

getFullAddressHtml() public method

public getFullAddressHtml ( ) : string
return string

getLastname() public method

Get lastname.
public getLastname ( ) : string
return string

getName() public method

public getName ( )

getPhone() public method

Get phone.
public getPhone ( ) : string
return string

getPostcode() public method

Get postcode.
public getPostcode ( ) : string
return string

getType() public method

Get type.
public getType ( ) : integer
return integer $type

getTypeCode() public method

public getTypeCode ( )

getTypesList() public static method

public static getTypesList ( )

getUpdatedAt() public method

Get updatedAt.
public getUpdatedAt ( ) : Datetime
return Datetime

prePersist() public method

public prePersist ( )

preUpdate() public method

public preUpdate ( )

setAddress1() public method

Set address1.
public setAddress1 ( string $address1 )
$address1 string

setAddress2() public method

Set address2.
public setAddress2 ( string $address2 )
$address2 string

setAddress3() public method

Set address3.
public setAddress3 ( string $address3 )
$address3 string

setCity() public method

Set city.
public setCity ( string $city )
$city string

setCountryCode() public method

Set countryCode.
public setCountryCode ( string $countryCode )
$countryCode string

setCreatedAt() public method

Set createdAt.
public setCreatedAt ( DateTime $createdAt = null )
$createdAt DateTime

setCurrent() public method

Set current.
public setCurrent ( boolean $current )
$current boolean

setCustomer() public method

public setCustomer ( Sonata\Component\Customer\CustomerInterface $customer )
$customer Sonata\Component\Customer\CustomerInterface

setFirstname() public method

Set firstname.
public setFirstname ( string $firstname )
$firstname string

setLastname() public method

Set lastname.
public setLastname ( string $lastname )
$lastname string

setName() public method

public setName ( $name )

setPhone() public method

Set phone.
public setPhone ( string $phone )
$phone string

setPostcode() public method

Set postcode.
public setPostcode ( string $postcode )
$postcode string

setType() public method

Set type.
public setType ( integer $type )
$type integer

setUpdatedAt() public method

Set updatedAt.
public setUpdatedAt ( DateTime $updatedAt = null )
$updatedAt DateTime

Property Details

$address1 protected property

protected string $address1
return string

$address2 protected property

protected string $address2
return string

$address3 protected property

protected string $address3
return string

$city protected property

protected string $city
return string

$countryCode protected property

protected string $countryCode
return string

$createdAt protected property

protected datetime $createdAt
return datetime

$current protected property

protected bool $current
return boolean

$customer protected property

protected $customer

$firstname protected property

protected string $firstname
return string

$lastname protected property

protected string $lastname
return string

$name protected property

protected string $name
return string

$phone protected property

protected string $phone
return string

$postcode protected property

protected string $postcode
return string

$type protected property

protected int $type
return integer

$updatedAt protected property

protected datetime $updatedAt
return datetime