summaryrefslogtreecommitdiff
path: root/include/script.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/script.h')
-rw-r--r--include/script.h28
1 files changed, 14 insertions, 14 deletions
diff --git a/include/script.h b/include/script.h
index 6aee034..860b9bc 100644
--- a/include/script.h
+++ b/include/script.h
@@ -5,7 +5,7 @@
*
* The difference between directly calling eval() is that the script object
* will first evaluate the string, and then it can be executed multiple times.
- *
+ *
* @author Emiel Bruijntjes <emiel.bruijntjes@copernica.com>
* @copyright 2014 Copernica BV
*/
@@ -28,26 +28,26 @@ class Opcodes;
/**
* Class definition
*/
-class Script
+class PHPCPP_EXPORT Script
{
public:
/**
* Constructor
- *
+ *
* The constructor will not throw any exceptions, even when invalid
* PHP code is passed to it that can not be evaluated. You should call
* the valid() to find out if the script was valid (could be parsed).
- *
+ *
* @param name Name of the PHP script
- * @param source PHP source code to be evaluated
+ * @param source PHP source code to be evaluated
* @param size Length of the source code
*/
Script(const char *name, const char *source, size_t size) _NOEXCEPT;
-
+
/**
* Alternative constructor without a size
* @param name Name of the PHP script
- * @param source PHP source code to be evaluated
+ * @param source PHP source code to be evaluated
*/
Script(const char *name, const char *source) _NOEXCEPT : Script(name, source, ::strlen(source)) {}
@@ -63,38 +63,38 @@ public:
* @param source PHP source code to be evaluated
*/
Script(const char *source) _NOEXCEPT : Script("Unknown", source, ::strlen(source)) {}
-
+
/**
* Constructor based on a std::string
* @param source PHP source code to be evaluated
*/
Script(const std::string &source) _NOEXCEPT : Script("Unknown", source.c_str(), source.size()) {}
-
+
/**
* Destructor
*/
virtual ~Script();
-
+
/**
* Is the script a valid PHP script without syntax errors?
* @return bool
*/
bool valid() const;
-
+
/**
* Execute the script
* The return value of the script is returned
* @return Value
*/
Value execute() const;
-
+
private:
/**
* The opcodes
* @var Opcodes
*/
Opcodes *_opcodes;
-
+
/**
* Helper function to compile the source code
* @param name name of the script
@@ -105,7 +105,7 @@ private:
static struct _zend_op_array *compile(const char *name, const char *phpcode, size_t size);
};
-
+
/**
* End of namespace
*/