public function getId($autoGenerate = true) { if ($autoGenerate && $this->_id === null) { $this->_id = static::$autoIdPrefix . static::$counter++; } return $this->_id; }