flight\Engine::set PHP Метод

set() публичный Метод

Sets a variable.
public set ( mixed $key, string $value = null )
$key mixed Key
$value string Value
    public function set($key, $value = null)
    {
        if (is_array($key) || is_object($key)) {
            foreach ($key as $k => $v) {
                $this->vars[$k] = $v;
            }
        } else {
            $this->vars[$key] = $value;
        }
    }

Usage Example

Пример #1
0
 function setUp()
 {
     $this->app = new \flight\Engine();
     $this->app->set('flight.views.path', __DIR__ . '/views');
 }
All Usage Examples Of flight\Engine::set