add in support for building PHPT_Core from git repo and add build-specific files...
[phpt.git] / src / PHPT / CodeRunner.php
blob0f879d3b862b012534366e7cbcc78a239241d1a9
1 <?php
3 class PHPT_CodeRunner
5 private $_driver = null;
7 public function __construct($type = null)
9 if (is_null($type)) {
10 $type = strtoupper(substr(PHP_OS, 0, 3)) == 'WIN' ? 'WScriptShell' : 'Proc';
12 $runner_name = 'PHPT_CodeRunner_Driver_' . $type;
13 $this->_driver = new $runner_name($this);
16 public function __set($key, $value)
18 $this->_driver->$key = $value;
21 public function __get($key)
23 return $this->_driver->$key;
26 public function run($filename)
28 return $this->_driver->run($filename);
31 public function validate()
33 $this->_driver->validate();