|
#short samples of Web class WebWeb class is very simple. But it makes my code shorter and more beautiful to a very noticeable extent. GetThe 85% of for what I use Web is this.. $page = Web::GETi('page');This return me $GET'page' if it is set otherwise 0. the i means integer and is often used as most that you pass around are table id-s which are integers. I used to have code full of isset-s and if-s before. //we can define a default value if the value isn't set (the default default is 0)
$page = Web::GETi('page', 1);
//without the i we get a usual string variant
$file = Web::GET('file');
//we have a default here to (the default default is '')
$file = Web::GET('file', 'index');OtherWeb class has some other function. I will describe them later.
|