public function add(ResourceStateChecker $watched)
    {
        $id = $watched->getId();
        if (!isset($this->watched[$id])) {
            $this->watched[$id] = new \SplObjectStorage();
        }

        $this->watched[$id]->attach($watched);
    }
public function add(ResourceStateChecker $watched)
    {
        $id = $watched->getId();
        if (!isset($this->watched[$id])) {
            $this->watched[$id] = new \SplObjectStorage();
        }

        $this->watched[$id]->attach($watched);
    }
public function add ( ResourceStateChecker $ watched ) { $ id = $ watched -> getId ( ) ; if ( ! isset ( $ this -> watched [ $ id ] ) ) { $ this -> watched [ $ id ] = new \ SplObjectStorage ( ) ; } $ this -> watched [ $ id ] -> attach ( $ watched ) ; }
Adds state checker to the bag.

@param ResourceStateChecker $watched
Adds state checker to the bag .