src/Loaders/ProposedOkFilenameLoader.php
/**
     * Resolves the pattern value for the given element name.
     *
     * @param string $element The element name to resolve the pattern value for
     *
     * @return string The resolved pattern value
     * @throws \InvalidArgumentException Is thrown, if the element value can not be loaded from the file resolver configuration
     * @todo Refactorig required, because of duplicate method
     * @see \TechDivision\Import\Loaders\Filters\OkFileFilter::resolvePatternValue()
     */
Resolves the pattern value for the given element name.
@param string $element The element name to resolve the pattern value for


Resolves the pattern value for the given element name . @param string $element The element name to resolve the pattern value for
protected function resolvePatternValue(string $element) : string
    {
        if ($this->getLoader()->countMatches() === 0 || BunchKeys::COUNTER === $element) {
            $methodName = sprintf('get%s', ucfirst($element));
            if (in_array($methodName, get_class_methods($this->getFileResolverConfiguration()))) {
                return call_user_func(array($this->getFileResolverConfiguration(), $methodName));
            }
            throw new \InvalidArgumentException('Can\'t load pattern value for element "%s" from file resolver configuration', $element);
        }
        return $this->getLoader()->getMatch($element);
    }
protected function resolvePatternValue ( string $ element ) : string { if ( $ this -> getLoader ( ) -> countMatches ( ) === 0 || BunchKeys :: COUNTER === $ element ) { $ methodName = sprintf ( 'get%s' , ucfirst ( $ element ) ) ; if ( in_array ( $ methodName , get_class_methods ( $ this -> getFileResolverConfiguration ( ) ) ) ) { return call_user_func ( array ( $ this -> getFileResolverConfiguration ( ) , $ methodName ) ) ; } throw new \ InvalidArgumentException ( 'Can\'t load pattern value for element "%s" from file resolver configuration' , $ element ) ; } return $ this -> getLoader ( ) -> getMatch ( $ element ) ; }
Resolves the pattern value for the given element name.
Resolves the pattern value for the given element name .
// query whether or not matches has been found OR the counter element has been passed // prepare the method name for the callback to load the pattern value with // load the pattern value // stop processing and throw an exception // try to load the pattern value from the matches