public function __construct(Cookie $cookie, Request $request) { $this->cookie = $cookie; $this->secure = $request->isSecure(); $this->name = $this->secure ? Session\NAME : Session\NAME_SECURE; $this->init(); }
public function __construct(Security $security, Request $request) { $this->security = $security; $this->request = $request; $this->fieldsets = array(); $this->posted = $request->getMethod() == 'POST'; $this->buttons = array(); $this->editing = false; }
public function updateFrom(Request $request, $postKey = null, $method = 'POST') { if ($request->getMethod() != $method) { return false; } if (null == $postKey) { $postKey = strtolower(get_class($this)); } return $this->update_attributes($request->post[$postKey]); }
<?php namespace Sea; use Sea\Application; use Sea\Components\Autoloader; use Sea\Components\Routing\Request; define('Sea\\DIR', dirname(__DIR__) . '/'); require DIR . 'config/boot.php'; require DIR . 'sea/components/Autoloader.php'; $loader = new Autoloader(); require DIR . 'config/autoload.php'; $loader->register(); $request = Request::createFromGlobals(); $application = new Application(); $application->respond($request, 'config/routes.php');