| 1 | <?php | ||
| 23 | class FileId | ||
| 24 | { | ||
| 25 | /** | ||
| 26 | * The id in a primitive type. | ||
| 27 | * | ||
| 28 | * @var string|int | ||
| 29 | */ | ||
| 30 | private $id; | ||
| 31 | |||
| 32 | /** | ||
| 33 | * Constructor. | ||
| 34 | * | ||
| 35 | * @param string|int|null $anId The id in a primitive type | ||
| 36 | */ | ||
| 37 | public function __construct($anId = null) | ||
| 41 | |||
| 42 | /** | ||
| 43 | * Gets the id. | ||
| 44 | * | ||
| 45 | * @return string|int | ||
| 46 | */ | ||
| 47 | public function id() | ||
| 51 | |||
| 52 | /** | ||
| 53 | * Method that checks if the id given is equal to the current. | ||
| 54 | * | ||
| 55 | * @param FileId $anId The id | ||
| 56 | * | ||
| 57 | * @return bool | ||
| 58 | */ | ||
| 59 | public function equals(FileId $anId) | ||
| 63 | |||
| 64 | /** | ||
| 65 | * Magic method that represents the file id in string format. | ||
| 66 | * | ||
| 67 | * @return string | ||
| 68 | */ | ||
| 69 | public function __toString() | ||
| 73 | } | ||
| 74 |