/home/complianthowden/public_html/vendor/psy/psysh/src/Manual/V2Manual.php
<?php

/*
 * This file is part of Psy Shell.
 *
 * (c) 2012-2025 Justin Hileman
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Psy\Manual;

/**
 * V2 manual format loader.
 *
 * Loads pre-formatted manual documentation from SQLite databases.
 */
class V2Manual implements ManualInterface
{
    private \PDO $db;

    /**
     * Constructor.
     *
     * @param \PDO $db SQLite database connection
     */
    public function __construct(\PDO $db)
    {
        $this->db = $db;
    }

    /**
     * {@inheritdoc}
     */
    public function get(string $id)
    {
        $result = $this->db->query(\sprintf('SELECT doc FROM php_manual WHERE id = %s', $this->db->quote($id)));
        if ($result !== false) {
            return $result->fetchColumn(0) ?: null;
        }

        return null;
    }

    /**
     * {@inheritdoc}
     */
    public function getVersion(): int
    {
        return 2;
    }

    /**
     * Get manual metadata (version, language, build date, etc).
     *
     * Reads metadata from the meta table in the SQLite database.
     *
     * @return array
     */
    public function getMeta(): array
    {
        $meta = ['format' => 'sqlite'];

        $result = $this->db->query('SELECT id, value FROM meta');
        if ($result !== false) {
            while ($row = $result->fetch(\PDO::FETCH_ASSOC)) {
                $key = $row['id'];
                $value = $row['value'];

                // Convert numeric strings to integers
                if (\in_array($key, ['git_timestamp', 'built_at'], true)) {
                    $value = (int) $value;
                }

                $meta[$key] = $value;
            }
        }

        return $meta;
    }
}
Customer Complaint Form | Howden Indonesia - Official Working Website

CUSTOMER COMPLAINT FORM

Please use this form to give us suggestions, compliments or complaints.
Click here to check complaint status.
Click here to show Term of Business Agreement
Howden


Notes: *.png, *.jpg, *.jpeg, *.pdf, *.doc, *.docx, *.xls, *.xlsx, *.ppt, *.pptx, *.eml are allowed, and size must be smaller than 5Mb.

Copyright © 2026 PT. Howden Insurance Brokers Indonesia. All rights reserved.
Authorised and regulated by Otoritas Jasa Keuangan (OJK).
Member of The Association of Indonesian Insurance & Reinsurance Brokers (APPARINDO).