@@ -37,7 +37,7 @@ public function get_filename() {
3737 * @param string $filename MO file to load
3838 * @return bool True if the import from file was successful, otherwise false.
3939 */
40- function import_from_file ( $ filename ) {
40+ public function import_from_file ( $ filename ) {
4141 $ reader = new POMO_FileReader ( $ filename );
4242
4343 if ( ! $ reader ->is_resource () ) {
@@ -53,7 +53,7 @@ function import_from_file( $filename ) {
5353 * @param string $filename
5454 * @return bool
5555 */
56- function export_to_file ( $ filename ) {
56+ public function export_to_file ( $ filename ) {
5757 $ fh = fopen ( $ filename , 'wb ' );
5858 if ( ! $ fh ) {
5959 return false ;
@@ -66,7 +66,7 @@ function export_to_file( $filename ) {
6666 /**
6767 * @return string|false
6868 */
69- function export () {
69+ public function export () {
7070 $ tmp_fh = fopen ( 'php://temp ' , 'r+ ' );
7171 if ( ! $ tmp_fh ) {
7272 return false ;
@@ -80,7 +80,7 @@ function export() {
8080 * @param Translation_Entry $entry
8181 * @return bool
8282 */
83- function is_entry_good_for_export ( $ entry ) {
83+ public function is_entry_good_for_export ( $ entry ) {
8484 if ( empty ( $ entry ->translations ) ) {
8585 return false ;
8686 }
@@ -96,7 +96,7 @@ function is_entry_good_for_export( $entry ) {
9696 * @param resource $fh
9797 * @return true
9898 */
99- function export_to_file_handle ( $ fh ) {
99+ public function export_to_file_handle ( $ fh ) {
100100 $ entries = array_filter ( $ this ->entries , array ( $ this , 'is_entry_good_for_export ' ) );
101101 ksort ( $ entries );
102102 $ magic = 0x950412de ;
@@ -157,7 +157,7 @@ function export_to_file_handle( $fh ) {
157157 * @param Translation_Entry $entry
158158 * @return string
159159 */
160- function export_original ( $ entry ) {
160+ public function export_original ( $ entry ) {
161161 // TODO: Warnings for control characters.
162162 $ exported = $ entry ->singular ;
163163 if ( $ entry ->is_plural ) {
@@ -173,15 +173,15 @@ function export_original( $entry ) {
173173 * @param Translation_Entry $entry
174174 * @return string
175175 */
176- function export_translations ( $ entry ) {
176+ public function export_translations ( $ entry ) {
177177 // TODO: Warnings for control characters.
178178 return $ entry ->is_plural ? implode ( "\0" , $ entry ->translations ) : $ entry ->translations [0 ];
179179 }
180180
181181 /**
182182 * @return string
183183 */
184- function export_headers () {
184+ public function export_headers () {
185185 $ exported = '' ;
186186 foreach ( $ this ->headers as $ header => $ value ) {
187187 $ exported .= "$ header: $ value \n" ;
@@ -193,7 +193,7 @@ function export_headers() {
193193 * @param int $magic
194194 * @return string|false
195195 */
196- function get_byteorder ( $ magic ) {
196+ public function get_byteorder ( $ magic ) {
197197 // The magic is 0x950412de.
198198
199199 // bug in PHP 5.0.2, see https://savannah.nongnu.org/bugs/?func=detailitem&item_id=10565
@@ -214,7 +214,7 @@ function get_byteorder( $magic ) {
214214 * @param POMO_FileReader $reader
215215 * @return bool True if the import was successful, otherwise false.
216216 */
217- function import_from_reader ( $ reader ) {
217+ public function import_from_reader ( $ reader ) {
218218 $ endian_string = MO ::get_byteorder ( $ reader ->readint32 () );
219219 if ( false === $ endian_string ) {
220220 return false ;
@@ -311,7 +311,7 @@ function import_from_reader( $reader ) {
311311 * 0x00 as a plural translations separator
312312 * @return Translation_Entry Entry instance.
313313 */
314- function &make_entry ( $ original , $ translation ) {
314+ public function &make_entry ( $ original , $ translation ) {
315315 $ entry = new Translation_Entry ();
316316 // Look for context, separated by \4.
317317 $ parts = explode ( "\4" , $ original );
@@ -335,14 +335,14 @@ function &make_entry( $original, $translation ) {
335335 * @param int $count
336336 * @return string
337337 */
338- function select_plural_form ( $ count ) {
338+ public function select_plural_form ( $ count ) {
339339 return $ this ->gettext_select_plural_form ( $ count );
340340 }
341341
342342 /**
343343 * @return int
344344 */
345- function get_plural_forms_count () {
345+ public function get_plural_forms_count () {
346346 return $ this ->_nplurals ;
347347 }
348348 }
0 commit comments