src/StatedClass/LifeCyclableTrait.php
public function registerObserver(ObservedInterface $observed): LifeCyclableInterface
    {
        $this->observedList[\spl_object_hash($observed)] = $observed;

        return $this;
    }
public function registerObserver(ObservedInterface $observed): LifeCyclableInterface
    {
        $this->observedList[\spl_object_hash($observed)] = $observed;

        return $this;
    }
To register a new observer.

@param ObservedInterface $observed

@return LifeCyclableInterface