svn: /web/doc-editor/trunk/php/ class.php

From: Date: Wed, 11 Nov 2009 21:51:12 +0000
Subject: svn: /web/doc-editor/trunk/php/ class.php
Groups: php.doc.web 
Request: Send a blank email to doc-web+get-1151@lists.php.net to get a copy of this message
yannick Wed, 11 Nov 2009 21:51:12 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=290554 Log: Remove getFileEncoding's method from class.php. This method is present in File.php as getEncoding's method Changed paths: U web/doc-editor/trunk/php/class.php Modified: web/doc-editor/trunk/php/class.php =================================================================== --- web/doc-editor/trunk/php/class.php 2009-11-11 21:50:30 UTC (rev 290553) +++ web/doc-editor/trunk/php/class.php 2009-11-11 21:51:12 UTC (rev 290554) @@ -734,32 +734,6 @@ } /** - * Get encoding of a file, regarding his XML's header. - * - * @param $file The file to get encoding from. - * @param $mode The mode. Must be 'file' if $file is a path to the file, or 'content' if $file is the content of the file. - * @return The charset as a string. - */ - function getFileEncoding($file, $mode) { - - if ($mode == 'file' ) { - $txml = file_get_contents($file); - } else { - $txml = $file; - } - - $txml = preg_replace('/\\s+/', ' ', $txml); - - $match = array(); - preg_match('!<\?xml(.+)\?>!U', $txml, $match); - $xmlinfo = $this->revParseAttrString($match); - - $charset = (isset($xmlinfo[1]['encoding'])) ? strtolower($xmlinfo[1]['encoding']) : 'iso-8859-1'; - - return $charset; - } - - /** * Get the content of a file. * * @param $FilePath The path of the file.

« previous php.doc.web (#1151) next »