instanceClassPrefix = 'VikBookingCronJob'; } /** * Children classes can override this method to rearrange the ordering * of the elements created through this factory class. * * @param array &$list The list of instances. * * @return void */ protected function rearrangeInstances(&$list) { // sort cron jobs by title uasort($list, function($a, $b) { return strcasecmp($a->getTitle(), $b->getTitle()); }); } /** * Children classes can override this method to make sure that the * created instance is compliant with the factory requirements. * * @param mixed $object The object to validate. * * @return boolean True if valid, false otherwise. */ protected function isInstanceValid($object) { return $object instanceof VBOCronJob; } }