Phalcon storage
NOTE
All classes are prefixed with Phalcon
Storage\Adapter\AbstractAdapter  ¶
¶
  -  Namespace - Phalcon\Storage\Adapter
 
-  Uses - DateInterval
- DateTime
- Exception
- Phalcon\Storage\SerializerFactory
- Phalcon\Storage\Serializer\SerializerInterface
- Phalcon\Support\Exception
 
-  Extends 
-  Implements - AdapterInterface
 
Class AbstractAdapter
@package Phalcon\Storage\Adapter
@property mixed $adapter @property string $defaultSerializer @property int $lifetime @property array $options @property string $prefix @property SerializerInterface $serializer @property SerializerFactory $serializerFactory
Properties¶
/**
 * @var mixed
 */
protected $adapter;
/**
 * Name of the default serializer class
 *
 * @var string
 */
protected $defaultSerializer = php;
/**
 * Name of the default TTL (time to live)
 *
 * @var int
 */
protected $lifetime = 3600;
/**
 * @var array
 */
protected $options;
/**
 * @var string
 */
protected $prefix = ph-memo-;
/**
 * Serializer
 *
 * @var SerializerInterface|null
 */
protected $serializer;
/**
 * Serializer Factory
 *
 * @var SerializerFactory
 */
protected $serializerFactory;
Methods¶
AbstractAdapter constructor. Flushes/clears the cache Decrements a stored number Deletes data from the adapter Reads data from the adapter Returns the adapter - connects to the storage if not connected Name of the default serializer class Returns all the keys stored Returns the prefix Checks if an element exists in the cache Increments a stored number Stores data in the adapterprotected function getArrVal( array $collection, mixed $index, mixed $defaultValue = null, string $cast = null ): mixed;
@throws SupportException
Storage\Adapter\AdapterInterface  ¶
¶
  -  Namespace - Phalcon\Storage\Adapter
 
-  Uses - Phalcon\Storage\Serializer\SerializerInterface
 
-  Extends 
-  Implements 
Interface for Phalcon\Logger adapters
Methods¶
Flushes/clears the cache Decrements a stored number Deletes data from the adapter Reads data from the adapter Returns the already connected adapter or connects to the backend server(s) Returns all the keys stored Returns the prefix for the keys Checks if an element exists in the cache Increments a stored number Stores data in the adapter. If the TTL isnull (default) or not defined then the default TTL will be used, as set in this adapter. If the TTL is 0 or a negative number, a delete() will be issued, since this item has expired. If you need to set this key forever, you should use the setForever() method.  Stores data in the adapter forever. The key needs to manually deleted from the adapter. Storage\Adapter\Apcu¶
-  Namespace - Phalcon\Storage\Adapter
 
-  Uses - APCUIterator
- DateInterval
- Exception
- Phalcon\Storage\SerializerFactory
- Phalcon\Support\Exception
 
-  Extends AbstractAdapter
-  Implements 
Apcu adapter
@property array $options
Properties¶
Methods¶
Apcu constructor. Flushes/clears the cache Decrements a stored number Reads data from the adapter Stores data in the adapter Checks if an element exists in the cache Increments a stored number Stores data in the adapter. If the TTL isnull (default) or not defined then the default TTL will be used, as set in this adapter. If the TTL is 0 or a negative number, a delete() will be issued, since this item has expired. If you need to set this key forever, you should use the setForever() method.  Stores data in the adapter forever. The key needs to manually deleted from the adapter.   @todo Remove the below once we get traits       Storage\Adapter\Libmemcached¶
-  Namespace - Phalcon\Storage\Adapter
 
-  Uses - DateInterval
- Exception
- Phalcon\Storage\Exception
- Phalcon\Storage\SerializerFactory
- Phalcon\Support\Exception
 
-  Extends AbstractAdapter
-  Implements 
Libmemcached adapter
Properties¶
Methods¶
Libmemcached constructor. Flushes/clears the cache Decrements a stored number Reads data from the adapter Returns the already connected adapter or connects to the Memcached server(s) Stores data in the adapter Checks if an element exists in the cache Increments a stored number Stores data in the adapter. If the TTL isnull (default) or not defined then the default TTL will be used, as set in this adapter. If the TTL is 0 or a negative number, a delete() will be issued, since this item has expired. If you need to set this key forever, you should use the setForever() method.  Stores data in the adapter forever. The key needs to manually deleted from the adapter. Storage\Adapter\Memory¶
-  Namespace - Phalcon\Storage\Adapter
 
-  Uses - DateInterval
- Exception
- Phalcon\Storage\SerializerFactory
- Phalcon\Support\Exception
 
