Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes: #91 Add functionality from Recursive Paginator #94

Merged

Conversation

funivan
Copy link
Member

@funivan funivan commented Jan 3, 2024

How this functional is different from the current Recursive Paginator implementation

  1. We always accept list of expressions.
  2. We specify initial links in the constructor.
$pages = new RecursiveParser(
            $parser,
            ["//div[@id='main']/a/@href", "//div[@id='a2']/a/@href"], // 1. expressions
            ['a.html'] // 2. initial links
        );
  1. Instead of nextPage we now use iterator approach:
foreach($pages as $page){
//  .... 
}

@funivan funivan requested a review from ChrisGalliano January 3, 2024 14:25
Copy link
Contributor

@ChrisGalliano ChrisGalliano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@ChrisGalliano ChrisGalliano merged commit faf636f into master Jan 4, 2024
4 checks passed
@funivan funivan deleted the parser-91-add-functionality-from-recursive-pagiantor branch January 9, 2024 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants