<commit_before><?php

/**
 * About model
 *
 * @author Miles
 */
class Application_Model_About
{
    const CONFIG_KEY = 'about';

    /**
     * @var Application_Model_DbTable_Row_Config
     */
    private $configRow;

    /**
     * @var array
     */
    private $data;

    /**
     * Constructor
     */
    public function __construct()
    {
        $configTable = new Application_Model_DbTable_Config();
        $this->configRow = $configTable->getConfigRow();
        $this->data = $this->configRow->getConfig(self::CONFIG_KEY);

        if ($this->data === null) {
            $this->data = array(
                'cover' => '',
                'description' => 'We are Scsmartflo',
                'pics' => '',
                'picDescription' => '',
                'title' => 'Scsmartflo',
                'email' => '',
            );

            $this->save();
        }
    }

    /**
     * 儲存附圖
     *
     * @param int $index
     */
    public function delPic($index)
    {
        unset($this->data['pics'][$index]);
        $this->data['pics'] = array_values($this->data['pics']);
    }

    /**
     * 取得大圖顯示的檔案位置
     *
     * @return string
     */
    public function getCover()
    {
        return $this->data['cover'];
    }

    /**
     * 取得公司介紹
     *
     * @return string
     */
    public function getDescription()
    {
        return $this->data['description'];
    }

    /**
     * 取得附圖檔案位置
     *
     * @return array
     */
    public function getPics()
    {
        return $this->data['pics'];
    }

    /**
     * 取得附圖文字說明
     *
     * @return string
     */
    public function getPicDescription()
    {
        return $this->data['picDescription'];
    }

    /**
     * 取得附圖文字說明
     *
     * @return string
     */
    public function getTitle()
    {
        return $this->data['title'];
    }

    /**
     * 儲存大圖顯示的檔案
     *
     * @param string $cover
     */
    public function setCover($cover)
    {
        $this->data['cover'] = $cover;
    }

    /**
     * 儲存公司介紹
     *
     * @param string $description
     */
    public function setDescription($description)
    {
        $this->data['description'] = $description;
    }

    /**
     * 儲存附圖
     *
     * @param int $index
     * @param string $pic
     */
    public function setPic($index, $pic)
    {
        $this->data['pics'][$index] = $pic;
    }

    /**
     * 儲存附圖文字說明
     *
     * @param string $description
     */
    public function setPicDescription($description)
    {
        $this->data['picDescription'] = $description;
    }

    /**
     * 取得附圖文字說明
     *
     * @param string $title
     */
    public function setTitle($title)
    {
        $this->data['title'] = $title;<commit_msg>Fixed about model<commit_after><?php

/**
 * About model
 *
 * @author Miles
 */
class Application_Model_About
{
    const CONFIG_KEY = 'about';

    /**
     * @var Application_Model_DbTable_Row_Config
     */
    private $configRow;

    /**
     * @var array
     */
    private $data;

    /**
     * Constructor
     */
    public function __construct()
    {
        $configTable = new Application_Model_DbTable_Config();
        $this->configRow = $configTable->getConfigRow();
        $this->data = $this->configRow->getConfig(self::CONFIG_KEY);

        if ($this->data === null) {
            $this->data = array(
                'title' => 'Scsmartflo',
                'description' => 'We are Scsmartflo',
                'pic' => '',
            );

            $this->save();
        }
    }

    /**
     * 取得公司介紹
     *
     * @return string
     */
    public function getDescription()
    {
        return $this->data['description'];
    }

    /**
     * 取得大圖顯示的檔案位置
     *
     * @return string
     */
    public function getPic()
    {
        return $this->data['pic'];
    }

    /**
     * 取得附圖文字說明
     *
     * @return string
     */
    public function getTitle()
    {
        return $this->data['title'];
    }

    /**
     * 儲存公司介紹
     *
     * @param string $description
     */
    public function setDescription($description)
    {
        $this->data['description'] = $description;
    }

    /**
     * 儲存大圖顯示的檔案
     *
     * @param string $pic
     */
    public function setPic($pic)
    {
        $this->data['pic'] = $pic;
    }

    /**
     * 取得附圖文字說明
     *
     * @param string $title
     */
    public function setTitle($title)
    {
        $this->data['title'] = $title;
{'fraction_non_alphanumeric': 0.153068105192178, 'fraction_numerical': 0.0, 'mean_word_length': 1.566320645905421, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 47, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4772031', 'n_tokens_mistral': 1503, 'n_tokens_neox': 1502, 'n_words': 238}