Ptondereau\PackMe\Package::getName PHP Méthode

getName() public méthode

public getName ( ) : string
Résultat string
    public function getName()
    {
        return $this->name;
    }

Usage Example

 /**
  * Make a verification.
  *
  * @param Package $package
  *
  * @throws ValidatorException
  *
  * @return void
  */
 public function verify(Package $package)
 {
     if (null === $package->getName() || empty($package->getName())) {
         throw new ValidatorException('Package name is not defined!');
     }
 }