The Yaf_Application class

(Yaf >=1.0.0)

Giriş

Yaf_Application provides a bootstrapping facility for applications which provides reusable resources, common- and module-based bootstrap classes and dependency checking.

Bilginize:

Yaf_Application implements the singleton pattern, and Yaf_Application can not be serialized or unserialized which will cause problem when you try to use PHPUnit to write some test case for Yaf.

You may use @backupGlobals annotation of PHPUnit to control the backup and restore operations for global variables. thus can solve this problem.

Sınıf Sözdizimi

finalclassYaf_Application {
protected$config;
protected$dispatcher;
protectedstatic$_app;
protected$_modules;
protected$_running;
protected$_environ;
public__construct(mixed$config, string$envrion = ?)
publicstaticapp(): mixed
publicbootstrap(Yaf_Bootstrap_Abstract$bootstrap = ?): void
publicenviron(): void
publicexecute(callable$entry, string...$args): void
publicgetModules(): array
publicrun(): void
public__destruct()
}

Özellikler

config

dispatcher

_app

_modules

_running

_environ

İçindekiler

To Top