2017 © Pedro Peláez
 

library connection

Simple library for support storage connections

image

alxmsl/connection

Simple library for support storage connections

  • Wednesday, February 17, 2016
  • by alxmsl
  • Repository
  • 1 Watchers
  • 2 Stars
  • 250 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 5 Forks
  • 1 Open issues
  • 20 Versions
  • 0 % Grown

The README.md

Connection

License Latest Stable Version Total Downloads, (*1)

Simple set of classes for support some connections. At this moment library supports:, (*2)

Predis usage example

use alxmsl\Connection\Predis\PredisFactory;

// Create Redis Client instance with you configuration settings
$Redis = PredisFactory::createPredisByConfig(array(
    'host' => 'localhost',
    'port' => 6379,
));

// Use Redis commands
$Redis->set('test', '7');
var_dump($Redis->get('test'));

Redis usage example (phpredis)

use alxmsl\Connection\Redis\RedisFactory;

// Create Redis Client instance with you configuration settings
$Redis = RedisFactory::createRedisByConfig(array(
    'host' => 'localhost',
    'port' => 6379,
));

// Use Redis commands
$Redis->set('test', '7');
var_dump($Redis->get('test'));

Postgres usage example

use alxmsl\Connection\Postgresql\Connection;

// Create connection
$Connection = new Connection();
$Connection->setUserName('postgres')
    ->setPassword('postgres')
    ->setDatabase('postgres')
    ->setHost('localhost')
    ->setPort(5432);

// Connect and ...
$Connection->connect();

// ..query needed data
$Result = $Connection->query('select * from "pg_class"', null);
$Data = $Result->getResult();
var_dump($Data[0]);

// ..query data with parameters
$Result = $Connection->query('select count(*) from {{ tbl(table) }}', array(
    'table' => 'pg_class',
));
$Data = $Result->getResult();
var_dump($Data);

Contributing

I welcome any help in developing this project. I accept contributions as pull requests. Finally, I kindly ask that you add your tests and document all changes in library behavior/corrections. You are welcome to add copyright notices with your name/nickname and email in all files, that you change, (*3)

License

Copyright 2015-2016 Alexey Maslov alexey.y.maslov@gmail.com, (*4)

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at, (*5)

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License., (*6)

The Versions

17/02 2016

dev-master

9999999-dev

Simple library for support storage connections

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

by Avatar alxmsl

postgresql postgres redis predis phpredis

07/02 2016

dev-consul

dev-consul

Simple library for support storage connections

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

by Avatar alxmsl

postgresql postgres redis predis phpredis

07/02 2016

v2.0.0

2.0.0.0

Simple library for support storage connections

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

by Avatar alxmsl

postgresql postgres redis predis phpredis

06/02 2016

dev-license

dev-license

Simple library for support storage connections

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

by Avatar alxmsl

postgresql postgres redis predis phpredis

13/12 2015

v1.2.2

1.2.2.0

Simple library for support storage connections

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

by Avatar alxmsl

postgresql postgres redis predis phpredis

09/12 2015

v1.2.1

1.2.1.0

Simple library for support storage connections

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

by Avatar alxmsl

postgresql postgres redis predis phpredis

30/11 2015

dev-tests

dev-tests

Simple library for support storage connections

  Sources   Download

Apache-2.0

The Requires

 

by Avatar alxmsl

postgresql postgres redis predis phpredis

30/11 2015

v1.2.0

1.2.0.0

Simple library for support storage connections

  Sources   Download

Apache-2.0

The Requires

 

by Avatar alxmsl

postgresql postgres redis predis phpredis

30/10 2015

v1.1.5

1.1.5.0

Simple library for support storage connections

  Sources   Download

WTFPL

The Requires

 

by Avatar alxmsl

postgresql postgres redis predis phpredis

29/10 2015

v1.1.4

1.1.4.0

Simple library for support storage connections

  Sources   Download

WTFPL

The Requires

 

by Avatar alxmsl

postgresql postgres redis predis phpredis

01/09 2015

v1.1.3

1.1.3.0

Simple library for support storage connections

  Sources   Download

WTFPL

The Requires

 

by Avatar alxmsl

postgresql postgres redis predis phpredis

09/03 2015

v1.1.2

1.1.2.0

Simple library for support storage connections

  Sources   Download

WTFPL

The Requires

 

by Avatar alxmsl

postgresql postgres redis predis phpredis

26/02 2015

v1.1.1

1.1.1.0

Simple library for support storage connections

  Sources   Download

WTFPL

The Requires

 

by Avatar alxmsl

postgresql postgres redis predis phpredis

25/02 2015

v1.1.0

1.1.0.0

Simple library for support storage connections

  Sources   Download

WTFPL

The Requires

 

by Avatar alxmsl

postgresql postgres redis predis phpredis

20/08 2014

v1.0.7

1.0.7.0

Simple library for support storage connections

  Sources   Download

WTFPL

by Avatar alxmsl

postgresql postgres redis

05/08 2014

v1.0.6

1.0.6.0

Simple library for support storage connections

  Sources   Download

WTFPL

by Avatar alxmsl

postgresql postgres redis

16/07 2014

v1.0.5

1.0.5.0

Simple library for support storage connections

  Sources   Download

WTFPL

by Avatar alxmsl

postgresql postgres redis

16/07 2014

v1.0.4

1.0.4.0

Simple library for support storage connections

  Sources   Download

WTFPL

by Avatar alxmsl

postgresql postgres redis

09/07 2014

v1.0.3

1.0.3.0

Simple library for support storage connections

  Sources   Download

WTFPL

by Avatar alxmsl

postgresql postgres redis

09/07 2014

v1.0.2

1.0.2.0

Simple library for support storage connections

  Sources   Download

WTFPL

by Avatar alxmsl