]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-includes/pomo/streams.php
WordPress 4.3
[autoinstalls/wordpress.git] / wp-includes / pomo / streams.php
index 8e50ab4eac57914bbe1f6aa6de9492f087ca100b..1b6b2282bb396362793cce8faf269b59a711b14d 100644 (file)
@@ -14,11 +14,21 @@ class POMO_Reader {
        var $endian = 'little';
        var $_post = '';
 
-       function POMO_Reader() {
+       /**
+        * PHP5 constructor.
+        */
+       function __construct() {
                $this->is_overloaded = ((ini_get("mbstring.func_overload") & 2) != 0) && function_exists('mb_substr');
                $this->_pos = 0;
        }
 
+       /**
+        * PHP4 constructor.
+        */
+       public function POMO_Reader() {
+               self::__construct();
+       }
+
        /**
         * Sets the endianness of the file.
         *
@@ -101,15 +111,23 @@ class POMO_Reader {
                }
        }
 
-
+       /**
+        * @return int
+        */
        function pos() {
                return $this->_pos;
        }
 
+       /**
+        * @return true
+        */
        function is_resource() {
                return true;
        }
 
+       /**
+        * @return true
+        */
        function close() {
                return true;
        }
@@ -122,11 +140,18 @@ class POMO_FileReader extends POMO_Reader {
        /**
         * @param string $filename
         */
-       function POMO_FileReader($filename) {
+       function __construct( $filename ) {
                parent::POMO_Reader();
                $this->_f = fopen($filename, 'rb');
        }
 
+       /**
+        * PHP4 constructor.
+        */
+       public function POMO_FileReader( $filename ) {
+               self::__construct( $filename );
+       }
+
        /**
         * @param int $bytes
         */
@@ -146,18 +171,30 @@ class POMO_FileReader extends POMO_Reader {
                return true;
        }
 
+       /**
+        * @return bool
+        */
        function is_resource() {
                return is_resource($this->_f);
        }
 
+       /**
+        * @return bool
+        */
        function feof() {
                return feof($this->_f);
        }
 
+       /**
+        * @return bool
+        */
        function close() {
                return fclose($this->_f);
        }
 
+       /**
+        * @return string
+        */
        function read_all() {
                $all = '';
                while ( !$this->feof() )
@@ -176,12 +213,22 @@ class POMO_StringReader extends POMO_Reader {
 
        var $_str = '';
 
-       function POMO_StringReader($str = '') {
+       /**
+        * PHP5 constructor.
+        */
+       function __construct( $str = '' ) {
                parent::POMO_Reader();
                $this->_str = $str;
                $this->_pos = 0;
        }
 
+       /**
+        * PHP4 constructor.
+        */
+       public function POMO_StringReader( $str = '' ) {
+               self::__construct( $str );
+       }
+
        /**
         * @param string $bytes
         * @return string
@@ -203,10 +250,16 @@ class POMO_StringReader extends POMO_Reader {
                return $this->_pos;
        }
 
+       /**
+        * @return int
+        */
        function length() {
                return $this->strlen($this->_str);
        }
 
+       /**
+        * @return string
+        */
        function read_all() {
                return $this->substr($this->_str, $this->_pos, $this->strlen($this->_str));
        }
@@ -219,13 +272,23 @@ if ( !class_exists( 'POMO_CachedFileReader' ) ):
  * Reads the contents of the file in the beginning.
  */
 class POMO_CachedFileReader extends POMO_StringReader {
-       function POMO_CachedFileReader($filename) {
+       /**
+        * PHP5 constructor.
+        */
+       function __construct( $filename ) {
                parent::POMO_StringReader();
                $this->_str = file_get_contents($filename);
                if (false === $this->_str)
                        return false;
                $this->_pos = 0;
        }
+
+       /**
+        * PHP4 constructor.
+        */
+       public function POMO_CachedFileReader( $filename ) {
+               self::__construct( $filename );
+       }
 }
 endif;
 
@@ -234,8 +297,19 @@ if ( !class_exists( 'POMO_CachedIntFileReader' ) ):
  * Reads the contents of the file in the beginning.
  */
 class POMO_CachedIntFileReader extends POMO_CachedFileReader {
-       function POMO_CachedIntFileReader($filename) {
+       /**
+        * PHP5 constructor.
+        */
+       public function __construct( $filename ) {
                parent::POMO_CachedFileReader($filename);
        }
+
+       /**
+        * PHP4 constructor.
+        */
+       function POMO_CachedIntFileReader( $filename ) {
+               self::__construct( $filename );
+       }
 }
-endif;
\ No newline at end of file
+endif;
+