1 | <?php |
||
10 | class ProfileContainer implements \IteratorAggregate |
||
11 | { |
||
12 | const DEFAULT_PROFILE_NAME = 'default'; |
||
13 | |||
14 | /** @var null|Profile */ |
||
15 | private $defaultProfile; |
||
16 | |||
17 | /** @var Profile[] */ |
||
18 | private $profiles = []; |
||
19 | |||
20 | /** |
||
21 | * @param string $name |
||
22 | * @param array $countries |
||
23 | * @param array $languages |
||
24 | * @param array $currencies |
||
25 | * @param array $domains |
||
26 | * @param bool $isEnabled |
||
27 | * |
||
28 | * @return void |
||
29 | */ |
||
30 | public function addProfile($name, array $countries, array $languages, array $currencies, array $domains, $isEnabled = true) |
||
44 | |||
45 | /** |
||
46 | * @return null|\SixtyEightPublishers\Application\Environment\Profile |
||
47 | */ |
||
48 | public function getDefaultProfile() |
||
52 | |||
53 | /** |
||
54 | * @return \SixtyEightPublishers\Application\Environment\Profile[] |
||
55 | */ |
||
56 | public function getProfiles() |
||
60 | |||
61 | /** |
||
62 | * @param string $code |
||
63 | * |
||
64 | * @return \SixtyEightPublishers\Application\Environment\Profile |
||
65 | */ |
||
66 | public function getProfile($code) |
||
74 | |||
75 | /********************* interface \IteratorAggregate *********************/ |
||
76 | |||
77 | /** |
||
78 | * @return \ArrayIterator |
||
79 | */ |
||
80 | public function getIterator() |
||
84 | } |
||
85 |