Potatoe Potatoe is a PHP7.0 Library
Dependencies
On Debian Systems version >= stretch mandatory PHP >= 7.0
apt-get install php
optional apache2 mysql postgres libapache2-mod-php7.x
apt-get install apache2 mysqp postgresql-9.3 libapache2-mod-php
Installation
Best done with composer
composer require holgersielaff/potatoe
After this, you can set some custom params with
cd vendor/holgersielaff/potatoe && php install.php
If you want to have the latest snapshot
git clone https://github.com/holgersielaff/potatoe
\Potatoe\AutoDBRec
A Database Abstraction that can be called very easy
Including:
- Paging
- Searching
Example
Init \Potatoe\AutoDBRec::factory($options); Execute Get an array of Database objects:
\Potatoe\AutoDBRec::newArray("SELECT foo, bar FROM baz");
Get only one object (first one if multiple)
\Potatoe\AutoDBRec::newRec("SELECT foo, bar FROM baz WHERE id = 1");
\Potatoe\HKP
Ein HKP Server für PHP.
Folgende Treiber sind verfügbar:
- GPG (testing)
- LDAP (unstable)
- Postgres (dev)
- MySQL (dev)
Mit Driver GPG auf lokales ./gnupg
$config = new \Potatoe\HKP\Config\GPG([
'POTATOE_PGP_HOME' => '~/.gnupg'
]);
// 0.0.0.0 für broadcast
$server = new \Potatoe\HKP(\Potatoe\HKP::DRIVER_GPG, $config);
$server->server(8080, '127.0.0.1');
Mit Driver LDAP auf LDAP Server
$config = new \Potatoe\HKP\Config\LDAP([
'POTATOE_LDAP_HOST' => '192.168.0.1',
'POTATOE_LDAP_BIND_DN' => 'a=dmin,r=dn',
'POTATOE_LDAP_BIND_PASS' => '*****',
'POTATOE_LDAP_BASE_DN' => 'p=ath,t=o,b=ase'
]);
$server = new \Potatoe\HKP(\Potatoe\HKP::DRIVER_LDAP, $config);
// 0.0.0.0 für broadcast
$server->server(8080, '127.0.0.1');
Als webserver script das ganze mit
$server->apache();
statt
$server->server(...)