#49535 [Csd]: mysqli::get_client_info/get_client_version are properties

From: Date: Wed, 30 Sep 2009 08:56:45 +0000
Subject: #49535 [Csd]: mysqli::get_client_info/get_client_version are properties
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-2843@lists.php.net to get a copy of this message
ID: 49535 Updated by: abedford@php.net Reported By: the_djmaze at hotmail dot com Status: Closed Bug Type: Documentation problem Operating System: Linux PHP Version: Irrelevant Assigned To: abedford New Comment: Yes, you are right - it appears the mysqli->get_client_info() method is there - and what's more it works (according to my test code)! The question now I think is - should it be there, as the mysqli- >get_client_version() method does not seem to be there. So 1) Should these only exist as properties? 2) Should the mysqli->get_client_info() method really be there? 3) If the answer to 2) is yes, what about mysqli->get_client_version() method - why is it missing? I need some clarification on this - there is no point in documenting a method that shouldn't be there - on the other hand - if it should be there I need to document it and also the get_client_version method. Previous Comments: ------------------------------------------------------------------------ [2009-09-30 08:19:38] rquadling@php.net According to php.exe --rc mysqli on PHP 5.3.2-dev (cli) (built: Sep 24 2009 09:01:58), the methods are NOT static, but normal public functions. Class [ <internal:mysqli> class mysqli ] { - Constants [0] { } - Static properties [0] { } - Static methods [0] { } - Properties [17] { Property [ <default> public $affected_rows ] Property [ <default> public $client_info ] Property [ <default> public $client_version ] Property [ <default> public $connect_errno ] Property [ <default> public $connect_error ] Property [ <default> public $errno ] Property [ <default> public $error ] Property [ <default> public $field_count ] Property [ <default> public $host_info ] Property [ <default> public $info ] Property [ <default> public $insert_id ] Property [ <default> public $server_info ] Property [ <default> public $server_version ] Property [ <default> public $sqlstate ] Property [ <default> public $protocol_version ] Property [ <default> public $thread_id ] Property [ <default> public $warning_count ] } - Methods [40] { Method [ <internal:mysqli> public method autocommit ] { } Method [ <internal:mysqli> public method change_user ] { } Method [ <internal:mysqli> public method character_set_name ] { } Method [ <internal:mysqli> public method client_encoding ] { } Method [ <internal:mysqli> public method close ] { } Method [ <internal:mysqli> public method commit ] { } Method [ <internal:mysqli> public method connect ] { } Method [ <internal:mysqli> public method dump_debug_info ] { } Method [ <internal:mysqli> public method debug ] { } Method [ <internal:mysqli> public method get_charset ] { } Method [ <internal:mysqli> public method get_client_info ] { } Method [ <internal:mysqli> public method get_connection_stats ] { } Method [ <internal:mysqli> public method get_server_info ] { } Method [ <internal:mysqli> public method get_warnings ] { } Method [ <internal:mysqli> public method init ] { } Method [ <internal:mysqli> public method kill ] { } Method [ <internal:mysqli> public method multi_query ] { } Method [ <internal:mysqli, ctor> public method mysqli ] { } Method [ <internal:mysqli> public method more_results ] { } Method [ <internal:mysqli> public method next_result ] { } Method [ <internal:mysqli> public method options ] { } Method [ <internal:mysqli> public method ping ] { } Method [ <internal:mysqli> public method prepare ] { } Method [ <internal:mysqli> public method query ] { } Method [ <internal:mysqli> public method real_connect ] { } Method [ <internal:mysqli> public method real_escape_string ] { } Method [ <internal:mysqli> public method poll ] { } Method [ <internal:mysqli> public method reap_async_query ] { } Method [ <internal:mysqli> public method escape_string ] { } Method [ <internal:mysqli> public method real_query ] { } Method [ <internal:mysqli> public method rollback ] { } Method [ <internal:mysqli> public method select_db ] { } Method [ <internal:mysqli> public method set_charset ] { } Method [ <internal:mysqli> public method set_opt ] { } Method [ <internal:mysqli> public method stat ] { } Method [ <internal:mysqli> public method stmt_init ] { } Method [ <internal:mysqli> public method store_result ] { } Method [ <internal:mysqli> public method thread_safe ] { } Method [ <internal:mysqli> public method use_result ] { } Method [ <internal:mysqli> public method refresh ] { } } } ------------------------------------------------------------------------ [2009-09-29 15:39:26] the_djmaze at hotmail dot com So you mean they are static methods? Then the documentation was partial correct, the properties were just missing. ------------------------------------------------------------------------ [2009-09-28 16:13:19] rquadling@php.net According to reflection, there are both methods AND properties related to getting the client info in the mysqli class, but only a property in relation to the client version. The mysqli_driver class only has properties for client info and version. ------------------------------------------------------------------------ [2009-09-28 14:27:39] abedford@php.net Now fixed in the XML sources. Thanks! ------------------------------------------------------------------------ [2009-09-28 14:14:56] svn@php.net Automatic comment from SVN on behalf of abedford Revision: http://svn.php.net/viewvc/?view=revision&revision=288902 Log: Fixed bug #49535. client_version and client_info are properties, not methods. Corrected summary table accordingly, as well as main entries. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/49535 -- Edit this bug report at http://bugs.php.net/?id=49535&edit=1

« previous php.doc.bugs (#2843) next »