Download the PHP package wscore/dbaccess without Composer

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

ScoreDB

A simple Database Access Manager and Data Access Object class.

This package provides a quick access for

license

MIT License

Sample Usage

configuration

Uses static class as a gateway (aka facade) to database manager ( class).

Use method to configure the db connection.

Please refer to Aura/Sql components for details of the each configuration.

Specify in the configuration to connect to different databases for reading and writing.

get connection (i.e. Pdo)

getting the Pdo object for db connection. The in Aura/Sql is returned.

returns the connection for reading if write connection is not set.

get named connection

Configure different database connection using names.

Querying Database

Use to get a query object to access database. Please refer to ScoreSql to find out how to manipulate the query.

The maybe omitted if the default connection is used.

EntityObject

As default, the Dao object returns the found database record as class. This class has a reference to the Dao object to provide many useful functions while keeping the code base to a minimum size.

some functions are:

ActiveRecord

Dao can return object as ActiveRecord class, as

The ActiveRecord class will provide more functions added to the EntityObject described above, such as,

Data Access Object

sample dao class

Extend class.

table name and primary key

specify table name as , and primary key name as .

If these are not set, class name is used as table name, and is used as key name.

timestamps

Use to indicate stamps: for at the creation of data, and for updating and creation time.

Specify the date format if different

using DaoTrait

alternatively, use DaoTrait to create dao object using other query class. as such,

accessing database

Use $dao object just like a Query object in WScore.SqlBuilder.

selecting:

or use $dao object as an iterator.

updating:

or,

inserting:

or,

Scopes and Events in Dao

scopes

Scopes are functions starting with . In the scope function, influence the query to get what is desired.

hooks

Hook methods starts with , event name, and end with .

filters

Filter methods starts with , event name, and end with .

Filters are for modifying the input or output; make very sure that filters return what is given (or modified value) or nothing will happen.

hook objects

The Dao class may become too large with lots of scopes and event hooks. To simplify the dao class, these methods can be transferred to another object (hook object) using method, such as:

available events

whenever accessing database, start with , and followed by .

hidden (or already used) events:

for adding timestamps to data when inserting or updating data.

Relation

ScoreDB provides simple relationship classes as,

Using Relation

In your Dao class, create methods like'

to set new relation,

WISHES WISHES WISHES

transaction

for transaction, use the Pdo (ExtendedPdo)'s transaction method.


All versions of dbaccess with dependencies

PHP Build Version
Package Version
Requires aura/sql Version 4.*
psr/log Version ~1.0
wscore/scoresql Version 0.2.*
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 wscore/dbaccess contains the following files

Loading the files please wait ....