|
1
|
|
|
<?php |
|
2
|
|
|
/** |
|
3
|
|
|
* Facades for Yii 2 |
|
4
|
|
|
* |
|
5
|
|
|
* Generated on Yii 2.0.12 |
|
6
|
|
|
* |
|
7
|
|
|
* @see https://github.com/sergeymakinen/yii2-facades |
|
8
|
|
|
* @copyright Copyright (c) 2016-2017 Sergey Makinen (https://makinen.ru) |
|
9
|
|
|
* @license https://github.com/sergeymakinen/yii2-facades/blob/master/LICENSE The MIT License |
|
10
|
|
|
*/ |
|
11
|
|
|
|
|
12
|
|
|
namespace sergeymakinen\facades; |
|
13
|
|
|
|
|
14
|
|
|
/** @noinspection PhpUnnecessaryFullyQualifiedNameInspection */ |
|
15
|
|
|
/** |
|
16
|
|
|
* Yii::$app->get('i18n') facade. |
|
17
|
|
|
* |
|
18
|
|
|
* Methods |
|
19
|
|
|
* |
|
20
|
|
|
* @method static \yii\base\Behavior attachBehavior(string $name, string|array|\yii\base\Behavior $behavior) Attaches a behavior to this component. |
|
21
|
|
|
* @see \yii\base\Component::attachBehavior |
|
22
|
|
|
* |
|
23
|
|
|
* @method static void attachBehaviors(array $behaviors) Attaches a list of behaviors to the component. |
|
24
|
|
|
* @see \yii\base\Component::attachBehaviors |
|
25
|
|
|
* |
|
26
|
|
|
* @method static array behaviors() Returns a list of behaviors that this component should behave as. |
|
27
|
|
|
* @see \yii\base\Component::behaviors |
|
28
|
|
|
* |
|
29
|
|
|
* @method static null|\yii\base\Behavior detachBehavior(string $name) Detaches a behavior from the component. |
|
30
|
|
|
* @see \yii\base\Component::detachBehavior |
|
31
|
|
|
* |
|
32
|
|
|
* @method static void detachBehaviors() Detaches all behaviors from the component. |
|
33
|
|
|
* @see \yii\base\Component::detachBehaviors |
|
34
|
|
|
* |
|
35
|
|
|
* @method static void ensureBehaviors() Makes sure that the behaviors declared in [[behaviors()]] are attached to this component. |
|
36
|
|
|
* @see \yii\base\Component::ensureBehaviors |
|
37
|
|
|
* |
|
38
|
|
|
* @method static string format(string $message, array $params, string $language) Formats a message using [[MessageFormatter]]. |
|
39
|
|
|
* @see \yii\i18n\I18N::format |
|
40
|
|
|
* |
|
41
|
|
|
* @method static null|\yii\base\Behavior getBehavior(string $name) Returns the named behavior object. |
|
42
|
|
|
* @see \yii\base\Component::getBehavior |
|
43
|
|
|
* |
|
44
|
|
|
* @method static \yii\base\Behavior[] getBehaviors() Returns all behaviors attached to this component. |
|
45
|
|
|
* @see \yii\base\Component::getBehaviors |
|
46
|
|
|
* |
|
47
|
|
|
* @method static \yii\i18n\MessageFormatter getMessageFormatter() Returns the message formatter instance. |
|
48
|
|
|
* @see \yii\i18n\I18N::getMessageFormatter |
|
49
|
|
|
* |
|
50
|
|
|
* @method static \yii\i18n\MessageSource getMessageSource(string $category) Returns the message source for the given category. |
|
51
|
|
|
* @see \yii\i18n\I18N::getMessageSource |
|
52
|
|
|
* |
|
53
|
|
|
* @method static bool hasEventHandlers(string $name) Returns a value indicating whether there is any handler attached to the named event. |
|
54
|
|
|
* @see \yii\base\Component::hasEventHandlers |
|
55
|
|
|
* |
|
56
|
|
|
* @method static bool off(string $name, callable $handler = null) Detaches an existing event handler from this component. |
|
57
|
|
|
* @see \yii\base\Component::off |
|
58
|
|
|
* |
|
59
|
|
|
* @method static void on(string $name, callable $handler, mixed $data = null, bool $append = true) Attaches an event handler to an event. |
|
60
|
|
|
* @see \yii\base\Component::on |
|
61
|
|
|
* |
|
62
|
|
|
* @method static void setMessageFormatter(string|array|\yii\i18n\MessageFormatter $value) |
|
63
|
|
|
* @see \yii\i18n\I18N::setMessageFormatter |
|
64
|
|
|
* |
|
65
|
|
|
* @method static string translate(string $category, string $message, array $params, string $language) Translates a message to the specified language. |
|
66
|
|
|
* @see \yii\i18n\I18N::translate |
|
67
|
|
|
* |
|
68
|
|
|
* @method static void trigger(string $name, \yii\base\Event $event = null) Triggers an event. |
|
69
|
|
|
* @see \yii\base\Component::trigger |
|
70
|
|
|
* |
|
71
|
|
|
* Property accessors |
|
72
|
|
|
* |
|
73
|
|
|
* @method static array getTranslations() Returns list of [[MessageSource]] configurations or objects. |
|
74
|
|
|
* @see \yii\i18n\I18N::translations |
|
75
|
|
|
* |
|
76
|
|
|
* @method static void setTranslations(array $value) Sets list of [[MessageSource]] configurations or objects. |
|
77
|
|
|
* @see \yii\i18n\I18N::translations |
|
78
|
|
|
*/ |
|
79
|
|
|
class I18n extends Facade |
|
80
|
|
|
{ |
|
81
|
|
|
/** |
|
82
|
|
|
* @inheritDoc |
|
83
|
|
|
*/ |
|
84
|
1 |
|
public static function getFacadeComponentId() |
|
85
|
|
|
{ |
|
86
|
1 |
|
return 'i18n'; |
|
87
|
|
|
} |
|
88
|
|
|
} |
|
89
|
|
|
|