Download the PHP package greg0/lazer-database without Composer

On this page you can find all versions of the php package greg0/lazer-database. 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 lazer-database

Lazer - php flat file database based on JSON files

Unit Current Version PHP Version Downloads

PHP Library to use JSON files like a database.
Functionality inspired by ORM's

Requirements

Installation

Easiest way to install Lazer Database is to use Composer. Of course you can use your own autoloader but you must configure it properly by yourself. You can find my Package on Packagist.org.

To add library to your dependencies, execute:

Tests

Easiest way to run unit tests is to use composer script

You can also use docker

Structure of table files

table_name.data.json - table file with data
table_name.config.json - table file with configuration

Basic Usage

First of all you should define constant LAZER_DATA_PATH containing absolute path to folder with JSON files:

Then set up namespace:

Methods

Chain methods
Ending methods

Create database

More information about field types and usage in PHPDoc

Remove database

Check if a database exists

Select

Multiple select

Single record select

Type ID of row in find() method.

You also can do something like that to get first matching record:

Insert

Do not set the ID.

Update

It's very smilar to Inserting.

You can also set many field by simple key-value array

Remove

Single record deleting

Multiple records deleting

Clear table

Relations

To work with relations use class Relation

Relation types

Methods

Chain methods
Ending methods

Create relation

Remove relation

Get relation information

You can do it by two ways. Use Standard Database class or Relation but results will be different.

Description

For some examples please check Tutorial file. More informations you can find in PHPDoc, I think it's documented very well.

E-mail: [email protected]

If you like and using/want to use my repo or you have any suggestions I will be greatful for sending me few words on e-mail.


All versions of lazer-database with dependencies

PHP Build Version
Package Version
Requires php Version ^7.1 || ^8.0
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 greg0/lazer-database contains the following files

Loading the files please wait ....