Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jun 26th, 2012  |  syntax: None  |  size: 0.64 KB  |  hits: 13  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <?php
  2. $client = new Zend\Http\Client;
  3. $client->setHeaders(array('Last-Modified' => 'fake'));
  4. var_dump($client->getRequest()->headers());
  5. var_dump($client->getRequest()->headers()->toArray());
  6.  
  7. /**
  8. object(Zend\Http\Headers)#2 (3) {
  9.   ["pluginClassLoader":protected]=>
  10.   NULL
  11.   ["headersKeys":protected]=>
  12.   array(1) {
  13.     [0]=>
  14.     string(12) "lastmodified"
  15.   }
  16.   ["headers":protected]=>
  17.   array(1) {
  18.     [0]=>
  19.     array(2) {
  20.       ["name"]=>
  21.       string(13) "Last-Modified"
  22.       ["line"]=>
  23.       string(19) "Last-Modified: fake"
  24.     }
  25.   }
  26. }
  27. array(1) {
  28.   ["Last-Modified"]=>
  29.   string(4) "fake"
  30. }
  31. */
  32.  
  33. // @see https://github.com/zendframework/zf2/pull/603/files