\Thelia\ModelCustomer

Skeleton subclass for representing a row from the 'customer' table.

You should add additional methods to this class to meet the application requirements. This class will only be generated as long as it does not already exist in the output directory.

Summary

Methods
Properties
Constants
createOrUpdate()
preInsert()
postInsert()
preUpdate()
postUpdate()
setPassword()
setDispatcher()
getUsername()
checkPassword()
eraseCredentials()
getRoles()
__construct()
isModified()
isColumnModified()
getModifiedColumns()
isNew()
setNew()
isDeleted()
setDeleted()
resetModified()
equals()
hashCode()
getVirtualColumns()
hasVirtualColumn()
getVirtualColumn()
setVirtualColumn()
importFrom()
exportTo()
__sleep()
getId()
getRef()
getTitleId()
getFirstname()
getLastname()
getEmail()
getPassword()
getAlgo()
getReseller()
getLang()
getSponsor()
getDiscount()
getCreatedAt()
getUpdatedAt()
setId()
setRef()
setTitleId()
setFirstname()
setLastname()
setEmail()
setAlgo()
setReseller()
setLang()
setSponsor()
setDiscount()
setCreatedAt()
setUpdatedAt()
hasOnlyDefaultValues()
hydrate()
ensureConsistency()
reload()
delete()
save()
getByName()
getByPosition()
toArray()
setByName()
setByPosition()
fromArray()
buildCriteria()
buildPkeyCriteria()
getPrimaryKey()
setPrimaryKey()
isPrimaryKeyNull()
copyInto()
copy()
setCustomerTitle()
getCustomerTitle()
initRelation()
clearAddresses()
resetPartialAddresses()
initAddresses()
getAddresses()
setAddresses()
countAddresses()
addAddress()
removeAddress()
getAddressesJoinCustomerTitle()
getAddressesJoinCountry()
clearOrders()
resetPartialOrders()
initOrders()
getOrders()
setOrders()
countOrders()
addOrder()
removeOrder()
getOrdersJoinCurrency()
getOrdersJoinOrderAddressRelatedByAddressInvoice()
getOrdersJoinOrderAddressRelatedByAddressDelivery()
getOrdersJoinOrderStatus()
clearCarts()
resetPartialCarts()
initCarts()
getCarts()
setCarts()
countCarts()
addCart()
removeCart()
getCartsJoinAddressRelatedByAddressDeliveryId()
getCartsJoinAddressRelatedByAddressInvoiceId()
getCartsJoinCurrency()
clear()
clearAllReferences()
__toString()
keepUpdateDateUnchanged()
preSave()
postSave()
preDelete()
postDelete()
__call()
No public properties found
TABLE_MAP
dispatchEvent()
generateRef()
log()
doSave()
doInsert()
doUpdate()
doAddAddress()
doAddOrder()
doAddCart()
$dispatcher
$new
$deleted
$modifiedColumns
$virtualColumns
$id
$ref
$title_id
$firstname
$lastname
$email
$password
$algo
$reseller
$lang
$sponsor
$discount
$created_at
$updated_at
$aCustomerTitle
$collAddresses
$collAddressesPartial
$collOrders
$collOrdersPartial
$collCarts
$collCartsPartial
$alreadyInSave
$addressesScheduledForDeletion
$ordersScheduledForDeletion
$cartsScheduledForDeletion
N/A
No private methods found
No private properties found
N/A

Constants

TABLE_MAP

TABLE_MAP

TableMap class name

Properties

$dispatcher

$dispatcher : \Symfony\Component\EventDispatcher\EventDispatcherInterface

Type

\Symfony\Component\EventDispatcher\EventDispatcherInterface

$new

$new : boolean

attribute to determine if this object has previously been saved.

Type

boolean

$deleted

$deleted : boolean

attribute to determine whether this object has been deleted.

Type

boolean

$modifiedColumns

$modifiedColumns : array

The columns that have been modified in current object.

Tracking modified columns allows us to only update modified columns.

Type

array

$virtualColumns

$virtualColumns : array

The (virtual) columns that are added at runtime The formatters can add supplementary columns based on a resultset

Type

array

$id

$id : int

The value for the id field.

Type

int

$ref

$ref : string

The value for the ref field.

Type

string

$title_id

$title_id : int

The value for the title_id field.

Type

int

$firstname

$firstname : string

The value for the firstname field.

Type

string

$lastname

$lastname : string

The value for the lastname field.

Type

string

$email

$email : string

The value for the email field.

Type

string

$password

$password : string

The value for the password field.

Type

string

$algo

$algo : string

The value for the algo field.

Type

string

$reseller

$reseller : int

The value for the reseller field.

Type

int

$lang

$lang : string

The value for the lang field.

Type

string

$sponsor

$sponsor : string

The value for the sponsor field.

Type

string

$discount

$discount : double

The value for the discount field.

Type

double

$created_at

$created_at : string

The value for the created_at field.

Type

string

$updated_at

$updated_at : string

The value for the updated_at field.

Type

string

$collAddresses

$collAddresses : \Propel\Runtime\Collection\ObjectCollection|\Thelia\Model\Address[]

Type

\Propel\Runtime\Collection\ObjectCollection|\Thelia\Model\Address[] — Collection to store aggregation of ChildAddress objects.

$collAddressesPartial

$collAddressesPartial

$collOrders

$collOrders : \Propel\Runtime\Collection\ObjectCollection|\Thelia\Model\Order[]

Type

\Propel\Runtime\Collection\ObjectCollection|\Thelia\Model\Order[] — Collection to store aggregation of ChildOrder objects.

$collOrdersPartial

$collOrdersPartial

$collCarts

$collCarts : \Propel\Runtime\Collection\ObjectCollection|\Thelia\Model\Cart[]

Type

\Propel\Runtime\Collection\ObjectCollection|\Thelia\Model\Cart[] — Collection to store aggregation of ChildCart objects.

$collCartsPartial

$collCartsPartial

$alreadyInSave

$alreadyInSave : boolean

Flag to prevent endless save loop, if this object is referenced by another object which falls in this transaction.

