PHP Classes

New version of PHP Prefixer are available - SI Prefix Converter package blog

Recommend this page to a friend!
  All package blogs All package blogs   SI Prefix Converter SI Prefix Converter   Blog SI Prefix Converter package blog   RSS 1.0 feed RSS 2.0 feed   Blog New version of PHP Pr...  
  Post a comment Post a comment   See comments See comments (0)   Trackbacks (0)  

Author:

Updated on: 2021-10-20

Posted on: 2021-10-20

Viewers: 5 (October 2021)

Package: SI Prefix Converter

Preparing the upload of the 1.1 version of the PHP Prefix class to PHP Classes, the two main changes are that you can simply call the construct with the List of Prefixes (LOP) name -don't care the base-; and when using get_number(), now you can get number from strings like "K"




Loaded Article

I'm preparing a new release for the library. It's my first time managing git repositories. I uploaded the code to SourceForge, from the first version (1.0) to the current version (1.1).

You can download the 1.1 version, are slightly compatibly backwards with the 1.0, there are the main changes:

- Private properties were changed to protected

- The class constructor was modified to allow the next 2 items:

1. Each List of prefixes (LOP) file now store also the base and limit values, and can be loaded from (and were modified to do this) - (and, to be used in the next version, the default stepping, scale).

2. Added the constant sci_def_set, to allow select the default base and limit values; comes from. (from the settings file or from the LOP file)

The function get_number() now can accept values like "K" (without coefficient, assuming it as 1).

When you want to use the class with binary prefixes, you don't need anymore the use of
new sci('binary_short',2,0,40)

You can simply instantiate it as new sci('binary_short').




You need to be a registered user or login to post a comment

Login Immediately with your account on:

FacebookGmail
HotmailStackOverflow
GitHubYahoo


Comments:

No comments were submitted yet.




  Post a comment Post a comment   See comments See comments (0)   Trackbacks (0)  
  All package blogs All package blogs   SI Prefix Converter SI Prefix Converter   Blog SI Prefix Converter package blog   RSS 1.0 feed RSS 2.0 feed   Blog New version of PHP Pr...  
For more information send a message to info at phpclasses dot org.