Exemple #1
0
DefineConstant(array('name' => "FETCH_ORI_FIRST", 'type' => Int64));
DefineConstant(array('name' => "FETCH_ORI_LAST", 'type' => Int64));
DefineConstant(array('name' => "FETCH_ORI_ABS", 'type' => Int64));
DefineConstant(array('name' => "FETCH_ORI_REL", 'type' => Int64));
DefineConstant(array('name' => "CURSOR_FWDONLY", 'type' => Int64));
DefineConstant(array('name' => "CURSOR_SCROLL", 'type' => Int64));
DefineConstant(array('name' => "MYSQL_ATTR_USE_BUFFERED_QUERY", 'type' => Int64));
DefineConstant(array('name' => "MYSQL_ATTR_LOCAL_INFILE", 'type' => Int64));
DefineConstant(array('name' => "MYSQL_ATTR_MAX_BUFFER_SIZE", 'type' => Int64));
DefineConstant(array('name' => "MYSQL_ATTR_INIT_COMMAND", 'type' => Int64));
DefineConstant(array('name' => "MYSQL_ATTR_READ_DEFAULT_FILE", 'type' => Int64));
DefineConstant(array('name' => "MYSQL_ATTR_READ_DEFAULT_GROUP", 'type' => Int64));
DefineConstant(array('name' => "MYSQL_ATTR_COMPRESS", 'type' => Int64));
DefineConstant(array('name' => "MYSQL_ATTR_DIRECT_QUERY", 'type' => Int64));
DefineConstant(array('name' => "MYSQL_ATTR_FOUND_ROWS", 'type' => Int64));
DefineConstant(array('name' => "MYSQL_ATTR_IGNORE_SPACE", 'type' => Int64));
DefineFunction(array('name' => "__construct", 'flags' => HasDocComment, 'return' => array('type' => null), 'args' => array(array('name' => "dsn", 'type' => String), array('name' => "username", 'type' => String, 'value' => "null_string"), array('name' => "password", 'type' => String, 'value' => "null_string"), array('name' => "options", 'type' => VariantMap, 'value' => "null_array"))));
DefineFunction(array('name' => "prepare", 'desc' => "Prepares an SQL statement to be executed by the PDOStatement::execute() method. The SQL statement can contain zero or more named (:name) or question mark (?) parameter markers for which real values will be substituted when the statement is executed. You cannot use both named and question mark parameter markers within the same SQL statement; pick one or the other parameter style. Use these parameters to bind any user-input, do not include the user-input directly in the query.\n\nYou must include a unique parameter marker for each value you wish to pass in to the statement when you call PDOStatement::execute(). You cannot use a named parameter marker of the same name twice in a prepared statement. You cannot bind multiple values to a single named parameter in, for example, the IN() clause of an SQL statement.\n\nCalling PDO::prepare() and PDOStatement::execute() for statements that will be issued multiple times with different parameter values optimizes the performance of your application by allowing the driver to negotiate client and/or server side caching of the query plan and meta information, and helps to prevent SQL injection attacks by eliminating the need to manually quote the parameters.\n\nPDO will emulate prepared statements/bound parameters for drivers that do not natively support them, and can also rewrite named or question mark style parameter markers to something more appropriate, if the driver supports one style but not the other.", 'flags' => HasDocComment, 'return' => array('type' => Variant, 'desc' => "If the database server successfully prepares the statement, PDO::prepare() returns a PDOStatement object. If the database server cannot successfully prepare the statement, PDO::prepare() returns FALSE or emits PDOException (depending on error handling).\n\nEmulated prepared statements does not communicate with the database server so PDO::prepare() does not check the statement."), 'args' => array(array('name' => "statement", 'type' => String, 'desc' => "This must be a valid SQL statement for the target database server."), array('name' => "options", 'type' => VariantMap, 'value' => "null_array", 'desc' => "This array holds one or more key=>value pairs to set attribute values for the PDOStatement object that this method returns. You would most commonly use this to set the PDO::ATTR_CURSOR value to PDO::CURSOR_SCROLL to request a scrollable cursor. Some drivers have driver specific options that may be set at prepare-time."))));
DefineFunction(array('name' => "begintransaction", 'desc' => "Turns off autocommit mode. While autocommit mode is turned off, changes made to the database via the PDO object instance are not committed until you end the transaction by calling PDO::commit(). Calling PDO::rollBack() will roll back all changes to the database and return the connection to autocommit mode.\n\nSome databases, including MySQL, automatically issue an implicit COMMIT when a database definition language (DDL) statement such as DROP TABLE or CREATE TABLE is issued within a transaction. The implicit COMMIT will prevent you from rolling back any other changes within the transaction boundary.", 'flags' => HasDocComment, 'return' => array('type' => Boolean, 'desc' => "Returns TRUE on success or FALSE on failure.")));
DefineFunction(array('name' => "commit", 'desc' => "Commits a transaction, returning the database connection to autocommit mode until the next call to PDO::beginTransaction() starts a new transaction.", 'flags' => HasDocComment, 'return' => array('type' => Boolean, 'desc' => "Returns TRUE on success or FALSE on failure.")));
DefineFunction(array('name' => "rollback", 'desc' => "Rolls back the current transaction, as initiated by PDO::beginTransaction(). It is an error to call this method if no transaction is active.\n\nIf the database was set to autocommit mode, this function will restore autocommit mode after it has rolled back the transaction.\n\nSome databases, including MySQL, automatically issue an implicit COMMIT when a database definition language (DDL) statement such as DROP TABLE or CREATE TABLE is issued within a transaction. The implicit COMMIT will prevent you from rolling back any other changes within the transaction boundary.", 'flags' => HasDocComment, 'return' => array('type' => Boolean, 'desc' => "Returns TRUE on success or FALSE on failure.")));
DefineFunction(array('name' => "setattribute", 'desc' => "Sets an attribute on the database handle. Some of the available generic attributes are listed below; some drivers may make use of additional driver specific attributes.\n\nPDO::ATTR_CASE: Force column names to a specific case.\n\nPDO::CASE_LOWER: Force column names to lower case.\n\nPDO::CASE_NATURAL: Leave column names as returned by the database driver.\n\nPDO::CASE_UPPER: Force column names to upper case. PDO::ATTR_ERRMODE: Error reporting. PDO::ERRMODE_SILENT: Just set error codes. PDO::ERRMODE_WARNING: Raise E_WARNING. PDO::ERRMODE_EXCEPTION: Throw exceptions. PDO::ATTR_ORACLE_NULLS (available with all drivers, not just Oracle): Conversion of NULL and empty strings. PDO::NULL_NATURAL: No conversion. PDO::NULL_EMPTY_STRING: Empty string is converted to NULL. PDO::NULL_TO_STRING: NULL is converted to an empty string. PDO::ATTR_STRINGIFY_FETCHES: Convert numeric values to strings when fetching. Requires bool. PDO::ATTR_STATEMENT_CLASS: Set user-supplied statement class derived from PDOStatement. Cannot be used with persistent PDO instances. Requires array(string classname, array(mixed constructor_args)). PDO::ATTR_TIMEOUT: Specifies the timeout duration in seconds. Not all drivers support this option, and it's meaning may differ from driver to driver. For example, sqlite will wait for up to this time value before giving up on obtaining an writable lock, but other drivers may interpret this as a connect or a read timeout interval. Requires int. PDO::ATTR_AUTOCOMMIT (available in OCI, Firebird and MySQL): Whether to autocommit every single statement. PDO::MYSQL_ATTR_USE_BUFFERED_QUERY (available in MySQL): Use buffered queries.", 'flags' => HasDocComment, 'return' => array('type' => Boolean, 'desc' => "Returns TRUE on success or FALSE on failure."), 'args' => array(array('name' => "attribute", 'type' => Int64), array('name' => "value", 'type' => Variant))));
DefineFunction(array('name' => "getattribute", 'desc' => "This function returns the value of a database connection attribute. To retrieve PDOStatement attributes, refer to PDOStatement::getAttribute().\n\nNote that some database/driver combinations may not support all of the database connection attributes.", 'flags' => HasDocComment, 'return' => array('type' => Variant, 'desc' => "A successful call returns the value of the requested PDO attribute. An unsuccessful call returns null."), 'args' => array(array('name' => "attribute", 'type' => Int64, 'desc' => "One of the PDO::ATTR_* constants. The constants that apply to database connections are as follows: PDO::ATTR_AUTOCOMMIT PDO::ATTR_CASE PDO::ATTR_CLIENT_VERSION PDO::ATTR_CONNECTION_STATUS PDO::ATTR_DRIVER_NAME PDO::ATTR_ERRMODE PDO::ATTR_ORACLE_NULLS PDO::ATTR_PERSISTENT PDO::ATTR_PREFETCH PDO::ATTR_SERVER_INFO PDO::ATTR_SERVER_VERSION PDO::ATTR_TIMEOUT"))));
DefineFunction(array('name' => "exec", 'desc' => "PDO::exec() executes an SQL statement in a single function call, returning the number of rows affected by the statement.\n\nPDO::exec() does not return results from a SELECT statement. For a SELECT statement that you only need to issue once during your program, consider issuing PDO::query(). For a statement that you need to issue multiple times, prepare a PDOStatement object with PDO::prepare() and issue the statement with PDOStatement::execute().", 'flags' => HasDocComment, 'return' => array('type' => Variant, 'desc' => "PDO::exec() returns the number of rows that were modified or deleted by the SQL statement you issued. If no rows were affected, PDO::exec() returns 0. WarningThis function may return Boolean FALSE, but may also return a non-Boolean value which evaluates to FALSE, such as 0 or \"\". Please read the section on Booleans for more information. Use the === operator for testing the return value of this function.\n\nThe following example incorrectly relies on the return value of PDO::exec(), wherein a statement that affected 0 rows results in a call to die():"), 'args' => array(array('name' => "query", 'type' => String, 'desc' => "The SQL statement to prepare and execute.\n\nData inside the query should be properly escaped."))));
DefineFunction(array('name' => "lastinsertid", 'desc' => "Returns the ID of the last inserted row, or the last value from a sequence object, depending on the underlying driver. For example, PDO_PGSQL() requires you to specify the name of a sequence object for the name parameter.\n\nThis method may not return a meaningful or consistent result across different PDO drivers, because the underlying database may not even support the notion of auto-increment fields or sequences.", 'flags' => HasDocComment, 'return' => array('type' => Variant, 'desc' => "If a sequence name was not specified for the name parameter, PDO::lastInsertId() returns a string representing the row ID of the last row that was inserted into the database.\n\nIf a sequence name was specified for the name parameter, PDO::lastInsertId() returns a string representing the last value retrieved from the specified sequence object.\n\nIf the PDO driver does not support this capability, PDO::lastInsertId() triggers an IM001 SQLSTATE."), 'args' => array(array('name' => "seqname", 'type' => String, 'value' => "null_string", 'desc' => "Name of the sequence object from which the ID should be returned."))));
DefineFunction(array('name' => "errorcode", 'flags' => HasDocComment, 'return' => array('type' => Variant, 'desc' => "Returns an SQLSTATE, a five characters alphanumeric identifier defined in the ANSI SQL-92 standard. Briefly, an SQLSTATE consists of a two characters class value followed by a three characters subclass value. A class value of 01 indicates a warning and is accompanied by a return code of SQL_SUCCESS_WITH_INFO. Class values other than '01', except for the class 'IM', indicate an error. The class 'IM' is specific to warnings and errors that derive from the implementation of PDO (or perhaps ODBC, if you're using the ODBC driver) itself. The subclass value '000' in any class indicates that there is no subclass for that SQLSTATE.\n\nPDO::errorCode() only retrieves error codes for operations performed directly on the database handle. If you create a PDOStatement object through PDO::prepare() or PDO::query() and invoke an error on the statement handle, PDO::errorCode() will not reflect that error. You must call PDOStatement::errorCode() to return the error code for an operation performed on a particular statement handle.\n\nReturns NULL if no operation has been run on the database handle.")));
DefineFunction(array('name' => "errorinfo", 'flags' => HasDocComment, 'return' => array('type' => VariantVec, 'desc' => "PDO::errorInfo() returns an array of error information about the last operation performed by this database handle. The array consists of the following fields: Element Information 0 SQLSTATE error code (a five characters alphanumeric identifier defined in the ANSI SQL standard). 1 Driver-specific error code. 2 Driver-specific error message.\n\nIf the SQLSTATE error code is not set or there is no driver-specific error, the elements following element 0 will be set to NULL.\n\nPDO::errorInfo() only retrieves error information for operations performed directly on the database handle. If you create a PDOStatement object through PDO::prepare() or PDO::query() and invoke an error on the statement handle, PDO::errorInfo() will not reflect the error from the statement handle. You must call PDOStatement::errorInfo() to return the error information for an operation performed on a particular statement handle.")));
DefineFunction(array('name' => "query", 'desc' => "PDO::query() executes an SQL statement in a single function call, returning the result set (if any) returned by the statement as a PDOStatement object.\n\nFor a query that you need to issue multiple times, you will realize better performance if you prepare a PDOStatement object using PDO::prepare() and issue the statement with multiple calls to PDOStatement::execute().\n\nIf you do not fetch all of the data in a result set before issuing your next call to PDO::query(), your call may fail. Call PDOStatement::closeCursor() to release the database resources associated with the PDOStatement object before issuing your next call to PDO::query().\n\nAlthough this function is only documented as having a single parameter, you may pass additional arguments to this function. They will be treated as though you called PDOStatement::setFetchMode() on the resultant statement object.", 'flags' => HasDocComment, 'return' => array('type' => Variant, 'desc' => "PDO::query() returns a PDOStatement object, or FALSE on failure."), 'args' => array(array('name' => "sql", 'type' => String, 'desc' => "The SQL statement to prepare and execute.\n\nData inside the query should be properly escaped."))));
DefineFunction(array('name' => "quote", 'desc' => "PDO::quote() places quotes around the input string (if required) and escapes special characters within the input string, using a quoting style appropriate to the underlying driver.\n\nIf you are using this function to build SQL statements, you are strongly recommended to use PDO::prepare() to prepare SQL statements with bound parameters instead of using PDO::quote() to interpolate user input into an SQL statement. Prepared statements with bound parameters are not only more portable, more convenient, immune to SQL injection, but are often much faster to execute than interpolated queries, as both the server and client side can cache a compiled form of the query.\n\nNot all PDO drivers implement this method (notably PDO_ODBC). Consider using prepared statements instead.", 'flags' => HasDocComment, 'return' => array('type' => Variant, 'desc' => "Returns a quoted string that is theoretically safe to pass into an SQL statement. Returns FALSE if the driver does not support quoting in this way."), 'args' => array(array('name' => "str", 'type' => String, 'desc' => "The string to be quoted."), array('name' => "paramtype", 'type' => Int64, 'value' => "q_PDO_PARAM_STR", 'desc' => "Provides a data type hint for drivers that have alternate quoting styles."))));
DefineFunction(array('name' => "__wakeup", 'flags' => HasDocComment, 'return' => array('type' => Variant)));
DefineFunction(array('name' => "__sleep", 'flags' => HasDocComment, 'return' => array('type' => Variant)));
Exemple #2
0
function ReadIDLFile($path)
{
    $entries = json_decode(file_get_contents($path), true);
    if (!$entries) {
        throw new Exception("Unable to parse json from {$path}");
    }
    if (!empty($entries['funcs'])) {
        foreach ($entries['funcs'] as $func) {
            DefineFunction($func);
        }
    }
    if (!empty($entries['consts'])) {
        foreach ($entries['consts'] as $const) {
            DefineConstant($const);
        }
    }
    foreach ($entries['classes'] as $class) {
        $methods = isset($class['funcs']) ? $class['funcs'] : array();
        $consts = isset($class['consts']) ? $class['consts'] : array();
        unset($class['funcs']);
        unset($class['consts']);
        BeginClass($class);
        foreach ($methods as $method) {
            DefineFunction($method);
        }
        foreach ($consts as $const) {
            DefineConstant($const);
        }
        EndClass();
    }
}
);
///////////////////////////////////////////////////////////////////////////////
// Constants
//
// array (
//   'name' => name of the constant
//   'type' => type of the constant
//   'note' => additional note about this constant's schema
// )
DefineConstant(array('name' => "BUCKET_INFO_CLUSTER", 'type' => Int64));
DefineConstant(array('name' => "BUCKET_INFO_ID", 'type' => Int64));
DefineConstant(array('name' => "BUCKET_INFO_STATE", 'type' => Int64));
DefineConstant(array('name' => "BUCKET_INFO_SERVER", 'type' => Int64));
DefineConstant(array('name' => "BUCKET_INFO_VOLUME", 'type' => Int64));
DefineConstant(array('name' => "BUCKET_INFO_ALT_SERVER", 'type' => Int64));
DefineConstant(array('name' => "BUCKET_INFO_ALT_VOLUME", 'type' => Int64));
///////////////////////////////////////////////////////////////////////////////
// Functions
//
// array (
//   'name'   => name of the function
//   'desc'   => description of the function's purpose
//   'flags'  => attributes of the function, see base.php for possible values
//   'opt'    => optimization callback function's name for compiler
//   'note'   => additional note about this function's schema
//   'return' =>
//      array (
//        'type'  => return type, use Reference for ref return
//        'desc'  => description of the return value
//      )
//   'args'   => arguments
Exemple #4
0
// array (
//   'name' => name of the constant
//   'type' => type of the constant
//   'note' => additional note about this constant's schema
// )
DefineConstant(array('name' => "JSON_HEX_TAG", 'type' => Int64));
DefineConstant(array('name' => "JSON_HEX_AMP", 'type' => Int64));
DefineConstant(array('name' => "JSON_HEX_APOS", 'type' => Int64));
DefineConstant(array('name' => "JSON_HEX_QUOT", 'type' => Int64));
DefineConstant(array('name' => "JSON_FORCE_OBJECT", 'type' => Int64));
DefineConstant(array('name' => "JSON_NUMERIC_CHECK", 'type' => Int64));
DefineConstant(array('name' => "JSON_UNESCAPED_SLASHES", 'type' => Int64));
DefineConstant(array('name' => "JSON_PRETTY_PRINT", 'type' => Int64));
DefineConstant(array('name' => "JSON_FB_LOOSE", 'type' => Int64));
DefineConstant(array('name' => "JSON_FB_UNLIMITED", 'type' => Int64));
DefineConstant(array('name' => "JSON_FB_EXTRA_ESCAPES", 'type' => Int64));
///////////////////////////////////////////////////////////////////////////////
// Functions
//
// array (
//   'name'   => name of the function
//   'desc'   => description of the function's purpose
//   'flags'  => attributes of the function, see base.php for possible values
//   'opt'    => optimization callback function's name for compiler
//   'note'   => additional note about this function's schema
//   'return' =>
//      array (
//        'type'  => return type, use Reference for ref return
//        'desc'  => description of the return value
//      )
//   'args'   => arguments
Exemple #5
0
//
// array (
//   'name' => name of the constant
//   'type' => type of the constant
//   'note' => additional note about this constant's schema
// )
DefineConstant(array('name' => "FB_UNSERIALIZE_NONSTRING_VALUE", 'type' => Int64));
DefineConstant(array('name' => "FB_UNSERIALIZE_UNEXPECTED_END", 'type' => Int64));
DefineConstant(array('name' => "FB_UNSERIALIZE_UNRECOGNIZED_OBJECT_TYPE", 'type' => Int64));
DefineConstant(array('name' => "FB_UNSERIALIZE_UNEXPECTED_ARRAY_KEY_TYPE", 'type' => Int64));
DefineConstant(array('name' => "XHPROF_FLAGS_NO_BUILTINS", 'type' => Int64));
DefineConstant(array('name' => "XHPROF_FLAGS_CPU", 'type' => Int64));
DefineConstant(array('name' => "XHPROF_FLAGS_MEMORY", 'type' => Int64));
DefineConstant(array('name' => "XHPROF_FLAGS_VTSC", 'type' => Int64));
DefineConstant(array('name' => "XHPROF_FLAGS_TRACE", 'type' => Int64));
DefineConstant(array('name' => "XHPROF_FLAGS_MEASURE_XHPROF_DISABLE", 'type' => Int64));
///////////////////////////////////////////////////////////////////////////////
// Functions
//
// array (
//   'name'   => name of the function
//   'desc'   => description of the function's purpose
//   'flags'  => attributes of the function, see base.php for possible values
//   'opt'    => optimization callback function's name for compiler
//   'note'   => additional note about this function's schema
//   'return' =>
//      array (
//        'type'  => return type, use Reference for ref return
//        'desc'  => description of the return value
//      )
//   'args'   => arguments
Exemple #6
0
 */
