You are here

public function PharInvocationCollection::findByCallback in Drupal 7

Parameters

callable $callback:

bool $reverse:

Return value

null|PharInvocation

Overrides Collectable::findByCallback

3 calls to PharInvocationCollection::findByCallback()
PharInvocationCollection::assertUniqueBaseName in misc/typo3/phar-stream-wrapper/src/Resolver/PharInvocationCollection.php
Asserts that base-name is unique. This disallows having multiple invocations for same base-name but having different alias names.
PharInvocationCollection::assertUniqueInvocation in misc/typo3/phar-stream-wrapper/src/Resolver/PharInvocationCollection.php
Asserts that combination of base-name and alias is unique. This allows having multiple invocations for same base-name but having different alias names (for whatever reason).
PharInvocationCollection::triggerDuplicateAliasWarning in misc/typo3/phar-stream-wrapper/src/Resolver/PharInvocationCollection.php
Triggers warning for invocations with same alias and same confirmation state.

File

misc/typo3/phar-stream-wrapper/src/Resolver/PharInvocationCollection.php, line 66

Class

PharInvocationCollection

Namespace

TYPO3\PharStreamWrapper\Resolver

Code

public function findByCallback($callback, $reverse = false) {
  foreach ($this
    ->getInvocations($reverse) as $invocation) {
    if (call_user_func($callback, $invocation) === true) {
      return $invocation;
    }
  }
  return null;
}