src/Dominia/Crawler.php
public function extract(){
        $count = 0;
        if ($this->docsHome == null){
            die('Error. You must first set documents home (setDocsHome)');
        }
        $mainContent = $this->getMainPage();
        $documentsLink = $this->extractDocumentsLink($mainContent);
        foreach($documentsLink as $link){
            $processed = $this->processLink($link);
            if($processed == true){
                $count++;
            }
        }
        return $count;
    }
public function extract(){
        $count = 0;
        if ($this->docsHome == null){
            die('Error. You must first set documents home (setDocsHome)');
        }
        $mainContent = $this->getMainPage();
        $documentsLink = $this->extractDocumentsLink($mainContent);
        foreach($documentsLink as $link){
            $processed = $this->processLink($link);
            if($processed == true){
                $count++;
            }
        }
        return $count;
    }
Main crawler function.
It retrieves the content of the main dominios.es page to extract the links to pdf documents
It returns the number of processed files (the previously downloaded files are skipped)
@return int   Processed files