Is is possible to set a variable on a crawler object or so that could then be accessed inside
the handleDocumentInfo function override?
For example:
Before I run the crawl I have a customer ID known at initialization that should be written into DB for every handleDocumentInfo.
url, status, customerID
The customerID is taken from DB and is the same for all crawled URLs.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
That's why phpcrawl relies on OO-inheritance, there's no need for variables that get passed through, just extend the main-class with whatever you need in your project.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
View and moderate all "Help" comments posted by this user
Mark all as spam, and block user from posting to "Forum"
Is is possible to set a variable on a crawler object or so that could then be accessed inside
the handleDocumentInfo function override?
For example:
Before I run the crawl I have a customer ID known at initialization that should be written into DB for every handleDocumentInfo.
url, status, customerID
The customerID is taken from DB and is the same for all crawled URLs.
Hi!
Just add a property "customuerID" to your extednen crawler-class, something like this:
That's why phpcrawl relies on OO-inheritance, there's no need for variables that get passed through, just extend the main-class with whatever you need in your project.
View and moderate all "Help" comments posted by this user
Mark all as spam, and block user from posting to "Forum"
Hi Uwe!
Thank you, thats fantastic. I see that I need to refresh my OO knowledge:)