Created
January 29, 2013 22:10
-
-
Save jenkoian/4668420 to your computer and use it in GitHub Desktop.
Simple example of getting the last modified date from a child controller
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
<?php | |
/** | |
* Find the last modified date | |
* | |
* @return \DateTime | |
*/ | |
public function getLastModifiedDate() | |
{ | |
$modifiedDate = $this->thingRepository->findLastModifiedThing(); | |
if ($modifiedDate instanceof \DateTime) { | |
return $modifiedDate; | |
} | |
return new \DateTime(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment