/hphp/runtime/ext/std/ext_std_classobj.php

https://gitlab.com/Blueprint-Marketing/hhvm · PHP · 275 lines · 60 code · 21 blank · 194 comment · 0 complexity · 26e4965ce1e1c0c8dff63afb794bfa26 MD5 · raw file

  1. <?hh
  2. // @generated by docskel.php
  3. /**
  4. * Call a user method given with an array of parameters [deprecated]
  5. *
  6. * @param string $method_name - The method name being called.
  7. * @param object $obj - The object that method_name is being called on.
  8. * @param array $params - An array of parameters.
  9. *
  10. * @return mixed -
  11. */
  12. <<__Native>>
  13. function call_user_method_array(string $method_name,
  14. mixed &$obj,
  15. mixed $params): mixed;
  16. /**
  17. * Call a user method on an specific object [deprecated]
  18. *
  19. * @param string $method_name - The method name being called.
  20. * @param object $obj - The object that method_name is being called on.
  21. * @param mixed $parameter -
  22. * @param mixed $... -
  23. *
  24. * @return mixed -
  25. */
  26. function call_user_method(Stringish $method_name,
  27. mixed &$obj,
  28. ...$args): mixed {
  29. return call_user_method_array((string)$method_name, $obj, $args);
  30. }
  31. /**
  32. * Creates an alias for a class
  33. *
  34. * @param string $original - The original class.
  35. * @param string $alias - The alias name for the class.
  36. * @param bool $autoload - Whether do autoload if the original class is
  37. * not found.
  38. *
  39. * @return bool -
  40. */
  41. <<__Native>>
  42. function class_alias(string $original,
  43. string $alias,
  44. bool $autoload = true): bool;
  45. /**
  46. * Checks if the class has been defined
  47. *
  48. * @param string $class_name - The class name. The name is matched in a
  49. * case-insensitive manner.
  50. * @param bool $autoload - Whether or not to call by default.
  51. *
  52. * @return bool - Returns TRUE if class_name is a defined class, FALSE
  53. * otherwise.
  54. */
  55. <<__Native>>
  56. function class_exists(string $class_name,
  57. bool $autoload = true): bool;
  58. /**
  59. * the "Late Static Binding" class name
  60. *
  61. * @return string - Returns the class name. Returns FALSE if called from
  62. * outside a class.
  63. */
  64. <<__Native>>
  65. function get_called_class(): mixed;
  66. /**
  67. * Get the constants of the given class.
  68. *
  69. * @param string $class_name - The class name
  70. *
  71. * @return array - Returns an associative array of constants with their values.
  72. */
  73. <<__Native, __HipHopSpecific>>
  74. function get_class_constants(string $class_name): array<string, mixed>;
  75. /**
  76. * Gets the class methods' names
  77. *
  78. * @param mixed $class_name - The class name or an object instance
  79. *
  80. * @return array - Returns an array of method names defined for the class
  81. * specified by class_name. In case of an error, it returns NULL.
  82. */
  83. <<__Native>>
  84. function get_class_methods(mixed $class_name): ?array;
  85. /**
  86. * Get the default properties of the class
  87. *
  88. * @param string $class_name - The class name
  89. *
  90. * @return array - Returns an associative array of declared properties
  91. * visible from the current scope, with their default value. The
  92. * resulting array elements are in the form of varname => value. In case
  93. * of an error, it returns FALSE.
  94. */
  95. <<__Native>>
  96. function get_class_vars(string $class_name): mixed;
  97. /**
  98. * Returns the name of the class of an object
  99. *
  100. * @param object $object - The tested object. This parameter may be
  101. * omitted when inside a class.
  102. *
  103. * @return string - Returns the name of the class of which object is an
  104. * instance. Returns FALSE if object is not an object. If object is
  105. * omitted when inside a class, the name of that class is returned.
  106. */
  107. <<__Native>>
  108. function get_class(mixed $object = null): mixed;
  109. /**
  110. * Returns an array with the name of the defined classes
  111. *
  112. * @return array - Returns an array of the names of the declared classes
  113. * in the current script. Note that depending on what extensions you
  114. * have compiled or loaded into PHP, additional classes could be present.
  115. * This means that you will not be able to define your own classes using
  116. * these names. There is a list of predefined classes in the Predefined
  117. * Classes section of the appendices.
  118. */
  119. <<__Native>>
  120. function get_declared_classes(): array<string>;
  121. /**
  122. * Returns an array of all declared interfaces
  123. *
  124. * @return array - Returns an array of the names of the declared
  125. * interfaces in the current script.
  126. */
  127. <<__Native>>
  128. function get_declared_interfaces(): array<string>;
  129. /**
  130. * Returns an array of all declared traits
  131. *
  132. * @return array - Returns an array with names of all declared traits in
  133. * values. Returns NULL in case of a failure.
  134. */
  135. <<__Native>>
  136. function get_declared_traits(): array<string>;
  137. /**
  138. * Gets the properties of the given object
  139. *
  140. * @param object $object - An object instance.
  141. *
  142. * @return array - Returns an associative array of defined object
  143. * accessible non-static properties for the specified object in scope. If
  144. * a property has not been assigned a value, it will be returned with a
  145. * NULL value.
  146. */
  147. <<__Native>>
  148. function get_object_vars(object $object): array<string, mixed>;
  149. /**
  150. * Retrieves the parent class name for object or class
  151. *
  152. * @param mixed $object - The tested object or class name
  153. *
  154. * @return string - Returns the name of the parent class of the class of
  155. * which object is an instance or the name. If the object does not
  156. * have a parent or the class given does not exist FALSE will be
  157. * returned. If called without parameter outside object, this function
  158. * returns FALSE.
  159. */
  160. <<__Native>>
  161. function get_parent_class(mixed $object = null): mixed;
  162. /**
  163. * Checks if the interface has been defined
  164. *
  165. * @param string $interface_name - The interface name
  166. * @param bool $autoload - Whether to call or not by default.
  167. *
  168. * @return bool - Returns TRUE if the interface given by interface_name
  169. * has been defined, FALSE otherwise.
  170. */
  171. <<__Native>>
  172. function interface_exists(string $interface_name,
  173. bool $autoload = true): bool;
  174. /**
  175. * Checks if the object is of this class or has this class as one of its
  176. * parents
  177. *
  178. * @param object $object - The tested object
  179. * @param string $class_name - The class name
  180. * @param bool $allow_string - If this parameter set to FALSE, string
  181. * class name as object is not allowed. This also prevents from calling
  182. * autoloader if the class doesn't exist.
  183. *
  184. * @return bool - Returns TRUE if the object is of this class or has this
  185. * class as one of its parents, FALSE otherwise.
  186. */
  187. <<__Native>>
  188. function is_a(mixed $object,
  189. string $class_name,
  190. bool $allow_string = false): bool;
  191. /**
  192. * Checks if the object has this class as one of its parents
  193. *
  194. * @param mixed $object - A class name or an object instance
  195. * @param string $class_name - The class name
  196. * @param bool $allow_string - If this parameter set to false, string
  197. * class name as object is not allowed. This also prevents from calling
  198. * autoloader if the class doesn't exist.
  199. *
  200. * @return bool - This function returns TRUE if the object object,
  201. * belongs to a class which is a subclass of class_name, FALSE otherwise.
  202. */
  203. <<__Native>>
  204. function is_subclass_of(mixed $object,
  205. string $class_name,
  206. bool $allow_string = true): bool;
  207. /**
  208. * Checks if the class method exists
  209. *
  210. * @param mixed $object - An object instance or a class name
  211. * @param string $method_name - The method name
  212. *
  213. * @return bool - Returns TRUE if the method given by method_name has
  214. * been defined for the given object, FALSE otherwise.
  215. */
  216. <<__Native>>
  217. function method_exists(mixed $object,
  218. string $method_name): bool;
  219. /**
  220. * Checks if the object or class has a property
  221. *
  222. * @param mixed $class - The class name or an object of the class to test
  223. * for
  224. * @param string $property - The name of the property
  225. *
  226. * @return bool - Returns TRUE if the property exists, FALSE if it
  227. * doesn't exist or NULL in case of an error.
  228. */
  229. <<__Native>>
  230. function property_exists(mixed $class,
  231. string $property): ?bool;
  232. /**
  233. * Checks if the trait exists
  234. *
  235. * @param string $traitname -
  236. * @param bool $autoload -
  237. *
  238. * @return bool - Returns TRUE if trait exists, FALSE if not, NULL in
  239. * case of an error.
  240. */
  241. <<__Native>>
  242. function trait_exists(string $traitname,
  243. bool $autoload = true): bool;
  244. /**
  245. * Checks if the enum exists
  246. *
  247. * @param string $enumname -
  248. * @param bool $autoload -
  249. *
  250. * @return bool - Returns TRUE if enum exists, FALSE if not
  251. */
  252. <<__Native>>
  253. function enum_exists(string $enumname,
  254. bool $autoload = true): bool;