Loading, please wait...

ARTDESIGN FRAMEWORK

INPUT

Description

ArtDesign FrameWork Input - Management of input data - GET(SEO URL - one/two/three, Old URL - ?param1=one&param2=two&param3=three), POST
Normalization of input data - int, float, double, bool, string, trim, spaces, xss
Default values of input data (if they are not defined)

GET - SEO URL

$ArtDesign = \ArtDesign\ArtDesign::GetInstance();
$Input = $ArtDesign->GetInput();
$FirstParameter = $Input->Get(0);
$SecondParameter = $Input->Get(1);
$ThirdParameter = $Input->Get(2);

/*
    URL = "https://www.artdesign-ui.com/one/two/three"
    $FirstParameter = "one"
    $SecondParameter = "two"
    $ThirdParameter = "three"
*/


//If you want, you can change the start position
$Settings = array(
    "BasePath" => "/one/"
);
$ArtDesign = \ArtDesign\ArtDesign::GetInstance($Settings);
$Input = $ArtDesign->GetInput();
$FirstParameter = $Input->Get(0);
$SecondParameter = $Input->Get(1);
$ThirdParameter = $Input->Get(2);

/*
    URL = "https://www.artdesign-ui.com/one/two/three/four"
    $FirstParameter = "two"
    $SecondParameter = "three"
    $ThirdParameter = "four"
*/

GET - Old URL

$ArtDesign = \ArtDesign\ArtDesign::GetInstance();
$Input = $ArtDesign->GetInput();
$FirstParameter = $Input->OldGet("first_parameter");
$SecondParameter = $Input->OldGet("second_parameter");
$ThirdParameter = $Input->OldGet("third_parameter");

/*
    URL = "https://www.artdesign-ui.com/?first_parameter=one&second_parameter=two&third_parameter=three"
    $FirstParameter = "two"
    $SecondParameter = "three"
    $ThirdParameter = "four"
*/

POST

$ArtDesign = \ArtDesign\ArtDesign::GetInstance();
$Input = $ArtDesign->GetInput();
$FirstParameter = $Input->Post("first_parameter");
$SecondParameter = $Input->Post("second_parameter");
$ThirdParameter = $Input->Post("third_parameter");

Input Normalize

$ArtDesign = \ArtDesign\ArtDesign::GetInstance();
$Input = $ArtDesign->GetInput();
$FirstParameter = $Input->Post("first_parameter", "trim|xss");
$SecondParameter = $Input->Post("second_parameter", "trim|xss");
$ThirdParameter = $Input->Post("third_parameter", "trim|xss");
/*
    All Functions:
    int, float, double, bool, string, trim, spaces, xss
    For details - view Normalize
*/

Input Default

$ArtDesign = \ArtDesign\ArtDesign::GetInstance();
$Input = $ArtDesign->GetInput();
$FirstParameter = $Input->Get(0, null, "DefaultValue");
$SecondParameter = $Input->Get(1, null, "DefaultValue");
/*
    URL = "https://www.artdesign-ui.com/one"
    $FirstParameter = "one"
    $SecondParameter = "DefaultValue"
*/