Undefined class constant 'RES_NOTFOUND'
Does php-ext-couchbase really define constants like Couchbase::RES_NOTFOUND, Couchbase::RES_SUCCESS? When I call the constant above, an error is reported: Undefined class constant 'RES_NOTFOUND' ...
Hi jan,
Thanks for your reply.
Could we catch couchbase's result code and define the constant by self, such as const RES_NOTFOUND = 13; by now?
Yeah, but that wouldn't be very nice going forward :)
I proposed a solution in the ticket: http://couchbase.com/issues/browse/PCBC-36
Let me know what you think.
Cheers
Jan
--
In most cases, we don't care what the actual value of the constant. We can get the meaning by the constant's name, such as RES_NOTFOUND.
The migration from Memcached::RES_NOTFOUND to Couchbase::RES_NOTFOUND is naturally, acceptable.
Via http://www.couchbase.com/docs/couchbase-sdk-php-1.0.pdf, if($cb_obj->getResultCode() == Couchbase::RES_NOTFOUND), I suppose Couchbase should have defined all the constants, but it did not. So I defined myself, it's not nice as you said.
Maybe couchbase defines its own constants, the offical website's reference seems not talking about them, where could I find them?
Best wishes!
I'll be fixing the docs :)
heh, looks like we just pass through the libcouchbase constants and it looks like an oversight on my part. I'm tracking progress here: http://couchbase.com/issues/browse/PCBC-36