/** * Removes a service from the services container using the array syntax * * @param string $alias */ PHP_METHOD(Phalcon_DI, offsetUnset){ zval *alias; phalcon_fetch_params(0, 1, 0, &alias); RETURN_CCTORW(alias); }
/** * Prepares data to be retrieved to user * * @param mixed $data */ PHP_METHOD(Phalcon_Cache_Frontend_None, afterRetrieve){ zval *data; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", &data) == FAILURE) { RETURN_NULL(); } RETURN_CCTORW(data); }
/** * x */ PHP_METHOD(Test_Router, doRemoveExtraSlashes) { zval *route; zephir_fetch_params(0, 1, 0, &route); RETURN_CCTORW(route); }
PHP_METHOD(Test_Mcall, optionalParameterVar) { zval *param = NULL; zephir_fetch_params(0, 0, 1, ¶m); if (!param) { param = ZEPHIR_GLOBAL(global_null); } RETURN_CCTORW(param); }
/** * Set the default Di container to return by getDefault() * * @param DiInterface $di * @return DiInterface */ PHP_METHOD(Pdm_Di_Container, setDefault) { zval *di; zephir_fetch_params(0, 1, 0, &di); if (!(zephir_instance_of_ev(di, pdm_di_containerinterface_ce TSRMLS_CC))) { ZEPHIR_THROW_EXCEPTION_DEBUG_STRW(spl_ce_InvalidArgumentException, "Parameter 'di' must be an instance of 'Pdm\\Di\\ContainerInterface'", "", 0); return; } zephir_update_static_property_ce(pdm_di_container_ce, SL("defaultInstance"), di TSRMLS_CC); RETURN_CCTORW(di); }
/** * Sets a service using a raw Phalcon\DI\Service definition * * @param string $name * @param Phalcon\DI\ServiceInterface $rawDefinition * @return Phalcon\DI\ServiceInterface */ PHP_METHOD(Phalcon_DI, setRaw){ zval *name, *raw_definition; phalcon_fetch_params(0, 2, 0, &name, &raw_definition); if (Z_TYPE_P(name) != IS_STRING) { PHALCON_THROW_EXCEPTION_STRW(phalcon_di_exception_ce, "The service name must be a string"); return; } if (Z_TYPE_P(raw_definition) != IS_OBJECT) { PHALCON_THROW_EXCEPTION_STRW(phalcon_di_exception_ce, "The service definition must be an object"); return; } phalcon_update_property_array(this_ptr, SL("_services"), name, raw_definition TSRMLS_CC); RETURN_CCTORW(raw_definition); }