Documentation

Escaper
in package

Table of Contents

Constants

DQL_ALIAS_PREFIX  = 'ea_'

Methods

escapeDqlAlias()  : string
Some words (e.g. "order") are reserved keywords in the DQL (Doctrine Query Language).
isDqlReservedKeyword()  : bool
Determines if a string is a reserved keyword in DQL (Doctrine Query Language).

Constants

DQL_ALIAS_PREFIX

public mixed DQL_ALIAS_PREFIX = 'ea_'

Methods

escapeDqlAlias()

Some words (e.g. "order") are reserved keywords in the DQL (Doctrine Query Language).

public static escapeDqlAlias(string $entityName) : string

That's why when using entity names as DQL aliases, we need to escape those reserved keywords.

This method ensures that the given entity name can be used as a DQL alias. Most of them are left unchanged (e.g. "category" or "invoice") but others will include a prefix to escape them (e.g. "order" becomes "ea_order").

Parameters
$entityName : string
Return values
string

isDqlReservedKeyword()

Determines if a string is a reserved keyword in DQL (Doctrine Query Language).

private static isDqlReservedKeyword(string $string) : bool
Parameters
$string : string
Return values
bool

        
On this page

Search results