-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #36 from StenopePHP/html-processor
Mutualise HTML Crawler for better performances
- Loading branch information
Showing
27 changed files
with
341 additions
and
125 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
stenope: | ||
shared_html_crawlers: true | ||
resolve_links: | ||
App\Model\Page: { route: page, slug: page } | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the "StenopePHP/Stenope" bundle. | ||
* | ||
* @author Thomas Jarrand <thomas.jarrand@gmail.com> | ||
*/ | ||
|
||
namespace Stenope\Bundle\Behaviour; | ||
|
||
use Stenope\Bundle\Content; | ||
use Symfony\Component\DomCrawler\Crawler; | ||
|
||
interface HtmlCrawlerManagerInterface | ||
{ | ||
/** | ||
* Get HTML Crawler for the given property (creates it if needed) | ||
*/ | ||
public function get(Content $content, array &$data, string $property): ?Crawler; | ||
|
||
/** | ||
* Dump the current state of the HTML Crawler into data for the given property. | ||
*/ | ||
public function save(Content $content, array &$data, string $property): void; | ||
|
||
/** | ||
* Dump the current state of all HTML Crawlers into data for their respective property. | ||
*/ | ||
public function saveAll(Content $content, array &$data): void; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.