Class: PhpQueryHook

Inherits:
PhpFileHook
  • Object
show all
Defined in:
lib/query_hook.rb

Instance Method Summary collapse

Methods inherited from PhpFileHook

#tempfile_extension

Instance Method Details

#command_line(filename) ⇒ Object



2
3
4
# File 'lib/query_hook.rb', line 2

def command_line(filename)
  "php #{filename}"
end

#compile_file_content(req) ⇒ Object



6
7
8
9
10
11
12
13
14
# File 'lib/query_hook.rb', line 6

def compile_file_content(req)
  <<EOF
<?php
#{req.extra}
#{req.content}

echo #{req.query};
EOF
end