We are moving our forum in GitHub Discussions. For questions about Phalcon v3/v4 you can visit here and for Phalcon v5 here.

Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

Where can i find phalcon_fetch_params function definition?

Hello,

i'm currently trying to write a couple of extensions for Phalcon, i would like to see such kind of functions for more understanding. Can't find them using google :(

Realy? ))))) You can find all what you need in ext/kerner/*.h header files :)



8.0k
Accepted
answer
edited Oct '14

ext/kernel/main.h

/** Low overhead parse/fetch parameters */
#define phalcon_fetch_params(memory_grow, required_params, optional_params, ...) \
    if (phalcon_fetch_parameters(ZEND_NUM_ARGS() TSRMLS_CC, required_params, optional_params, __VA_ARGS__) == FAILURE) { \
        if (memory_grow) { \
            RETURN_MM_NULL(); \
        } else { \
            RETURN_NULL(); \
        } \
    }

Oh, ok, thanks! Exactly i'm not making any implementation in C, just preparing Memcached cache adapter for incubator to propose their implementation in C by Phalcon developers :) But i have to extend original classes.. so i need to know how do they work inside. Thanks a lot!

It's quite impossible to use memcache adapter with sessions.. it has no locks :/



98.9k

According to this, memcached provides session-locking:

http://www.php.net/manual/en/memcached.sessions.php#91153

Yup, i know that it is possible to define just some settings in php.ini, thanks. But i need some more control on sessions mechanism, for example - to have ability to prolong session without SID change, that's why i need Memcached cache adapter and Memcached session adapter. Moreover, memcache extension is quite outdated, i can't understand why frameworks usually implements memcache instead of memcached.

P.S. @Phalcon - thx very much for examples in incubator, they are very useful.