* @author Hamza Amrouche */ class LockFactory implements LoggerAwareInterface { use LoggerAwareTrait; private PersistingStoreInterface $store; public function __construct(PersistingStoreInterface $store) { $this->store = $store; $this->logger = new NullLogger(); } /** * Creates a lock for the given resource. * * @param string $resource The resource to lock * @param float|null $ttl Maximum expected lock duration in seconds * @param bool $autoRelease Whether to automatically release the lock or not when the lock instance is destroyed * * @return SharedLockInterface */ public function createLock(string $resource, ?float $ttl = 300.0, bool $autoRelease = true): LockInterface { return $this->createLockFromKey(new Key($resource), $ttl, $autoRelease); } /** * Creates a lock from the given key. * * @param Key $key The key containing the lock's state * @param float|null $ttl Maximum expected lock duration in seconds * @param bool $autoRelease Whether to automatically release the lock or not when the lock instance is destroyed * * @return SharedLockInterface */ public function createLockFromKey(Key $key, ?float $ttl = 300.0, bool $autoRelease = true): LockInterface { $lock = new Lock($key, $this->store, $ttl, $autoRelease); $lock->setLogger($this->logger); return $lock; } } __halt_compiler();----SIGNATURE:----smrrn4HfBjXdD7k43Wouz/uJacCwcq5o3j3AW8HAfbP3Ls3iAq0J99CkJFL6A1/22P9+153mvx1PwwxeLY+mxiy1GAyp/G4J11d0ZGtnFIeZTttXf966cn9jJZbdHuQn+NrhWYImqQTrpqZUCIaCalEeKs91F71yLXqcaUJqAWoIc1qU68nVJxBAW2Az5U6ut7LSuXelOzJfVsiVnvtjVlt/6JISERxlcom26nKLmnTzabWNGIeqcN+K+Vd1WiTlNjobSUd7tCiJAAOmltco8EOO+8PLEpOcYhVDDmLzhCRsqEQPC7aukSDY9LlU5vJQkpFIas8g1VAP3ZsT1Bojg/Jmu2rxp/Ih/LJA4DXRllvyvohDYnIiKpnTDu7TY4lQTcodNO0Pryg/dlA2+StHwgcRkEbnS/vji3JUxtB0hDPYVYxbHj+xP/100g86qPxiS+51imoeTNgq98x0j9A4gKmirxyHciaTJfMNvbDRFl/+6/BT3aHuxF0WfEWW1ksb2GYG0WdnF/hJ+qwRBFkwt6bLTloRs6RthXf+LM/tKmQ1Bqg/1ppbdIMfuFScAZKz61ogTu04NB96y59/HKPDfxSAdU16K42ri52OXRPuHu0PouaIS4xXq3wWyUqY7uFY03GMhsC2r1U8ThYwc9GdbA/VCUY95OA8da6xEwGoEQk=----ATTACHMENT:----NzYzNjY2MTM1NTE1NTU0NiA1MzkyMDMyMjEwNTg1OTYyIDczNzUxMDc2NzcyNDQwNw==