Skip to content

Commit

Permalink
add the used namespace to the examples (#1745)
Browse files Browse the repository at this point in the history
* add the used namespace to the examples

* add interface namespace

* alphabetical order
  • Loading branch information
franzholz authored Mar 5, 2022
1 parent 06262d5 commit f88dc84
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Documentation/ApiOverview/LockingApi/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,10 @@ Examples

Acquire and use an exclusive, blocking lock::

use TYPO3\CMS\Core\Locking\LockingStrategyInterface;
use TYPO3\CMS\Core\Locking\LockFactory;
// ...

$lockFactory = GeneralUtility::makeInstance(LockFactory::class);

// createLocker will return an instance of class which implements
Expand All @@ -159,6 +163,10 @@ Acquire and use an exclusive, blocking lock::

Acquire and use an exclusive, non-blocking lock::

use TYPO3\CMS\Core\Locking\LockingStrategyInterface;
use TYPO3\CMS\Core\Locking\LockFactory;
// ...

$lockFactory = GeneralUtility::makeInstance(LockFactory::class);

// get lock strategy that supports exclusive, shared and non-blocking
Expand Down

0 comments on commit f88dc84

Please sign in to comment.