PMA\libraries\Table::getStatusInfo PHP 메소드

getStatusInfo() 공개 메소드

Returns full table status info, or specific if $info provided this info is collected from information_schema
public getStatusInfo ( string $info = null, boolean $force_read = false, boolean $disable_error = false ) : mixed
$info string specific information to be fetched
$force_read boolean read new rather than serving from cache
$disable_error boolean if true, disables error message
리턴 mixed
    public function getStatusInfo($info = null, $force_read = false, $disable_error = false)
    {
        $db = $this->_db_name;
        $table = $this->_name;
        if (!empty($_SESSION['is_multi_query'])) {
            $disable_error = true;
        }
        // sometimes there is only one entry (ExactRows) so
        // we have to get the table's details
        if ($this->_dbi->getCachedTableContent(array($db, $table)) == null || $force_read || count($this->_dbi->getCachedTableContent(array($db, $table))) == 1) {
            $this->_dbi->getTablesFull($db, $table);
        }
        if ($this->_dbi->getCachedTableContent(array($db, $table)) == null) {
            // happens when we enter the table creation dialog
            // or when we really did not get any status info, for example
            // when $table == 'TABLE_NAMES' after the user tried SHOW TABLES
            return '';
        }
        if (null === $info) {
            return $this->_dbi->getCachedTableContent(array($db, $table));
        }
        // array_key_exists allows for null values
        if (!array_key_exists($info, $this->_dbi->getCachedTableContent(array($db, $table)))) {
            if (!$disable_error) {
                trigger_error(__('Unknown table status:') . ' ' . $info, E_USER_WARNING);
            }
            return false;
        }
        return $this->_dbi->getCachedTableContent(array($db, $table, $info));
    }