code: public function attach(\SplObserver $observer, $eventName = Null, $function = Null, $order = Null) {
          $newEventAttach = new \stdClass();
          $newEventAttach->observer  = $observer;
          $newEventAttach->function  = $function;
          $newEventAttach->eventName = $eventName;
          $newEventAttach->order     = $order;
          $this->_observers->attach($newEventAttach);
      }
docs: Add new observer to the list
  
  @param \SplObserver        $observer
  @param string|null         $eventName
  @param string|null         $function
  @param mixed |null         $order