code: public function add(callable $decorator, $priority = 0)
      {
          $this->stack[] = array(
              'decorator' => $decorator,
              'priority' => $priority,
              'index' => $this->index
          );
          $this->index--;
          uasort($this->stack, array($this, 'compareStackItems'));
  
          return $this;
      }
docs: Add a decorator to the stack
  
  @param callable $decorator
  @param int $priority
  @return $this