Example #1
0
DefineFunction(array('name' => "socket_bind", 'desc' => "Binds the name given in address to the socket described by socket. This has to be done before a connection is be established using socket_connect() or socket_listen().", 'flags' => HasDocComment, 'return' => array('type' => Boolean, 'desc' => "Returns TRUE on success or FALSE on failure.\n\nThe error code can be retrieved with socket_last_error(). This code may be passed to socket_strerror() to get a textual explanation of the error."), 'args' => array(array('name' => "socket", 'type' => Resource, 'desc' => "A valid socket resource created with socket_create()."), array('name' => "address", 'type' => String, 'desc' => "If the socket is of the AF_INET family, the address is an IP in dotted-quad notation (e.g. 127.0.0.1).\n\nIf the socket is of the AF_UNIX family, the address is the path of a Unix-domain socket (e.g. /tmp/my.sock)."), array('name' => "port", 'type' => Int32, 'value' => "0", 'desc' => "The port parameter is only used when connecting to an AF_INET socket, and designates the port on the remote host to which a connection should be made."))));
DefineFunction(array('name' => "socket_listen", 'desc' => "After the socket socket has been created using socket_create() and bound to a name with socket_bind(), it may be told to listen for incoming connections on socket.\n\nsocket_listen() is applicable only to sockets of type SOCK_STREAM or SOCK_SEQPACKET.", 'flags' => HasDocComment, 'return' => array('type' => Boolean, 'desc' => "Returns TRUE on success or FALSE on failure. The error code can be retrieved with socket_last_error(). This code may be passed to socket_strerror() to get a textual explanation of the error."), 'args' => array(array('name' => "socket", 'type' => Resource, 'desc' => "A valid socket resource created with socket_create()."), array('name' => "backlog", 'type' => Int32, 'value' => "0", 'desc' => "A maximum of backlog incoming connections will be queued for processing. If a connection request arrives with the queue full the client may receive an error with an indication of ECONNREFUSED, or, if the underlying protocol supports retransmission, the request may be ignored so that retries may succeed.\n\nThe maximum number passed to the backlog parameter highly depends on the underlying platform. On Linux, it is silently truncated to SOMAXCONN. On win32, if passed SOMAXCONN, the underlying service provider responsible for the socket will set the backlog to a maximum reasonable value. There is no standard provision to find out the actual backlog value on this platform."))));
DefineFunction(array('name' => "socket_select", 'desc' => "socket_select() accepts arrays of sockets and waits for them to change status. Those coming with BSD sockets background will recognize that those socket resource arrays are in fact the so-called file descriptor sets. Three independent arrays of socket resources are watched.\nWarning\n\nOn exit, the arrays are modified to indicate which socket resource actually changed status.\n\nYou do not need to pass every array to socket_select(). You can leave it out and use an empty array or NULL instead. Also do not forget that those arrays are passed by reference and will be modified after socket_select() returns.\n\nDue a limitation in the current Zend Engine it is not possible to pass a constant modifier like NULL directly as a parameter to a function which expects this parameter to be passed by reference. Instead use a temporary variable or an expression with the leftmost member being a temporary variable: Example #1 Using NULL with socket_select()", 'flags' => HasDocComment, 'return' => array('type' => Variant, 'desc' => "On success socket_select() returns the number of socket resources contained in the modified arrays, which may be zero if the timeout expires before anything interesting happens. On error FALSE is returned. The error code can be retrieved with socket_last_error().\n\nBe sure to use the === operator when checking for an error. Since the socket_select() may return 0 the comparison with == would evaluate to TRUE: Example #2 Understanding socket_select()'s result"), 'args' => array(array('name' => "read", 'type' => Variant | Reference, 'desc' => "The sockets listed in the read array will be watched to see if characters become available for reading (more precisely, to see if a read will not block - in particular, a socket resource is also ready on end-of-file, in which case a socket_read() will return a zero length string)."), array('name' => "write", 'type' => Variant | Reference, 'desc' => "The sockets listed in the write array will be watched to see if a write will not block."), array('name' => "except", 'type' => Variant | Reference, 'desc' => "The sockets listed in the except array will be watched for exceptions."), array('name' => "vtv_sec", 'type' => Variant, 'desc' => "The tv_sec and tv_usec together form the timeout parameter. The timeout is an upper bound on the amount of time elapsed before socket_select() return. tv_sec may be zero , causing socket_select() to return immediately. This is useful for polling. If tv_sec is NULL (no timeout), socket_select() can block indefinitely."), array('name' => "tv_usec", 'type' => Int32, 'value' => "0"))));
DefineFunction(array('name' => "socket_server", 'flags' => HasDocComment, 'return' => array('type' => Variant), 'args' => array(array('name' => "hostname", 'type' => String), array('name' => "port", 'type' => Int32, 'value' => "-1"), array('name' => "errnum", 'type' => Variant | Reference, 'value' => "null"), array('name' => "errstr", 'type' => Variant | Reference, 'value' => "null"))));
DefineFunction(array('name' => "socket_accept", 'desc' => "After the socket socket has been created using socket_create(), bound to a name with socket_bind(), and told to listen for connections with socket_listen(), this function will accept incoming connections on that socket. Once a successful connection is made, a new socket resource is returned, which may be used for communication. If there are multiple connections queued on the socket, the first will be used. If there are no pending connections, socket_accept() will block until a connection becomes present. If socket has been made non-blocking using socket_set_blocking() or socket_set_nonblock(), FALSE will be returned.\n\nThe socket resource returned by socket_accept() may not be used to accept new connections. The original listening socket socket, however, remains open and may be reused.", 'flags' => HasDocComment, 'return' => array('type' => Variant, 'desc' => "Returns a new socket resource on success, or FALSE on error. The actual error code can be retrieved by calling socket_last_error(). This error code may be passed to socket_strerror() to get a textual explanation of the error."), 'args' => array(array('name' => "socket", 'type' => Resource, 'desc' => "A valid socket resource created with socket_create()."))));
DefineFunction(array('name' => "socket_read", 'desc' => "The function socket_read() reads from the socket resource socket created by the socket_create() or socket_accept() functions.", 'flags' => HasDocComment, 'return' => array('type' => Variant, 'desc' => "socket_read() returns the data as a string on success, or FALSE on error (including if the remote host has closed the connection). The error code can be retrieved with socket_last_error(). This code may be passed to socket_strerror() to get a textual representation of the error.\n\nsocket_read() returns a zero length string (\"\") when there is no more data to read."), 'args' => array(array('name' => "socket", 'type' => Resource, 'desc' => "A valid socket resource created with socket_create() or socket_accept()."), array('name' => "length", 'type' => Int32, 'desc' => "The maximum number of bytes read is specified by the length parameter. Otherwise you can use \\r, \\n, or \\0 to end reading (depending on the type parameter, see below)."), array('name' => "type", 'type' => Int32, 'value' => "0", 'desc' => "Optional type parameter is a named constant: PHP_BINARY_READ (Default) - use the system recv() function. Safe for reading binary data. PHP_NORMAL_READ - reading stops at \\n or \\r."))));
DefineFunction(array('name' => "socket_write", 'desc' => "The function socket_write() writes to the socket from the given buffer.", 'flags' => HasDocComment, 'return' => array('type' => Variant, 'desc' => "Returns the number of bytes successfully written to the socket or FALSE on failure. The error code can be retrieved with socket_last_error(). This code may be passed to socket_strerror() to get a textual explanation of the error.\n\nIt is perfectly valid for socket_write() to return zero which means no bytes have been written. Be sure to use the === operator to check for FALSE in case of an error."), 'args' => array(array('name' => "socket", 'type' => Resource), array('name' => "buffer", 'type' => String, 'desc' => "The buffer to be written."), array('name' => "length", 'type' => Int32, 'value' => "0", 'desc' => "The optional parameter length can specify an alternate length of bytes written to the socket. If this length is greater then the buffer length, it is silently truncated to the length of the buffer."))));
DefineFunction(array('name' => "socket_send", 'desc' => "The function socket_send() sends len bytes to the socket socket from buf.", 'flags' => HasDocComment, 'return' => array('type' => Variant, 'desc' => "socket_send() returns the number of bytes sent, or FALSE on error."), 'args' => array(array('name' => "socket", 'type' => Resource, 'desc' => "A valid socket resource created with socket_create() or socket_accept()."), array('name' => "buf", 'type' => String, 'desc' => "A buffer containing the data that will be sent to the remote host."), array('name' => "len", 'type' => Int32, 'desc' => "The number of bytes that will be sent to the remote host from buf."), array('name' => "flags", 'type' => Int32, 'desc' => "The value of flags can be any combination of the following flags, joined with the binary OR (|) operator. Possible values for flags MSG_OOB Send OOB (out-of-band) data. MSG_EOR Indicate a record mark. The sent data completes the record. MSG_EOF Close the sender side of the socket and include an appropriate notification of this at the end of the sent data. The sent data completes the transaction. MSG_DONTROUTE Bypass routing, use direct interface."))));
DefineFunction(array('name' => "socket_sendto", 'desc' => "The function socket_sendto() sends len bytes from buf through the socket socket to the port at the address addr.", 'flags' => HasDocComment, 'return' => array('type' => Variant, 'desc' => "socket_sendto() returns the number of bytes sent to the remote host, or FALSE if an error occurred."), 'args' => array(array('name' => "socket", 'type' => Resource, 'desc' => "A valid socket resource created using socket_create()."), array('name' => "buf", 'type' => String, 'desc' => "The sent data will be taken from buffer buf."), array('name' => "len", 'type' => Int32, 'desc' => "len bytes from buf will be sent."), array('name' => "flags", 'type' => Int32, 'desc' => "The value of flags can be any combination of the following flags, joined with the binary OR (|) operator. Possible values for flags MSG_OOB Send OOB (out-of-band) data. MSG_EOR Indicate a record mark. The sent data completes the record. MSG_EOF Close the sender side of the socket and include an appropriate notification of this at the end of the sent data. The sent data completes the transaction. MSG_DONTROUTE Bypass routing, use direct interface."), array('name' => "addr", 'type' => String, 'desc' => "IP address of the remote host."), array('name' => "port", 'type' => Int32, 'value' => "0", 'desc' => "port is the remote port number at which the data will be sent."))));
DefineFunction(array('name' => "socket_recv", 'desc' => "The socket_recv() function receives len bytes of data in buf from socket. socket_recv() can be used to gather data from connected sockets. Additionally, one or more flags can be specified to modify the behaviour of the function.\n\nbuf is passed by reference, so it must be specified as a variable in the argument list. Data read from socket by socket_recv() will be returned in buf.", 'flags' => HasDocComment, 'return' => array('type' => Variant, 'desc' => "socket_recv() returns the number of bytes received, or FALSE if there was an error. The actual error code can be retrieved by calling socket_last_error(). This error code may be passed to socket_strerror() to get a textual explanation of the error."), 'args' => array(array('name' => "socket", 'type' => Resource, 'desc' => "The socket must be a socket resource previously created by socket_create()."), array('name' => "buf", 'type' => Variant | Reference, 'desc' => "The data received will be fetched to the variable specified with buf. If an error occurs, if the connection is reset, or if no data is available, buf will be set to NULL."), array('name' => "len", 'type' => Int32, 'desc' => "Up to len bytes will be fetched from remote host."), array('name' => "flags", 'type' => Int32, 'desc' => "The value of flags can be any combination of the following flags, joined with the binary OR (|) operator. Possible values for flags Flag Description MSG_OOB Process out-of-band data. MSG_PEEK Receive data from the beginning of the receive queue without removing it from the queue. MSG_WAITALL Block until at least len are received. However, if a signal is caught or the remote host disconnects, the function may return less data. MSG_DONTWAIT With this flag set, the function returns even if it would normally have blocked."))));
DefineFunction(array('name' => "socket_recvfrom", 'desc' => "The socket_recvfrom() function receives len bytes of data in buf from name on port port (if the socket is not of type AF_UNIX) using socket. socket_recvfrom() can be used to gather data from both connected and unconnected sockets. Additionally, one or more flags can be specified to modify the behaviour of the function.\n\nThe name and port must be passed by reference. If the socket is not connection-oriented, name will be set to the internet protocol address of the remote host or the path to the UNIX socket. If the socket is connection-oriented, name is NULL. Additionally, the port will contain the port of the remote host in the case of an unconnected AF_INET or AF_INET6 socket.", 'flags' => HasDocComment, 'return' => array('type' => Variant, 'desc' => "socket_recvfrom() returns the number of bytes received, or FALSE if there was an error. The actual error code can be retrieved by calling socket_last_error(). This error code may be passed to socket_strerror() to get a textual explanation of the error."), 'args' => array(array('name' => "socket", 'type' => Resource, 'desc' => "The socket must be a socket resource previously created by socket_create()."), array('name' => "buf", 'type' => Variant | Reference, 'desc' => "The data received will be fetched to the variable specified with buf."), array('name' => "len", 'type' => Int32, 'desc' => "Up to len bytes will be fetched from remote host."), array('name' => "flags", 'type' => Int32, 'desc' => "The value of flags can be any combination of the following flags, joined with the binary OR (|) operator. Possible values for flags Flag Description MSG_OOB Process out-of-band data. MSG_PEEK Receive data from the beginning of the receive queue without removing it from the queue. MSG_WAITALL Block until at least len are received. However, if a signal is caught or the remote host disconnects, the function may return less data. MSG_DONTWAIT With this flag set, the function returns even if it would normally have blocked."), array('name' => "name", 'type' => Variant | Reference, 'desc' => "If the socket is of the type AF_UNIX type, name is the path to the file. Else, for unconnected sockets, name is the IP address of, the remote host, or NULL if the socket is connection-oriented."), array('name' => "port", 'type' => Variant | Reference, 'value' => "0", 'desc' => "This argument only applies to AF_INET and AF_INET6 sockets, and specifies the remote port from which the data is received. If the socket is connection-oriented, port will be NULL."))));
DefineFunction(array('name' => "socket_shutdown", 'desc' => "The socket_shutdown() function allows you to stop incoming, outgoing or all data (the default) from being sent through the socket", 'flags' => HasDocComment, 'return' => array('type' => Boolean, 'desc' => "Returns TRUE on success or FALSE on failure."), 'args' => array(array('name' => "socket", 'type' => Resource, 'desc' => "A valid socket resource created with socket_create()."), array('name' => "how", 'type' => Int32, 'value' => "0", 'desc' => "The value of how can be one of the following: possible values for how 0 Shutdown socket reading 1 Shutdown socket writing 2 Shutdown socket reading and writing"))));
DefineFunction(array('name' => "socket_close", 'desc' => "socket_close() closes the socket resource given by socket. This function is specific to sockets and cannot be used on any other type of resources.", 'flags' => HasDocComment, 'return' => array('type' => null, 'desc' => "No value is returned."), 'args' => array(array('name' => "socket", 'type' => Resource, 'desc' => "A valid socket resource created with socket_create() or socket_accept()."))));
DefineFunction(array('name' => "socket_strerror", 'desc' => "socket_strerror() takes as its errno parameter a socket error code as returned by socket_last_error() and returns the corresponding explanatory text.\n\nAlthough the error messages generated by the socket extension are in English, the system messages retrieved with this function will appear depending on the current locale (LC_MESSAGES).", 'flags' => HasDocComment, 'return' => array('type' => String, 'desc' => "Returns the error message associated with the errno parameter."), 'args' => array(array('name' => "errnum", 'type' => Int32, 'desc' => "A valid socket error number, likely produced by socket_last_error()."))));
DefineFunction(array('name' => "socket_last_error", 'desc' => "If a socket resource is passed to this function, the last error which occurred on this particular socket is returned. If the socket resource is omitted, the error code of the last failed socket function is returned. The latter is particularly helpful for functions like socket_create() which don't return a socket on failure and socket_select() which can fail for reasons not directly tied to a particular socket. The error code is suitable to be fed to socket_strerror() which returns a string describing the given error code.", 'flags' => HasDocComment, 'return' => array('type' => Int32, 'desc' => "This function returns a socket error code."), 'args' => array(array('name' => "socket", 'type' => Resource, 'value' => "null_object", 'desc' => "A valid socket resource created with socket_create()."))));
DefineFunction(array('name' => "socket_clear_error", 'desc' => "This function clears the error code on the given socket or the global last socket error if no socket is specified.\n\nThis function allows explicitly resetting the error code value either of a socket or of the extension global last error code. This may be useful to detect within a part of the application if an error occurred or not.", 'flags' => HasDocComment, 'return' => array('type' => null, 'desc' => "No value is returned."), 'args' => array(array('name' => "socket", 'type' => Resource, 'value' => "null_object", 'desc' => "A valid socket resource created with socket_create()."))));
///////////////////////////////////////////////////////////////////////////////
// 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
// )
//
Example #2
0
BeginClass(array('name' => "ImageSprite", 'bases' => array('Sweepable'), 'desc' => "Represents a set of images sprited into a single image.", 'flags' => HasDocComment, 'footer' => <<<EOT

 private:
  void map();

 public:
  hphp_string_map<ImageSprite::ResourceGroup*> m_rsrc_groups;
  String m_image_string_buffer;
  bool m_current;
  hphp_string_map<ImageSprite::Image*> m_image_data;
  Array m_mapping;
  Array m_img_errors;
  Array m_sprite_errors;
  gdImagePtr m_image;
  int m_width;
  int m_height;
EOT
));
DefineFunction(array('name' => "__construct", 'desc' => "Creates a new ImageSprite object", 'flags' => HasDocComment, 'return' => array('type' => null, 'desc' => "TODO")));
DefineFunction(array('name' => "addFile", 'desc' => "Adds the image specified by the file path to the sprite.", 'flags' => HasDocComment, 'return' => array('type' => Object, 'desc' => "The ImageSprite object itself (for method chaining)."), 'args' => array(array('name' => "file", 'type' => String, 'desc' => "The path to the image. Must be a path to the local filesystem or a a stream format php supports."), array('name' => "options", 'type' => StringMap, 'value' => "null", 'desc' => "Associative array of options for this image. May include the image's 'width' and 'height' (if previously known to the developer), or spacing requirements via the padding_DIRECTION keys, where DIRECTION may be top, bottom, left, or right.  May also include flush requirements that will force this image to be 'flush_left' or 'flush_right' within the sprite."))));
DefineFunction(array('name' => "addString", 'desc' => "Adds the image defined by the string to the sprite.", 'flags' => HasDocComment, 'return' => array('type' => Object, 'desc' => "The ImageSprite object itself (for method chaining)."), 'args' => array(array('name' => "id", 'type' => String, 'desc' => "An identifier for this image. This will be the key to referencing this image in the mapping."), array('name' => "data", 'type' => String, 'desc' => "The data of this image."), array('name' => "options", 'type' => StringMap, 'value' => "null", 'desc' => "Associative array of options for this image. May include the image's 'width' and 'height' (if previously known to the developer), or spacing requirements via the padding_DIRECTION keys, where DIRECTION may be top, bottom, left, or right.  May also include flush requirements that will force this image to be 'flush_left' or 'flush_right' within the sprite."))));
DefineFunction(array('name' => "addUrl", 'desc' => "Adds the image located at the specified URL to the sprite.", 'flags' => HasDocComment, 'return' => array('type' => Object, 'desc' => "The ImageSprite object itself (for method chaining)."), 'args' => array(array('name' => "url", 'type' => String, 'desc' => "The url of the image. The URL must be using the http protocol; secure connections are not supported."), array('name' => "timeout_ms", 'type' => Int32, 'value' => "0", 'desc' => "The timeout in milliseconds for this request. A value of 0 or lower will disable the timeout."), array('name' => "Options", 'type' => StringMap, 'value' => "null", 'desc' => "Associative array of options for this image. May include the image's 'width' and 'height' (if previously known to the developer), or spacing requirements via the padding_DIRECTION keys, where DIRECTION may be top, bottom, left, or right.  May also include flush requirements that will force this image to be 'flush_left' or 'flush_right' within the sprite."))));
DefineFunction(array('name' => "clear", 'desc' => "Removes images from the sprite and frees the memory associated with that image.", 'flags' => HasDocComment, 'return' => array('type' => Object, 'desc' => "The ImageSprite object itself (for method chaining)."), 'args' => array(array('name' => "paths", 'type' => Variant, 'value' => "null", 'desc' => "When passed a string, it will remove the images specified by that path or identifier from the sprite, if they exist. You may also pass an array of strings, and it will remove each.  a null value will remove all images from the sprite."))));
DefineFunction(array('name' => "loadDims", 'desc' => "Loads the dimensions for the images in the sprite, but not necessarily their data.", 'flags' => HasDocComment, 'return' => array('type' => Object, 'desc' => "The ImageSprite object itself (for method chaining)."), 'args' => array(array('name' => "block", 'type' => Boolean, 'value' => "false", 'desc' => "Whether this call should block until all the data is loaded or allow them to load in the background."))));
DefineFunction(array('name' => "loadImages", 'desc' => "Loads the images in the sprite and sets the correct dimensions.", 'flags' => HasDocComment, 'return' => array('type' => Object, 'desc' => "The ImageSprite object itself (for method chaining)."), 'args' => array(array('name' => "block", 'type' => Boolean, 'value' => "false", 'desc' => "Whether this call should block until all the data is loaded or allow them to load in the background."))));
DefineFunction(array('name' => "output", 'desc' => "Retrieves the resulting sprite image.", 'flags' => HasDocComment, 'return' => array('type' => String, 'desc' => "The image data, if the \$output_file is not specified."), 'args' => array(array('name' => "output_file", 'type' => String, 'value' => "null_string", 'desc' => "Path to where the output image should be saved. If empty or null, the image data is returned as a string."), array('name' => "format", 'type' => String, 'value' => "\"png\"", 'desc' => "The format the output image should be returned in. Defaults to png."), array('name' => "quality", 'type' => Int32, 'value' => "75", 'desc' => "The output quality of the image. Only applies to jpeg output, and defaults to 75."))));
DefineFunction(array('name' => "css", 'desc' => "Retrieves css for the sprite, mapping ids to images.", 'flags' => HasDocComment, 'return' => array('type' => String, 'desc' => "The css output, if the \$output_file is not specified."), 'args' => array(array('name' => "css_namespace", 'type' => String, 'desc' => "The css class namespace of the sprite. Should be unique within your css."), array('name' => "sprite_file", 'type' => String, 'value' => "null_string", 'desc' => "Path to the sprite image relative to wherever this css is being served. The output image may be passed in datauri format to use inlined sprite images. If this is not set, the image location must be specified elsewhere in the css manually."), array('name' => "output_file", 'type' => String, 'value' => "null_string", 'desc' => "Path to where the css should be saved. If empty or null, the css is returned as a string."), array('name' => "verbose", 'type' => Boolean, 'value' => "false", 'desc' => "Determines whether the css should include comments with information about the sprite."))));
DefineFunction(array('name' => "getErrors", 'desc' => "Retrieves an associative array of errors encountered while putting together the sprite.", 'flags' => HasDocComment, 'return' => array('type' => StringVec, 'desc' => "Associative array of errors")));
DefineFunction(array('name' => "mapping", 'desc' => "Returns an associative array mapping the images in the sprite to their dimensions, placement, and css id.", 'flags' => HasDocComment, 'return' => array('type' => StringVec, 'desc' => "Associative array of mapping")));
DefineFunction(array('name' => "__destruct", 'desc' => "Recovers all memory allocated to the sprite.", 'flags' => HasDocComment, 'return' => array('type' => Variant, 'desc' => "null")));
EndClass();
Example #3
0
DefineFunction(array('name' => "imap_scanmailbox", 'desc' => "Returns an array containing the names of the mailboxes that have content in the text of the mailbox.\n\nThis function is similar to imap_listmailbox(), but it will additionally check for the presence of the string content inside the mailbox data.", 'flags' => HasDocComment, 'return' => array('type' => Variant, 'desc' => "Returns an array containing the names of the mailboxes that have content in the text of the mailbox."), 'args' => array(array('name' => "imap_stream", 'type' => Object, 'desc' => "An IMAP stream returned by imap_open()."), array('name' => "ref", 'type' => String, 'desc' => "ref should normally be just the server specification as described in imap_open()"), array('name' => "pattern", 'type' => String, 'desc' => "Specifies where in the mailbox hierarchy to start searching.\n\nThere are two special characters you can pass as part of the pattern: '*' and '%'. '*' means to return all mailboxes. If you pass pattern as '*', you will get a list of the entire mailbox hierarchy. '%' means to return the current level only. '%' as the pattern parameter will return only the top level mailboxes; '~/mail/%' on UW_IMAPD will return every mailbox in the ~/mail directory, but none in subfolders of that directory."), array('name' => "content", 'type' => String, 'desc' => "The searched string"))));
DefineFunction(array('name' => "imap_search", 'desc' => "This function performs a search on the mailbox currently opened in the given IMAP stream.\n\nFor example, to match all unanswered messages sent by Mom, you'd use: \"UNANSWERED FROM mom\". Searches appear to be case insensitive. This list of criteria is from a reading of the UW c-client source code and may be incomplete or inaccurate (see also ยป RFC2060, section 6.4.4).", 'flags' => HasDocComment, 'return' => array('type' => Variant, 'desc' => "Returns an array of message numbers or UIDs.\n\nReturn FALSE if it does not understand the search criteria or no messages have been found."), 'args' => array(array('name' => "imap_stream", 'type' => Object, 'desc' => "An IMAP stream returned by imap_open()."), array('name' => "criteria", 'type' => String, 'desc' => "A string, delimited by spaces, in which the following keywords are allowed. Any multi-word arguments (e.g. FROM \"joey smith\") must be quoted. ALL - return all messages matching the rest of the criteria ANSWERED - match messages with the \\\\ANSWERED flag set BCC \"string\" - match messages with \"string\" in the Bcc: field BEFORE \"date\" - match messages with Date: before \"date\" BODY \"string\" - match messages with \"string\" in the body of the message CC \"string\" - match messages with \"string\" in the Cc: field DELETED - match deleted messages FLAGGED - match messages with the \\\\FLAGGED (sometimes referred to as Important or Urgent) flag set FROM \"string\" - match messages with \"string\" in the From: field KEYWORD \"string\" - match messages with \"string\" as a keyword NEW - match new messages OLD - match old messages ON \"date\" - match messages with Date: matching \"date\" RECENT - match messages with the \\\\RECENT flag set SEEN - match messages that have been read (the \\\\SEEN flag is set) SINCE \"date\" - match messages with Date: after \"date\" SUBJECT \"string\" - match messages with \"string\" in the Subject: TEXT \"string\" - match messages with text \"string\" TO \"string\" - match messages with \"string\" in the To: UNANSWERED - match messages that have not been answered UNDELETED - match messages that are not deleted UNFLAGGED - match messages that are not flagged UNKEYWORD \"string\" - match messages that do not have the keyword \"string\" UNSEEN - match messages which have not been read yet"), array('name' => "options", 'type' => Int64, 'value' => "0", 'desc' => "Valid values for options are SE_UID, which causes the returned array to contain UIDs instead of messages sequence numbers."), array('name' => "charset", 'type' => String, 'value' => "\"\""))));
DefineFunction(array('name' => "imap_set_quota", 'desc' => "Sets an upper limit quota on a per mailbox basis.", 'flags' => HasDocComment, 'return' => array('type' => Boolean, 'desc' => "Returns TRUE on success or FALSE on failure."), 'args' => array(array('name' => "imap_stream", 'type' => Object, 'desc' => "An IMAP stream returned by imap_open()."), array('name' => "quota_root", 'type' => String, 'desc' => "The mailbox to have a quota set. This should follow the IMAP standard format for a mailbox: user.name."), array('name' => "quota_limit", 'type' => Int64, 'desc' => "The maximum size (in KB) for the quota_root"))));
DefineFunction(array('name' => "imap_setacl", 'desc' => "Sets the ACL for a giving mailbox.", 'flags' => HasDocComment, 'return' => array('type' => Boolean, 'desc' => "Returns TRUE on success or FALSE on failure."), 'args' => array(array('name' => "imap_stream", 'type' => Object, 'desc' => "An IMAP stream returned by imap_open()."), array('name' => "mailbox", 'type' => String, 'desc' => "The mailbox name, see imap_open() for more information"), array('name' => "id", 'type' => String, 'desc' => "The user to give the rights to."), array('name' => "rights", 'type' => String, 'desc' => "The rights to give to the user. Passing an empty string will delete acl."))));
DefineFunction(array('name' => "imap_setflag_full", 'desc' => "Causes a store to add the specified flag to the flags set for the messages in the specified sequence.", 'flags' => HasDocComment, 'return' => array('type' => Boolean, 'desc' => "Returns TRUE on success or FALSE on failure."), 'args' => array(array('name' => "imap_stream", 'type' => Object, 'desc' => "An IMAP stream returned by imap_open()."), array('name' => "sequence", 'type' => String, 'desc' => "A sequence of message numbers. You can enumerate desired messages with the X,Y syntax, or retrieve all messages within an interval with the X:Y syntax"), array('name' => "flag", 'type' => String, 'desc' => "The flags which you can set are \\Seen, \\Answered, \\Flagged, \\Deleted, and \\Draft as defined by ยป RFC2060."), array('name' => "options", 'type' => Int64, 'value' => "0", 'desc' => "A bit mask that may contain the single option: ST_UID - The sequence argument contains UIDs instead of sequence numbers"))));
DefineFunction(array('name' => "imap_sort", 'desc' => "Gets and sorts message numbers by the given parameters.", 'flags' => HasDocComment, 'return' => array('type' => Variant, 'desc' => "Returns an array of message numbers sorted by the given parameters."), 'args' => array(array('name' => "imap_stream", 'type' => Object, 'desc' => "An IMAP stream returned by imap_open()."), array('name' => "criteria", 'type' => Int64, 'desc' => "Criteria can be one (and only one) of the following: SORTDATE - message Date SORTARRIVAL - arrival date SORTFROM - mailbox in first From address SORTSUBJECT - message subject SORTTO - mailbox in first To address SORTCC - mailbox in first cc address SORTSIZE - size of message in octets"), array('name' => "reverse", 'type' => Int64, 'desc' => "Set this to 1 for reverse sorting"), array('name' => "options", 'type' => Int64, 'value' => "0", 'desc' => "The options are a bitmask of one or more of the following: SE_UID - Return UIDs instead of sequence numbers SE_NOPREFETCH - Don't prefetch searched messages"), array('name' => "search_criteria", 'type' => String, 'value' => "\"\""), array('name' => "charset", 'type' => String, 'value' => "\"\""))));
DefineFunction(array('name' => "imap_status", 'desc' => "Gets status information about the given mailbox.", 'flags' => HasDocComment, 'return' => array('type' => Variant, 'desc' => "This function returns an object containing status information. The object has the following properties: messages, recent, unseen, uidnext, and uidvalidity.\n\nflags is also set, which contains a bitmask which can be checked against any of the above constants."), 'args' => array(array('name' => "imap_stream", 'type' => Object, 'desc' => "An IMAP stream returned by imap_open()."), array('name' => "mailbox", 'type' => String, 'desc' => "The mailbox name, see imap_open() for more information"), array('name' => "options", 'type' => Int64, 'value' => "0", 'desc' => "Valid flags are: SA_MESSAGES - set \$status->messages to the number of messages in the mailbox SA_RECENT - set \$status->recent to the number of recent messages in the mailbox SA_UNSEEN - set \$status->unseen to the number of unseen (new) messages in the mailbox SA_UIDNEXT - set \$status->uidnext to the next uid to be used in the mailbox SA_UIDVALIDITY - set \$status->uidvalidity to a constant that changes when uids for the mailbox may no longer be valid SA_ALL - set all of the above"))));
DefineFunction(array('name' => "imap_subscribe", 'desc' => "Subscribe to a new mailbox.", 'flags' => HasDocComment, 'return' => array('type' => Boolean, 'desc' => "Returns TRUE on success or FALSE on failure."), 'args' => array(array('name' => "imap_stream", 'type' => Object, 'desc' => "An IMAP stream returned by imap_open()."), array('name' => "mailbox", 'type' => String, 'desc' => "The mailbox name, see imap_open() for more information"))));
DefineFunction(array('name' => "imap_thread", 'desc' => "Gets a tree of a threaded message.", 'flags' => HasDocComment, 'return' => array('type' => Variant, 'desc' => "imap_thread() returns an associative array containing a tree of messages threaded by REFERENCES, or FALSE on error.\n\nEvery message in the current mailbox will be represented by three entries in the resulting array:\n\n\$thread[\"XX.num\"] - current message number\n\n\$thread[\"XX.next\"]\n\n\$thread[\"XX.branch\"]"), 'args' => array(array('name' => "imap_stream", 'type' => Object, 'desc' => "An IMAP stream returned by imap_open()."), array('name' => "options", 'type' => Int64, 'value' => "0"))));
DefineFunction(array('name' => "imap_timeout", 'desc' => "Sets or fetches the imap timeout.", 'flags' => HasDocComment, 'return' => array('type' => Variant, 'desc' => "If the timeout parameter is set, this function returns TRUE on success and FALSE on failure.\n\nIf timeout is not provided or evaluates to -1, the current timeout value of timeout_type is returned as an integer."), 'args' => array(array('name' => "timeout_type", 'type' => Int64, 'desc' => "One of the following: IMAP_OPENTIMEOUT, IMAP_READTIMEOUT, IMAP_WRITETIMEOUT, or IMAP_CLOSETIMEOUT."), array('name' => "timeout", 'type' => Int64, 'value' => "-1", 'desc' => "The timeout, in seconds."))));
DefineFunction(array('name' => "imap_uid", 'desc' => "This function returns the UID for the given message sequence number. An UID is a unique identifier that will not change over time while a message sequence number may change whenever the content of the mailbox changes.\n\nThis function is the inverse of imap_msgno().", 'flags' => HasDocComment, 'return' => array('type' => Variant, 'desc' => "The UID of the given message."), 'args' => array(array('name' => "imap_stream", 'type' => Object, 'desc' => "An IMAP stream returned by imap_open()."), array('name' => "msg_number", 'type' => Int64, 'desc' => "The message number."))));
DefineFunction(array('name' => "imap_undelete", 'desc' => "Removes the deletion flag for a specified message, which is set by imap_delete() or imap_mail_move().", 'flags' => HasDocComment, 'return' => array('type' => Boolean, 'desc' => "Returns TRUE on success or FALSE on failure."), 'args' => array(array('name' => "imap_stream", 'type' => Object, 'desc' => "An IMAP stream returned by imap_open()."), array('name' => "msg_number", 'type' => String, 'desc' => "The message number"), array('name' => "flags", 'type' => Int64, 'value' => "0"))));
DefineFunction(array('name' => "imap_unsubscribe", 'desc' => "Unsubscribe from the specified mailbox.", 'flags' => HasDocComment, 'return' => array('type' => Boolean, 'desc' => "Returns TRUE on success or FALSE on failure."), 'args' => array(array('name' => "imap_stream", 'type' => Object, 'desc' => "An IMAP stream returned by imap_open()."), array('name' => "mailbox", 'type' => String, 'desc' => "The mailbox name, see imap_open() for more information"))));
DefineFunction(array('name' => "imap_utf7_decode", 'desc' => "Decodes modified UTF-7 text into ISO-8859-1 string.\n\nThis function is needed to decode mailbox names that contain certain characters which are not in range of printable ASCII characters.", 'flags' => HasDocComment, 'return' => array('type' => Variant, 'desc' => "Returns a string that is encoded in ISO-8859-1 and consists of the same sequence of characters in text, or FALSE if text contains invalid modified UTF-7 sequence or text contains a character that is not part of ISO-8859-1 character set."), 'args' => array(array('name' => "text", 'type' => String, 'desc' => "A modified UTF-7 encoding string, as defined in ยป RFC 2060, section 5.1.3 (original UTF-7 was defined in ยป RFC1642)."))));
DefineFunction(array('name' => "imap_utf7_encode", 'desc' => "Converts data to modified UTF-7 text.\n\nThis is needed to encode mailbox names that contain certain characters which are not in range of printable ASCII characters.", 'flags' => HasDocComment, 'return' => array('type' => Variant, 'desc' => "Returns data encoded with the modified UTF-7 encoding as defined in ยป RFC 2060, section 5.1.3 (original UTF-7 was defined in ยป RFC1642)."), 'args' => array(array('name' => "data", 'type' => String, 'desc' => "An ISO-8859-1 string."))));
DefineFunction(array('name' => "imap_utf8", 'desc' => "Converts the given mime_encoded_text to UTF-8.", 'flags' => HasDocComment, 'return' => array('type' => Variant, 'desc' => "Returns an UTF-8 encoded string."), 'args' => array(array('name' => "mime_encoded_text", 'type' => String, 'desc' => "A MIME encoded string. MIME encoding method and the UTF-8 specification are described in ยป RFC2047 and ยป RFC2044 respectively."))));
///////////////////////////////////////////////////////////////////////////////
// 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
// )
//
Example #4
0
function EndClass()
{
    global $classes, $current_class;
    $have_ctor = false;
    $have_dtor = false;
    foreach ($classes[$current_class]['methods'] as $method) {
        if ($method['name'] == '__construct') {
            $have_ctor = true;
        }
        if ($method['name'] == '__destruct') {
            $have_dtor = true;
        }
    }
    // We don't have the information to autogenerate a ctor def,
    // so make the user do it.
    if (!$have_ctor) {
        throw new Exception("No constructor defined for class {$current_class}");
    }
    // Generate the appropriate IDL for the dtor, if it doesn't exist.
    if (!$have_dtor) {
        DefineFunction(array('name' => '__destruct', 'return' => array('type' => Variant)));
    }
    $current_class = '';
}
//   '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
//      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' => "cached_json_decode", 'desc' => "Wrapper over json_decode to add caching. Works the same way as json_decode but for the first argument, which has to but a file path so we could get the modification time and check for stale data on the\n    cache", 'flags' => HasDocComment, 'return' => array('type' => Variant, 'desc' => "Returns an array containing the decoded json, time of last modification of the file, and last time the file modification time was checked"), 'args' => array(array('name' => "json_file", 'type' => String, 'desc' => "The json file being decoded.\n\nThis function only works with UTF-8 encoded data."), array('name' => "assoc", 'type' => Boolean, 'value' => "false", 'desc' => "When TRUE, returned objects will be converted into associative arrays."), array('name' => "loose", 'type' => Boolean, 'value' => "false", 'desc' => "User specified recursion depth."))));
///////////////////////////////////////////////////////////////////////////////
// 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
// )
//
Example #6
0
DefineFunction(array('name' => "mysql_num_rows", 'desc' => "Retrieves the number of rows from a result set. This command is only valid for statements like SELECT or SHOW that return an actual result set. To retrieve the number of rows affected by a INSERT, UPDATE, REPLACE or DELETE query, use mysql_affected_rows().", 'flags' => HasDocComment, 'return' => array('type' => Variant, 'desc' => "The number of rows in a result set on success or FALSE on failure."), 'args' => array(array('name' => "result", 'type' => Variant, 'desc' => "resource that is being evaluated. This result comes from a call to mysql_query().")), 'taint_observer' => false));
DefineFunction(array('name' => "mysql_free_result", 'desc' => "mysql_free_result() will free all memory associated with the result identifier result.\n\nmysql_free_result() only needs to be called if you are concerned about how much memory is being used for queries that return large result sets. All associated result memory is automatically freed at the end of the script's execution.", 'flags' => HasDocComment, 'return' => array('type' => Variant, 'desc' => "Returns TRUE on success or FALSE on failure.\n\nIf a non-resource is used for the result, an error of level E_WARNING will be emitted. It's worth noting that mysql_query() only returns a resource for SELECT, SHOW, EXPLAIN, and DESCRIBE queries."), 'args' => array(array('name' => "result", 'type' => Variant, 'desc' => "resource that is being evaluated. This result comes from a call to mysql_query().")), 'taint_observer' => false));
DefineFunction(array('name' => "mysql_data_seek", 'desc' => "mysql_data_seek() moves the internal row pointer of the MySQL result associated with the specified result identifier to point to the specified row number. The next call to a MySQL fetch function, such as mysql_fetch_assoc(), would return that row.\n\nrow_number starts at 0. The row_number should be a value in the range from 0 to mysql_num_rows() - 1. However if the result set is empty (mysql_num_rows() == 0), a seek to 0 will fail with a E_WARNING and mysql_data_seek() will return FALSE.", 'flags' => HasDocComment, 'return' => array('type' => Boolean, 'desc' => "Returns TRUE on success or FALSE on failure."), 'args' => array(array('name' => "result", 'type' => Variant, 'desc' => "resource that is being evaluated. This result comes from a call to mysql_query()."), array('name' => "row", 'type' => Int32, 'desc' => "The desired row number of the new result pointer.")), 'taint_observer' => false));
DefineFunction(array('name' => "mysql_fetch_row", 'desc' => "Returns a numerical array that corresponds to the fetched row and moves the internal data pointer ahead.", 'flags' => HasDocComment, 'return' => array('type' => Variant, 'desc' => "Returns an numerical array of strings that corresponds to the fetched row, or FALSE if there are no more rows.\n\nmysql_fetch_row() fetches one row of data from the result associated with the specified result identifier. The row is returned as an array. Each result column is stored in an array offset, starting at offset 0."), 'args' => array(array('name' => "result", 'type' => Variant, 'desc' => "resource that is being evaluated. This result comes from a call to mysql_query().")), 'taint_observer' => array('set_mask' => "TAINT_BIT_ALL", 'clear_mask' => "TAINT_BIT_NONE")));
DefineFunction(array('name' => "mysql_fetch_assoc", 'desc' => "Returns an associative array that corresponds to the fetched row and moves the internal data pointer ahead. mysql_fetch_assoc() is equivalent to calling mysql_fetch_array() with MYSQL_ASSOC for the optional second parameter. It only returns an associative array.", 'flags' => HasDocComment, 'return' => array('type' => Variant, 'desc' => "Returns an associative array of strings that corresponds to the fetched row, or FALSE if there are no more rows.\n\nIf two or more columns of the result have the same field names, the last column will take precedence. To access the other column(s) of the same name, you either need to access the result with numeric indices by using mysql_fetch_row() or add alias names. See the example at the mysql_fetch_array() description about aliases."), 'args' => array(array('name' => "result", 'type' => Variant, 'desc' => "resource that is being evaluated. This result comes from a call to mysql_query().")), 'taint_observer' => array('set_mask' => "TAINT_BIT_ALL", 'clear_mask' => "TAINT_BIT_NONE")));
DefineFunction(array('name' => "mysql_fetch_array", 'desc' => "Returns an array that corresponds to the fetched row and moves the internal data pointer ahead.", 'flags' => HasDocComment, 'return' => array('type' => Variant, 'desc' => "Returns an array of strings that corresponds to the fetched row, or FALSE if there are no more rows. The type of returned array depends on how result_type is defined. By using MYSQL_BOTH (default), you'll get an array with both associative and number indices. Using MYSQL_ASSOC, you only get associative indices (as mysql_fetch_assoc() works), using MYSQL_NUM, you only get number indices (as mysql_fetch_row() works).\n\nIf two or more columns of the result have the same field names, the last column will take precedence. To access the other column(s) of the same name, you must use the numeric index of the column or make an alias for the column. For aliased columns, you cannot access the contents with the original column name."), 'args' => array(array('name' => "result", 'type' => Variant, 'desc' => "resource that is being evaluated. This result comes from a call to mysql_query()."), array('name' => "result_type", 'type' => Int32, 'value' => "3", 'desc' => "The type of array that is to be fetched. It's a constant and can take the following values: MYSQL_ASSOC, MYSQL_NUM, and MYSQL_BOTH.")), 'taint_observer' => array('set_mask' => "TAINT_BIT_ALL", 'clear_mask' => "TAINT_BIT_NONE")));
DefineFunction(array('name' => "mysql_fetch_lengths", 'desc' => "Returns an array that corresponds to the lengths of each field in the last row fetched by MySQL.\n\nmysql_fetch_lengths() stores the lengths of each result column in the last row returned by mysql_fetch_row(), mysql_fetch_assoc(), mysql_fetch_array(), and mysql_fetch_object() in an array, starting at offset 0.", 'flags' => HasDocComment, 'return' => array('type' => Variant, 'desc' => "An array of lengths on success or FALSE on failure."), 'args' => array(array('name' => "result", 'type' => Variant, 'desc' => "resource that is being evaluated. This result comes from a call to mysql_query().")), 'taint_observer' => false));
DefineFunction(array('name' => "mysql_fetch_object", 'desc' => "Returns an object with properties that correspond to the fetched row and moves the internal data pointer ahead.", 'flags' => HasDocComment, 'return' => array('type' => Variant, 'desc' => "Returns an object with string properties that correspond to the fetched row, or FALSE if there are no more rows."), 'args' => array(array('name' => "result", 'type' => Variant, 'desc' => "resource that is being evaluated. This result comes from a call to mysql_query()."), array('name' => "class_name", 'type' => String, 'value' => "\"stdClass\"", 'desc' => "The name of the class to instantiate, set the properties of and return. If not specified, a stdClass object is returned."), array('name' => "params", 'type' => VariantVec, 'value' => "null", 'desc' => "An optional array of parameters to pass to the constructor for class_name objects.")), 'taint_observer' => array('set_mask' => "TAINT_BIT_ALL", 'clear_mask' => "TAINT_BIT_NONE")));
DefineFunction(array('name' => "mysql_result", 'desc' => "Retrieves the contents of one cell from a MySQL result set.\n\nWhen working on large result sets, you should consider using one of the functions that fetch an entire row (specified below). As these functions return the contents of multiple cells in one function call, they're MUCH quicker than mysql_result(). Also, note that specifying a numeric offset for the field argument is much quicker than specifying a fieldname or tablename.fieldname argument.", 'flags' => HasDocComment, 'return' => array('type' => Variant, 'desc' => "The contents of one cell from a MySQL result set on success, or FALSE on failure."), 'args' => array(array('name' => "result", 'type' => Variant, 'desc' => "resource that is being evaluated. This result comes from a call to mysql_query()."), array('name' => "row", 'type' => Int32, 'desc' => "The row number from the result that's being retrieved. Row numbers start at 0."), array('name' => "field", 'type' => Variant, 'value' => "null_variant", 'desc' => "The name or offset of the field being retrieved.\n\nIt can be the field's offset, the field's name, or the field's table dot field name (tablename.fieldname). If the column name has been aliased ('select foo as bar from...'), use the alias instead of the column name. If undefined, the first field is retrieved.")), 'taint_observer' => array('set_mask' => "TAINT_BIT_ALL", 'clear_mask' => "TAINT_BIT_NONE")));
DefineFunction(array('name' => "mysql_fetch_field", 'desc' => "Returns an object containing field information. This function can be used to obtain information about fields in the provided query result.", 'flags' => HasDocComment, 'return' => array('type' => Variant, 'desc' => "Returns an object containing field information. The properties of the object are:\n\nname - column name table - name of the table the column belongs to max_length - maximum length of the column not_null - 1 if the column cannot be NULL primary_key - 1 if the column is a primary key unique_key - 1 if the column is a unique key multiple_key - 1 if the column is a non-unique key numeric - 1 if the column is numeric blob - 1 if the column is a BLOB type - the type of the column unsigned - 1 if the column is unsigned zerofill - 1 if the column is zero-filled"), 'args' => array(array('name' => "result", 'type' => Variant, 'desc' => "resource that is being evaluated. This result comes from a call to mysql_query()."), array('name' => "field", 'type' => Int32, 'value' => "-1", 'desc' => "The numerical field offset. If the field offset is not specified, the next field that was not yet retrieved by this function is retrieved. The field_offset starts at 0.")), 'taint_observer' => array('set_mask' => "TAINT_BIT_ALL", 'clear_mask' => "TAINT_BIT_NONE")));
DefineFunction(array('name' => "mysql_field_seek", 'desc' => "Seeks to the specified field offset. If the next call to mysql_fetch_field() doesn't include a field offset, the field offset specified in mysql_field_seek() will be returned.", 'flags' => HasDocComment, 'return' => array('type' => Boolean, 'desc' => "Returns TRUE on success or FALSE on failure."), 'args' => array(array('name' => "result", 'type' => Variant, 'desc' => "resource that is being evaluated. This result comes from a call to mysql_query()."), array('name' => "field", 'type' => Int32, 'value' => "0", 'desc' => "The numerical field offset. The field_offset starts at 0. If field_offset does not exist, an error of level E_WARNING is also issued.")), 'taint_observer' => false));
DefineFunction(array('name' => "mysql_field_name", 'desc' => "mysql_field_name() returns the name of the specified field index.", 'flags' => HasDocComment, 'return' => array('type' => Variant, 'desc' => "The name of the specified field index on success or FALSE on failure."), 'args' => array(array('name' => "result", 'type' => Variant, 'desc' => "resource that is being evaluated. This result comes from a call to mysql_query()."), array('name' => "field", 'type' => Int32, 'value' => "0", 'desc' => "The numerical field offset. The field_offset starts at 0. If field_offset does not exist, an error of level E_WARNING is also issued.")), 'taint_observer' => array('set_mask' => "TAINT_BIT_ALL", 'clear_mask' => "TAINT_BIT_NONE")));
DefineFunction(array('name' => "mysql_field_table", 'desc' => "Returns the name of the table that the specified field is in.", 'flags' => HasDocComment, 'return' => array('type' => Variant, 'desc' => "The name of the table on success."), 'args' => array(array('name' => "result", 'type' => Variant, 'desc' => "resource that is being evaluated. This result comes from a call to mysql_query()."), array('name' => "field", 'type' => Int32, 'value' => "0", 'desc' => "The numerical field offset. The field_offset starts at 0. If field_offset does not exist, an error of level E_WARNING is also issued.")), 'taint_observer' => array('set_mask' => "TAINT_BIT_ALL", 'clear_mask' => "TAINT_BIT_NONE")));
DefineFunction(array('name' => "mysql_field_len", 'desc' => "mysql_field_len() returns the length of the specified field.", 'flags' => HasDocComment, 'return' => array('type' => Variant, 'desc' => "The length of the specified field index on success or FALSE on failure."), 'args' => array(array('name' => "result", 'type' => Variant, 'desc' => "resource that is being evaluated. This result comes from a call to mysql_query()."), array('name' => "field", 'type' => Int32, 'value' => "0", 'desc' => "The numerical field offset. The field_offset starts at 0. If field_offset does not exist, an error of level E_WARNING is also issued.")), 'taint_observer' => false));
DefineFunction(array('name' => "mysql_field_type", 'desc' => "mysql_field_type() is similar to the mysql_field_name() function. The arguments are identical, but the field type is returned instead.", 'flags' => HasDocComment, 'return' => array('type' => Variant, 'desc' => "The returned field type will be one of \"int\", \"real\", \"string\", \"blob\", and others as detailed in the MySQL documentation."), 'args' => array(array('name' => "result", 'type' => Variant, 'desc' => "resource that is being evaluated. This result comes from a call to mysql_query()."), array('name' => "field", 'type' => Int32, 'value' => "0", 'desc' => "The numerical field offset. The field_offset starts at 0. If field_offset does not exist, an error of level E_WARNING is also issued.")), 'taint_observer' => false));
DefineFunction(array('name' => "mysql_field_flags", 'desc' => "mysql_field_flags() returns the field flags of the specified field. The flags are reported as a single word per flag separated by a single space, so that you can split the returned value using explode().", 'flags' => HasDocComment, 'return' => array('type' => Variant, 'desc' => "Returns a string of flags associated with the result or FALSE on failure.\n\nThe following flags are reported, if your version of MySQL is current enough to support them: \"not_null\", \"primary_key\", \"unique_key\", \"multiple_key\", \"blob\", \"unsigned\", \"zerofill\", \"binary\", \"enum\", \"auto_increment\" and \"timestamp\"."), 'args' => array(array('name' => "result", 'type' => Variant, 'desc' => "resource that is being evaluated. This result comes from a call to mysql_query()."), array('name' => "field", 'type' => Int32, 'value' => "0", 'desc' => "The numerical field offset. The field_offset starts at 0. If field_offset does not exist, an error of level E_WARNING is also issued.")), 'taint_observer' => false));
///////////////////////////////////////////////////////////////////////////////
// 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
// )
//
Example #7
0
DefineFunction(array('name' => "hphp_directoryiterator_current", 'flags' => HipHopSpecific, 'return' => array('type' => Variant), 'args' => array(array('name' => "obj", 'type' => Resource))));
DefineFunction(array('name' => "hphp_directoryiterator___tostring", 'flags' => HipHopSpecific, 'return' => array('type' => String), 'args' => array(array('name' => "obj", 'type' => Resource))));
DefineFunction(array('name' => "hphp_directoryiterator_valid", 'flags' => HipHopSpecific, 'return' => array('type' => Boolean), 'args' => array(array('name' => "obj", 'type' => Resource))));
DefineFunction(array('name' => "hphp_directoryiterator_isdot", 'flags' => HipHopSpecific, 'return' => array('type' => Boolean), 'args' => array(array('name' => "obj", 'type' => Resource))));
DefineFunction(array('name' => "hphp_recursivedirectoryiterator___construct", 'flags' => HipHopSpecific, 'return' => array('type' => Boolean), 'args' => array(array('name' => "obj", 'type' => Resource), array('name' => "path", 'type' => String), array('name' => "flags", 'type' => Int64))));
DefineFunction(array('name' => "hphp_recursivedirectoryiterator_key", 'flags' => HipHopSpecific, 'return' => array('type' => Variant), 'args' => array(array('name' => "obj", 'type' => Resource))));
DefineFunction(array('name' => "hphp_recursivedirectoryiterator_next", 'flags' => HipHopSpecific, 'return' => array('type' => null), 'args' => array(array('name' => "obj", 'type' => Resource))));
DefineFunction(array('name' => "hphp_recursivedirectoryiterator_rewind", 'flags' => HipHopSpecific, 'return' => array('type' => null), 'args' => array(array('name' => "obj", 'type' => Resource))));
DefineFunction(array('name' => "hphp_recursivedirectoryiterator_seek", 'flags' => HipHopSpecific, 'return' => array('type' => null), 'args' => array(array('name' => "obj", 'type' => Resource), array('name' => "position", 'type' => Int64))));
DefineFunction(array('name' => "hphp_recursivedirectoryiterator_current", 'flags' => HipHopSpecific, 'return' => array('type' => Variant), 'args' => array(array('name' => "obj", 'type' => Resource))));
DefineFunction(array('name' => "hphp_recursivedirectoryiterator___tostring", 'flags' => HipHopSpecific, 'return' => array('type' => String), 'args' => array(array('name' => "obj", 'type' => Resource))));
DefineFunction(array('name' => "hphp_recursivedirectoryiterator_valid", 'flags' => HipHopSpecific, 'return' => array('type' => Boolean), 'args' => array(array('name' => "obj", 'type' => Resource))));
DefineFunction(array('name' => "hphp_recursivedirectoryiterator_haschildren", 'flags' => HipHopSpecific, 'return' => array('type' => Boolean), 'args' => array(array('name' => "obj", 'type' => Resource))));
DefineFunction(array('name' => "hphp_recursivedirectoryiterator_getchildren", 'flags' => HipHopSpecific, 'return' => array('type' => Resource), 'args' => array(array('name' => "obj", 'type' => Resource))));
DefineFunction(array('name' => "hphp_recursivedirectoryiterator_getsubpath", 'flags' => HipHopSpecific, 'return' => array('type' => String), 'args' => array(array('name' => "obj", 'type' => Resource))));
DefineFunction(array('name' => "hphp_recursivedirectoryiterator_getsubpathname", 'flags' => HipHopSpecific, 'return' => array('type' => String), 'args' => array(array('name' => "obj", 'type' => Resource))));
///////////////////////////////////////////////////////////////////////////////
// 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
// )
//
Example #8
0
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
//      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' => "get_bucket_cache_info", 'flags' => HasDocComment, 'return' => array('type' => Variant), 'args' => array(array('name' => "cluster_id", 'type' => Int64), array('name' => "bucket_id", 'type' => Int64))));
DefineFunction(array('name' => "set_bucket_cache_info", 'flags' => HasDocComment, 'return' => array('type' => Boolean), 'args' => array(array('name' => "cluster_id", 'type' => Int64), array('name' => "bucket_id", 'type' => Int64), array('name' => "state", 'type' => Int64), array('name' => "server", 'type' => Int64), array('name' => "volume", 'type' => Int64), array('name' => "alt_server", 'type' => Int64), array('name' => "alt_volume", 'type' => Int64))));
Example #9
0
  /**
   * Explicitly provide a t___invokeCallInfoHelper to
   * allow __invoke() to sidestep an extra level of indirection
   */
  virtual const CallInfo *t___invokeCallInfoHelper(void *&extra);

  String name() const { return String(m_name, CopyString); }

  /**
   * This is the constructor which is called internally-
   * PHP code will never be able to call this constructor
   */
  c_Closure(const CallInfo *callInfo, const char *name,
            const ObjectStaticCallbacks *cb = &cw_Closure) :
    ExtObjectData(cb), m_callInfo(callInfo), m_name(name) {
    ASSERT(callInfo);
  }
