holgersielaff/potatoe

A small PHP 7.0 Framework

Installs: 30

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Type:php-framework

1.1.6 2018-08-16 15:57 UTC

This package is not auto-updated.

Last update: 2021-01-23 10:34:59 UTC


README

logo.svg

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:

  1. GPG (testing)
  2. LDAP (unstable)
  3. Postgres (dev)
  4. 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(...)