summaryrefslogtreecommitdiff
path: root/include/file.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/file.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/file.h')
-rw-r--r--include/file.h31
1 files changed, 15 insertions, 16 deletions
diff --git a/include/file.h b/include/file.h
index 7029bb6..fff3cd0 100644
--- a/include/file.h
+++ b/include/file.h
@@ -7,7 +7,7 @@
* @author Emiel Bruijntjes <emiel.bruijntjes@copernica.com>
* @copyright 2014 Copernica BV
*/
-
+
/**
* Set up namespace
*/
@@ -16,23 +16,23 @@ namespace Php {
/**
* Class definition
*/
-class File
+class PHPCPP_EXPORT File
{
public:
/**
* Constructor
- *
+ *
* The constructor receives a filename as parameter. It uses the normal
- * PHP include path resolve algorithms to find the location of the file.
- *
+ * PHP include path resolve algorithms to find the location of the file.
+ *
* @param name the filename
* @param size size of the filename
*/
File(const char *name, size_t size);
-
+
/**
* Alternative constructor with just a filename
- *
+ *
* @param name the filename
*/
File(const char *name) : File(name, ::strlen(name)) {}
@@ -42,7 +42,7 @@ public:
* @param name the filename
*/
File(const std::string &name) : File(name.c_str(), name.size()) {}
-
+
/**
* Alternative constructor with a Value object
* @param name the filename
@@ -53,13 +53,13 @@ public:
* Destructor
*/
virtual ~File();
-
+
/**
* Does the file exist?
* @return boolean
*/
bool exists();
-
+
/**
* Is this a valid file?
* @return boolean
@@ -71,20 +71,20 @@ public:
* @return Php::Value
*/
Value once();
-
+
/**
* Execute the file
* @return Php::Value
*/
Value execute();
-
+
private:
/**
* The full resolved path name
* @var const char *
*/
char *_path = nullptr;
-
+
/**
* The opcodes of this file
* @var Opcodes
@@ -96,11 +96,10 @@ private:
* @return bool
*/
bool compile();
-
+
};
-
+
/**
* End of namespace
*/
}
-