has() public méthode

public has ( $name )
Exemple #1
0
 /**
  * Returns the default stage
  *
  * @return string|null
  */
 public function getDefaultStage()
 {
     if (!$this->parameters->has(self::PARAM_DEFAULT_STAGE)) {
         return null;
     }
     return $this->parameters->get(self::PARAM_DEFAULT_STAGE);
 }
Exemple #2
0
 /**
  * @param string $name
  * @return mixed
  * @throws \InvalidArgumentException
  */
 public function __get($name)
 {
     if ($this->collections->has($name)) {
         return $this->collections[$name];
     } else {
         throw new \InvalidArgumentException("Property \"{$name}\" does not exist.");
     }
 }
 /**
  * @throws \RuntimeException
  * @return \Deployer\Bootstrap\BootstrapByConfigFile
  */
 public function initClusters()
 {
     foreach ((array) $this->clusterConfig as $name => $config) {
         try {
             $config = new Collection($config);
             $clusterBuilder = $config->has('port') ? $this->clusterBuilders[] = \Deployer\cluster($name, $config['nodes'], $config['port']) : ($this->clusterBuilders[] = \Deployer\cluster($name, $config['nodes']));
             unset($config['local']);
             unset($config['nodes']);
             unset($config['port']);
             $this->executeBuilderMethods($config, $clusterBuilder);
         } catch (\RuntimeException $e) {
             throw new \RuntimeException("Error processing clusters: " . $name);
         }
     }
     return $this;
 }
Exemple #4
0
 /**
  * Checks if set var exists.
  *
  * @param string $name
  * @return bool
  */
 public function has($name)
 {
     return $this->values->has($name);
 }