* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-class CrawlerUrlSource???Task extends BaseTask implements Taskable, Visitable {
+class CrawlerUrlSource???Task extends BaseUrlSourceTask implements Taskable, Visitable {
/**
* Protected constructor
*
* @return void
*/
public function executeTask () {
- // Get the URL source instance and announce us
- UrlSourceObjectFactory::createUrlSourceInstance($this)->processStack();
+ // Get source instance
+ $sourceInstance = $this->getUrlSourceInstance();
+
+ // Is it not set?
+ if (is_null($sourceInstance)) {
+ // Initialize it
+ $this->initUrlSourceTask();
+
+ // And re-get it
+ $sourceInstance = $this->getUrlSourceInstance();
+ } // END - if
+
+ // Get the URL source instance and fill the stack with crawl entries
+ $sourceInstance->fillUrlStack();
}
}