protected function OnSetEntityType($EntityType) { if (!$this->Instance instanceof $EntityType) { throw new Object\TypeMismatchException('Supplied entity type %s does not match the set entity type %s', get_class($this->Instance), $EntityType); } }