function importRequireNode($util) { $package = $util->attributeValue('fragment'); $path = rsViewPath($package); if ($path == $this->init_path) { $this->fail('You have tried to recursively require an RSML fragment', $util); } else { $this->required = true; $this->fragment_files[$path] = filemtime($path); $atts = $util->attributeList(); $new_path = ''; if (count($atts) > 1) { $data = file_get_contents($path); foreach ($atts as $name => $value) { if ($name != 'fragment') { $data = str_replace('$' . strtoupper(str_replace('-', '_', $name)) . '$', $value, $data); } } $data = preg_replace('/\\$.*\\$/', '', $data); $new_path = Application::CACHE . 'dead-' . time() . '-' . $package . '.t'; $path = $new_path; file_put_contents($new_path, $data); chmod($new_path, 0664); } $this->parseDocument($path); if ($new_path) { unlink($new_path); } } }
public static function load($path) { $to_load = rsViewPath($path); $ret = MarkupInterpreter::load($to_load, 'remote.rsml.RemoteView'); return $ret; }