public function setResource(ResourceInterface $resource = null)
    {
        $this->resource = $resource;

        // Clear urls
        $this->urls = null;

        return $this;
    }
public function setResource(ResourceInterface $resource = null)
    {
        $this->resource = $resource;

        // Clear urls
        $this->urls = null;

        return $this;
    }
public function setResource ( ResourceInterface $ resource = null ) { $ this -> resource = $ resource ; // Clear urls $ this -> urls = null ; return $ this ; }
Sets the current resource.

@param ResourceInterface $resource

@return LocaleSwitcher
Sets the current resource .