| 1 | <?php |
||
| 10 | final class Interview implements CreatableFromArray |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * @var array with keys as profile ids and each profile has a name, statements and questions |
||
| 14 | */ |
||
| 15 | private $profiles; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @var string |
||
| 19 | */ |
||
| 20 | private $description; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @var bool |
||
| 24 | */ |
||
| 25 | private $complete; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @param array $profiles |
||
| 29 | * @param string $description |
||
| 30 | * @param bool $complete |
||
| 31 | */ |
||
| 32 | private function __construct(array $profiles, $description, $complete) |
||
| 38 | |||
| 39 | /** |
||
| 40 | * @param array $data |
||
| 41 | * |
||
| 42 | * @return |
||
| 43 | */ |
||
| 44 | public static function createFromArray(array $data) |
||
| 51 | |||
| 52 | /** |
||
| 53 | * This is allow legacy code use the interview object. |
||
| 54 | * |
||
| 55 | * @return array |
||
| 56 | */ |
||
| 57 | public function toArray() |
||
| 65 | |||
| 66 | /** |
||
| 67 | * @return array |
||
| 68 | */ |
||
| 69 | public function getProfiles() |
||
| 73 | |||
| 74 | /** |
||
| 75 | * @return string |
||
| 76 | */ |
||
| 77 | public function getDescription() |
||
| 81 | |||
| 82 | /** |
||
| 83 | * @return bool |
||
| 84 | */ |
||
| 85 | public function isComplete() |
||
| 89 | } |
||
| 90 |