abstract class BagOStuff implements IExpiringStore, LoggerAwareInterface {
/** @var array[] Lock tracking */
protected $locks = [];
- /** @var integer ERR_* class constant */
+ /** @var int ERR_* class constant */
protected $lastError = self::ERR_NONE;
/** @var string */
protected $keyspace = 'local';
protected $logger;
/** @var callback|null */
protected $asyncHandler;
- /** @var integer Seconds */
+ /** @var int Seconds */
protected $syncTimeout;
/** @var bool */
/** @var callable[] */
protected $busyCallbacks = [];
- /** @var integer[] Map of (ATTR_* class constant => QOS_* class constant) */
+ /** @var int[] Map of (ATTR_* class constant => QOS_* class constant) */
protected $attrMap = [];
/** Possible values for getLastError() */
* @param string $key
* @param int $ttl Time-to-live (seconds)
* @param callable $callback Callback that derives the new value
- * @param integer $flags Bitfield of BagOStuff::READ_* constants [optional]
+ * @param int $flags Bitfield of BagOStuff::READ_* constants [optional]
* @return mixed The cached value if found or the result of $callback otherwise
* @since 1.27
*/
* higher tiers using standard TTLs.
*
* @param string $key
- * @param integer $flags Bitfield of BagOStuff::READ_* constants [optional]
- * @param integer $oldFlags [unused]
+ * @param int $flags Bitfield of BagOStuff::READ_* constants [optional]
+ * @param int $oldFlags [unused]
* @return mixed Returns false on failure and if the item does not exist
*/
public function get( $key, $flags = 0, $oldFlags = null ) {
/**
* @param string $key
- * @param integer $flags Bitfield of BagOStuff::READ_* constants [optional]
+ * @param int $flags Bitfield of BagOStuff::READ_* constants [optional]
* @return mixed Returns false on failure and if the item does not exist
*/
abstract protected function doGet( $key, $flags = 0 );
* @note: This method is only needed if merge() uses mergeViaCas()
*
* @param string $key
- * @param mixed $casToken
- * @param integer $flags Bitfield of BagOStuff::READ_* constants [optional]
+ * @param mixed &$casToken
+ * @param int $flags Bitfield of BagOStuff::READ_* constants [optional]
* @return mixed Returns false on failure and if the item does not exist
* @throws Exception
*/
/**
* Get an associative array containing the item for each of the keys that have items.
* @param array $keys List of strings
- * @param integer $flags Bitfield; supports READ_LATEST [optional]
+ * @param int $flags Bitfield; supports READ_LATEST [optional]
* @return array
*/
public function getMulti( array $keys, $flags = 0 ) {
* Make a global cache key.
*
* @since 1.27
- * @param string ... Key component (variadic)
+ * @param string $keys,... Key component
* @return string
*/
public function makeGlobalKey() {
* Make a cache key, scoped to this instance's keyspace.
*
* @since 1.27
- * @param string ... Key component (variadic)
+ * @param string $keys,... Key component
* @return string
*/
public function makeKey() {
}
/**
- * @param integer $flag ATTR_* class constant
- * @return integer QOS_* class constant
+ * @param int $flag ATTR_* class constant
+ * @return int QOS_* class constant
* @since 1.28
*/
public function getQoS( $flag ) {
* Merge the flag maps of one or more BagOStuff objects into a "lowest common denominator" map
*
* @param BagOStuff[] $bags
- * @return integer[] Resulting flag map (class ATTR_* constant => class QOS_* constant)
+ * @return int[] Resulting flag map (class ATTR_* constant => class QOS_* constant)
*/
protected function mergeFlagMaps( array $bags ) {
$map = [];