コード例 #1
0
 /**
  * {@inheritdoc}
  */
 public function save(EnvironmentVariable $environmentVariable)
 {
     $command = 'echo "' . $environmentVariable->getName() . '=' . $environmentVariable->getValue() . '" >> ' . $this->file;
     $process = new Process($command);
     $this->processRunner->run($process);
 }
コード例 #2
0
 /**
  * {@inheritdoc}
  */
 public function has(EnvironmentVariable $environmentVariable)
 {
     $value = getenv($environmentVariable->getName());
     return !empty($value);
 }