Maybe add here:

```php
if (isset($this->id)){
    return $this->id;
}
```
?

 Coz this implementation is good, but has a lot of checks that will be performed each time...