push() public static method

public static push ( )
Beispiel #1
0
 /**
  * @test
  */
 public function shouldPushNestedSessionValueWhenArrayIsNotEmpty()
 {
     // given
     Session::push('key1', 'key2', 'value1');
     Session::push('key1', 'key2', 'value2');
     //when
     Session::push('key1', 'key2', 'value3');
     //then
     Assert::thatSession()->hasSize(1);
     $value = Session::get('key1', 'key2');
     Assert::thatArray($value)->containsExactly('value1', 'value2', 'value3');
 }
Beispiel #2
0
 public static function traceHttpRequest($params)
 {
     $uri = new Uri();
     $requestDetails = $uri->getPathWithoutPrefix() . '#' . FrontController::$requestId;
     Session::push('stats_queries', $requestDetails, 'request_params', $params);
 }