Type

boolean

$addressesScheduledForDeletion

$addressesScheduledForDeletion : \Propel\Runtime\Collection\ObjectCollection

An array of objects scheduled for deletion.

Type

\Propel\Runtime\Collection\ObjectCollection

$ordersScheduledForDeletion

$ordersScheduledForDeletion : \Propel\Runtime\Collection\ObjectCollection

An array of objects scheduled for deletion.

Type

\Propel\Runtime\Collection\ObjectCollection

$cartsScheduledForDeletion

$cartsScheduledForDeletion : \Propel\Runtime\Collection\ObjectCollection

An array of objects scheduled for deletion.

Type

\Propel\Runtime\Collection\ObjectCollection

Methods

createOrUpdate()

createOrUpdate(int $titleId, string $firstname, string $lastname, string $address1, string $address2, string $address3, string $phone, string $cellphone, string $zipcode, string $city, int $countryId, string $email, string $plainPassword, string $lang, int $reseller, null $sponsor, int $discount)

Parameters

int $titleId

customer title id (from customer_title table)

string $firstname

customer first name

string $lastname

customer last name

string $address1

customer address

string $address2

customer adress complement 1

string $address3

customer adress complement 2

string $phone

customer phone number

string $cellphone

customer cellphone number

string $zipcode

customer zipcode

string $city
int $countryId

customer country id (from Country table)

string $email

customer email, must be unique

string $plainPassword

customer plain password, hash is made calling setPassword method. Not mandatory parameter but an exception is thrown if customer is new without password

string $lang
int $reseller
null $sponsor
int $discount

preInsert()

preInsert(\Propel\Runtime\Connection\ConnectionInterface $con) : boolean

Code to be run before inserting to database

Parameters

\Propel\Runtime\Connection\ConnectionInterface $con

Returns

boolean

postInsert()

postInsert(\Propel\Runtime\Connection\ConnectionInterface $con)

Code to be run after inserting to database

Parameters

\Propel\Runtime\Connection\ConnectionInterface $con

preUpdate()

preUpdate(\Propel\Runtime\Connection\ConnectionInterface $con) : boolean

Code to be run before updating the object in database

Parameters

\Propel\Runtime\Connection\ConnectionInterface $con

Returns

boolean

postUpdate()

postUpdate(\Propel\Runtime\Connection\ConnectionInterface $con)

Code to be run after updating the object in database

Parameters

\Propel\Runtime\Connection\ConnectionInterface $con

setPassword()

setPassword(string $v) : \Thelia\Model\Customer

Set the value of [password] column.

Parameters

string $v

new value

Returns

\Thelia\Model\Customer

The current object (for fluent API support)

setDispatcher()

setDispatcher(\Symfony\Component\EventDispatcher\EventDispatcherInterface $dispatcher)

Parameters

\Symfony\Component\EventDispatcher\EventDispatcherInterface $dispatcher

getUsername()

getUsername()

{@inheritDoc}

checkPassword()

checkPassword( $password)

{@inheritDoc}

Parameters

$password

eraseCredentials()

eraseCredentials()

{@inheritDoc}

getRoles()

getRoles()

{@inheritDoc}

__construct()

__construct()

Initializes internal state of Thelia\Model\Base\Customer object.

isModified()

isModified() : boolean

Returns whether the object has been modified.

Returns

boolean —

True if the object has been modified.

isColumnModified()

isColumnModified(string $col) : boolean

Has specified column been modified?

Parameters

string $col

column fully qualified name (TableMap::TYPE_COLNAME), e.g. Book::AUTHOR_ID

Returns

boolean —

True if $col has been modified.

getModifiedColumns()

getModifiedColumns() : array

Get the columns that have been modified in this object.

Returns

array —

A unique list of the modified column names for this object.

isNew()

isNew() : \Thelia\Model\Base\true,

Returns whether the object has ever been saved. This will be false, if the object was retrieved from storage or was created and then saved.

Returns

\Thelia\Model\Base\true, —

if the object has never been persisted.

setNew()

setNew(boolean $b)

Setter for the isNew attribute. This method will be called by Propel-generated children and objects.

Parameters

boolean $b

the state of the object.

isDeleted()

isDeleted() : boolean

Whether this object has been deleted.

Returns

boolean —

The deleted state of this object.

setDeleted()

setDeleted(boolean $b) : void

Specify whether this object has been deleted.

Parameters

boolean $b

The deleted state of this object.

resetModified()

resetModified(string $col) : void

Sets the modified state for the object to be false.

Parameters

string $col

If supplied, only the specified column is reset.

equals()

equals( $obj) : \Thelia\Model\Base\Whether

Compares this with another <code>Customer</code> instance. If <code>obj</code> is an instance of <code>Customer</code>, delegates to <code>equals(Customer)</code>. Otherwise, returns <code>false</code>.

Parameters

$obj

Returns

\Thelia\Model\Base\Whether —

equal to the object specified.

hashCode()

hashCode() : int

If the primary key is not null, return the hashcode of the primary key. Otherwise, return the hash code of the object.

Returns

int —

Hashcode

getVirtualColumns()

getVirtualColumns() : array

Get the associative array of the virtual columns in this object

Returns

array

hasVirtualColumn()

hasVirtualColumn( $name) : boolean

Checks the existence of a virtual column in this object

Parameters

$name

Returns

boolean

getVirtualColumn()

getVirtualColumn( $name) : mixed

Get the value of a virtual column in this object

Parameters

$name

Returns

mixed

setVirtualColumn()

setVirtualColumn(string $name, mixed $value) : \Thelia\Model\Base\Customer

Set the value of a virtual column in this object

Parameters

string $name

The virtual column name

mixed $value

The value to give to the virtual column

Returns

\Thelia\Model\Base\Customer

The current object, for fluid interface

importFrom()

importFrom(mixed $parser, string $data) : \Thelia\Model\Base\Customer

Populate the current object from a string, using a given parser format <code> $book = new Book(); $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); </code>

Parameters

mixed $parser

