reflection.phpt 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. --TEST--
  2. Test SNMP Reflection
  3. --SKIPIF--
  4. <?php if (!extension_loaded('snmp')) die ("skip no snmp extension"); ?>
  5. --FILE--
  6. <?php
  7. /* ALL PHP_ME user callable methods of SNMP class should appear here */
  8. reflection::export(new reflectionmethod('snmp', '__construct'));
  9. reflection::export(new reflectionmethod('snmp', 'close'));
  10. reflection::export(new reflectionmethod('snmp', 'setSecurity'));
  11. reflection::export(new reflectionmethod('snmp', 'get'));
  12. reflection::export(new reflectionmethod('snmp', 'getnext'));
  13. reflection::export(new reflectionmethod('snmp', 'walk'));
  14. reflection::export(new reflectionmethod('snmp', 'set'));
  15. reflection::export(new reflectionmethod('snmp', 'getErrno'));
  16. reflection::export(new reflectionmethod('snmp', 'getError'));
  17. ?>
  18. ===DONE===
  19. <?php exit(0); ?>
  20. --EXPECTF--
  21. Method [ <internal:snmp, ctor> public method __construct ] {
  22. - Parameters [5] {
  23. Parameter #0 [ <required> $version ]
  24. Parameter #1 [ <required> $host ]
  25. Parameter #2 [ <required> $community ]
  26. Parameter #3 [ <optional> $timeout ]
  27. Parameter #4 [ <optional> $retries ]
  28. }
  29. }
  30. Method [ <internal:snmp> public method close ] {
  31. - Parameters [0] {
  32. }
  33. }
  34. Method [ <internal:snmp> public method setSecurity ] {
  35. - Parameters [7] {
  36. Parameter #0 [ <required> $sec_level ]
  37. Parameter #1 [ <required> $auth_protocol ]
  38. Parameter #2 [ <required> $auth_passphrase ]
  39. Parameter #3 [ <required> $priv_protocol ]
  40. Parameter #4 [ <required> $priv_passphrase ]
  41. Parameter #5 [ <required> $contextName ]
  42. Parameter #6 [ <required> $contextEngineID ]
  43. }
  44. }
  45. Method [ <internal:snmp> public method get ] {
  46. - Parameters [2] {
  47. Parameter #0 [ <required> $object_id ]
  48. Parameter #1 [ <optional> $use_orignames ]
  49. }
  50. }
  51. Method [ <internal:snmp> public method getnext ] {
  52. - Parameters [2] {
  53. Parameter #0 [ <required> $object_id ]
  54. Parameter #1 [ <optional> $use_orignames ]
  55. }
  56. }
  57. Method [ <internal:snmp> public method walk ] {
  58. - Parameters [4] {
  59. Parameter #0 [ <required> $object_id ]
  60. Parameter #1 [ <required> $suffix_keys ]
  61. Parameter #2 [ <required> $max_repetitions ]
  62. Parameter #3 [ <required> $non_repeaters ]
  63. }
  64. }
  65. Method [ <internal:snmp> public method set ] {
  66. - Parameters [3] {
  67. Parameter #0 [ <required> $object_id ]
  68. Parameter #1 [ <required> $type ]
  69. Parameter #2 [ <required> $value ]
  70. }
  71. }
  72. Method [ <internal:snmp> public method getErrno ] {
  73. - Parameters [0] {
  74. }
  75. }
  76. Method [ <internal:snmp> public method getError ] {
  77. - Parameters [0] {
  78. }
  79. }
  80. ===DONE===