Exemplo n.º 1
0
 /**
  * Store the request in the database
  */
 public function store(Request $request)
 {
     $data = $this->applyFilter($request->toArray());
     foreach ($this->needs_serialization as $key) {
         $data[$key] = @json_encode($data[$key]);
     }
     $data['version'] = Clockwork::VERSION;
     $stmt = $this->pdo->prepare("INSERT INTO {$this->table} " . '(id, version, time, method, uri, headers, controller, getData, postData, sessionData, cookies, responseTime, responseStatus, responseDuration, databaseQueries, databaseDuration, timelineData, log, routes, emailsData, viewsData, userData) ' . 'VALUES ' . '(:id, :version, :time, :method, :uri, :headers, :controller, :getData, :postData, :sessionData, :cookies, :responseTime, :responseStatus, :responseDuration, :databaseQueries, :databaseDuration, :timelineData, :log, :routes, :emailsData, :viewsData, :userData)');
     $stmt->execute($data);
 }
Exemplo n.º 2
0
 public function store(Request $request)
 {
     static::getMemcached($this->host, $this->port)->set('pikachu_clockwork_' . $request->id, @json_encode($this->applyFilter($request->toArray())), 30);
 }
Exemplo n.º 3
0
 /**
  * Store request, requests are stored in JSON representation in files named <request id>.json in storage path
  */
 public function store(Request $request)
 {
     file_put_contents($this->path . '/' . $request->id . '.json', @json_encode($this->applyFilter($request->toArray())));
 }