1 | <?php |
||
29 | class Mixer extends \RandomLibTest\Mocks\AbstractMock implements \RandomLib\Mixer { |
||
30 | |||
31 | public static $strength = null; |
||
32 | |||
33 | public static $test = true; |
||
34 | |||
35 | public static function init() { |
||
36 | static::$strength = new Strength(Strength::HIGH); |
||
37 | static::$test = true; |
||
38 | } |
||
39 | |||
40 | /** |
||
41 | * Return an instance of Strength indicating the strength of the mixer |
||
42 | * |
||
43 | * @return Strength An instance of one of the strength classes |
||
44 | */ |
||
45 | public static function getStrength() { |
||
46 | return static::$strength; |
||
47 | } |
||
48 | |||
49 | /** |
||
50 | * Test to see if the mixer is available |
||
51 | * |
||
52 | * @return boolean If the mixer is available on the system |
||
53 | */ |
||
54 | public static function test() { |
||
55 | return static::$test; |
||
56 | } |
||
57 | |||
58 | /** |
||
59 | * Mix the provided array of strings into a single output of the same size |
||
60 | * |
||
61 | * All elements of the array should be the same size. |
||
62 | * |
||
63 | * @param array $parts The parts to be mixed |
||
64 | * |
||
65 | * @return string The mixed result |
||
66 | */ |
||
67 | public function mix(array $parts) { |
||
68 | return $this->__call('mix', array($parts)); |
||
69 | } |
||
70 | |||
71 | } |
||
72 |