Download the PHP
package hdgarau/common without Composer
On this page you can find all versions of the php package
hdgarau/common. It is possible to download/install
these versions without Composer. Possible dependencies are resolved
automatically.
Vendor hdgarau Package common Short Description Common Functions License
FAQ
After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.
Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.
In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories.
In this case some credentials are needed to access such packages.
Please use the auth.json textarea to insert credentials, if a package is coming from a private repository.
You can look here for more information.
Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
To use Composer is sometimes complicated. Especially for beginners.
Composer needs much resources. Sometimes they are not available on a simple webspace.
If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?
Informations about the package common
common
Description
Library with basics Classes.
Index
Date
Parse
Functions
1. Date
Period
Description
Is a class with static methods. That one return a date (type \Datetime) from a date and period indicated.
Some options are:
days
weeks
months
years
weekBegin (first previous Monday)
weekDay (first previous [day])
monthLastDay
getByCode (ConstantClassCode + ' ' + param)
Examples
Period::days(-3)->format('Y-m-d')); //three days ago
Period::setDefault('1985-02-15');
Period::getByCode('D 5')->format('Y-m-d'); //1985-02-20
Parse
Description
Parse a string to object by a token then It generates Entity and EntityGroup objects. Each entityGroup object has a property level.
that indicates if it is contained for the previous one or a child has finished.
For example if we parse de parenthesis for "That is a test (just a simple (very) test) to do":
EntityGroup (level:0) - entities:
Entity (content:"That is a test")
EntityGroup (level:1) - entities:
Entity (content:"just a simple")
EntityGroup: (level:2) - entities:
Entity: (content:"very")
Entity: (content:"test")
Entity: (content:"to do")
You can return to build the original string with casting (string)
Example
$str = '( this is a ( Complex (test) Resource ) and (his (1(2,2b(3)2c)1 ) brother) something)';
$oParsedParenthesis = StringParse::strToParsedGroupParenthesis($str );
print_r($oParsedParenthesis); //print object
echo (string) $oParsedParenthesis; // reverse to string
Composer command for our command line client (download client)This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free.Standard composer command
The package hdgarau/common contains the following files
Loading the files please wait ....
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.