true, 'client_version' => true, 'connect_errno' => true, 'connect_error' => true, 'errno' => true, 'error' => true, ); protected $connected_readable = array( 'affected_rows' => true, 'error_list' => true, 'field_count' => true, 'host_info' => true, 'info' => true, 'insert_id' => true, 'server_info' => true, 'server_version' => true, 'stat' => true, 'sqlstate' => true, 'protocol_version' => true, 'thread_id' => true, 'warning_count' => true, ); public function getTypes() { return array('object'); } public function getTriggers() { return Parser::TRIGGER_COMPLETE; } public function parse(&$var, BasicObject &$o, $trigger) { if (!$var instanceof Mysqli) { return; } $connected = 0 === $var->connect_errno && \is_string($var->stat); foreach ($o->value->contents as $key => $obj) { if (!isset($this->always_readable[$obj->name]) && !($connected && $this->connected_readable[$obj->name])) { continue; } if ('null' !== $obj->type) { continue; } $param = $var->{$obj->name}; if (null === $param) { continue; } $base = BasicObject::blank($obj->name, $obj->access_path); $base->depth = $obj->depth; $base->owner_class = $obj->owner_class; $base->operator = $obj->operator; $base->access = $obj->access; $base->reference = $obj->reference; $o->value->contents[$key] = $this->parser->parse($param, $base); } } }