public function searchFor(array $resourceTypes)
    {
        $this->reset();

        $resourceTypes = array_map([$this, 'singular'], $resourceTypes);

        if (in_array('url', $resourceTypes)) {
            $this->resourcesMap['urls'] = [
                'extractor' => new UrlExtractor(),
                'resources' => null
            ];
        }

        if (in_array('email', $resourceTypes)) {
            $this->resourcesMap['emails'] = [
                'extractor' => new EmailExtractor(),
                'resources' => null
            ];
        }

        return $this;
    }
public function searchFor(array $resourceTypes)
    {
        $this->reset();

        $resourceTypes = array_map([$this, 'singular'], $resourceTypes);

        if (in_array('url', $resourceTypes)) {
            $this->resourcesMap['urls'] = [
                'extractor' => new UrlExtractor(),
                'resources' => null
            ];
        }

        if (in_array('email', $resourceTypes)) {
            $this->resourcesMap['emails'] = [
                'extractor' => new EmailExtractor(),
                'resources' => null
            ];
        }

        return $this;
    }
public function searchFor ( array $ resourceTypes ) { $ this -> reset ( ) ; $ resourceTypes = array_map ( [ $ this , 'singular' ] , $ resourceTypes ) ; if ( in_array ( 'url' , $ resourceTypes ) ) { $ this -> resourcesMap [ 'urls' ] = [ 'extractor' => new UrlExtractor ( ) , 'resources' => null ] ; } if ( in_array ( 'email' , $ resourceTypes ) ) { $ this -> resourcesMap [ 'emails' ] = [ 'extractor' => new EmailExtractor ( ) , 'resources' => null ] ; } return $ this ; }
Set the resource map that will hold the the search info.

@param array $resourceTypes
@return $this
Set the resource map that will hold the the search info .