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

Get ascii content path from grumphp.yml file
public getAsciiContentPath ( $resource ) : string | null
$resource
Результат string | null
Пример #1
0
 /**
  * Load an ascii image
  *
  * @param $resource
  *
  * @return 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 file_get_contents($file);
     }
     // Embedded ASCII art:
     $embeddedFile = $this->getAsciiPath() . $file;
     if ($this->fileSystem->exists($embeddedFile)) {
         return file_get_contents($embeddedFile);
     }
     // Error:
     return sprintf('ASCII file %s could not be found.', $file);
 }