Exemple #1
0
 /**
  * Sets system properties and the environment variables for this project.
  *
  * @return void
  */
 public function setSystemProperties()
 {
     // first get system properties
     $systemP = array_merge(self::getProperties(), Phing::getProperties());
     foreach ($systemP as $name => $value) {
         $this->setPropertyInternal($name, $value);
     }
     // and now the env vars
     foreach ($_SERVER as $name => $value) {
         // skip arrays
         if (is_array($value)) {
             continue;
         }
         $this->setPropertyInternal('env.' . $name, $value);
     }
     return true;
 }
Exemple #2
0
 /**
  * Report a listing of system properties existing in the current phing.
  *
  * @param PrintStream $out the stream to print the properties to.
  */
 private static function doReportSystemProperties(PrintStream $out)
 {
     $phing = new Phing();
     $phingprops = $phing->getProperties();
     foreach ($phingprops as $key => $value) {
         $out->println($key . " : " . $value);
     }
 }