static zend_class_entry *dir_class_entry_ptr;
#define FETCH_DIRP() \
- ZEND_PARSE_PARAMETERS_START(0, 1) \
- Z_PARAM_OPTIONAL \
- Z_PARAM_RESOURCE_OR_NULL(id) \
- ZEND_PARSE_PARAMETERS_END(); \
- if (!id) { \
- myself = getThis(); \
- if (myself) { \
- if ((tmp = zend_hash_str_find(Z_OBJPROP_P(myself), "handle", sizeof("handle")-1)) == NULL) { \
- zend_throw_error(NULL, "Unable to find my handle property"); \
- RETURN_THROWS(); \
- } \
- if ((dirp = (php_stream *)zend_fetch_resource_ex(tmp, "Directory", php_file_le_stream())) == NULL) { \
+ myself = getThis(); \
+ if (!myself) { \
+ ZEND_PARSE_PARAMETERS_START(0, 1) \
+ Z_PARAM_OPTIONAL \
+ Z_PARAM_RESOURCE_OR_NULL(id) \
+ ZEND_PARSE_PARAMETERS_END(); \
+ if (id) { \
+ if ((dirp = (php_stream *)zend_fetch_resource(Z_RES_P(id), "Directory", php_file_le_stream())) == NULL) { \
RETURN_THROWS(); \
} \
} else { \
if (!DIRG(default_dir)) { \
zend_type_error("No resource supplied"); \
RETURN_THROWS(); \
- } else if ((dirp = (php_stream *)zend_fetch_resource(DIRG(default_dir), "Directory", php_file_le_stream())) == NULL) { \
+ } \
+ if ((dirp = (php_stream *)zend_fetch_resource(DIRG(default_dir), "Directory", php_file_le_stream())) == NULL) { \
RETURN_THROWS(); \
} \
} \
} else { \
- if ((dirp = (php_stream *)zend_fetch_resource(Z_RES_P(id), "Directory", php_file_le_stream())) == NULL) { \
+ ZEND_PARSE_PARAMETERS_NONE(); \
+ if ((tmp = zend_hash_str_find(Z_OBJPROP_P(myself), "handle", sizeof("handle")-1)) == NULL) { \
+ zend_throw_error(NULL, "Unable to find my handle property"); \
+ RETURN_THROWS(); \
+ } \
+ if ((dirp = (php_stream *)zend_fetch_resource_ex(tmp, "Directory", php_file_le_stream())) == NULL) { \
RETURN_THROWS(); \
} \
}
class Directory
{
/**
- * @param resource|null $dir_handle
* @return void
* @implementation-alias closedir
*/
- public function close($dir_handle = null) {}
+ public function close() {}
/**
- * @param resource|null $dir_handle
* @return void
* @implementation-alias rewinddir
*/
- public function rewind($dir_handle = null) {}
+ public function rewind() {}
/**
- * @param resource|null $dir_handle
* @return string|false
* @implementation-alias readdir
*/
- public function read($dir_handle = null) {}
+ public function read() {}
}
/* This is a generated file, edit the .stub.php file instead.
- * Stub hash: d8d8c93a1659e1790b25a65d7e1d0d7430724e9d */
+ * Stub hash: a715bf6a8d5fe69732623cc17f03bd463f369648 */
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Directory_close, 0, 0, 0)
- ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, dir_handle, "null")
ZEND_END_ARG_INFO()
#define arginfo_class_Directory_rewind arginfo_class_Directory_close
- Methods [3] {
Method [ <internal:standard> public method close ] {
- - Parameters [1] {
- Parameter #0 [ <optional> $dir_handle = null ]
+ - Parameters [0] {
}
}
Method [ <internal:standard> public method rewind ] {
- - Parameters [1] {
- Parameter #0 [ <optional> $dir_handle = null ]
+ - Parameters [0] {
}
}
Method [ <internal:standard> public method read ] {
- - Parameters [1] {
- Parameter #0 [ <optional> $dir_handle = null ]
+ - Parameters [0] {
}
}
}