-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathLegacyMethodsTrait.php
55 lines (45 loc) · 1.38 KB
/
LegacyMethodsTrait.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<?php
declare(strict_types=1);
/*
* Studio 107 (c) 2018 Maxim Falaleev
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Mindy\Orm;
use Mindy\Application\App;
trait LegacyMethodsTrait
{
/**
* @return string
*/
public function getVerboseName()
{
@trigger_error('The '.__METHOD__.' method is deprecated since version 3.0 and will be removed in 4.0.', E_USER_DEPRECATED);
return $this->getShortName();
}
/**
* @param $route
* @param array $data
*
* @return string
*/
public function reverse($route, array $data = [])
{
@trigger_error('The '.__METHOD__.' method is deprecated since version 3.0 and will be removed in 4.0.', E_USER_DEPRECATED);
return App::getInstance()->getComponent('router')->generate($route, $data);
}
/**
* @param $id
* @param array $parameters
* @param null $domain
* @param null $locale
*
* @return string
*/
public static function t($id, array $parameters = [], $domain = null, $locale = null)
{
@trigger_error('The '.__METHOD__.' method is deprecated since version 3.0 and will be removed in 4.0.', E_USER_DEPRECATED);
return App::getInstance()->getComponent('translator')->trans($id, $parameters, $domain, $locale);
}
}