105 lines
2.3 KiB
YAML
105 lines
2.3 KiB
YAML
|
name: PotentiallyTranslatedString
|
||
|
class_comment: null
|
||
|
dependencies:
|
||
|
- name: Stringable
|
||
|
type: class
|
||
|
source: Stringable
|
||
|
properties:
|
||
|
- name: string
|
||
|
visibility: protected
|
||
|
comment: '# * The string that may be translated.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @var string'
|
||
|
- name: translation
|
||
|
visibility: protected
|
||
|
comment: '# * The translated string.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @var string|null'
|
||
|
- name: translator
|
||
|
visibility: protected
|
||
|
comment: '# * The validator that may perform the translation.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @var \Illuminate\Contracts\Translation\Translator'
|
||
|
methods:
|
||
|
- name: __construct
|
||
|
visibility: public
|
||
|
parameters:
|
||
|
- name: string
|
||
|
- name: translator
|
||
|
comment: "# * The string that may be translated.\n# *\n# * @var string\n# */\n#\
|
||
|
\ protected $string;\n# \n# /**\n# * The translated string.\n# *\n# * @var string|null\n\
|
||
|
# */\n# protected $translation;\n# \n# /**\n# * The validator that may perform\
|
||
|
\ the translation.\n# *\n# * @var \\Illuminate\\Contracts\\Translation\\Translator\n\
|
||
|
# */\n# protected $translator;\n# \n# /**\n# * Create a new potentially translated\
|
||
|
\ string.\n# *\n# * @param string $string\n# * @param \\Illuminate\\Contracts\\\
|
||
|
Translation\\Translator $translator"
|
||
|
- name: translate
|
||
|
visibility: public
|
||
|
parameters:
|
||
|
- name: replace
|
||
|
default: '[]'
|
||
|
- name: locale
|
||
|
default: 'null'
|
||
|
comment: '# * Translate the string.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @param array $replace
|
||
|
|
||
|
# * @param string|null $locale
|
||
|
|
||
|
# * @return $this'
|
||
|
- name: translateChoice
|
||
|
visibility: public
|
||
|
parameters:
|
||
|
- name: number
|
||
|
- name: replace
|
||
|
default: '[]'
|
||
|
- name: locale
|
||
|
default: 'null'
|
||
|
comment: '# * Translates the string based on a count.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @param \Countable|int|float|array $number
|
||
|
|
||
|
# * @param array $replace
|
||
|
|
||
|
# * @param string|null $locale
|
||
|
|
||
|
# * @return $this'
|
||
|
- name: original
|
||
|
visibility: public
|
||
|
parameters: []
|
||
|
comment: '# * Get the original string.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @return string'
|
||
|
- name: __toString
|
||
|
visibility: public
|
||
|
parameters: []
|
||
|
comment: '# * Get the potentially translated string.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @return string'
|
||
|
- name: toString
|
||
|
visibility: public
|
||
|
parameters: []
|
||
|
comment: '# * Get the potentially translated string.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @return string'
|
||
|
traits:
|
||
|
- Stringable
|
||
|
interfaces:
|
||
|
- Stringable
|