21 lines
No EOL
401 B
PHP
21 lines
No EOL
401 B
PHP
<?php
|
|
|
|
namespace App\Contracts;
|
|
|
|
interface ArticleParserInterface
|
|
{
|
|
/**
|
|
* Check if this parser can handle the given URL
|
|
*/
|
|
public function canParse(string $url): bool;
|
|
|
|
/**
|
|
* Extract article data from HTML
|
|
*/
|
|
public function extractData(string $html): array;
|
|
|
|
/**
|
|
* Get the source name for this parser
|
|
*/
|
|
public function getSourceName(): string;
|
|
} |