///////////////////////////////////////////////////////////////////////////////
// Preamble: C++ code inserted at beginning of ext_{name}.h
DefinePreamble(<<<CPP
CPP
);
///////////////////////////////////////////////////////////////////////////////
// Constants
//
// array (
//   'name' => name of the constant
//   'type' => type of the constant
//   'note' => additional note about this constant's schema
// )
DefineConstant(array('name' => "INF", 'type' => Double));
DefineConstant(array('name' => "NAN", 'type' => Double));
///////////////////////////////////////////////////////////////////////////////
// Functions
//
// array (
//   'name'   => name of the function
//   'desc'   => description of the function's purpose
//   'flags'  => attributes of the function, see base.php for possible values
//   'opt'    => optimization callback function's name for compiler
//   'note'   => additional note about this function's schema
//   'return' =>
//      array (
//        'type'  => return type, use Reference for ref return
//        'desc'  => description of the return value
//      )
//   'args'   => arguments
Exemple #7
0
///////////////////////////////////////////////////////////////////////////////
// Constants
//
// array (
//   'name' => name of the constant
//   'type' => type of the constant
//   'note' => additional note about this constant's schema
// )
// For details on the meaning of these constants, see:
// http://userguide.icu-project.org/strings/regexp#TOC-Flag-Options
DefineConstant(array('name' => 'UREGEX_CASE_INSENSITIVE', 'type' => Int64));
DefineConstant(array('name' => 'UREGEX_COMMENTS', 'type' => Int64));
DefineConstant(array('name' => 'UREGEX_DOTALL', 'type' => Int64));
DefineConstant(array('name' => 'UREGEX_MULTILINE', 'type' => Int64));
DefineConstant(array('name' => 'UREGEX_UWORD', 'type' => Int64));
DefineConstant(array('name' => 'UREGEX_OFFSET_CAPTURE', 'type' => Int64));
///////////////////////////////////////////////////////////////////////////////
// Functions
//
// array (
//   'name'   => name of the function
//   'desc'   => description of the function's purpose
//   'flags'  => attributes of the function, see base.php for possible values
//   'opt'    => optimization callback function's name for compiler
//   'note'   => additional note about this function's schema
//   'return' =>
//      array (
//        'type'  => return type, use Reference for ref return
//        'desc'  => description of the return value
//      )
//   'args'   => arguments
Exemple #8
0
DefineFunction(array('name' => "curl_multi_remove_handle", 'desc' => "Removes a given ch handle from the given mh handle. When the ch handle has been removed, it is again perfectly legal to run curl_exec() on this handle. Removing a handle while being used, will effectively halt all transfers in progress.", 'flags' => HasDocComment, 'return' => array('type' => Variant, 'desc' => "On success, returns a cURL handle, FALSE on failure."), 'args' => array(array('name' => "mh", 'type' => Resource, 'desc' => "A cURL multi handle returned by curl_multi_init()."), array('name' => "ch", 'type' => Resource, 'desc' => "A cURL handle returned by curl_init().")), 'taint_observer' => false));
DefineFunction(array('name' => "curl_multi_exec", 'desc' => "Processes each of the handles in the stack. This method can be called whether or not a handle needs to read or write data.", 'flags' => HasDocComment, 'return' => array('type' => Variant, 'desc' => "A cURL code defined in the cURL Predefined Constants.\n\nThis only returns errors regarding the whole multi stack. There might still have occurred problems on individual transfers even when this function returns CURLM_OK."), 'args' => array(array('name' => "mh", 'type' => Resource, 'desc' => "A cURL multi handle returned by curl_multi_init()."), array('name' => "still_running", 'type' => Variant | Reference, 'desc' => "A reference to a flag to tell whether the operations are still running.")), 'taint_observer' => array('set_mask' => "TAINT_BIT_ALL", 'clear_mask' => "TAINT_BIT_NONE")));
DefineFunction(array('name' => "curl_multi_select", 'desc' => "Blocks until there is activity on any of the curl_multi connections.", 'flags' => HasDocComment, 'return' => array('type' => Variant, 'desc' => "On success, returns the number of descriptors contained in, the descriptor sets. On failure, this function will return -1 on a select failure or timeout (from the underlying select system call)."), 'args' => array(array('name' => "mh", 'type' => Resource, 'desc' => "A cURL multi handle returned by curl_multi_init()."), array('name' => "timeout", 'type' => Double, 'value' => "1.0", 'desc' => "Time, in seconds, to wait for a response.")), 'taint_observer' => false));
DefineFunction(array('name' => "fb_curl_multi_fdset", 'desc' => "extracts file descriptor information from a multi handle.", 'flags' => HasDocComment, 'return' => array('type' => Variant, 'desc' => "Returns 0 on success, or one of the CURLM_XXX errors code."), 'args' => array(array('name' => "mh", 'type' => Resource, 'desc' => "A cURL multi handle returned by curl_multi_init()."), array('name' => "read_fd_set", 'type' => Variant | Reference, 'desc' => "read set"), array('name' => "write_fd_set", 'type' => Variant | Reference, 'desc' => "write set"), array('name' => "exc_fd_set", 'type' => Variant | Reference, 'desc' => "exception set"), array('name' => "max_fd", 'type' => Variant | Reference, 'value' => "null_object", 'desc' => "If no file descriptors are set, max_fd will contain -1. Otherwise it will contain the higher descriptor number.")), 'taint_observer' => false));
DefineFunction(array('name' => "curl_multi_getcontent", 'desc' => "If CURLOPT_RETURNTRANSFER is an option that is set for a specific handle, then this function will return the content of that cURL handle in the form of a string.", 'flags' => HasDocComment, 'return' => array('type' => Variant, 'desc' => "Return the content of a cURL handle if CURLOPT_RETURNTRANSFER is set."), 'args' => array(array('name' => "ch", 'type' => Resource, 'desc' => "A cURL handle returned by curl_init().")), 'taint_observer' => array('set_mask' => "TAINT_BIT_ALL", 'clear_mask' => "TAINT_BIT_NONE")));
DefineFunction(array('name' => "curl_multi_info_read", 'desc' => "Ask the multi handle if there are any messages or information from the individual transfers. Messages may include information such as an error code from the transfer or just the fact that a transfer is completed.\n\nRepeated calls to this function will return a new result each time, until a FALSE is returned as a signal that there is no more to get at this point. The integer pointed to with msgs_in_queue will contain the number of remaining messages after this function was called. Warning\n\nThe data the returned resource points to will not survive calling curl_multi_remove_handle().", 'flags' => HasDocComment, 'return' => array('type' => Variant, 'desc' => "On success, returns an associative array for the message, FALSE on failure.\n\nContents of the returned array Key: Value: msg The CURLMSG_DONE constant. Other return values are currently not available. result One of the CURLE_* constants. If everything is OK, the CURLE_OK will be the result. handle Resource of type curl indicates the handle which it concerns."), 'args' => array(array('name' => "mh", 'type' => Resource, 'desc' => "A cURL multi handle returned by curl_multi_init()."), array('name' => "msgs_in_queue", 'type' => Variant | Reference, 'value' => "null", 'desc' => "Number of messages that are still in the queue")), 'taint_observer' => false));
DefineFunction(array('name' => "curl_multi_close", 'desc' => "Closes a set of cURL handles.", 'flags' => HasDocComment, 'return' => array('type' => Variant, 'desc' => "No value is returned."), 'args' => array(array('name' => "mh", 'type' => Resource, 'desc' => "A cURL multi handle returned by curl_multi_init().")), 'taint_observer' => false));
DefineFunction(array('name' => "evhttp_set_cache", 'desc' => "Specifies how many persistent connections to maintain for an HTTP server.", 'flags' => HasDocComment | HipHopSpecific, 'return' => array('type' => null), 'args' => array(array('name' => "address", 'type' => String, 'desc' => "Domain name for an HTTP server. Connections to this server, regardless of what server objects to fetch (specified by a URL), will be cached as persistent connections for re-use."), array('name' => "max_conn", 'type' => Int32, 'desc' => "Maximum number of connections to keep."), array('name' => "port", 'type' => Int32, 'value' => "80", 'desc' => "Port number of the HTTP server.")), 'taint_observer' => false));
DefineFunction(array('name' => "evhttp_get", 'desc' => "Synchronously HTTP GET a URL with libevent evhttp library.", 'flags' => HasDocComment | HipHopSpecific, 'return' => array('type' => Variant, 'desc' => "HTTP response. FALSE if any failure."), 'args' => array(array('name' => "url", 'type' => String, 'desc' => "The URL to fetch."), array('name' => "headers", 'type' => StringVec, 'value' => "null_array", 'desc' => "HTTP headers."), array('name' => "timeout", 'type' => Int32, 'value' => "5", 'desc' => "How many seconds to wait for response.")), 'taint_observer' => array('set_mask' => "TAINT_BIT_ALL", 'clear_mask' => "TAINT_BIT_NONE")));
DefineFunction(array('name' => "evhttp_post", 'desc' => "Synchronously HTTP POST a URL with libevent evhttp library.", 'flags' => HasDocComment | HipHopSpecific, 'return' => array('type' => Variant, 'desc' => "HTTP response. FALSE if any failure."), 'args' => array(array('name' => "url", 'type' => String, 'desc' => "The URL to post to."), array('name' => "data", 'type' => String, 'desc' => "POST data."), array('name' => "headers", 'type' => StringVec, 'value' => "null_array", 'desc' => "HTTP headers."), array('name' => "timeout", 'type' => Int32, 'value' => "5", 'desc' => "How many seconds to wait for response.")), 'taint_observer' => array('set_mask' => "TAINT_BIT_ALL", 'clear_mask' => "TAINT_BIT_NONE")));
DefineFunction(array('name' => "evhttp_async_get", 'desc' => "Asynchronously HTTP GET a URL with libevent evhttp library. This is a non-blocking call, without waiting for HTTP server to respond.", 'flags' => HasDocComment | HipHopSpecific, 'return' => array('type' => Variant, 'desc' => "An object evhttp_recv() can use to eventually retrieve HTTP response. FALSE if there was any failure."), 'args' => array(array('name' => "url", 'type' => String, 'desc' => "The URL to fetch."), array('name' => "headers", 'type' => StringVec, 'value' => "null_array", 'desc' => "HTTP headers."), array('name' => "timeout", 'type' => Int32, 'value' => "5", 'desc' => "How many seconds to wait for response.")), 'taint_observer' => array('set_mask' => "TAINT_BIT_ALL", 'clear_mask' => "TAINT_BIT_NONE")));
DefineFunction(array('name' => "evhttp_async_post", 'desc' => "Asynchronously HTTP POST a URL with libevent evhttp library. This is a non-blocking call, without waiting for HTTP server to respond.", 'flags' => HasDocComment | HipHopSpecific, 'return' => array('type' => Variant, 'desc' => "An object evhttp_recv() can use to eventually retrieve HTTP response. FALSE if there was any failure."), 'args' => array(array('name' => "url", 'type' => String, 'desc' => "The URL to post to."), array('name' => "data", 'type' => String, 'desc' => "POST data."), array('name' => "headers", 'type' => StringVec, 'value' => "null_array", 'desc' => "HTTP headers."), array('name' => "timeout", 'type' => Int32, 'value' => "5", 'desc' => "How many seconds to wait for response.")), 'taint_observer' => array('set_mask' => "TAINT_BIT_ALL", 'clear_mask' => "TAINT_BIT_NONE")));
DefineFunction(array('name' => "evhttp_recv", 'desc' => "Block and wait until HTTP response is ready.", 'flags' => HasDocComment | HipHopSpecific, 'return' => array('type' => Variant, 'desc' => "HTTP response. FALSE if any failure."), 'args' => array(array('name' => "handle", 'type' => Object, 'desc' => "The object created by calling evhttp_async_get() or evhttp_async_post().")), 'taint_observer' => array('set_mask' => "TAINT_BIT_ALL", 'clear_mask' => "TAINT_BIT_NONE")));
DefineConstant(array('name' => "CURLINFO_LOCAL_PORT", 'type' => Int64));
DefineConstant(array('name' => "CURLOPT_TIMEOUT_MS", 'type' => Int64));
DefineConstant(array('name' => "CURLOPT_CONNECTTIMEOUT_MS", 'type' => Int64));
///////////////////////////////////////////////////////////////////////////////
// Classes
//
// BeginClass
// array (
//   'name'   => name of the class
//   'desc'   => description of the class's purpose
//   'flags'  => attributes of the class, see base.php for possible values
//   'note'   => additional note about this class's schema
//   'parent' => parent class name, if any
//   'ifaces' => array of interfaces tihs class implements
//   'bases'  => extra internal and special base classes this class requires
//   'footer' => extra C++ inserted at end of class declaration
// )
//
DefineFunction(array('name' => "getstoragememcache", 'desc' => "MemcachePool::getstoragememcache() is a static member to get\n\t\tonly one instance per storage_id and thread. The timestamp is used to know\n\t\tif the stored object have old configuration and need to be recreated", 'flags' => IsStatic | HasDocComment, 'return' => array('type' => Object, 'desc' => "Returns a MemcachePool Object or NULL if we need to create\n\t\t\tnew one (next call will return a new Object)."), 'args' => array(array('name' => "storage_id", 'type' => Int32, 'desc' => "Number of the storage id (used to get only one instance per\n\t\t\t\tstorage)."), array('name' => "timestamp", 'type' => Int32, 'desc' => "Time of the last configuration change."), array('name' => "empty", 'type' => Variant | Reference, 'desc' => "This parameter is needed to indicate if the memcached\n\t\t\t\tobject is new and needs to be populated with the memcached servers"), array('name' => "persistent", 'type' => Boolean, 'value' => "false", 'desc' => "Defines if the tcp connections should be persistent"))));
DefineFunction(array('name' => "connect", 'desc' => "MemcachePool::connect() establishes a connection to the memcached\n\t\tserver. The connection, which was opened using MemcachePool::connect() will be\n\t\tautomatically closed at the end of script execution. Also you can close it\n\t\twith MemcachePool::close(). Also you can use memcache_connect() function.", 'flags' => HasDocComment, 'return' => array('type' => Boolean, 'desc' => "Returns TRUE on success or FALSE on failure."), 'args' => array(array('name' => "host", 'type' => String, 'desc' => "Point to the host where memcached is listening for\n\t\t\t\tconnections. This parameter may also specify other transports like\n\t\t\t\tunix:///path/to/memcached.sock to use UNIX domain sockets, in this case\n\t\t\t\tport must also be set to 0."), array('name' => "port", 'type' => Int32, 'value' => "0", 'desc' => "Point to the port where memcached is listening for\n\t\t\t\tconnections. Set this parameter to 0 when using UNIX domain sockets."), array('name' => "timeout", 'type' => Int32, 'value' => "0", 'desc' => "Value in seconds which will be used for connecting to the\n\t\t\t\tdaemon. Think twice before changing the default value of 1 second - you\n\t\t\t\tcan lose all the advantages of caching if your connection is too slow."), array('name' => "timeoutms", 'type' => Int32, 'value' => "0"))));
DefineFunction(array('name' => "pconnect", 'desc' => "MemcachePool::pconnect() is similar to MemcachePool::connect() with the\n\t\tdifference, that the connection it establishes is persistent. This\n\t\tconnection is not closed after the end of script execution and by\n\t\tMemcachePool::close() function. Also you can use memcache_pconnect() function.", 'flags' => HasDocComment, 'return' => array('type' => Boolean, 'desc' => "Returns TRUE on success or FALSE on failure."), 'args' => array(array('name' => "host", 'type' => String, 'desc' => "Point to the host where memcached is listening for\n\t\t\t\tconnections. This parameter may also specify other transports like\n\t\t\t\tunix:///path/to/memcached.sock to use UNIX domain sockets, in this case\n\t\t\t\tport must also be set to 0."), array('name' => "port", 'type' => Int32, 'value' => "0", 'desc' => "Point to the port where memcached is listening for\n\t\t\t\tconnections. Set this parameter to 0 when using UNIX domain sockets."), array('name' => "timeout", 'type' => Int32, 'value' => "0", 'desc' => "Value in seconds which will be used for connecting to the\n\t\t\t\tdaemon. Think twice before changing the default value of 1 second - you\n\t\t\t\tcan lose all the advantages of caching if your connection is too slow."), array('name' => "timeoutms", 'type' => Int32, 'value' => "0"))));
DefineFunction(array('name' => "add", 'desc' => "MemcachePool::add() stores variable var with key only if such key\n\t\tdoesn't exist at the server yet. Also you can use memcache_add() function.", 'flags' => HasDocComment, 'return' => array('type' => Boolean, 'desc' => "Returns TRUE on success or FALSE on failure. Returns FALSE if\n\t\t\tsuch key already exist. For the rest MemcachePool::add() behaves similarly to\n\t\t\tMemcachePool::set()."), 'args' => array(array('name' => "key", 'type' => String, 'desc' => "The key that will be associated with the item."), array('name' => "var", 'type' => Variant, 'desc' => "The variable to store. Strings and integers are stored as\n\t\t\t\tis, other types are stored serialized."), array('name' => "flag", 'type' => Int32, 'value' => "0", 'desc' => "Use MEMCACHE_COMPRESSED to store the item compressed (uses\n\t\t\t\tzlib)."), array('name' => "expire", 'type' => Int32, 'value' => "0", 'desc' => "Expiration time of the item. If it's equal to zero, the\n\t\t\t\titem will never expire. You can also use Unix timestamp or a number of\n\t\t\t\tseconds starting from current time, but in the latter case the number of\n\t\t\t\tseconds may not exceed 2592000 (30 days)."))));
DefineFunction(array('name' => "cas", 'desc' => "MemcachePool::cas() have the same behaviour as set, but only\n\t\tchanges the item if its was unchanged from the last time the value was\n\t\tobtained. This is checked using CAS parameter, obtained when calling get", 'flags' => HasDocComment, 'return' => array('type' => Boolean, 'desc' => "Returns TRUE on success or FALSE on failure."), 'args' => array(array('name' => "key", 'type' => String, 'desc' => "The key that will be associated with the item."), array('name' => "var", 'type' => Variant, 'desc' => "The variable to store. Strings and integers are stored as\n\t\t\t\tis, other types are stored serialized."), array('name' => "flag", 'type' => Int32, 'desc' => "Use MEMCACHE_COMPRESSED to store the item compressed (uses\n\t\t\t\tzlib)."), array('name' => "expire", 'type' => Int32, 'desc' => "Expiration time of the item. If it's equal to zero, the\n\t\t\t\titem will never expire. You can also use Unix timestamp or a number of\n\t\t\t\tseconds starting from current time, but in the latter case the number of\n\t\t\t\tseconds may not exceed 2592000 (30 days)."), array('name' => "cas_token", 'type' => Double, 'desc' => "Unique value associated with the existing item. Generated\n\t\t\t\tby memcache."))));
DefineFunction(array('name' => "set", 'desc' => "MemcachePool::set() stores an item var with key on the memcached\n\t\tserver. Parameter expire is expiration time in seconds. If it's 0, the item\n\t\tnever expires (but memcached server doesn't guarantee this item to be stored\n\t\tall the time, it could be deleted from the cache to make place for other\n\t\titems). You can use MEMCACHE_COMPRESSED constant as flag value if you want\n\t\tto use on-the-fly compression (uses zlib).\n\nRemember that resource\n\t\tvariables (i.e. file and connection descriptors) cannot be stored in the\n\t\tcache, because they cannot be adequately represented in serialized state.\n\t\tAlso you can use memcache_set() function.", 'flags' => HasDocComment, 'return' => array('type' => Boolean, 'desc' => "Returns TRUE on success or FALSE on failure."), 'args' => array(array('name' => "key", 'type' => String, 'desc' => "The key that will be associated with the item."), array('name' => "var", 'type' => Variant, 'desc' => "The variable to store. Strings and integers are stored as\n\t\t\t\tis, other types are stored serialized."), array('name' => "flag", 'type' => Int32, 'value' => "0", 'desc' => "Use MEMCACHE_COMPRESSED to store the item compressed (uses\n\t\t\t\tzlib)."), array('name' => "expire", 'type' => Int32, 'value' => "0", 'desc' => "Expiration time of the item. If it's equal to zero, the\n\t\t\t\titem will never expire. You can also use Unix timestamp or a number of\n\t\t\t\tseconds starting from current time, but in the latter case the number of\n\t\t\t\tseconds may not exceed 2592000 (30 days)."))));
DefineFunction(array('name' => "replace", 'desc' => "MemcachePool::replace() should be used to replace value of existing\n\t\titem with key. In case if item with such key doesn't exists,\n\t\tMemcachePool::replace() returns FALSE. For the rest MemcachePool::replace() behaves\n\t\tsimilarly to MemcachePool::set(). Also you can use memcache_replace()\n\t\tfunction.", 'flags' => HasDocComment, 'return' => array('type' => Boolean, 'desc' => "Returns TRUE on success or FALSE on failure."), 'args' => array(array('name' => "key", 'type' => String, 'desc' => "The key that will be associated with the item."), array('name' => "var", 'type' => Variant, 'desc' => "The variable to store. Strings and integers are stored as\n\t\t\t\tis, other types are stored serialized."), array('name' => "flag", 'type' => Int32, 'value' => "0", 'desc' => "Use MEMCACHE_COMPRESSED to store the item compressed (uses\n\t\t\t\tzlib)."), array('name' => "expire", 'type' => Int32, 'value' => "0", 'desc' => "Expiration time of the item. If it's equal to zero, the\n\t\t\t\titem will never expire. You can also use Unix timestamp or a number of\n\t\t\t\tseconds starting from current time, but in the latter case the number of\n\t\t\t\tseconds may not exceed 2592000 (30 days)."))));
DefineFunction(array('name' => "get", 'desc' => "MemcachePool::get() returns previously stored data if an item with\n\t\tsuch key exists on the server at this moment.\n\nYou can pass array of keys\n\t\tto MemcachePool::get() to get array of values. The result array will contain\n\t\tonly found key-value pairs.", 'flags' => HasDocComment, 'return' => array('type' => Variant, 'desc' => "Returns the string associated with the key or FALSE on\n\t\t\tfailure or if such key was not found."), 'args' => array(array('name' => "key", 'type' => Variant, 'desc' => "The key or array of keys to fetch."), array('name' => "flags", 'type' => Variant | Reference, 'value' => "null", 'desc' => "If present, flags fetched along with the values will be\n\t\t\t\twritten to this parameter. These flags are the same as the ones given to\n\t\t\t\tfor example MemcachePool::set(). The lowest byte of the int is reserved for\n\t\t\t\tpecl/memcache internal usage (e.g. to indicate compression and\n\t\t\t\tserialization status)."), array('name' => "cas", 'type' => Variant | Reference, 'value' => "null", 'desc' => "If present, cas key wil be fetched along with the values\n\t\t\t\tand will be written to this parameter."))));
DefineFunction(array('name' => "prefetch", 'desc' => "MemcachePool::prefetch() prefetch some keys, without actual\n\t\treturning the values of those keys. You need to call later to get, in order\n\t\tto fetch the results.", 'flags' => HasDocComment, 'return' => array('type' => Boolean, 'desc' => "Returns TRUE on success or FALSE on failure."), 'args' => array(array('name' => "key", 'type' => Variant, 'desc' => "The key or array of keys to fetch."))));
DefineFunction(array('name' => "delete", 'desc' => "MemcachePool::delete() deletes item with the key. If parameter\n\t\ttimeout is specified, the item will expire after timeout seconds. Also you\n\t\tcan use memcache_delete() function.", 'flags' => HasDocComment, 'return' => array('type' => Boolean, 'desc' => "Returns TRUE on success or FALSE on failure."), 'args' => array(array('name' => "key", 'type' => String, 'desc' => "The key associated with the item to delete."), array('name' => "expire", 'type' => Int32, 'value' => "0", 'desc' => "Execution time of the item. If it's equal to zero, the item\n\t\t\t\twill be deleted right away whereas if you set it to 30, the item will be\n\t\t\t\tdeleted in 30 seconds."))));
DefineFunction(array('name' => "increment", 'desc' => "MemcachePool::increment() increments value of an item by the\n\t\tspecified value. If item specified by key was not numeric and cannot be\n\t\tconverted to a number, it will change its value to value.\n\t\tMemcachePool::increment() does not create an item if it doesn't already\n\t\texist.\n\nDo not use MemcachePool::increment() with items that have been stored\n\t\tcompressed because subsequent calls to MemcachePool::get() will fail. Also you\n\t\tcan use memcache_increment() function.", 'flags' => HasDocComment, 'return' => array('type' => Variant, 'desc' => "Returns new items value on success or FALSE on failure."), 'args' => array(array('name' => "key", 'type' => String, 'desc' => "Key of the item to increment."), array('name' => "offset", 'type' => Int32, 'value' => "1", 'desc' => "Increment the item by value."))));
DefineFunction(array('name' => "decrement", 'desc' => "MemcachePool::decrement() decrements value of the item by value.\n\t\tSimilarly to MemcachePool::increment(), current value of the item is being\n\t\tconverted to numerical and after that value is substracted.\n\nNew item's\n\t\tvalue will not be less than zero.\n\nDo not use MemcachePool::decrement() with\n\t\titem, which was stored compressed, because consequent call to\n\t\tMemcachePool::get() will fail. MemcachePool::decrement() does not create an item if\n\t\tit didn't exist. Also you can use memcache_decrement() function.", 'flags' => HasDocComment, 'return' => array('type' => Variant, 'desc' => "Returns item's new value on success or FALSE on failure."), 'args' => array(array('name' => "key", 'type' => String, 'desc' => "Key of the item do decrement."), array('name' => "offset", 'type' => Int32, 'value' => "1", 'desc' => "Decrement the item by value."))));
DefineFunction(array('name' => "getversion", 'desc' => "MemcachePool::getVersion() returns a string with server's version\n\t\tnumber. Also you can use memcache_get_version() function.", 'flags' => HasDocComment, 'return' => array('type' => Variant, 'desc' => "Returns a string of server version number or FALSE on failure.")));
DefineFunction(array('name' => "flush", 'desc' => "MemcachePool::flush() immediately invalidates all existing items.\n\t\tMemcachePool::flush() doesn't actually free any resources, it only marks all the\n\t\titems as expired, so occupied memory will be overwritten by new items. Also\n\t\tyou can use memcache_flush() function.", 'flags' => HasDocComment, 'return' => array('type' => Boolean, 'desc' => "Returns TRUE on success or FALSE on failure."), 'args' => array(array('name' => "expire", 'type' => Int32, 'value' => "0"))));
DefineFunction(array('name' => "setoptimeout", 'flags' => HasDocComment, 'return' => array('type' => Boolean), 'args' => array(array('name' => "timeoutms", 'type' => Int64))));
DefineFunction(array('name' => "close", 'desc' => "MemcachePool::close() closes connection to memcached server. This\n\t\tfunction doesn't close persistent connections, which are closed only during\n\t\tweb-server shutdown/restart. Also you can use memcache_close() function.", 'flags' => HasDocComment, 'return' => array('type' => Boolean, 'desc' => "Returns TRUE on success or FALSE on failure.")));
DefineFunction(array('name' => "getserverstatus", 'desc' => "MemcachePool::getServerStatus() returns a the servers\n\t\tonline/offline status. You can also use memcache_get_server_status()\n\t\tfunction.\n\nThis function has been added to Memcache version 2.1.0.", 'flags' => HasDocComment, 'return' => array('type' => Int32, 'desc' => "Returns a the servers status. 0 if server is failed, non-zero\n\t\t\totherwise"), 'args' => array(array('name' => "host", 'type' => String, 'desc' => "Point to the host where memcached is listening for\n\t\t\t\tconnections."), array('name' => "port", 'type' => Int32, 'value' => "0", 'desc' => "Point to the port where memcached is listening for\n\t\t\t\tconnections."))));
DefineFunction(array('name' => "setcompressthreshold", 'desc' => "MemcachePool::setCompressThreshold() enables automatic compression\n\t\tof large values. You can also use the memcache_set_compress_threshold()\n\t\tfunction.\n\nThis function has been added to Memcache version 2.0.0.", 'flags' => HasDocComment, 'return' => array('type' => Boolean, 'desc' => "Returns TRUE on success or FALSE on failure."), 'args' => array(array('name' => "threshold", 'type' => Int32, 'desc' => "Controls the minimum value length before attempting to\n\t\t\t\tcompress automatically."), array('name' => "min_savings", 'type' => Double, 'value' => "0.2", 'desc' => "Specifies the minimum amount of savings to actually store\n\t\t\t\tthe value compressed. The supplied value must be between 0 and 1.\n\t\t\t\tDefault value is 0.2 giving a minimum 20% compression savings."))));
DefineFunction(array('name' => "getstats", 'desc' => "MemcachePool::getStats() returns an associative array with server's\n\t\tstatistics. Array keys correspond to stats parameters and values to\n\t\tparameter's values. Also you can use memcache_get_stats() function.", 'flags' => HasDocComment, 'return' => array('type' => VariantMap, 'desc' => "Returns an associative array of server statistics or FALSE on\n\t\t\tfailure."), 'args' => array(array('name' => "type", 'type' => String, 'value' => "null_string", 'desc' => "The type of statistics to fetch. Valid values are {reset,\n\t\t\t\tmalloc, maps, cachedump, slabs, items, sizes}. According to the\n\t\t\t\tmemcached protocol spec these additional arguments \"are subject to\n\t\t\t\tchange for the convenience of memcache developers\"."), array('name' => "slabid", 'type' => Int32, 'value' => "0", 'desc' => "Used in conjunction with type set to cachedump to identify\n\t\t\t\tthe slab to dump from. The cachedump command ties up the server and is\n\t\t\t\tstrictly to be used for debugging purposes."), array('name' => "limit", 'type' => Int32, 'value' => "100", 'desc' => "Used in conjunction with type set to cachedump to limit the\n\t\t\t\tnumber of entries to dump."))));
DefineFunction(array('name' => "getextendedstats", 'desc' => "MemcachePool::getExtendedStats() returns a two-dimensional\n\t\tassociative array with server statistics. Array keys correspond to host:port\n\t\tof server and values contain the individual server statistics. A failed\n\t\tserver will have its corresponding entry set to FALSE. You can also use the\n\t\tmemcache_get_extended_stats() function.\n\nThis function has been added to\n\t\tMemcache version 2.0.0.", 'flags' => HasDocComment, 'return' => array('type' => VariantMap, 'desc' => "Returns a two-dimensional associative array of server\n\t\t\tstatistics or FALSE on failure."), 'args' => array(array('name' => "type", 'type' => String, 'value' => "null_string", 'desc' => "The type of statistics to fetch. Valid values are {reset,\n\t\t\t\tmalloc, maps, cachedump, slabs, items, sizes}. According to the\n\t\t\t\tmemcached protocol spec these additional arguments \"are subject to\n\t\t\t\tchange for the convenience of memcache developers\"."), array('name' => "slabid", 'type' => Int32, 'value' => "0", 'desc' => "Used in conjunction with type set to cachedump to identify\n\t\t\t\tthe slab to dump from. The cachedump command ties up the server and is\n\t\t\t\tstrictly to be used for debugging purposes."), array('name' => "limit", 'type' => Int32, 'value' => "100", 'desc' => "Used in conjunction with type set to cachedump to limit the\n\t\t\t\tnumber of entries to dump."))));
DefineFunction(array('name' => "setserverparams", 'desc' => "MemcachePool::setServerParams() changes server parameters at\n\t\truntime. You can also use the memcache_set_server_params() function.\n\nThis\n\t\tfunction has been added to Memcache version 2.1.0.", 'flags' => HasDocComment, 'return' => array('type' => Boolean, 'desc' => "Returns TRUE on success or FALSE on failure."), 'args' => array(array('name' => "host", 'type' => String, 'desc' => "Point to the host where memcached is listening for\n\t\t\t\tconnections."), array('name' => "port", 'type' => Int32, 'value' => "11211", 'desc' => "Point to the port where memcached is listening for\n\t\t\t\tconnections."), array('name' => "timeout", 'type' => Double, 'value' => "0", 'desc' => "Value in seconds which will be used for connecting to the\n\t\t\t\tdaemon. Think twice before changing the default value of 1 second - you\n\t\t\t\tcan lose all the advantages of caching if your connection is too slow."), array('name' => "retry_interval", 'type' => Int32, 'value' => "0", 'desc' => "Controls how often a failed server will be retried, the\n\t\t\t\tdefault value is 15 seconds. Setting this parameter to -1 disables\n\t\t\t\tautomatic retry. Neither this nor the persistent parameter has any\n\t\t\t\teffect when the extension is loaded dynamically via dl()."), array('name' => "status", 'type' => Boolean, 'value' => "true", 'desc' => "Controls if the server should be flagged as online. Setting\n\t\t\t\tthis parameter to FALSE and retry_interval to -1 allows a failed server\n\t\t\t\tto be kept in the pool so as not to affect the key distribution\n\t\t\t\talgoritm. Requests for this server will then failover or fail\n\t\t\t\timmediately depending on the memcache.allow_failover setting. Default to\n\t\t\t\tTRUE, meaning the server should be considered online."))));
DefineFunction(array('name' => "setfailurecallback", 'desc' => "MemcachePool::setfailurecallback() assigns a pool-specific failure\n\t\tcallback which will be called when  a request fails. May be null in order to\n\t\tdisable callbacks. The callback receive arguments like:\n\t\tfunction mycallback(host, tcp_port, udp_port, error, errnum) \n\t\twhere host and error are strings or null, the other params are integers.", 'flags' => HasDocComment, 'return' => array('type' => Boolean, 'desc' => "Returns TRUE on success or FALSE on failure."), 'args' => array(array('name' => "failure_callback", 'type' => Variant, 'value' => "null_variant", 'desc' => "Allows the user to specify a callback function to run upon\n\t\t\t\tencountering an error. The callback is run before failover is attempted.\n\t\t\t\tThe function takes two parameters, the hostname and port of the failed\n\t\t\t\tserver."))));
DefineFunction(array('name' => "addserver", 'desc' => "MemcachePool::addServer() adds a server to the connection pool. The\n\t\tconnection, which was opened using MemcachePool::addServer() will be\n\t\tautomatically closed at the end of script execution, you can also close it\n\t\tmanually with MemcachePool::close(). You can also use the memcache_add_server()\n\t\tfunction.\n\nWhen using this method (as opposed to MemcachePool::connect() and\n\t\tMemcachePool::pconnect()) the network connection is not established until\n\t\tactually needed. Thus there is no overhead in adding a large number of\n\t\tservers to the pool, even though they might not all be used.\n\nFailover may\n\t\toccur at any stage in any of the methods, as long as other servers are\n\t\tavailable the request the user won't notice. Any kind of socket or Memcached\n\t\tserver level errors (except out-of-memory) may trigger the failover. Normal\n\t\tclient errors such as adding an existing key will not trigger a\n\t\tfailover.\n\nThis function has been added to Memcache version 2.0.0.", 'flags' => HasDocComment, 'return' => array('type' => Boolean, 'desc' => "Returns TRUE on success or FALSE on failure."), 'args' => array(array('name' => "host", 'type' => String, 'desc' => "Point to the host where memcached is listening for\n\t\t\t\tconnections. This parameter may also specify other transports like\n\t\t\t\tunix:///path/to/memcached.sock to use UNIX domain sockets, in this case\n\t\t\t\tport must also be set to 0."), array('name' => "tcp_port", 'type' => Int32, 'value' => "11211", 'desc' => "Point to the TCP port where memcached is listening for\n\t\t\t\tconnections. Set this parameter to 0 when using UNIX or UDP domain sockets."), array('name' => "udp_port", 'type' => Int32, 'value' => "0", 'desc' => "Point to the UDP port where memcached is listening for\n\t\t\t\tconnections. Set this parameter to 0 when using UNIX od TCP domain sockets."), array('name' => "persistent", 'type' => Boolean, 'value' => "false", 'desc' => "Controls the use of a persistent connection. Default to\n\t\t\t\tTRUE."), array('name' => "weight", 'type' => Int32, 'value' => "0", 'desc' => "Number of buckets to create for this server which in turn\n\t\t\t\tcontrol its probability of it being selected. The probability is\n\t\t\t\trelative to the total weight of all servers."), array('name' => "timeout", 'type' => Double, 'value' => "1", 'desc' => "Value in seconds which will be used for connecting to the\n\t\t\t\tdaemon. Think twice before changing the default value of 1 second - you\n\t\t\t\tcan lose all the advantages of caching if your connection is too slow."), array('name' => "retry_interval", 'type' => Int32, 'value' => "0", 'desc' => "Controls how often a failed server will be retried, the\n\t\t\t\tdefault value is 15 seconds. Setting this parameter to -1 disables\n\t\t\t\tautomatic retry. Neither this nor the persistent parameter has any\n\t\t\t\teffect when the extension is loaded dynamically via dl().\n\nEach failed\n\t\t\t\tconnection struct has its own timeout and before it has expired the\n\t\t\t\tstruct will be skipped when selecting backends to serve a request. Once\n\t\t\t\texpired the connection will be successfully reconnected or marked as\n\t\t\t\tfailed for another retry_interval seconds. The typical effect is that\n\t\t\t\teach web server child will retry the connection about every\n\t\t\t\tretry_interval seconds when serving a page."), array('name' => "status", 'type' => Boolean, 'value' => "true", 'desc' => "Controls if the server should be flagged as online. Setting\n\t\t\t\tthis parameter to FALSE and retry_interval to -1 allows a failed server\n\t\t\t\tto be kept in the pool so as not to affect the key distribution\n\t\t\t\talgorithm. Requests for this server will then failover or fail\n\t\t\t\timmediately depending on the memcache.allow_failover setting. Default to\n\t\t\t\tTRUE, meaning the server should be considered online."))));
DefineFunction(array('name' => "sethashstrategy", 'desc' => "MemcachePool::setHashStrategy() allow you to change the default\n\t\tstrategy for your MemcachePool instance", 'flags' => HasDocComment, 'return' => array('type' => Boolean, 'desc' => "Returns TRUE on success or FALSE on failure."), 'args' => array(array('name' => "hashstrategy", 'type' => Int64, 'desc' => "Hash strategy"))));
DefineFunction(array('name' => "__destruct", 'flags' => HasDocComment, 'return' => array('type' => Variant)));
EndClass();
DefineConstant(array('name' => "MEMCACHE_COMPRESSED", 'type' => Int64));
DefineConstant(array('name' => "MEMCACHE_SERIALIZED", 'type' => Int64));
DefineConstant(array('name' => "MEMCACHE_STRATEGY_STANDARD", 'type' => Int64));
DefineConstant(array('name' => "MEMCACHE_STRATEGY_CONSISTENT", 'type' => Int64));
Exemple #10
0
// Constants
//
// array (
//   'name' => name of the constant
//   'type' => type of the constant
//   'note' => additional note about this constant's schema
// )
DefineConstant(array('name' => "FILEINFO_NONE", 'type' => Int64));
DefineConstant(array('name' => "FILEINFO_SYMLINK", 'type' => Int64));
DefineConstant(array('name' => "FILEINFO_MIME", 'type' => Int64));
DefineConstant(array('name' => "FILEINFO_MIME_TYPE", 'type' => Int64));
DefineConstant(array('name' => "FILEINFO_MIME_ENCODING", 'type' => Int64));
DefineConstant(array('name' => "FILEINFO_DEVICES", 'type' => Int64));
DefineConstant(array('name' => "FILEINFO_CONTINUE", 'type' => Int64));
DefineConstant(array('name' => "FILEINFO_PRESERVE_ATIME", 'type' => Int64));
DefineConstant(array('name' => "FILEINFO_RAW", 'type' => Int64));
///////////////////////////////////////////////////////////////////////////////
// Functions
//
// array (
//   'name'   => name of the function
//   'desc'   => description of the function's purpose
//   'flags'  => attributes of the function, see base.php for possible values
//   'opt'    => optimization callback function's name for compiler
//   'note'   => additional note about this function's schema
//   'return' =>
//      array (
//        'type'  => return type, use Reference for ref return
//        'desc'  => description of the return value
//      )
//   'args'   => arguments
Exemple #11
0
///////////////////////////////////////////////////////////////////////////////
// Constants
//
// array (
//   'name' => name of the constant
//   'type' => type of the constant
//   'note' => additional note about this constant's schema
// )
DefineConstant(array('name' => "JSON_HEX_TAG", 'type' => Int64));
DefineConstant(array('name' => "JSON_HEX_AMP", 'type' => Int64));
DefineConstant(array('name' => "JSON_HEX_APOS", 'type' => Int64));
DefineConstant(array('name' => "JSON_HEX_QUOT", 'type' => Int64));
DefineConstant(array('name' => "JSON_FORCE_OBJECT", 'type' => Int64));
DefineConstant(array('name' => "JSON_NUMERIC_CHECK", 'type' => Int64));
DefineConstant(array('name' => "JSON_UNESCAPED_SLASHES", 'type' => Int64));
DefineConstant(array('name' => "JSON_FB_LOOSE", 'type' => Int64));
///////////////////////////////////////////////////////////////////////////////
// Functions
//
// array (
//   'name'   => name of the function
//   'desc'   => description of the function's purpose
//   'flags'  => attributes of the function, see base.php for possible values
//   'opt'    => optimization callback function's name for compiler
//   'note'   => additional note about this function's schema
//   'return' =>
//      array (
//        'type'  => return type, use Reference for ref return
//        'desc'  => description of the return value
//      )
//   'args'   => arguments
Exemple #12
0
// array (
//   'name' => name of the constant
//   'type' => type of the constant
//   'note' => additional note about this constant's schema
// )
DefineConstant(array('name' => "FB_UNSERIALIZE_NONSTRING_VALUE", 'type' => Int64));
DefineConstant(array('name' => "FB_UNSERIALIZE_UNEXPECTED_END", 'type' => Int64));
DefineConstant(array('name' => "FB_UNSERIALIZE_UNRECOGNIZED_OBJECT_TYPE", 'type' => Int64));
DefineConstant(array('name' => "FB_UNSERIALIZE_UNEXPECTED_ARRAY_KEY_TYPE", 'type' => Int64));
DefineConstant(array('name' => "XHPROF_FLAGS_NO_BUILTINS", 'type' => Int64));
DefineConstant(array('name' => "XHPROF_FLAGS_CPU", 'type' => Int64));
DefineConstant(array('name' => "XHPROF_FLAGS_MEMORY", 'type' => Int64));
DefineConstant(array('name' => "XHPROF_FLAGS_VTSC", 'type' => Int64));
DefineConstant(array('name' => "XHPROF_FLAGS_TRACE", 'type' => Int64));
DefineConstant(array('name' => "XHPROF_FLAGS_MEASURE_XHPROF_DISABLE", 'type' => Int64));
DefineConstant(array('name' => "XHPROF_FLAGS_MALLOC", 'type' => Int64));
///////////////////////////////////////////////////////////////////////////////
// Functions
//
// array (
//   'name'   => name of the function
//   'desc'   => description of the function's purpose
//   'flags'  => attributes of the function, see base.php for possible values
//   'opt'    => optimization callback function's name for compiler
//   'note'   => additional note about this function's schema
//   'return' =>
//      array (
//        'type'  => return type, use Reference for ref return
//        'desc'  => description of the return value
//      )
//   'args'   => arguments
Exemple #13
0
DefineFunction(array('name' => "geoip_org_by_name", 'flags' => HasDocComment, 'desc' => "Returns the Organization Name found in the GeoIP Database", 'return' => array('type' => Variant), 'args' => array(array('name' => "hostname", 'type' => String))));
DefineFunction(array('name' => "geoip_record_by_name", 'flags' => HasDocComment, 'desc' => "Returns the detailed City information found in the GeoIP Database", 'return' => array('type' => VariantMap), 'args' => array(array('name' => "hostname", 'type' => String))));
DefineFunction(array('name' => "geoip_id_by_name", 'flags' => HasDocComment, 'desc' => "Returns the Net Speed found in the GeoIP Database", 'return' => array('type' => Variant), 'args' => array(array('name' => "hostname", 'type' => String))));
DefineFunction(array('name' => "geoip_region_by_name", 'flags' => HasDocComment, 'desc' => "Returns the Country Code and region found in the GeoIP Database", 'return' => array('type' => VariantMap), 'args' => array(array('name' => "hostname", 'type' => String))));
DefineFunction(array('name' => "geoip_isp_by_name", 'flags' => HasDocComment, 'desc' => "Returns the ISP Name found in the GeoIP Database", 'return' => array('type' => Variant), 'args' => array(array('name' => "hostname", 'type' => String))));
DefineFunction(array('name' => "geoip_region_name_by_code", 'flags' => HasDocComment, 'desc' => "Returns the region name for some country code and region code combo", 'return' => array('type' => Variant), 'args' => array(array('name' => "country_code", 'type' => String), array('name' => "region_code", 'type' => String))));
DefineFunction(array('name' => "geoip_time_zone_by_country_and_region", 'flags' => HasDocComment, 'desc' => "Returns the time zone for some country code and region code combo", 'return' => array('type' => Variant), 'args' => array(array('name' => "country_code", 'type' => String), array('name' => "region_code", 'type' => String, 'value' => "null_string"))));
DefineFunction(array('name' => "geoip_db_reload", 'flags' => HasDocComment, 'desc' => "Resets the current db file and reloads it", 'return' => array('type' => Boolean, 'desc' => "Returns TRUE if db reloaded successfully")));
/* For database type constants */
DefineConstant(array('name' => "GEOIP_COUNTRY_EDITION", 'type' => Int64));
DefineConstant(array('name' => "GEOIP_REGION_EDITION_REV0", 'type' => Int64));
DefineConstant(array('name' => "GEOIP_CITY_EDITION_REV0", 'type' => Int64));
DefineConstant(array('name' => "GEOIP_ORG_EDITION", 'type' => Int64));
DefineConstant(array('name' => "GEOIP_ISP_EDITION", 'type' => Int64));
DefineConstant(array('name' => "GEOIP_CITY_EDITION_REV1", 'type' => Int64));
DefineConstant(array('name' => "GEOIP_REGION_EDITION_REV1", 'type' => Int64));
DefineConstant(array('name' => "GEOIP_PROXY_EDITION", 'type' => Int64));
DefineConstant(array('name' => "GEOIP_ASNUM_EDITION", 'type' => Int64));
DefineConstant(array('name' => "GEOIP_NETSPEED_EDITION", 'type' => Int64));
DefineConstant(array('name' => "GEOIP_DOMAIN_EDITION", 'type' => Int64));
/* For netspeed constants */
DefineConstant(array('name' => "GEOIP_UNKNOWN_SPEED", 'type' => Int64));
DefineConstant(array('name' => "GEOIP_DIALUP_SPEED", 'type' => Int64));
DefineConstant(array('name' => "GEOIP_CABLEDSL_SPEED", 'type' => Int64));
DefineConstant(array('name' => "GEOIP_CORPORATE_SPEED", 'type' => Int64));
DefineConstant(array('name' => "GEOIP_STANDARD", 'type' => Int64));
DefineConstant(array('name' => "GEOIP_MEMORY_CACHE", 'type' => Int64));
DefineConstant(array('name' => "GEOIP_CHECK_CACHE", 'type' => Int64));
DefineConstant(array('name' => "GEOIP_INDEX_CACHE", 'type' => Int64));
DefineConstant(array('name' => "GEOIP_MMAP_CACHE", 'type' => Int64));
Exemple #14
0
DefineConstant(array('name' => "LINECAP_ROUND", 'type' => Int32));
DefineConstant(array('name' => "LINECAP_SQUARE", 'type' => Int32));
DefineConstant(array('name' => "LINEJOIN_UNDEFINED", 'type' => Int32));
DefineConstant(array('name' => "LINEJOIN_MITER", 'type' => Int32));
DefineConstant(array('name' => "LINEJOIN_ROUND", 'type' => Int32));
DefineConstant(array('name' => "LINEJOIN_BEVEL", 'type' => Int32));
DefineConstant(array('name' => "RESOURCETYPE_UNDEFINED", 'type' => Int32));
DefineConstant(array('name' => "RESOURCETYPE_AREA", 'type' => Int32));
DefineConstant(array('name' => "RESOURCETYPE_DISK", 'type' => Int32));
DefineConstant(array('name' => "RESOURCETYPE_FILE", 'type' => Int32));
DefineConstant(array('name' => "RESOURCETYPE_MAP", 'type' => Int32));
DefineConstant(array('name' => "RESOURCETYPE_MEMORY", 'type' => Int32));
DefineConstant(array('name' => "DISPOSE_UNDEFINED", 'type' => Int32));
DefineConstant(array('name' => "DISPOSE_NONE", 'type' => Int32));
DefineConstant(array('name' => "DISPOSE_BACKGROUND", 'type' => Int32));
DefineConstant(array('name' => "DISPOSE_PREVIOUS", 'type' => Int32));
EndClass();
///////////////////////////////////////////////////////////////////////////////
// Classes
//
// BeginClass
// array (
//   'name'   => name of the class
//   'desc'   => description of the class's purpose
//   'flags'  => attributes of the class, see base.php for possible values
//   'note'   => additional note about this class's schema
//   'parent' => parent class name, if any
//   'ifaces' => array of interfaces tihs class implements
//   'bases'  => extra internal and special base classes this class requires
//   'footer' => extra C++ inserted at end of class declaration
// )
Exemple #15
0
DefineConstant(array('name' => "UCOL_QUATERNARY", 'type' => Int64));
DefineConstant(array('name' => "UCOL_IDENTICAL", 'type' => Int64));
DefineConstant(array('name' => "UCOL_OFF", 'type' => Int64));
DefineConstant(array('name' => "UCOL_ON", 'type' => Int64));
DefineConstant(array('name' => "UCOL_SHIFTED", 'type' => Int64));
DefineConstant(array('name' => "UCOL_NON_IGNORABLE", 'type' => Int64));
DefineConstant(array('name' => "UCOL_LOWER_FIRST", 'type' => Int64));
DefineConstant(array('name' => "UCOL_UPPER_FIRST", 'type' => Int64));
DefineConstant(array('name' => "UCOL_FRENCH_COLLATION", 'type' => Int64));
DefineConstant(array('name' => "UCOL_ALTERNATE_HANDLING", 'type' => Int64));
DefineConstant(array('name' => "UCOL_CASE_FIRST", 'type' => Int64));
DefineConstant(array('name' => "UCOL_CASE_LEVEL", 'type' => Int64));
DefineConstant(array('name' => "UCOL_NORMALIZATION_MODE", 'type' => Int64));
DefineConstant(array('name' => "UCOL_STRENGTH", 'type' => Int64));
DefineConstant(array('name' => "UCOL_HIRAGANA_QUATERNARY_MODE", 'type' => Int64));
DefineConstant(array('name' => "UCOL_NUMERIC_COLLATION", 'type' => Int64));
///////////////////////////////////////////////////////////////////////////////
// Functions
//
// array (
//   'name'   => name of the function
//   'desc'   => description of the function's purpose
//   'flags'  => attributes of the function, see base.php for possible values
//   'opt'    => optimization callback function's name for compiler
//   'note'   => additional note about this function's schema
//   'return' =>
//      array (
//        'type'  => return type, use Reference for ref return
//        'desc'  => description of the return value
//      )
//   'args'   => arguments
DefineConstant(
  array(
    'name'   => "ALL",
    'type'   => Int64,
  ));

