| 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) |
||
| 48 | |||
| 49 | /** |
||
| 50 | * This is allow legacy code use the interview object. |
||
| 51 | * |
||
| 52 | * @return array |
||
| 53 | */ |
||
| 54 | public function toArray() |
||
| 62 | |||
| 63 | /** |
||
| 64 | * @return array |
||
| 65 | */ |
||
| 66 | public function getProfiles() |
||
| 70 | |||
| 71 | /** |
||
| 72 | * @return string |
||
| 73 | */ |
||
| 74 | public function getDescription() |
||
| 78 | |||
| 79 | /** |
||
| 80 | * @return bool |
||
| 81 | */ |
||
| 82 | public function isComplete() |
||
| 86 | } |
||
| 87 |