Laufzeit-Konfiguration

Das Verhalten dieser Funktionen wird durch Einstellungen in der php.ini beeinflusst.

Yaf Konfigurationsoptionen
Name Standard Veränderbar Changelog
yaf.library   PHP_INI_ALL
yaf.action_prefer 0 PHP_INI_ALL
yaf.lowcase_path 0 PHP_INI_ALL
yaf.use_spl_autoload 0 PHP_INI_ALL
yaf.forward_limit 5 PHP_INI_ALL
yaf.name_suffix 1 PHP_INI_ALL
yaf.name_separator   PHP_INI_ALL
yaf.cache_config 0 PHP_INI_SYSTEM
yaf.environ product PHP_INI_SYSTEM
yaf.use_namespace 0 PHP_INI_SYSTEM

Hier eine kurze Erklärung der Konfigurationsoptionen:

yaf.library string

The global library path, Yaf_loader will search global library in this directory.

yaf.action_prefer int

If there is only one part in PATH_INFO, should it consider as a controller or action.

If this configure On, it will be considered as a Action name.

yaf.lowcase_path int

Whether lowercase all the path during the class autoloading.

yaf.use_spl_autoload int

When this value is On, if Yaf_Loader can not find a class, it will return false, then give chance to other auto load function to be called.

When this value is Off, if Yaf_Loader can not find a class, it will return true, and make the class autoloading failed immediately.

Hinweis:

Yaf will register its loader during a instantiation of Yaf_Application, so any other auto loaders which is register before the instantiation will be called before Yaf_Loader::autoload().

When this value is Off(default), Yaf_Loader::autoload() will always return true.

yaf.forward_limit int

The max forward count, default is 5. that means you can have a max value of 5 in the forward stack.

This is a protection for prevent recursive Yaf_Controller_Abstract::forward().

yaf.name_suffix int

When this On, Yaf_Loader will identify a class by it's suffix to decide whether it is a MVC Class.

When this Off, Yaf_Loader will look at the prefix of the class name.

yaf.name_separator string

When this is not empty, Yaf_Loader will identify the class suffix and string value of this.

For example, when this value is "_", Yaf_Loader will take Index_Controller as a Controller Class, IndexController as a normal class.

yaf.cache_config int

If this is On, and in the meantime you are using ini config file as the parameter of Yaf_Application(), the compiling result of the ini config file will be cached in the PHP process.

Hinweis:

Yaf examine the mtime of the ini file, if it was changed since last compiling, Yaf will reload it.

Warnung

Yaf use the ini file path as the cache entry key, so do use the absolute path in ini file path, otherwise there might be some conflicts if two application use the same relative path of ini config.

yaf.environ string

This value is "product" by default, used for Yaf to fetch the config section of a ini config file.

That is, if this value is "product", Yaf will use the section named "product" in the ini config file(the first parameter of the Yaf_Application) as the final config of the Yaf_Application.

yaf.use_namespace int

If this value is On, All classes of Yaf will named in namespace style.

For example:

Yaf_Route_Rewrite => \Yaf\Route\Rewrite
Yaf_Request_Http  => \Yaf\Request\Http
        
There is a exception, that is some classes like Yaf_Controller_Abstract. The last component is a keyword of PHP, could not be used as a class name, so for such classes:
Yaf_Controller_Abstract => \Yaf\Controller_Abstract
Yaf_Route_Static => \Yaf\Route_Static
        

Hier Kannst Du einen Kommentar verfassen


Bitte gib mindestens 10 Zeichen ein.
Wird geladen... Bitte warte.
* Pflichtangabe
Es sind noch keine Kommentare vorhanden.

Grundlagen von Views in MySQL

Views in einer MySQL-Datenbank bieten die Möglichkeit, eine virtuelle Tabelle basierend auf dem Ergebnis einer SQL-Abfrage zu erstellen. ...

admin

Autor : admin
Kategorie: mySQL-Tutorials

Definition von Stored Procedures - eine Einführung

Stored Procedures sind vordefinierte SQL-Codeblöcke, die in einer Datenbank gespeichert sind und bei Bedarf aufgerufen werden können. ...

Bernie

Autor : ebiz-consult GmbH & Co. KG
Kategorie: mySQL-Tutorials

Wie kann man komplexe Abfragen mit SQL-Querys In MySQLi effektiv durchführen?

In diesem MySQL-Tutorial wird erklärt, wie komplexe SQL-Abfragen in MySQLi effizient durchgeführt werden können. Wir werden uns mit verschiedenen Aspekten der Datenbankabfrage beschäftigen und spezifische Methoden kennenlernen. ...

TheMax

Autor : TheMax
Kategorie: mySQL-Tutorials

Tutorial veröffentlichen

Tutorial veröffentlichen

Teile Dein Wissen mit anderen Entwicklern weltweit

Du bist Profi in deinem Bereich und möchtest dein Wissen teilen, dann melde dich jetzt an und teile es mit unserer PHP-Community

mehr erfahren

Tutorial veröffentlichen

[Wichtig] Anmeldung im Forum

Guess the hidden word using logic and deduction in the engaging game of Wordle. Wordle nyt (https://wordlenytimes.net/) ​

Geschrieben von lenytimes am 19.04.2024 19:21:45
Forum: Fragen/Vorschläge zum Forum
Professioneller Webentwickler & Webdesigner

Of course, here is the translation: Hello, Thank you for your interest in the long-term project. Your extensive skills and experience in web dev ...

Geschrieben von Athelstan am 15.04.2024 09:25:39
Forum: Jobgesuche
Wir stellen unsere SEO-Agentur vor

Hallo In der heutigen digitalen Welt war es für Unternehmen noch nie so einfach, ihre Reichweite weltweit zu vergrößern. Wenn Sie außerhalb I ...

Geschrieben von thomasmuller am 14.04.2024 07:18:33
Forum: User stellen sich vor
Spielplan für 4 Gruppen zu je 6 Teams auf 2 Feldern

Hallöchen zusammen, ich versuche derzeit unseren Excel-Spielplan in PHP zu überführen. Eigentlich bin ich auch shon fertig - wenn da nicht dies ...

Geschrieben von derH0st am 11.04.2024 15:58:37
Forum: PHP Developer Forum