68 |
69 |
70 |
--------------------------------------------------------------------------------
/docs/js/jquery.cookie.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Cookie plugin
3 | *
4 | * Copyright (c) 2006 Klaus Hartl (stilbuero.de)
5 | * Dual licensed under the MIT and GPL licenses:
6 | * http://www.opensource.org/licenses/mit-license.php
7 | * http://www.gnu.org/licenses/gpl.html
8 | *
9 | */
10 |
11 | /**
12 | * Create a cookie with the given name and value and other optional parameters.
13 | *
14 | * @example $.cookie('the_cookie', 'the_value');
15 | * @desc Set the value of a cookie.
16 | * @example $.cookie('the_cookie', 'the_value', {expires: 7, path: '/', domain: 'jquery.com', secure: true});
17 | * @desc Create a cookie with all available options.
18 | * @example $.cookie('the_cookie', 'the_value');
19 | * @desc Create a session cookie.
20 | * @example $.cookie('the_cookie', null);
21 | * @desc Delete a cookie by passing null as value.
22 | *
23 | * @param String name The name of the cookie.
24 | * @param String value The value of the cookie.
25 | * @param Object options An object literal containing key/value pairs to provide optional cookie attributes.
26 | * @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object.
27 | * If a negative value is specified (e.g. a date in the past), the cookie will be deleted.
28 | * If set to null or omitted, the cookie will be a session cookie and will not be retained
29 | * when the the browser exits.
30 | * @option String path The value of the path atribute of the cookie (default: path of page that created the cookie).
31 | * @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie).
32 | * @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will
33 | * require a secure protocol (like HTTPS).
34 | * @type undefined
35 | *
36 | * @name $.cookie
37 | * @cat Plugins/Cookie
38 | * @author Klaus Hartl/klaus.hartl@stilbuero.de
39 | */
40 |
41 | /**
42 | * Get the value of a cookie with the given name.
43 | *
44 | * @example $.cookie('the_cookie');
45 | * @desc Get the value of a cookie.
46 | *
47 | * @param String name The name of the cookie.
48 | * @return The value of the cookie.
49 | * @type String
50 | *
51 | * @name $.cookie
52 | * @cat Plugins/Cookie
53 | * @author Klaus Hartl/klaus.hartl@stilbuero.de
54 | */
55 | jQuery.cookie = function(name, value, options)
56 | {
57 | if (typeof value != 'undefined')
58 | { // name and value given, set cookie
59 | options = options || {};
60 | if (value === null)
61 | {
62 | value = '';
63 | options.expires = -1;
64 | }
65 | var expires = '';
66 | if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString))
67 | {
68 | var date;
69 | if (typeof options.expires == 'number')
70 | {
71 | date = new Date();
72 | date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000));
73 | }
74 | else
75 | {
76 | date = options.expires;
77 | }
78 | expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE
79 | }
80 | var path = options.path ? '; path=' + options.path : '';
81 | var domain = options.domain ? '; domain=' + options.domain : '';
82 | var secure = options.secure ? '; secure' : '';
83 | document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join('');
84 | }
85 | else
86 | { // only name given, get cookie
87 | var cookieValue = null;
88 | if (document.cookie && document.cookie != '')
89 | {
90 | var cookies = document.cookie.split(';');
91 | for (var i = 0; i < cookies.length; i++)
92 | {
93 | var cookie = jQuery.trim(cookies[i]);
94 | // Does this cookie string begin with the name we want?
95 | if (cookie.substring(0, name.length + 1) == (name + '='))
96 | {
97 | cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
98 | break;
99 | }
100 | }
101 | }
102 | return cookieValue;
103 | }
104 | };
--------------------------------------------------------------------------------
/docs/graph_class.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ArangoDB PHP client API
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
67 |
68 |
69 |
--------------------------------------------------------------------------------
/examples/init.php:
--------------------------------------------------------------------------------
1 | '_system', // database name
16 |
17 | // normal unencrypted connection via TCP/IP
18 | ConnectionOptions::OPTION_ENDPOINT => 'tcp://localhost:8529', // endpoint to connect to
19 |
20 | // // to use failover (requires ArangoDB 3.3 and the database running in active/passive failover mode)
21 | // // it is possible to specify an array of endpoints as follows:
22 | // ConnectionOptions::OPTION_ENDPOINT => [ 'tcp://localhost:8531', 'tcp://localhost:8532' ]
23 |
24 | // // to use memcached for caching the currently active leader (to spare a few connection attempts
25 | // // to followers), it is possible to install the Memcached module for PHP and set the following options:
26 | // // memcached persistent id (will be passed to Memcached::__construct)
27 | // ConnectionOptions::OPTION_MEMCACHED_PERSISTENT_ID => 'arangodb-php-pool',
28 | // // memcached servers to connect to (will be passed to Memcached::addServers)
29 | // ConnectionOptions::OPTION_MEMCACHED_SERVERS => [ [ '127.0.0.1', 11211 ] ],
30 | // // memcached options (will be passed to Memcached::setOptions)
31 | // ConnectionOptions::OPTION_MEMCACHED_OPTIONS => [ ],
32 | // // key to store the current endpoints array under
33 | // ConnectionOptions::OPTION_MEMCACHED_ENDPOINTS_KEY => 'arangodb-php-endpoints'
34 | // // time-to-live for the endpoints array stored in memcached
35 | // ConnectionOptions::OPTION_MEMCACHED_TTL => 600
36 |
37 | // // connection via SSL
38 | // ConnectionOptions::OPTION_ENDPOINT => 'ssl://localhost:8529', // SSL endpoint to connect to
39 | // ConnectionOptions::OPTION_VERIFY_CERT => false, // SSL certificate validation
40 | // ConnectionOptions::OPTION_ALLOW_SELF_SIGNED => true, // allow self-signed certificates
41 | // ConnectionOptions::OPTION_CIPHERS => 'DEFAULT', // https://www.openssl.org/docs/manmaster/apps/ciphers.html
42 |
43 | // // connection via UNIX domain socket
44 | // ConnectionOptions::OPTION_ENDPOINT => 'unix:///tmp/arangodb.sock', // UNIX domain socket
45 |
46 | ConnectionOptions::OPTION_CONNECTION => 'Keep-Alive', // can use either 'Close' (one-time connections) or 'Keep-Alive' (re-used connections)
47 |
48 | // authentication parameters
49 | ConnectionOptions::OPTION_AUTH_TYPE => 'Basic', // use HTTP Basic authorization
50 | ConnectionOptions::OPTION_AUTH_USER => 'root', // user for Basic authorization
51 | ConnectionOptions::OPTION_AUTH_PASSWD => '', // password for Basic authorization
52 |
53 | // in order to not send passwords, it is possible to make the driver generate a JWT for an existing user.
54 | // this requires knowledge of the server's JWT secret key, however:
55 | // ConnectionOptions::OPTION_AUTH_TYPE => 'Bearer', // use HTTP Bearer authorization
56 | // ConnectionOptions::OPTION_AUTH_USER => 'root', // user name
57 | // ConnectionOptions::OPTION_AUTH_PASSWD => '', // server's JWT secret needs to go in here
58 |
59 | // in order to use an externally generated JWT, there is no need to specify user and passwd, but just the JWT value:
60 | // ConnectionOptions::OPTION_AUTH_JWT => '', // use an externally generated JWT for authorization
61 |
62 | ConnectionOptions::OPTION_CONNECT_TIMEOUT => 10, // connect timeout in seconds
63 | ConnectionOptions::OPTION_REQUEST_TIMEOUT => 30, // request timeout in seconds
64 | // ConnectionOptions::OPTION_TRACE => $traceFunc, // tracer function, can be used for debugging
65 | ConnectionOptions::OPTION_CREATE => false, // do not create unknown collections automatically
66 | ConnectionOptions::OPTION_UPDATE_POLICY => UpdatePolicy::LAST, // last update wins
67 | ];
68 |
--------------------------------------------------------------------------------
/docs/packages/Default.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ArangoDB PHP client API » Default
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |