Sets the package name.
If no channel is given, "pear.php.net" is used.

@param string $package Single package name, or "channel/name" combination

@throws BuildException
@return void
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];
        }
    }
1241218
public function package($package, $namespace = null, $path = null)
    {
        $namespace = $this->getPackageNamespace($package, $namespace);
        $files     = $this->app->make('files');

        $path = $path ? : $this->guessPackagePath();

        if ($files->isDirectory($config = $path . '/config')) {
            $this->addConfigComponent($package, $namespace, $config);
        }


        if ($files->isDirectory($lang = $path . '/lang')) {
            $this->addLanguageComponent($package, $namespace, $lang);
        }


        if ($files->isDirectory($views = $path . '/views')) {
            $this->addViewComponent($package, $namespace, $views);
        }
    }
364833
public function movePackage($package)
    {
        if (! empty($package->dependencies)) {
            foreach ($package->dependencies as $dependency) {
                $this->movePackage($dependency);
            }
        }

        $this->mover->movePackage($package);
    }
1105929
protected function publishAssets(string $package): void
    {
        if (! is_null($path = $this->getPath())) {
            $this->assets->publish($package, $path);
        } else {
            $this->assets->publishPackage($package);
        }

        $this->output->writeln('<info>Assets published for package:</info> '.$package);
    }
78067
public function package(string $package, ?string $namespace = null) : void {
        if (is_null($namespace)) {
            list($vendor, $namespace) = explode('/', $package);
        }

        $this->finder->addNamespace($namespace, $package);
    }
131453
public function setNotification($notification = '')
    {
        if ('' == $notification) {
            $notification = 'General Notification';
        }

        if (!is_string($notification)) {
            throw new BuildException(
                '"notification" attribute is invalid.' .
                ' Expect to be a string, actual is ' . gettype($notification)
            );
        }

        $this->notification = $notification;
    }
1218339
public function updateEntry($package)
	{
		$this->verifyCommand($package);

		$lines = file($this->less);

		// Set the new colors
		$lines[0] = '@bg:                ' . $package['bg'] . ";\n";
		$lines[1] = '@gray:              ' . $package['gray'] . ";\n";
		$lines[2] = '@brand-primary:     ' . $package['primary'] . ";\n";
		$lines[3] = '@brand-info:        ' . $package['info'] . ";\n";
		$lines[4] = '@brand-success:     ' . $package['success'] . ";\n";
		$lines[5] = '@brand-warning:     ' . $package['warning'] . ";\n";
		$lines[6] = '@brand-danger:      ' . $package['danger'] . ";\n";
		$lines[7] = '@menuColor:         ' . $package['menu'] . ";\n";

		$this->file->delete($this->less);
		$this->file->put($this->less, implode($lines));
	}
1364341
function setPackager( $timestamp = false, $host = false, $packager = false )
    {
        if ( $timestamp )
            $this->Parameters['packaging']['timestamp'] = $timestamp;
        if ( $host )
            $this->Parameters['packaging']['host'] = $host;
        if ( $packager )
            $this->Parameters['packaging']['packager'] = $packager;
    }
732808
public function setPackage($package)
    {
        $this->package = implode('\\', array_map(function ($piece) {
            return Inflector::classify(Inflector::underscore($piece));
        }, explode('.', $package)));
        
        return $this;
    }
372778
private function loadBehavior($package)
    {
        if (isset($package['type']) && $package['type'] == self::BEHAVIOR_PACKAGE_TYPE) {

            // find propel behavior information
            if (isset($package['extra'])) {
                $extra = $package['extra'];

                if (isset($extra['name']) && isset($extra['class'])) {
                    return [
                        'name' => $extra['name'],
                        'class' => $extra['class'],
                        'package' => $package['name']
                    ];
                } else {
                    throw new BuildException(sprintf('Cannot read behavior name and class from package %s', $package['name']));
                }
            }
        }

        return null;
    }
872790
public function setPackage($package)
    {
        if ($package instanceof AbstractPackage) {
            $this->package = $package;
        } else {
            $this->package = PackageHelper::getPackage($package);
        }

        return $this;
    }
918319
public function setName($name, $build)
    {
        $this->_name = (string) $name;
        if (isset($this->_name) && isset($this->_value)) {
            $build->getProperties()->set($this->_name, $this->_value);
        }
    }
80219
private function requireComposerPackage($package)
    {
        $composer = $this->findComposer();
        $process = new Process($composer.' require '.$package.''.$this->getDevOption(),
                       null, null, null, null);
        $this->output->writeln('<info>Running composer require '.$package.$this->getDevOption().'</info>');
        $process->run(function ($type, $line) {
            $this->output->write($line);
        });
    }
719463
public function add(Package $package)
    {
        $name = $package->getName();
        if (isset($this->packages[$name])) {
            return;
        }

        $this->packages[$name] = $package;
    }
1105775
protected void setPackageName(String newName, ResourceSet resourceSet) {
		final EObject object = resourceSet.getEObject(this.uriProvider.apply(resourceSet), true);
		if (object instanceof SarlScript) {
			((SarlScript) object).setPackage(newName);
		} else {
			throw new RefactoringException("SARL script not loaded."); //$NON-NLS-1$
		}
	}
35107
public function setPackage($package)
    {
        if ($package != $this->package) {
            $this->layoutLocation = null;
        }
        $this->package = $this->treatPackageName($package);
    }
705588
public function bind(Package $package = null)
    {
        $package = $package ?: new Package();
        
        $navMap = $this->xml->navMap;
        
        $this->consumeNavMap($navMap, $package->navigation->chapters);
        
        return $package;
    }