Download the PHP package c00/common without Composer

On this page you can find all versions of the php package c00/common. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

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

A mini framework for common challenges such as database querying (ORM), dependency injection and date manipulation.

This is simply a personal usage toolkit that exists here for 2 reasons:

The Query Builder class is tested quite well. Not every SQL use case is covered, but the basic needs such as selects, joins, where, order by, group, max, avg, count are all covered.

Documentation

This wil fill up slowly. I'm currently documenting the most important Features. But feel free to send me messages about something missing and I will expand. Feedback will motivate me to expand on this package.

It's currently still in Beta, tho I've the ORM portion extensively in a few different projects. Tests do cover most of the functionality.

ORM - Super simple Database mappings

The ORM portion allows you to map Objects to the database with minimal setup. Objects just need to extend AbstractDatabaseObject. You can now save and query the database.

When just extending AbstractDatabaseObject without any extra setup, it will read and write to a database table of your choosing, mapping columns on property names. With a little setup it will use mapping of your choosing (including casting to your own objects). If that's still not enough you can override the toArray() and fromArray() functions to do the work yourself. (But that kind of defeats the purpose of having an ORM.)

Examples are found in the showAndTell folder. Short versions are found below:

Example 1: Get all users from the database

Example 2: Get one user from the database

Example 3: Insert a user to the database

Database - Easy and safe Database communications

Connect to a MySQL / MariaDB database with PDO. Using the Querybuilder ensures proper prepared statements.

Docs coming soon...

Qry - The querybuilder

A Querybuilder that aims to stay as close to SQL as possible to minimize the learning curve. Automatically prepares your statements for you.

Automatically converts your objects to database-ready arrays and vice-versa.

Docs coming soon...

CovleDate - Date comparisons and casting

Docs coming soon...

Settings - Easy setting saving and loading to a JSON file.

Docs coming soon...

Dependencies - Simple dependency injection with type hinting

Docs coming soon...

Todo:

QueryBuilder

License - MIT

So do whatever you want with it.


All versions of common with dependencies

PHP Build Version
Package Version
No informations.
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 c00/common contains the following files

Loading the files please wait ....