/** * Starts a transaction */ PHP_METHOD(Phalcon_Logger_Adapter, begin) { if (1) { zephir_update_property_this(getThis(), SL("_transaction"), ZEPHIR_GLOBAL(global_true) TSRMLS_CC); } else { zephir_update_property_this(getThis(), SL("_transaction"), ZEPHIR_GLOBAL(global_false) TSRMLS_CC); } RETURN_THISW(); }
/** * Set the model who generates the message */ PHP_METHOD(Phalcon_Mvc_Model_Message, setModel) { zval *model; zephir_fetch_params(0, 1, 0, &model); zephir_update_property_this(this_ptr, SL("_model"), model TSRMLS_CC); RETURN_THISW(); }
/** * Adds a inline code to the collection */ PHP_METHOD(Phalcon_Assets_Collection, addInline) { zval *code; zephir_fetch_params(0, 1, 0, &code); zephir_update_property_array_append(this_ptr, SL("_codes"), code TSRMLS_CC); RETURN_THISW(); }
/** * Sets the name of the default module * * @param string moduleName * @return Test\Router */ PHP_METHOD(Test_Router, setDefaultModule) { zval *moduleName; zephir_fetch_params(0, 1, 0, &moduleName); zephir_update_property_this(this_ptr, SL("_defaultModule"), moduleName TSRMLS_CC); RETURN_THISW(); }
/** * Sets the default action name * * @param string actionName * @return Test\Router */ PHP_METHOD(Test_Router, setDefaultAction) { zval *actionName; zephir_fetch_params(0, 1, 0, &actionName); zephir_update_property_this(this_ptr, SL("_defaultAction"), actionName TSRMLS_CC); RETURN_THISW(); }
/** * Set header * * @param string $name * @param string $value * @return Phalcon\Http\Client\Adapter */ PHP_METHOD(Phalcon_Http_Client_Adapter, setHeader){ zval *name, *value, header = {}; phalcon_fetch_params(0, 2, 0, &name, &value); phalcon_read_property(&header, getThis(), SL("_header"), PH_NOISY); PHALCON_CALL_METHODW(NULL, &header, "set", name, value); RETURN_THISW(); }
/** * Sets the URI source. One of the URI_SOURCE_* constants * *<code> * $router->setUriSource(Router::URI_SOURCE_SERVER_REQUEST_URI); *</code> * * @param string uriSource * @return Test\Router */ PHP_METHOD(Test_Router, setUriSource) { zval *uriSource; zephir_fetch_params(0, 1, 0, &uriSource); zephir_update_property_this(this_ptr, SL("_uriSource"), uriSource TSRMLS_CC); RETURN_THISW(); }
/** * Sets a callback that is called if the route is matched. * The developer can implement any arbitrary conditions here * If the callback returns false the route is treaded as not matched * * @param callback callback * @return Test\Router\Route */ PHP_METHOD(Test_Router_Route, beforeMatch) { zval *callback; zephir_fetch_params(0, 1, 0, &callback); zephir_update_property_this(this_ptr, SL("_beforeMatch"), callback TSRMLS_CC); RETURN_THISW(); }
/** * Sets a set of HTTP methods that constraint the matching of the route (alias of via) * *<code> * $route->setHttpMethods('GET'); * $route->setHttpMethods(array('GET', 'POST')); *</code> * * @param string|array httpMethods * @return Test\Router\Route */ PHP_METHOD(Test_Router_Route, setHttpMethods) { zval *httpMethods; zephir_fetch_params(0, 1, 0, &httpMethods); zephir_update_property_this(this_ptr, SL("_methods"), httpMethods TSRMLS_CC); RETURN_THISW(); }
/** * Sets the parent form to the element */ PHP_METHOD(Phalcon_Forms_Element, setForm) { zval *form; zephir_fetch_params(0, 1, 0, &form); zephir_update_property_this(this_ptr, SL("_form"), form TSRMLS_CC); RETURN_THISW(); }
/** * Sets the group associated with the route */ PHP_METHOD(Phalcon_Mvc_Router_Route, setGroup) { zval *group; zephir_fetch_params(0, 1, 0, &group); zephir_update_property_this(this_ptr, SL("_group"), group TSRMLS_CC); RETURN_THISW(); }
/** * Sets the validation messages related to the element */ PHP_METHOD(Phalcon_Forms_Element, setMessages) { zval *group; zephir_fetch_params(0, 1, 0, &group); zephir_update_property_this(this_ptr, SL("_messages"), group TSRMLS_CC); RETURN_THISW(); }
/** * Sets a default value in case the form does not use an entity * or there is no value available for the element in _POST * * @param mixed value * @return \Phalcon\Forms\ElementInterface */ PHP_METHOD(Phalcon_Forms_Element, setDefault) { zval *value; zephir_fetch_params(0, 1, 0, &value); zephir_update_property_this(this_ptr, SL("_value"), value TSRMLS_CC); RETURN_THISW(); }
/** * Adds a validator to the element */ PHP_METHOD(Phalcon_Forms_Element, addValidator) { zval *validator; zephir_fetch_params(0, 1, 0, &validator); zephir_update_property_array_append(this_ptr, SL("_validators"), validator TSRMLS_CC); RETURN_THISW(); }
/** * Set a before-match condition for the whole group * * @param callable beforeMatch * @return Phalcon\Mvc\Router\Group */ PHP_METHOD(Phalcon_Mvc_Router_Group, beforeMatch) { zval *beforeMatch; zephir_fetch_params(0, 1, 0, &beforeMatch); zephir_update_property_this(this_ptr, SL("_beforeMatch"), beforeMatch TSRMLS_CC); RETURN_THISW(); }
/** * Sets a hostname restriction to the route * *<code> * $route->setHostname('localhost'); *</code> * * @param string|array httpMethods * @return Test\Router\Route */ PHP_METHOD(Test_Router_Route, setHostname) { zval *hostname; zephir_fetch_params(0, 1, 0, &hostname); zephir_update_property_this(this_ptr, SL("_hostname"), hostname TSRMLS_CC); RETURN_THISW(); }
/** * Set common paths for all the routes in the group * * @param array paths * @return Phalcon\Mvc\Router\Group */ PHP_METHOD(Phalcon_Mvc_Router_Group, setPaths) { zval *paths; zephir_fetch_params(0, 1, 0, &paths); zephir_update_property_this(this_ptr, SL("_paths"), paths TSRMLS_CC); RETURN_THISW(); }
/** * Adds a converter to perform an additional transformation for certain parameter * * @param string name * @param callable converter * @return Test\Router\Route */ PHP_METHOD(Test_Router_Route, convert) { zval *name, *converter; zephir_fetch_params(0, 2, 0, &name, &converter); zephir_update_property_array(this_ptr, SL("_converters"), name, converter TSRMLS_CC); RETURN_THISW(); }
/** * Set headers * * @param array $headers * @return Phalcon\Http\Client\Adapter */ PHP_METHOD(Phalcon_Http_Client_Adapter, setHeaders){ zval *headers, header = {}; phalcon_fetch_params(0, 1, 0, &headers); phalcon_read_property(&header, getThis(), SL("_header"), PH_NOISY); PHALCON_CALL_METHODW(NULL, &header, "setMultiple", headers); RETURN_THISW(); }
/** * Adds an option to the current options * * @param array option * @return this */ PHP_METHOD(Phalcon_Forms_Element_Select, addOption) { zval *option; zephir_fetch_params(0, 1, 0, &option); zephir_update_property_array_append(this_ptr, SL("_optionsValues"), option TSRMLS_CC); RETURN_THISW(); }
/** * Set whether router must remove the extra slashes in the handled routes * * @param boolean remove * @return Test\Router */ PHP_METHOD(Test_Router, removeExtraSlashes) { zval *remove; zephir_fetch_params(0, 1, 0, &remove); zephir_update_property_this(this_ptr, SL("_removeExtraSlashes"), remove TSRMLS_CC); RETURN_THISW(); }
/** * Set the choice's options * * @param array|object options * @return \Phalcon\Forms\Element */ PHP_METHOD(Phalcon_Forms_Element_Select, setOptions) { zval *options; zephir_fetch_params(0, 1, 0, &options); zephir_update_property_this(this_ptr, SL("_optionsValues"), options TSRMLS_CC); RETURN_THISW(); }
/** * Sets the default controller name * * @param string controllerName * @return Test\Router */ PHP_METHOD(Test_Router, setDefaultController) { zval *controllerName; zephir_fetch_params(0, 1, 0, &controllerName); zephir_update_property_this(this_ptr, SL("_defaultController"), controllerName TSRMLS_CC); RETURN_THISW(); }
/** * Sets the message formatter */ PHP_METHOD(Phalcon_Logger_Adapter, setFormatter) { zval *formatter; zephir_fetch_params(0, 1, 0, &formatter); zephir_update_property_this(this_ptr, SL("_formatter"), formatter TSRMLS_CC); RETURN_THISW(); }
/** * Sets field name related to message */ PHP_METHOD(Phalcon_Mvc_Model_Message, setField) { zval *field; zephir_fetch_params(0, 1, 0, &field); zephir_update_property_this(this_ptr, SL("_field"), field TSRMLS_CC); RETURN_THISW(); }
/** * Set query builder object */ PHP_METHOD(Phalcon_Paginator_Adapter_QueryBuilder, setQueryBuilder) { zval *builder; zephir_fetch_params(0, 1, 0, &builder); zephir_update_property_this(this_ptr, SL("_builder"), builder TSRMLS_CC); RETURN_THISW(); }
/** * Adds a resource to the collection */ PHP_METHOD(Phalcon_Assets_Collection, add) { zval *resource; zephir_fetch_params(0, 1, 0, &resource); zephir_update_property_array_append(this_ptr, SL("_resources"), resource TSRMLS_CC); RETURN_THISW(); }
/** * Sets the cache options * * @param array options * @return Phalcon\Mvc\View\Simple */ PHP_METHOD(Phalcon_Mvc_View_Simple, setCacheOptions) { zval *options; zephir_fetch_params(0, 1, 0, &options); zephir_update_property_this(this_ptr, SL("_cacheOptions"), options TSRMLS_CC); RETURN_THISW(); }
/** * Adds a filter to the collection */ PHP_METHOD(Phalcon_Assets_Collection, addFilter) { zval *filter; zephir_fetch_params(0, 1, 0, &filter); zephir_update_property_array_append(this_ptr, SL("_filters"), filter TSRMLS_CC); RETURN_THISW(); }
/** * Sets the entity related to the model * * @param object entity */ PHP_METHOD(Phalcon_Forms_Form, setEntity) { zval *entity; zephir_fetch_params(0, 1, 0, &entity); zephir_update_property_this(this_ptr, SL("_entity"), entity TSRMLS_CC); RETURN_THISW(); }