DefineConstant(
  array(
    'name'   => "ALL_WITH_BC",
    'type'   => Int64,
  ));

DefineConstant(
  array(
    'name'   => "PER_COUNTRY",
    'type'   => Int64,
  ));

DefineFunction(
  array(
    'name'   => "__construct",
    'flags'  =>  HasDocComment,
    'return' => array(
      'type'   => null,
    ),
    'args'   => array(
      array(
        'name'   => "timezone",
        'type'   => String,
      ),
Exemple #17
0
// array (
//   'name' => name of the constant
//   'type' => type of the constant
//   'note' => additional note about this constant's schema
// )
DefineConstant(array('name' => "SQLITE3_ASSOC", 'type' => Int64));
DefineConstant(array('name' => "SQLITE3_NUM", 'type' => Int64));
DefineConstant(array('name' => "SQLITE3_BOTH", 'type' => Int64));
DefineConstant(array('name' => "SQLITE3_INTEGER", 'type' => Int64));
DefineConstant(array('name' => "SQLITE3_FLOAT", 'type' => Int64));
DefineConstant(array('name' => "SQLITE3_TEXT", 'type' => Int64));
DefineConstant(array('name' => "SQLITE3_BLOB", 'type' => Int64));
DefineConstant(array('name' => "SQLITE3_NULL", 'type' => Int64));
DefineConstant(array('name' => "SQLITE3_OPEN_READONLY", 'type' => Int64));
DefineConstant(array('name' => "SQLITE3_OPEN_READWRITE", 'type' => Int64));
DefineConstant(array('name' => "SQLITE3_OPEN_CREATE", 'type' => Int64));
///////////////////////////////////////////////////////////////////////////////
// Functions
//
// array (
//   'name'   => name of the function
//   'desc'   => description of the function's purpose
//   'flags'  => attributes of the function, see base.php for possible values
//   'opt'    => optimization callback function's name for compiler
//   'note'   => additional note about this function's schema
//   'return' =>
//      array (
//        'type'  => return type, use Reference for ref return
//        'desc'  => description of the return value
//      )
//   'args'   => arguments
Exemple #18
0
DefineConstant(array('name' => "RES_CLIENT_ERROR", 'type' => Int32));
DefineConstant(array('name' => "RES_SERVER_ERROR", 'type' => Int32));
DefineConstant(array('name' => "RES_WRITE_FAILURE", 'type' => Int32));
DefineConstant(array('name' => "RES_DATA_EXISTS", 'type' => Int32));
DefineConstant(array('name' => "RES_NOTSTORED", 'type' => Int32));
DefineConstant(array('name' => "RES_NOTFOUND", 'type' => Int32));
DefineConstant(array('name' => "RES_PARTIAL_READ", 'type' => Int32));
DefineConstant(array('name' => "RES_SOME_ERRORS", 'type' => Int32));
DefineConstant(array('name' => "RES_NO_SERVERS", 'type' => Int32));
DefineConstant(array('name' => "RES_END", 'type' => Int32));
DefineConstant(array('name' => "RES_ERRNO", 'type' => Int32));
DefineConstant(array('name' => "RES_BUFFERED", 'type' => Int32));
DefineConstant(array('name' => "RES_TIMEOUT", 'type' => Int32));
DefineConstant(array('name' => "RES_BAD_KEY_PROVIDED", 'type' => Int32));
DefineConstant(array('name' => "RES_CONNECTION_SOCKET_CREATE_FAILURE", 'type' => Int32));
DefineConstant(array('name' => "RES_PAYLOAD_FAILURE", 'type' => Int32));
DefineFunction(array('name' => "__construct", 'flags' => HasDocComment, 'return' => array('type' => null), 'args' => array(array('name' => "persistent_id", 'type' => String, 'value' => "null_string"))));
DefineFunction(array('name' => "add", 'desc' => "Memcached::add() is similar to Memcached::set(), but the operation fails if the key already exists on the server.", 'flags' => HasDocComment, 'return' => array('type' => Boolean, 'desc' => "Returns TRUE on success or FALSE on failure. The Memcached::getResultCode() will return Memcached::RES_NOTSTORED if the key already exists."), 'args' => array(array('name' => "key", 'type' => String, 'desc' => "The key under which to store the value."), array('name' => "value", 'type' => Variant, 'desc' => "The value to store."), array('name' => "expiration", 'type' => Int32, 'value' => "0", 'desc' => "The expiration time, defaults to 0. See Expiration Times for more info."))));
DefineFunction(array('name' => "addByKey", 'desc' => "Memcached::addByKey() is functionally equivalent to Memcached::add(), except that the free-form server_key can be used to map the key to a specific server. This is useful if you need to keep a bunch of related keys on a certain server.", 'flags' => HasDocComment, 'return' => array('type' => Boolean, 'desc' => "Returns TRUE on success or FALSE on failure. The Memcached::getResultCode() will return Memcached::RES_NOTSTORED if the key already exists."), 'args' => array(array('name' => "server_key", 'type' => String, 'desc' => "The key identifying the server to store the value on."), array('name' => "key", 'type' => String, 'desc' => "The key under which to store the value."), array('name' => "value", 'type' => Variant, 'desc' => "The value to store."), array('name' => "expiration", 'type' => Int32, 'value' => "0", 'desc' => "The expiration time, defaults to 0. See Expiration Times for more info."))));
DefineFunction(array('name' => "addServer", 'desc' => "Memcached::addServer() adds the specified server to the server pool. No connection is established to the server at this time, but if you are using consistent key distribution option (via Memcached::DISTRIBUTION_CONSISTENT or Memcached::OPT_LIBKETAMA_COMPATIBLE), some of the internal data structures will have to be updated. Thus, if you need to add multiple servers, it is better to use Memcached::addServers() as the update then happens only once.\n\nThe same server may appear multiple times in the server pool, because no duplication checks are made. This is not advisable; instead, use the weight option to increase the selection weighting of this server.", 'flags' => HasDocComment, 'return' => array('type' => Boolean, 'desc' => "Returns TRUE on success or FALSE on failure."), 'args' => array(array('name' => "host", 'type' => String, 'desc' => "The hostname of the memcache server. If the hostname is invalid, data-related operations will set Memcached::RES_HOST_LOOKUP_FAILURE result code."), array('name' => "port", 'type' => Int32, 'desc' => "The port on which memcache is running. Usually, this is 11211."), array('name' => "weight", 'type' => Int32, 'value' => "0", 'desc' => "The weight of the server relative to the total weight of all the servers in the pool. This controls the probability of the server being selected for operations. This is used only with consistent distribution option and usually corresponds to the amount of memory available to memcache on that server."))));
DefineFunction(array('name' => "addServers", 'desc' => "Memcached::addServers() adds servers to the server pool. Each entry in servers is supposed to be an array containing hostname, port, and, optionally, weight of the server. No connection is established to the servers at this time.\n\nThe same server may appear multiple times in the server pool, because no duplication checks are made. This is not advisable; instead, use the weight option to increase the selection weighting of this server.", 'flags' => HasDocComment, 'return' => array('type' => Boolean, 'desc' => "Returns TRUE on success or FALSE on failure."), 'args' => array(array('name' => "servers", 'type' => VariantVec, 'desc' => "Array of the servers to add to the pool."))));
DefineFunction(array('name' => "append", 'desc' => "Memcached::append() appends the given value string to the value of an existing item. The reason that value is forced to be a string is that appending mixed types is not well-defined.\n\nIf the Memcached::OPT_COMPRESSION is enabled, the operation will fail and a warning will be issued, because appending compressed data to a value that is potentially already compressed is not possible.", 'flags' => HasDocComment, 'return' => array('type' => Boolean, 'desc' => "Returns TRUE on success or FALSE on failure. The Memcached::getResultCode() will return Memcached::RES_NOTSTORED if the key does not exist."), 'args' => array(array('name' => "key", 'type' => String, 'desc' => "The key under which to store the value."), array('name' => "value", 'type' => String, 'desc' => "The string to append."))));
DefineFunction(array('name' => "appendByKey", 'desc' => "Memcached::appendByKey() is functionally equivalent to Memcached::append(), except that the free-form server_key can be used to map the key to a specific server.", 'flags' => HasDocComment, 'return' => array('type' => Boolean, 'desc' => "Returns TRUE on success or FALSE on failure. The Memcached::getResultCode() will return Memcached::RES_NOTSTORED if the key does not exist."), 'args' => array(array('name' => "server_key", 'type' => String, 'desc' => "The key identifying the server to store the value on."), array('name' => "key", 'type' => String, 'desc' => "The key under which to store the value."), array('name' => "value", 'type' => String, 'desc' => "The string to append."))));
DefineFunction(array('name' => "cas", 'desc' => "Memcached::cas() performs a \"check and set\" operation, so that the item will be stored only if no other client has updated it since it was last fetched by this client. The check is done via the cas_token parameter which is a unique 64-bit value assigned to the existing item by memcache. See the documentation for Memcached::get*() methods for how to obtain this token. Note that the token is represented as a double due to the limitations of PHP's integer space.", 'flags' => HasDocComment, 'return' => array('type' => Boolean, 'desc' => "Returns TRUE on success or FALSE on failure. The Memcached::getResultCode() will return Memcached::RES_DATA_EXISTS if the item you are trying to store has been modified since you last fetched it."), 'args' => array(array('name' => "cas_token", 'type' => Double, 'desc' => "Unique value associated with the existing item. Generated by memcache."), array('name' => "key", 'type' => String, 'desc' => "The key under which to store the value."), array('name' => "value", 'type' => Variant, 'desc' => "The value to store."), array('name' => "expiration", 'type' => Int32, 'value' => "0", 'desc' => "The expiration time, defaults to 0. See Expiration Times for more info."))));
DefineFunction(array('name' => "casByKey", 'desc' => "Memcached::casByKey() is functionally equivalent to Memcached::cas(), except that the free-form server_key can be used to map the key to a specific server. This is useful if you need to keep a bunch of related keys on a certain server.", 'flags' => HasDocComment, 'return' => array('type' => Boolean, 'desc' => "Returns TRUE on success or FALSE on failure. The Memcached::getResultCode() will return Memcached::RES_DATA_EXISTS if the item you are trying to store has been modified since you last fetched it."), 'args' => array(array('name' => "cas_token", 'type' => Double, 'desc' => "Unique value associated with the existing item. Generated by memcache."), array('name' => "server_key", 'type' => String, 'desc' => "The key identifying the server to store the value on."), array('name' => "key", 'type' => String, 'desc' => "The key under which to store the value."), array('name' => "value", 'type' => Variant, 'desc' => "The value to store."), array('name' => "expiration", 'type' => Int32, 'value' => "0", 'desc' => "The expiration time, defaults to 0. See Expiration Times for more info."))));
DefineFunction(array('name' => "decrement", 'desc' => "Memcached::decrement() decrements a numeric item's value by the specified offset. If the item's value is not numeric, it is treated as if the value were 0. If the operation would decrease the value below 0, the new value will be 0. Memcached::decrement() will fail if the item does not exist.", 'flags' => HasDocComment, 'return' => array('type' => Variant, 'desc' => "Returns item's new value on success or FALSE on failure. The Memcached::getResultCode() will return Memcached::RES_NOTFOUND if the key does not exist."), 'args' => array(array('name' => "key", 'type' => String, 'desc' => "The key of the item to decrement."), array('name' => "offset", 'type' => Int64, 'value' => "1", 'desc' => "The amount by which to decrement the item's value."))));
DefineFunction(array('name' => "delete", 'desc' => "Memcached::delete() deletes the key from the server. The time parameter is the amount of time in seconds (or Unix time until which) the client wishes the server to refuse add and replace commands for this key. For this amount of time, the item is put into a delete queue, which means that it won't possible to retrieve it by the get command, but add and replace command with this key will also fail (the set command will succeed, however). After the time passes, the item is finally deleted from server memory. The parameter time defaults to 0 (which means that the item will be deleted immediately and further storage commands with this key will succeed).", 'flags' => HasDocComment, 'return' => array('type' => Boolean, 'desc' => "Returns TRUE on success or FALSE on failure. The Memcached::getResultCode() will return Memcached::RES_NOTFOUND if the key does not exist."), 'args' => array(array('name' => "key", 'type' => String, 'desc' => "The key to be deleted."), array('name' => "time", 'type' => Int32, 'value' => "0", 'desc' => "The amount of time the server will wait to delete the item."))));
DefineFunction(array('name' => "deleteByKey", 'desc' => "Memcached::deleteByKey() is functionally equivalent to Memcached::delete(), except that the free-form server_key can be used to map the key to a specific server.", 'flags' => HasDocComment, 'return' => array('type' => Boolean, 'desc' => "Returns TRUE on success or FALSE on failure. The Memcached::getResultCode() will return Memcached::RES_NOTFOUND if the key does not exist."), 'args' => array(array('name' => "server_key", 'type' => String, 'desc' => "The key identifying the server to store the value on."), array('name' => "key", 'type' => String, 'desc' => "The key to be deleted."), array('name' => "time", 'type' => Int32, 'value' => "0", 'desc' => "The amount of time the server will wait to delete the item."))));
DefineFunction(array('name' => "fetch", 'desc' => "Memcached::fetch() retrieves the next result from the last request.", 'flags' => HasDocComment, 'return' => array('type' => Variant, 'desc' => "Returns the next result or FALSE otherwise. The Memcached::getResultCode() will return Memcached::RES_END if result set is exhausted."), 'taint_observer' => array('set_mask' => "TAINT_BIT_ALL", 'clear_mask' => "TAINT_BIT_NONE")));
DefineFunction(array('name' => "fetchAll", 'desc' => "Memcached::fetchAll() retrieves all the remaining results from the last request.", 'flags' => HasDocComment, 'return' => array('type' => Variant, 'desc' => "Returns the results or FALSE on failure. Use Memcached::getResultCode() if necessary."), 'taint_observer' => array('set_mask' => "TAINT_BIT_ALL", 'clear_mask' => "TAINT_BIT_NONE")));
DefineFunction(array('name' => "flush", 'desc' => "Memcached::flush() invalidates all existing cache items immediately (by default) or after the delay specified. After invalidation none of the items will be returned in response to a retrieval command (unless it's stored again under the same key after Memcached::flush() has invalidated the items). The flush does not actually free all the memory taken up by the existing items; that will happen gradually as new items are stored.", 'flags' => HasDocComment, 'return' => array('type' => Boolean, 'desc' => "Returns TRUE on success or FALSE on failure. Use Memcached::getResultCode() if necessary."), 'args' => array(array('name' => "delay", 'type' => Int32, 'value' => "0", 'desc' => "Numer of seconds to wait before invalidating the items."))));
Exemple #19
0
//        'type'  => return type, use Reference for ref return
//        'desc'  => description of the return value
//      )
//   'args'   => arguments
//      array (
//        'name'  => name of the argument
//        'type'  => type of the argument, use Reference for output parameter
//        'value' => default value of the argument
//        'desc'  => description of the argument
//      )
// )
DefineFunction(array('name' => "dangling_server_proxy_old_request", 'desc' => "When I'm running a newer version of the server software and I'm getting an HTTP request that's from old version of a web page, proxy it to a local instance that is still running or dangling just for handling old version of requests. Please read server documentation for more details.", 'flags' => HasDocComment | HipHopSpecific, 'return' => array('type' => Boolean, 'desc' => "TRUE if successful, FALSE otherwise.")));
DefineFunction(array('name' => "dangling_server_proxy_new_request", 'desc' => "When I'm still running an old version of the server software and I'm getting an HTTP request that's newer, proxy it to a specified host that already has the new version of the software running. Please read server documentation for more details.", 'flags' => HasDocComment | HipHopSpecific, 'return' => array('type' => Boolean, 'desc' => "TRUE if successful, FALSE otherwise."), 'args' => array(array('name' => "host", 'type' => String, 'desc' => "The machine to proxy to."))));
DefineConstant(array('name' => "PAGELET_NOT_READY", 'type' => Int64));
DefineConstant(array('name' => "PAGELET_READY", 'type' => Int64));
DefineConstant(array('name' => "PAGELET_DONE", 'type' => Int64));
DefineFunction(array('name' => "pagelet_server_is_enabled", 'desc' => "Whether pagelet server is enabled or not. Please read server documentation for what a pagelet server is.", 'flags' => HasDocComment | HipHopSpecific, 'return' => array('type' => Boolean, 'desc' => "TRUE if it's enabled, FALSE otherwise.")));
DefineFunction(array('name' => "pagelet_server_task_start", 'desc' => "Processes a pagelet server request.", 'flags' => HasDocComment | HipHopSpecific, 'return' => array('type' => Resource, 'desc' => "An object that can be used with pagelet_server_task_status() or pagelet_server_task_result()."), 'args' => array(array('name' => "url", 'type' => String, 'desc' => "The URL we're running this pagelet with."), array('name' => "headers", 'type' => StringMap, 'value' => "null_array", 'desc' => "HTTP headers to send to the pagelet."), array('name' => "post_data", 'type' => String, 'value' => "null_string", 'desc' => "POST data to send."))));
DefineFunction(array('name' => "pagelet_server_task_status", 'desc' => "Checks finish status of a pagelet task.", 'flags' => HasDocComment | HipHopSpecific, 'return' => array('type' => Int64, 'desc' => "PAGELET_NOT_READY if there is no data available, PAGELET_READY if (partial) data is available from pagelet_server_flush(), and PAGELET_DONE if the pagelet request is done."), 'args' => array(array('name' => "task", 'type' => Resource, 'desc' => "The pagelet task handle returned from pagelet_server_task_start()."))));
DefineFunction(array('name' => "pagelet_server_task_result", 'desc' => "Block and wait until pagelet task finishes.", 'flags' => HasDocComment | HipHopSpecific, 'return' => array('type' => String, 'desc' => "HTTP response from the pagelet."), 'args' => array(array('name' => "task", 'type' => Resource, 'desc' => "The pagelet task handle returned from pagelet_server_task_start()."), array('name' => "headers", 'type' => Variant | Reference, 'desc' => "HTTP response headers."), array('name' => "code", 'type' => Variant | Reference, 'desc' => "HTTP response code."))));
DefineFunction(array('name' => "pagelet_server_flush", 'desc' => "Flush all the currently buffered output, so that the main thread can read it with pagelet_server_task_result(). This is only meaningful in a pagelet thread.", 'flags' => HasDocComment | HipHopSpecific, 'return' => array('type' => null, 'desc' => "No value is returned.")));
DefineFunction(array('name' => "xbox_send_message", 'desc' => "Sends an xbox message and waits for response. Please read server documentation for what an xbox is.", 'flags' => HasDocComment | HipHopSpecific, 'return' => array('type' => Boolean, 'desc' => "TRUE if successful, FALSE otherwise."), 'args' => array(array('name' => "msg", 'type' => String, 'desc' => "The message."), array('name' => "ret", 'type' => Variant | Reference, 'desc' => "The response."), array('name' => "timeout_ms", 'type' => Int64, 'desc' => "How many milli-seconds to wait."), array('name' => "host", 'type' => String, 'value' => "\"localhost\"", 'desc' => "Which machine to send to."))));
DefineFunction(array('name' => "xbox_post_message", 'desc' => "Posts an xbox message without waiting. Please read server documentation for more details.", 'flags' => HasDocComment | HipHopSpecific, 'return' => array('type' => Boolean, 'desc' => "TRUE if successful, FALSE otherwise."), 'args' => array(array('name' => "msg", 'type' => String, 'desc' => "The response."), array('name' => "host", 'type' => String, 'value' => "\"localhost\"", 'desc' => "Which machine to post to."))));
DefineFunction(array('name' => "xbox_task_start", 'desc' => "Starts a local xbox task.", 'flags' => HasDocComment | HipHopSpecific, 'return' => array('type' => Resource, 'desc' => "A task handle xbox_task_status() and xbox_task_result() can use."), 'args' => array(array('name' => "message", 'type' => String, 'desc' => "A message to send to xbox's message processing function."))));
DefineFunction(array('name' => "xbox_task_status", 'desc' => "Checks an xbox task's status.", 'flags' => HasDocComment | HipHopSpecific, 'return' => array('type' => Boolean, 'desc' => "TRUE if finished, FALSE otherwise."), 'args' => array(array('name' => "task", 'type' => Resource, 'desc' => "The xbox task object created by xbox_task_start()."))));
DefineFunction(array('name' => "xbox_task_result", 'desc' => "Block and wait for xbox task's result.", 'flags' => HasDocComment | HipHopSpecific, 'return' => array('type' => Int64, 'desc' => "Response code following HTTP's responses. For example, 200 for success and 500 for server error."), 'args' => array(array('name' => "task", 'type' => Resource, 'desc' => "The xbox task object created by xbox_task_start()."), array('name' => "timeout_ms", 'type' => Int64, 'desc' => "How many milli-seconds to wait."), array('name' => "ret", 'type' => Variant | Reference, 'desc' => "xbox message processing function's return value."))));
DefineFunction(array('name' => "xbox_get_thread_timeout", 'desc' => "Gets the timeout (maximum duration), in seconds, of the current xbox thread. Throws for non-xbox threads.", 'flags' => HasDocComment | HipHopSpecific, 'return' => array('type' => Int32, 'desc' => "The current timeout (maximum duration).")));
DefineFunction(array('name' => "xbox_set_thread_timeout", 'desc' => "Sets the timeout (maximum duration), in seconds, of the current xbox thread. The xbox thread would reset when this amount of time has passed since the previous reset. Throws for non-xbox threads.", 'flags' => HasDocComment | HipHopSpecific, 'return' => array('type' => null), 'args' => array(array('name' => "timeout", 'type' => Int32, 'desc' => "The new timeout (maximum duration)."))));
DefineFunction(array('name' => "xbox_schedule_thread_reset", 'desc' => "Schedules a reset of the current xbox thread, when the next request comes in. Throws for non-xbox threads.", 'flags' => HasDocComment | HipHopSpecific, 'return' => array('type' => null)));
DefineFunction(array('name' => "xbox_get_thread_time", 'desc' => "Returns the time that the current xbox thread has been running without a reset, in seconds, and throws for non-xbox threads.", 'flags' => HasDocComment | HipHopSpecific, 'return' => array('type' => Int32, 'desc' => "The time that the current xbox thread has been running without a reset.")));
///////////////////////////////////////////////////////////////////////////////
Exemple #20
0
 */
///////////////////////////////////////////////////////////////////////////////
// Preamble: C++ code inserted at beginning of ext_{name}.h
DefinePreamble(<<<CPP
CPP
);
///////////////////////////////////////////////////////////////////////////////
// Constants
//
// array (
//   'name' => name of the constant
//   'type' => type of the constant
//   'note' => additional note about this constant's schema
// )
DefineConstant(array('name' => "OPENSSL_RAW_DATA", 'type' => Int64));
DefineConstant(array('name' => "OPENSSL_ZERO_PADDING", 'type' => Int64));
///////////////////////////////////////////////////////////////////////////////
// Functions
//
// array (
//   'name'   => name of the function
//   'desc'   => description of the function's purpose
//   'flags'  => attributes of the function, see base.php for possible values
//   'opt'    => optimization callback function's name for compiler
//   'note'   => additional note about this function's schema
//   'return' =>
//      array (
//        'type'  => return type, use Reference for ref return
//        'desc'  => description of the return value
//      )
//   'args'   => arguments
Exemple #21
0
DefineFunction(array('name' => "getCommand", 'desc' => "Debugger command end user typed.", 'flags' => HasDocComment | HipHopSpecific, 'return' => array('type' => String, 'desc' => "The command text.")));
DefineFunction(array('name' => "arg", 'desc' => "Tests if an argument matches a pre-defined keyword. As long as it matches the keyword partially and case-insensitively, it is considered as a match. For example, \$client->arg(2, 'foo') will return TRUE if user inputs 'f' or 'fo' or 'Fo' for the 2nd argument.", 'flags' => HasDocComment | HipHopSpecific, 'return' => array('type' => Boolean, 'desc' => "TRUE if matched. FALSE otherwise."), 'args' => array(array('name' => "index", 'type' => Int32, 'desc' => "Argument index."), array('name' => "str", 'type' => String, 'desc' => "The string to compare with."))));
DefineFunction(array('name' => "argCount", 'desc' => "Count of total arguments.", 'flags' => HasDocComment | HipHopSpecific, 'return' => array('type' => Int64, 'desc' => "The count, not including user command itself.")));
DefineFunction(array('name' => "argValue", 'desc' => "Gets value of an argument.", 'flags' => HasDocComment | HipHopSpecific, 'return' => array('type' => String, 'desc' => "String value of an argument."), 'args' => array(array('name' => "index", 'type' => Int32, 'desc' => "Argument index."))));
DefineFunction(array('name' => "argRest", 'desc' => "Gets remaining arguments all together as a single string.", 'flags' => HasDocComment | HipHopSpecific, 'return' => array('type' => String, 'desc' => "The string that has all argument at and after certain index."), 'args' => array(array('name' => "index", 'type' => Int32, 'desc' => "The starting index to include arguments."))));
DefineFunction(array('name' => "args", 'flags' => HasDocComment | HipHopSpecific, 'return' => array('type' => StringVec)));
DefineFunction(array('name' => "send", 'desc' => "Sends a debugger command to debugger proxy.", 'flags' => HasDocComment | HipHopSpecific, 'return' => array('type' => Variant, 'desc' => "TRUE if successful, FALSE otherwise."), 'args' => array(array('name' => "cmd", 'type' => Object, 'desc' => "The command to send."))));
DefineFunction(array('name' => "xend", 'desc' => "Exchanges command with proxy: sends a command to debugger and expects and receives a command from debugger.", 'flags' => HasDocComment | HipHopSpecific, 'return' => array('type' => Variant, 'desc' => "The received command, and it is always the same type as what it sends, so the same command class can handle processing at both sending and receiving sides."), 'args' => array(array('name' => "cmd", 'type' => Object, 'desc' => "The command to send."))));
DefineFunction(array('name' => "getCurrentLocation", 'desc' => "Gets current source location.", 'flags' => HasDocComment | HipHopSpecific, 'return' => array('type' => Variant, 'desc' => "An array in a format of array('file' => {source file name}, 'line' => {line number}, 'namespace' => {namespace code is in}, 'class' => {class code is in}, 'function' => {function code is in}, 'text' => {human readable description of current source location}).")));
DefineFunction(array('name' => "getStackTrace", 'desc' => "Gets current stacktrace.", 'flags' => HasDocComment | HipHopSpecific, 'return' => array('type' => Variant, 'desc' => "An array of stacktrace frames.")));
DefineFunction(array('name' => "getFrame", 'desc' => "Returns current frame index.", 'flags' => HasDocComment | HipHopSpecific, 'return' => array('type' => Int64, 'desc' => "An index indicating which frame end user has moved to for inspection.")));
DefineFunction(array('name' => "printFrame", 'desc' => "Prints a stacktrace frame.", 'flags' => HasDocComment | HipHopSpecific, 'return' => array('type' => null), 'args' => array(array('name' => "index", 'type' => Int32, 'desc' => "Which frame to print."))));
DefineFunction(array('name' => "addCompletion", 'desc' => "Adds string(s) to auto-completion. This function is only effective inside DebuggerClientCmdUser::onAutoComplete().", 'flags' => HasDocComment | HipHopSpecific, 'return' => array('type' => null), 'args' => array(array('name' => "list", 'type' => Variant, 'desc' => "A single string, an AUTO_COMPLETE_ constant or an array of strings."))));
EndClass();
///////////////////////////////////////////////////////////////////////////////
BeginClass(array('name' => "DebuggerClient", 'desc' => "", 'bases' => array('Sweepable'), 'flags' => HasDocComment | HipHopSpecific | NoDefaultSweep, 'footer' => <<<EOT

 public:
  Eval::DebuggerClient *m_client;
EOT
));
DefineConstant(array('name' => "STATE_INVALID", 'type' => Int64));
DefineConstant(array('name' => "STATE_UNINIT", 'type' => Int64));
DefineConstant(array('name' => "STATE_INITIALIZING", 'type' => Int64));
DefineConstant(array('name' => "STATE_READY_FOR_COMMAND", 'type' => Int64));
DefineConstant(array('name' => "STATE_BUSY", 'type' => Int64));
DefineFunction(array('name' => "__construct", 'desc' => "Constructor", 'flags' => HasDocComment | HipHopSpecific, 'return' => array('type' => null)));
DefineFunction(array('name' => "getState", 'desc' => "get current state of the debugger client", 'flags' => HasDocComment | HipHopSpecific, 'return' => array('type' => Int64, 'desc' => "One of the constants")));
DefineFunction(array('name' => "init", 'desc' => "initialize the debugger client", 'flags' => HasDocComment | HipHopSpecific, 'return' => array('type' => Variant, 'desc' => "TBD"), 'args' => array(array('name' => "options", 'type' => Variant, 'desc' => "array for passing options"))));
DefineFunction(array('name' => "processCmd", 'desc' => "issue a command to debugger client", 'flags' => HasDocComment | HipHopSpecific, 'return' => array('type' => Variant, 'desc' => "TBD"), 'args' => array(array('name' => "cmdName", 'type' => Variant, 'desc' => "name of the command to be executed"), array('name' => "args", 'type' => Variant, 'desc' => "A vector array of strings to be used as arguments"))));
EndClass();
Exemple #22
0
DefineConstant(array('name' => "FILTER_FLAG_ENCODE_LOW", 'type' => Int64));
DefineConstant(array('name' => "FILTER_FLAG_ENCODE_HIGH", 'type' => Int64));
DefineConstant(array('name' => "FILTER_FLAG_ENCODE_AMP", 'type' => Int64));
DefineConstant(array('name' => "FILTER_FLAG_NO_ENCODE_QUOTES", 'type' => Int64));
DefineConstant(array('name' => "FILTER_FLAG_EMPTY_STRING_NULL", 'type' => Int64));
DefineConstant(array('name' => "FILTER_FLAG_ALLOW_FRACTION", 'type' => Int64));
DefineConstant(array('name' => "FILTER_FLAG_ALLOW_THOUSAND", 'type' => Int64));
DefineConstant(array('name' => "FILTER_FLAG_ALLOW_SCIENTIFIC", 'type' => Int64));
DefineConstant(array('name' => "FILTER_FLAG_SCHEME_REQUIRED", 'type' => Int64));
DefineConstant(array('name' => "FILTER_FLAG_HOST_REQUIRED", 'type' => Int64));
DefineConstant(array('name' => "FILTER_FLAG_PATH_REQUIRED", 'type' => Int64));
DefineConstant(array('name' => "FILTER_FLAG_QUERY_REQUIRED", 'type' => Int64));
DefineConstant(array('name' => "FILTER_FLAG_IPV4", 'type' => Int64));
DefineConstant(array('name' => "FILTER_FLAG_IPV6", 'type' => Int64));
DefineConstant(array('name' => "FILTER_FLAG_NO_RES_RANGE", 'type' => Int64));
DefineConstant(array('name' => "FILTER_FLAG_NO_PRIV_RANGE", 'type' => Int64));
///////////////////////////////////////////////////////////////////////////////
// Functions
//
// array (
//   'name'   => name of the function
//   'desc'   => description of the function's purpose
//   'flags'  => attributes of the function, see base.php for possible values
//   'opt'    => optimization callback function's name for compiler
//   'note'   => additional note about this function's schema
//   'return' =>
//      array (
//        'type'  => return type, use Reference for ref return
//        'desc'  => description of the return value
//      )
//   'args'   => arguments
Exemple #23
0
///////////////////////////////////////////////////////////////////////////////
// Preamble: C++ code inserted at beginning of ext_{name}.h
DefinePreamble(<<<CPP
CPP
);
///////////////////////////////////////////////////////////////////////////////
// Constants
//
// array (
//   'name' => name of the constant
//   'type' => type of the constant
//   'note' => additional note about this constant's schema
// )
DefineConstant(array('name' => "STDIN", 'type' => Resource));
DefineConstant(array('name' => "STDOUT", 'type' => Resource));
DefineConstant(array('name' => "STDERR", 'type' => Resource));
///////////////////////////////////////////////////////////////////////////////
// Functions
//
// array (
//   'name'   => name of the function
//   'desc'   => description of the function's purpose
//   'flags'  => attributes of the function, see base.php for possible values
//   'opt'    => optimization callback function's name for compiler
//   'note'   => additional note about this function's schema
//   'return' =>
//      array (
//        'type'  => return type, use Reference for ref return
//        'desc'  => description of the return value
//      )
//   'args'   => arguments
Exemple #24
0
DefineFunction(array('name' => "getlocale", 'desc' => "Procedural style string collator_get_locale ( Collator \$coll , int \$type ) Get collector locale name.", 'flags' => HasDocComment, 'return' => array('type' => String, 'desc' => "Real locale name from which the collation data comes. If the collator was instantiated from rules or an error occurred, returns boolean FALSE."), 'args' => array(array('name' => "type", 'type' => Int64, 'value' => "0", 'desc' => "Collator object."))));
DefineFunction(array('name' => "getstrength", 'desc' => "Procedural style int collator_get_strength ( Collator \$coll )", 'flags' => HasDocComment, 'return' => array('type' => Int64, 'desc' => "Returns current collation strength, or boolean FALSE on error.")));
DefineFunction(array('name' => "setattribute", 'desc' => "Procedural style bool collator_set_attribute ( Collator \$coll , int \$attr , int \$val )", 'flags' => HasDocComment, 'return' => array('type' => Boolean, 'desc' => "Returns TRUE on success or FALSE on failure."), 'args' => array(array('name' => "attr", 'type' => Int64, 'desc' => "Collator object."), array('name' => "val", 'type' => Int64))));
DefineFunction(array('name' => "setstrength", 'desc' => "Procedural style bool collator_set_strength ( Collator \$coll , int \$strength ) The » ICU Collation Service supports many levels of comparison (named \"Levels\", but also known as \"Strengths\"). Having these categories enables ICU to sort strings precisely according to local conventions. However, by allowing the levels to be selectively employed, searching for a string in text can be performed with various matching conditions.\n\n\n\nPrimary Level: Typically, this is used to denote differences between base characters (for example, \"a\" < \"b\"). It is the strongest difference. For example, dictionaries are divided into different sections by base character. This is also called the level1 strength.\n\nSecondary Level: Accents in the characters are considered secondary differences (for example, \"as\" < \"às\" < \"at\"). Other differences between letters can also be considered secondary differences, depending on the language. A secondary difference is ignored when there is a primary difference anywhere in the strings. This is also called the level2 strength.\n\nNote: In some languages (such as Danish), certain accented letters are considered to be separate base characters. In most languages, however, an accented letter only has a secondary difference from the unaccented version of that letter.\n\nTertiary Level: Upper and lower case differences in characters are distinguished at the tertiary level (for example, \"ao\" < \"Ao\" < \"aò\"). In addition, a variant of a letter differs from the base form on the tertiary level (such as \"A\" and \" \"). Another example is the difference between large and small Kana. A tertiary difference is ignored when there is a primary or secondary difference anywhere in the strings. This is also called the level3 strength.\n\nQuaternary Level: When punctuation is ignored (see Ignoring Punctuations ) at level 13, an additional level can be used to distinguish words with and without punctuation (for example, \"ab\" < \"a-b\" < \"aB\"). This difference is ignored when there is a primary, secondary or tertiary difference. This is also known as the level4 strength. The quaternary level should only be used if ignoring punctuation is required or when processing Japanese text (see Hiragana processing).\n\nIdentical Level: When all other levels are equal, the identical level is used as a tiebreaker. The Unicode code point values of the NFD form of each string are compared at this level, just in case there is no difference at levels 14. For example, Hebrew cantillation marks are only distinguished at this level. This level should be used sparingly, as only code point values differences between two strings is an extremely rare occurrence. Using this level substantially decreases the performance for both incremental comparison and sort key generation (as well as increasing the sort key length). It is also known as level 5 strength.\n\nFor example, people may choose to ignore accents or ignore accents and case when searching for text. Almost all characters are distinguished by the first three levels, and in most locales the default value is thus Tertiary. However, if Alternate is set to be Shifted, then the Quaternary strength can be used to break ties among whitespace, punctuation, and symbols that would otherwise be ignored. If very fine distinctions among characters are required, then the Identical strength can be used (for example, Identical Strength distinguishes between the Mathematical Bold Small A and the Mathematical Italic Small A.). However, using levels higher than Tertiary the Identical strength result in significantly longer sort keys, and slower string comparison performance for equal strings.", 'flags' => HasDocComment, 'return' => array('type' => Boolean, 'desc' => "Returns TRUE on success or FALSE on failure."), 'args' => array(array('name' => "strength", 'type' => Int64, 'desc' => "Collator object."))));
DefineFunction(array('name' => "sortwithsortkeys", 'desc' => "Procedural style bool collator_sort_with_sort_keys ( Collator \$coll , array &\$arr ) Similar to collator_sort() but uses ICU sorting keys produced by ucol_getSortKey() to gain more speed on large arrays.", 'flags' => HasDocComment, 'return' => array('type' => Boolean, 'desc' => "Returns TRUE on success or FALSE on failure."), 'args' => array(array('name' => "arr", 'type' => Variant | Reference, 'desc' => "Collator object."))));
DefineFunction(array('name' => "sort", 'desc' => "Procedural style bool collator_sort ( Collator \$coll , array &\$arr [, int \$sort_flag ] ) This function sorts an array according to current locale rules.\n\nEquivalent to standard PHP sort() .", 'flags' => HasDocComment, 'return' => array('type' => Boolean, 'desc' => "Returns TRUE on success or FALSE on failure."), 'args' => array(array('name' => "arr", 'type' => Variant | Reference, 'desc' => "Collator object."), array('name' => "sort_flag", 'type' => Int64, 'value' => "q_Collator\${$SORT_REGULAR}", 'desc' => "Array of strings to sort."))));
DefineFunction(array('name' => "__destruct", 'flags' => HasDocComment, 'return' => array('type' => Variant)));
EndClass();
///////////////////////////////////////////////////////////////////////////////
BeginClass(array('name' => "Locale", 'desc' => "A \"Locale\" is an identifier used to get language, culture, or regionally-specific behavior from an API. PHP locales are organized and identified the same way that the CLDR locales used by ICU (and many vendors of Unix-like operating systems, the Mac, Java, and so forth) use. Locales are identified using RFC 4646 language tags (which use hyphen, not underscore) in addition to the more traditional underscore-using identifiers. Unless otherwise noted the functions in this class are tolerant of both formats.\n\nExamples of identifiers include: en-US (English, United States) zh-Hant-TW (Chinese, Traditional Script, Taiwan) fr-CA, fr-FR (French for Canada and France respectively) The Locale class (and related procedural functions) are used to interact with locale identifiers--to verify that an ID is well-formed, valid, etc. The extensions used by CLDR in UAX #35 (and inherited by ICU) are valid and used wherever they would be in ICU normally. Locales cannot be instantiated as objects. All of the functions/methods provided are static. The null or empty string obtains the \"root\" locale. The \"root\" locale is equivalent to \"en_US_POSIX\" in CLDR. Language tags (and thus locale identifiers) are case insensitive. There exists a canonicalization function to make case match the specification.", 'flags' => HasDocComment));
DefineConstant(array('name' => "ACTUAL_LOCALE", 'type' => Int64));
DefineConstant(array('name' => "VALID_LOCALE", 'type' => Int64));
DefineFunction(array('name' => "__construct", 'flags' => HasDocComment, 'return' => array('type' => null)));
DefineFunction(array('name' => "__destruct", 'flags' => HasDocComment, 'return' => array('type' => Variant)));
EndClass();
///////////////////////////////////////////////////////////////////////////////
BeginClass(array('name' => "Normalizer", 'bases' => array('Sweepable'), 'desc' => "Normalization is a process that involves transforming characters and sequences of characters into a formally-defined underlying representation. This process is most important when text needs to be compared for sorting and searching, but it is also used when storing text to ensure that the text is stored in a consistent representation.\n\nThe Unicode Consortium has defined a number of normalization forms reflecting the various needs of applications: Normalization Form D (NFD) - Canonical Decomposition Normalization Form C (NFC) - Canonical Decomposition followed by Canonical Composition Normalization Form KD (NFKD) - Compatibility Decomposition Normalization Form KC (NFKC) - Compatibility Decomposition followed by Canonical Composition The different forms are defined in terms of a set of transformations on the text, transformations that are expressed by both an algorithm and a set of data files.", 'flags' => HasDocComment));
DefineConstant(array('name' => "NONE", 'type' => Int64));
DefineConstant(array('name' => "FORM_D", 'type' => Int64));
DefineConstant(array('name' => "NFD", 'type' => Int64));
DefineConstant(array('name' => "FORM_KD", 'type' => Int64));
DefineConstant(array('name' => "NFKD", 'type' => Int64));
DefineConstant(array('name' => "FORM_C", 'type' => Int64));
DefineConstant(array('name' => "NFC", 'type' => Int64));
DefineConstant(array('name' => "FORM_KC", 'type' => Int64));
DefineConstant(array('name' => "NFKC", 'type' => Int64));
DefineFunction(array('name' => "__construct", 'flags' => HasDocComment, 'return' => array('type' => null)));
DefineFunction(array('name' => "isnormalized", 'desc' => "Procedural style bool normalizer_is_normalized ( string \$input [, string \$form = Normalizer::FORM_C ] ) Checks if the provided string is already in the specified normalization form.", 'flags' => IsStatic | HasDocComment, 'return' => array('type' => Variant, 'desc' => "TRUE if normalized, FALSE otherwise or if there an error"), 'args' => array(array('name' => "input", 'type' => String), array('name' => "form", 'type' => Int64, 'value' => "q_Normalizer\${$FORM_C}", 'desc' => "One of the normalization forms."))));
DefineFunction(array('name' => "normalize", 'desc' => "Procedural style string normalizer_normalize ( string \$input [, string \$form = Normalizer::FORM_C ] ) Normalizes the input provided and returns the normalized string", 'flags' => IsStatic | HasDocComment, 'return' => array('type' => Variant, 'desc' => "NULL if an error occurred."), 'args' => array(array('name' => "input", 'type' => String), array('name' => "form", 'type' => Int64, 'value' => "q_Normalizer\${$FORM_C}"))));
DefineFunction(array('name' => "__destruct", 'flags' => HasDocComment, 'return' => array('type' => Variant)));
EndClass();
// DefineProperty
//
// array (
//   'name'  => name of the property
//   'type'  => type of the property
//   'flags' => attributes of the property
//   'desc'  => description of the property
//   'note'  => additional note about this property's schema
// )
//
// EndClass()
///////////////////////////////////////////////////////////////////////////////
BeginClass(array('name' => "SpoofChecker", 'desc' => "Unicode Security and Spoofing Detection (see http://icu-project.org/apiref/icu4c/uspoof_8h.html for details)", 'flags' => HasDocComment, 'footer' => <<<EOT

  private: USpoofChecker *m_spoof_checker;
EOT
));
DefineConstant(array('name' => "SINGLE_SCRIPT_CONFUSABLE", 'type' => Int64));
DefineConstant(array('name' => "MIXED_SCRIPT_CONFUSABLE", 'type' => Int64));
DefineConstant(array('name' => "WHOLE_SCRIPT_CONFUSABLE", 'type' => Int64));
DefineConstant(array('name' => "ANY_CASE", 'type' => Int64));
DefineConstant(array('name' => "SINGLE_SCRIPT", 'type' => Int64));
DefineConstant(array('name' => "INVISIBLE", 'type' => Int64));
DefineConstant(array('name' => "CHAR_LIMIT", 'type' => Int64));
DefineFunction(array('name' => "__construct", 'desc' => "Creates a spoof checker that checks for visually confusing characters in a string.  By default, runs the following tests: SINGLE_SCRIPT_CONFUSABLE, MIXED_SCRIPT_CONFUSABLE, WHOLE_SCRIPT_CONFUSABLE, ANY_CASE, INVISIBLE.", 'flags' => HasDocComment, 'return' => array('type' => null)));
DefineFunction(array('name' => "isSuspicious", 'desc' => "Check the specified UTF-8 string for possible security or spoofing issues.", 'flags' => HasDocComment, 'return' => array('type' => Boolean, 'desc' => "Returns TRUE if the string has possible security or spoofing issues, FALSE otherwise."), 'args' => array(array('name' => "text", 'type' => String, 'desc' => "A UTF-8 string to be checked for possible security issues."), array('name' => "issuesFound", 'type' => Variant | Reference, 'value' => "null", 'desc' => "If passed, this will hold an integer value with bits set for any potential security or spoofing issues detected. Zero is returned if no issues are found with the input string."))));
DefineFunction(array('name' => "areConfusable", 'desc' => "Check the whether two specified UTF-8 strings are visually confusable. The types of confusability to be tested - single script, mixed script, or whole script - are determined by the check options set for this instance.", 'flags' => HasDocComment, 'return' => array('type' => Boolean, 'desc' => "Returns TRUE if the two strings are confusable, FALSE otherwise."), 'args' => array(array('name' => "s1", 'type' => String, 'desc' => "The first of the two UTF-8 strings to be compared for confusability."), array('name' => "s2", 'type' => String, 'desc' => "The second of the two UTF-8 strings to be compared for confusability."), array('name' => "issuesFound", 'type' => Variant | Reference, 'value' => "null", 'desc' => "If passed, this will hold an integer value with bit(s) set corresponding to the type of confusability found, as defined by the constant values stored in this class. Zero is returned if the strings are not confusable."))));
DefineFunction(array('name' => "setAllowedLocales", 'desc' => "Limit characters that are acceptable in identifiers being checked to those normally used with the languages associated with the specified locales.", 'flags' => HasDocComment, 'return' => array('type' => null), 'args' => array(array('name' => "localesList", 'type' => String, 'desc' => "A list of locales, from which the language and associated script are extracted. The locales are comma-separated if there is more than one. White space may not appear within an individual locale, but is ignored otherwise. The locales are syntactically like those from the HTTP Accept-Language header. If the localesList is empty, no restrictions will be placed on the allowed characters."))));
DefineFunction(array('name' => "setChecks", 'desc' => "Specify the set of checks that will be performed by the check function", 'flags' => HasDocComment, 'return' => array('type' => null), 'args' => array(array('name' => "checks", 'type' => Int32, 'desc' => "The set of checks that this spoof checker will perform. The value is a bit set, obtained by OR-ing together the constant values in this class."))));
DefineFunction(array('name' => "__destruct", 'flags' => HasDocComment, 'return' => array('type' => Variant)));
EndClass();
Exemple #26
0
BeginClass(array('name' => "DebuggerClient", 'desc' => "", 'flags' => HasDocComment | HipHopSpecific, 'footer' => <<<EOT

 public:
  Eval::DebuggerClient *m_client;
EOT
));
DefineConstant(array('name' => "AUTO_COMPLETE_FILENAMES", 'type' => Int64));
DefineConstant(array('name' => "AUTO_COMPLETE_VARIABLES", 'type' => Int64));
DefineConstant(array('name' => "AUTO_COMPLETE_CONSTANTS", 'type' => Int64));
DefineConstant(array('name' => "AUTO_COMPLETE_CLASSES", 'type' => Int64));
DefineConstant(array('name' => "AUTO_COMPLETE_FUNCTIONS", 'type' => Int64));
DefineConstant(array('name' => "AUTO_COMPLETE_CLASS_METHODS", 'type' => Int64));
DefineConstant(array('name' => "AUTO_COMPLETE_CLASS_PROPERTIES", 'type' => Int64));
DefineConstant(array('name' => "AUTO_COMPLETE_CLASS_CONSTANTS", 'type' => Int64));
DefineConstant(array('name' => "AUTO_COMPLETE_KEYWORDS", 'type' => Int64));
DefineConstant(array('name' => "AUTO_COMPLETE_CODE", 'type' => Int64));
DefineFunction(array('name' => "__construct", 'desc' => "Constructor of DebuggerClient.", 'flags' => HasDocComment | HipHopSpecific, 'return' => array('type' => null)));
DefineFunction(array('name' => "quit", 'desc' => "Quits the client.", 'flags' => HasDocComment | HipHopSpecific, 'return' => array('type' => null)));
DefineFunction(array('name' => "print", 'desc' => "Prints some text without any color.", 'flags' => HasDocComment | HipHopSpecific | VariableArguments, 'return' => array('type' => null), 'args' => array(array('name' => "format", 'type' => String, 'desc' => "Format string in printf() style."))));
DefineFunction(array('name' => "help", 'desc' => "Prints some text in help color.", 'flags' => HasDocComment | HipHopSpecific | VariableArguments, 'return' => array('type' => null), 'args' => array(array('name' => "format", 'type' => String, 'desc' => "Format string in printf() style."))));
DefineFunction(array('name' => "info", 'desc' => "Prints some text in information color.", 'flags' => HasDocComment | HipHopSpecific | VariableArguments, 'return' => array('type' => null), 'args' => array(array('name' => "format", 'type' => String, 'desc' => "Format string in printf() style."))));
DefineFunction(array('name' => "output", 'desc' => "Prints some text in script output color.", 'flags' => HasDocComment | HipHopSpecific | VariableArguments, 'return' => array('type' => null), 'args' => array(array('name' => "format", 'type' => String, 'desc' => "Format string in printf() style."))));
DefineFunction(array('name' => "error", 'desc' => "Prints some text in error color.", 'flags' => HasDocComment | HipHopSpecific | VariableArguments, 'return' => array('type' => null), 'args' => array(array('name' => "format", 'type' => String, 'desc' => "Format string in printf() style."))));
DefineFunction(array('name' => "code", 'desc' => "Pretty print PHP source code.", 'flags' => HasDocComment | HipHopSpecific, 'return' => array('type' => null), 'args' => array(array('name' => "source", 'type' => String, 'desc' => "PHP source code to print."), array('name' => "start_line_no", 'type' => Int32, 'value' => "0", 'desc' => "Starting line number. 0 for no line no."))));
DefineFunction(array('name' => "ask", 'desc' => "Ask end user a question.", 'flags' => HasDocComment | HipHopSpecific | VariableArguments, 'return' => array('type' => Variant, 'desc' => "Single letter response from end user."), 'args' => array(array('name' => "format", 'type' => String, 'desc' => "Format string in printf() style."))));
DefineFunction(array('name' => "wrap", 'desc' => "Wraps some text to fit screen width.", 'flags' => HasDocComment | HipHopSpecific, 'return' => array('type' => String, 'desc' => "Formatted string."), 'args' => array(array('name' => "str", 'type' => String, 'desc' => "String to wrap."))));
DefineFunction(array('name' => "helpTitle", 'desc' => "Displays a title for a help topic.", 'flags' => HasDocComment | HipHopSpecific, 'return' => array('type' => null), 'args' => array(array('name' => "str", 'type' => String, 'desc' => "Title text."))));
DefineFunction(array('name' => "helpCmds", 'desc' => "Displays a list of commands in help format. Each command has a name and a short description, and specify more commands in pairs. For example, \$client->helpCmds('cmd1', 'desc1', 'cmd2', 'desc2').", 'flags' => HasDocComment | HipHopSpecific | VariableArguments, 'return' => array('type' => null), 'args' => array(array('name' => "cmd", 'type' => String, 'desc' => "Command name."), array('name' => "desc", 'type' => String, 'desc' => "Command description."))));
DefineFunction(array('name' => "helpBody", 'desc' => "Displays help contents. A help body is a help section with one empty line before and one empty line after.", 'flags' => HasDocComment | HipHopSpecific, 'return' => array('type' => null), 'args' => array(array('name' => "str", 'type' => String, 'desc' => "The help text."))));
DefineFunction(array('name' => "helpSection", 'desc' => "Displays a section of help text.", 'flags' => HasDocComment | HipHopSpecific, 'return' => array('type' => null), 'args' => array(array('name' => "str", 'type' => String, 'desc' => "One section of help text."))));
DefineFunction(array('name' => "tutorial", 'desc' => "Tutorials are help texts displayed according to user's preference. In auto mode (vs. always on or always off modes), one tutorial text is only displayed just once to end user.", 'flags' => HasDocComment | HipHopSpecific, 'return' => array('type' => null), 'args' => array(array('name' => "str", 'type' => String, 'desc' => "Help texts guiding end user for learning how to use debugger."))));
Exemple #27
0
DefineConstant(array('name' => "PI", 'type' => Int64));
DefineConstant(array('name' => "COMMENT", 'type' => Int64));
DefineConstant(array('name' => "DOC", 'type' => Int64));
DefineConstant(array('name' => "DOC_TYPE", 'type' => Int64));
DefineConstant(array('name' => "DOC_FRAGMENT", 'type' => Int64));
DefineConstant(array('name' => "NOTATION", 'type' => Int64));
DefineConstant(array('name' => "WHITESPACE", 'type' => Int64));
DefineConstant(array('name' => "SIGNIFICANT_WHITESPACE", 'type' => Int64));
DefineConstant(array('name' => "END_ELEMENT", 'type' => Int64));
DefineConstant(array('name' => "END_ENTITY", 'type' => Int64));
DefineConstant(array('name' => "XML_DECLARATION", 'type' => Int64));
/* Constants for Parser options */
DefineConstant(array('name' => "LOADDTD", 'type' => Int64));
DefineConstant(array('name' => "DEFAULTATTRS", 'type' => Int64));
DefineConstant(array('name' => "VALIDATE", 'type' => Int64));
DefineConstant(array('name' => "SUBST_ENTITIES", 'type' => Int64));
DefineFunction(array('name' => "__construct", 'flags' => HasDocComment, 'return' => array('type' => null)));
DefineFunction(array('name' => "open", 'flags' => HasDocComment, 'return' => array('type' => Boolean), 'args' => array(array('name' => "uri", 'type' => String), array('name' => "encoding", 'type' => String, 'value' => 'null_string'), array('name' => "options", 'type' => Int64, 'value' => "0"))));
DefineFunction(array('name' => "XML", 'flags' => HasDocComment, 'return' => array('type' => Boolean), 'args' => array(array('name' => "source", 'type' => String), array('name' => "encoding", 'type' => String, 'value' => 'null_string'), array('name' => "options", 'type' => Int64, 'value' => "0"))));
DefineFunction(array('name' => "close", 'flags' => HasDocComment, 'return' => array('type' => Boolean)));
DefineFunction(array('name' => "read", 'flags' => HasDocComment, 'return' => array('type' => Boolean)));
DefineFunction(array('name' => "next", 'flags' => HasDocComment, 'return' => array('type' => Boolean), 'args' => array(array('name' => "localname", 'type' => String, 'value' => 'null_string'))));
DefineFunction(array('name' => "readString", 'flags' => HasDocComment, 'return' => array('type' => String)));
DefineFunction(array('name' => "readInnerXML", 'flags' => HasDocComment, 'return' => array('type' => String)));
DefineFunction(array('name' => "readOuterXML", 'flags' => HasDocComment, 'return' => array('type' => String)));
DefineFunction(array('name' => "moveToNextAttribute", 'flags' => HasDocComment, 'return' => array('type' => Boolean)));
DefineFunction(array('name' => "getAttribute", 'flags' => HasDocComment, 'return' => array('type' => String), 'args' => array(array('name' => "name", 'type' => String))));
DefineFunction(array('name' => "getAttributeNo", 'flags' => HasDocComment, 'return' => array('type' => String), 'args' => array(array('name' => "index", 'type' => Int64))));
DefineFunction(array('name' => "getAttributeNs", 'flags' => HasDocComment, 'return' => array('type' => String), 'args' => array(array('name' => "name", 'type' => String), array('name' => "namespaceURI", 'type' => String))));
DefineFunction(array('name' => "moveToAttribute", 'flags' => HasDocComment, 'return' => array('type' => Boolean), 'args' => array(array('name' => "name", 'type' => String))));
DefineFunction(array('name' => "moveToAttributeNo", 'flags' => HasDocComment, 'return' => array('type' => Boolean), 'args' => array(array('name' => "index", 'type' => Int64))));
DefineConstant(array('name' => "FB_UNSERIALIZE_UNEXPECTED_ARRAY_KEY_TYPE", 'type' => Int64));
DefineConstant(array('name' => "XHPROF_FLAGS_NO_BUILTINS", 'type' => Int64));
DefineConstant(array('name' => "XHPROF_FLAGS_CPU", 'type' => Int64));
DefineConstant(array('name' => "XHPROF_FLAGS_MEMORY", 'type' => Int64));
DefineConstant(array('name' => "XHPROF_FLAGS_VTSC", 'type' => Int64));
DefineConstant(array('name' => "XHPROF_FLAGS_TRACE", 'type' => Int64));
DefineConstant(array('name' => "XHPROF_FLAGS_MEASURE_XHPROF_DISABLE", 'type' => Int64));
DefineConstant(array('name' => "XHPROF_FLAGS_MALLOC", 'type' => Int64));
DefineConstant(array('name' => "TAINT_NONE", 'type' => Int64));
DefineConstant(array('name' => "TAINT_HTML", 'type' => Int64));
DefineConstant(array('name' => "TAINT_MUTATED", 'type' => Int64));
DefineConstant(array('name' => "TAINT_SQL", 'type' => Int64));
DefineConstant(array('name' => "TAINT_SHELL", 'type' => Int64));
DefineConstant(array('name' => "TAINT_TRACE_HTML", 'type' => Int64));
DefineConstant(array('name' => "TAINT_ALL", 'type' => Int64));
DefineConstant(array('name' => "TAINT_TRACE_SELF", 'type' => Int64));
///////////////////////////////////////////////////////////////////////////////
// Functions
//
// array (
//   'name'   => name of the function
//   'desc'   => description of the function's purpose
//   'flags'  => attributes of the function, see base.php for possible values
//   'opt'    => optimization callback function's name for compiler
//   'note'   => additional note about this function's schema
//   'return' =>
//      array (
//        'type'  => return type, use Reference for ref return
//        'desc'  => description of the return value
//      )
//   'args'   => arguments
Exemple #29
0
<?php

/*
 * This extension is just a way to implement some missing functions without making
 * a new extension to implement each one
 *
 */
///////////////////////////////////////////////////////////////////////////////
// Preamble: C++ code inserted at beginning of ext_{name}.h
DefinePreamble(<<<CPP
CPP
);
DefineFunction(array('name' => "cal_days_in_month", 'flags' => HasDocComment, 'return' => array('type' => Int64), 'args' => array(array('name' => "calendar", 'type' => Int64), array('name' => "month", 'type' => Int64), array('name' => "year", 'type' => Int64))));
DefineConstant(array('name' => "CAL_GREGORIAN", 'type' => Int64));