bludit/bl-kernel/post.class.php

24 lines
362 B
PHP
Raw Normal View History

2015-05-05 01:00:01 +00:00
<?php defined('BLUDIT') or die('Bludit CMS.');
2015-03-08 14:02:59 -03:00
2016-01-11 23:18:20 -03:00
class Post extends Content {
2015-06-30 00:23:29 -03:00
function __construct($key)
2015-03-08 14:02:59 -03:00
{
2015-06-30 00:23:29 -03:00
// Database Key
$this->setField('key', $key);
2015-03-08 14:02:59 -03:00
2016-01-11 23:18:20 -03:00
// Set filterType
$this->setField('filterType', 'post');
2015-06-27 20:28:22 -03:00
2016-01-11 23:18:20 -03:00
parent::__construct(PATH_POSTS.$key.DS);
2015-03-08 14:02:59 -03:00
}
// Returns the post slug
2016-01-11 23:18:20 -03:00
public function slug()
2015-07-06 22:05:17 -03:00
{
2016-01-11 23:18:20 -03:00
return $this->getField('key');
2015-08-26 00:42:32 -03:00
}
2017-05-09 22:57:56 +02:00
2016-05-29 14:21:11 -03:00
2016-01-11 23:18:20 -03:00
}