Lines Matching refs:iface

133 		/* Must be initialized through iface->interface_gets_implemented() */
1009 static inline void do_implement_interface(zend_class_entry *ce, zend_class_entry *iface) /* {{{ */
1011 if (!(ce->ce_flags & ZEND_ACC_INTERFACE) && iface->interface_gets_implemented && iface->interface_gets_implemented(iface, ce) == FAILURE) {
1012 zend_error_noreturn(E_CORE_ERROR, "Class %s could not implement interface %s", ZSTR_VAL(ce->name), ZSTR_VAL(iface->name));
1015 ZEND_ASSERT(ce != iface);
1019 static void zend_do_inherit_interfaces(zend_class_entry *ce, const zend_class_entry *iface) /* {{{ */
1022 uint32_t i, ce_num, if_num = iface->num_interfaces;
1035 entry = iface->interfaces[if_num];
1350 static zend_bool do_inherit_constant_check(HashTable *child_constants_table, zend_class_constant *parent_constant, zend_string *name, const zend_class_entry *iface) /* {{{ */
1358 zend_error_noreturn(E_COMPILE_ERROR, "Cannot inherit previously-inherited or override constant %s from interface %s", ZSTR_VAL(name), ZSTR_VAL(iface->name));
1366 static void do_inherit_iface_constant(zend_string *name, zend_class_constant *c, zend_class_entry *ce, zend_class_entry *iface) /* {{{ */
1368 if (do_inherit_constant_check(&ce->constants_table, c, name, iface)) {
1383 static void do_interface_implementation(zend_class_entry *ce, zend_class_entry *iface) /* {{{ */
1389 ZEND_HASH_FOREACH_STR_KEY_PTR(&iface->constants_table, key, c) {
1390 do_inherit_iface_constant(key, c, ce, iface);
1393 ZEND_HASH_FOREACH_STR_KEY_PTR(&iface->function_table, key, func) {
1397 do_implement_interface(ce, iface);
1398 if (iface->num_interfaces) {
1399 zend_do_inherit_interfaces(ce, iface);
1404 ZEND_API void zend_do_implement_interface(zend_class_entry *ce, zend_class_entry *iface) /* {{{ */
1418 } else if (ce->interfaces[i] == iface) {
1422 zend_error_noreturn(E_COMPILE_ERROR, "Class %s cannot implement previously implemented interface %s", ZSTR_VAL(ce->name), ZSTR_VAL(iface->name));
1429 do_inherit_constant_check(&iface->constants_table, c, key, iface);
1439 ce->interfaces[ce->num_interfaces++] = iface;
1441 do_interface_implementation(ce, iface);
1448 zend_class_entry *iface;
1456 iface = interfaces[num_parent_interfaces + i];
1457 if (!(iface->ce_flags & ZEND_ACC_LINKED)) {
1458 add_dependency_obligation(ce, iface);
1460 if (UNEXPECTED(!(iface->ce_flags & ZEND_ACC_INTERFACE))) {
1462 zend_error_noreturn(E_ERROR, "%s cannot implement %s - it is not an interface", ZSTR_VAL(ce->name), ZSTR_VAL(iface->name));
1466 if (interfaces[j] == iface) {
1469 zend_error_noreturn(E_COMPILE_ERROR, "Class %s cannot implement previously implemented interface %s", ZSTR_VAL(ce->name), ZSTR_VAL(iface->name));
1474 do_inherit_constant_check(&iface->constants_table, c, key, iface);
1477 iface = NULL;
1481 if (iface) {
1482 interfaces[num_interfaces] = iface;
2486 zend_class_entry *iface = zend_fetch_class_by_name(
2490 if (!iface) {
2495 interfaces[num_parent_interfaces + i] = iface;