PHP utility collection with hybrid and fluent APIs.

⌈⌋ ⎇ branch:  hybrid7 libraries


Artifact [c2837c9ce6]

Artifact c2837c9ce60e37f5bcc357431fe42232d61f7000:

Wiki page [hybrid7 libraries] by mario 2015-01-05 20:35:29.
D 2015-01-05T20:35:29.190
L hybrid7\slibraries
N text/x-markdown
P 4192ee792071b1d14f2e2b875c518d8abc0d77f0
U mario
W 1585
<h3> hybrid7 libraries </h3>

This repository contains a few asorted components for common PHP tasks, which follow a more hybrid/fluent interface approach.

  *  [input](wiki/input) wraps PHP superglobal input vars with on-the-spot filtering backends.<br>

          print $_REQUEST->text->spaces->html["content"]

  *  [db](wiki/db) provides a convenient wrapper and complex array placeholders atop PDO.<br>
      
          db("UPDATE tbl SET :, WHERE :&", $newdata, $keys)->rowCount();

  *  [curl](wiki/curl) adds a fluent and conveniently prefix-free API onto curl and curl_multi.

          curl($url)->post(1)->postfields($data)->exec();

  *  [log](wiki/log) is an experimental struct-logging backend, with Ruby-style :token params.

          Å‚(':warn', ':auth', "Permission denied", $userObj, ':backtrace');

  *  [template](wiki/template) was a concept for plainer ties between application code and output logic. <small>(obsolete, unused)</small>

          include(template("forum/entry", $vars));

The repo name "hybrid7" alludes to the previous project name (<i>overcome by "events"</i> ;) and the original intend to have at least 7 reusable/universal components. However unless it provides a sufficient benefit over existing code or warrants the <em>hybrid</em> title, I don't feel like reinventing further wheels here.

Some subprojects that originated in this context, like [shared.phar](https://fossil.include-once.org/canonic_autoloader), have been externalized already. The [log] module might be suitable as independent project as well.

Z df0eac7d074e2f0fe1f780d195988002