コード例 #1
0
 public function createPackage($name, $config)
 {
     $prefixes = $config['prefix'];
     $isUrl = Util::containsUrl($prefixes);
     return $this->getPackageDefinition($isUrl)->addArgument($isUrl ? $prefixes : $prefixes[0])->addArgument($this->createVersionStrategy($name, $config['manifest']))->setPublic(false);
 }
コード例 #2
0
 /**
  * Returns true if the manifest's path has not been defined AND:
  *  - a prefix has not been defined
  *  - OR if a prefix has been defined, it's not a URL
  *
  * Note that the manifest's configuration can be a string, in which case it
  * represents the path to the manifest file.
  *
  * This method is public because of the inability to use $this in closures
  * in PHP 5.3.
  *
  * @param  array   $config
  * @return boolean
  */
 public function mustApplyManifestDefaultPath($config)
 {
     return isset($config['manifest']) && !is_string($config['manifest']) && !isset($config['manifest']['path']) && (!isset($config['prefix']) || !Util::containsUrl($config['prefix']));
 }