sitemap-php icon indicating copy to clipboard operation
sitemap-php copied to clipboard

Allow null $location param in the constructor and sanitize it

Open belyas opened this issue 7 years ago • 2 comments

For type-hinting reason, we should set $location parameter in the constructor of WebSitemapItem class to null value which enables to use setLocation method from type-hinting

belyas avatar Sep 18 '17 20:09 belyas

Hi @belyas The new version is still in progress. I am planning to finish to end of this month. https://github.com/o/sitemap-php/milestone/1

I just checked the sitemap spec, it seems location is required, this is why I kept location in constructor. And I am not sure about sanitize location. I want to keep this function flexible for every user.

So, everything is still in progress, lets discuss after a few days. Still I have to refactor and implement lots of things in library.

(But today you can use the library from packagist https://packagist.org/packages/osm/sitemap-php, be careful lots of thing (API, structure) will be change)

o avatar Sep 19 '17 08:09 o

Hi @o ,

Alright, I see I'll be back later to have a look at it

Good luck :)

belyas avatar Oct 04 '17 22:10 belyas