1
0
mirror of https://github.com/flarum/core.git synced 2025-07-04 08:33:08 +02:00
Files
php-flarum/src copy/Core/Posts/EventPost.php
2015-07-01 16:31:06 +09:30

28 lines
567 B
PHP
Executable File

<?php namespace Flarum\Core\Models;
abstract class EventPost extends Post implements MergeableInterface
{
use MergeableTrait;
/**
* Unserialize the content attribute.
*
* @param string $value
* @return string
*/
public function getContentAttribute($value)
{
return json_decode($value, true);
}
/**
* Serialize the content attribute.
*
* @param string $value
*/
public function setContentAttribute($value)
{
$this->attributes['content'] = json_encode($value);
}
}