Subversion-Projekte lars-tiefland.laravel_shop

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
148 lars 1
<?php
2
 
3
namespace Faker;
4
 
5
/**
6
 * This generator returns a default value for all called properties
7
 * and methods.
8
 *
9
 * @mixin Generator
10
 *
11
 * @deprecated Use ChanceGenerator instead
12
 */
13
class DefaultGenerator
14
{
15
    protected $default;
16
 
17
    public function __construct($default = null)
18
    {
19
        trigger_deprecation('fakerphp/faker', '1.16', 'Class "%s" is deprecated, use "%s" instead.', __CLASS__, ChanceGenerator::class);
20
 
21
        $this->default = $default;
22
    }
23
 
24
    public function ext()
25
    {
26
        return $this;
27
    }
28
 
29
    /**
30
     * @param string $attribute
31
     *
32
     * @deprecated Use a method instead.
33
     */
34
    public function __get($attribute)
35
    {
36
        trigger_deprecation('fakerphp/faker', '1.14', 'Accessing property "%s" is deprecated, use "%s()" instead.', $attribute, $attribute);
37
 
38
        return $this->default;
39
    }
40
 
41
    /**
42
     * @param string $method
43
     * @param array  $attributes
44
     */
45
    public function __call($method, $attributes)
46
    {
47
        return $this->default;
48
    }
49
}