再帰関数


    /**
     * 絞り込み検索の削除フラグのフィルターを設定します
     * 
     * @param   array|string  $val          検索で使用するテーブルの配列
     * @return  array         $where_list   絞り込み検索の条件が入ります
     */
    protected function _set_is_deleted ($val)
    {
        static $_where_list = [];

        if (is_array($val))
        {
            foreach($val as $datum)
            {
                $this->_set_is_deleted($datum);
            }
            return $_where_list;
        }

        $_where_list[$val . '.is_deleted'] = My_Model::DB_OFF_FLG;
        return $_where_list;
    }
    /**
     * Returns HTML escaped variable.
     *
     * @param   mixed   $var        The input string or array of strings to be escaped.
     * @param   bool    $double_encode  $double_encode set to FALSE prevents escaping twice.
     * @return  mixed           The escaped string or array of strings as a result.
     */
    function html_escape($var, $double_encode = TRUE)
    {
        if (empty($var))
        {
            return $var;
        }

        if (is_array($var))
        {
            foreach (array_keys($var) as $key)
            {
                $var[$key] = html_escape($var[$key], $double_encode);
            }

            return $var;
        }

        return htmlspecialchars($var, ENT_QUOTES, config_item('charset'), $double_encode);
    }