| 1234567891011121314151617181920212223242526272829303132333435 |
- <?php
- class PracticeTest extends Test {
- protected $values = [];
- // Constants
- /**
- * @param bool $as_assoc_array
- * @return array
- */
- public function getValues(bool $as_assoc_array = false): array {
- return $this->values;
- }
- /**
- * @param string $key
- * @param string $value
- * @return bool
- */
- public function setValue(string $key, string $value): bool {
- $this->values[$key] = $value;
- return true;
- }
- /**
- * @return string
- */
- public function getDirectory(): string {
- $directory = ROOT_DIR . "/files/users/$this->tester_id/practice_tests/$this->template_id";
- if(!file_exists($directory)) mkdir($directory, 0777, true);
- return $directory;
- }
- }
|