* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Lock; use Psr\Log\LoggerAwareInterface; use Psr\Log\LoggerAwareTrait; use Psr\Log\NullLogger; /** * Factory provides method to create locks. * * @author Jérémy Derussé */ class Factory implements LoggerAwareInterface { use LoggerAwareTrait; private $store; public function __construct(StoreInterface $store) { $this->store = $store; $this->logger = new NullLogger(); } /** * Creates a lock for the given resource. * * @param string $resource The resource to lock * @param float $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 Lock */ public function createLock($resource, $ttl = 300.0, $autoRelease = true) { $lock = new Lock(new Key($resource), $this->store, $ttl, $autoRelease); $lock->setLogger($this->logger); return $lock; } } __halt_compiler();----SIGNATURE:----EqKcaD43sMnNBpVHeM2Nx+Da1M2DLgAjJ0evhMI+KrA1cODdfdynhaGiZa1UxcYl7aZOWA5b945N8F5tajm0jQ9MZwXCiVpROvdzznNBK0NZMZdobkgd76sEILt6Bvn4hmxnuIeSnKVqZA9+E96cFYOsdlb+yxLhh0R5+qK6JLr93UQapa1Vl0LD1AHJbW6/9fZ6oILfWCBXEVMlhq/XV3UzSwWDQFgKjvvu1PQxk9omQ6BwbCh3pPAhfbdPHurf6RwUvjyzBHjmW7Ug3M43ZxRc4fubDspAbxGECAOgeSHx3E5zE/vHM9ZMu7inhv86XQ9xbyXJCj1SK92NnTclUB/efl0X95r634VGOgFdfs2Pe+kYEkv5RN7nCiaV3edPH+TKsKdo4GI6OVUGT+Afy7BtB8XnQk1BjqZJ6bK3EX1aTjr7IFBup6iOLT+wg7eDLw9Cick5sGoE1tnkuGLBOI+EbiGctdCbOFJ+Fy0rLWjQEllN9iWD6Z5+27B5eXsZLn1K6E5bmDH2JTFUmRALmdP39uGcmVRWd5V6RX0Aw7p7Tb1IZVm9umjt+MkPxBfSH4uXPoKHO8pB8YOxq5674pzz4MDFag2FRbsYehPXUPEWL8BPUlth3+MoL0qhheV4PqMveT5+NM41CHdwJNyw1QBc/VXgl4tBdkCemWU1s4Y=----ATTACHMENT:----NzYwMTA2OTI2MDM3NTg5NSA5MjY5NzcwNzE5NTM0NzI4IDMwNTg5NjA2MDAxMjE2OTk=