<?php

namespace Doc\Src;

use Dever;

class Data
{
    public function __construct()
    {

    }

    public function info()
    {
        $id = Dever::input('id', 1);

        $this->data = Dever::load('doc/posts-one', $id);

        if ($this->data) {
            $this->data['content'] = json_decode(base64_decode($this->data['content']), true);
        }

        //print_r($this->data);die;

        return $this->data;
    }

    public function data()
    {
        return $this->data['content'];
    }
}
