* @copyright Meritoo.pl */ class MissingChildClassesException extends Exception { /** * Class constructor * * @param array|object|string $parentClass Class that hasn't child classes, but it should. An array of objects, * strings, object or string. */ public function __construct($parentClass) { $template = 'The \'%s\' class requires one child class at least who will extend her (maybe is an abstract' . ' class), but the child classes are missing. Did you forget to extend this class?'; $parentClassName = Reflection::getClassName($parentClass); $message = sprintf($template, $parentClassName); parent::__construct($message); } }