-  Extends AbstractAdapter
-  Implements 
Memory adapter
@property array $data @property array $options
Properties¶
Methods¶
Memory constructor. Flushes/clears the cache Decrements a stored number Deletes data from the adapter Stores data in the adapter Checks if an element exists in the cache Increments a stored number Stores data in the adapter. If the TTL isnull (default) or not defined then the default TTL will be used, as set in this adapter. If the TTL is 0 or a negative number, a delete() will be issued, since this item has expired. If you need to set this key forever, you should use the setForever() method.  Stores data in the adapter forever. The key needs to manually deleted from the adapter.  Storage\Adapter\Redis¶
-  Namespace - Phalcon\Storage\Adapter
 
-  Uses - DateInterval
- Exception
- Phalcon\Storage\Exception
- Phalcon\Storage\SerializerFactory
- Phalcon\Support\Exception
 
-  Extends AbstractAdapter
-  Implements 
Redis adapter
@property array $options
Properties¶
Methods¶
Redis constructor. Flushes/clears the cache Decrements a stored number Reads data from the adapter Returns the already connected adapter or connects to the Redis server(s) Stores data in the adapter Checks if an element exists in the cache Increments a stored number Stores data in the adapter. If the TTL isnull (default) or not defined then the default TTL will be used, as set in this adapter. If the TTL is 0 or a negative number, a delete() will be issued, since this item has expired. If you need to set this key forever, you should use the setForever() method.  Stores data in the adapter forever. The key needs to manually deleted from the adapter. Storage\Adapter\Stream¶
-  Namespace - Phalcon\Storage\Adapter
 
-  Uses - DateInterval
- FilesystemIterator
- Iterator
- Phalcon\Storage\Exception
- Phalcon\Storage\SerializerFactory
- Phalcon\Storage\Traits\StorageErrorHandlerTrait
- Phalcon\Support\Exception
- RecursiveDirectoryIterator
- RecursiveIteratorIterator
 
-  Extends AbstractAdapter
-  Implements 
Stream adapter
@property string $storageDir @property array $options
Properties¶
Methods¶
Stream constructor. Flushes/clears the cache Decrements a stored number Reads data from the adapter Reads data from the adapter Stores data in the adapter Checks if an element exists in the cache and is not expired Increments a stored number Stores data in the adapter. If the TTL isnull (default) or not defined then the default TTL will be used, as set in this adapter. If the TTL is 0 or a negative number, a delete() will be issued, since this item has expired. If you need to set this key forever, you should use the setForever() method.  Stores data in the adapter forever. The key needs to manually deleted from the adapter.  @todo Remove the methods below when we get traits  protected function phpFilePutContents( string $filename, mixed $data, int $flags = int, mixed $context = null ): int | bool;
Storage\Adapter\Weak¶
-  Namespace - Phalcon\Storage\Adapter
 
-  Uses - DateInterval
- Exception
- Phalcon\Storage\SerializerFactory
- Phalcon\Storage\Serializer\SerializerInterface
- Phalcon\Support\Exception
 
-  Extends AbstractAdapter
-  Implements 
-  Weak Adapter */ 
Properties¶
/**
 *
 *
 * @var int|null
 */
protected $fetching;
/**
 * @var array
 */
protected $weakList;
/**
 * @var array
 */
protected $options;
Methods¶
Constructor, there are no options Flushes/clears the cache Decrements a stored number Deletes data from the adapter Reads data from the adapter Stores data in the adapter Checks if an element exists in the cache Increments a stored number Stores data in the adapter. If the TTL isnull (default) or not defined then the default TTL will be used, as set in this adapter. If the TTL is 0 or a negative number, a delete() will be issued, since this item has expired. If you need to set this key forever, you should use the setForever() method.  will never set a serializer, WeakReference cannot be serialized  For compatiblity only, there is no Forever with WeakReference. Storage\AdapterFactory¶
-  Namespace - Phalcon\Storage
 
-  Uses - Phalcon\Factory\AbstractFactory
- Phalcon\Storage\Adapter\AdapterInterface
 
-  Extends AbstractFactory
-  Implements 
This file is part of the Phalcon Framework.
(c) Phalcon Team team@phalcon.io
For the full copyright and license information, please view the LICENSE.txt file that was distributed with this source code.
Properties¶
Methods¶
AdapterFactory constructor. Create a new instance of the adapter Returns the available adaptersStorage\Exception¶
-  Namespace - Phalcon\Storage
 
-  Uses 
-  Extends \Exception
-  Implements 
Phalcon\Storage\Exception
Exceptions thrown in Phalcon\Storage will use this class
Storage\Serializer\AbstractSerializer  ¶
¶
  -  Namespace - Phalcon\Storage\Serializer
 
-  Uses 
-  Extends 
-  Implements - SerializerInterface
 
@property mixed $data @property bool $isSuccess
Properties¶
Methods¶
AbstractSerializer constructor. Serialize data Unserialize data Returnstrue if the serialize/unserialize operation was successful; false otherwise   If this returns true, then the data is returned as is Storage\Serializer\Base64¶
-  Namespace - Phalcon\Storage\Serializer
 
-  Uses - InvalidArgumentException
 
