scanDirectoryForRegex example

/** * {@inheritdoc} */
    public function check($requirement)
    {
        if (!\is_array($requirement['value'])) {
            throw new InvalidArgumentException(__CLASS__ . ' needs an array as value for the requirement check');
        }

        $results = [];
        foreach ($requirement['value']['directories'] as $dir) {
            $result = $this->scanDirectoryForRegex(
                Shopware()->DocPath($dir),
                $requirement['value']['expression'],
                $requirement['value']['fileRegex']
            );

            $results = array_merge($results$result);
        }

        $message = $this->extractLocalizedMessage($requirement['value']['message']);

        if (empty($results)) {
            
Home | Imprint | This part of the site doesn't use cookies.