Skip to content

Commit

Permalink
Add IMAPConnection opaque object class to stub file
Browse files Browse the repository at this point in the history
  • Loading branch information
Girgias committed Dec 21, 2020
1 parent 5463723 commit fe46b60
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ext/imap/php_imap.c
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ PHP_MINIT_FUNCTION(imap)
#endif


INIT_CLASS_ENTRY(ce, "IMAPConnection", NULL);
INIT_CLASS_ENTRY(ce, "IMAPConnection", class_IMAPConnection_methods);
php_imap_ce = zend_register_internal_class(&ce);
php_imap_ce->ce_flags |= ZEND_ACC_FINAL | ZEND_ACC_NO_DYNAMIC_PROPERTIES;
php_imap_ce->create_object = imap_object_create;
Expand Down
3 changes: 3 additions & 0 deletions ext/imap/php_imap.stub.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
<?php

/** @generate-function-entries */
class IMAPConnection {

}

function imap_open(string $mailbox, string $user, string $password, int $flags = 0, int $retries = 0, array $options = []): IMAPConnection|false {}

Expand Down
7 changes: 6 additions & 1 deletion ext/imap/php_imap_arginfo.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
* Stub hash: 43edfa8b365d3344648ae787dff37923a42a20ca */
* Stub hash: 1dbf85a4f8740bf02df35a4e184a67af6cf93e91 */

ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_imap_open, 0, 3, IMAPConnection, MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, mailbox, IS_STRING, 0)
Expand Down Expand Up @@ -510,3 +510,8 @@ static const zend_function_entry ext_functions[] = {
ZEND_FE(imap_mail, arginfo_imap_mail)
ZEND_FE_END
};


static const zend_function_entry class_IMAPConnection_methods[] = {
ZEND_FE_END
};

0 comments on commit fe46b60

Please sign in to comment.