src/TaskQueue.php
public function add(InvokerInterface $invoker, $taskArgs = [])
    {
        $taskArgs = (is_array($taskArgs) ? $taskArgs : array_slice(func_get_args(), 1));

        array_unshift($this->tasks, compact('invoker', 'taskArgs'));

        return $this;
    }
public function add(InvokerInterface $invoker, $taskArgs = [])
    {
        $taskArgs = (is_array($taskArgs) ? $taskArgs : array_slice(func_get_args(), 1));

        array_unshift($this->tasks, compact('invoker', 'taskArgs'));

        return $this;
    }
public function add ( InvokerInterface $ invoker , $ taskArgs = [ ] ) { $ taskArgs = ( is_array ( $ taskArgs ) ? $ taskArgs : array_slice ( func_get_args ( ) , 1 ) ) ; array_unshift ( $ this -> tasks , compact ( 'invoker' , 'taskArgs' ) ) ; return $ this ; }
Add callbacks or \Closure into task queueing stack.

@param InvokerInterface $invoker
@param array $taskArgs The callback or Closure arguments.
@return TaskQueueInterface
Add callbacks or \ Closure into task queueing stack .