Download the PHP package christianklisch/ckdb without Composer

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

CKDB v. 0.2.1

CKDB is a key-object flat file database for php scripts

Use it:

Features:

Installation

You can install the script manually using the require method:

Deploying

Include the script in your project either with Composer or via the manual require method and create a new instance of the class, using the appropriate parameters if needed:

Configure

Set:

Configure your data model

The following defined class properties will be added to database index.

Define ONE primary key for each class in array:

Define foreign keys which you want to use in selection and order functions. Each array value is one field in entitiy 'User':

Define referenced classes for properties. Instead of object primary key will be saved in database index. If you don't define referenced classes, subclasses will not be saved as own database record and are not searchable by own repository. In this example the field 'homeaddress' referenced to entities of class 'Address':

Use CKDB Database

Default functions

Persist an object with:

Referenced objects will be persist automatically. After changing your object you have to persist it.

Delete an object with:

Object is identified by type of class and defined primary key! Don't change primary keys!

Reindex database

To rebuild the whole index per entity class use the reIndex()-function;

Method should be called after much changes on index properties or object deletions. Don't call it on time critical processes.

Search

To search for one or more stored objects you should use a repository:

CKDB provides following methods to find entities after calling find() of repository:

Furthermore you can sort the results with the sortBy()-method of repository.

Example selection:

This selection searches in field 'firstname' for 'George' with an 'age' older than 50 years (greater than = gt). The users should be sordet descending. The getResult()-method returns an array of found objects in database.

Search in value list with in() and select all Martins and Georges:

Search in object list with in() and match entries in other array list (i.E. all childs of fathers named Mo Miller):

Sort

The sortBy()-method sort the results before returning them. The first parameter defines the sort-field, the second the sort order. You can sort:

Example

Select all users older than 50 years and sort by age descending.

Todos

Contributors

Copyright and license

Copyright 2014 Christian Klisch, released under the Apache license.


All versions of ckdb with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.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 christianklisch/ckdb contains the following files

Loading the files please wait ....