PHP Classes

First Load Class: Setup configuration values and load scripts

Recommend this page to a friend!
     
  Info   Example   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 91 All time: 9,943 This week: 69Up
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

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 (3)  
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

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 0%
Total:91
This week:0
All time:9,943
This week:69Up