Archived
1
0
Fork 0
This repository has been archived on 2026-05-10. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
fiktivkod/application/models/rows/Post.php
2011-02-26 14:04:06 +01:00

36 lines
690 B
PHP

<?php
class Post extends Fiktiv_Model_Row_Abstract
{
protected $_tags = null;
public function getPubDate()
{
return new Fiktiv_Date($this->pubDate);
}
public function hasTags()
{
if (null === $this->_tags) {
$this->_tags = $this->getTags();
}
return (0 !== $this->_tags->count());
}
public function getTags()
{
// Quickie!
if (null !== $this->_tags) {
return $this->_tags;
}
return $this->findManyToManyRowset('ModelTag', 'ModelPostTag');
}
public function getAuthor()
{
return $this->findDependentRowset('ModelUser')->current();
}
}