PHP utility collection with hybrid and fluent APIs.

⌈⌋ branch:  hybrid7 libraries


Update of "hybrid7 libraries"

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview

Artifact ID: 2df70c7f7722251e060bfe7cc8dba988ebaa9da1
Page Name:hybrid7 libraries
Date: 2015-01-15 03:03:34
Original User: mario
Mimetype:text/x-markdown
Parent: dc6dcb1844296af3b9f0f0bb22fb6a4acef97a98
Content

hybrid7 libraries

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

  • input wraps PHP superglobal input vars with on-the-spot filtering backends.

      print $_REQUEST->text->spaces->html["content"]
    
  • db provides a convenient wrapper and complex array placeholders atop PDO.

      db("UPDATE tbl SET :, WHERE :&", $newdata, $keys)->rowCount();
    
  • curl adds a fluent and prefix-free API onto curl and curl_multi.

      curl($url)->post(1)->postfields($data)->exec();
    
  • logStruck is an experimental struct-logging backend, with Ruby-style :token params.

      ł(':warn', ':auth', "Permission denied", $userObj, ':backtrace');
    
  • template was a concept for plainer ties between application code and output logic. (obsolete, unused)

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

The repo name "hybrid7" alludes to the previous project name (overcome by "events" ;) 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 hybrid title, I don't feel like reinventing further wheels here.

Some subprojects that originated in this context, like shared.phar, have been externalized already. The log module might be suitable as independent project as well.