diff --git a/README b/README.md similarity index 100% rename from README rename to README.md diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..e0857ae --- /dev/null +++ b/composer.json @@ -0,0 +1,16 @@ +{ + "authors": [ + { + "email": "dan@perfectcu.be", + "name": "Dan Bryant" + } + ], + "autoload": { + "files": [ + "src/phpQuery/phpQuery.php" + ] + }, + "description": "A composer wrapper for the phpQuery fork found at https://github.com/perfectcube/phpQuery", + "license": "MIT", + "name": "perfectcube/phpquery" +} \ No newline at end of file diff --git a/api-reference/classtrees_phpQuery.html b/docs/api-reference/classtrees_phpQuery.html similarity index 100% rename from api-reference/classtrees_phpQuery.html rename to docs/api-reference/classtrees_phpQuery.html diff --git a/api-reference/elementindex.html b/docs/api-reference/elementindex.html similarity index 100% rename from api-reference/elementindex.html rename to docs/api-reference/elementindex.html diff --git a/api-reference/elementindex_phpQuery.html b/docs/api-reference/elementindex_phpQuery.html similarity index 100% rename from api-reference/elementindex_phpQuery.html rename to docs/api-reference/elementindex_phpQuery.html diff --git a/api-reference/errors.html b/docs/api-reference/errors.html similarity index 100% rename from api-reference/errors.html rename to docs/api-reference/errors.html diff --git a/api-reference/index.html b/docs/api-reference/index.html similarity index 100% rename from api-reference/index.html rename to docs/api-reference/index.html diff --git a/api-reference/li_phpQuery.html b/docs/api-reference/li_phpQuery.html similarity index 100% rename from api-reference/li_phpQuery.html rename to docs/api-reference/li_phpQuery.html diff --git a/api-reference/media/background.png b/docs/api-reference/media/background.png similarity index 100% rename from api-reference/media/background.png rename to docs/api-reference/media/background.png diff --git a/api-reference/media/empty.png b/docs/api-reference/media/empty.png similarity index 100% rename from api-reference/media/empty.png rename to docs/api-reference/media/empty.png diff --git a/api-reference/media/style.css b/docs/api-reference/media/style.css similarity index 100% rename from api-reference/media/style.css rename to docs/api-reference/media/style.css diff --git a/api-reference/phpQuery/Callback.html b/docs/api-reference/phpQuery/Callback.html similarity index 100% rename from api-reference/phpQuery/Callback.html rename to docs/api-reference/phpQuery/Callback.html diff --git a/api-reference/phpQuery/CallbackParam.html b/docs/api-reference/phpQuery/CallbackParam.html similarity index 100% rename from api-reference/phpQuery/CallbackParam.html rename to docs/api-reference/phpQuery/CallbackParam.html diff --git a/api-reference/phpQuery/CallbackReference.html b/docs/api-reference/phpQuery/CallbackReference.html similarity index 100% rename from api-reference/phpQuery/CallbackReference.html rename to docs/api-reference/phpQuery/CallbackReference.html diff --git a/api-reference/phpQuery/DOMDocumentWrapper.html b/docs/api-reference/phpQuery/DOMDocumentWrapper.html similarity index 100% rename from api-reference/phpQuery/DOMDocumentWrapper.html rename to docs/api-reference/phpQuery/DOMDocumentWrapper.html diff --git a/api-reference/phpQuery/DOMEvent.html b/docs/api-reference/phpQuery/DOMEvent.html similarity index 100% rename from api-reference/phpQuery/DOMEvent.html rename to docs/api-reference/phpQuery/DOMEvent.html diff --git a/api-reference/phpQuery/_Callback.php.html b/docs/api-reference/phpQuery/_Callback.php.html similarity index 100% rename from api-reference/phpQuery/_Callback.php.html rename to docs/api-reference/phpQuery/_Callback.php.html diff --git a/api-reference/phpQuery/_DOMDocumentWrapper.php.html b/docs/api-reference/phpQuery/_DOMDocumentWrapper.php.html similarity index 100% rename from api-reference/phpQuery/_DOMDocumentWrapper.php.html rename to docs/api-reference/phpQuery/_DOMDocumentWrapper.php.html diff --git a/api-reference/phpQuery/_DOMEvent.php.html b/docs/api-reference/phpQuery/_DOMEvent.php.html similarity index 100% rename from api-reference/phpQuery/_DOMEvent.php.html rename to docs/api-reference/phpQuery/_DOMEvent.php.html diff --git a/api-reference/phpQuery/_phpQuery.php.html b/docs/api-reference/phpQuery/_phpQuery.php.html similarity index 100% rename from api-reference/phpQuery/_phpQuery.php.html rename to docs/api-reference/phpQuery/_phpQuery.php.html diff --git a/api-reference/phpQuery/_phpQueryEvents.php.html b/docs/api-reference/phpQuery/_phpQueryEvents.php.html similarity index 100% rename from api-reference/phpQuery/_phpQueryEvents.php.html rename to docs/api-reference/phpQuery/_phpQueryEvents.php.html diff --git a/api-reference/phpQuery/_phpQueryObject.php.html b/docs/api-reference/phpQuery/_phpQueryObject.php.html similarity index 100% rename from api-reference/phpQuery/_phpQueryObject.php.html rename to docs/api-reference/phpQuery/_phpQueryObject.php.html diff --git a/api-reference/phpQuery/phpQuery.html b/docs/api-reference/phpQuery/phpQuery.html similarity index 100% rename from api-reference/phpQuery/phpQuery.html rename to docs/api-reference/phpQuery/phpQuery.html diff --git a/api-reference/phpQuery/phpQueryEvents.html b/docs/api-reference/phpQuery/phpQueryEvents.html similarity index 100% rename from api-reference/phpQuery/phpQueryEvents.html rename to docs/api-reference/phpQuery/phpQueryEvents.html diff --git a/api-reference/phpQuery/phpQueryObject.html b/docs/api-reference/phpQuery/phpQueryObject.html similarity index 100% rename from api-reference/phpQuery/phpQueryObject.html rename to docs/api-reference/phpQuery/phpQueryObject.html diff --git a/api-reference/phpQuery/phpQueryPlugins.html b/docs/api-reference/phpQuery/phpQueryPlugins.html similarity index 100% rename from api-reference/phpQuery/phpQueryPlugins.html rename to docs/api-reference/phpQuery/phpQueryPlugins.html diff --git a/api-reference/todolist.html b/docs/api-reference/todolist.html similarity index 100% rename from api-reference/todolist.html rename to docs/api-reference/todolist.html diff --git a/demo.php b/docs/demo.php similarity index 97% rename from demo.php rename to docs/demo.php index 63dacea..fde1e4b 100644 --- a/demo.php +++ b/docs/demo.php @@ -1,5 +1,5 @@ \ No newline at end of file diff --git a/jQueryServer/jQueryServer.js b/lib/jQueryServer/jQueryServer.js similarity index 100% rename from jQueryServer/jQueryServer.js rename to lib/jQueryServer/jQueryServer.js diff --git a/jQueryServer/jQueryServer.php b/lib/jQueryServer/jQueryServer.php similarity index 71% rename from jQueryServer/jQueryServer.php rename to lib/jQueryServer/jQueryServer.php index 3b47d29..326769b 100755 --- a/jQueryServer/jQueryServer.php +++ b/lib/jQueryServer/jQueryServer.php @@ -24,9 +24,9 @@ class jQueryServer { public $allowedHosts = null; function __construct($data) { $pq = null; - include_once(dirname(__FILE__).'/../phpQuery/phpQuery.php'); - if (file_exists(dirname(__FILE__).'/jQueryServer.config.php')) { - include_once(dirname(__FILE__).'/jQueryServer.config.php'); + include_once(__DIR__.'/../src/phpQuery/phpQuery.php'); + if (file_exists(__DIR__.'/jQueryServer.config.php')) { + include_once(__DIR__.'/jQueryServer.config.php'); if ($jQueryServerConfig) $this->config = array_merge_recursive($this->config, $jQueryServerConfig); } @@ -58,7 +58,6 @@ function __construct($data) { phpQuery::ajax($ajax); } else { throw new Exception("URL needed to download content"); - break; } } public function success($response) { @@ -104,5 +103,20 @@ public function success($response) { // : $this->json->decode($data); // } } -new jQueryServer($_POST['data']); -?> \ No newline at end of file + +// default to using token access unless it's been disabled in config +$use_token_access = isset($jQueryServerConfig['useTokenAuth']) ? $jQueryServerConfig['useTokenAuth'] : true; +// pull the local token access value +$access = getenv('JQUERY_SERVER_ACCESS'); +if ($use_token_access !== false) { + // if the env var hasn't been set then lock the system with a random token value + if (empty($access)) { $access = md5(rand().microtime().rand()); } +} +// pull the remote token access value +$token = !empty($_REQUEST['jqaccess']) ? $_REQUEST['jqaccess'] : null; +if($token === $access || !$use_token_access){ + new jQueryServer($_POST['data']); +} +else{ + echo 'You need to provide the correct access token to $_POST requests to jQueryServer(). Set a JQUERY_SERVER_ACCESS variable into your environment (.env file or .htaccess) and include the token value on every request (get, post or cookie) as the value for the key "jqaccess"'; +} diff --git a/phpQuery.code-workspace b/phpQuery.code-workspace new file mode 100644 index 0000000..6e12a8c --- /dev/null +++ b/phpQuery.code-workspace @@ -0,0 +1,8 @@ +{ + "folders": [ + { + "path": "." + } + ], + "settings": {} +} \ No newline at end of file diff --git a/phpQuery/phpQuery.php b/src/phpQuery/phpQuery.php similarity index 99% rename from phpQuery/phpQuery.php rename to src/phpQuery/phpQuery.php index 5d214ad..6556bbf 100644 --- a/phpQuery/phpQuery.php +++ b/src/phpQuery/phpQuery.php @@ -18,12 +18,12 @@ define('DOMELEMENT', 'DOMElement'); define('DOMNODELIST', 'DOMNodeList'); define('DOMNODE', 'DOMNode'); -require_once(dirname(__FILE__).'/phpQuery/DOMEvent.php'); -require_once(dirname(__FILE__).'/phpQuery/DOMDocumentWrapper.php'); -require_once(dirname(__FILE__).'/phpQuery/phpQueryEvents.php'); -require_once(dirname(__FILE__).'/phpQuery/Callback.php'); -require_once(dirname(__FILE__).'/phpQuery/phpQueryObject.php'); -require_once(dirname(__FILE__).'/phpQuery/compat/mbstring.php'); +require_once(__DIR__.'/phpQuery/DOMEvent.php'); +require_once(__DIR__.'/phpQuery/DOMDocumentWrapper.php'); +require_once(__DIR__.'/phpQuery/phpQueryEvents.php'); +require_once(__DIR__.'/phpQuery/Callback.php'); +require_once(__DIR__.'/phpQuery/phpQueryObject.php'); +require_once(__DIR__.'/phpQuery/compat/mbstring.php'); /** * Static namespace for phpQuery functions. * diff --git a/phpQuery/phpQuery/Callback.php b/src/phpQuery/phpQuery/Callback.php similarity index 100% rename from phpQuery/phpQuery/Callback.php rename to src/phpQuery/phpQuery/Callback.php diff --git a/phpQuery/phpQuery/DOMDocumentWrapper.php b/src/phpQuery/phpQuery/DOMDocumentWrapper.php similarity index 100% rename from phpQuery/phpQuery/DOMDocumentWrapper.php rename to src/phpQuery/phpQuery/DOMDocumentWrapper.php diff --git a/phpQuery/phpQuery/DOMEvent.php b/src/phpQuery/phpQuery/DOMEvent.php similarity index 100% rename from phpQuery/phpQuery/DOMEvent.php rename to src/phpQuery/phpQuery/DOMEvent.php diff --git a/phpQuery/phpQuery/Zend/Exception.php b/src/phpQuery/phpQuery/Zend/Exception.php similarity index 100% rename from phpQuery/phpQuery/Zend/Exception.php rename to src/phpQuery/phpQuery/Zend/Exception.php diff --git a/phpQuery/phpQuery/Zend/Http/Client.php b/src/phpQuery/phpQuery/Zend/Http/Client.php similarity index 100% rename from phpQuery/phpQuery/Zend/Http/Client.php rename to src/phpQuery/phpQuery/Zend/Http/Client.php diff --git a/phpQuery/phpQuery/Zend/Http/Client/Adapter/Exception.php b/src/phpQuery/phpQuery/Zend/Http/Client/Adapter/Exception.php similarity index 100% rename from phpQuery/phpQuery/Zend/Http/Client/Adapter/Exception.php rename to src/phpQuery/phpQuery/Zend/Http/Client/Adapter/Exception.php diff --git a/phpQuery/phpQuery/Zend/Http/Client/Adapter/Interface.php b/src/phpQuery/phpQuery/Zend/Http/Client/Adapter/Interface.php similarity index 100% rename from phpQuery/phpQuery/Zend/Http/Client/Adapter/Interface.php rename to src/phpQuery/phpQuery/Zend/Http/Client/Adapter/Interface.php diff --git a/phpQuery/phpQuery/Zend/Http/Client/Adapter/Proxy.php b/src/phpQuery/phpQuery/Zend/Http/Client/Adapter/Proxy.php similarity index 100% rename from phpQuery/phpQuery/Zend/Http/Client/Adapter/Proxy.php rename to src/phpQuery/phpQuery/Zend/Http/Client/Adapter/Proxy.php diff --git a/phpQuery/phpQuery/Zend/Http/Client/Adapter/Socket.php b/src/phpQuery/phpQuery/Zend/Http/Client/Adapter/Socket.php similarity index 100% rename from phpQuery/phpQuery/Zend/Http/Client/Adapter/Socket.php rename to src/phpQuery/phpQuery/Zend/Http/Client/Adapter/Socket.php diff --git a/phpQuery/phpQuery/Zend/Http/Client/Adapter/Test.php b/src/phpQuery/phpQuery/Zend/Http/Client/Adapter/Test.php similarity index 100% rename from phpQuery/phpQuery/Zend/Http/Client/Adapter/Test.php rename to src/phpQuery/phpQuery/Zend/Http/Client/Adapter/Test.php diff --git a/phpQuery/phpQuery/Zend/Http/Client/Exception.php b/src/phpQuery/phpQuery/Zend/Http/Client/Exception.php similarity index 100% rename from phpQuery/phpQuery/Zend/Http/Client/Exception.php rename to src/phpQuery/phpQuery/Zend/Http/Client/Exception.php diff --git a/phpQuery/phpQuery/Zend/Http/Cookie.php b/src/phpQuery/phpQuery/Zend/Http/Cookie.php similarity index 100% rename from phpQuery/phpQuery/Zend/Http/Cookie.php rename to src/phpQuery/phpQuery/Zend/Http/Cookie.php diff --git a/phpQuery/phpQuery/Zend/Http/CookieJar.php b/src/phpQuery/phpQuery/Zend/Http/CookieJar.php similarity index 100% rename from phpQuery/phpQuery/Zend/Http/CookieJar.php rename to src/phpQuery/phpQuery/Zend/Http/CookieJar.php diff --git a/phpQuery/phpQuery/Zend/Http/Exception.php b/src/phpQuery/phpQuery/Zend/Http/Exception.php similarity index 100% rename from phpQuery/phpQuery/Zend/Http/Exception.php rename to src/phpQuery/phpQuery/Zend/Http/Exception.php diff --git a/phpQuery/phpQuery/Zend/Http/Response.php b/src/phpQuery/phpQuery/Zend/Http/Response.php similarity index 100% rename from phpQuery/phpQuery/Zend/Http/Response.php rename to src/phpQuery/phpQuery/Zend/Http/Response.php diff --git a/phpQuery/phpQuery/Zend/Json/Decoder.php b/src/phpQuery/phpQuery/Zend/Json/Decoder.php similarity index 100% rename from phpQuery/phpQuery/Zend/Json/Decoder.php rename to src/phpQuery/phpQuery/Zend/Json/Decoder.php diff --git a/phpQuery/phpQuery/Zend/Json/Encoder.php b/src/phpQuery/phpQuery/Zend/Json/Encoder.php similarity index 100% rename from phpQuery/phpQuery/Zend/Json/Encoder.php rename to src/phpQuery/phpQuery/Zend/Json/Encoder.php diff --git a/phpQuery/phpQuery/Zend/Json/Exception.php b/src/phpQuery/phpQuery/Zend/Json/Exception.php similarity index 100% rename from phpQuery/phpQuery/Zend/Json/Exception.php rename to src/phpQuery/phpQuery/Zend/Json/Exception.php diff --git a/phpQuery/phpQuery/Zend/Loader.php b/src/phpQuery/phpQuery/Zend/Loader.php similarity index 100% rename from phpQuery/phpQuery/Zend/Loader.php rename to src/phpQuery/phpQuery/Zend/Loader.php diff --git a/phpQuery/phpQuery/Zend/Registry.php b/src/phpQuery/phpQuery/Zend/Registry.php similarity index 100% rename from phpQuery/phpQuery/Zend/Registry.php rename to src/phpQuery/phpQuery/Zend/Registry.php diff --git a/phpQuery/phpQuery/Zend/Uri.php b/src/phpQuery/phpQuery/Zend/Uri.php similarity index 100% rename from phpQuery/phpQuery/Zend/Uri.php rename to src/phpQuery/phpQuery/Zend/Uri.php diff --git a/phpQuery/phpQuery/Zend/Uri/Exception.php b/src/phpQuery/phpQuery/Zend/Uri/Exception.php similarity index 100% rename from phpQuery/phpQuery/Zend/Uri/Exception.php rename to src/phpQuery/phpQuery/Zend/Uri/Exception.php diff --git a/phpQuery/phpQuery/Zend/Uri/Http.php b/src/phpQuery/phpQuery/Zend/Uri/Http.php similarity index 100% rename from phpQuery/phpQuery/Zend/Uri/Http.php rename to src/phpQuery/phpQuery/Zend/Uri/Http.php diff --git a/phpQuery/phpQuery/Zend/Validate/Abstract.php b/src/phpQuery/phpQuery/Zend/Validate/Abstract.php similarity index 100% rename from phpQuery/phpQuery/Zend/Validate/Abstract.php rename to src/phpQuery/phpQuery/Zend/Validate/Abstract.php diff --git a/phpQuery/phpQuery/Zend/Validate/Alnum.php b/src/phpQuery/phpQuery/Zend/Validate/Alnum.php similarity index 100% rename from phpQuery/phpQuery/Zend/Validate/Alnum.php rename to src/phpQuery/phpQuery/Zend/Validate/Alnum.php diff --git a/phpQuery/phpQuery/Zend/Validate/Alpha.php b/src/phpQuery/phpQuery/Zend/Validate/Alpha.php similarity index 100% rename from phpQuery/phpQuery/Zend/Validate/Alpha.php rename to src/phpQuery/phpQuery/Zend/Validate/Alpha.php diff --git a/phpQuery/phpQuery/Zend/Validate/Barcode.php b/src/phpQuery/phpQuery/Zend/Validate/Barcode.php similarity index 100% rename from phpQuery/phpQuery/Zend/Validate/Barcode.php rename to src/phpQuery/phpQuery/Zend/Validate/Barcode.php diff --git a/phpQuery/phpQuery/Zend/Validate/Barcode/Ean13.php b/src/phpQuery/phpQuery/Zend/Validate/Barcode/Ean13.php similarity index 100% rename from phpQuery/phpQuery/Zend/Validate/Barcode/Ean13.php rename to src/phpQuery/phpQuery/Zend/Validate/Barcode/Ean13.php diff --git a/phpQuery/phpQuery/Zend/Validate/Barcode/UpcA.php b/src/phpQuery/phpQuery/Zend/Validate/Barcode/UpcA.php similarity index 100% rename from phpQuery/phpQuery/Zend/Validate/Barcode/UpcA.php rename to src/phpQuery/phpQuery/Zend/Validate/Barcode/UpcA.php diff --git a/phpQuery/phpQuery/Zend/Validate/Between.php b/src/phpQuery/phpQuery/Zend/Validate/Between.php similarity index 100% rename from phpQuery/phpQuery/Zend/Validate/Between.php rename to src/phpQuery/phpQuery/Zend/Validate/Between.php diff --git a/phpQuery/phpQuery/Zend/Validate/Ccnum.php b/src/phpQuery/phpQuery/Zend/Validate/Ccnum.php similarity index 100% rename from phpQuery/phpQuery/Zend/Validate/Ccnum.php rename to src/phpQuery/phpQuery/Zend/Validate/Ccnum.php diff --git a/phpQuery/phpQuery/Zend/Validate/Date.php b/src/phpQuery/phpQuery/Zend/Validate/Date.php similarity index 100% rename from phpQuery/phpQuery/Zend/Validate/Date.php rename to src/phpQuery/phpQuery/Zend/Validate/Date.php diff --git a/phpQuery/phpQuery/Zend/Validate/Digits.php b/src/phpQuery/phpQuery/Zend/Validate/Digits.php similarity index 100% rename from phpQuery/phpQuery/Zend/Validate/Digits.php rename to src/phpQuery/phpQuery/Zend/Validate/Digits.php diff --git a/phpQuery/phpQuery/Zend/Validate/EmailAddress.php b/src/phpQuery/phpQuery/Zend/Validate/EmailAddress.php similarity index 100% rename from phpQuery/phpQuery/Zend/Validate/EmailAddress.php rename to src/phpQuery/phpQuery/Zend/Validate/EmailAddress.php diff --git a/phpQuery/phpQuery/Zend/Validate/Exception.php b/src/phpQuery/phpQuery/Zend/Validate/Exception.php similarity index 100% rename from phpQuery/phpQuery/Zend/Validate/Exception.php rename to src/phpQuery/phpQuery/Zend/Validate/Exception.php diff --git a/phpQuery/phpQuery/Zend/Validate/File/Count.php b/src/phpQuery/phpQuery/Zend/Validate/File/Count.php similarity index 100% rename from phpQuery/phpQuery/Zend/Validate/File/Count.php rename to src/phpQuery/phpQuery/Zend/Validate/File/Count.php diff --git a/phpQuery/phpQuery/Zend/Validate/File/Exists.php b/src/phpQuery/phpQuery/Zend/Validate/File/Exists.php similarity index 100% rename from phpQuery/phpQuery/Zend/Validate/File/Exists.php rename to src/phpQuery/phpQuery/Zend/Validate/File/Exists.php diff --git a/phpQuery/phpQuery/Zend/Validate/File/Extension.php b/src/phpQuery/phpQuery/Zend/Validate/File/Extension.php similarity index 100% rename from phpQuery/phpQuery/Zend/Validate/File/Extension.php rename to src/phpQuery/phpQuery/Zend/Validate/File/Extension.php diff --git a/phpQuery/phpQuery/Zend/Validate/File/FilesSize.php b/src/phpQuery/phpQuery/Zend/Validate/File/FilesSize.php similarity index 100% rename from phpQuery/phpQuery/Zend/Validate/File/FilesSize.php rename to src/phpQuery/phpQuery/Zend/Validate/File/FilesSize.php diff --git a/phpQuery/phpQuery/Zend/Validate/File/ImageSize.php b/src/phpQuery/phpQuery/Zend/Validate/File/ImageSize.php similarity index 100% rename from phpQuery/phpQuery/Zend/Validate/File/ImageSize.php rename to src/phpQuery/phpQuery/Zend/Validate/File/ImageSize.php diff --git a/phpQuery/phpQuery/Zend/Validate/File/MimeType.php b/src/phpQuery/phpQuery/Zend/Validate/File/MimeType.php similarity index 100% rename from phpQuery/phpQuery/Zend/Validate/File/MimeType.php rename to src/phpQuery/phpQuery/Zend/Validate/File/MimeType.php diff --git a/phpQuery/phpQuery/Zend/Validate/File/NotExists.php b/src/phpQuery/phpQuery/Zend/Validate/File/NotExists.php similarity index 100% rename from phpQuery/phpQuery/Zend/Validate/File/NotExists.php rename to src/phpQuery/phpQuery/Zend/Validate/File/NotExists.php diff --git a/phpQuery/phpQuery/Zend/Validate/File/Size.php b/src/phpQuery/phpQuery/Zend/Validate/File/Size.php similarity index 100% rename from phpQuery/phpQuery/Zend/Validate/File/Size.php rename to src/phpQuery/phpQuery/Zend/Validate/File/Size.php diff --git a/phpQuery/phpQuery/Zend/Validate/File/Upload.php b/src/phpQuery/phpQuery/Zend/Validate/File/Upload.php similarity index 100% rename from phpQuery/phpQuery/Zend/Validate/File/Upload.php rename to src/phpQuery/phpQuery/Zend/Validate/File/Upload.php diff --git a/phpQuery/phpQuery/Zend/Validate/Float.php b/src/phpQuery/phpQuery/Zend/Validate/Float.php similarity index 100% rename from phpQuery/phpQuery/Zend/Validate/Float.php rename to src/phpQuery/phpQuery/Zend/Validate/Float.php diff --git a/phpQuery/phpQuery/Zend/Validate/GreaterThan.php b/src/phpQuery/phpQuery/Zend/Validate/GreaterThan.php similarity index 100% rename from phpQuery/phpQuery/Zend/Validate/GreaterThan.php rename to src/phpQuery/phpQuery/Zend/Validate/GreaterThan.php diff --git a/phpQuery/phpQuery/Zend/Validate/Hex.php b/src/phpQuery/phpQuery/Zend/Validate/Hex.php similarity index 100% rename from phpQuery/phpQuery/Zend/Validate/Hex.php rename to src/phpQuery/phpQuery/Zend/Validate/Hex.php diff --git a/phpQuery/phpQuery/Zend/Validate/Hostname.php b/src/phpQuery/phpQuery/Zend/Validate/Hostname.php similarity index 100% rename from phpQuery/phpQuery/Zend/Validate/Hostname.php rename to src/phpQuery/phpQuery/Zend/Validate/Hostname.php diff --git a/phpQuery/phpQuery/Zend/Validate/Hostname/At.php b/src/phpQuery/phpQuery/Zend/Validate/Hostname/At.php similarity index 100% rename from phpQuery/phpQuery/Zend/Validate/Hostname/At.php rename to src/phpQuery/phpQuery/Zend/Validate/Hostname/At.php diff --git a/phpQuery/phpQuery/Zend/Validate/Hostname/Ch.php b/src/phpQuery/phpQuery/Zend/Validate/Hostname/Ch.php similarity index 100% rename from phpQuery/phpQuery/Zend/Validate/Hostname/Ch.php rename to src/phpQuery/phpQuery/Zend/Validate/Hostname/Ch.php diff --git a/phpQuery/phpQuery/Zend/Validate/Hostname/De.php b/src/phpQuery/phpQuery/Zend/Validate/Hostname/De.php similarity index 100% rename from phpQuery/phpQuery/Zend/Validate/Hostname/De.php rename to src/phpQuery/phpQuery/Zend/Validate/Hostname/De.php diff --git a/phpQuery/phpQuery/Zend/Validate/Hostname/Fi.php b/src/phpQuery/phpQuery/Zend/Validate/Hostname/Fi.php similarity index 100% rename from phpQuery/phpQuery/Zend/Validate/Hostname/Fi.php rename to src/phpQuery/phpQuery/Zend/Validate/Hostname/Fi.php diff --git a/phpQuery/phpQuery/Zend/Validate/Hostname/Hu.php b/src/phpQuery/phpQuery/Zend/Validate/Hostname/Hu.php similarity index 100% rename from phpQuery/phpQuery/Zend/Validate/Hostname/Hu.php rename to src/phpQuery/phpQuery/Zend/Validate/Hostname/Hu.php diff --git a/phpQuery/phpQuery/Zend/Validate/Hostname/Interface.php b/src/phpQuery/phpQuery/Zend/Validate/Hostname/Interface.php similarity index 100% rename from phpQuery/phpQuery/Zend/Validate/Hostname/Interface.php rename to src/phpQuery/phpQuery/Zend/Validate/Hostname/Interface.php diff --git a/phpQuery/phpQuery/Zend/Validate/Hostname/Li.php b/src/phpQuery/phpQuery/Zend/Validate/Hostname/Li.php similarity index 100% rename from phpQuery/phpQuery/Zend/Validate/Hostname/Li.php rename to src/phpQuery/phpQuery/Zend/Validate/Hostname/Li.php diff --git a/phpQuery/phpQuery/Zend/Validate/Hostname/No.php b/src/phpQuery/phpQuery/Zend/Validate/Hostname/No.php similarity index 100% rename from phpQuery/phpQuery/Zend/Validate/Hostname/No.php rename to src/phpQuery/phpQuery/Zend/Validate/Hostname/No.php diff --git a/phpQuery/phpQuery/Zend/Validate/Hostname/Se.php b/src/phpQuery/phpQuery/Zend/Validate/Hostname/Se.php similarity index 100% rename from phpQuery/phpQuery/Zend/Validate/Hostname/Se.php rename to src/phpQuery/phpQuery/Zend/Validate/Hostname/Se.php diff --git a/phpQuery/phpQuery/Zend/Validate/Identical.php b/src/phpQuery/phpQuery/Zend/Validate/Identical.php similarity index 100% rename from phpQuery/phpQuery/Zend/Validate/Identical.php rename to src/phpQuery/phpQuery/Zend/Validate/Identical.php diff --git a/phpQuery/phpQuery/Zend/Validate/InArray.php b/src/phpQuery/phpQuery/Zend/Validate/InArray.php similarity index 100% rename from phpQuery/phpQuery/Zend/Validate/InArray.php rename to src/phpQuery/phpQuery/Zend/Validate/InArray.php diff --git a/phpQuery/phpQuery/Zend/Validate/Int.php b/src/phpQuery/phpQuery/Zend/Validate/Int.php similarity index 100% rename from phpQuery/phpQuery/Zend/Validate/Int.php rename to src/phpQuery/phpQuery/Zend/Validate/Int.php diff --git a/phpQuery/phpQuery/Zend/Validate/Interface.php b/src/phpQuery/phpQuery/Zend/Validate/Interface.php similarity index 100% rename from phpQuery/phpQuery/Zend/Validate/Interface.php rename to src/phpQuery/phpQuery/Zend/Validate/Interface.php diff --git a/phpQuery/phpQuery/Zend/Validate/Ip.php b/src/phpQuery/phpQuery/Zend/Validate/Ip.php similarity index 100% rename from phpQuery/phpQuery/Zend/Validate/Ip.php rename to src/phpQuery/phpQuery/Zend/Validate/Ip.php diff --git a/phpQuery/phpQuery/Zend/Validate/LessThan.php b/src/phpQuery/phpQuery/Zend/Validate/LessThan.php similarity index 100% rename from phpQuery/phpQuery/Zend/Validate/LessThan.php rename to src/phpQuery/phpQuery/Zend/Validate/LessThan.php diff --git a/phpQuery/phpQuery/Zend/Validate/NotEmpty.php b/src/phpQuery/phpQuery/Zend/Validate/NotEmpty.php similarity index 100% rename from phpQuery/phpQuery/Zend/Validate/NotEmpty.php rename to src/phpQuery/phpQuery/Zend/Validate/NotEmpty.php diff --git a/phpQuery/phpQuery/Zend/Validate/Regex.php b/src/phpQuery/phpQuery/Zend/Validate/Regex.php similarity index 100% rename from phpQuery/phpQuery/Zend/Validate/Regex.php rename to src/phpQuery/phpQuery/Zend/Validate/Regex.php diff --git a/phpQuery/phpQuery/Zend/Validate/StringLength.php b/src/phpQuery/phpQuery/Zend/Validate/StringLength.php similarity index 100% rename from phpQuery/phpQuery/Zend/Validate/StringLength.php rename to src/phpQuery/phpQuery/Zend/Validate/StringLength.php diff --git a/phpQuery/phpQuery/bootstrap.example.php b/src/phpQuery/phpQuery/bootstrap.example.php similarity index 100% rename from phpQuery/phpQuery/bootstrap.example.php rename to src/phpQuery/phpQuery/bootstrap.example.php diff --git a/phpQuery/phpQuery/compat/mbstring.php b/src/phpQuery/phpQuery/compat/mbstring.php similarity index 100% rename from phpQuery/phpQuery/compat/mbstring.php rename to src/phpQuery/phpQuery/compat/mbstring.php diff --git a/phpQuery/phpQuery/phpQueryEvents.php b/src/phpQuery/phpQuery/phpQueryEvents.php similarity index 100% rename from phpQuery/phpQuery/phpQueryEvents.php rename to src/phpQuery/phpQuery/phpQueryEvents.php diff --git a/phpQuery/phpQuery/phpQueryObject.php b/src/phpQuery/phpQuery/phpQueryObject.php similarity index 100% rename from phpQuery/phpQuery/phpQueryObject.php rename to src/phpQuery/phpQuery/phpQueryObject.php diff --git a/phpQuery/phpQuery/plugins/Scripts.php b/src/phpQuery/phpQuery/plugins/Scripts.php similarity index 100% rename from phpQuery/phpQuery/plugins/Scripts.php rename to src/phpQuery/phpQuery/plugins/Scripts.php diff --git a/phpQuery/phpQuery/plugins/Scripts/__config.example.php b/src/phpQuery/phpQuery/plugins/Scripts/__config.example.php similarity index 100% rename from phpQuery/phpQuery/plugins/Scripts/__config.example.php rename to src/phpQuery/phpQuery/plugins/Scripts/__config.example.php diff --git a/phpQuery/phpQuery/plugins/Scripts/example.php b/src/phpQuery/phpQuery/plugins/Scripts/example.php similarity index 100% rename from phpQuery/phpQuery/plugins/Scripts/example.php rename to src/phpQuery/phpQuery/plugins/Scripts/example.php diff --git a/phpQuery/phpQuery/plugins/Scripts/fix_webroot.php b/src/phpQuery/phpQuery/plugins/Scripts/fix_webroot.php similarity index 100% rename from phpQuery/phpQuery/plugins/Scripts/fix_webroot.php rename to src/phpQuery/phpQuery/plugins/Scripts/fix_webroot.php diff --git a/phpQuery/phpQuery/plugins/Scripts/google_login.php b/src/phpQuery/phpQuery/plugins/Scripts/google_login.php similarity index 100% rename from phpQuery/phpQuery/plugins/Scripts/google_login.php rename to src/phpQuery/phpQuery/plugins/Scripts/google_login.php diff --git a/phpQuery/phpQuery/plugins/Scripts/print_source.php b/src/phpQuery/phpQuery/plugins/Scripts/print_source.php similarity index 100% rename from phpQuery/phpQuery/plugins/Scripts/print_source.php rename to src/phpQuery/phpQuery/plugins/Scripts/print_source.php diff --git a/phpQuery/phpQuery/plugins/Scripts/print_websafe.php b/src/phpQuery/phpQuery/plugins/Scripts/print_websafe.php similarity index 100% rename from phpQuery/phpQuery/plugins/Scripts/print_websafe.php rename to src/phpQuery/phpQuery/plugins/Scripts/print_websafe.php diff --git a/phpQuery/phpQuery/plugins/WebBrowser.php b/src/phpQuery/phpQuery/plugins/WebBrowser.php similarity index 100% rename from phpQuery/phpQuery/plugins/WebBrowser.php rename to src/phpQuery/phpQuery/plugins/WebBrowser.php diff --git a/phpQuery/phpQuery/plugins/example.php b/src/phpQuery/phpQuery/plugins/example.php similarity index 100% rename from phpQuery/phpQuery/plugins/example.php rename to src/phpQuery/phpQuery/plugins/example.php diff --git a/test-cases/document-types/document-fragment-utf8.html b/tests/document-types/document-fragment-utf8.html similarity index 100% rename from test-cases/document-types/document-fragment-utf8.html rename to tests/document-types/document-fragment-utf8.html diff --git a/test-cases/document-types/document-fragment-utf8.xhtml b/tests/document-types/document-fragment-utf8.xhtml similarity index 100% rename from test-cases/document-types/document-fragment-utf8.xhtml rename to tests/document-types/document-fragment-utf8.xhtml diff --git a/test-cases/document-types/document-fragment-utf8.xml b/tests/document-types/document-fragment-utf8.xml similarity index 100% rename from test-cases/document-types/document-fragment-utf8.xml rename to tests/document-types/document-fragment-utf8.xml diff --git a/test-cases/document-types/document-iso88592-nocharset.html b/tests/document-types/document-iso88592-nocharset.html similarity index 100% rename from test-cases/document-types/document-iso88592-nocharset.html rename to tests/document-types/document-iso88592-nocharset.html diff --git a/test-cases/document-types/document-iso88592-nocharset.xhtml b/tests/document-types/document-iso88592-nocharset.xhtml similarity index 100% rename from test-cases/document-types/document-iso88592-nocharset.xhtml rename to tests/document-types/document-iso88592-nocharset.xhtml diff --git a/test-cases/document-types/document-iso88592-nocharset.xml b/tests/document-types/document-iso88592-nocharset.xml similarity index 100% rename from test-cases/document-types/document-iso88592-nocharset.xml rename to tests/document-types/document-iso88592-nocharset.xml diff --git a/test-cases/document-types/document-iso88592.html b/tests/document-types/document-iso88592.html similarity index 100% rename from test-cases/document-types/document-iso88592.html rename to tests/document-types/document-iso88592.html diff --git a/test-cases/document-types/document-iso88592.xhtml b/tests/document-types/document-iso88592.xhtml similarity index 100% rename from test-cases/document-types/document-iso88592.xhtml rename to tests/document-types/document-iso88592.xhtml diff --git a/test-cases/document-types/document-iso88592.xml b/tests/document-types/document-iso88592.xml similarity index 100% rename from test-cases/document-types/document-iso88592.xml rename to tests/document-types/document-iso88592.xml diff --git a/test-cases/document-types/document-utf8-nocharset.html b/tests/document-types/document-utf8-nocharset.html similarity index 100% rename from test-cases/document-types/document-utf8-nocharset.html rename to tests/document-types/document-utf8-nocharset.html diff --git a/test-cases/document-types/document-utf8-nocharset.xhtml b/tests/document-types/document-utf8-nocharset.xhtml similarity index 100% rename from test-cases/document-types/document-utf8-nocharset.xhtml rename to tests/document-types/document-utf8-nocharset.xhtml diff --git a/test-cases/document-types/document-utf8-nocharset.xml b/tests/document-types/document-utf8-nocharset.xml similarity index 100% rename from test-cases/document-types/document-utf8-nocharset.xml rename to tests/document-types/document-utf8-nocharset.xml diff --git a/test-cases/document-types/document-utf8.html b/tests/document-types/document-utf8.html similarity index 100% rename from test-cases/document-types/document-utf8.html rename to tests/document-types/document-utf8.html diff --git a/test-cases/document-types/document-utf8.php b/tests/document-types/document-utf8.php similarity index 100% rename from test-cases/document-types/document-utf8.php rename to tests/document-types/document-utf8.php diff --git a/test-cases/document-types/document-utf8.xhtml b/tests/document-types/document-utf8.xhtml similarity index 100% rename from test-cases/document-types/document-utf8.xhtml rename to tests/document-types/document-utf8.xhtml diff --git a/test-cases/document-types/document-utf8.xml b/tests/document-types/document-utf8.xml similarity index 100% rename from test-cases/document-types/document-utf8.xml rename to tests/document-types/document-utf8.xml diff --git a/test-cases/document_types.php b/tests/document_types.php similarity index 100% rename from test-cases/document_types.php rename to tests/document_types.php diff --git a/test-cases/run.php b/tests/run.php similarity index 100% rename from test-cases/run.php rename to tests/run.php diff --git a/test-cases/test.html b/tests/test.html similarity index 100% rename from test-cases/test.html rename to tests/test.html diff --git a/test-cases/test_2.php b/tests/test_2.php similarity index 100% rename from test-cases/test_2.php rename to tests/test_2.php diff --git a/test-cases/test_4.php b/tests/test_4.php similarity index 100% rename from test-cases/test_4.php rename to tests/test_4.php diff --git a/test-cases/test_5.php b/tests/test_5.php similarity index 100% rename from test-cases/test_5.php rename to tests/test_5.php diff --git a/test-cases/test_ajax.php b/tests/test_ajax.php similarity index 100% rename from test-cases/test_ajax.php rename to tests/test_ajax.php diff --git a/test-cases/test_arrayaccess.php b/tests/test_arrayaccess.php similarity index 100% rename from test-cases/test_arrayaccess.php rename to tests/test_arrayaccess.php diff --git a/test-cases/test_attr.php b/tests/test_attr.php similarity index 100% rename from test-cases/test_attr.php rename to tests/test_attr.php diff --git a/test-cases/test_callback.php b/tests/test_callback.php similarity index 100% rename from test-cases/test_callback.php rename to tests/test_callback.php diff --git a/test-cases/test_charset.php b/tests/test_charset.php similarity index 100% rename from test-cases/test_charset.php rename to tests/test_charset.php diff --git a/test-cases/test_document.php b/tests/test_document.php similarity index 100% rename from test-cases/test_document.php rename to tests/test_document.php diff --git a/test-cases/test_events.php b/tests/test_events.php similarity index 100% rename from test-cases/test_events.php rename to tests/test_events.php diff --git a/test-cases/test_insert.php b/tests/test_insert.php similarity index 100% rename from test-cases/test_insert.php rename to tests/test_insert.php diff --git a/test-cases/test_manipulation.php b/tests/test_manipulation.php similarity index 100% rename from test-cases/test_manipulation.php rename to tests/test_manipulation.php diff --git a/test-cases/test_manual.php b/tests/test_manual.php similarity index 100% rename from test-cases/test_manual.php rename to tests/test_manual.php diff --git a/test-cases/test_multidoc.php b/tests/test_multidoc.php similarity index 100% rename from test-cases/test_multidoc.php rename to tests/test_multidoc.php diff --git a/test-cases/test_php.php b/tests/test_php.php similarity index 100% rename from test-cases/test_php.php rename to tests/test_php.php diff --git a/test-cases/test_replace.php b/tests/test_replace.php similarity index 100% rename from test-cases/test_replace.php rename to tests/test_replace.php diff --git a/test-cases/test_scripts.php b/tests/test_scripts.php similarity index 100% rename from test-cases/test_scripts.php rename to tests/test_scripts.php diff --git a/test-cases/test_selectors.php b/tests/test_selectors.php similarity index 100% rename from test-cases/test_selectors.php rename to tests/test_selectors.php diff --git a/test-cases/test_webbrowser.php b/tests/test_webbrowser.php similarity index 100% rename from test-cases/test_webbrowser.php rename to tests/test_webbrowser.php diff --git a/test-cases/test_wrap.php b/tests/test_wrap.php similarity index 100% rename from test-cases/test_wrap.php rename to tests/test_wrap.php diff --git a/test-cases/xpath.php b/tests/xpath.php similarity index 100% rename from test-cases/xpath.php rename to tests/xpath.php