protected function checkRequirements()
{
//make sure requirements are met
foreach ($this->requiredProperties as $property) {
if (null === $this->{$property}) {
throw new \RuntimeException(sprintf('Property `%s` at %s can not be null.', $property, $this->getClass()));
}
}
}