1. Go to this page and download the library: Download lusito/insanity library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
lusito / insanity example snippets
use Lusito\InSanity\InSanity;
//...
$in = new InSanity(); // or new InSanity($_GET) if you want to use $_GET as default instead of $_POST.
$in->site_id('Site ID', $_GET)->ble('Visible')-> => $errors], JSON_UNESCAPED_SLASHES);
} else {
// Get all values in an associative array:
$json = $in->toJSON();
}
use Lusito\InSanity\InSanity;
//...
$in = new InSanity(); // or new InSanity($_GET) if you want to use $_GET as default instead of $_POST.
$siteId = $in->site_id('Site ID', $_GET)->n->slug('Slug')->max_length(255)->getValue();
$visible = $in->visible('Visible')->
$in = new InSanity();
$in->my_field_name('My Field Label')->
// shortest way:
$field->eld->d like this:
$field->min_length(2);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.