PHP Classes

First Load Class: Setup configuration values and load scripts

Recommend this page to a friend!
  Info   View files Example   View files View files (3)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 91 This week: 1All time: 9,923 This week: 81Up
Version License PHP version Categories
first-class 1.0GNU General Publi...7PHP 5, Files and Folders, Language, C...
Description 

Author

This class can setup configuration values and load scripts.

It can store and retrieve from class variables named application configuration values that can be scalars or arrays.

The class can also load additional scripts using include or require.

Picture of Marcel Franke
  Performance   Level  
Name: Marcel Franke <contact>
Classes: 1 package by
Country: Germany Germany
Age: ???
All time rank: 4423233 in Germany Germany
Week rank: 94 Up5 in Germany Germany Up

Example

<?php


define
("DEBUG_MODE", true);
include
"first.class.php";
first::setarray("lang","suffix","Bitte informieren Sie den Websiteadministrator!");
first::setarray("lang","live_suffix","Bitte gehen Sie auf die Hauptseite zur?ck!");
first::setarray("lang","NotFound","Information not found : ".first::getarray("lang","live_suffix")); // system.class.php nicht mit sch?ner URL reingekommen
first::setarray("lang","000001","Fehler 00001 (include): ".first::getarray("lang","suffix"));
first::setarray("lang","000002","Fehler 000047 (require): ".first::getarray("lang","suffix"));
first::setarray("lang","000052","Fehler 000052 (not seted var name): ".first::getarray("lang","suffix")); // first.class.php load_content array ist leer

first::setarray("layout", "bla", "yourlayout.html");


first::seta('_dbserver','server'); # => set "Global" Variable
first::geta("_dbserver"); # => get "Global" Variable

#first::incl(""); #Fehler 00001 (include): Bitte informieren Sie den Websiteadministrator!
first::incl("test1.php");
if(
first::incl("first.class.php",false,"exist")){
    echo
"file exist";
}else{
    echo
"file exist not";
}
first::incl("system.php",false);
first::incl("robots.txt",false);


echo
'<pre>'; print_r(first::lostmyass()); echo '</pre>';
echo
'<pre>'; print_r(first::geta("_dbserver")); echo '</pre>';
echo
'<pre>'; print_r(first::geta("lang")); echo '</pre>';
?>


  Files folder image Files  
File Role Description
Image file exampleoutput.png Screen Shows Output of example file
Plain text file first.class.php Class First load Class
Plain text file test.php Example use for Testing

 Version Control Unique User Downloads Download Rankings  
 0%
Total:91
This week:1
All time:9,923
This week:81Up