GeocodingCache
extends GeocodingCache
in package
Cache of external geocoding.
The mapping serves the repository layer (getEntityClass()) and as the source of column
limits; reads and writes go through raw SQL in GeocodingCacheRepository (atomic upsert by
query_hash, hits + 1).
Attributes
- #[Entity]
- #[Table]
- $name: 'cms_system_geocoding_cache'
- #[TableAlias]
- 'geocodingCache'
Table of Contents
Properties
- $country : string
- $createdAt : DateTimeImmutable|null
- $formattedAddress : string|null
- $hits : int
- $id : int|null
- $lastUsedAt : DateTimeImmutable|null
- $latitude : string|null
- $longitude : string|null
- $query : string
- $queryHash : string
- $status : string
Methods
- __construct() : mixed
- callInitMethods() : void
- Calls `init{TraitName}()` for every used trait that defines such a method.
- getAllTraits() : array<string, string>
- Returns all traits the class uses, including those used by parent classes and nested traits.
- getCountry() : string
- getCreatedAt() : DateTimeImmutable|null
- getFormattedAddress() : string|null
- getHits() : int
- getId() : int|null
- getLastUsedAt() : DateTimeImmutable|null
- getLatitude() : string|null
- getLongitude() : string|null
- getQuery() : string
- getQueryHash() : string
- getStatus() : string
- isPersisted() : bool
- setCountry() : $this
- setCreatedAt() : $this
- setFormattedAddress() : $this
- setHits() : $this
- setId() : $this
- setLastUsedAt() : $this
- setLatitude() : $this
- setLongitude() : $this
- setQuery() : $this
- setQueryHash() : $this
- setStatus() : $this
- getTraitsRecursive() : array<string, string>
- Walks the trait list recursively and collects nested traits too.
Properties
$country
protected
string
$country
= ''
Attributes
- #[Column]
- $name: 'country'
- $type: 'string'
- $length: 2
- $options: ['fixed' => true]
$createdAt
protected
DateTimeImmutable|null
$createdAt
= null
Attributes
- #[Column]
- $name: 'created_at'
- $type: 'datetime_immutable'
$formattedAddress
protected
string|null
$formattedAddress
= null
Attributes
- #[Column]
- $name: 'formatted_address'
- $type: 'string'
- $length: 500
- $nullable: true
$hits
protected
int
$hits
= 0
Attributes
- #[Column]
- $name: 'hits'
- $type: 'integer'
- $options: ['unsigned' => true, 'default' => 0]
$id
protected
int|null
$id
= null
Attributes
- #[Column]
- $name: 'geocoding_cache_id'
- $type: 'integer'
- $options: ['unsigned' => true]
- #[GeneratedValue]
- #[Id]
$lastUsedAt
protected
DateTimeImmutable|null
$lastUsedAt
= null
Attributes
- #[Column]
- $name: 'last_used_at'
- $type: 'datetime_immutable'
$latitude
protected
string|null
$latitude
= null
Attributes
- #[Column]
- $name: 'latitude'
- $type: 'decimal'
- $precision: 10
- $scale: 7
- $nullable: true
$longitude
protected
string|null
$longitude
= null
Attributes
- #[Column]
- $name: 'longitude'
- $type: 'decimal'
- $precision: 10
- $scale: 7
- $nullable: true
$query
protected
string
$query
= ''
Attributes
- #[Column]
- $name: 'query'
- $type: 'string'
- $length: 500
$queryHash
protected
string
$queryHash
= ''
Attributes
- #[Column]
- $name: 'query_hash'
- $type: 'string'
- $length: 40
- $unique: true
- $options: ['fixed' => true]
$status
protected
string
$status
= ''
Attributes
- #[Column]
- $name: 'status'
- $type: 'string'
- $length: 20
Methods
__construct()
public
__construct([int|null $id = null ][, string $country = '' ][, string $queryHash = '' ][, string $query = '' ][, string|null $formattedAddress = null ][, string|null $latitude = null ][, string|null $longitude = null ][, string $status = '' ][, int $hits = 0 ][, DateTimeImmutable|null $createdAt = null ][, DateTimeImmutable|null $lastUsedAt = null ]) : mixed
Parameters
- $id : int|null = null
- $country : string = ''
- $queryHash : string = ''
- $query : string = ''
- $formattedAddress : string|null = null
- $latitude : string|null = null
- $longitude : string|null = null
- $status : string = ''
- $hits : int = 0
- $createdAt : DateTimeImmutable|null = null
- $lastUsedAt : DateTimeImmutable|null = null
callInitMethods()
Calls `init{TraitName}()` for every used trait that defines such a method.
public
callInitMethods() : void
getAllTraits()
Returns all traits the class uses, including those used by parent classes and nested traits.
public
getAllTraits() : array<string, string>
Return values
array<string, string>getCountry()
public
getCountry() : string
Return values
stringgetCreatedAt()
public
getCreatedAt() : DateTimeImmutable|null
Return values
DateTimeImmutable|nullgetFormattedAddress()
public
getFormattedAddress() : string|null
Return values
string|nullgetHits()
public
getHits() : int
Return values
intgetId()
public
getId() : int|null
Return values
int|nullgetLastUsedAt()
public
getLastUsedAt() : DateTimeImmutable|null
Return values
DateTimeImmutable|nullgetLatitude()
public
getLatitude() : string|null
Return values
string|nullgetLongitude()
public
getLongitude() : string|null
Return values
string|nullgetQuery()
public
getQuery() : string
Return values
stringgetQueryHash()
public
getQueryHash() : string
Return values
stringgetStatus()
public
getStatus() : string
Return values
stringisPersisted()
public
isPersisted() : bool
Return values
boolsetCountry()
public
setCountry(string $country) : $this
Parameters
- $country : string
Return values
$thissetCreatedAt()
public
setCreatedAt(DateTimeImmutable|null $createdAt) : $this
Parameters
- $createdAt : DateTimeImmutable|null
Return values
$thissetFormattedAddress()
public
setFormattedAddress(string|null $formattedAddress) : $this
Parameters
- $formattedAddress : string|null
Return values
$thissetHits()
public
setHits(int $hits) : $this
Parameters
- $hits : int
Return values
$thissetId()
public
setId(int|null $id) : $this
Parameters
- $id : int|null
Return values
$thissetLastUsedAt()
public
setLastUsedAt(DateTimeImmutable|null $lastUsedAt) : $this
Parameters
- $lastUsedAt : DateTimeImmutable|null
Return values
$thissetLatitude()
public
setLatitude(string|null $latitude) : $this
Parameters
- $latitude : string|null
Return values
$thissetLongitude()
public
setLongitude(string|null $longitude) : $this
Parameters
- $longitude : string|null
Return values
$thissetQuery()
public
setQuery(string $query) : $this
Parameters
- $query : string
Return values
$thissetQueryHash()
public
setQueryHash(string $queryHash) : $this
Parameters
- $queryHash : string
Return values
$thissetStatus()
public
setStatus(string $status) : $this
Parameters
- $status : string
Return values
$thisgetTraitsRecursive()
Walks the trait list recursively and collects nested traits too.
private
static getTraitsRecursive(array<string, string> $traits) : array<string, string>
Parameters
- $traits : array<string, string>