Source of file DNTag.php
Size: 1,295 Bytes - Last Modified: 2021-12-23T10:29:15+00:00
/var/www/docs.ssmods.com/process/src/code/model/DNTag.php
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 | <?php use Gitonomy\Git\Reference\Tag; class DNTag extends ViewableData { /** * * @var Gitonomy\Git\Reference\Tag */ protected $tag = null; protected $project = null; protected $data = null; protected $name = null; protected $references = null; private static $casting = array( 'Name' => 'Text', 'SHA' => 'Text' ); /** * @param Gitonomy\Git\Commit $commit * @param DNProject $project * @param DNData $data */ public function __construct(Tag $tag, DNProject $project, DNData $data) { $this->tag = $tag; $this->project = $project; $this->data = $data; } /** * @return string */ public function Name() { return htmlentities($this->tag->getName()); } /** * @return string */ public function SHA() { return htmlentities($this->tag->getCommitHash()); } /** * @return SS_Datetime */ public function Created() { $created = $this->tag->getCommit()->getCommitterDate(); // gitonomy sets the time to UTC, so now we set the timezone to // whatever PHP is set to (date.timezone). This will change in the future if each // deploynaut user has their own timezone $created->setTimezone(new DateTimeZone(date_default_timezone_get())); $d = new SS_Datetime(); $d->setValue($created->format('Y-m-d H:i:s')); return $d; } } |