PHP Classes

File: src/Generics/Lockable.php

Recommend this page to a friend!
  Classes of Maik Greubel   PHP Generics   src/Generics/Lockable.php   Download  
File: src/Generics/Lockable.php
Role: Class source
Content type: text/plain
Description: Lockable interface
Class: PHP Generics
Framework for accessing streams, sockets and logs
Author: By
Last change: Update of src/Generics/Lockable.php
Date: 2 months ago
Size: 691 bytes
 

Contents

Class file image Download
<?php

/**
 * This file is part of the PHP Generics package.
 *
 * @package Generics
 */
namespace Generics;

/**
 * This interface describes a lockable implementation
 *
 * @author Maik Greubel <greubel@nkey.de>
 */
interface Lockable
{

   
/**
     * Lock resource.
     *
     * @throws \Generics\LockException in case of lock has failed
     */
   
public function lock();

   
/**
     * Unlock resource
     *
     * @throws \Generics\LockException in case of unlock has failed
     */
   
public function unlock();

   
/**
     * Return the current locking state
     *
     * @return true in case of lock is enabled, false otherwise
     */
   
public function isLocked(): bool;
}