summaryrefslogtreecommitdiff
path: root/include/script.h
diff options
context:
space:
mode:
authorMartijn Otto <martijn.otto@copernica.com>2015-03-26 16:00:10 +0100
committerMartijn Otto <martijn.otto@copernica.com>2015-03-26 16:00:10 +0100
commit7a928e2b19bddf152fd838469cc50805d4132401 (patch)
tree0a6657f4b94c27556b2f218e407f752018540d3b /include/script.h
parentae4fa5f871d937773e9facde87a32784e715e3ae (diff)
Changed default visibility for symbols in the PHP-CPP library to hidden and explicitly exported all symbols available from the public API. Moved the hiddenpointer to the zend implementation directory as it is not meant to be used publicly and not referenced anywhere from the API anyway
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
*/