PHP 클래스 Neos\Flow\I18n\EelHelper\TranslationParameterToken

It also translates labels according to the configuration it stores
상속: implements Neos\Eel\ProtectedContextAwareInterface
파일 보기 프로젝트 열기: neos/flow-development-collection

보호된 프로퍼티들

프로퍼티 타입 설명
$parameters array Key/Value store to keep the collected parameters
$translator Neos\Flow\I18n\Translator

공개 메소드들

메소드 설명
__construct ( string $id = null, string $value = null )
__toString ( ) Runs translate to avoid the need of calling translate as a finishing method
allowsCallOfMethod ( string $methodName ) : boolean All methods are considered safe
arguments ( array $arguments ) : TranslationParameterToken Set the arguments.
id ( string $id ) : TranslationParameterToken Set the id.
injectTranslator ( Translator $translator ) Inject the translator into the token.
locale ( string $locale ) : TranslationParameterToken Set the locale.
package ( string $package ) : TranslationParameterToken Set the package.
quantity ( mixed $quantity ) : TranslationParameterToken Set the quantity.
source ( string $source ) : TranslationParameterToken Set the source.
translate ( array $overrides = [] ) : string Translate according to currently collected parameters
value ( string $value ) : TranslationParameterToken Set the original translation value (the untranslated source string).

메소드 상세

__construct() 공개 메소드

public __construct ( string $id = null, string $value = null )
$id string
$value string

__toString() 공개 메소드

Runs translate to avoid the need of calling translate as a finishing method
public __toString ( )

allowsCallOfMethod() 공개 메소드

All methods are considered safe
public allowsCallOfMethod ( string $methodName ) : boolean
$methodName string
리턴 boolean

arguments() 공개 메소드

Set the arguments.
public arguments ( array $arguments ) : TranslationParameterToken
$arguments array Numerically indexed array of values to be inserted into placeholders
리턴 TranslationParameterToken

id() 공개 메소드

Set the id.
public id ( string $id ) : TranslationParameterToken
$id string Id to use for finding translation (trans-unit id in XLIFF)
리턴 TranslationParameterToken

injectTranslator() 공개 메소드

Used for testing.
public injectTranslator ( Translator $translator )
$translator Neos\Flow\I18n\Translator

locale() 공개 메소드

The locale Identifier will be converted into a Locale
public locale ( string $locale ) : TranslationParameterToken
$locale string An identifier of locale to use (NULL for use the default locale)
리턴 TranslationParameterToken

package() 공개 메소드

Set the package.
public package ( string $package ) : TranslationParameterToken
$package string Target package key. If not set, the current package key will be used
리턴 TranslationParameterToken

quantity() 공개 메소드

Set the quantity.
public quantity ( mixed $quantity ) : TranslationParameterToken
$quantity mixed A number to find plural form for (float or int), NULL to not use plural forms
리턴 TranslationParameterToken

source() 공개 메소드

Set the source.
public source ( string $source ) : TranslationParameterToken
$source string Name of file with translations
리턴 TranslationParameterToken

translate() 공개 메소드

Translate according to currently collected parameters
public translate ( array $overrides = [] ) : string
$overrides array An associative array to override the collected parameters
리턴 string

value() 공개 메소드

Set the original translation value (the untranslated source string).
public value ( string $value ) : TranslationParameterToken
$value string
리턴 TranslationParameterToken

프로퍼티 상세

$parameters 보호되어 있는 프로퍼티

Key/Value store to keep the collected parameters
protected array $parameters
리턴 array

$translator 보호되어 있는 프로퍼티

protected Translator,Neos\Flow\I18n $translator
리턴 Neos\Flow\I18n\Translator