GrumPHP\Console\Helper\PathsHelper::getAsciiContent PHP Метод

getAsciiContent() публичный Метод

Load an ascii image
public getAsciiContent ( $resource ) : string
$resource
Результат string
    public function getAsciiContent($resource)
    {
        $file = $this->config->getAsciiContentPath($resource);
        // Disabled:
        if (is_null($file)) {
            return '';
        }
        // Specified by user:
        if ($this->fileSystem->exists($file)) {
            return $this->fileSystem->readFromFileInfo($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);
    }