protected:
  virtual bool php_sleep(Variant &ret);
private:
  const CallInfo *m_callInfo;
  const char *m_name;
EOT
));
DefineFunction(array('name' => '__construct', 'args' => array(), 'return' => array('type' => null)));
DefineFunction(array('name' => '__invoke', 'flags' => VariableArguments, 'return' => array('type' => Variant)));
DefineFunction(array('name' => '__clone', 'return' => array('type' => Variant)));
EndClass();
BeginClass(array('name' => "DummyClosure", 'desc' => "Represents an invalid closure which will fatal when used."));
DefineFunction(array('name' => '__construct', 'args' => array(), 'return' => array('type' => null)));
EndClass();
Example #10
0
DefineFunction(array('name' => "posix_getuid", 'desc' => "Return the numeric real user ID of the current process.", 'flags' => HasDocComment, 'return' => array('type' => Int64, 'desc' => "Returns the user id, as an integer"), 'taint_observer' => false));
DefineFunction(array('name' => "posix_initgroups", 'desc' => "Calculates the group access list for the user specified in name.", 'flags' => HasDocComment, 'return' => array('type' => Boolean, 'desc' => "Returns TRUE on success or FALSE on failure."), 'args' => array(array('name' => "name", 'type' => String, 'desc' => "The user to calculate the list for."), array('name' => "base_group_id", 'type' => Int32, 'desc' => "Typically the group number from the password file.")), 'taint_observer' => false));
DefineFunction(array('name' => "posix_isatty", 'desc' => "Determines if the file descriptor fd refers to a valid terminal type device.", 'flags' => HasDocComment, 'return' => array('type' => Boolean, 'desc' => "Returns TRUE if fd is an open descriptor connected to a terminal and FALSE otherwise."), 'args' => array(array('name' => "fd", 'type' => Variant, 'desc' => "The file descriptor.")), 'taint_observer' => false));
DefineFunction(array('name' => "posix_kill", 'desc' => "Send the signal sig to the process with the process identifier pid.", 'flags' => HasDocComment, 'return' => array('type' => Boolean, 'desc' => "Returns TRUE on success or FALSE on failure."), 'args' => array(array('name' => "pid", 'type' => Int32, 'desc' => "The process identifier."), array('name' => "sig", 'type' => Int32, 'desc' => "One of the PCNTL signals constants.")), 'taint_observer' => false));
DefineFunction(array('name' => "posix_mkfifo", 'desc' => "posix_mkfifo() creates a special FIFO file which exists in the file system and acts as a bidirectional communication endpoint for processes.", 'flags' => HasDocComment, 'return' => array('type' => Boolean, 'desc' => "Returns TRUE on success or FALSE on failure."), 'args' => array(array('name' => "pathname", 'type' => String, 'desc' => "Path to the FIFO file."), array('name' => "mode", 'type' => Int32, 'desc' => "The second parameter mode has to be given in octal notation (e.g. 0644). The permission of the newly created FIFO also depends on the setting of the current umask(). The permissions of the created file are (mode & ~umask).")), 'taint_observer' => false));
DefineFunction(array('name' => "posix_mknod", 'desc' => "Creates a special or ordinary file.", 'flags' => HasDocComment, 'return' => array('type' => Boolean, 'desc' => "Returns TRUE on success or FALSE on failure."), 'args' => array(array('name' => "pathname", 'type' => String, 'desc' => "The file to create"), array('name' => "mode", 'type' => Int32, 'desc' => "This parameter is constructed by a bitwise OR between file type (one of the following constants: POSIX_S_IFREG, POSIX_S_IFCHR, POSIX_S_IFBLK, POSIX_S_IFIFO or POSIX_S_IFSOCK) and permissions."), array('name' => "major", 'type' => Int32, 'value' => "0", 'desc' => "The major device kernel identifier (required to pass when using S_IFCHR or S_IFBLK)."), array('name' => "minor", 'type' => Int32, 'value' => "0", 'desc' => "The minor device kernel identifier.")), 'taint_observer' => false));
DefineFunction(array('name' => "posix_setegid", 'desc' => "Set the effective group ID of the current process. This is a privileged function and needs appropriate privileges (usually root) on the system to be able to perform this function.", 'flags' => HasDocComment, 'return' => array('type' => Boolean, 'desc' => "Returns TRUE on success or FALSE on failure."), 'args' => array(array('name' => "gid", 'type' => Int32, 'desc' => "The group id.")), 'taint_observer' => false));
DefineFunction(array('name' => "posix_seteuid", 'desc' => "Set the real user ID of the current process. This is a privileged function and needs appropriate privileges (usually root) on the system to be able to perform this function.", 'flags' => HasDocComment, 'return' => array('type' => Boolean, 'desc' => "Returns TRUE on success or FALSE on failure."), 'args' => array(array('name' => "uid", 'type' => Int32, 'desc' => "The user id.")), 'taint_observer' => false));
DefineFunction(array('name' => "posix_setgid", 'desc' => "Set the real group ID of the current process. This is a privileged function and needs appropriate privileges (usually root) on the system to be able to perform this function. The appropriate order of function calls is posix_setgid() first, posix_setuid() last.\n\nIf the caller is a super user, this will also set the effective group id.", 'flags' => HasDocComment, 'return' => array('type' => Boolean, 'desc' => "Returns TRUE on success or FALSE on failure."), 'args' => array(array('name' => "gid", 'type' => Int32, 'desc' => "The group id.")), 'taint_observer' => false));
DefineFunction(array('name' => "posix_setpgid", 'desc' => "Let the process pid join the process group pgid.", 'flags' => HasDocComment, 'return' => array('type' => Boolean, 'desc' => "Returns TRUE on success or FALSE on failure."), 'args' => array(array('name' => "pid", 'type' => Int32, 'desc' => "The process id."), array('name' => "pgid", 'type' => Int32, 'desc' => "The process group id.")), 'taint_observer' => false));
DefineFunction(array('name' => "posix_setsid", 'desc' => "Make the current process a session leader.", 'flags' => HasDocComment, 'return' => array('type' => Int64, 'desc' => "Returns the session id, or -1 on errors."), 'taint_observer' => false));
DefineFunction(array('name' => "posix_setuid", 'desc' => "Set the real user ID of the current process. This is a privileged function that needs appropriate privileges (usually root) on the system to be able to perform this function.", 'flags' => HasDocComment, 'return' => array('type' => Boolean, 'desc' => "Returns TRUE on success or FALSE on failure."), 'args' => array(array('name' => "uid", 'type' => Int32, 'desc' => "The user id.")), 'taint_observer' => false));
DefineFunction(array('name' => "posix_strerror", 'desc' => "Returns the POSIX system error message associated with the given errno. You may get the errno parameter by calling posix_get_last_error().", 'flags' => HasDocComment, 'return' => array('type' => String, 'desc' => "Returns the error message, as a string."), 'args' => array(array('name' => "errnum", 'type' => Int32, 'desc' => "A POSIX error number, returned by posix_get_last_error(). If set to 0, then the string \"Success\" is returned.")), 'taint_observer' => false));
DefineFunction(array('name' => "posix_times", 'desc' => "Gets information about the current CPU usage.", 'flags' => HasDocComment, 'return' => array('type' => Variant, 'desc' => "Returns a hash of strings with information about the current process CPU usage. The indices of the hash are: ticks - the number of clock ticks that have elapsed since reboot. utime - user time used by the current process. stime - system time used by the current process. cutime - user time used by current process and children. cstime - system time used by current process and children."), 'taint_observer' => false));
DefineFunction(array('name' => "posix_ttyname", 'desc' => "Returns a string for the absolute path to the current terminal device that is open on the file descriptor fd.", 'flags' => HasDocComment, 'return' => array('type' => Variant, 'desc' => "On success, returns a string of the absolute path of the fd. On failure, returns FALSE"), 'args' => array(array('name' => "fd", 'type' => Variant, 'desc' => "The file descriptor.")), 'taint_observer' => false));
DefineFunction(array('name' => "posix_uname", 'desc' => "Gets information about the system.\n\nPosix requires that assumptions must not be made about the format of the values, e.g. the assumption that a release may contain three digits or anything else returned by this function.", 'flags' => HasDocComment, 'return' => array('type' => Variant, 'desc' => "Returns a hash of strings with information about the system. The indices of the hash are sysname - operating system name (e.g. Linux) nodename - system name (e.g. valiant) release - operating system release (e.g. 2.2.10) version - operating system version (e.g. #4 Tue Jul 20 17:01:36 MEST 1999) machine - system architecture (e.g. i586) domainname - DNS domainname (e.g. example.com)\n\ndomainname is a GNU extension and not part of POSIX.1, so this field is only available on GNU systems or when using the GNU libc."), 'taint_observer' => false));
///////////////////////////////////////////////////////////////////////////////
// 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
// )
//
Example #11
0
DefineFunction(array('name' => "mb_strimwidth", 'desc' => "Truncates string str to specified width.", 'return' => array('type' => Variant, 'desc' => "The truncated string . If trimmarker is set, trimmarker is appended to the return value."), 'args' => array(array('name' => "str", 'type' => String, 'desc' => "The string being decoded."), array('name' => "start", 'type' => Int32, 'desc' => "The start position offset. Number of characters from the beginning of string. (First character is 0)"), array('name' => "width", 'type' => Int32, 'desc' => "The width of the desired trim."), array('name' => "trimmarker", 'type' => String, 'value' => "null_string", 'desc' => "A string that is added to the end of string when string is truncated."), array('name' => "encoding", 'type' => String, 'value' => "null_string", 'desc' => "encoding parameter is the character encoding. If it is omitted, the internal character encoding value will be used."))));
DefineFunction(array('name' => "mb_stripos", 'desc' => "mb_stripos() returns the numeric position of the first occurrence of needle in the haystack string. Unlike mb_strpos(), mb_stripos() is case-insensitive. If needle is not found, it returns FALSE.", 'return' => array('type' => Variant, 'desc' => "Return the numeric position of the first occurrence of needle in the haystack string, or FALSE if needle is not found."), 'args' => array(array('name' => "haystack", 'type' => String, 'desc' => "The string from which to get the position of the first occurrence of needle"), array('name' => "needle", 'type' => String, 'desc' => "The string to find in haystack"), array('name' => "offset", 'type' => Int32, 'value' => "0", 'desc' => "The position in haystack to start searching"), array('name' => "encoding", 'type' => String, 'value' => "null_string", 'desc' => "Character encoding name to use. If it is omitted, internal character encoding is used."))));
DefineFunction(array('name' => "mb_stristr", 'desc' => "mb_stristr() finds the first occurrence of needle in haystack and returns the portion of haystack. Unlike mb_strstr(), mb_stristr() is case-insensitive. If needle is not found, it returns FALSE.", 'return' => array('type' => Variant, 'desc' => "Returns the portion of haystack, or FALSE if needle is not found."), 'args' => array(array('name' => "haystack", 'type' => String, 'desc' => "The string from which to get the first occurrence of needle"), array('name' => "needle", 'type' => String, 'desc' => "The string to find in haystack"), array('name' => "part", 'type' => Boolean, 'value' => "false", 'desc' => "Determines which portion of haystack this function returns. If set to TRUE, it returns all of haystack from the beginning to the first occurrence of needle. If set to FALSE, it returns all of haystack from the first occurrence of needle to the end,"), array('name' => "encoding", 'type' => String, 'value' => "null_string", 'desc' => "Character encoding name to use. If it is omitted, internal character encoding is used."))));
DefineFunction(array('name' => "mb_strlen", 'desc' => "Gets the length of a string .", 'return' => array('type' => Variant, 'desc' => "Returns the number of characters in string str having character encoding encoding. A multi-byte character is counted as 1."), 'args' => array(array('name' => "str", 'type' => String, 'desc' => "The string being checked for length."), array('name' => "encoding", 'type' => String, 'value' => "null_string", 'desc' => "encoding parameter is the character encoding. If it is omitted, the internal character encoding value will be used."))));
DefineFunction(array('name' => "mb_strpos", 'desc' => "Finds position of the first occurrence of a string in a string .\nPerforms a multi-byte safe strpos() operation based on number of characters. The first character's position is 0, the second character position is 1, and so on.", 'return' => array('type' => Variant, 'desc' => "Returns the numeric position of the first occurrence of needle in the haystack string . If needle is not found, it returns FALSE."), 'args' => array(array('name' => "haystack", 'type' => String, 'desc' => "The string being checked."), array('name' => "needle", 'type' => String, 'desc' => "The position counted from the beginning of haystack."), array('name' => "offset", 'type' => Int32, 'value' => "0", 'desc' => "The search offset. If it is not specified, 0 is used."), array('name' => "encoding", 'type' => String, 'value' => "null_string", 'desc' => "encoding parameter is the character encoding. If it is omitted, the internal character encoding value will be used."))));
DefineFunction(array('name' => "mb_strrchr", 'desc' => "mb_strrchr() finds the last occurrence of needle in haystack and returns the portion of haystack. If needle is not found, it returns FALSE.", 'return' => array('type' => Variant, 'desc' => "Returns the portion of haystack. or FALSE if needle is not found."), 'args' => array(array('name' => "haystack", 'type' => String, 'desc' => "The string from which to get the last occurrence of needle"), array('name' => "needle", 'type' => String, 'desc' => "The string to find in haystack"), array('name' => "part", 'type' => Boolean, 'value' => "false", 'desc' => "Determines which portion of haystack this function returns. If set to TRUE, it returns all of haystack from the beginning to the last occurrence of needle. If set to FALSE, it returns all of haystack from the last occurrence of needle to the end,"), array('name' => "encoding", 'type' => String, 'value' => "null_string", 'desc' => "Character encoding name to use. If it is omitted, internal character encoding is used."))));
DefineFunction(array('name' => "mb_strrichr", 'desc' => "mb_strrichr() finds the last occurrence of needle in haystack and returns the portion of haystack. Unlike mb_strrchr(), mb_strrichr() is case-insensitive. If needle is not found, it returns FALSE.", 'return' => array('type' => Variant, 'desc' => "Returns the portion of haystack. or FALSE if needle is not found."), 'args' => array(array('name' => "haystack", 'type' => String, 'desc' => "The string from which to get the last occurrence of needle"), array('name' => "needle", 'type' => String, 'desc' => "The string to find in haystack"), array('name' => "part", 'type' => Boolean, 'value' => "false", 'desc' => "Determines which portion of haystack this function returns. If set to TRUE, it returns all of haystack from the beginning to the last occurrence of needle. If set to FALSE, it returns all of haystack from the last occurrence of needle to the end,"), array('name' => "encoding", 'type' => String, 'value' => "null_string", 'desc' => "Character encoding name to use. If it is omitted, internal character encoding is used."))));
DefineFunction(array('name' => "mb_strripos", 'desc' => "mb_strripos() performs multi-byte safe strripos() operation based on number of characters. needle position is counted from the beginning of haystack. First character's position is 0. Second character position is 1. Unlike mb_strrpos(), mb_strripos() is case-insensitive.", 'return' => array('type' => Variant, 'desc' => "Return the numeric position of the last occurrence of needle in the haystack string, or FALSE if needle is not found."), 'args' => array(array('name' => "haystack", 'type' => String, 'desc' => "The string from which to get the position of the last occurrence of needle"), array('name' => "needle", 'type' => String, 'desc' => "The string to find in haystack"), array('name' => "offset", 'type' => Int32, 'value' => "0", 'desc' => "The position in haystack to start searching"), array('name' => "encoding", 'type' => String, 'value' => "null_string", 'desc' => "Character encoding name to use. If it is omitted, internal character encoding is used."))));
DefineFunction(array('name' => "mb_strrpos", 'desc' => "Performs a multibyte safe strrpos() operation based on the number of characters. needle position is counted from the beginning of haystack. First character's position is 0. Second character position is 1.", 'return' => array('type' => Variant, 'desc' => "Returns the numeric position of the last occurrence of needle in the haystack string . If needle is not found, it returns FALSE."), 'args' => array(array('name' => "haystack", 'type' => String, 'desc' => "The string being checked, for the last occurrence of needle"), array('name' => "needle", 'type' => String, 'desc' => "The string to find in haystack."), array('name' => "offset", 'type' => Variant, 'value' => "0LL", 'desc' => "May be specified to begin searching an arbitrary number of characters into the string . Negative values will stop searching at an arbitrary point prior to the end of the string ."), array('name' => "encoding", 'type' => String, 'value' => "null_string", 'desc' => "encoding parameter is the character encoding. If it is omitted, the internal character encoding value will be used."))));
DefineFunction(array('name' => "mb_strstr", 'desc' => "mb_strstr() finds the first occurrence of needle in haystack and returns the portion of haystack. If needle is not found, it returns FALSE.", 'return' => array('type' => Variant, 'desc' => "Returns the portion of haystack, or FALSE if needle is not found."), 'args' => array(array('name' => "haystack", 'type' => String, 'desc' => "The string from which to get the first occurrence of needle"), array('name' => "needle", 'type' => String, 'desc' => "The string to find in haystack"), array('name' => "part", 'type' => Boolean, 'value' => "false", 'desc' => "Determines which portion of haystack this function returns. If set to TRUE, it returns all of haystack from the beginning to the first occurrence of needle. If set to FALSE, it returns all of haystack from the first occurrence of needle to the end,"), array('name' => "encoding", 'type' => String, 'value' => "null_string", 'desc' => "Character encoding name to use. If it is omitted, internal character encoding is used."))));
DefineFunction(array('name' => "mb_strtolower", 'desc' => "Returns str with all alphabetic characters converted to lowercase.", 'return' => array('type' => Variant, 'desc' => "str with all alphabetic characters converted to lowercase."), 'args' => array(array('name' => "str", 'type' => String, 'desc' => "The string being lowercased."), array('name' => "encoding", 'type' => String, 'value' => "null_string", 'desc' => "encoding parameter is the character encoding. If it is omitted, the internal character encoding value will be used."))));
DefineFunction(array('name' => "mb_strtoupper", 'desc' => "Returns str with all alphabetic characters converted to uppercase.", 'return' => array('type' => Variant, 'desc' => "str with all alphabetic characters converted to uppercase."), 'args' => array(array('name' => "str", 'type' => String, 'desc' => "The string being uppercased."), array('name' => "encoding", 'type' => String, 'value' => "null_string", 'desc' => "encoding parameter is the character encoding. If it is omitted, the internal character encoding value will be used."))));
DefineFunction(array('name' => "mb_strwidth", 'desc' => "Returns the width of string str.\nMulti-byte characters are usually twice the width of single byte characters.\nCharacters width Chars Width U+0000 - U+0019 0 U+0020 - U+1FFF 1 U+2000 - U+FF60 2 U+FF61 - U+FF9F 1 U+FFA0 - 2", 'return' => array('type' => Variant, 'desc' => "The width of string str."), 'args' => array(array('name' => "str", 'type' => String, 'desc' => "The string being decoded."), array('name' => "encoding", 'type' => String, 'value' => "null_string", 'desc' => "encoding parameter is the character encoding. If it is omitted, the internal character encoding value will be used."))));
DefineFunction(array('name' => "mb_substitute_character", 'desc' => "Specifies a substitution character when input character encoding is invalid or character code does not exist in output character encoding. Invalid characters may be substituted NULL (no output), string or integer value (Unicode character code value).\nThis setting affects mb_convert_encoding(), mb_convert_variables(), mb_output_handler(), and mb_send_mail().", 'return' => array('type' => Variant, 'desc' => "If substchar is set, it returns TRUE for success, otherwise returns FALSE. If substchar is not set, it returns the Unicode value, or \"none\" or \"long\"."), 'args' => array(array('name' => "substrchar", 'type' => Variant, 'value' => "null_variant", 'desc' => "Specify the Unicode value as an integer , or as one of the following string s: \"none\" : no output \"long\" : Output character code value (Example: U+3000, JIS+7E7E) \"entity\" : Output character entity (Example: รˆโ‚ฌ)"))));
DefineFunction(array('name' => "mb_substr_count", 'desc' => "Counts the number of times the needle substring occurs in the haystack string .", 'return' => array('type' => Variant, 'desc' => "The number of times the needle substring occurs in the haystack string ."), 'args' => array(array('name' => "haystack", 'type' => String, 'desc' => "The string being checked."), array('name' => "needle", 'type' => String, 'desc' => "The string being found."), array('name' => "encoding", 'type' => String, 'value' => "null_string", 'desc' => "encoding parameter is the character encoding. If it is omitted, the internal character encoding value will be used."))));
DefineFunction(array('name' => "mb_substr", 'desc' => "Performs a multi-byte safe substr() operation based on number of characters. Position is counted from the beginning of str. First character's position is 0. Second character position is 1, and so on.", 'return' => array('type' => Variant, 'desc' => "mb_substr() returns the portion of str specified by the start and length parameters."), 'args' => array(array('name' => "str", 'type' => String, 'desc' => "The string being checked."), array('name' => "start", 'type' => Int32, 'desc' => "The first position used in str."), array('name' => "length", 'type' => Int32, 'value' => "0x7FFFFFFF", 'desc' => "The maximum length of the returned string ."), array('name' => "encoding", 'type' => String, 'value' => "null_string", 'desc' => "encoding parameter is the character encoding. If it is omitted, the internal character encoding value will be used."))));
///////////////////////////////////////////////////////////////////////////////
// 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
// )
//
Example #12
0
//   '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
//      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
//      )
//   'taint_observer' => taint propagation information
//     array (
//       'set_mask' => which bits to set automatically
//       'clear_mask' => which bits to clear automatically
//     )
// )
DefineFunction(array('name' => "filter_has_var", 'desc' => "Checks if variable of specified type exists.", 'flags' => HasDocComment, 'args' => array(array('name' => "type", 'type' => Int32, 'desc' => "One of INPUT_GET, INPUT_POST, INPUT_COOKIE, INPUT_SERVER, or INPUT_ENV."), array('name' => "variable_name", 'type' => String, 'desc' => "Name of a variable to check.")), 'return' => array('type' => Boolean, 'desc' => "Returns TRUE on success or FALSE on failure."), 'taint_observer' => false));
DefineFunction(array('name' => "filter_id", 'desc' => "Returns the filter ID belonging to a named filter.", 'flags' => HasDocComment, 'args' => array(array('name' => "filtername", 'type' => String, 'desc' => "Name of a filter to get.")), 'return' => array('type' => Variant, 'desc' => "ID of a filter on success or FALSE if filter doesn't exist."), 'taint_observer' => false));
DefineFunction(array('name' => "filter_input_array", 'desc' => "Gets external variables and optionally filters them.", 'flags' => HasDocComment, 'args' => array(array('name' => "type", 'type' => Int32, 'desc' => "One of INPUT_GET, INPUT_POST, INPUT_COOKIE, INPUT_SERVER, or INPUT_ENV."), array('name' => "definition", 'type' => Variant, 'value' => "k_FILTER_DEFAULT", 'desc' => "An array defining the arguments. A valid key is a string\n\t\tcontaining a variable name and a valid value is either a filter type, or\n\t\tan array optionally specifying the filter, flags and options. If the\n\t\tvalue is an array, valid keys are filter which specifies the filter\n\t\ttype, flags which specifies any flags that apply to the filter, and\n\t\toptions which specifies any options that apply to the filter. See the\n\t\texample below for a better understanding.\n\t\t\n\t\tThis parameter can be also an integer holding a filter constant. Then\n\t\tall values in the input array are filtered by this filter.")), 'return' => array('type' => Variant, 'desc' => "An array containing the values of the requested variables on\n\t  success, or FALSE on failure. An array value will be FALSE if the filter\n\t  fails, or NULL if the variable is not set. Or if the flag\n\t  FILTER_NULL_ON_FAILURE is used, it returns FALSE if the variable is not\n\t  set and NULL if the filter fails."), 'taint_observer' => false));
DefineFunction(array('name' => "filter_input", 'desc' => "Gets a specific external variable by name and optionally filters it", 'flags' => HasDocComment, 'args' => array(array('name' => "type", 'type' => Int32, 'desc' => "One of INPUT_GET, INPUT_POST, INPUT_COOKIE, INPUT_SERVER, or INPUT_ENV."), array('name' => "variable_name", 'type' => String, 'desc' => "Name of a variable to get."), array('name' => "filter", 'type' => Int32, 'value' => "k_FILTER_DEFAULT", 'desc' => "The ID of the filter to apply. The Types of filters manual\n\t\tpage lists the available filters."), array('name' => "options", 'type' => Variant, 'value' => "null_array", 'desc' => "Associative array of options or bitwise disjunction of flags.\n\t\tIf filter accepts options, flags can be provided in 'flags' field of\n\t\tarray.")), 'return' => array('type' => Variant, 'desc' => "Value of the requested variable on success, FALSE if the\n\t  filter fails, or NULL if the variable_name variable is not set. If the\n\t  flag FILTER_NULL_ON_FAILURE is used, it returns FALSE if the variable is\n\t  not set and NULL if the filter fails."), 'taint_observer' => false));
DefineFunction(array('name' => "filter_list", 'desc' => "Returns a list of all supported filters.", 'flags' => HasDocComment, 'return' => array('type' => Variant, 'desc' => "Returns an array of names of all supported filters, empty\n\t  array if there are no such filters. Indexes of this array are not filter\n\t  IDs, they can be obtained with filter_id() from a name instead."), 'taint_observer' => false));
DefineFunction(array('name' => "filter_var_array", 'desc' => "Gets multiple variables and optionally filters them", 'flags' => HasDocComment, 'args' => array(array('name' => "data", 'type' => VariantMap, 'desc' => "An array with string keys containing the data to filter."), array('name' => "definition", 'type' => Variant, 'value' => "k_FILTER_DEFAULT", 'desc' => "An array defining the arguments. A valid key is a string\n\t\tcontaining a variable name and a valid value is either a filter type, or\n\t\tan array optionally specifying the filter, flags and options. If the\n\t\tvalue is an array, valid keys are filter which specifies the filter\n\t\ttype, flags which specifies any flags that apply to the filter, and\n\t\toptions which specifies any options that apply to the filter. See the\n\t\texample below for a better understanding.\n\n\t\tThis parameter can be also an integer holding a filter constant. Then\n\t\tall values in the input array are filtered by this filter.")), 'return' => array('type' => Variant, 'desc' => "An array containing the values of the requested variables on\n\t  success, or FALSE on failure. An array value will be FALSE if the filter\n\t  fails, or NULL if the variable is not set."), 'taint_observer' => false));
DefineFunction(array('name' => "filter_var", 'desc' => "Filters a variable with a specified filter", 'flags' => HasDocComment, 'args' => array(array('name' => "variable", 'type' => Variant, 'desc' => "Value to filter."), array('name' => "filter", 'type' => Int32, 'value' => "k_FILTER_DEFAULT", 'desc' => "The ID of the filter to apply. See the types of filters on\n\t\tthe PHP manual"), array('name' => "options", 'type' => Variant, 'value' => "null_array", 'desc' => "Associative array of options or bitwise disjunction of flags.\n\t\tIf filter accepts options, flags can be provided in 'flags' field of\n\t\tarray. For the 'callback' filter, callable type should be passed. The\n\t\tcallback must accept one argument, the value to be filtered, and return\n\t\tthe value after filtering/sanitizing it.")), 'return' => array('type' => Variant, 'desc' => "Returns the filtered data, or FALSE if the filter fails."), 'taint_observer' => false));
Example #13
0
DefineFunction(array('name' => "msg_get_queue", 'desc' => "msg_get_queue() returns an id that can be used to access the System V message queue with the given key. The first call creates the message queue with the optional perms. A second call to msg_get_queue() for the same key will return a different message queue identifier, but both identifiers access the same underlying message queue.", 'return' => array('type' => Variant, 'desc' => "Returns a resource handle that can be used to access the System V message queue."), 'args' => array(array('name' => "key", 'type' => Int64, 'desc' => "Message queue numeric ID"), array('name' => "perms", 'type' => Int64, 'value' => "0666", 'desc' => "Queue permissions. Default to 0666. If the message queue already exists, the perms will be ignored."))));
DefineFunction(array('name' => "msg_send", 'desc' => "msg_send() sends a message of type msgtype (which MUST be greater than 0) to the message queue specified by queue.", 'return' => array('type' => Boolean, 'desc' => "Returns TRUE on success or FALSE on failure.\nUpon successful completion the message queue data structure is updated as follows: msg_lspid is set to the process-ID of the calling process, msg_qnum is incremented by 1 and msg_stime is set to the current time."), 'args' => array(array('name' => "queue", 'type' => Resource), array('name' => "msgtype", 'type' => Int64), array('name' => "message", 'type' => Variant), array('name' => "serialize", 'type' => Boolean, 'value' => "true", 'desc' => "The optional serialize controls how the message is sent. serialize defaults to TRUE which means that the message is serialized using the same mechanism as the session module before being sent to the queue. This allows complex arrays and objects to be sent to other PHP scripts, or if you are using the WDDX serializer, to any WDDX compatible client."), array('name' => "blocking", 'type' => Boolean, 'value' => "true", 'desc' => "If the message is too large to fit in the queue, your script will wait until another process reads messages from the queue and frees enough space for your message to be sent. This is called blocking; you can prevent blocking by setting the optional blocking parameter to FALSE, in which case msg_send() will immediately return FALSE if the message is too big for the queue, and set the optional errorcode to MSG_EAGAIN, indicating that you should try to send your message again a little later on."), array('name' => "errorcode", 'type' => Variant | Reference, 'value' => "null"))));
DefineFunction(array('name' => "msg_receive", 'desc' => "msg_receive() will receive the first message from the specified queue of the type specified by desiredmsgtype.", 'return' => array('type' => Boolean, 'desc' => "Returns TRUE on success or FALSE on failure.\nUpon successful completion the message queue data structure is updated as follows: msg_lrpid is set to the process-ID of the calling process, msg_qnum is decremented by 1 and msg_rtime is set to the current time."), 'args' => array(array('name' => "queue", 'type' => Resource), array('name' => "desiredmsgtype", 'type' => Int64, 'desc' => "If desiredmsgtype is 0, the message from the front of the queue is returned. If desiredmsgtype is greater than 0, then the first message of that type is returned. If desiredmsgtype is less than 0, the first message on the queue with the lowest type less than or equal to the absolute value of desiredmsgtype will be read. If no messages match the criteria, your script will wait until a suitable message arrives on the queue. You can prevent the script from blocking by specifying MSG_IPC_NOWAIT in the flags parameter."), array('name' => "msgtype", 'type' => Variant | Reference, 'desc' => "The type of the message that was received will be stored in this parameter."), array('name' => "maxsize", 'type' => Int64, 'desc' => "The maximum size of message to be accepted is specified by the maxsize; if the message in the queue is larger than this size the function will fail (unless you set flags as described below)."), array('name' => "message", 'type' => Variant | Reference, 'desc' => "The received message will be stored in message, unless there were errors receiving the message."), array('name' => "unserialize", 'type' => Boolean, 'value' => "true", 'desc' => "If set to TRUE, the message is treated as though it was serialized using the same mechanism as the session module. The message will be unserialized and then returned to your script. This allows you to easily receive arrays or complex object structures from other PHP scripts, or if you are using the WDDX serializer, from any WDDX compatible source.\nIf unserialize is FALSE, the message will be returned as a binary-safe string."), array('name' => "flags", 'type' => Int64, 'value' => "0", 'desc' => "The optional flags allows you to pass flags to the low-level msgrcv system call. It defaults to 0, but you may specify one or more of the following values (by adding or ORing them together). Flag values for msg_receive MSG_IPC_NOWAIT If there are no messages of the desiredmsgtype, return immediately and do not wait. The function will fail and return an integer value corresponding to MSG_ENOMSG. MSG_EXCEPT Using this flag in combination with a desiredmsgtype greater than 0 will cause the function to receive the first message that is not equal to desiredmsgtype. MSG_NOERROR If the message is longer than maxsize, setting this flag will truncate the message to maxsize and will not signal an error."), array('name' => "errorcode", 'type' => Variant | Reference, 'value' => "null", 'desc' => "If the function fails, the optional errorcode will be set to the value of the system errno variable."))));
DefineFunction(array('name' => "msg_remove_queue", 'desc' => "msg_remove_queue() destroys the message queue specified by the queue. Only use this function when all processes have finished working with the message queue and you need to release the system resources held by it.", 'return' => array('type' => Boolean, 'desc' => "Returns TRUE on success or FALSE on failure."), 'args' => array(array('name' => "queue", 'type' => Resource, 'desc' => "Message queue resource handle"))));
DefineFunction(array('name' => "msg_set_queue", 'desc' => "msg_set_queue() allows you to change the values of the msg_perm.uid, msg_perm.gid, msg_perm.mode and msg_qbytes fields of the underlying message queue data structure.\nChanging the data structure will require that PHP be running as the same user that created the queue, owns the queue (as determined by the existing msg_perm.xxx fields), or be running with root privileges. root privileges are required to raise the msg_qbytes values above the system defined limit.", 'return' => array('type' => Boolean, 'desc' => "Returns TRUE on success or FALSE on failure."), 'args' => array(array('name' => "queue", 'type' => Resource, 'desc' => "Message queue resource handle"), array('name' => "data", 'type' => Int64Map, 'desc' => "You specify the values you require by setting the value of the keys that you require in the data array."))));
DefineFunction(array('name' => "msg_stat_queue", 'desc' => "msg_stat_queue() returns the message queue meta data for the message queue specified by the queue. This is useful, for example, to determine which process sent the message that was just received.", 'return' => array('type' => Int64Map, 'desc' => "The return value is an array whose keys and values have the following meanings: Array structure for msg_stat_queue msg_perm.uid The uid of the owner of the queue. msg_perm.gid The gid of the owner of the queue. msg_perm.mode The file access mode of the queue. msg_stime The time that the last message was sent to the queue. msg_rtime The time that the last message was received from the queue. msg_ctime The time that the queue was last changed. msg_qnum The number of messages waiting to be read from the queue. msg_qbytes The maximum number of bytes allowed in one message queue. On Linux, this value may be read and modified via /proc/sys/kernel/msgmnb. msg_lspid The pid of the process that sent the last message to the queue. msg_lrpid The pid of the process that received the last message from the queue."), 'args' => array(array('name' => "queue", 'type' => Resource, 'desc' => "Message queue resource handle"))));
DefineFunction(array('name' => "sem_acquire", 'desc' => "sem_acquire() blocks (if necessary) until the semaphore can be acquired. A process attempting to acquire a semaphore which it has already acquired will block forever if acquiring the semaphore would cause its maximum number of semaphore to be exceeded.\nAfter processing a request, any semaphores acquired by the process but not explicitly released will be released automatically and a warning will be generated.", 'return' => array('type' => Boolean, 'desc' => "Returns TRUE on success or FALSE on failure."), 'args' => array(array('name' => "sem_identifier", 'type' => Resource, 'desc' => "sem_identifier is a semaphore resource, obtained from sem_get()."))));
DefineFunction(array('name' => "sem_get", 'desc' => "sem_get() returns an id that can be used to access the System V semaphore with the given key.\nA second call to sem_get() for the same key will return a different semaphore identifier, but both identifiers access the same underlying semaphore.", 'return' => array('type' => Variant, 'desc' => "Returns a positive semaphore identifier on success, or FALSE on error."), 'args' => array(array('name' => "key", 'type' => Int64), array('name' => "max_acquire", 'type' => Int64, 'value' => "1", 'desc' => "The number of processes that can acquire the semaphore simultaneously is set to max_acquire."), array('name' => "perm", 'type' => Int64, 'value' => "0666", 'desc' => "The semaphore permissions. Actually this value is set only if the process finds it is the only process currently attached to the semaphore."), array('name' => "auto_release", 'type' => Boolean, 'value' => "true", 'desc' => "Specifies if the semaphore should be automatically released on request shutdown."))));
DefineFunction(array('name' => "sem_release", 'desc' => "sem_release() releases the semaphore if it is currently acquired by the calling process, otherwise a warning is generated.\nAfter releasing the semaphore, sem_acquire() may be called to re-acquire it.", 'return' => array('type' => Boolean, 'desc' => "Returns TRUE on success or FALSE on failure."), 'args' => array(array('name' => "sem_identifier", 'type' => Resource, 'desc' => "A Semaphore resource handle as returned by sem_get()."))));
DefineFunction(array('name' => "sem_remove", 'desc' => "sem_remove() removes the given semaphore.\nAfter removing the semaphore, it is no more accessible.", 'return' => array('type' => Boolean, 'desc' => "Returns TRUE on success or FALSE on failure."), 'args' => array(array('name' => "sem_identifier", 'type' => Resource, 'desc' => "A semaphore resource identifier as returned by sem_get()."))));
DefineFunction(array('name' => "shm_attach", 'desc' => "shm_attach() returns an id that can be used to access the System V shared memory with the given key, the first call creates the shared memory segment with memsize and the optional perm-bits perm.\nA second call to shm_attach() for the same key will return a different shared memory identifier, but both identifiers access the same underlying shared memory. memsize and perm will be ignored.", 'return' => array('type' => Variant, 'desc' => "Returns a shared memory segment identifier."), 'args' => array(array('name' => "shm_key", 'type' => Int64, 'desc' => "A numeric shared memory segment ID"), array('name' => "shm_size", 'type' => Int64, 'value' => "10000", 'desc' => "The memory size. If not provided, default to the sysvshm.init_mem in the php.ini, otherwise 10000 bytes."), array('name' => "shm_flag", 'type' => Int64, 'value' => "0666", 'desc' => "The optional permission bits. Default to 0666."))));
DefineFunction(array('name' => "shm_detach", 'desc' => "shm_detach() disconnects from the shared memory given by the shm_identifier created by shm_attach(). Remember, that shared memory still exist in the Unix system and the data is still present.", 'return' => array('type' => Boolean, 'desc' => "shm_detach() always returns TRUE."), 'args' => array(array('name' => "shm_identifier", 'type' => Int64, 'desc' => "A shared memory resource handle as returned by shm_attach()"))));
DefineFunction(array('name' => "shm_remove", 'desc' => "shm_remove() removes the shared memory shm_identifier. All data will be destroyed.", 'return' => array('type' => Boolean, 'desc' => "Returns TRUE on success or FALSE on failure."), 'args' => array(array('name' => "shm_identifier", 'type' => Int64, 'desc' => "The shared memory identifier as returned by shm_attach()"))));
DefineFunction(array('name' => "shm_get_var", 'desc' => "shm_get_var() returns the variable with a given variable_key, in the given shared memory segment. The variable is still present in the shared memory.", 'return' => array('type' => Variant, 'desc' => "Returns the variable with the given key."), 'args' => array(array('name' => "shm_identifier", 'type' => Int64, 'desc' => "Shared memory segment, obtained from shm_attach()."), array('name' => "variable_key", 'type' => Int64, 'desc' => "The variable key."))));
DefineFunction(array('name' => "shm_put_var", 'desc' => "shm_put_var() inserts or updates the variable with the given variable_key.\nWarnings (E_WARNING level) will be issued if shm_identifier is not a valid SysV shared memory index or if there was not enough shared memory remaining to complete your request.", 'return' => array('type' => Boolean, 'desc' => "Returns TRUE on success or FALSE on failure."), 'args' => array(array('name' => "shm_identifier", 'type' => Int64, 'desc' => "A shared memory resource handle as returned by shm_attach()"), array('name' => "variable_key", 'type' => Int64, 'desc' => "The variable key."), array('name' => "variable", 'type' => Any, 'desc' => "The variable. All variable-types are supported."))));
DefineFunction(array('name' => "shm_remove_var", 'desc' => "Removes a variable with a given variable_key and frees the occupied memory.", 'return' => array('type' => Boolean, 'desc' => "Returns TRUE on success or FALSE on failure."), 'args' => array(array('name' => "shm_identifier", 'type' => Int64, 'desc' => "The shared memory identifier as returned by shm_attach()"), array('name' => "variable_key", 'type' => Int64, 'desc' => "The variable key."))));
///////////////////////////////////////////////////////////////////////////////
// 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
// )
//
Example #14
0
DefineFunction(array('name' => "imagesy", 'desc' => "Returns the height of the given image resource.", 'flags' => HasDocComment, 'return' => array('type' => Variant, 'desc' => "Return the height of the image or FALSE on errors."), 'args' => array(array('name' => "image", 'type' => Resource, 'desc' => "An image resource, returned by one of the image creation functions, such as imagecreatetruecolor().")), 'taint_observer' => false));
DefineFunction(array('name' => "imagetruecolortopalette", 'desc' => "imagetruecolortopalette() converts a truecolor image to a palette image. The code for this function was originally drawn from the Independent JPEG Group library code, which is excellent. The code has been modified to preserve as much alpha channel information as possible in the resulting palette, in addition to preserving colors as well as possible. This does not work as well as might be hoped. It is usually best to simply produce a truecolor output image instead, which guarantees the highest output quality.", 'flags' => HasDocComment, 'return' => array('type' => Variant, 'desc' => "Returns TRUE on success or FALSE on failure."), 'args' => array(array('name' => "image", 'type' => Resource, 'desc' => "An image resource, returned by one of the image creation functions, such as imagecreatetruecolor()."), array('name' => "dither", 'type' => Boolean, 'desc' => "Indicates if the image should be dithered - if it is TRUE then dithering will be used which will result in a more speckled image but with better color approximation."), array('name' => "ncolors", 'type' => Int32, 'desc' => "Sets the maximum number of colors that should be retained in the palette.")), 'taint_observer' => false));
DefineFunction(array('name' => "imagettfbbox", 'desc' => "This function calculates and returns the bounding box in pixels for a TrueType text.", 'flags' => HasDocComment, 'return' => array('type' => Variant, 'desc' => "imagettfbbox() returns an array with 8 elements representing four points making the bounding box of the text on success and FALSE on error. key contents 0 lower left corner, X position 1 lower left corner, Y position 2 lower right corner, X position 3 lower right corner, Y position 4 upper right corner, X position 5 upper right corner, Y position 6 upper left corner, X position 7 upper left corner, Y position\n\nThe points are relative to the text regardless of the angle, so \"upper left\" means in the top left-hand corner seeing the text horizontally."), 'args' => array(array('name' => "size", 'type' => Double, 'desc' => "The font size. Depending on your version of GD, this should be specified as the pixel size (GD1) or point size (GD2)."), array('name' => "angle", 'type' => Double, 'desc' => "Angle in degrees in which text will be measured."), array('name' => "fontfile", 'type' => String, 'desc' => "The name of the TrueType font file (can be a URL). Depending on which version of the GD library that PHP is using, it may attempt to search for files that do not begin with a leading '/' by appending '.ttf' to the filename and searching along a library-defined font path."), array('name' => "text", 'type' => String, 'desc' => "The string to be measured.")), 'taint_observer' => false));
DefineFunction(array('name' => "imagettftext", 'desc' => "Writes the given text into the image using TrueType fonts.", 'flags' => HasDocComment, 'return' => array('type' => Variant, 'desc' => "Returns an array with 8 elements representing four points making the bounding box of the text. The order of the points is lower left, lower right, upper right, upper left. The points are relative to the text regardless of the angle, so \"upper left\" means in the top left-hand corner when you see the text horizontally. Returns FALSE on error."), 'args' => array(array('name' => "image", 'type' => Resource, 'desc' => "An image resource, returned by one of the image creation functions, such as imagecreatetruecolor()."), array('name' => "size", 'type' => Double, 'desc' => "The font size. Depending on your version of GD, this should be specified as the pixel size (GD1) or point size (GD2)."), array('name' => "angle", 'type' => Double, 'desc' => "The angle in degrees, with 0 degrees being left-to-right reading text. Higher values represent a counter-clockwise rotation. For example, a value of 90 would result in bottom-to-top reading text."), array('name' => "x", 'type' => Int32, 'desc' => "The coordinates given by x and y will define the basepoint of the first character (roughly the lower-left corner of the character). This is different from the imagestring(), where x and y define the upper-left corner of the first character. For example, \"top left\" is 0, 0."), array('name' => "y", 'type' => Int32, 'desc' => "The y-ordinate. This sets the position of the fonts baseline, not the very bottom of the character."), array('name' => "color", 'type' => Int32, 'desc' => "The color index. Using the negative of a color index has the effect of turning off antialiasing. See imagecolorallocate()."), array('name' => "fontfile", 'type' => String, 'desc' => "The path to the TrueType font you wish to use.\n\nDepending on which version of the GD library PHP is using, when fontfile does not begin with a leading / then .ttf will be appended to the filename and the library will attempt to search for that filename along a library-defined font path.\n\nWhen using versions of the GD library lower than 2.0.18, a space character, rather than a semicolon, was used as the 'path separator' for different font files. Unintentional use of this feature will result in the warning message: Warning: Could not find/open font. For these affected versions, the only solution is moving the font to a path which does not contain spaces.\n\nIn many cases where a font resides in the same directory as the script using it the following trick will alleviate any include problems."), array('name' => "text", 'type' => String, 'desc' => "The text string in UTF-8 encoding.\n\nMay include decimal numeric character references (of the form: &#8364;) to access characters in a font beyond position 127. The hexadecimal format (like &#xA9;) is supported. Strings in UTF-8 encoding can be passed directly.\n\nNamed entities, such as &copy;, are not supported. Consider using html_entity_decode() to decode these named entities into UTF-8 strings (html_entity_decode() supports this as of PHP 5.0.0).\n\nIf a character is used in the string which is not supported by the font, a hollow rectangle will replace the character.")), 'taint_observer' => false));
DefineFunction(array('name' => "imagetypes", 'desc' => "Returns the image types supported by the current PHP installation.", 'flags' => HasDocComment, 'return' => array('type' => Int32, 'desc' => "Returns a bit-field corresponding to the image formats supported by the version of GD linked into PHP. The following bits are returned, IMG_GIF | IMG_JPG | IMG_PNG | IMG_WBMP | IMG_XPM."), 'taint_observer' => false));
DefineFunction(array('name' => "imagewbmp", 'desc' => "imagewbmp() outputs or save a WBMP version of the given image.", 'flags' => HasDocComment, 'return' => array('type' => Boolean, 'desc' => "Returns TRUE on success or FALSE on failure."), 'args' => array(array('name' => "image", 'type' => Resource, 'desc' => "An image resource, returned by one of the image creation functions, such as imagecreatetruecolor()."), array('name' => "filename", 'type' => String, 'value' => "null_string", 'desc' => "The path to save the file to. If not set or NULL, the raw image stream will be outputted directly."), array('name' => "foreground", 'type' => Int32, 'value' => "-1", 'desc' => "You can set the foreground color with this parameter by setting an identifier obtained from imagecolorallocate(). The default foreground color is black.")), 'taint_observer' => false));
DefineFunction(array('name' => "imagexbm", 'desc' => "Outputs or save an XBM version of the given image.", 'flags' => HasDocComment, 'return' => array('type' => Boolean, 'desc' => "Returns TRUE on success or FALSE on failure."), 'args' => array(array('name' => "image", 'type' => Resource, 'desc' => "An image resource, returned by one of the image creation functions, such as imagecreatetruecolor()."), array('name' => "filename", 'type' => String, 'value' => "null_string", 'desc' => "The path to save the file to. If not set or NULL, the raw image stream will be outputted directly."), array('name' => "foreground", 'type' => Int32, 'value' => "-1", 'desc' => "You can set the foreground color with this parameter by setting an identifier obtained from imagecolorallocate(). The default foreground color is black.")), 'taint_observer' => false));
DefineFunction(array('name' => "iptcembed", 'desc' => "Embeds binary IPTC data into a JPEG image.", 'flags' => HasDocComment, 'return' => array('type' => Variant, 'desc' => "If success and spool flag is lower than 2 then the JPEG will not be returned as a string, FALSE on errors."), 'args' => array(array('name' => "iptcdata", 'type' => String, 'desc' => "The data to be written."), array('name' => "jpeg_file_name", 'type' => String, 'desc' => "Path to the JPEG image."), array('name' => "spool", 'type' => Int32, 'value' => "0", 'desc' => "Spool flag. If the spool flag is over 2 then the JPEG will be returned as a string.")), 'taint_observer' => false));
DefineFunction(array('name' => "iptcparse", 'desc' => "Parses an ยป IPTC block into its single tags.", 'flags' => HasDocComment, 'return' => array('type' => Variant, 'desc' => "Returns an array using the tagmarker as an index and the value as the value. It returns FALSE on error or if no IPTC data was found."), 'args' => array(array('name' => "iptcblock", 'type' => String, 'desc' => "A binary IPTC block.")), 'taint_observer' => false));
DefineFunction(array('name' => "jpeg2wbmp", 'desc' => "Converts a JPEG file into a WBMP file.", 'flags' => HasDocComment, 'return' => array('type' => Boolean, 'desc' => "Returns TRUE on success or FALSE on failure."), 'args' => array(array('name' => "jpegname", 'type' => String, 'desc' => "Path to JPEG file."), array('name' => "wbmpname", 'type' => String, 'desc' => "Path to destination WBMP file."), array('name' => "dest_height", 'type' => Int32, 'desc' => "Destination image height."), array('name' => "dest_width", 'type' => Int32, 'desc' => "Destination image width."), array('name' => "threshold", 'type' => Int32, 'desc' => "Threshold value, between 0 and 8 (inclusive).")), 'taint_observer' => false));
DefineFunction(array('name' => "png2wbmp", 'desc' => "Converts a PNG file into a WBMP file.", 'flags' => HasDocComment, 'return' => array('type' => Boolean, 'desc' => "Returns TRUE on success or FALSE on failure."), 'args' => array(array('name' => "pngname", 'type' => String, 'desc' => "Path to PNG file."), array('name' => "wbmpname", 'type' => String, 'desc' => "Path to destination WBMP file."), array('name' => "dest_height", 'type' => Int32, 'desc' => "Destination image height."), array('name' => "dest_width", 'type' => Int32, 'desc' => "Destination image width."), array('name' => "threshold", 'type' => Int32, 'desc' => "Threshold value, between 0 and 8 (inclusive).")), 'taint_observer' => false));
DefineFunction(array('name' => "exif_imagetype", 'desc' => "exif_imagetype() reads the first bytes of an image and checks its signature.\n\nexif_imagetype() can be used to avoid calls to other exif functions with unsupported file types or in conjunction with \$_SERVER['HTTP_ACCEPT'] to check whether or not the viewer is able to see a specific image in the browser.", 'flags' => HasDocComment, 'return' => array('type' => Variant, 'desc' => "When a correct signature is found, the appropriate constant value will be returned otherwise the return value is FALSE. The return value is the same value that getimagesize() returns in index 2 but exif_imagetype() is much faster."), 'args' => array(array('name' => "filename", 'type' => String, 'desc' => "The image being checked.")), 'taint_observer' => false));
DefineFunction(array('name' => "exif_read_data", 'desc' => "exif_read_data() reads the EXIF headers from a JPEG or TIFF image file. This way you can read meta data generated by digital cameras.\n\nEXIF headers tend to be present in JPEG/TIFF images generated by digital cameras, but unfortunately each digital camera maker has a different idea of how to actually tag their images, so you can't always rely on a specific Exif header being present.\n\nHeight and Width are computed the same way getimagesize() does so their values must not be part of any header returned. Also, html is a height/width text string to be used inside normal HTML.\n\nWhen an Exif header contains a Copyright note, this itself can contain two values. As the solution is inconsistent in the Exif 2.10 standard, the COMPUTED section will return both entries Copyright.Photographer and Copyright.Editor while the IFD0 sections contains the byte array with the NULL character that splits both entries. Or just the first entry if the datatype was wrong (normal behaviour of Exif). The COMPUTED will also contain the entry Copyright which is either the original copyright string, or a comma separated list of the photo and editor copyright.\n\nThe tag UserComment has the same problem as the Copyright tag. It can store two values. First the encoding used, and second the value itself. If so the IFD section only contains the encoding or a byte array. The COMPUTED section will store both in the entries UserCommentEncoding and UserComment. The entry UserComment is available in both cases so it should be used in preference to the value in IFD0 section.\n\nexif_read_data() also validates EXIF data tags according to the EXIF specification (ยป http://exif.org/Exif2-2.PDF, page 20).\n\nWindows ME/XP can both wipe the Exif headers when connecting to a camera. More information available at ยป http://www.canon.co.jp/Imaging/NOTICE/011214-e.html.", 'flags' => HasDocComment, 'return' => array('type' => Variant, 'desc' => "It returns an associative array where the array indexes are the header names and the array values are the values associated with those headers. If no data can be returned, exif_read_data() will return FALSE."), 'args' => array(array('name' => "filename", 'type' => String, 'desc' => "The name of the image file being read. This cannot be an URL."), array('name' => "sections", 'type' => String, 'value' => "null_string", 'desc' => "Is a comma separated list of sections that need to be present in file to produce a result array. If none of the requested sections could be found the return value is FALSE. FILE FileName, FileSize, FileDateTime, SectionsFound COMPUTED html, Width, Height, IsColor, and more if available. Height and Width are computed the same way getimagesize() does so their values must not be part of any header returned. Also, html is a height/width text string to be used inside normal HTML. ANY_TAG Any information that has a Tag e.g. IFD0, EXIF, ... IFD0 All tagged data of IFD0. In normal imagefiles this contains image size and so forth. THUMBNAIL A file is supposed to contain a thumbnail if it has a second IFD. All tagged information about the embedded thumbnail is stored in this section. COMMENT Comment headers of JPEG images. EXIF The EXIF section is a sub section of IFD0. It contains more detailed information about an image. Most of these entries are digital camera related."), array('name' => "arrays", 'type' => Boolean, 'value' => "false", 'desc' => "Specifies whether or not each section becomes an array. The sections COMPUTED, THUMBNAIL, and COMMENT always become arrays as they may contain values whose names conflict with other sections."), array('name' => "thumbnail", 'type' => Boolean, 'value' => "false", 'desc' => "When set to TRUE the thumbnail itself is read. Otherwise, only the tagged data is read.")), 'taint_observer' => false));
DefineFunction(array('name' => "read_exif_data", 'flags' => HasDocComment, 'return' => array('type' => Variant), 'args' => array(array('name' => "filename", 'type' => String), array('name' => "sections", 'type' => String, 'value' => "null_string"), array('name' => "arrays", 'type' => Boolean, 'value' => "false"), array('name' => "thumbnail", 'type' => Boolean, 'value' => "false")), 'taint_observer' => false));
DefineFunction(array('name' => "exif_tagname", 'flags' => HasDocComment, 'return' => array('type' => Variant, 'desc' => "Returns the header name, or FALSE if index is undefined."), 'args' => array(array('name' => "index", 'type' => Int32, 'desc' => "The image index")), 'taint_observer' => false));
DefineFunction(array('name' => "exif_thumbnail", 'desc' => "exif_thumbnail() reads the embedded thumbnail of a TIFF or JPEG image.\n\nIf you want to deliver thumbnails through this function, you should send the mimetype information using the header() function.\n\nIt is possible that exif_thumbnail() cannot create an image but can determine its size. In this case, the return value is FALSE but width and height are set.", 'flags' => HasDocComment, 'return' => array('type' => Variant, 'desc' => "Returns the embedded thumbnail, or FALSE if the image contains no thumbnail."), 'args' => array(array('name' => "filename", 'type' => String, 'desc' => "The name of the image file being read. This image contains an embedded thumbnail."), array('name' => "width", 'type' => Variant | Reference, 'value' => "null", 'desc' => "The return width of the returned thumbnail."), array('name' => "height", 'type' => Variant | Reference, 'value' => "null", 'desc' => "The returned height of the returned thumbnail."), array('name' => "imagetype", 'type' => Variant | Reference, 'value' => "null", 'desc' => "The returned image type of the returned thumbnail. This is either TIFF or JPEG.")), 'taint_observer' => false));
///////////////////////////////////////////////////////////////////////////////
// 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
// )
//
Example #15
0
DefineFunction(array('name' => "__get", 'flags' => HasDocComment, 'return' => array('type' => Variant), 'args' => array(array('name' => "name", 'type' => Variant))));
DefineFunction(array('name' => "__set", 'flags' => HasDocComment, 'return' => array('type' => Variant), 'args' => array(array('name' => "name", 'type' => Variant), array('name' => "value", 'type' => Variant))));
DefineFunction(array('name' => "__isset", 'flags' => HasDocComment, 'return' => array('type' => Boolean), 'args' => array(array('name' => "name", 'type' => Variant))));
DefineFunction(array('name' => "__unset", 'flags' => HasDocComment, 'return' => array('type' => Variant), 'args' => array(array('name' => "name", 'type' => Variant))));
DefineFunction(array('name' => "__destruct", 'flags' => HasDocComment, 'return' => array('type' => Variant)));
EndClass();
///////////////////////////////////////////////////////////////////////////////
BeginClass(array('name' => "LibXMLError", 'desc' => "Contains various information about errors thrown by libxml. The error codes are described within the official ยป xmlError API documentation.", 'flags' => HasDocComment));
DefineFunction(array('name' => "__construct", 'flags' => HasDocComment, 'return' => array('type' => null)));
DefineFunction(array('name' => "__destruct", 'flags' => HasDocComment, 'return' => array('type' => Variant)));
EndClass();
///////////////////////////////////////////////////////////////////////////////
BeginClass(array('name' => "SimpleXMLElementIterator", 'ifaces' => array('Iterator'), 'bases' => array('Sweepable'), 'desc' => "", 'flags' => HasDocComment, 'footer' => <<<EOT

public:
  void reset_iterator(c_SimpleXMLElement *parent);

  c_SimpleXMLElement *m_parent;
  ArrayIter *m_iter1;
  ArrayIter *m_iter2;
  Object     m_temp;
EOT
));
DefineFunction(array('name' => "__construct", 'flags' => HasDocComment, 'return' => array('type' => null)));
DefineFunction(array('name' => "current", 'flags' => HasDocComment, 'return' => array('type' => Variant)));
DefineFunction(array('name' => "key", 'flags' => HasDocComment, 'return' => array('type' => Variant)));
DefineFunction(array('name' => "next", 'flags' => HasDocComment, 'return' => array('type' => Variant)));
DefineFunction(array('name' => "rewind", 'flags' => HasDocComment, 'return' => array('type' => Variant)));
DefineFunction(array('name' => "valid", 'flags' => HasDocComment, 'return' => array('type' => Variant)));
DefineFunction(array('name' => "__destruct", 'flags' => HasDocComment, 'return' => array('type' => Variant)));
EndClass();
Example #16
0
DefineFunction(array('name' => "php_uname", 'desc' => "php_uname() returns a description of the operating system PHP is running on. This is the same string you see at the very top of the phpinfo() output. For the name of just the operating system, consider using the PHP_OS constant, but keep in mind this constant will contain the operating system PHP was built on.\n\nOn some older UNIX platforms, it may not be able to determine the current OS information in which case it will revert to displaying the OS PHP was built on. This will only happen if your uname() library call either doesn't exist or doesn't work.", 'flags' => HasDocComment, 'return' => array('type' => String, 'desc' => "Returns the description, as a string."), 'args' => array(array('name' => "mode", 'type' => String, 'value' => "null_string", 'desc' => "mode is a single character that defines what information is returned: 'a': This is the default. Contains all modes in the sequence \"s n r v m\". 's': Operating system name. eg. FreeBSD. 'n': Host name. eg. localhost.example.com. 'r': Release name. eg. 5.1.2-RELEASE. 'v': Version information. Varies a lot between operating systems. 'm': Machine type. eg. i386.")), 'taint_observer' => false));
DefineFunction(array('name' => "phpcredits", 'desc' => "This function prints out the credits listing the PHP developers, modules, etc. It generates the appropriate HTML codes to insert the information in a page.", 'flags' => HasDocComment, 'return' => array('type' => Boolean, 'desc' => "Returns TRUE on success or FALSE on failure."), 'args' => array(array('name' => "flag", 'type' => Int32, 'value' => "0", 'desc' => "To generate a custom credits page, you may want to use the flag parameter.\n\nPre-defined phpcredits() flags name description CREDITS_ALL All the credits, equivalent to using: CREDITS_DOCS + CREDITS_GENERAL + CREDITS_GROUP + CREDITS_MODULES + CREDITS_FULLPAGE. It generates a complete stand-alone HTML page with the appropriate tags. CREDITS_DOCS The credits for the documentation team CREDITS_FULLPAGE Usually used in combination with the other flags. Indicates that a complete stand-alone HTML page needs to be printed including the information indicated by the other flags. CREDITS_GENERAL General credits: Language design and concept, PHP authors and SAPI module. CREDITS_GROUP A list of the core developers CREDITS_MODULES A list of the extension modules for PHP, and their authors CREDITS_SAPI A list of the server API modules for PHP, and their authors")), 'taint_observer' => false));
DefineFunction(array('name' => "phpinfo", 'desc' => "Outputs a large amount of information about the current state of PHP. This includes information about PHP compilation options and extensions, the PHP version, server information and environment (if compiled as a module), the PHP environment, OS version information, paths, master and local values of configuration options, HTTP headers, and the PHP License.\n\nBecause every system is setup differently, phpinfo() is commonly used to check configuration settings and for available predefined variables on a given system.\n\nphpinfo() is also a valuable debugging tool as it contains all EGPCS (Environment, GET, POST, Cookie, Server) data.", 'flags' => HasDocComment, 'return' => array('type' => Boolean, 'desc' => "Returns TRUE on success or FALSE on failure."), 'args' => array(array('name' => "what", 'type' => Int32, 'value' => "0", 'desc' => "The output may be customized by passing one or more of the following constants bitwise values summed together in the optional what parameter. One can also combine the respective constants or bitwise values together with the or operator.\n\nphpinfo() options Name (constant) Value Description INFO_GENERAL 1 The configuration line, php.ini location, build date, Web Server, System and more. INFO_CREDITS 2 PHP Credits. See also phpcredits(). INFO_CONFIGURATION 4 Current Local and Master values for PHP directives. See also ini_get(). INFO_MODULES 8 Loaded modules and their respective settings. See also get_loaded_extensions(). INFO_ENVIRONMENT 16 Environment Variable information that's also available in \$_ENV. INFO_VARIABLES 32 Shows all predefined variables from EGPCS (Environment, GET, POST, Cookie, Server). INFO_LICENSE 64 PHP License information. See also the ยป license FAQ. INFO_ALL -1 Shows all of the above.")), 'taint_observer' => false));
DefineFunction(array('name' => "phpversion", 'desc' => "Returns a string containing the version of the currently running PHP parser or extension.", 'flags' => HasDocComment, 'return' => array('type' => String, 'desc' => "If the optional extension parameter is specified, phpversion() returns the version of that extension, or FALSE if there is no version information associated or the extension isn't enabled."), 'args' => array(array('name' => "extension", 'type' => String, 'value' => "null_string", 'desc' => "An optional extension name.")), 'taint_observer' => false));
DefineFunction(array('name' => "putenv", 'desc' => "Adds setting to the server environment. The environment variable will only exist for the duration of the current request. At the end of the request the environment is restored to its original state.\n\nSetting certain environment variables may be a potential security breach. The safe_mode_allowed_env_vars directive contains a comma-delimited list of prefixes. In Safe Mode, the user may only alter environment variables whose names begin with the prefixes supplied by this directive. By default, users will only be able to set environment variables that begin with PHP_ (e.g. PHP_FOO=BAR). Note: if this directive is empty, PHP will let the user modify ANY environment variable!\n\nThe safe_mode_protected_env_vars directive contains a comma-delimited list of environment variables, that the end user won't be able to change using putenv(). These variables will be protected even if safe_mode_allowed_env_vars is set to allow to change them.", 'flags' => HasDocComment, 'return' => array('type' => Boolean, 'desc' => "Returns TRUE on success or FALSE on failure."), 'args' => array(array('name' => "setting", 'type' => String, 'desc' => "The setting, like \"FOO=BAR\"")), 'taint_observer' => false));
DefineFunction(array('name' => "set_magic_quotes_runtime", 'desc' => "Set the current active configuration setting of magic_quotes_runtime. WarningThis function has been DEPRECATED as of PHP 5.3.0. Relying on this feature is highly discouraged.", 'flags' => HasDocComment, 'return' => array('type' => Boolean, 'desc' => "Returns TRUE on success or FALSE on failure."), 'args' => array(array('name' => "new_setting", 'type' => Boolean, 'desc' => "FALSE for off, TRUE for on.")), 'taint_observer' => false));
DefineFunction(array('name' => "set_time_limit", 'desc' => "Set the number of seconds a script is allowed to run. If this is reached, the script returns a fatal error. The default limit is 30 seconds or, if it exists, the max_execution_time value defined in the php.ini.\n\nWhen called, set_time_limit() restarts the timeout counter from zero. In other words, if the timeout is the default 30 seconds, and 25 seconds into script execution a call such as set_time_limit(20) is made, the script will run for a total of 45 seconds before timing out.", 'flags' => HasDocComment, 'return' => array('type' => null, 'desc' => "No value is returned."), 'args' => array(array('name' => "seconds", 'type' => Int32, 'desc' => "The maximum execution time, in seconds. If set to zero, no time limit is imposed.")), 'taint_observer' => false));
DefineFunction(array('name' => "sys_get_temp_dir", 'desc' => "Returns the path of the directory PHP stores temporary files in by default.", 'flags' => HasDocComment, 'return' => array('type' => String, 'desc' => "Returns the path of the temporary directory."), 'taint_observer' => false));
DefineFunction(array('name' => "version_compare", 'desc' => "version_compare() compares two \"PHP-standardized\" version number strings. This is useful if you would like to write programs working only on some versions of PHP.\n\nThe function first replaces _, - and + with a dot . in the version strings and also inserts dots . before and after any non number so that for example '4.3.2RC1' becomes '4.3.2.RC.1'. Then it splits the results like if you were using explode('.', \$ver). Then it compares the parts starting from left to right. If a part contains special version strings these are handled in the following order: any string not found in this list < dev < alpha = a < beta = b < RC = rc < # < pl = p. This way not only versions with different levels like '4.1' and '4.1.2' can be compared but also any PHP specific version containing development state.", 'flags' => HasDocComment, 'return' => array('type' => Variant, 'desc' => "By default, version_compare() returns -1 if the first version is lower than the second, 0 if they are equal, and 1 if the second is lower.\n\nWhen using the optional operator argument, the function will return TRUE if the relationship is the one specified by the operator, FALSE otherwise."), 'args' => array(array('name' => "version1", 'type' => String, 'desc' => "First version number."), array('name' => "version2", 'type' => String, 'desc' => "Second version number."), array('name' => "sop", 'type' => String, 'value' => "null_string", 'desc' => "If you specify the third optional operator argument, you can test for a particular relationship. The possible operators are: <, lt, <=, le, >, gt, >=, ge, ==, =, eq, !=, <>, ne respectively.\n\nThis parameter is case-sensitive, so values should be lowercase.")), 'taint_observer' => false));
DefineFunction(array('name' => "gc_enabled", 'desc' => "Returns status of the circular reference collector.", 'flags' => HasDocComment, 'return' => array('type' => Boolean, 'desc' => "Returns TRUE if the garbage collector is enabled, " . "FALSE otherwise."), 'taint_observer' => false));
DefineFunction(array('name' => "gc_enable", 'desc' => "Activates the circular reference collector.", 'flags' => HasDocComment, 'return' => null, 'taint_observer' => false));
DefineFunction(array('name' => "gc_disable", 'desc' => "Deactivates the circular reference collector.", 'flags' => HasDocComment, 'return' => null, 'taint_observer' => false));
DefineFunction(array('name' => "gc_collect_cycles", 'desc' => "Forces collection of any existing garbage cycles.", 'flags' => HasDocComment, 'return' => array('type' => Int64, 'desc' => "Returns number of collected cycles."), 'taint_observer' => false));
DefineFunction(array('name' => "zend_logo_guid", 'desc' => "This function returns the ID which can be used to display the Zend logo using the built-in image.", 'flags' => HasDocComment, 'return' => array('type' => String, 'desc' => "Returns PHPE9568F35-D428-11d2-A769-00AA001ACF42."), 'taint_observer' => false));
DefineFunction(array('name' => "zend_thread_id", 'desc' => "This function returns a unique identifier for the current thread.", 'flags' => HasDocComment, 'return' => array('type' => Int64, 'desc' => "Returns the thread id as an integer."), 'taint_observer' => false));
DefineFunction(array('name' => "zend_version", 'desc' => "Returns a string containing the version of the currently running Zend Engine.", 'flags' => HasDocComment, 'return' => array('type' => String, 'desc' => "Returns the Zend Engine version number, as a string."), 'taint_observer' => false));
///////////////////////////////////////////////////////////////////////////////
// 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
// )
//
Example #17
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' => "mhash", 'desc' => "mhash() applies a hash function specified by hash to the data.", 'return' => array('type' => Variant, 'desc' => "Returns the resulting hash (also called digest) or HMAC as a string, or FALSE on errors. OpenSSL mhash_keygen_s2k Last updated: Fri, 06 Aug 2010 ย "), 'args' => array(array('name' => "hash", 'type' => Int64, 'desc' => "The hash id. One of the MHASH_XXX constants."), array('name' => "data", 'type' => String, 'desc' => "The user input, as a string."), array('name' => "key", 'type' => String, 'value' => "null_string", 'desc' => "If specified, the function will return the resulting HMAC instead. HMAC is keyed hashing for message authentication, or simply a message digest that depends on the specified key. Not all algorithms supported in mhash can be used in HMAC mode."))));
DefineFunction(array('name' => "mhash_get_hash_name", 'desc' => "Gets the name of the specified hash.", 'return' => array('type' => Variant, 'desc' => "Returns the name of the hash or FALSE, if the hash does not exist."), 'args' => array(array('name' => "hash", 'type' => Int64, 'desc' => "The hash id. One of the MHASH_XXX constants."))));
DefineFunction(array('name' => "mhash_count", 'desc' => "Gets the highest available hash id.", 'return' => array('type' => Int64, 'desc' => "Returns the highest available hash id. Hashes are numbered from 0 to this hash id.")));
DefineFunction(array('name' => "mhash_get_block_size", 'desc' => "Gets the size of a block of the specified hash.", 'return' => array('type' => Variant, 'desc' => "Returns the size in bytes or FALSE, if the hash does not exist."), 'args' => array(array('name' => "hash", 'type' => Int64, 'desc' => "The hash id. One of the MHASH_XXX constants."))));
DefineFunction(array('name' => "mhash_keygen_s2k", 'desc' => "Generates a key according to the hash given a user provided password.\nThis is the Salted S2K algorithm as specified in the OpenPGP document (ยป RFC 2440).\nKeep in mind that user supplied passwords are not really suitable to be used as keys in cryptographic algorithms, since users normally choose keys they can write on keyboard. These passwords use only 6 to 7 bits per character (or less). It is highly recommended to use some kind of transformation (like this function) to the user supplied key.", 'return' => array('type' => Variant, 'desc' => "Returns the generated key as a string, or FALSE on error."), 'args' => array(array('name' => "hash", 'type' => Int64, 'desc' => "The hash id used to create the key. One of the MHASH_XXX constants."), array('name' => "password", 'type' => String, 'desc' => "User supplied password."), array('name' => "salt", 'type' => String, 'desc' => "Must be different and random enough for every key you generate in order to create different keys. That salt must be known when you check the keys, thus it is a good idea to append the key to it. Salt has a fixed length of 8 bytes and will be padded with zeros if you supply less bytes."), array('name' => "bytes", 'type' => Int64, 'desc' => "The key length, in bytes."))));
///////////////////////////////////////////////////////////////////////////////
// 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
// )
//
Example #18
0
// )
DefineFunction(array('name' => "get_declared_classes", 'desc' => "Gets the declared classes.", 'flags' => HasDocComment, 'return' => array('type' => VariantMap, 'desc' => "Returns an array of the names of the declared classes in the current script.\n\nNote that depending on what extensions you have compiled or loaded into PHP, additional classes could be present. This means that you will not be able to define your own classes using these names. There is a list of predefined classes in the Predefined Classes section of the appendices.")));
DefineFunction(array('name' => "get_declared_interfaces", 'desc' => "Gets the declared interfaces.", 'flags' => HasDocComment, 'return' => array('type' => VariantMap, 'desc' => "Returns an array of the names of the declared interfaces in the current script.")));
DefineFunction(array('name' => "class_exists", 'desc' => "This function checks whether or not the given class has been defined.", 'flags' => HasDocComment, 'return' => array('type' => Boolean, 'desc' => "Returns TRUE if class_name is a defined class, FALSE otherwise."), 'args' => array(array('name' => "class_name", 'type' => String, 'desc' => "The class name. The name is matched in a case-insensitive manner."), array('name' => "autoload", 'type' => Boolean, 'value' => "true", 'desc' => "Whether or not to call __autoload by default."))));
DefineFunction(array('name' => "interface_exists", 'desc' => "Checks if the given interface has been defined.", 'flags' => HasDocComment, 'return' => array('type' => Boolean, 'desc' => "Returns TRUE if the interface given by interface_name has been defined, FALSE otherwise."), 'args' => array(array('name' => "interface_name", 'type' => String, 'desc' => "The interface name"), array('name' => "autoload", 'type' => Boolean, 'value' => "true", 'desc' => "Whether to call __autoload or not by default."))));
DefineFunction(array('name' => "get_class_methods", 'desc' => "Gets the class methods names.", 'flags' => HasDocComment, 'return' => array('type' => VariantMap, 'desc' => "Returns an array of method names defined for the class specified by class_name. In case of an error, it returns NULL."), 'args' => array(array('name' => "class_or_object", 'type' => Variant, 'desc' => "The class name or an object instance"))));
DefineFunction(array('name' => "get_class_vars", 'desc' => "Get the default properties of the given class.", 'flags' => HasDocComment, 'return' => array('type' => VariantMap, 'desc' => "Returns an associative array of declared properties visible from the current scope, with their default value. The resulting array elements are in the form of varname => value."), 'args' => array(array('name' => "class_name", 'type' => String, 'desc' => "The class name"))));
DefineFunction(array('name' => "get_class", 'desc' => "Gets the name of the class of the given object.", 'flags' => HasDocComment, 'return' => array('type' => Variant, 'desc' => "Returns the name of the class of which object is an instance. Returns FALSE if object is not an object."), 'args' => array(array('name' => "object", 'type' => Variant, 'value' => "null_variant", 'desc' => "The tested object"))));
DefineFunction(array('name' => "get_parent_class", 'desc' => "Retrieves the parent class name for object or class.", 'flags' => HasDocComment, 'return' => array('type' => Variant, 'desc' => "Returns the name of the parent class of the class of which object is an instance or the name.\n\nIf the object does not have a parent FALSE will be returned.\n\nIf called without parameter outside object, this function returns FALSE."), 'args' => array(array('name' => "object", 'type' => Variant, 'value' => "null_variant", 'desc' => "The tested object or class name"))));
DefineFunction(array('name' => "is_a", 'desc' => "Checks if the given object is of this class or has this class as one of its parents.", 'flags' => HasDocComment, 'return' => array('type' => Boolean, 'desc' => "Returns TRUE if the object is of this class or has this class as one of its parents, FALSE otherwise."), 'args' => array(array('name' => "object", 'type' => Object, 'desc' => "The tested object"), array('name' => "class_name", 'type' => String, 'desc' => "The class name"))));
DefineFunction(array('name' => "is_subclass_of", 'desc' => "Checks if the given object has the class class_name as one of its parents.", 'flags' => HasDocComment, 'return' => array('type' => Boolean, 'desc' => "This function returns TRUE if the object object, belongs to a class which is a subclass of class_name, FALSE otherwise."), 'args' => array(array('name' => "class_or_object", 'type' => Variant, 'desc' => "A class name or an object instance"), array('name' => "class_name", 'type' => String, 'desc' => "The class name"))));
DefineFunction(array('name' => "method_exists", 'desc' => "Checks if the class method exists in the given object.", 'flags' => HasDocComment, 'return' => array('type' => Boolean, 'desc' => "Returns TRUE if the method given by method_name has been defined for the given object, FALSE otherwise."), 'args' => array(array('name' => "class_or_object", 'type' => Variant, 'desc' => "An object instance or a class name"), array('name' => "method_name", 'type' => String, 'desc' => "The method name"))));
DefineFunction(array('name' => "property_exists", 'desc' => "This function checks if the given property exists in the specified class.\n\nAs opposed with isset(), property_exists() returns TRUE even if the property has the value NULL.", 'flags' => HasDocComment, 'return' => array('type' => Boolean, 'desc' => "Returns TRUE if the property exists, FALSE if it doesn't exist or NULL in case of an error."), 'args' => array(array('name' => "class_or_object", 'type' => Variant, 'desc' => "The class name or an object of the class to test for"), array('name' => "property", 'type' => String, 'desc' => "The name of the property"))));
DefineFunction(array('name' => "get_object_vars", 'desc' => "Gets the accessible non-static properties of the given object according to scope.", 'flags' => HasDocComment, 'return' => array('type' => Variant, 'desc' => "Returns an associative array of defined object accessible non-static properties for the specified object in scope. If a property have not been assigned a value, it will be returned with a NULL value."), 'args' => array(array('name' => "object", 'type' => Variant, 'desc' => "An object instance."))));
DefineFunction(array('name' => "call_user_method_array", 'flags' => HasDocComment, 'return' => array('type' => Variant), 'args' => array(array('name' => "method_name", 'type' => String, 'desc' => "The method name being called."), array('name' => "obj", 'type' => Variant | Reference, 'desc' => "The object that method_name is being called on."), array('name' => "paramarr", 'type' => VariantVec, 'desc' => "An array of parameters."))));
DefineFunction(array('name' => "call_user_method", 'flags' => HasDocComment | VariableArguments, 'return' => array('type' => Variant), 'args' => array(array('name' => "method_name", 'type' => String, 'desc' => "The method name being called."), array('name' => "obj", 'type' => Variant | Reference, 'desc' => "The object that method_name is being called on."))));
///////////////////////////////////////////////////////////////////////////////
// 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
// )
//
Example #19
0
DefineFunction(array('name' => "hphp_splfileobject_fseek", 'flags' => HasDocComment | HipHopSpecific, 'return' => array('type' => Int64), 'args' => array(array('name' => "obj", 'type' => Resource), array('name' => "offset", 'type' => Int64), array('name' => "whence", 'type' => Int64))));
DefineFunction(array('name' => "hphp_splfileobject_fstat", 'flags' => HasDocComment | HipHopSpecific, 'return' => array('type' => Variant), 'args' => array(array('name' => "obj", 'type' => Resource))));
DefineFunction(array('name' => "hphp_splfileobject_ftell", 'flags' => HasDocComment | HipHopSpecific, 'return' => array('type' => Int64), 'args' => array(array('name' => "obj", 'type' => Resource))));
DefineFunction(array('name' => "hphp_splfileobject_ftruncate", 'flags' => HasDocComment | HipHopSpecific, 'return' => array('type' => Boolean), 'args' => array(array('name' => "obj", 'type' => Resource), array('name' => "size", 'type' => Int64))));
DefineFunction(array('name' => "hphp_splfileobject_fwrite", 'flags' => HasDocComment | HipHopSpecific, 'return' => array('type' => Int64), 'args' => array(array('name' => "obj", 'type' => Resource), array('name' => "str", 'type' => String), array('name' => "length", 'type' => Int64))));
DefineFunction(array('name' => "hphp_splfileobject_getcvscontrol", 'flags' => HasDocComment | HipHopSpecific, 'return' => array('type' => Variant), 'args' => array(array('name' => "obj", 'type' => Resource))));
DefineFunction(array('name' => "hphp_splfileobject_getflags", 'flags' => HasDocComment | HipHopSpecific, 'return' => array('type' => Int64), 'args' => array(array('name' => "obj", 'type' => Resource))));
DefineFunction(array('name' => "hphp_splfileobject_getmaxlinelen", 'flags' => HasDocComment | HipHopSpecific, 'return' => array('type' => Int64), 'args' => array(array('name' => "obj", 'type' => Resource))));
DefineFunction(array('name' => "hphp_splfileobject_key", 'flags' => HasDocComment | HipHopSpecific, 'return' => array('type' => Int64), 'args' => array(array('name' => "obj", 'type' => Resource))));
DefineFunction(array('name' => "hphp_splfileobject_next", 'flags' => HasDocComment | HipHopSpecific, 'return' => array('type' => null), 'args' => array(array('name' => "obj", 'type' => Resource))));
DefineFunction(array('name' => "hphp_splfileobject_rewind", 'flags' => HasDocComment | HipHopSpecific, 'return' => array('type' => null), 'args' => array(array('name' => "obj", 'type' => Resource))));
DefineFunction(array('name' => "hphp_splfileobject_valid", 'flags' => HasDocComment | HipHopSpecific, 'return' => array('type' => Boolean), 'args' => array(array('name' => "obj", 'type' => Resource))));
DefineFunction(array('name' => "hphp_splfileobject_seek", 'flags' => HasDocComment | HipHopSpecific, 'return' => array('type' => null), 'args' => array(array('name' => "obj", 'type' => Resource), array('name' => "line_pos", 'type' => Int64))));
DefineFunction(array('name' => "hphp_splfileobject_setcsvcontrol", 'flags' => HasDocComment | HipHopSpecific, 'return' => array('type' => null), 'args' => array(array('name' => "obj", 'type' => Resource), array('name' => "delimiter", 'type' => String), array('name' => "enclosure", 'type' => String), array('name' => "escape", 'type' => String))));
DefineFunction(array('name' => "hphp_splfileobject_setflags", 'flags' => HasDocComment | HipHopSpecific, 'return' => array('type' => null), 'args' => array(array('name' => "obj", 'type' => Resource), array('name' => "flags", 'type' => Int64))));
DefineFunction(array('name' => "hphp_splfileobject_setmaxlinelen", 'flags' => HasDocComment | HipHopSpecific, 'return' => array('type' => null), 'args' => array(array('name' => "obj", 'type' => Resource), array('name' => "max_len", '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
// )
//
Example #20
0
DefineFunction(array('name' => "apc_delete", 'desc' => "Removes a stored variable from the cache.", 'flags' => HasDocComment, 'return' => array('type' => Variant, 'desc' => "Returns TRUE on success or FALSE on failure."), 'args' => array(array('name' => "key", 'type' => Variant, 'desc' => "The key used to store the value (with apc_store())."), array('name' => "cache_id", 'type' => Int64, 'value' => "0"))));
DefineFunction(array('name' => "apc_compile_file", 'desc' => "Stores a file in the bytecode cache, bypassing all filters.", 'flags' => HasDocComment, 'return' => array('type' => Boolean, 'desc' => "Returns TRUE on success or FALSE on failure."), 'args' => array(array('name' => "filename", 'type' => String, 'desc' => "Full or relative path to a PHP file that will be compiled and stored in the bytecode cache."), array('name' => "atomic", 'type' => Boolean, 'value' => "true"), array('name' => "cache_id", 'type' => Int64, 'value' => "0"))));
DefineFunction(array('name' => "apc_cache_info", 'desc' => "Retrieves cached information and meta-data from APC's data store.", 'flags' => HasDocComment, 'return' => array('type' => Variant, 'desc' => "Array of cached data (and meta-data) or FALSE on failure apc_cache_info() will raise a warning if it is unable to retrieve APC cache data. This typically occurs when APC is not enabled."), 'args' => array(array('name' => "cache_id", 'type' => Int64, 'value' => "0", 'desc' => "If cache_type is \"user\", information about the user cache will be returned.\n\nIf cache_type is \"filehits\", information about which files have been served from the bytecode cache for the current request will be returned. This feature must be enabled at compile time using --enable-filehits .\n\nIf an invalid or no cache_type is specified, information about the system cache (cached files) will be returned."), array('name' => "limited", 'type' => Boolean, 'value' => "false", 'desc' => "If limited is TRUE, the return value will exclude the individual list of cache entries. This is useful when trying to optimize calls for statistics gathering."))));
DefineFunction(array('name' => "apc_clear_cache", 'desc' => "Clears the user/system cache.", 'flags' => HasDocComment, 'return' => array('type' => Boolean, 'desc' => "Returns TRUE on success or FALSE on failure."), 'args' => array(array('name' => "cache_id", 'type' => Int64, 'value' => "0", 'desc' => "If cache_type is \"user\", the user cache will be cleared; otherwise, the system cache (cached files) will be cleared."))));
DefineFunction(array('name' => "apc_define_constants", 'desc' => "define() is notoriously slow. Since the main benefit of APC is to increase the performance of scripts/applications, this mechanism is provided to streamline the process of mass constant definition. However, this function does not perform as well as anticipated.\n\nFor a better-performing solution, try the ยป hidef extension from PECL. To remove a set of stored constants (without clearing the entire cache), an empty array may be passed as the constants parameter, effectively clearing the stored value(s).", '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 serves as the name of the constant set being stored. This key is used to retrieve the stored constants in apc_load_constants()."), array('name' => "constants", 'type' => String, 'desc' => "An associative array of constant_name => value pairs. The constant_name must follow the normal constant naming rules. value must evaluate to a scalar value."), array('name' => "case_sensitive", 'type' => Boolean, 'value' => "true", 'desc' => "The default behaviour for constants is to be declared case-sensitive; i.e. CONSTANT and Constant represent different values. If this parameter evaluates to FALSE the constants will be declared as case-insensitive symbols."), array('name' => "cache_id", 'type' => Int64, 'value' => "0"))));
DefineFunction(array('name' => "apc_load_constants", 'desc' => "Loads a set of constants from the cache.", 'flags' => HasDocComment, 'return' => array('type' => Boolean, 'desc' => "Returns TRUE on success or FALSE on failure."), 'args' => array(array('name' => "key", 'type' => String, 'desc' => "The name of the constant set (that was stored with apc_define_constants()) to be retrieved."), array('name' => "case_sensitive", 'type' => Boolean, 'value' => "true", 'desc' => "The default behaviour for constants is to be declared case-sensitive; i.e. CONSTANT and Constant represent different values. If this parameter evaluates to FALSE the constants will be declared as case-insensitive symbols."), array('name' => "cache_id", 'type' => Int64, 'value' => "0"))));
DefineFunction(array('name' => "apc_sma_info", 'desc' => "Retrieves APC's Shared Memory Allocation information.", 'flags' => HasDocComment, 'return' => array('type' => VariantMap, 'desc' => "Array of Shared Memory Allocation data; FALSE on failure."), 'args' => array(array('name' => "limited", 'type' => Boolean, 'value' => "false", 'desc' => "When set to FALSE (default) apc_sma_info() will return a detailed information about each segment."))));
DefineFunction(array('name' => "apc_filehits", 'flags' => HasDocComment, 'return' => array('type' => StringVec)));
DefineFunction(array('name' => "apc_delete_file", 'desc' => "Deletes the given files from the opcode cache.", 'flags' => HasDocComment, 'return' => array('type' => Variant, 'desc' => "Returns TRUE on success or FALSE on failure. Or if keys is an array, then an empty array is returned on success, or an array of failed files is returned."), 'args' => array(array('name' => "keys", 'type' => Variant, 'desc' => "The files to be deleted. Accepts a string, array of strings, or an APCIterator object."), array('name' => "cache_id", 'type' => Int64, 'value' => "0"))));
DefineFunction(array('name' => "apc_inc", 'desc' => "Increases a stored number.", 'flags' => HasDocComment, 'return' => array('type' => Variant, 'desc' => "Returns the current value of key's value on success, or FALSE on failure"), 'args' => array(array('name' => "key", 'type' => String, 'desc' => "The key of the value being increased."), array('name' => "step", 'type' => Int64, 'value' => "1", 'desc' => "The step, or value to increase."), array('name' => "success", 'type' => Variant | Reference, 'value' => "null", 'desc' => "Optionally pass the success or fail boolean value to this referenced variable."), array('name' => "cache_id", 'type' => Int64, 'value' => "0"))));
DefineFunction(array('name' => "apc_dec", 'desc' => "Decreases a stored integer value.", 'flags' => HasDocComment, 'return' => array('type' => Variant, 'desc' => "Returns the current value of key's value on success, or FALSE on failure"), 'args' => array(array('name' => "key", 'type' => String, 'desc' => "The key of the value being decreased."), array('name' => "step", 'type' => Int64, 'value' => "1", 'desc' => "The step, or value to decrease."), array('name' => "success", 'type' => Variant | Reference, 'value' => "null", 'desc' => "Optionally pass the success or fail boolean value to this referenced variable."), array('name' => "cache_id", 'type' => Int64, 'value' => "0"))));
DefineFunction(array('name' => "apc_cas", 'desc' => "apc_cas WarningThis function is currently not documented; only its argument list is available.", 'flags' => HasDocComment, 'return' => array('type' => Boolean, 'desc' => "Returns TRUE on success or FALSE on failure."), 'args' => array(array('name' => "key", 'type' => String), array('name' => "old_cas", 'type' => Int64), array('name' => "new_cas", 'type' => Int64), array('name' => "cache_id", 'type' => Int64, 'value' => "0"))));
DefineFunction(array('name' => "apc_bin_dump", 'desc' => "Returns a binary dump of the given files and user variables from the APC cache. A NULL for files or user_vars signals a dump of every entry, whereas array() will dump nothing.", 'flags' => HasDocComment, 'return' => array('type' => Variant, 'desc' => "Returns a binary dump of the given files and user variables from the APC cache, FALSE if APC is not enabled, or NULL if an unknown error is encountered."), 'args' => array(array('name' => "cache_id", 'type' => Int64, 'value' => "0", 'desc' => "The files. Passing in NULL signals a dump of every entry, while passing in array() will dump nothing."), array('name' => "filter", 'type' => Variant, 'value' => "null_variant", 'desc' => "The user vars. Passing in NULL signals a dump of every entry, while passing in array() will dump nothing."))));
DefineFunction(array('name' => "apc_bin_load", 'desc' => "Loads the given binary dump into the APC file/user cache.", 'flags' => HasDocComment, 'return' => array('type' => Boolean, 'desc' => "Returns TRUE if the binary dump data was loaded with success, otherwise FALSE is returned. FALSE is returned if APC is not enabled, or if the data is not a valid APC binary dump (e.g., unexpected size)."), 'args' => array(array('name' => "data", 'type' => String, 'desc' => "The binary dump being loaded, likely from apc_bin_dump()."), array('name' => "flags", 'type' => Int64, 'value' => "0", 'desc' => "Either APC_BIN_VERIFY_CRC32, APC_BIN_VERIFY_MD5, or both."), array('name' => "cache_id", 'type' => Int64, 'value' => "0"))));
DefineFunction(array('name' => "apc_bin_dumpfile", 'desc' => "Outputs a binary dump of the given files and user variables from the APC cache to the named file.", 'flags' => HasDocComment, 'return' => array('type' => Variant, 'desc' => "The number of bytes written to the file, otherwise FALSE if APC is not enabled, filename is an invalid file name, filename can't be opened, the file dump can't be completed (e.g., the hard drive is out of disk space), or an unknown error was encountered."), 'args' => array(array('name' => "cache_id", 'type' => Int64, 'desc' => "The file names being dumped."), array('name' => "filter", 'type' => Variant, 'desc' => "The user variables being dumped."), array('name' => "filename", 'type' => String, 'desc' => "The filename where the dump is being saved."), array('name' => "flags", 'type' => Int64, 'value' => "0", 'desc' => "Flags passed to the filename stream. See the file_put_contents() documentation for details."), array('name' => "context", 'type' => Resource, 'value' => "null", 'desc' => "The context passed to the filename stream. See the file_put_contents() documentation for details."))));
DefineFunction(array('name' => "apc_bin_loadfile", 'desc' => "Loads a binary dump from a file into the APC file/user cache.", 'flags' => HasDocComment, 'return' => array('type' => Boolean, 'desc' => "Returns TRUE on success, otherwise FALSE Reasons it may return FALSE include APC is not enabled, filename is an invalid file name or empty, filename can't be opened, the file dump can't be completed, or if the data is not a valid APC binary dump (e.g., unexpected size)."), 'args' => array(array('name' => "filename", 'type' => String, 'desc' => "The file name containing the dump, likely from apc_bin_dumpfile()."), array('name' => "context", 'type' => Resource, 'value' => "null", 'desc' => "The files context."), array('name' => "flags", 'type' => Int64, 'value' => "0", 'desc' => "Either APC_BIN_VERIFY_CRC32, APC_BIN_VERIFY_MD5, or both."), array('name' => "cache_id", 'type' => Int64, 'value' => "0"))));
///////////////////////////////////////////////////////////////////////////////
// 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
// )
//
Example #21
0
DefineFunction(array('name' => "check_user_func_async", 'desc' => "Check to see if an async call is done or not.", 'flags' => HasDocComment | HipHopSpecific, 'return' => array('type' => Boolean, 'desc' => "TRUE if done; FALSE otherwise."), 'args' => array(array('name' => "handle", 'type' => Object, 'desc' => "The object returned from call_user_func_async() or call_user_func_array_async()."))));
DefineFunction(array('name' => "end_user_func_async", 'desc' => "Block until function returns. Used with call_user_func_async() or call_user_func_array_async().", 'flags' => HasDocComment | HipHopSpecific, 'return' => array('type' => Variant, 'desc' => "Function's return value."), 'args' => array(array('name' => "handle", 'type' => Object, 'desc' => "The object returned from call_user_func_async() or call_user_func_array_async()."), array('name' => "default_strategy", 'type' => Int32, 'value' => "k_GLOBAL_STATE_IGNORE", 'desc' => "GLOBAL_STATE_ constants to specify how to treat global states. Please read documentation for more details."), array('name' => "additional_strategies", 'type' => Variant, 'value' => "null", 'desc' => "Extra strategy for individual variables. Please read documentation for more details."))));
DefineFunction(array('name' => "call_user_func_serialized", 'desc' => "Invoke a function with serialized function and parameters by calling serialize(array(\"func\" => \$func, \"params\" => \$params)), and returns function return in serialized format of array(\"ret\" => \$ret, \"exception\" => \$exception). Useful for over-network invocation.", 'flags' => HasDocComment | HipHopSpecific, 'return' => array('type' => String, 'desc' => "Serialized return."), 'args' => array(array('name' => "input", 'type' => String, 'desc' => "Serialized callback and parameters."))));
DefineFunction(array('name' => "call_user_func_array_rpc", 'desc' => "Same as call_user_func_array(), but executes on a remote HipHop RPC server", 'flags' => HasDocComment | HipHopSpecific, 'return' => array('type' => Variant, 'desc' => "Returns the function result, or FALSE on error."), 'args' => array(array('name' => "host", 'type' => String, 'desc' => "Remote RPC server's address."), array('name' => "port", 'type' => Int32, 'desc' => "Remote RPC server's port."), array('name' => "auth", 'type' => String, 'desc' => "Remote RPC server's authentication password."), array('name' => "timeout", 'type' => Int32, 'desc' => "How many seconds to wait for response."), array('name' => "function", 'type' => Variant, 'desc' => "The function to be called, same as in call_user_func_array()."), array('name' => "params", 'type' => VariantVec, 'desc' => "Parameters, same as in call_user_func_array()."))));
DefineFunction(array('name' => "call_user_func_rpc", 'desc' => "Same as call_user_func(), but executes on a remote HipHop RPC server", 'flags' => HasDocComment | HipHopSpecific | MixedVariableArguments, 'return' => array('type' => Variant, 'desc' => "Returns the function result, or FALSE on error."), 'args' => array(array('name' => "host", 'type' => String, 'desc' => "Remote RPC server's address."), array('name' => "port", 'type' => Int32, 'desc' => "Remote RPC server's port."), array('name' => "auth", 'type' => String, 'desc' => "Remote RPC server's authentication password."), array('name' => "timeout", 'type' => Int32, 'desc' => "How many seconds to wait for response."), array('name' => "function", 'type' => Variant, 'desc' => "The function to be called, same as in call_user_func_array()."))));
DefineFunction(array('name' => "forward_static_call_array", 'desc' => "Calls a user defined function or method given by the function parameter. This function must be called within a method context, it can't be used outside a class. All arguments of the forwarded method are passed as values, and as an array, similarly to call_user_func_array().", 'flags' => HasDocComment, 'return' => array('type' => Variant, 'desc' => "Returns the function result, or FALSE on error."), 'args' => array(array('name' => "function", 'type' => Variant, 'desc' => "The function or method to be called. This parameter may be an array, with the name of the class, and the method, or a string, with a function name."), array('name' => "params", 'type' => VariantVec, 'desc' => "One parameter, gathering all the method parameter in one array.\n\nNote that the parameters for forward_static_call_array() are not passed by reference."))));
DefineFunction(array('name' => "forward_static_call", 'desc' => "Calls a user defined function or method given by the function parameter, with the following arguments. This function must be called within a method context, it can't be used outside a class.", 'flags' => HasDocComment | MixedVariableArguments, 'return' => array('type' => Variant, 'desc' => "Returns the function result, or FALSE on error."), 'args' => array(array('name' => "function", 'type' => Variant, 'desc' => "The function or method to be called. This parameter may be an array, with the name of the class, and the method, or a string, with a function name."))));
DefineFunction(array('name' => "create_function", 'desc' => "Creates an anonymous function from the parameters passed, and returns a unique name for it.\nUsually these parameters will be passed as single quote delimited strings. The reason for using single quoted strings, is to protect the variable names from parsing, otherwise, if you use double quotes there will be a need to escape the variable names, e.g. \\\$avar.", 'flags' => HasDocComment, 'return' => array('type' => String, 'desc' => "Returns a unique function name as a string, or FALSE on error."), 'args' => array(array('name' => "args", 'type' => String, 'desc' => "The function arguments."), array('name' => "code", 'type' => String, 'desc' => "The function code."))));
DefineFunction(array('name' => "func_get_arg", 'desc' => "Gets the specified argument from a user-defined function's argument list.\n\nThis function may be used in conjunction with func_get_args() and func_num_args() to allow user-defined functions to accept variable-length argument lists.", 'flags' => HasDocComment, 'return' => array('type' => Variant, 'desc' => "Returns the specified argument, or FALSE on error."), 'args' => array(array('name' => "arg_num", 'type' => Int32, 'desc' => "The argument offset. Function arguments are counted starting from zero."))));
DefineFunction(array('name' => "func_get_args", 'desc' => "Gets an array of the function's argument list.\n\nThis function may be used in conjunction with func_get_arg() and func_num_args() to allow user-defined functions to accept variable-length argument lists.", 'flags' => HasDocComment, 'return' => array('type' => VariantVec, 'desc' => "Returns an array in which each element is a copy of the corresponding member of the current user-defined function's argument list.")));
DefineFunction(array('name' => "func_num_args", 'desc' => "Gets the number of arguments passed to the function.\n\nThis function may be used in conjunction with func_get_arg() and func_get_args() to allow user-defined functions to accept variable-length argument lists.", 'flags' => HasDocComment, 'return' => array('type' => Int32, 'desc' => "Returns the number of arguments passed into the current user-defined function.")));
DefineFunction(array('name' => "register_postsend_function", 'desc' => "Registers functions to call after HTTP response is completely sent to browser.", 'flags' => HasDocComment | HipHopSpecific | VariableArguments, 'return' => array('type' => null), 'args' => array(array('name' => "function", 'type' => Variant, 'desc' => "The callback to register."))));
DefineFunction(array('name' => "register_shutdown_function", 'desc' => "Registers the function named by function to be executed when script processing is complete or when exit() is called.\n\nMultiple calls to register_shutdown_function() can be made, and each will be called in the same order as they were registered. If you call exit() within one registered shutdown function, processing will stop completely and no other registered shutdown functions will be called.", 'flags' => HasDocComment | VariableArguments, 'return' => array('type' => null, 'desc' => "No value is returned."), 'args' => array(array('name' => "function", 'type' => Variant, 'desc' => "The shutdown function to register.\n\nThe shutdown functions are called as the part of the request so that it's possible to send the output from them. There is currently no way to process the data with output buffering functions in the shutdown function.\n\nShutdown functions are called after closing all opened output buffers thus, for example, its output will not be compressed if zlib.output_compression is enabled."))));
DefineFunction(array('name' => "register_cleanup_function", 'desc' => "Registers functions to call at very end of a web page to clean up and free system resources.", 'flags' => HasDocComment | HipHopSpecific | VariableArguments, 'return' => array('type' => null), 'args' => array(array('name' => "function", 'type' => Variant, 'desc' => "The callback to register."))));
DefineFunction(array('name' => "register_tick_function", 'flags' => HasDocComment | VariableArguments, 'return' => array('type' => Boolean, 'desc' => "Returns TRUE on success or FALSE on failure."), 'args' => array(array('name' => "function", 'type' => Variant, 'desc' => "The function name as a string, or an array consisting of an object and a method."))));
DefineFunction(array('name' => "unregister_tick_function", 'flags' => HasDocComment, 'return' => array('type' => null, 'desc' => "No value is returned."), 'args' => array(array('name' => "function_name", 'type' => Variant, 'desc' => "The function name, as a string."))));
///////////////////////////////////////////////////////////////////////////////
// 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
// )
//
Example #22
0
// )
DefineFunction(array('name' => "preg_grep", 'desc' => "Returns the array consisting of the elements of the input array that match the given pattern.", 'return' => array('type' => Variant, 'desc' => "Returns an array indexed using the keys from the input array."), 'args' => array(array('name' => "pattern", 'type' => String, 'desc' => "The pattern to search for, as a string."), array('name' => "input", 'type' => VariantMap, 'desc' => "The input array."), array('name' => "flags", 'type' => Int32, 'value' => "0", 'desc' => "If set to PREG_GREP_INVERT, this function returns the elements of the input array that do not match the given pattern."))));
DefineFunction(array('name' => "preg_match", 'desc' => "Searches subject for a match to the regular expression given in pattern.", 'return' => array('type' => Variant, 'desc' => "preg_match() returns the number of times pattern matches. That will be either 0 times (no match) or 1 time because preg_match() will stop searching after the first match. preg_match_all() on the contrary will continue until it reaches the end of subject. preg_match() returns FALSE if an error occurred."), 'args' => array(array('name' => "pattern", 'type' => String, 'desc' => "The pattern to search for, as a string."), array('name' => "subject", 'type' => String, 'desc' => "The input string."), array('name' => "matches", 'type' => Variant | Reference, 'value' => "null", 'desc' => "If matches is provided, then it is filled with the results of search. \$matches[0] will contain the text that matched the full pattern, \$matches[1] will have the text that matched the first captured parenthesized subpattern, and so on."), array('name' => "flags", 'type' => Int32, 'value' => "0", 'desc' => "flags can be the following flag: PREG_OFFSET_CAPTURE If this flag is passed, for every occurring match the appendant string offset will also be returned. Note that this changes the value of matches into an array where every element is an array consisting of the matched string at offset 0 and its string offset into subject at offset 1."), array('name' => "offset", 'type' => Int32, 'value' => "0", 'desc' => "Normally, the search starts from the beginning of the subject string. The optional parameter offset can be used to specify the alternate place from which to start the search (in bytes). Note: Using offset is not equivalent to passing substr(\$subject, \$offset) to preg_match() in place of the subject string, because pattern can contain assertions such as ^, \$ or (?<=x). Compare:\nArray ( )\nwhile this example\n\nwill produce Array ( [0] => Array ( [0] => def [1] => 0 ) )"))));
DefineFunction(array('name' => "preg_match_all", 'desc' => "Searches subject for all matches to the regular expression given in pattern and puts them in matches in the order specified by flags.\nAfter the first match is found, the subsequent searches are continued on from end of the last match.", 'return' => array('type' => Variant, 'desc' => "Returns the number of full pattern matches (which might be zero), or FALSE if an error occurred."), 'args' => array(array('name' => "pattern", 'type' => String, 'desc' => "The pattern to search for, as a string."), array('name' => "subject", 'type' => String, 'desc' => "The input string."), array('name' => "matches", 'type' => Variant | Reference, 'desc' => "Array of all matches in multi-dimensional array ordered according to flags."), array('name' => "flags", 'type' => Int32, 'value' => "0", 'desc' => "Can be a combination of the following flags (note that it doesn't make sense to use PREG_PATTERN_ORDER together with PREG_SET_ORDER): PREG_PATTERN_ORDER\nOrders results so that \$matches[0] is an array of full pattern matches, \$matches[1] is an array of strings matched by the first parenthesized subpattern, and so on.\n\n<b>example: </b>, <div align=left>this is a test</div> example: , this is a test\nSo, \$out[0] contains array of strings that matched full pattern, and \$out[1] contains array of strings enclosed by tags."), array('name' => "offset", 'type' => Int32, 'value' => "0", 'desc' => "Orders results so that \$matches[0] is an array of first set of matches, \$matches[1] is an array of second set of matches, and so on.\n<b>example: </b>, example: <div align=\"left\">this is a test</div>, this is a test"))));
DefineFunction(array('name' => "preg_replace", 'desc' => "Searches subject for matches to pattern and replaces them with replacement.", 'return' => array('type' => Variant, 'desc' => "preg_replace() returns an array if the subject parameter is an array, or a string otherwise.\nIf matches are found, the new subject will be returned, otherwise subject will be returned unchanged or NULL if an error occurred."), 'args' => array(array('name' => "pattern", 'type' => Variant, 'desc' => "The pattern to search for. It can be either a string or an array with strings.\nThe e modifier makes preg_replace() treat the replacement parameter as PHP code after the appropriate references substitution is done. Tip: make sure that replacement constitutes a valid PHP code string, otherwise PHP will complain about a parse error at the line containing preg_replace()."), array('name' => "replacement", 'type' => Variant, 'desc' => "The string or an array with strings to replace. If this parameter is a string and the pattern parameter is an array, all patterns will be replaced by that string. If both pattern and replacement parameters are arrays, each pattern will be replaced by the replacement counterpart. If there are fewer elements in the replacement array than in the pattern array, any extra patterns will be replaced by an empty string.\nreplacement may contain references of the form \\\\n or (since PHP 4.0.4) \$n, with the latter form being the preferred one. Every such reference will be replaced by the text captured by the n'th parenthesized pattern. n can be from 0 to 99, and \\\\0 or \$0 refers to the text matched by the whole pattern. Opening parentheses are counted from left to right (starting from 1) to obtain the number of the capturing subpattern. To use backslash in replacement, it must be doubled (\"\\\\\\\\\" PHP string).\nWhen working with a replacement pattern where a backreference is immediately followed by another number (i.e.: placing a literal number immediately after a matched pattern), you cannot use the familiar \\\\1 notation for your backreference. \\\\11, for example, would confuse preg_replace() since it does not know whether you want the \\\\1 backreference followed by a literal 1, or the \\\\11 backreference followed by nothing. In this case the solution is to use \\\${1}1. This creates an isolated \$1 backreference, leaving the 1 as a literal.\nWhen using the e modifier, this function escapes some characters (namely ', \", \\ and NULL) in the strings that replace the backreferences. This is done to ensure that no syntax errors arise from backreference usage with either single or double quotes (e.g. 'strlen(\\'\$1\\')+strlen(\"\$2\")'). Make sure you are aware of PHP's string syntax to know exactly how the interpreted string will look like."), array('name' => "subject", 'type' => Variant, 'desc' => "The string or an array with strings to search and replace.\nIf subject is an array, then the search and replace is performed on every entry of subject, and the return value is an array as well."), array('name' => "limit", 'type' => Int32, 'value' => "-1", 'desc' => "The maximum possible replacements for each pattern in each subject string. Defaults to -1 (no limit)."), array('name' => "count", 'type' => Variant | Reference, 'value' => "null", 'desc' => "If specified, this variable will be filled with the number of replacements done."))));
DefineFunction(array('name' => "preg_replace_callback", 'desc' => "The behavior of this function is almost identical to preg_replace(), except for the fact that instead of replacement parameter, one should specify a callback.", 'return' => array('type' => Variant, 'desc' => "preg_replace_callback() returns an array if the subject parameter is an array, or a string otherwise. On errors the return value is NULL\nIf matches are found, the new subject will be returned, otherwise subject will be returned unchanged."), 'args' => array(array('name' => "pattern", 'type' => Variant, 'desc' => "The pattern to search for. It can be either a string or an array with strings."), array('name' => "callback", 'type' => Variant, 'desc' => "A callback that will be called and passed an array of matched elements in the subject string. The callback should return the replacement string.\nYou'll often need the callback function for a preg_replace_callback() in just one place. In this case you can use an anonymous function (since PHP 5.3.0) or create_function() to declare an anonymous function as callback within the call to preg_replace_callback(). By doing it this way you have all information for the call in one place and do not clutter the function namespace with a callback function's name not used anywhere else.\nExample #1 preg_replace_callback() and create_function()"), array('name' => "subject", 'type' => Variant, 'desc' => "The string or an array with strings to search and replace."), array('name' => "limit", 'type' => Int32, 'value' => "-1", 'desc' => "The maximum possible replacements for each pattern in each subject string. Defaults to -1 (no limit)."), array('name' => "count", 'type' => Variant | Reference, 'value' => "null", 'desc' => "If specified, this variable will be filled with the number of replacements done."))));
DefineFunction(array('name' => "preg_split", 'desc' => "Split the given string by a regular expression.", 'return' => array('type' => Variant, 'desc' => "Returns an array containing substrings of subject split along boundaries matched by pattern."), 'args' => array(array('name' => "pattern", 'type' => Variant, 'desc' => "The pattern to search for, as a string."), array('name' => "subject", 'type' => Variant, 'desc' => "The input string."), array('name' => "limit", 'type' => Int32, 'value' => "-1", 'desc' => "If specified, then only substrings up to limit are returned with the rest of the string being placed in the last substring. A limit of -1, 0 or null means \"no limit\" and, as is standard across PHP, you can use null to skip to the flags parameter."), array('name' => "flags", 'type' => Int32, 'value' => "0", 'desc' => "flags can be any combination of the following flags (combined with the | bitwise operator): PREG_SPLIT_NO_EMPTY If this flag is set, only non-empty pieces will be returned by preg_split()."))));
DefineFunction(array('name' => "preg_quote", 'desc' => "preg_quote() takes str and puts a backslash in front of every character that is part of the regular expression syntax. This is useful if you have a run-time string that you need to match in some text and the string may contain special regex characters.\nThe special regular expression characters are: . \\ + * ? [ ^ ] \$ ( ) { } = ! < > | : -", 'return' => array('type' => String, 'desc' => "Returns the quoted string."), 'args' => array(array('name' => "str", 'type' => String, 'desc' => "The input string."), array('name' => "delimiter", 'type' => String, 'value' => "null_string", 'desc' => "If the optional delimiter is specified, it will also be escaped. This is useful for escaping the delimiter that is required by the PCRE functions. The / is the most commonly used delimiter."))));
DefineFunction(array('name' => "preg_last_error", 'desc' => "Returns the error code of the last PCRE regex execution.\nExample #1 preg_last_error() example\n\nBacktrack limit was exhausted!", 'return' => array('type' => Int32, 'desc' => "Returns one of the following constants (explained on their own page): PREG_NO_ERROR PREG_INTERNAL_ERROR PREG_BACKTRACK_LIMIT_ERROR (see also pcre.backtrack_limit) PREG_RECURSION_LIMIT_ERROR (see also pcre.recursion_limit) PREG_BAD_UTF8_ERROR PREG_BAD_UTF8_OFFSET_ERROR (since PHP 5.3.0)")));
DefineFunction(array('name' => "ereg_replace", 'return' => array('type' => String, 'desc' => "The modified string is returned. If no matches are found in string, then it will be returned unchanged."), 'args' => array(array('name' => "pattern", 'type' => String, 'desc' => "A POSIX extended regular expression."), array('name' => "replacement", 'type' => String, 'desc' => "If pattern contains parenthesized substrings, replacement may contain substrings of the form \\\\digit, which will be replaced by the text matching the digit'th parenthesized substring; \\\\0 will produce the entire contents of string. Up to nine substrings may be used. Parentheses may be nested, in which case they are counted by the opening parenthesis."), array('name' => "str", 'type' => String, 'desc' => "The input string."))));
DefineFunction(array('name' => "eregi_replace", 'desc' => "This function is identical to ereg_replace() except that this ignores case distinction when matching alphabetic characters. WarningThis function has been DEPRECATED as of PHP 5.3.0. Relying on this feature is highly discouraged.", 'return' => array('type' => String, 'desc' => "The modified string is returned. If no matches are found in string, then it will be returned unchanged."), 'args' => array(array('name' => "pattern", 'type' => String, 'desc' => "A POSIX extended regular expression."), array('name' => "replacement", 'type' => String, 'desc' => "If pattern contains parenthesized substrings, replacement may contain substrings of the form \\\\digit, which will be replaced by the text matching the digit'th parenthesized substring; \\\\0 will produce the entire contents of string. Up to nine substrings may be used. Parentheses may be nested, in which case they are counted by the opening parenthesis."), array('name' => "str", 'type' => String, 'desc' => "The input string."))));
DefineFunction(array('name' => "ereg", 'return' => array('type' => Variant, 'desc' => "Returns the length of the matched string if a match for pattern was found in string, or FALSE if no matches were found or an error occurred.\nIf the optional parameter regs was not passed or the length of the matched string is 0, this function returns 1."), 'args' => array(array('name' => "pattern", 'type' => String, 'desc' => "Case sensitive regular expression."), array('name' => "str", 'type' => String, 'desc' => "The input string."), array('name' => "regs", 'type' => Variant | Reference, 'value' => "null", 'desc' => "If matches are found for parenthesized substrings of pattern and the function is called with the third argument regs, the matches will be stored in the elements of the array regs.\n\$regs[1] will contain the substring which starts at the first left parenthesis; \$regs[2] will contain the substring starting at the second, and so on. \$regs[0] will contain a copy of the complete string matched."))));
DefineFunction(array('name' => "eregi", 'desc' => "This function is identical to ereg() except that it ignores case distinction when matching alphabetic characters. WarningThis function has been DEPRECATED as of PHP 5.3.0. Relying on this feature is highly discouraged.", 'return' => array('type' => Variant, 'desc' => "Returns the length of the matched string if a match for pattern was found in string, or FALSE if no matches were found or an error occurred.\nIf the optional parameter regs was not passed or the length of the matched string is 0, this function returns 1."), 'args' => array(array('name' => "pattern", 'type' => String, 'desc' => "Case insensitive regular expression."), array('name' => "str", 'type' => String, 'desc' => "The input string."), array('name' => "regs", 'type' => Variant | Reference, 'value' => "null", 'desc' => "If matches are found for parenthesized substrings of pattern and the function is called with the third argument regs, the matches will be stored in the elements of the array regs.\n\$regs[1] will contain the substring which starts at the first left parenthesis; \$regs[2] will contain the substring starting at the second, and so on. \$regs[0] will contain a copy of the complete string matched."))));
DefineFunction(array('name' => "split", 'desc' => "Splits a string into array by regular expression. WarningThis function has been DEPRECATED as of PHP 5.3.0. Relying on this feature is highly discouraged.", 'return' => array('type' => Variant, 'desc' => "Returns an array of strings, each of which is a substring of string formed by splitting it on boundaries formed by the case-sensitive regular expression pattern.\nIf there are n occurrences of pattern, the returned array will contain n+1 items. For example, if there is no occurrence of pattern, an array with only one element will be returned. Of course, this is also true if string is empty. If an error occurs, split() returns FALSE."), 'args' => array(array('name' => "pattern", 'type' => String, 'desc' => "Case sensitive regular expression.\nIf you want to split on any of the characters which are considered special by regular expressions, you'll need to escape them first. If you think split() (or any other regex function, for that matter) is doing something weird, please read the file regex.7, included in the regex/ subdirectory of the PHP distribution. It's in manpage format, so you'll want to do something along the lines of man /usr/local/src/regex/regex.7 in order to read it."), array('name' => "str", 'type' => String, 'desc' => "The input string."), array('name' => "limit", 'type' => Int32, 'value' => "-1", 'desc' => "If limit is set, the returned array will contain a maximum of limit elements with the last element containing the whole rest of string."))));
DefineFunction(array('name' => "spliti", 'desc' => "Splits a string into array by regular expression.\nThis function is identical to split() except that this ignores case distinction when matching alphabetic characters. WarningThis function has been DEPRECATED as of PHP 5.3.0. Relying on this feature is highly discouraged.", 'return' => array('type' => Variant, 'desc' => "Returns an array of strings, each of which is a substring of string formed by splitting it on boundaries formed by the case insensitive regular expression pattern.\nIf there are n occurrences of pattern, the returned array will contain n+1 items. For example, if there is no occurrence of pattern, an array with only one element will be returned. Of course, this is also true if string is empty. If an error occurs, spliti() returns FALSE."), 'args' => array(array('name' => "pattern", 'type' => String, 'desc' => "Case insensitive regular expression.\nIf you want to split on any of the characters which are considered special by regular expressions, you'll need to escape them first. If you think spliti() (or any other regex function, for that matter) is doing something weird, please read the file regex.7, included in the regex/ subdirectory of the PHP distribution. It's in manpage format, so you'll want to do something along the lines of man /usr/local/src/regex/regex.7 in order to read it."), array('name' => "str", 'type' => String, 'desc' => "The input string."), array('name' => "limit", 'type' => Int32, 'value' => "-1", 'desc' => "If limit is set, the returned array will contain a maximum of limit elements with the last element containing the whole rest of string."))));
DefineFunction(array('name' => "sql_regcase", 'desc' => "Creates a regular expression for a case insensitive match. WarningThis function has been DEPRECATED as of PHP 5.3.0. Relying on this feature is highly discouraged.", 'return' => array('type' => String, 'desc' => "Returns a valid regular expression which will match string, ignoring case. This expression is string with each alphabetic character converted to a bracket expression; this bracket expression contains that character's uppercase and lowercase form. Other characters remain unchanged."), 'args' => array(array('name' => "str", 'type' => String, 'desc' => "The input string."))));
///////////////////////////////////////////////////////////////////////////////
// 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
// )
//
Example #23
0
DefineFunction(array('name' => "fb_set_taint", 'desc' => "Taints a string with a flag or a bit. This bit is contagious in string operations, being carried over to new strings that are copied or composed from this string. This may be used for checking dirty or clean status of end user's input for different purposes.", 'flags' => HasDocComment | HipHopSpecific, 'return' => array('type' => null), 'args' => array(array('name' => "str", 'type' => Variant | Reference, 'desc' => "The string to taint."), array('name' => "taint", 'type' => Int32, 'desc' => "The bit to flag.")), 'taint_observer' => array()));
DefineFunction(array('name' => "fb_unset_taint", 'desc' => "Untaints a string by clearing off the bit that was set or carried over.", 'flags' => HasDocComment | HipHopSpecific, 'return' => array('type' => null), 'args' => array(array('name' => "str", 'type' => Variant | Reference, 'desc' => "The string to untaint."), array('name' => "taint", 'type' => Int32, 'desc' => "The bit to clear.")), 'taint_observer' => array()));
DefineFunction(array('name' => "fb_get_taint", 'desc' => "Checks to see if a bit is set.", 'flags' => HasDocComment | HipHopSpecific, 'return' => array('type' => Boolean, 'desc' => "Whether the taint was set."), 'args' => array(array('name' => "str", 'type' => String, 'desc' => "The string to check."), array('name' => "taint", 'type' => Int32, 'desc' => "The bit to check against.")), 'taint_observer' => array()));
DefineFunction(array('name' => "fb_get_taint_warning_counts", 'desc' => "Get counts of various suppressed taint warnings.", 'flags' => HasDocComment | HipHopSpecific, 'return' => array('type' => Int64Vec, 'desc' => "The array of warning counts."), 'taint_observer' => array()));
DefineFunction(array('name' => "fb_enable_html_taint_trace", 'desc' => "Enable an optional tracing feature.", 'flags' => HasDocComment | HipHopSpecific, 'return' => array('type' => null), 'taint_observer' => array()));
DefineFunction(array('name' => "fb_const_fetch", 'desc' => "Fetches a constant string from a special store that's compiled into the executable. This is faster than apc_fetch(), which needs locking between different threads. This store is immutable and loaded once with strings that are never changed. Therefore, no locking is needed when accessed by different threads.", 'flags' => HasDocComment | HipHopSpecific, 'return' => array('type' => Variant, 'desc' => "The value that was stored."), 'args' => array(array('name' => "key", 'type' => Variant, 'desc' => "The key for locating the value.")), 'taint_observer' => array()));
DefineFunction(array('name' => "fb_output_compression", 'desc' => "Toggles the compression status of HipHop output, if headers have already been sent this may be ignored.", 'flags' => HasDocComment | HipHopSpecific, 'return' => array('type' => Boolean, 'desc' => "The old value."), 'args' => array(array('name' => "new_value", 'type' => Boolean, 'desc' => "The new value for the compression state.")), 'taint_observer' => array()));
DefineFunction(array('name' => "fb_set_exit_callback", 'desc' => "Set a callback function that is called when php tries to exit.", 'flags' => HasDocComment | HipHopSpecific, 'return' => array('type' => null), 'args' => array(array('name' => "function", 'type' => Variant, 'desc' => "The callback to invoke. An exception object will be passed to the function")), 'taint_observer' => array()));
DefineFunction(array('name' => "fb_get_flush_stat", 'desc' => "Get stats on flushing the data from server.", 'flags' => HasDocComment | HipHopSpecific, 'return' => array('type' => VariantMap, 'desc' => "Query result in a format of array('total' => {number of total bytes to flush}, 'sent' => {number of bytes sent out}, 'time' => {time for flushing in us})."), 'taint_observer' => array()));
DefineFunction(array('name' => "fb_get_last_flush_size", 'desc' => "Get stats on flushing the last data chunk from server.", 'flags' => HasDocComment | HipHopSpecific, 'return' => array('type' => Int64, 'desc' => "Total number of bytes flushed since last flush"), 'taint_observer' => array()));
DefineFunction(array('name' => "fb_lazy_stat", 'desc' => "Gathers the statistics of the file named by filename, like stat(), except uses cached information from an internal inotify-based mechanism that may not be updated during the duration of a request.", 'flags' => HasDocComment, 'return' => array('type' => Variant, 'desc' => "Same format at the normal php stat() function."), 'args' => array(array('name' => "filename", 'type' => String, 'desc' => "Path to the file."))));
DefineFunction(array('name' => "fb_lazy_lstat", 'desc' => "Gathers the statistics of the file named by filename, like lstat(), except uses cached information from an internal inotify-based mechanism that may not be updated during the duration of a request.", 'flags' => HasDocComment, 'return' => array('type' => Variant, 'desc' => "Same format as the normal php lstat() function."), 'args' => array(array('name' => "filename", 'type' => String, 'desc' => "Path to a file or a symbolic link."))));
DefineFunction(array('name' => "fb_lazy_realpath", 'desc' => "Returns a canonicalized version of the input path that contains no symbolic links, like realpath(), except uses cached information from an internal inotify-based mechanism that may not be updated during the duration of a request.", 'flags' => HasDocComment, 'return' => array('type' => String, 'desc' => "Real path of the file."), 'args' => array(array('name' => "filename", 'type' => String, 'desc' => "Fake path to the file."))));
DefineFunction(array('name' => "fb_setprofile", 'desc' => "Set a callback function to be called whenever a function is entered or exited. Takes 3 args, the function name, the mode (enter or exit), and an array describing the frame.", 'flags' => HasDocComment | HipHopSpecific, 'return' => array('type' => null, 'desc' => "No value is returned."), 'args' => array(array('name' => "callback", 'type' => Variant, 'desc' => "Profiler function to call or null to disable")), 'taint_observer' => false));
DefineFunction(array('name' => "fb_gc_collect_cycles", 'desc' => "Invoke the backup cycle collector", 'flags' => HasDocComment | HipHopSpecific, 'return' => array('type' => String, 'desc' => "Some interesting statistics")));
DefineFunction(array('name' => "fb_gc_detect_cycles", 'desc' => "Detect cyclic garbage in the heap and print information about it to a file", 'flags' => HasDocComment | HipHopSpecific, 'args' => array(array('name' => 'filename', 'type' => String, 'desc' => 'filename to write information about cyclic garbage to'))));
///////////////////////////////////////////////////////////////////////////////
// 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
// )
//
Example #24
0
//   '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
//      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' => "json_encode", 'desc' => "Returns a string containing the JSON representation of value.", 'flags' => HasDocComment, 'return' => array('type' => String, 'desc' => "Returns a JSON encoded string on success."), 'args' => array(array('name' => "value", 'type' => Variant, 'desc' => "The value being encoded. Can be any type except a resource.\n\nThis function only works with UTF-8 encoded data."), array('name' => "options", 'type' => Variant, 'value' => "0", 'desc' => "Bitmask consisting of JSON_HEX_QUOT, JSON_HEX_TAG, JSON_HEX_AMP, JSON_HEX_APOS, JSON_FORCE_OBJECT.")), 'taint_observer' => array('set_mask' => "TAINT_BIT_MUTATED", 'clear_mask' => "TAINT_BIT_NONE")));
DefineFunction(array('name' => "json_decode", 'desc' => "Takes a JSON encoded string and converts it into a PHP variable.", 'flags' => HasDocComment, 'return' => array('type' => Variant, 'desc' => "Returns the value encoded in json in appropriate PHP type. Values true, false and null (case-insensitive) are returned as TRUE, FALSE and NULL respectively. NULL is returned if the json cannot be decoded or if the encoded data is deeper than the recursion limit."), 'args' => array(array('name' => "json", 'type' => String, 'desc' => "The json string being decoded.\n\nThis function only works with UTF-8 encoded data."), array('name' => "assoc", 'type' => Boolean, 'value' => "false", 'desc' => "When TRUE, returned objects will be converted into associative arrays."), array('name' => "options", 'type' => Variant, 'value' => "0", 'desc' => "User specified recursion depth.")), 'taint_observer' => array('set_mask' => "TAINT_BIT_MUTATED", 'clear_mask' => "TAINT_BIT_NONE")));
///////////////////////////////////////////////////////////////////////////////
// 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
// )
//
Example #25
0
// 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' => "MutableArrayIterator", 'bases' => array('Sweepable'), 'desc' => "Data structure used by the runtime to deal with mutable " . "iteration inside yield generators.", 'flags' => HasDocComment | NoDefaultSweep, 'footer' => <<<EOT

  public: union {
    char m_u[sizeof(MIterCtx)];
    TypedValue m_align;
  };
  public: bool m_valid;

  private: MIterCtx& marr() {
    return *(MIterCtx*)(m_u);
  }
EOT
));
DefineFunction(array('name' => "__construct", 'return' => array('type' => null), 'args' => array(array('name' => "array", 'type' => Variant | Reference))));
DefineFunction(array('name' => "currentRef", 'return' => array('type' => Variant | Reference)));
DefineFunction(array('name' => "current", 'return' => array('type' => Variant)));
DefineFunction(array('name' => "key", 'return' => array('type' => Variant)));
DefineFunction(array('name' => "next", 'return' => array('type' => null)));
DefineFunction(array('name' => "valid", 'return' => array('type' => Boolean)));
EndClass();
Example #26
0
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."))));
DefineFunction(array('name' => "getCode", 'desc' => "PHP code snippet user just typed in manually.", 'flags' => HasDocComment | HipHopSpecific, 'return' => array('type' => String, 'desc' => "The PHP source code.")));
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' => Int32, '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' => 'DebuggerCommand', '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' => 'DebuggerCommand', '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' => Int32, '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 DebuggerClient::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."))));
DefineFunction(array('name' => "__destruct", 'desc' => "Destructor of DebugerClient.", 'flags' => HasDocComment | HipHopSpecific, 'return' => array('type' => Variant, 'desc' => "Always returns null.")));
EndClass();
Example #27
0
//   '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
//      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' => "icu_transliterate", 'flags' => HasDocComment, 'return' => array('type' => String), 'args' => array(array('name' => "str", 'type' => String), array('name' => "remove_accents", 'type' => Boolean))));
///////////////////////////////////////////////////////////////////////////////
// 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
// )
//
Example #28
0
//   '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
//      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' => "json_encode", 'desc' => "Returns a string containing the JSON representation of value.", 'return' => array('type' => String, 'desc' => "Returns a JSON encoded string on success."), 'args' => array(array('name' => "value", 'type' => Variant, 'desc' => "The value being encoded. Can be any type except a resource .\nThis function only works with UTF-8 encoded data."), array('name' => "loose", 'type' => Boolean, 'value' => "false", 'desc' => "Bitmask consisting of JSON_HEX_QUOT, JSON_HEX_TAG, JSON_HEX_AMP, JSON_HEX_APOS, JSON_FORCE_OBJECT."))));
DefineFunction(array('name' => "json_decode", 'desc' => "Takes a JSON encoded string and converts it into a PHP variable.", 'return' => array('type' => Variant, 'desc' => "Returns the value encoded in json in appropriate PHP type. Values true, false and null (case-insensitive) are returned as TRUE, FALSE and NULL respectively. NULL is returned if the json cannot be decoded or if the encoded data is deeper than the recursion limit."), 'args' => array(array('name' => "json", 'type' => String, 'desc' => "The json string being decoded."), array('name' => "assoc", 'type' => Boolean, 'value' => "false", 'desc' => "When TRUE, returned object s will be converted into associative array s."), array('name' => "loose", 'type' => Boolean, 'value' => "false", 'desc' => "User specified recursion depth."))));
///////////////////////////////////////////////////////////////////////////////
// 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
// )
//
Example #29
0
//        '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' => "bzclose", 'desc' => "Closes the given bzip2 file pointer.", 'flags' => HasDocComment, 'return' => array('type' => Variant, 'desc' => "Returns TRUE on success or FALSE on failure."), 'args' => array(array('name' => "bz", 'type' => Resource, 'desc' => "The file pointer. It must be valid and must point to a file successfully opened by bzopen().")), 'taint_observer' => false));
DefineFunction(array('name' => "bzopen", 'desc' => "bzopen() opens a bzip2 (.bz2) file for reading or writing.", 'flags' => HasDocComment, 'return' => array('type' => Variant, 'desc' => "If the open fails, bzopen() returns FALSE, otherwise it returns a pointer to the newly opened file."), 'args' => array(array('name' => "filename", 'type' => String, 'desc' => "The name of the file to open."), array('name' => "mode", 'type' => String, 'desc' => "Similar to the fopen() function, only 'r' (read) and 'w' (write) are supported. Everything else will cause bzopen to return FALSE.")), 'taint_observer' => false));
DefineFunction(array('name' => "bzread", 'desc' => "bzread() reads from the given bzip2 file pointer.\n\nReading stops when length (uncompressed) bytes have been read or EOF is reached, whichever comes first.", 'flags' => HasDocComment, 'return' => array('type' => Variant, 'desc' => "Returns the uncompressed data, or FALSE on error."), 'args' => array(array('name' => "bz", 'type' => Resource, 'desc' => "The file pointer. It must be valid and must point to a file successfully opened by bzopen()."), array('name' => "length", 'type' => Int32, 'value' => "1024", 'desc' => "If not specified, bzread() will read 1024 (uncompressed) bytes at a time.")), 'taint_observer' => array('set_mask' => "TAINT_BIT_ALL_NO_TRACE", 'clear_mask' => "TAINT_BIT_NONE")));
DefineFunction(array('name' => "bzwrite", 'desc' => "bzwrite() writes a string into the given bzip2 file stream.", 'flags' => HasDocComment, 'return' => array('type' => Variant, 'desc' => "Returns the number of bytes written, or FALSE on error."), 'args' => array(array('name' => "bz", 'type' => Resource, 'desc' => "The file pointer. It must be valid and must point to a file successfully opened by bzopen()."), array('name' => "data", 'type' => String, 'desc' => "The written data."), array('name' => "length", 'type' => Int32, 'value' => "0", 'desc' => "If supplied, writing will stop after length (uncompressed) bytes have been written or the end of data is reached, whichever comes first.")), 'taint_observer' => false));
DefineFunction(array('name' => "bzflush", 'desc' => "Forces a write of all buffered bzip2 data for the file pointer bz.", 'flags' => HasDocComment, 'return' => array('type' => Variant, 'desc' => "Returns TRUE on success or FALSE on failure."), 'args' => array(array('name' => "bz", 'type' => Resource, 'desc' => "The file pointer. It must be valid and must point to a file successfully opened by bzopen().")), 'taint_observer' => false));
DefineFunction(array('name' => "bzerrstr", 'desc' => "Gets the error string of any bzip2 error returned by the given file pointer.", 'flags' => HasDocComment, 'return' => array('type' => String, 'desc' => "Returns a string containing the error message."), 'args' => array(array('name' => "bz", 'type' => Resource, 'desc' => "The file pointer. It must be valid and must point to a file successfully opened by bzopen().")), 'taint_observer' => false));
DefineFunction(array('name' => "bzerror", 'desc' => "Returns the error number and error string of any bzip2 error returned by the given file pointer.", 'flags' => HasDocComment, 'return' => array('type' => Variant, 'desc' => "Returns an associative array, with the error code in the errno entry, and the error message in the errstr entry."), 'args' => array(array('name' => "bz", 'type' => Resource, 'desc' => "The file pointer. It must be valid and must point to a file successfully opened by bzopen().")), 'taint_observer' => false));
DefineFunction(array('name' => "bzerrno", 'desc' => "Returns the error number of any bzip2 error returned by the given file pointer.", 'flags' => HasDocComment, 'return' => array('type' => Int32, 'desc' => "Returns the error number as an integer."), 'args' => array(array('name' => "bz", 'type' => Resource, 'desc' => "The file pointer. It must be valid and must point to a file successfully opened by bzopen().")), 'taint_observer' => false));
DefineFunction(array('name' => "bzcompress", 'desc' => "bzcompress() compresses the given string and returns it as bzip2 encoded data.", 'flags' => HasDocComment, 'return' => array('type' => Variant, 'desc' => "The compressed string or number of error in case of error."), 'args' => array(array('name' => "source", 'type' => String, 'desc' => "The string to compress."), array('name' => "blocksize", 'type' => Int32, 'value' => "4", 'desc' => "Specifies the blocksize used during compression and should be a number from 1 to 9 with 9 giving the best compression, but using more resources to do so."), array('name' => "workfactor", 'type' => Int32, 'value' => "0", 'desc' => "Controls how the compression phase behaves when presented with worst case, highly repetitive, input data. The value can be between 0 and 250 with 0 being a special case.\n\nRegardless of the workfactor, the generated output is the same.")), 'taint_observer' => array('set_mask' => "TAINT_BIT_MUTATED", 'clear_mask' => "TAINT_BIT_NONE")));
DefineFunction(array('name' => "bzdecompress", 'desc' => "bzdecompress() decompresses the given string containing bzip2 encoded data.", 'flags' => HasDocComment, 'return' => array('type' => Variant, 'desc' => "The decompressed string or number of error in case of error."), 'args' => array(array('name' => "source", 'type' => String, 'desc' => "The string to decompress."), array('name' => "small", 'type' => Int32, 'value' => "0", 'desc' => "If TRUE, an alternative decompression algorithm will be used which uses less memory (the maximum memory requirement drops to around 2300K) but works at roughly half the speed.\n\nSee the ยป bzip2 documentation for more information about this feature.")), 'taint_observer' => array('set_mask' => "TAINT_BIT_MUTATED", 'clear_mask' => "TAINT_BIT_NONE")));
///////////////////////////////////////////////////////////////////////////////
// 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
// )
//
Example #30
0
DefineFunction(array('name' => "__construct", 'return' => array('type' => null)));
DefineFunction(array('name' => "quit", 'return' => array('type' => null)));
DefineFunction(array('name' => "print", 'flags' => VariableArguments, 'return' => array('type' => null), 'args' => array(array('name' => "format", 'type' => String))));
DefineFunction(array('name' => "help", 'flags' => VariableArguments, 'return' => array('type' => null), 'args' => array(array('name' => "format", 'type' => String))));
DefineFunction(array('name' => "info", 'flags' => VariableArguments, 'return' => array('type' => null), 'args' => array(array('name' => "format", 'type' => String))));
DefineFunction(array('name' => "output", 'flags' => VariableArguments, 'return' => array('type' => null), 'args' => array(array('name' => "format", 'type' => String))));
DefineFunction(array('name' => "error", 'flags' => VariableArguments, 'return' => array('type' => null), 'args' => array(array('name' => "format", 'type' => String))));
DefineFunction(array('name' => "code", 'return' => array('type' => null), 'args' => array(array('name' => "source", 'type' => String), array('name' => "start_line_no", 'type' => Int32, 'value' => "0"))));
DefineFunction(array('name' => "ask", 'flags' => VariableArguments, 'return' => array('type' => Variant), 'args' => array(array('name' => "format", 'type' => String))));
DefineFunction(array('name' => "wrap", 'return' => array('type' => String), 'args' => array(array('name' => "str", 'type' => String))));
DefineFunction(array('name' => "helptitle", 'return' => array('type' => null), 'args' => array(array('name' => "str", 'type' => String))));
DefineFunction(array('name' => "helpcmds", 'flags' => VariableArguments, 'return' => array('type' => null), 'args' => array(array('name' => "cmd", 'type' => String), array('name' => "desc", 'type' => String))));
DefineFunction(array('name' => "helpbody", 'return' => array('type' => null), 'args' => array(array('name' => "str", 'type' => String))));
DefineFunction(array('name' => "helpsection", 'return' => array('type' => null), 'args' => array(array('name' => "str", 'type' => String))));
DefineFunction(array('name' => "tutorial", 'return' => array('type' => null), 'args' => array(array('name' => "str", 'type' => String))));
DefineFunction(array('name' => "getcode", 'return' => array('type' => String)));
DefineFunction(array('name' => "getcommand", 'return' => array('type' => String)));
DefineFunction(array('name' => "arg", 'return' => array('type' => Boolean), 'args' => array(array('name' => "index", 'type' => Int32), array('name' => "str", 'type' => String))));
DefineFunction(array('name' => "argcount", 'return' => array('type' => Int32)));
DefineFunction(array('name' => "argvalue", 'return' => array('type' => String), 'args' => array(array('name' => "index", 'type' => Int32))));
DefineFunction(array('name' => "argrest", 'return' => array('type' => String), 'args' => array(array('name' => "index", 'type' => Int32))));
DefineFunction(array('name' => "args", 'return' => array('type' => StringVec)));
DefineFunction(array('name' => "send", 'return' => array('type' => Variant), 'args' => array(array('name' => "cmd", 'type' => 'DebuggerCommand'))));
DefineFunction(array('name' => "xend", 'return' => array('type' => Variant), 'args' => array(array('name' => "cmd", 'type' => 'DebuggerCommand'))));
DefineFunction(array('name' => "getcurrentlocation", 'return' => array('type' => Variant)));
DefineFunction(array('name' => "getstacktrace", 'return' => array('type' => Variant)));
DefineFunction(array('name' => "getframe", 'return' => array('type' => Int32)));
DefineFunction(array('name' => "printframe", 'return' => array('type' => null), 'args' => array(array('name' => "index", 'type' => Int32))));
DefineFunction(array('name' => "addcompletion", 'return' => array('type' => null), 'args' => array(array('name' => "list", 'type' => Variant))));
DefineFunction(array('name' => "__destruct", 'return' => array('type' => Variant)));
EndClass();