PHP Class sfDoctrineRecord

Author: Olivier Verdier ([email protected])
Inheritance: extends Doctrine_Record
Show file Open project: lexpress/symfony1 Class Usage Examples

Protected Properties

Property Type Description
$_defaultCulture

Public Methods

Method Description
__call ( string $method, array $arguments ) : mixed Provides getter and setter methods.
__toString ( ) : string Returns a string representation of the record.
construct ( ) Initializes internationalization.
getDateTimeObject ( string $dateFieldName ) : DateTime | null Get the Doctrine date value as a PHP DateTime object, null if the value is not set
getDefaultCulture ( ) : string Return the default culture
getPrimaryKey ( ) : mixed Returns the current record's primary key.
isNew ( ) : boolean Function require by symfony >= 1.2 admin generators.
listenToChangeCultureEvent ( sfEvent $event ) Listens to the user.change_culture event.
setDateTimeObject ( string $dateFieldName, DateTime $dateTimeObject = null ) : sfDoctrineRecord Set the Doctrine date value by passing a valid PHP DateTime object instance
setDefaultCulture ( string $culture ) Sets the default culture

Method Details

__call() public method

Provides getter and setter methods.
public __call ( string $method, array $arguments ) : mixed
$method string The method name
$arguments array The method arguments
return mixed The returned value of the called method

__toString() public method

Returns a string representation of the record.
public __toString ( ) : string
return string A string representation of the record

construct() public method

Initializes internationalization.
See also: Doctrine_Record
public construct ( )

getDateTimeObject() public method

Get the Doctrine date value as a PHP DateTime object, null if the value is not set
public getDateTimeObject ( string $dateFieldName ) : DateTime | null
$dateFieldName string The field name to get the DateTime object for
return DateTime | null $dateTime The instance of PHPs DateTime

getDefaultCulture() public static method

Return the default culture
public static getDefaultCulture ( ) : string
return string the default culture

getPrimaryKey() public method

This a proxy method to {@link Doctrine_Record::identifier()} for compatibility with a Propel-style API.
public getPrimaryKey ( ) : mixed
return mixed The value of the current model's last identifier column

isNew() public method

Function require by symfony >= 1.2 admin generators.
public isNew ( ) : boolean
return boolean

listenToChangeCultureEvent() public static method

Listens to the user.change_culture event.
public static listenToChangeCultureEvent ( sfEvent $event )
$event sfEvent

setDateTimeObject() public method

Set the Doctrine date value by passing a valid PHP DateTime object instance
public setDateTimeObject ( string $dateFieldName, DateTime $dateTimeObject = null ) : sfDoctrineRecord
$dateFieldName string The field name to set the date for
$dateTimeObject DateTime The DateTime instance to use to set the value
return sfDoctrineRecord

setDefaultCulture() public static method

Sets the default culture
public static setDefaultCulture ( string $culture )
$culture string

Property Details

$_defaultCulture protected static property

protected static $_defaultCulture