Doc #68337 [Opn->Csd]: Object-Oriented version of finfo is not properly documented

From: Date: Mon, 03 Nov 2014 11:55:05 +0000
Subject: Doc #68337 [Opn->Csd]: Object-Oriented version of finfo is not properly documented
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-11602@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=68337&edit=1 ID: 68337 Updated by: aharvey@php.net Reported by: teo8976 at gmail dot com Summary: Object-Oriented version of finfo is not properly documented -Status: Open +Status: Closed Type: Documentation Problem Package: Documentation problem PHP Version: Irrelevant -Assigned To: +Assigned To: aharvey Block user comment: N Private report: N New Comment: This bug has been fixed in the documentation's XML sources. Since the online and downloadable versions of the documentation need some time to get updated, we would like to ask you to be a bit patient. Thank you for the report, and for helping us make our documentation better. Previous Comments: ------------------------------------------------------------------------ [2014-11-03 11:55:00] aharvey@php.net Automatic comment from SVN on behalf of aharvey Revision: http://svn.php.net/viewvc/?view=revision&revision=335155 Log: Add OO documentation for finfo. Fixes doc bug #68337 (Object-Oriented version of finfo is not properly documented). ------------------------------------------------------------------------ [2014-11-01 16:43:18] teo8976 at gmail dot com Description: ------------ --- From manual page: http://www.php.net/function.finfo-open --- Figuring out the interface of the Finfo class is ridiculously cumbersome. It's left to the reader's educated guesses. For comparison, have a look at how other classes are documented: http://es1.php.net/manual/en/class.mysqli.php http://es1.php.net/manual/en/class.simplexmlelement.php There's no such kind of documentation for the Finfo class. At http://php.net/manual/en/book.fileinfo.php it is not even mentioned that it exists as a class. The sections of the documentation include a "Fileinfo functions" section and nothing about the Finfo class. At first sight, one couldn't even tell there exists an Object-Oriented API at all! Then only by browsing the function reference, you find out that there exists an object oriented API, as all functions are presented like this: Procedural style: string finfo_file ( resource $finfo , string $file_name = NULL [, int $options = FILEINFO_NONE [, resource $context = NULL ]] ) Object oriented style: public string finfo::file ( string $file_name = NULL [, int $options = FILEINFO_NONE [, resource $context = NULL ]] ) So that allows me to figure out that there exists a Finfo class. If, however, I want to look for a reference for that class, I have a hard time finding out information. There's no reference page for that class (or if there is one, it's hidden somewhere). In order to find out the documentation of its constructor, I have to GUESS that the constructor is the OO-equivalent of the function finfo_open(). If I want a list of method of the class I have to build it myself by looking at the list of functions, browse the documentation page of each one of them to see its corresponding method in the finfo class. This is pathetic. It even discourages Object Oriented programming which should instead be encouraged. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=68337&edit=1

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