A AbstractParser instance, or a format name ('XML', 'YAML', 'JSON', 'CSV')

string $data

The source data to import from

Returns

\Thelia\Model\Base\Customer

The current object, for fluid interface

exportTo()

exportTo(mixed $parser, boolean $includeLazyLoadColumns) : string

Export the current object properties to a string, using a given parser format <code> $book = BookQuery::create()->findPk(9012); echo $book->exportTo('JSON'); => {"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); </code>

Parameters

mixed $parser

A AbstractParser instance, or a format name ('XML', 'YAML', 'JSON', 'CSV')

boolean $includeLazyLoadColumns

(optional) Whether to include lazy load(ed) columns. Defaults to TRUE.

Returns

string —

The exported data

__sleep()

__sleep()

Clean up internal collections prior to serializing Avoids recursive loops that turn into segmentation faults when serializing

getId()

getId() : int

Get the [id] column value.

Returns

int

getRef()

getRef() : string

Get the [ref] column value.

Returns

string

getTitleId()

getTitleId() : int

Get the [title_id] column value.

Returns

int

getFirstname()

getFirstname() : string

Get the [firstname] column value.

Returns

string

getLastname()

getLastname() : string

Get the [lastname] column value.

Returns

string

getEmail()

getEmail() : string

Get the [email] column value.

Returns

string

getPassword()

getPassword() : string

Get the [password] column value.

Returns

string

getAlgo()

getAlgo() : string

Get the [algo] column value.

Returns

string

getReseller()

getReseller() : int

Get the [reseller] column value.

Returns

int

getLang()

getLang() : string

Get the [lang] column value.

Returns

string

getSponsor()

getSponsor() : string

Get the [sponsor] column value.

Returns

string

getDiscount()

getDiscount() : double

Get the [discount] column value.

Returns

double

getCreatedAt()

getCreatedAt(string $format) : mixed

Get the [optionally formatted] temporal [created_at] column value.

Parameters

string $format

The date/time format string (either date()-style or strftime()-style). If format is NULL, then the raw \DateTime object will be returned.

Throws

\Propel\Runtime\Exception\PropelException
  • if unable to parse/validate the date/time value.

Returns

mixed —

Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00

getUpdatedAt()

getUpdatedAt(string $format) : mixed

Get the [optionally formatted] temporal [updated_at] column value.

Parameters

string $format

The date/time format string (either date()-style or strftime()-style). If format is NULL, then the raw \DateTime object will be returned.

Throws

\Propel\Runtime\Exception\PropelException
  • if unable to parse/validate the date/time value.

Returns

mixed —

Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00

setId()

setId(int $v) : \Thelia\Model\Customer

Set the value of [id] column.

Parameters

int $v

new value

Returns

\Thelia\Model\Customer

The current object (for fluent API support)

setRef()

setRef(string $v) : \Thelia\Model\Customer

Set the value of [ref] column.

Parameters

string $v

new value

Returns

\Thelia\Model\Customer

The current object (for fluent API support)

setTitleId()

setTitleId(int $v) : \Thelia\Model\Customer

Set the value of [title_id] column.

Parameters

int $v

new value

Returns

\Thelia\Model\Customer

The current object (for fluent API support)

setFirstname()

setFirstname(string $v) : \Thelia\Model\Customer

Set the value of [firstname] column.

Parameters

string $v

new value

Returns

\Thelia\Model\Customer

The current object (for fluent API support)

setLastname()

setLastname(string $v) : \Thelia\Model\Customer

Set the value of [lastname] column.

Parameters

string $v

new value

Returns

\Thelia\Model\Customer

The current object (for fluent API support)

setEmail()

setEmail(string $v) : \Thelia\Model\Customer

Set the value of [email] column.

Parameters

string $v

new value

Returns

\Thelia\Model\Customer

The current object (for fluent API support)

setAlgo()

setAlgo(string $v) : \Thelia\Model\Customer

Set the value of [algo] column.

Parameters

string $v

new value

Returns

\Thelia\Model\Customer

The current object (for fluent API support)

setReseller()

setReseller(int $v) : \Thelia\Model\Customer

Set the value of [reseller] column.

Parameters

int $v

new value

Returns

\Thelia\Model\Customer

The current object (for fluent API support)

setLang()

setLang(string $v) : \Thelia\Model\Customer

Set the value of [lang] column.

Parameters

string $v

new value

Returns

\Thelia\Model\Customer

The current object (for fluent API support)

setSponsor()

setSponsor(string $v) : \Thelia\Model\Customer

Set the value of [sponsor] column.

Parameters

string $v

new value

Returns

\Thelia\Model\Customer

The current object (for fluent API support)

setDiscount()

setDiscount(double $v) : \Thelia\Model\Customer

Set the value of [discount] column.

Parameters

double $v

new value

Returns

\Thelia\Model\Customer

The current object (for fluent API support)

setCreatedAt()

setCreatedAt(mixed $v) : \Thelia\Model\Customer

Sets the value of [created_at] column to a normalized version of the date/time value specified.

Parameters

mixed $v

string, integer (timestamp), or \DateTime value. Empty strings are treated as NULL.

Returns

\Thelia\Model\Customer

The current object (for fluent API support)

setUpdatedAt()

setUpdatedAt(mixed $v) : \Thelia\Model\Customer

Sets the value of [updated_at] column to a normalized version of the date/time value specified.

Parameters

mixed $v

string, integer (timestamp), or \DateTime value. Empty strings are treated as NULL.

Returns

\Thelia\Model\Customer

The current object (for fluent API support)

hasOnlyDefaultValues()

hasOnlyDefaultValues() : boolean

Indicates whether the columns in this object are only set to default values.

This method can be used in conjunction with isModified() to indicate whether an object is both modified and has some values set which are non-default.

Returns

boolean —

Whether the columns in this object are only been set with default values.

hydrate()

hydrate(array $row, int $startcol, boolean $rehydrate, string $indexType) : int

Hydrates (populates) the object variables with values from the database resultset.

An offset (0-based "start column") is specified so that objects can be hydrated with a subset of the columns in the resultset rows. This is needed, for example, for results of JOIN queries where the resultset row includes columns from two or more tables.

Parameters

array $row

The row returned by DataFetcher->fetch().

int $startcol

0-based offset column which indicates which restultset column to start with.

boolean $rehydrate

Whether this object is being re-hydrated from the database.

string $indexType

The index type of $row. Mostly DataFetcher->getIndexType(). One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM.

Throws

\Propel\Runtime\Exception\PropelException
  • Any caught Exception will be rewrapped as a PropelException.

Returns

int —

next starting column

ensureConsistency()

ensureConsistency()

Checks and repairs the internal consistency of the object.

This method is executed after an already-instantiated object is re-hydrated from the database. It exists to check any foreign keys to make sure that the objects related to the current object are correct based on foreign key.

You can override this method in the stub class, but you should always invoke the base method from the overridden method (i.e. parent::ensureConsistency()), in case your model changes.

Throws

\Propel\Runtime\Exception\PropelException

reload()

reload(boolean $deep, \Propel\Runtime\Connection\ConnectionInterface $con) : void

Reloads this object from datastore based on primary key and (optionally) resets all associated objects.

This will only work if the object has been saved and has a valid primary key set.

Parameters

boolean $deep

(optional) Whether to also de-associated any related objects.

\Propel\Runtime\Connection\ConnectionInterface $con

(optional) The ConnectionInterface connection to use.

Throws

\Propel\Runtime\Exception\PropelException
  • if this object is deleted, unsaved or doesn't have pk match in db

delete()

delete(\Propel\Runtime\Connection\ConnectionInterface $con) : void

Removes this object from datastore and sets delete attribute.

Parameters

\Propel\Runtime\Connection\ConnectionInterface $con

Throws

\Propel\Runtime\Exception\PropelException

save()

save(\Propel\Runtime\Connection\ConnectionInterface $con) : int

Persists this object to the database.

If the object is new, it inserts it; otherwise an update is performed. All modified related objects will also be persisted in the doSave() method. This method wraps all precipitate database operations in a single transaction.

Parameters

\Propel\Runtime\Connection\ConnectionInterface $con

Throws

\Propel\Runtime\Exception\PropelException

Returns

int —

The number of rows affected by this insert/update and any referring fk objects' save() operations.

getByName()

getByName(string $name, string $type) : mixed

Retrieves a field from the object by name passed in as a string.

Parameters

string $name

name

string $type

The type of fieldname the $name is of: one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. Defaults to TableMap::TYPE_PHPNAME.

Returns

mixed —

Value of field.

getByPosition()

getByPosition(int $pos) : mixed

Retrieves a field from the object by Position as specified in the xml schema.

Zero-based.

Parameters

int $pos

position in xml schema

Returns

mixed —

Value of field at $pos

toArray()

toArray(string $keyType, boolean $includeLazyLoadColumns, array $alreadyDumpedObjects, boolean $includeForeignObjects) : array

Exports the object as an array.

You can specify the key type of the array by passing one of the class type constants.

Parameters

string $keyType

(optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. Defaults to TableMap::TYPE_PHPNAME.

boolean $includeLazyLoadColumns

(optional) Whether to include lazy loaded columns. Defaults to TRUE.

array $alreadyDumpedObjects

List of objects to skip to avoid recursion

boolean $includeForeignObjects

(optional) Whether to include hydrated related objects. Default to FALSE.

Returns

array —

an associative array containing the field names (as keys) and field values

setByName()

setByName(string $name, mixed $value, string $type) : void

Sets a field from the object by name passed in as a string.

Parameters

string $name
mixed $value

field value

string $type

The type of fieldname the $name is of: one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. Defaults to TableMap::TYPE_PHPNAME.

setByPosition()

setByPosition(int $pos, mixed $value) : void

Sets a field from the object by Position as specified in the xml schema.

Zero-based.

Parameters

int $pos

position in xml schema

mixed $value

field value

fromArray()

fromArray(array $arr, string $keyType) : void

Populates the object using an array.

This is particularly useful when populating an object from one of the request arrays (e.g. $_POST). This method goes through the column names, checking to see whether a matching key exists in populated array. If so the setByName() method is called for that column.

You can specify the key type of the array by additionally passing one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. The default key type is the column's TableMap::TYPE_PHPNAME.

Parameters

array $arr

An array to populate the object from.

string $keyType

The type of keys the array uses.

buildCriteria()

buildCriteria() : \Propel\Runtime\ActiveQuery\Criteria

Build a Criteria object containing the values of all modified columns in this object.

Returns

\Propel\Runtime\ActiveQuery\Criteria —

The Criteria object containing all modified values.

buildPkeyCriteria()

buildPkeyCriteria() : \Propel\Runtime\ActiveQuery\Criteria

Builds a Criteria object containing the primary key for this object.

Unlike buildCriteria() this method includes the primary key values regardless of whether or not they have been modified.

Returns

\Propel\Runtime\ActiveQuery\Criteria —

The Criteria object containing value(s) for primary key(s).

getPrimaryKey()

getPrimaryKey() : int

Returns the primary key for this object (row).

Returns

int

setPrimaryKey()

setPrimaryKey(int $key) : void

Generic method to set the primary key (id column).

Parameters

int $key

Primary key.

isPrimaryKeyNull()

isPrimaryKeyNull() : boolean

Returns true if the primary key for this object is null.

Returns

boolean

copyInto()

copyInto(object $copyObj, boolean $deepCopy, boolean $makeNew)

Sets contents of passed object to values from current object.

If desired, this method can also make copies of all associated (fkey referrers) objects.

Parameters

object $copyObj

An object of \Thelia\Model\Customer (or compatible) type.

boolean $deepCopy

Whether to also copy all rows that refer (by fkey) to the current row.

boolean $makeNew

Whether to reset autoincrement PKs and make the object new.

Throws

\Propel\Runtime\Exception\PropelException

copy()

copy(boolean $deepCopy) : \Thelia\Model\Customer

Makes a copy of this object that will be inserted as a new row in table when saved.

It creates a new object filling in the simple attributes, but skipping any primary keys that are defined for the table.

If desired, this method can also make copies of all associated (fkey referrers) objects.

Parameters

boolean $deepCopy

Whether to also copy all rows that refer (by fkey) to the current row.

Throws

\Propel\Runtime\Exception\PropelException

Returns

\Thelia\Model\Customer

Clone of current object.

setCustomerTitle()

setCustomerTitle(\Thelia\Model\CustomerTitle $v) : \Thelia\Model\Customer

Declares an association between this object and a ChildCustomerTitle object.

Parameters

\Thelia\Model\CustomerTitle $v

Throws

\Propel\Runtime\Exception\PropelException

Returns

\Thelia\Model\Customer

The current object (for fluent API support)

getCustomerTitle()

getCustomerTitle(\Propel\Runtime\Connection\ConnectionInterface $con) : \Thelia\Model\CustomerTitle

Get the associated ChildCustomerTitle object

Parameters

\Propel\Runtime\Connection\ConnectionInterface $con

Optional Connection object.

Throws

\Propel\Runtime\Exception\PropelException

Returns

\Thelia\Model\CustomerTitle

The associated ChildCustomerTitle object.

initRelation()

initRelation(string $relationName) : void

Initializes a collection based on the name of a relation.

Avoids crafting an 'init[$relationName]s' method name that wouldn't work when StandardEnglishPluralizer is used.

Parameters

string $relationName

The name of the relation to initialize

clearAddresses()

clearAddresses() : void

Clears out the collAddresses collection

This does not modify the database; however, it will remove any associated objects, causing them to be refetched by subsequent calls to accessor method.

resetPartialAddresses()

resetPartialAddresses( $v)

Reset is the collAddresses collection loaded partially.

Parameters

$v

initAddresses()

initAddresses(boolean $overrideExisting) : void

Initializes the collAddresses collection.

By default this just sets the collAddresses collection to an empty array (like clearcollAddresses()); however, you may wish to override this method in your stub class to provide setting appropriate to your application -- for example, setting the initial array to the values stored in database.

Parameters

boolean $overrideExisting

If set to true, the method call initializes the collection even if it is not empty

getAddresses()

getAddresses(\Propel\Runtime\ActiveQuery\Criteria $criteria, \Propel\Runtime\Connection\ConnectionInterface $con) : \Propel\Runtime\Collection\Collection|\Thelia\Model\Address[]

Gets an array of ChildAddress objects which contain a foreign key that references this object.

If the $criteria is not null, it is used to always fetch the results from the database. Otherwise the results are fetched from the database the first time, then cached. Next time the same method is called without $criteria, the cached collection is returned. If this ChildCustomer is new, it will return an empty collection or the current collection; the criteria is ignored on a new object.

Parameters

\Propel\Runtime\ActiveQuery\Criteria $criteria

optional Criteria object to narrow the query

\Propel\Runtime\Connection\ConnectionInterface $con

optional connection object

Throws

\Propel\Runtime\Exception\PropelException

Returns

\Propel\Runtime\Collection\Collection|\Thelia\Model\Address[] —

List of ChildAddress objects

setAddresses()

setAddresses(\Propel\Runtime\Collection\Collection $addresses, \Propel\Runtime\Connection\ConnectionInterface $con) : \Thelia\Model\Customer

Sets a collection of Address objects related by a one-to-many relationship to the current object.

It will also schedule objects for deletion based on a diff between old objects (aka persisted) and new objects from the given Propel collection.

Parameters

\Propel\Runtime\Collection\Collection $addresses

A Propel collection.

\Propel\Runtime\Connection\ConnectionInterface $con

Optional connection object

Returns

\Thelia\Model\Customer

The current object (for fluent API support)

countAddresses()

countAddresses(\Propel\Runtime\ActiveQuery\Criteria $criteria, boolean $distinct, \Propel\Runtime\Connection\ConnectionInterface $con) : int

Returns the number of related Address objects.

Parameters

\Propel\Runtime\ActiveQuery\Criteria $criteria
boolean $distinct
\Propel\Runtime\Connection\ConnectionInterface $con

Throws

\Propel\Runtime\Exception\PropelException

Returns

int —

Count of related Address objects.

addAddress()

addAddress(\Thelia\Model\Address $l) : \Thelia\Model\Customer

Method called to associate a ChildAddress object to this object through the ChildAddress foreign key attribute.

Parameters

\Thelia\Model\Address $l

ChildAddress

Returns

\Thelia\Model\Customer

The current object (for fluent API support)

removeAddress()

removeAddress(\Thelia\Model\Base\Address $address) : \Thelia\Model\Customer

Parameters

\Thelia\Model\Base\Address $address

The address object to remove.

Returns

\Thelia\Model\Customer

The current object (for fluent API support)

getAddressesJoinCustomerTitle()

getAddressesJoinCustomerTitle(\Propel\Runtime\ActiveQuery\Criteria $criteria, \Propel\Runtime\Connection\ConnectionInterface $con, string $joinBehavior) : \Propel\Runtime\Collection\Collection|\Thelia\Model\Address[]

If this collection has already been initialized with an identical criteria, it returns the collection.

Otherwise if this Customer is new, it will return an empty collection; or if this Customer has previously been saved, it will retrieve related Addresses from storage.

This method is protected by default in order to keep the public api reasonable. You can provide public methods for those you actually need in Customer.

Parameters

\Propel\Runtime\ActiveQuery\Criteria $criteria

optional Criteria object to narrow the query

\Propel\Runtime\Connection\ConnectionInterface $con

optional connection object

string $joinBehavior

optional join type to use (defaults to Criteria::LEFT_JOIN)

Returns

\Propel\Runtime\Collection\Collection|\Thelia\Model\Address[] —

List of ChildAddress objects

getAddressesJoinCountry()

getAddressesJoinCountry(\Propel\Runtime\ActiveQuery\Criteria $criteria, \Propel\Runtime\Connection\ConnectionInterface $con, string $joinBehavior) : \Propel\Runtime\Collection\Collection|\Thelia\Model\Address[]

If this collection has already been initialized with an identical criteria, it returns the collection.

Otherwise if this Customer is new, it will return an empty collection; or if this Customer has previously been saved, it will retrieve related Addresses from storage.

This method is protected by default in order to keep the public api reasonable. You can provide public methods for those you actually need in Customer.

Parameters

\Propel\Runtime\ActiveQuery\Criteria $criteria

optional Criteria object to narrow the query

\Propel\Runtime\Connection\ConnectionInterface $con

optional connection object

string $joinBehavior

optional join type to use (defaults to Criteria::LEFT_JOIN)

Returns

\Propel\Runtime\Collection\Collection|\Thelia\Model\Address[] —

List of ChildAddress objects

clearOrders()

clearOrders() : void

Clears out the collOrders collection

This does not modify the database; however, it will remove any associated objects, causing them to be refetched by subsequent calls to accessor method.

resetPartialOrders()

resetPartialOrders( $v)

Reset is the collOrders collection loaded partially.

Parameters

$v

initOrders()

initOrders(boolean $overrideExisting) : void

Initializes the collOrders collection.

By default this just sets the collOrders collection to an empty array (like clearcollOrders()); however, you may wish to override this method in your stub class to provide setting appropriate to your application -- for example, setting the initial array to the values stored in database.

Parameters

boolean $overrideExisting

If set to true, the method call initializes the collection even if it is not empty

getOrders()

getOrders(\Propel\Runtime\ActiveQuery\Criteria $criteria, \Propel\Runtime\Connection\ConnectionInterface $con) : \Propel\Runtime\Collection\Collection|\Thelia\Model\Order[]

Gets an array of ChildOrder objects which contain a foreign key that references this object.

If the $criteria is not null, it is used to always fetch the results from the database. Otherwise the results are fetched from the database the first time, then cached. Next time the same method is called without $criteria, the cached collection is returned. If this ChildCustomer is new, it will return an empty collection or the current collection; the criteria is ignored on a new object.

Parameters

\Propel\Runtime\ActiveQuery\Criteria $criteria

optional Criteria object to narrow the query

\Propel\Runtime\Connection\ConnectionInterface $con

optional connection object

Throws

\Propel\Runtime\Exception\PropelException

Returns

\Propel\Runtime\Collection\Collection|\Thelia\Model\Order[] —

List of ChildOrder objects

setOrders()

setOrders(\Propel\Runtime\Collection\Collection $orders, \Propel\Runtime\Connection\ConnectionInterface $con) : \Thelia\Model\Customer

Sets a collection of Order objects related by a one-to-many relationship to the current object.

It will also schedule objects for deletion based on a diff between old objects (aka persisted) and new objects from the given Propel collection.

Parameters

\Propel\Runtime\Collection\Collection $orders

A Propel collection.

\Propel\Runtime\Connection\ConnectionInterface $con

Optional connection object

Returns

\Thelia\Model\Customer

The current object (for fluent API support)

countOrders()

countOrders(\Propel\Runtime\ActiveQuery\Criteria $criteria, boolean $distinct, \Propel\Runtime\Connection\ConnectionInterface $con) : int

Returns the number of related Order objects.

Parameters

\Propel\Runtime\ActiveQuery\Criteria $criteria
boolean $distinct
\Propel\Runtime\Connection\ConnectionInterface $con

Throws

\Propel\Runtime\Exception\PropelException

Returns

int —

Count of related Order objects.

addOrder()

addOrder(\Thelia\Model\Order $l) : \Thelia\Model\Customer

Method called to associate a ChildOrder object to this object through the ChildOrder foreign key attribute.

Parameters

\Thelia\Model\Order $l

ChildOrder

Returns

\Thelia\Model\Customer

The current object (for fluent API support)

removeOrder()

removeOrder(\Thelia\Model\Base\Order $order) : \Thelia\Model\Customer

Parameters

\Thelia\Model\Base\Order $order

The order object to remove.

Returns

\Thelia\Model\Customer

The current object (for fluent API support)

getOrdersJoinCurrency()

getOrdersJoinCurrency(\Propel\Runtime\ActiveQuery\Criteria $criteria, \Propel\Runtime\Connection\ConnectionInterface $con, string $joinBehavior) : \Propel\Runtime\Collection\Collection|\Thelia\Model\Order[]

If this collection has already been initialized with an identical criteria, it returns the collection.

Otherwise if this Customer is new, it will return an empty collection; or if this Customer has previously been saved, it will retrieve related Orders from storage.

This method is protected by default in order to keep the public api reasonable. You can provide public methods for those you actually need in Customer.

Parameters

\Propel\Runtime\ActiveQuery\Criteria $criteria

optional Criteria object to narrow the query

\Propel\Runtime\Connection\ConnectionInterface $con

optional connection object

string $joinBehavior

optional join type to use (defaults to Criteria::LEFT_JOIN)

Returns

\Propel\Runtime\Collection\Collection|\Thelia\Model\Order[] —

List of ChildOrder objects

getOrdersJoinOrderAddressRelatedByAddressInvoice()

getOrdersJoinOrderAddressRelatedByAddressInvoice(\Propel\Runtime\ActiveQuery\Criteria $criteria, \Propel\Runtime\Connection\ConnectionInterface $con, string $joinBehavior) : \Propel\Runtime\Collection\Collection|\Thelia\Model\Order[]

If this collection has already been initialized with an identical criteria, it returns the collection.

Otherwise if this Customer is new, it will return an empty collection; or if this Customer has previously been saved, it will retrieve related Orders from storage.

This method is protected by default in order to keep the public api reasonable. You can provide public methods for those you actually need in Customer.

Parameters

\Propel\Runtime\ActiveQuery\Criteria $criteria

optional Criteria object to narrow the query

\Propel\Runtime\Connection\ConnectionInterface $con

optional connection object

string $joinBehavior

optional join type to use (defaults to Criteria::LEFT_JOIN)

Returns

\Propel\Runtime\Collection\Collection|\Thelia\Model\Order[] —

List of ChildOrder objects

getOrdersJoinOrderAddressRelatedByAddressDelivery()

getOrdersJoinOrderAddressRelatedByAddressDelivery(\Propel\Runtime\ActiveQuery\Criteria $criteria, \Propel\Runtime\Connection\ConnectionInterface $con, string $joinBehavior) : \Propel\Runtime\Collection\Collection|\Thelia\Model\Order[]

If this collection has already been initialized with an identical criteria, it returns the collection.

Otherwise if this Customer is new, it will return an empty collection; or if this Customer has previously been saved, it will retrieve related Orders from storage.

This method is protected by default in order to keep the public api reasonable. You can provide public methods for those you actually need in Customer.

Parameters

\Propel\Runtime\ActiveQuery\Criteria $criteria

optional Criteria object to narrow the query

\Propel\Runtime\Connection\ConnectionInterface $con

optional connection object

string $joinBehavior

optional join type to use (defaults to Criteria::LEFT_JOIN)

Returns

\Propel\Runtime\Collection\Collection|\Thelia\Model\Order[] —

List of ChildOrder objects

getOrdersJoinOrderStatus()

getOrdersJoinOrderStatus(\Propel\Runtime\ActiveQuery\Criteria $criteria, \Propel\Runtime\Connection\ConnectionInterface $con, string $joinBehavior) : \Propel\Runtime\Collection\Collection|\Thelia\Model\Order[]

If this collection has already been initialized with an identical criteria, it returns the collection.

Otherwise if this Customer is new, it will return an empty collection; or if this Customer has previously been saved, it will retrieve related Orders from storage.

This method is protected by default in order to keep the public api reasonable. You can provide public methods for those you actually need in Customer.

Parameters

\Propel\Runtime\ActiveQuery\Criteria $criteria

optional Criteria object to narrow the query

\Propel\Runtime\Connection\ConnectionInterface $con

optional connection object

string $joinBehavior

optional join type to use (defaults to Criteria::LEFT_JOIN)

Returns

\Propel\Runtime\Collection\Collection|\Thelia\Model\Order[] —

List of ChildOrder objects

clearCarts()

clearCarts() : void

Clears out the collCarts collection

This does not modify the database; however, it will remove any associated objects, causing them to be refetched by subsequent calls to accessor method.

resetPartialCarts()

resetPartialCarts( $v)

Reset is the collCarts collection loaded partially.

Parameters

$v

initCarts()

initCarts(boolean $overrideExisting) : void

Initializes the collCarts collection.

By default this just sets the collCarts collection to an empty array (like clearcollCarts()); however, you may wish to override this method in your stub class to provide setting appropriate to your application -- for example, setting the initial array to the values stored in database.

Parameters

boolean $overrideExisting

If set to true, the method call initializes the collection even if it is not empty

getCarts()

getCarts(\Propel\Runtime\ActiveQuery\Criteria $criteria, \Propel\Runtime\Connection\ConnectionInterface $con) : \Propel\Runtime\Collection\Collection|\Thelia\Model\Cart[]

Gets an array of ChildCart objects which contain a foreign key that references this object.

If the $criteria is not null, it is used to always fetch the results from the database. Otherwise the results are fetched from the database the first time, then cached. Next time the same method is called without $criteria, the cached collection is returned. If this ChildCustomer is new, it will return an empty collection or the current collection; the criteria is ignored on a new object.

Parameters

\Propel\Runtime\ActiveQuery\Criteria $criteria

optional Criteria object to narrow the query

\Propel\Runtime\Connection\ConnectionInterface $con

optional connection object

Throws

\Propel\Runtime\Exception\PropelException

Returns

\Propel\Runtime\Collection\Collection|\Thelia\Model\Cart[] —

List of ChildCart objects

setCarts()

setCarts(\Propel\Runtime\Collection\Collection $carts, \Propel\Runtime\Connection\ConnectionInterface $con) : \Thelia\Model\Customer

Sets a collection of Cart objects related by a one-to-many relationship to the current object.

It will also schedule objects for deletion based on a diff between old objects (aka persisted) and new objects from the given Propel collection.

Parameters

\Propel\Runtime\Collection\Collection $carts

A Propel collection.

\Propel\Runtime\Connection\ConnectionInterface $con

Optional connection object

Returns

\Thelia\Model\Customer

The current object (for fluent API support)

countCarts()

countCarts(\Propel\Runtime\ActiveQuery\Criteria $criteria, boolean $distinct, \Propel\Runtime\Connection\ConnectionInterface $con) : int

Returns the number of related Cart objects.

Parameters

\Propel\Runtime\ActiveQuery\Criteria $criteria
boolean $distinct
\Propel\Runtime\Connection\ConnectionInterface $con

Throws

\Propel\Runtime\Exception\PropelException

Returns

int —

Count of related Cart objects.

addCart()

addCart(\Thelia\Model\Cart $l) : \Thelia\Model\Customer

Method called to associate a ChildCart object to this object through the ChildCart foreign key attribute.

Parameters

\Thelia\Model\Cart $l

ChildCart

Returns

\Thelia\Model\Customer

The current object (for fluent API support)

removeCart()

removeCart(\Thelia\Model\Base\Cart $cart) : \Thelia\Model\Customer

Parameters

\Thelia\Model\Base\Cart $cart

The cart object to remove.

Returns

\Thelia\Model\Customer

The current object (for fluent API support)

getCartsJoinAddressRelatedByAddressDeliveryId()

getCartsJoinAddressRelatedByAddressDeliveryId(\Propel\Runtime\ActiveQuery\Criteria $criteria, \Propel\Runtime\Connection\ConnectionInterface $con, string $joinBehavior) : \Propel\Runtime\Collection\Collection|\Thelia\Model\Cart[]

If this collection has already been initialized with an identical criteria, it returns the collection.

Otherwise if this Customer is new, it will return an empty collection; or if this Customer has previously been saved, it will retrieve related Carts from storage.

This method is protected by default in order to keep the public api reasonable. You can provide public methods for those you actually need in Customer.

Parameters

\Propel\Runtime\ActiveQuery\Criteria $criteria

optional Criteria object to narrow the query

\Propel\Runtime\Connection\ConnectionInterface $con

optional connection object

string $joinBehavior

optional join type to use (defaults to Criteria::LEFT_JOIN)

Returns

\Propel\Runtime\Collection\Collection|\Thelia\Model\Cart[] —

List of ChildCart objects

getCartsJoinAddressRelatedByAddressInvoiceId()

getCartsJoinAddressRelatedByAddressInvoiceId(\Propel\Runtime\ActiveQuery\Criteria $criteria, \Propel\Runtime\Connection\ConnectionInterface $con, string $joinBehavior) : \Propel\Runtime\Collection\Collection|\Thelia\Model\Cart[]

If this collection has already been initialized with an identical criteria, it returns the collection.

Otherwise if this Customer is new, it will return an empty collection; or if this Customer has previously been saved, it will retrieve related Carts from storage.

This method is protected by default in order to keep the public api reasonable. You can provide public methods for those you actually need in Customer.

Parameters

\Propel\Runtime\ActiveQuery\Criteria $criteria

optional Criteria object to narrow the query

\Propel\Runtime\Connection\ConnectionInterface $con

optional connection object

string $joinBehavior

optional join type to use (defaults to Criteria::LEFT_JOIN)

Returns

\Propel\Runtime\Collection\Collection|\Thelia\Model\Cart[] —

List of ChildCart objects

getCartsJoinCurrency()

getCartsJoinCurrency(\Propel\Runtime\ActiveQuery\Criteria $criteria, \Propel\Runtime\Connection\ConnectionInterface $con, string $joinBehavior) : \Propel\Runtime\Collection\Collection|\Thelia\Model\Cart[]

If this collection has already been initialized with an identical criteria, it returns the collection.

Otherwise if this Customer is new, it will return an empty collection; or if this Customer has previously been saved, it will retrieve related Carts from storage.

This method is protected by default in order to keep the public api reasonable. You can provide public methods for those you actually need in Customer.

Parameters

\Propel\Runtime\ActiveQuery\Criteria $criteria

optional Criteria object to narrow the query

\Propel\Runtime\Connection\ConnectionInterface $con

optional connection object

string $joinBehavior

optional join type to use (defaults to Criteria::LEFT_JOIN)

Returns

\Propel\Runtime\Collection\Collection|\Thelia\Model\Cart[] —

List of ChildCart objects

clear()

clear()

Clears the current object and sets all attributes to their default values

clearAllReferences()

clearAllReferences(boolean $deep)

Resets all references to other model objects or collections of model objects.

This method is a user-space workaround for PHP's inability to garbage collect objects with circular references (even in PHP 5.3). This is currently necessary when using Propel in certain daemon or large-volume/high-memory operations.

Parameters

boolean $deep

Whether to also clear the references on all referrer objects.

__toString()

__toString() : string

Return the string representation of this object

Returns

string

keepUpdateDateUnchanged()

keepUpdateDateUnchanged() : \Thelia\Model\Customer

Mark the current object so that the update date doesn't get updated during next save

Returns

\Thelia\Model\Customer

The current object (for fluent API support)

preSave()

preSave(\Propel\Runtime\Connection\ConnectionInterface $con) : boolean

Code to be run before persisting the object

Parameters

\Propel\Runtime\Connection\ConnectionInterface $con

Returns

boolean

postSave()

postSave(\Propel\Runtime\Connection\ConnectionInterface $con)

Code to be run after persisting the object

Parameters

\Propel\Runtime\Connection\ConnectionInterface $con

preDelete()

preDelete(\Propel\Runtime\Connection\ConnectionInterface $con) : boolean

Code to be run before deleting the object in database

Parameters

\Propel\Runtime\Connection\ConnectionInterface $con

Returns

boolean

postDelete()

postDelete(\Propel\Runtime\Connection\ConnectionInterface $con)

Code to be run after deleting the object in database

Parameters

\Propel\Runtime\Connection\ConnectionInterface $con

__call()

__call(string $name, mixed $params) : array|string

Derived method to catches calls to undefined methods.

Provides magic import/export method support (fromXML()/toXML(), fromYAML()/toYAML(), etc.). Allows to define default __call() behavior if you overwrite __call()

Parameters

string $name
mixed $params

Returns

array|string

generateRef()

generateRef()

log()

log(string $msg, int $priority) : boolean

Logs a message using Propel::log().

Parameters

string $msg
int $priority

One of the Propel::LOG_* logging levels

Returns

boolean

doSave()

doSave(\Propel\Runtime\Connection\ConnectionInterface $con) : int

Performs the work of inserting or updating the row in the database.

If the object is new, it inserts it; otherwise an update is performed. All related objects are also updated in this method.

Parameters

\Propel\Runtime\Connection\ConnectionInterface $con

Throws

\Propel\Runtime\Exception\PropelException

Returns

int —

The number of rows affected by this insert/update and any referring fk objects' save() operations.

doInsert()

doInsert(\Propel\Runtime\Connection\ConnectionInterface $con)

Insert the row in the database.

Parameters

\Propel\Runtime\Connection\ConnectionInterface $con

Throws

\Propel\Runtime\Exception\PropelException

doUpdate()

doUpdate(\Propel\Runtime\Connection\ConnectionInterface $con) : Integer

Update the row in the database.

Parameters

\Propel\Runtime\Connection\ConnectionInterface $con

Returns

Integer —

Number of updated rows

doAddAddress()

doAddAddress(\Thelia\Model\Base\Address $address)

Parameters

\Thelia\Model\Base\Address $address

The address object to add.

doAddOrder()

doAddOrder(\Thelia\Model\Base\Order $order)

Parameters

\Thelia\Model\Base\Order $order

The order object to add.

doAddCart()

doAddCart(\Thelia\Model\Base\Cart $cart)

Parameters

\Thelia\Model\Base\Cart $cart

The cart object to add.