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

From: Date: Sat, 01 Nov 2014 16:43:19 +0000
Subject: Doc #68337 [NEW]: Object-Oriented version of finfo is not properly documented
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-11600@lists.php.net to get a copy of this message
From: teo8976 at gmail dot com Operating system: PHP version: Irrelevant Package: Documentation problem Bug Type: Documentation Problem Bug description:Object-Oriented version of finfo is not properly documented 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 bug report at https://bugs.php.net/bug.php?id=68337&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=68337&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=68337&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=68337&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=68337&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=68337&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=68337&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=68337&r=needscript Try newer version: https://bugs.php.net/fix.php?id=68337&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=68337&r=support Expected behavior: https://bugs.php.net/fix.php?id=68337&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=68337&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=68337&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=68337&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=68337&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=68337&r=dst IIS Stability: https://bugs.php.net/fix.php?id=68337&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=68337&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=68337&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=68337&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=68337&r=mysqlcfg

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