-  Extends AbstractSerializer
-  Implements 
This file is part of the Phalcon Framework.
(c) Phalcon Team team@phalcon.io
For the full copyright and license information, please view the LICENSE.txt file that was distributed with this source code.
Methods¶
Serializes data Unserializes data Wrapper for base64_decodeStorage\Serializer\Igbinary¶
-  Namespace - Phalcon\Storage\Serializer
 
-  Uses 
-  Extends AbstractSerializer
-  Implements 
This file is part of the Phalcon Framework.
(c) Phalcon Team team@phalcon.io
For the full copyright and license information, please view the LICENSE.txt file that was distributed with this source code.
Methods¶
Serializes data Unserializes data Serialize Unserialize Wrapper forigbinary_serialize Storage\Serializer\Json¶
-  Namespace - Phalcon\Storage\Serializer
 
-  Uses - InvalidArgumentException
- JsonSerializable
- Phalcon\Support\Helper\Json\Decode
- Phalcon\Support\Helper\Json\Encode
 
-  Extends AbstractSerializer
-  Implements 
This file is part of the Phalcon Framework.
(c) Phalcon Team team@phalcon.io
For the full copyright and license information, please view the LICENSE.txt file that was distributed with this source code.
Properties¶
Methods¶
AbstractSerializer constructor. Serializes data Unserializes dataStorage\Serializer\MemcachedIgbinary¶
-  Namespace - Phalcon\Storage\Serializer
 
-  Uses 
-  Extends None
-  Implements 
Serializer using the built-in Memcached 'igbinary' serializer
Storage\Serializer\MemcachedJson¶
-  Namespace - Phalcon\Storage\Serializer
 
-  Uses 
-  Extends None
-  Implements 
Serializer using the built-in Memcached 'json' serializer
Storage\Serializer\MemcachedPhp¶
-  Namespace - Phalcon\Storage\Serializer
 
-  Uses 
-  Extends None
-  Implements 
Serializer using the built-in Memcached 'php' serializer
Storage\Serializer\Msgpack¶
-  Namespace - Phalcon\Storage\Serializer
 
-  Uses 
-  Extends Igbinary
-  Implements 
This file is part of the Phalcon Framework.
(c) Phalcon Team team@phalcon.io
For the full copyright and license information, please view the LICENSE.txt file that was distributed with this source code.
Methods¶
Serializes dataStorage\Serializer\None¶
-  Namespace - Phalcon\Storage\Serializer
 
-  Uses 
-  Extends AbstractSerializer
-  Implements 
This file is part of the Phalcon Framework.
(c) Phalcon Team team@phalcon.io
For the full copyright and license information, please view the LICENSE.txt file that was distributed with this source code.
Methods¶
Serializes data Unserializes dataStorage\Serializer\Php¶
-  Namespace - Phalcon\Storage\Serializer
 
-  Uses - InvalidArgumentException
 
-  Extends AbstractSerializer
-  Implements 
This file is part of the Phalcon Framework.
(c) Phalcon Team team@phalcon.io
For the full copyright and license information, please view the LICENSE.txt file that was distributed with this source code.
Methods¶
Serializes data Unserializes dataStorage\Serializer\RedisIgbinary¶
-  Namespace - Phalcon\Storage\Serializer
 
-  Uses 
-  Extends None
-  Implements 
Serializer using the built-in Redis 'igbinary' serializer
Storage\Serializer\RedisJson¶
-  Namespace - Phalcon\Storage\Serializer
 
-  Uses 
-  Extends None
-  Implements 
Serializer using the built-in Redis 'json' serializer
Storage\Serializer\RedisMsgpack¶
-  Namespace - Phalcon\Storage\Serializer
 
-  Uses 
-  Extends None
-  Implements 
Serializer using the built-in Redis 'msgpack' serializer
Storage\Serializer\RedisNone¶
-  Namespace - Phalcon\Storage\Serializer
 
-  Uses 
-  Extends None
-  Implements 
Serializer using the built-in Redis 'none' serializer
Storage\Serializer\RedisPhp¶
-  Namespace - Phalcon\Storage\Serializer
 
-  Uses 
-  Extends None
-  Implements 
Serializer using the built-in Redis 'php' serializer
Storage\Serializer\SerializerInterface  ¶
¶
  -  Namespace - Phalcon\Storage\Serializer
 
-  Uses - Serializable
 
-  Extends Serializable
-  Implements 
This file is part of the Phalcon Framework.
(c) Phalcon Team team@phalcon.io
For the full copyright and license information, please view the LICENSE.txt file that was distributed with this source code.
Methods¶
Storage\SerializerFactory¶
-  Namespace - Phalcon\Storage
 
-  Uses - Phalcon\Factory\AbstractFactory
- Phalcon\Storage\Serializer\SerializerInterface
 
-  Extends AbstractFactory
-  Implements 
This file is part of the Phalcon Framework.
(c) Phalcon Team team@phalcon.io
For the full copyright and license information, please view the LICENSE.txt file that was distributed with this source code.