/** * This function will determine the correct type of midgard_collector that * has to be created. It will also call the _on_prepare_new_collector event handler. * * @param string $classname The name of the class for which you want to create a collector. * @param string $domain The domain property of the collector instance * @param mixed $value Value match for the collector instance * @return midcom_core_collector The initialized instance of the collector. * @see midcom_core_collector */ function new_collector($classname, $domain, $value) { $mc = new midcom_core_collector($classname, $domain, $value); $mc->initialize(); return $mc; }