From aa53d52798687aa884e5b95d36a013f33c694eaf Mon Sep 17 00:00:00 2001 From: Toon Schoenmakers Date: Fri, 13 Mar 2015 11:55:14 +0100 Subject: Implemented a simple sapi_name() method which will return the current sapi --- zend/sapi.cpp | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 zend/sapi.cpp (limited to 'zend/sapi.cpp') diff --git a/zend/sapi.cpp b/zend/sapi.cpp new file mode 100644 index 0000000..79393f7 --- /dev/null +++ b/zend/sapi.cpp @@ -0,0 +1,31 @@ +/** + * Sapi.cpp + * + * This file holds the implementation for the Php::sapi_name() function + * + * @author Toon Schoenmakers + */ + +/** + * Dependencies + */ +#include "includes.h" + +/** + * Open PHP namespace + */ +namespace Php { + +/** + * Retrieve the sapi name we're running on + * @return const char* + */ +const char *sapi_name() +{ + return sapi_module.name; +} + +/** + * End of namespace + */ +} -- cgit v1.2.3