Symfony\Component\Console\Application::getLongVersion PHP Method

getLongVersion() public method

Returns the long version of the application.
public getLongVersion ( ) : string
return string The long application version
    public function getLongVersion()
    {
        if ('UNKNOWN' !== $this->getName()) {
            if ('UNKNOWN' !== $this->getVersion()) {
                return sprintf('%s <info>%s</info>', $this->getName(), $this->getVersion());
            }
            return $this->getName();
        }
        return 'Console Tool';
    }

Usage Example

Beispiel #1
0
 public function getLongVersion()
 {
     $version = parent::getLongVersion() . ' by <comment>Fabien Potencier</comment>';
     if ('@' . 'git-commit@' !== ($commit = '@git-commit@')) {
         $version .= ' (' . substr($commit, 0, 7) . ')';
     }
     return $version;
 }
All Usage Examples Of Symfony\Component\Console\Application::getLongVersion