-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSitemapInterface.php
55 lines (50 loc) · 1.31 KB
/
SitemapInterface.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<?php
namespace aliobeidat\sitemap;
/**
* Interface SitemapInterface
* Sitemap class interface.
*/
interface SitemapInterface
{
/**
* Returns the name of the sitemap (matches the file name without permission).
*
* For example: 'sitemap-articles', 'sitemap-news' etc.
*
* @return string
*/
public function getName();
/**
* @param $urlsQuery database query to return urls
* Returns a list of sitemap urls.
* The 'lastmodTimestamp' key is optional.
*
* For example:
* ```
* [
* ['url'=> 'http://site.com/1', 'lastmodTimestamp' => 12312312312],
* ['url'=> 'http://site.com/2', 'lastmodTimestamp' => 12312312342],
* ['url'=> 'http://site.com/3'],
* ]
* ```
*
* @return array
*/
public function getUrls($urlsQuery);
/**
* @param $maxUrlsCount integer max number of rows inside each query
* Return a list of sql queries chunks that needs to run to get urls
*
* example:
* ```
* [
* 'select * from table_name where id > 1 and id < 10',
* 'select * from table_name where id > 10 and id < 20',
* 'select * from table_name where id > 20 and id < 30'
* ]
* ```
*
* @return array
*/
public function getUrlsQueries($maxUrlsCount);
}