コード例 #1
0
ファイル: Session.php プロジェクト: hecrj/sea_core
 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();
 }
コード例 #2
0
ファイル: Form.php プロジェクト: hecrj/sea_core
 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;
 }
コード例 #3
0
ファイル: Model.php プロジェクト: hecrj/sea_core
 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]);
 }
コード例 #4
0
ファイル: index.php プロジェクト: hecrj/sea_project
<?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');