Skip to content
This repository was archived by the owner on Dec 20, 2025. It is now read-only.

SitemapEntry.php optimization#3

Merged
ThePixelDeveloper merged 6 commits intoThePixelDeveloper:masterfrom
nicolas-brousse:patch-1
Aug 25, 2014
Merged

SitemapEntry.php optimization#3
ThePixelDeveloper merged 6 commits intoThePixelDeveloper:masterfrom
nicolas-brousse:patch-1

Conversation

@nicolas-brousse
Copy link
Copy Markdown
Contributor

  • Change private properties to protected
  • Add checks for setPriority and setChangeFreq
  • Add constants for ChangeFreq
  • return $this in setters
  • Allow DateTime in setLastMod

[EDIT]

  • Add a constructor for quick ans simple sitemap entries

* Change private properties to protected
* Add checks for setPriority and setChangeFreq
* Add constants for ChangeFreq
* return $this in setters
* Remove useless `use XMLWriter`
* Debug var name line 25
* Optimize setProperty method
Create a constructor for quick ans simple sitemap entries
@nicolas-brousse
Copy link
Copy Markdown
Contributor Author

I've also change the lastMod date format (3832dc5).
I've see information into this pages http://www.sitemaps.org/protocol.html#xmlTagDefinitions and http://www.w3.org/TR/NOTE-datetime.

@ThePixelDeveloper
Copy link
Copy Markdown
Owner

Sorry I didn't get to this sooner, apparently I'm not getting notifications ...

loc is a required attribute, do you mind changing the __constructor so it's required?

-Mathew

@nicolas-brousse
Copy link
Copy Markdown
Contributor Author

Hi Mathew,

I've just change it ;)

@ThePixelDeveloper
Copy link
Copy Markdown
Owner

Thanks a lot, merged.

ThePixelDeveloper pushed a commit that referenced this pull request Aug 25, 2014
@ThePixelDeveloper ThePixelDeveloper merged commit ddb55e0 into ThePixelDeveloper:master Aug 25, 2014
@nicolas-brousse
Copy link
Copy Markdown
Contributor Author

Cool :)

@nicolas-brousse nicolas-brousse deleted the patch-1 branch August 25, 2014 12:19
@ddebin
Copy link
Copy Markdown

ddebin commented Sep 1, 2014

In your patch of setLastMod, DateTime::DATE_W3Cis wrong, it's either DateTime::W3C or DATE_W3C.

cf. http://php.net/manual/en/class.datetime.php#datetime.constants.w3c

@nicolas-brousse
Copy link
Copy Markdown
Contributor Author

You're right! It's a mistake.

Is it possible to correct this in this PR while it is closed?

@nicolas-brousse nicolas-brousse restored the patch-1 branch September 1, 2014 22:26
@ThePixelDeveloper
Copy link
Copy Markdown
Owner

I'll fix it directly online, ty.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants