PHP容器化demo
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
521 B

3 years ago
  1. <?php
  2. /**
  3. * ObjectArray.test.php
  4. * Test Base controller.
  5. * @version 150629:1
  6. * @author karminski <code.karminski@outlook.com>
  7. *
  8. */
  9. require(dirname(__FILE__).'/../protected/lib/base/ObjectArray.php');
  10. class DefaultRequest extends ObjectArray{
  11. }
  12. $input = array(
  13. 'id' => 12,
  14. 'type' => 'a',
  15. 'callback' => 'json_callback_21453534534',
  16. 'src' => 'pc_452345',
  17. );
  18. $DefaultRequest = new DefaultRequest($input);
  19. $DefaultRequest['tar'] = 'zxvf';
  20. var_dump(json_encode($DefaultRequest));