PHP Class MenaraSolutions\Geographer\Services\Poliglottas\Base

Inheritance: implements MenaraSolutions\Geographer\Contracts\PoliglottaInterface
Afficher le fichier Open project: menarasolutions/geographer

Protected Properties

Свойство Type Description
$agency MenaraSolutions\Geographer\Contracts\TranslationAgencyInterface
$cache array
$code string
$defaultPrepositions array

Méthodes publiques

Méthode Description
__construct ( MenaraSolutions\Geographer\Contracts\TranslationAgencyInterface $agency ) Base constructor.
translate ( MenaraSolutions\Geographer\Contracts\IdentifiableInterface $subject, string $form = 'default', boolean $preposition = true ) : string

Méthodes protégées

Méthode Description
extract ( array $meta, boolean $long, $form, boolean $fallback = false ) : mixed
fromDictionary ( MenaraSolutions\Geographer\Contracts\IdentifiableInterface $subject ) : array
getPreposition ( $form, string $result = null ) : string
inflictDefault ( array $meta, $long ) : string
inflictFrom ( string $template ) : string
inflictIn ( string $template ) : string

Method Details

__construct() public méthode

Base constructor.
public __construct ( MenaraSolutions\Geographer\Contracts\TranslationAgencyInterface $agency )
$agency MenaraSolutions\Geographer\Contracts\TranslationAgencyInterface

extract() protected méthode

protected extract ( array $meta, boolean $long, $form, boolean $fallback = false ) : mixed
$meta array
$long boolean
$form
$fallback boolean
Résultat mixed

fromDictionary() protected méthode

protected fromDictionary ( MenaraSolutions\Geographer\Contracts\IdentifiableInterface $subject ) : array
$subject MenaraSolutions\Geographer\Contracts\IdentifiableInterface
Résultat array

getPreposition() protected méthode

protected getPreposition ( $form, string $result = null ) : string
$form
$result string
Résultat string

inflictDefault() protected méthode

protected inflictDefault ( array $meta, $long ) : string
$meta array
$long
Résultat string

inflictFrom() protected méthode

protected inflictFrom ( string $template ) : string
$template string
Résultat string

inflictIn() protected méthode

protected inflictIn ( string $template ) : string
$template string
Résultat string

translate() public méthode

public translate ( MenaraSolutions\Geographer\Contracts\IdentifiableInterface $subject, string $form = 'default', boolean $preposition = true ) : string
$subject MenaraSolutions\Geographer\Contracts\IdentifiableInterface
$form string
$preposition boolean
Résultat string

Property Details

$agency protected_oe property

protected TranslationAgencyInterface,MenaraSolutions\Geographer\Contracts $agency
Résultat MenaraSolutions\Geographer\Contracts\TranslationAgencyInterface

$cache protected_oe property

protected array $cache
Résultat array

$code protected_oe property

protected string $code
Résultat string

$defaultPrepositions protected_oe property

protected array $defaultPrepositions
Résultat array