Add a new task for NuSOAP Call Request

@param string            $name   Task Identifier Name (Listed in OsWs.inc.php)
@param array|ArrayObject $params Task Parameters
@param string            $desc   Task Name/Description

@return $this
182458
public function addTask($name, $params, $desc = 'No Description')
    {
        //====================================================================//
        // Create a new task
        $task = new ArrayObject(array(), ArrayObject::ARRAY_AS_PROPS);
        //====================================================================//
        // Prepare Task Id
        $taskId = $this->tasks->count() + 1;
        //====================================================================//
        // Fill task with informations
        $task['id'] = $taskId;
        $task['name'] = $name;
        $task['desc'] = $desc;
        $task['params'] = $params;
        //====================================================================//
        // Add Task to Tasks list
        $this->tasks[$taskId] = $task;
        //====================================================================//
        // Debug
        Splash::log()->deb('TasksAdd', $task['name'], $task['desc']);

        return $this;
    }
213110
public function createTask($name) {
    $this->init();
    $class = Code::expandNamespace(\Webforge\Common\String::expand($name, 'Task'), 'Psc\System\Deploy');
    
    $gClass = GClass::factory($class);
    $params = array();
    if ($gClass->hasMethod('__construct')) {
      $constructor = $gClass->getMethod('__construct');
      foreach ($constructor->getParameters() as $parameter) {
        $params[] = $this->resolveTaskDependency($parameter, $gClass);
      }
    }
    
    return $gClass->newInstance($params);
  }
558228
private function invokeAfter(array $namedParams, array $classParams)
    {
        $invoker = new Invoker();
        foreach ($this->after as $function) {
            $invoker->invoke($function, $namedParams, $classParams);
        }
    }
71173
public static function __callstatic($name, $params)
    {
        if (array_key_exists($name, TextColorManager::getKnownColors())) {
            return TextColorManager::$name($params);
        }

        if (BackgroundColorManager::isBackgroundCall($name)) {
            return BackgroundColorManager::$name($params);
        }

        if (in_array($name, BorderManager::getKnownBorders())) {
            return BorderManager::$name($params);
        }

        if (in_array($name, StructureManager::getDisplayableStructures())) {
            return StructureManager::$name($params);
        }

        if (array_key_exists($name, StyleManager::getKnownStyles())) {
            return StyleManager::$name($params);
        }

        if (FigletManager::isFigletCall($name)) {
            return FigletManager::$name($params);
        }

        throw new Exception("Unknown function name $name");
    }
1164384
private function createServiceFromLazyServiceDelegator(string $name, array $options = null)
    {

        $creationCallback = $this->delegatorCallbackCache[$name] ?? null;
        if ($creationCallback) {
            $object = $creationCallback($this->creationContext, $name, $creationCallback, $options);
            return $object;
        }
        $creationCallback = function () use ($name, $options) {
            return $this->createServiceFromFactory($name, $options);
        };

        $delegatorFactory = $this->delegators[$name][0];
        if (is_string($delegatorFactory)) {
            $delegatorFactory = $this->createLazyServiceDelegatorFactory();
            $this->delegators[$name][0] = $delegatorFactory;
        }

        $creationCallback = function () use ($delegatorFactory, $name, $creationCallback, $options) {
            return $delegatorFactory($this->creationContext, $name, $creationCallback, $options);
        };

        //cache the callback for later requests
        $this->delegatorCallbackCache[$name] = $creationCallback;
        return $creationCallback($this->creationContext, $name, $creationCallback, $options);
    }
988894
public function addOption($spec, string $desc = null, string $key = null): Option
    {
        $option = $this->getOptionCollection();

        return $option->add($spec, $desc, $key);
    }
34414
public static function __callstatic($name, $params)
    {
        $matches = static::isFigletCall($name);

        if (null === $matches) {
            throw new Exception("Unknown figlet function name $name");
        }

        $fontName = $matches[2];

        // target string is expected to be:
        $targetString = $params[0][0];

        return static::render($targetString, $fontName);
    }
771986
public void addDescription(String desc) {
		XmpArray array = new XmpArray(XmpArray.ALTERNATIVE);
		array.add(desc);
		setProperty(DESCRIPTION, array);
	}
1358989
public function add($name, $type, $code, $desc = '')
    {
        $legacyKernel = Eresus_Kernel::app()->getLegacyKernel();
        $filename = $legacyKernel->froot . 'templates/';
        if ($type)
        {
            $filename .= "$type/";
        }
        $filename .= "$name.html";
        $content = "{* $desc *}\n$code";
        $result = file_put_contents($filename, $content) > 0;
        return $result;
    }
230194
public function setDescription($desc) {
		if (! $this->description instanceof Description) {
			$this->getDescription()->setHtml($html);
		}
		
		$this->description = $desc;
	}
845394
public function add($spec, string $desc = null, string $key = null): Option
    {
        if ($spec instanceof Option) {
            $this->addOption($spec);

            return $spec;
        }

        if (is_string($spec)) {
            // parse spec string
            $spec = new Option($spec, $desc);

            if ($key) {
                $spec->key = $key;
            }

            $this->addOption($spec);

            return $spec;
        }

        throw new LogicException('Unknown Spec Type');
    }
1037347
public static function URL($name, $params = []){
      return ($r = static::tagged($name)) ? $r-> getURL($params) : new URL();
    }
724468
public function defineTask($name, $object)
    {
        $options = static::getOptions();
        $debug = @$options['debug'] === true;

        if ($this->started)
            throw new \Exception("Define tasks before start()ing the daemon not after");

        if (! $object instanceof AbstractTask)
            throw new \Exception("Task must implement AbstractTask");

        $object->setDaemon($this);
        $this->tasks[$name] = $object;

        if ($debug)
            echo "==> Task defined: $name" . PHP_EOL;

        return $this;
    }
445593
public function getTask($name)
    {
        if (!isset($this->tasks[$name])) {
            throw new UnknownTaskException("The task {$name} doesn't exist!");
        }

        return $this->tasks[$name];
    }
1020851
public function bind($name,$params) 
    {

        $this->instances[$name] = $params;
        $this->bind[$name] = true;

    }
316638
public function add($name, $value = null, array $params = [])
    {
        if (is_array($value)) {
            $params = $value;
            if (isset($params['value'])) {
                $value = $params['value'];
                unset($params['value']);
            } else {
                $value = '';
            }
        }
    
        $params = array_merge($this->defaults, $params);
        $this->jar[$name] = new Cookie($name, $value, $params['expires'], $params['path'], $params['domain'], $params['secure'], $params['httponly'], $params['raw']);
        return $this;
    }
829393
public function description($fieldDesc)
    {
        //====================================================================//
        // Safety Checks ==> Verify a new Field Exists
        if (empty($this->new)) {
            Splash::log()->err("ErrFieldsNoNew");
        } else {
            //====================================================================//
            // Update New Field structure
            $this->new->desc = Splash::trans(trim($fieldDesc));
        }

        return $this;
    }