getName() public method

public getName ( ) : string
return string
Exemplo n.º 1
0
 /**
  * Adds new package to info to Smuggler
  *
  * @param RemotePackage $remotePackage
  */
 protected function addPackage(RemotePackage $remotePackage)
 {
     list($vendor, $name) = explode('/', $remotePackage->getName());
     $package = new Package();
     $package->setFullName($remotePackage->getName());
     $package->setName($name);
     $package->setVendor($vendor);
     $this->getDoctrineHelper()->getEntityManager()->persist($package);
 }
Exemplo n.º 2
0
 /**
  * Get the readme file contents if one exists
  * @param Package $package
  * @return string
  */
 private function getReadmeFileFor(Package $package)
 {
     $readmeLocation = 'storage/modules/' . $package->getName();
     if ($this->diskFactory->disk('local')->exists($readmeLocation . '/readme.md')) {
         return $this->diskFactory->disk('local')->get($readmeLocation . '/readme.md');
     }
     if ($this->diskFactory->disk('local')->exists($readmeLocation . '/README.md')) {
         return $this->diskFactory->disk('local')->get($readmeLocation . '/README.md');
     }
     return '';
 }