PNG  IHDR;IDATxܻn0K )(pA 7LeG{ §㻢|ذaÆ 6lذaÆ 6lذaÆ 6lom$^yذag5bÆ 6lذaÆ 6lذa{ 6lذaÆ `}HFkm,mӪôô! x|'ܢ˟;E:9&ᶒ}{v]n&6 h_tڠ͵-ҫZ;Z$.Pkž)!o>}leQfJTu іچ\X=8Rن4`Vwl>nG^is"ms$ui?wbs[m6K4O.4%/bC%t Mז -lG6mrz2s%9s@-k9=)kB5\+͂Zsٲ Rn~GRC wIcIn7jJhۛNCS|j08yiHKֶۛkɈ+;SzL/F*\Ԕ#"5m2[S=gnaPeғL lذaÆ 6l^ḵaÆ 6lذaÆ 6lذa; _ذaÆ 6lذaÆ 6lذaÆ RIENDB` * * For the full copyright and license information, please view * the LICENSE file that was distributed with this source code. */ namespace Composer\XdebugHandler; /** * @author John Stevenson */ class PhpConfig { /** * Use the original PHP configuration * * @return array PHP cli options */ public function useOriginal() { $this->getDataAndReset(); return array(); } /** * Use standard restart settings * * @return array PHP cli options */ public function useStandard() { if ($data = $this->getDataAndReset()) { return array('-n', '-c', $data['tmpIni']); } return array(); } /** * Use environment variables to persist settings * * @return array PHP cli options */ public function usePersistent() { if ($data = $this->getDataAndReset()) { $this->updateEnv('PHPRC', $data['tmpIni']); $this->updateEnv('PHP_INI_SCAN_DIR', ''); } return array(); } /** * Returns restart data if available and resets the environment * * @return array|null */ private function getDataAndReset() { if ($data = XdebugHandler::getRestartSettings()) { $this->updateEnv('PHPRC', $data['phprc']); $this->updateEnv('PHP_INI_SCAN_DIR', $data['scanDir']); } return $data; } /** * Updates a restart settings value in the environment * * @param string $name * @param string|false $value */ private function updateEnv($name, $value) { Process::setEnv($name, false !== $value ? $value : null); } }