PdoAdapter
        
        extends AbstractAdapter
    
    
            
            in package
            
        
    
            
            implements
                            PruneableInterface                    
    
    
        
        
Interfaces, Classes, Traits and Enums
- PruneableInterface
 - Interface extends psr-6 and psr-16 caches to allow for pruning (deletion) of all expired cache items.
 
Table of Contents
- $maxIdLength : mixed
 - $apcuSupported : mixed
 - $conn : mixed
 - $connectionOptions : mixed
 - $dataCol : mixed
 - $driver : mixed
 - $dsn : mixed
 - $idCol : mixed
 - $lifetimeCol : mixed
 - $marshaller : mixed
 - $namespace : mixed
 - $password : mixed
 - $phpFilesSupported : mixed
 - $serverVersion : mixed
 - $table : mixed
 - $timeCol : mixed
 - $username : mixed
 - __construct() : mixed
 - You can either pass an existing database connection as PDO instance or a Doctrine DBAL Connection or a DSN string that will be used to lazy-connect to the database when the cache is actually used.
 - commit() : bool
 - {@inheritdoc}
 - createConnection() : mixed
 - createSystemCache() : AdapterInterface
 - Returns the best possible adapter that your runtime supports.
 - createTable() : mixed
 - Creates the table to store cache items which can be called once for setup.
 - prune() : bool
 - doClear() : mixed
 - {@inheritdoc}
 - doDelete() : mixed
 - {@inheritdoc}
 - doFetch() : mixed
 - {@inheritdoc}
 - doHave() : mixed
 - {@inheritdoc}
 - doSave() : mixed
 - {@inheritdoc}
 - getConnection() : PDO|Connection
 - getServerVersion() : string
 
Properties
$maxIdLength
    protected
        mixed
    $maxIdLength
     = 255
        
        
    
$apcuSupported
    private
    static    mixed
    $apcuSupported
    
        
        
    
$conn
    private
        mixed
    $conn
    
        
        
    
$connectionOptions
    private
        mixed
    $connectionOptions
     = []
        
        
    
$dataCol
    private
        mixed
    $dataCol
     = 'item_data'
        
        
    
$driver
    private
        mixed
    $driver
    
        
        
    
$dsn
    private
        mixed
    $dsn
    
        
        
    
$idCol
    private
        mixed
    $idCol
     = 'item_id'
        
        
    
$lifetimeCol
    private
        mixed
    $lifetimeCol
     = 'item_lifetime'
        
        
    
$marshaller
    private
        mixed
    $marshaller
    
        
        
    
$namespace
    private
        mixed
    $namespace
    
        
        
    
$password
    private
        mixed
    $password
     = ''
        
        
    
$phpFilesSupported
    private
    static    mixed
    $phpFilesSupported
    
        
        
    
$serverVersion
    private
        mixed
    $serverVersion
    
        
        
    
$table
    private
        mixed
    $table
     = 'cache_items'
        
        
    
$timeCol
    private
        mixed
    $timeCol
     = 'item_time'
        
        
    
$username
    private
        mixed
    $username
     = ''
        
        
    
Methods
__construct()
You can either pass an existing database connection as PDO instance or a Doctrine DBAL Connection or a DSN string that will be used to lazy-connect to the database when the cache is actually used.
    public
                    __construct(PDO|Connection|string $connOrDsn[, string $namespace = '' ], int $defaultLifetime[, array<string|int, mixed> $options = [] ][, MarshallerInterface $marshaller = null ]) : mixed
        When a Doctrine DBAL Connection is passed, the cache table is created automatically when possible. Otherwise, use the createTable() method.
List of available options:
- db_table: The name of the table [default: cache_items]
 - db_id_col: The column where to store the cache id [default: item_id]
 - db_data_col: The column where to store the cache data [default: item_data]
 - db_lifetime_col: The column where to store the lifetime [default: item_lifetime]
 - db_time_col: The column where to store the timestamp [default: item_time]
 - db_username: The username when lazy-connect [default: '']
 - db_password: The password when lazy-connect [default: '']
 - db_connection_options: An array of driver-specific connection options [default: []]
 
Parameters
- $connOrDsn : PDO|Connection|string
 - 
                    
a \PDO or Connection instance or DSN string or null
 - $namespace : string = ''
 - $defaultLifetime : int
 - $options : array<string|int, mixed> = []
 - $marshaller : MarshallerInterface = null
 
Tags
Return values
mixed —commit()
{@inheritdoc}
    public
                    commit() : bool
    
    
    
        Return values
bool —createConnection()
    public
            static        createConnection(string $dsn[, array<string|int, mixed> $options = [] ]) : mixed
        
        Parameters
- $dsn : string
 - $options : array<string|int, mixed> = []
 
Return values
mixed —createSystemCache()
Returns the best possible adapter that your runtime supports.
    public
            static        createSystemCache(string $namespace, int $defaultLifetime, string $version, string $directory[, LoggerInterface $logger = null ]) : AdapterInterface
        Using ApcuAdapter makes system caches compatible with read-only filesystems.
Parameters
- $namespace : string
 - $defaultLifetime : int
 - $version : string
 - $directory : string
 - $logger : LoggerInterface = null
 
Return values
AdapterInterface —createTable()
Creates the table to store cache items which can be called once for setup.
    public
                    createTable() : mixed
        Cache ID are saved in a column of maximum length 255. Cache data is saved in a BLOB.
Tags
Return values
mixed —prune()
    public
                    prune() : bool
    
    
    
        Return values
bool —doClear()
{@inheritdoc}
    protected
                    doClear(string $namespace) : mixed
    
        Parameters
- $namespace : string
 
Return values
mixed —doDelete()
{@inheritdoc}
    protected
                    doDelete(array<string|int, mixed> $ids) : mixed
    
        Parameters
- $ids : array<string|int, mixed>
 
Return values
mixed —doFetch()
{@inheritdoc}
    protected
                    doFetch(array<string|int, mixed> $ids) : mixed
    
        Parameters
- $ids : array<string|int, mixed>
 
Return values
mixed —doHave()
{@inheritdoc}
    protected
                    doHave(string $id) : mixed
    
        Parameters
- $id : string
 
Return values
mixed —doSave()
{@inheritdoc}
    protected
                    doSave(array<string|int, mixed> $values, int $lifetime) : mixed
    
        Parameters
- $values : array<string|int, mixed>
 - $lifetime : int
 
Return values
mixed —getConnection()
    private
                    getConnection() : PDO|Connection
    
    
    
        Return values
PDO|Connection —getServerVersion()
    private
                    getServerVersion() : string