Setup local project drush alias.

@param array $opts
@option bool $exclude-remote Don't render remote drush aliases.

@return DrupalTasks
@throws \Exception
485317
public function drupalDrushAlias($opts = ['exclude-remote' => false])
    {
        $this->executeCommandHook(__FUNCTION__, 'before');
        /** @var DrupalProjectType $instance */
        $instance = $this->getProjectInstance();
        $instance->setupDrushAlias($opts['exclude-remote']);
        $this->executeCommandHook(__FUNCTION__, 'after');

        return $this;
    }
170026
public function setExcludes(array $excludes = []): self
    {
        foreach ($excludes as $exclude) {
            $this->addExclude($exclude);
        }

        return $this;
    }
976255
protected function executeWebhook(array $opts, array $files) {
        return $this->client->apimanager()->endpoints->webhook->executeWebhook($this->id, $this->token, $opts, $files, array('wait' => true))->then(function ($data) {
            $channel = $this->client->channels->get($this->channelID);
            if($channel instanceof \CharlotteDunois\Yasmin\Interfaces\TextChannelInterface) {
                return $channel->_createMessage($data);
            }
            
            return $data;
        });
    }
256970
public function setTemplateDir($dirs): Sdopx
    {
        $this->templateDirs = [];
        $this->templateJoined = '';
        if (empty($dirs)) {
            return $this;
        }
        if (is_string($dirs)) {
            $this->templateDirs[] = $dirs;
            return $this;
        } elseif (is_array($dirs)) {
            foreach ($dirs as $key => $value) {
                if (!is_string($value) || empty($value)) {
                    continue;
                }
                $this->templateDirs[$key] = $value;
            }
        }
        return $this;
    }
147337
public function prepareSearchEntity(array $options = array())
    {
        $alias = $options['alias'];

        /**
         * @var Entity $search_entity
         */
        $search_entity = $this->controller->{$alias}->newEntity();

        $search_entity->setAccess('*', true);
        $this->controller->{$alias}->patchEntity($search_entity, $this->controller->request->getData());
        $this->controller->set(compact('search_entity'));
    }
308282
protected function createClient(array $opts=[])
  {
    if ( !$this->guzzleClient ) {
      $this->guzzleClient = new \GuzzleHttp\Client();
      $this->cookieJar = new \GuzzleHttp\Cookie\CookieJar();
    }

    return $this->guzzleClient;
  }
516609
public function useAlias($alias)
    {
        $aliasGetter = 'get'.ucfirst($alias).'Alias';

        if (! method_exists($this->indexConfigurator, $aliasGetter)) {
            throw new Exception(sprintf(
                'The index configurator %s doesn\'t have getter for the %s alias.',
                get_class($this->indexConfigurator),
                $alias
            ));
        }

        $this->payload['index'] = call_user_func([$this->indexConfigurator, $aliasGetter]);

        return $this;
    }
1364536
public function Create ($exclude = array ())
	{
		
		// Get the next value if there is none
		
		if (!$this->iget ('value'))
		{
			
			$this->iset ('value', 1 + (int)$this->getValue (array (
				'select'	=> 'MAX(value)',
				'where'		=> array (
					array ('module_id', $this->iget ('module_id'))
				)
			)));
			
		}
		
		// Call parent
		
		return parent::Create ($exclude);
		
	}
345807
public function projectDotenvReload($envPath = '.env', $opts = ['format' => 'table', 'fields' => ''])
    {
        // Reload
        $result = $this->taskDotenvReload()
            ->path($envPath)
            ->run();

        if (!$result->wasSuccessful()) {
            $this->exitError("Failed to run command");
        }

        return new PropertyList($result->getData());
    }
1100306
private function makeFinder(array $directories = [], array $exclude = []): Finder
    {
        $finder = new Finder();

        if (empty($directories)) {
            $directories = $this->config->getDirectories();
        }

        if (empty($exclude)) {
            $exclude = $this->config->getExcludes();
        }

        return $finder->files()->in($directories)->exclude($exclude)->name('*.php');
    }
403937
public function merge($opts)
    {
        $primary_opts = self::parse($opts);
        if ($primary_opts->apiKey === null) {
            $primary_opts->apiKey = $this->apiKey;
        }
        $primary_opts->headers = array_merge($this->headers, $primary_opts->headers);
        return $primary_opts;
    }
41443
public function setCurlOpts(array $opts, $merge = true)
    {
        $this->curlOpts = ($merge)
            ? array_replace($this->curlOpts, $opts)
            : $opts;
    }
912320
public function setAlias($aliases, $option)
	{
		$aliases = (array) $aliases;

		foreach ($aliases as $alias)
		{
			$this->aliases[$alias] = $option;
		}

		return $this;
	}
863571
public function ciTravisBuild($opts = ['name' => null, 'recipes' => false, 'image' => false])
    {
        if (!$opts['image']) $opts['image'] = Config::$baseImage;
        return (new Builder)->execute($opts);
    }
1045775
public static function create($params, $opts = null)
    {
        $type = Util\Util::classType($params['type']);
        $url = self::classUrl() . "/$type";
        list($resp, $usedOpts) = self::request(self::METHOD_POST, $url, $params, $opts);
        return Util\Util::arrayToObject($resp, $usedOpts);
    }
1171757
public function execute(array $packages = [], array $options = [])
    {
        // Handle passed in options
        foreach ($options as $key => $value) {
            $this->getOptions()->set($key, $value);
        }

        /** @var \Composer\Composer $composer */
        $composer = $this->getComposer();
        $io = $this->getIO();
        $install = Installer::create($io, $composer);
        try {
            $install
                ->setDryRun($this->getOptions()->dryRun())
                ->setVerbose($this->getOptions()->verbose())
                ->setPreferSource($this->getOptions()->preferSource())
                ->setPreferDist($this->getOptions()->preferDist())
                ->setDevMode(!$this->getOptions()->noDev())
                ->setDumpAutoloader(!$this->getOptions()->noAutoloader())
                ->setRunScripts(!$this->getOptions()->noScripts())
                ->setOptimizeAutoloader($this->getOptions()->optimizeAutoloader())
                ->setUpdate(true)
                ->setUpdateWhitelist($packages)
                ->setWhitelistDependencies($this->getOptions()->withDependencies())
                ->setIgnorePlatformRequirements($this->getOptions()->ignorePlatformReqs())
                ->setPreferStable($this->getOptions()->preferStable())
                ->setPreferLowest($this->getOptions()->preferLowest())
                ->setRunScripts(!$this->getOptions()->noScripts())
            ;

            return $install->run();
        } catch (\Exception $e) {
            $msg = sprintf('%s received an error from Composer: %s in %s::%s', __METHOD__, $e->getMessage(), $e->getFile(), $e->getLine());
            $this->app['logger.system']->critical($msg, ['event' => 'exception', 'exception' => $e]);

            throw new PackageManagerException($e->getMessage(), $e->getCode(), $e);
        }
    }
697700
public function listApps($optParams = array()) {
      $params = array();
      $params = array_merge($params, $optParams);
      $data = $this->__call('list', array($params));
      if ($this->useObjects()) {
        return new AppList($data);
      } else {
        return $data;
      }
    }