X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fclasses%2Fmain%2Fresolver%2Fweb%2Fclass_WebCommandResolver.php;h=fa52125d68a944b13b6a37e3fac32c6b9fabea51;hb=389f3abad52f9cde3323db5d3d187562fe801a71;hp=47baef47bfc4cceabea389d6e49aa602e24413cd;hpb=1f1f351e726dae5d4cd25b46639c2fcaa9e38661;p=hub.git diff --git a/inc/classes/main/resolver/web/class_WebCommandResolver.php b/inc/classes/main/resolver/web/class_WebCommandResolver.php index 47baef47b..fa52125d6 100644 --- a/inc/classes/main/resolver/web/class_WebCommandResolver.php +++ b/inc/classes/main/resolver/web/class_WebCommandResolver.php @@ -40,7 +40,7 @@ class WebCommandResolver extends BaseResolver implements CommandResolver { $this->setObjectDescription("Resolver for local web commands"); // Create unique ID number - $this->createUniqueID(); + $this->generateUniqueId(); // Set prefix to "Web" $this->setCommandPrefix("Web"); @@ -184,19 +184,7 @@ class WebCommandResolver extends BaseResolver implements CommandResolver { } // Initiate the command - $eval = sprintf("\$commandInstance = %s::create%s(\$this);", - $className, - $className - ); - - // Run the command - eval($eval); - - // Is the instance valid? - if ((!is_object($commandInstance)) || (!$commandInstance instanceof Commandable)) { - // Something is wrong - $commandInstance = null; - } + $commandInstance = ObjectFactory::createObjectByName($className, array($this)); // Return the result return $commandInstance;