Append the package

@param  Package | string $package
@return Package
172970
public function appendPackage($package) {
		$package = $this->handlePackage($package);
		
		$this->packages[] = $package;
		return $package;
	}
1228187
public function alreadyPublished($package)
    {
        $path = $this->getDestinationPath($package);

        return $this->files->isDirectory($path);
    }
1120953
protected function buildPackage(array $package) {
    $info = [
      'download' => [
        'type' => 'git',
        'url' => str_replace('git@github.com:', 'https://github.com/', $package['source']['url']),
        'branch' => $package['version'],
        'revision' => $package['source']['reference'],
      ],
    ];

    if (isset($package['extra']['patches_applied'])) {
      $info['patch'] = array_values($package['extra']['patches_applied']);
    }
    return $info;
  }
264686
public function setNodeB($package)
    {
        $this->set('nodeB', $package);
        $this->set('endDate', clone $this->startDate);
        $this->endDate->addSeconds($package->duration);

        return $this;
    }
705588
public function bind(Package $package = null)
    {
        $package = $package ?: new Package();
        
        $navMap = $this->xml->navMap;
        
        $this->consumeNavMap($navMap, $package->navigation->chapters);
        
        return $package;
    }
418053
public function publish($package, $source)
    {
        $destination = $this->publishPath .str_replace('/', DS, "/Packages/{$package}");

        $this->makeDestination($destination);

        return $this->files->copyDirectory($source, $destination);
    }
1348640
protected function addFiles(Package $package, array $files)
    {
        foreach ($files as $name => $paths) {
            $paths = (array) $paths;
            if ('defines' === $name) {
                $paths = array_reverse($paths);
            }
            foreach ($paths as $path) {
                $this->addFile($package, $name, $path);
            }
        }
    }
581869
private String packageAppend(String origPackage, String suffix) {
    if (origPackage == null) {
      return suffix;
    } else {
      return origPackage + "." + suffix;
    }
  }
213916
private function installPath($package) {
    if (isset($this->paths['package'][$package['package']]['path'])){

      return $this->paths['package'][$package['package']]['path'];
    } elseif (isset($this->paths['vendor'][$package['vendor']]['path'])){

      return $this->paths['vendor'][$package['vendor']]['path'];
    } elseif (isset($this->paths['type'][$package['type']]['path'])){

      return $this->paths['type'][$package['type']]['path'];
    } else {
      return false;
    }
  }
739033
public function setPackage($package)
    {
        if ($package === $this->package) {
            return;
        }

        $this->package = $package;
        $this->packageOverridden = false;
    }
666537
public function get(string $package, string $feature = null, string $option = null)
    {
        if (empty($feature) && empty($option)) {
            preg_match('/(\w+)\.(\w+)(\.\w+)?/', $package, $match);

            $package = $match[1];
            $feature = $match[2];
            $option = $match[3] ?? null;
        }

        $parameters = [];
        $parameterName = self::makeParameterName($package, $feature);

        if (array_key_exists($parameterName, $this->cached)) {
            $parameters = $this->cached[$parameterName];
        } else {
            if ($this->parameter->has($parameterName)) {
                $this->cached[$parameterName] = $parameters = $this->parameter->get($parameterName);
            }
        }

        if (empty($option)) {
            return $parameters;
        }

        return (new Dot((array)$parameters))->get(ltrim($option, '.'), null);
    }
488338
public function setPackage($package)
    {
        $parts = explode('/', $package);
        if (count($parts) > 2) {
            throw new BuildException('Invalid package name: ' . $package);
        }

        if (count($parts) == 1) {
            $this->channel = 'pear.php.net';
            $this->package = $parts[0];
        } else {
            $this->channel = $parts[0];
            $this->package = $parts[1];
        }
    }
741811
public function append($string) {
    if (isset($this->body)) $this->body .= "\n";
    $this->body .= $string;
    
    return $this;
  }
153437
protected function iterateDependencies(Package $package, $dev = false)
    {
        $deps = $dev ? $package->getDevRequires() : $package->getRequires();
        foreach (array_keys($deps) as $target) {
            if (isset($this->plainList[$target]) && empty($this->orderedList[$target])) {
                $this->iteratePackage($this->plainList[$target]);
            }
        }
    }
879664
public static function view($package)
    {
        $settings = static::get($package);

        if ($settings and array_key_exists('view', $settings)) {
            return view($settings['view']);
        }

        return '';
    }
224923
public function update($package = null)
    {
        if (! is_null($package)) {
            $package = '"'.$package.'"';
        }
        $process = $this->getProcess();
        $process->setCommandLine(trim($this->findComposer().' update '.$package));
        $process->run($this->output);
    }
480144
public function append($label): self
    {
        $label = $this->filterComponent($label);
        if (null === $label) {
            return $this;
        }

        return new self($this->getContent().self::SEPARATOR.$label);
    }