src/Console/Helper/PathsHelper.php
public function getAsciiContent(string $resource): string
    {
        $file = $this->config->getAsciiContentPath($resource);

        // Disabled:
        if (null === $file) {
            return '';
        }

        // Specified by user:
        if ($this->fileSystem->exists($file)) {
            return $this->fileSystem->readFromFileInfo(new SplFileInfo($file));
        }

        // Embedded ASCII art:
        $embeddedFile = $this->getAsciiPath().$file;
        if ($this->fileSystem->exists($embeddedFile)) {
            return $this->fileSystem->readFromFileInfo(new SplFileInfo($embeddedFile));
        }

        // Error:
        return sprintf('ASCII file %s could not be found.', $file);
    }
public function getAsciiContent(string $resource): string
    {
        $file = $this->config->getAsciiContentPath($resource);

        // Disabled:
        if (null === $file) {
            return '';
        }

        // Specified by user:
        if ($this->fileSystem->exists($file)) {
            return $this->fileSystem->readFromFileInfo(new SplFileInfo($file));
        }

        // Embedded ASCII art:
        $embeddedFile = $this->getAsciiPath().$file;
        if ($this->fileSystem->exists($embeddedFile)) {
            return $this->fileSystem->readFromFileInfo(new SplFileInfo($embeddedFile));
        }

        // Error:
        return sprintf('ASCII file %s could not be found.', $file);
    }
public function getAsciiContent ( string $ resource ) : string { $ file = $ this -> config -> getAsciiContentPath ( $ resource ) ; // Disabled: if ( null === $ file ) { return '' ; } // Specified by user: if ( $ this -> fileSystem -> exists ( $ file ) ) { return $ this -> fileSystem -> readFromFileInfo ( new SplFileInfo ( $ file ) ) ; } // Embedded ASCII art: $ embeddedFile = $ this -> getAsciiPath ( ) . $ file ; if ( $ this -> fileSystem -> exists ( $ embeddedFile ) ) { return $ this -> fileSystem -> readFromFileInfo ( new SplFileInfo ( $ embeddedFile ) ) ; } // Error: return sprintf ( 'ASCII file %s could not be found.' , $ file ) ; }
Load an ascii image.
Load an ascii image .