private function applyToFileIDOnFilesystem(callable $callable, $fileID, $strictHashCheck = true)
    {
        $publicSet = [
            $this->getPublicFilesystem(),
            $this->getPublicResolutionStrategy(),
            self::VISIBILITY_PUBLIC
        ];

        $protectedSet = [
            $this->getProtectedFilesystem(),
            $this->getProtectedResolutionStrategy(),
            self::VISIBILITY_PROTECTED
        ];

        /** @var Filesystem $fs */
        /** @var FileResolutionStrategy $strategy */
        /** @var string $visibility */

        // First we try to search for exact file id string match
        foreach ([$publicSet, $protectedSet] as $set) {
            list($fs, $strategy, $visibility) = $set;

            if ($fs->has($fileID)) {
                $response = $callable(
                    $strategy->resolveFileID($fileID, $fs),
                    $fs,
                    $strategy,
                    $visibility
                );
                if ($response !== false) {
                    return $response;
                }
            }
        }

        // Let's fall back to using our FileResolution strategy to see if our FileID matches alternative formats
        foreach ([$publicSet, $protectedSet] as $set) {
            list($fs, $strategy, $visibility) = $set;

            $parsedFileID = $strategy->resolveFileID($fileID, $fs);

            if ($parsedFileID) {
                $response = $callable($parsedFileID, $fs, $strategy, $visibility);
                if ($response !== false) {
                    return $response;
                }
            }
        }

        return null;
    }
private function applyToFileIDOnFilesystem(callable $callable, $fileID, $strictHashCheck = true)
    {
        $publicSet = [
            $this->getPublicFilesystem(),
            $this->getPublicResolutionStrategy(),
            self::VISIBILITY_PUBLIC
        ];

        $protectedSet = [
            $this->getProtectedFilesystem(),
            $this->getProtectedResolutionStrategy(),
            self::VISIBILITY_PROTECTED
        ];

        /** @var Filesystem $fs */
        /** @var FileResolutionStrategy $strategy */
        /** @var string $visibility */

        // First we try to search for exact file id string match
        foreach ([$publicSet, $protectedSet] as $set) {
            list($fs, $strategy, $visibility) = $set;

            if ($fs->has($fileID)) {
                $response = $callable(
                    $strategy->resolveFileID($fileID, $fs),
                    $fs,
                    $strategy,
                    $visibility
                );
                if ($response !== false) {
                    return $response;
                }
            }
        }

        // Let's fall back to using our FileResolution strategy to see if our FileID matches alternative formats
        foreach ([$publicSet, $protectedSet] as $set) {
            list($fs, $strategy, $visibility) = $set;

            $parsedFileID = $strategy->resolveFileID($fileID, $fs);

            if ($parsedFileID) {
                $response = $callable($parsedFileID, $fs, $strategy, $visibility);
                if ($response !== false) {
                    return $response;
                }
            }
        }

        return null;
    }
private function applyToFileIDOnFilesystem ( callable $ callable , $ fileID , $ strictHashCheck = true ) { $ publicSet = [ $ this -> getPublicFilesystem ( ) , $ this -> getPublicResolutionStrategy ( ) , self :: VISIBILITY_PUBLIC ] ; $ protectedSet = [ $ this -> getProtectedFilesystem ( ) , $ this -> getProtectedResolutionStrategy ( ) , self :: VISIBILITY_PROTECTED ] ; /** @var Filesystem $fs */ /** @var FileResolutionStrategy $strategy */ /** @var string $visibility */ // First we try to search for exact file id string match foreach ( [ $ publicSet , $ protectedSet ] as $ set ) { list ( $ fs , $ strategy , $ visibility ) = $ set ; if ( $ fs -> has ( $ fileID ) ) { $ response = $ callable ( $ strategy -> resolveFileID ( $ fileID , $ fs ) , $ fs , $ strategy , $ visibility ) ; if ( $ response !== false ) { return $ response ; } } } // Let's fall back to using our FileResolution strategy to see if our FileID matches alternative formats foreach ( [ $ publicSet , $ protectedSet ] as $ set ) { list ( $ fs , $ strategy , $ visibility ) = $ set ; $ parsedFileID = $ strategy -> resolveFileID ( $ fileID , $ fs ) ; if ( $ parsedFileID ) { $ response = $ callable ( $ parsedFileID , $ fs , $ strategy , $ visibility ) ; if ( $ response !== false ) { return $ response ; } } } return null ; }
Equivalent to `applyToFileOnFilesystem`, only it expects a `fileID1 string instead of a ParsedFileID.

@param callable $callable Action to apply.
@param string $fileID
@param bool $strictHashCheck
@return mixed
Equivalent to applyToFileOnFilesystem only it expects a fileID1 string instead of a ParsedFileID .