Common Tasks

sending a form

nothing to say but a code snippet

<form action="<?php App::linkTo("login"); ?>" method"post">
    <p><input type="text" name="pin" /></p>
    <button type="submit">LOGIN</button>
// App.php
public static function login(){
    if($_POST["pin"] == "yay"){
        return true;

calling a webservice

PLAIN_PHP comes with a small but nice WebService library ("WS").

Does not matter if you want a full REST communication or just a one-liner to fetch a few jsons.

    $ws = new PLAIN_PHP\WS("");
    $ws->addData("apiToken", "supercrypticalsecurehash");

    //static shortcut for a get request
    $latestAsaphPosts = PLAIN_PHP\WS::getData("");

add my own folders to the autoloader

For all the folders that were specified in the lib/config/conf.php file in the AUTOLOAD_FOLDERS array, the naming convention is prerequisite: class name = filename. You can also use the * wildcard to add all subfolders