0 follower

Final Class Yiisoft\Mutex\Pgsql\PgsqlMutexFactory

InheritanceYiisoft\Mutex\Pgsql\PgsqlMutexFactory » Yiisoft\Mutex\MutexFactory

Allows creating {@see PgsqlMutex} mutex objects.

Method Details

Hide inherited methods

__construct() public method

public mixed __construct ( PDO $connection )
$connection PDO

PDO connection instance to use.

                public function __construct(PDO $connection)
{
    $this->connection = $connection;
}

            
create() public method

public \Yiisoft\Mutex\MutexInterface create ( string $name )
$name string

                public function create(string $name): MutexInterface
{
    return new PgsqlMutex($name, $this->connection);
}