protected function getMetadata() {
		if ($this->metadataManager === null) {
			throw new Exceptions\MetadataError('Metadata manager was not set');
		}
		
		return $this->metadataManager->getMetadata($this);
	}