From 8041475aab2b8efad7d2857027331bd626d26312 Mon Sep 17 00:00:00 2001 From: Agustin Henze Date: Wed, 26 Aug 2015 07:57:04 -0300 Subject: Imported Upstream version 7.6.4 --- nikola/plugins/compile/php.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'nikola/plugins/compile/php.py') diff --git a/nikola/plugins/compile/php.py b/nikola/plugins/compile/php.py index bb436e5..28f4923 100644 --- a/nikola/plugins/compile/php.py +++ b/nikola/plugins/compile/php.py @@ -37,12 +37,14 @@ from hashlib import md5 class CompilePhp(PageCompiler): + """Compile PHP into PHP.""" name = "php" friendly_name = "PHP" def compile_html(self, source, dest, is_two_file=True): + """Compile source file into HTML and save as dest.""" makedirs(os.path.dirname(dest)) with io.open(dest, "w+", encoding="utf8") as out_file: with open(source, "rb") as in_file: @@ -51,6 +53,7 @@ class CompilePhp(PageCompiler): return True def create_post(self, path, **kw): + """Create a new post.""" content = kw.pop('content', None) onefile = kw.pop('onefile', False) # is_page is not used by create_post as of now. @@ -80,4 +83,5 @@ class CompilePhp(PageCompiler): fd.write(content) def extension(self): + """Return extension used for PHP files.""" return ".php" -- cgit v1.2.3