/** * Create the service wrapper for a SCA Component. * * @param string $mediator Mediator * @param string $component_name Component name * @param string $class_name Class name * @param string $method_name Method name * @param string $arg_array Arguments */ public function __construct($mediator, $component_name, $class_name, $method_name, $arg_array) { SCA::$logger->log('Entering'); SCA::$logger->log("component_name = {$component_name}, class name = {$class_name}"); SCA::setIsEmbedded(true); $this->mediator = $mediator; $this->component_name = $component_name; $this->method_name = $method_name; $this->class_name = $class_name; // if a class name has not been provided // then this may just be a script. if ($class_name == null) { // $arg_array = $this->mediator->getArgArray(); // get the arguments and put them into the request $index = 0; foreach ($arg_array as $arg_val) { $_REQUEST[$index] = $arg_val; $index = $index + 1; } // its just a script so get ready to // capture its output. We have to do this here // as the script is included between construction // and invoke of this object ob_start(); } SCA::$logger->log('Exiting'); }