fixed return types to Redis[Array]->info()

This commit is contained in:
Alexander Over 2019-08-28 20:36:01 +02:00
commit 72b470fd15
No known key found for this signature in database
GPG Key ID: 90323B1C3679775A
58 changed files with 14185 additions and 1793 deletions

View File

@ -15,6 +15,6 @@ install:
- composer install --ignore-platform-reqs
script:
- docker-compose -f docker-compose.yml pull
- docker-compose -f docker-compose.yml build
- docker-compose -f docker-compose.yml run php /opt/project/phpstorm-stubs/vendor/bin/phpunit /opt/project/phpstorm-stubs/tests/
- ./tests/check-stub-map

8
Dockerfile Normal file
View File

@ -0,0 +1,8 @@
FROM php:7.3
RUN set -x \
&& apt-get update \
&& apt-get install -y libldap2-dev \
&& rm -rf /var/lib/apt/lists/* \
&& docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ \
&& docker-php-ext-install ldap \
&& apt-get purge -y --auto-remove libldap2-dev

View File

@ -40,6 +40,106 @@ const CLASSES = array (
'CURLFile' => 'curl/curl.php',
'CachingIterator' => 'SPL/SPL.php',
'CallbackFilterIterator' => 'SPL/SPL.php',
'Cassandra' => 'cassandra/cassandra.php',
'Cassandra\\Aggregate' => 'cassandra/cassandra.php',
'Cassandra\\BatchStatement' => 'cassandra/cassandra.php',
'Cassandra\\Bigint' => 'cassandra/cassandra.php',
'Cassandra\\Blob' => 'cassandra/cassandra.php',
'Cassandra\\Cluster' => 'cassandra/cassandra.php',
'Cassandra\\Cluster\\Builder' => 'cassandra/cassandra.php',
'Cassandra\\Collection' => 'cassandra/cassandra.php',
'Cassandra\\Column' => 'cassandra/cassandra.php',
'Cassandra\\Custom' => 'cassandra/cassandra.php',
'Cassandra\\Date' => 'cassandra/cassandra.php',
'Cassandra\\Decimal' => 'cassandra/cassandra.php',
'Cassandra\\DefaultAggregate' => 'cassandra/cassandra.php',
'Cassandra\\DefaultCluster' => 'cassandra/cassandra.php',
'Cassandra\\DefaultColumn' => 'cassandra/cassandra.php',
'Cassandra\\DefaultFunction' => 'cassandra/cassandra.php',
'Cassandra\\DefaultIndex' => 'cassandra/cassandra.php',
'Cassandra\\DefaultKeyspace' => 'cassandra/cassandra.php',
'Cassandra\\DefaultMaterializedView' => 'cassandra/cassandra.php',
'Cassandra\\DefaultSchema' => 'cassandra/cassandra.php',
'Cassandra\\DefaultSession' => 'cassandra/cassandra.php',
'Cassandra\\DefaultTable' => 'cassandra/cassandra.php',
'Cassandra\\Duration' => 'cassandra/cassandra.php',
'Cassandra\\Exception' => 'cassandra/cassandra.php',
'Cassandra\\Exception\\AlreadyExistsException' => 'cassandra/cassandra.php',
'Cassandra\\Exception\\AuthenticationException' => 'cassandra/cassandra.php',
'Cassandra\\Exception\\ConfigurationException' => 'cassandra/cassandra.php',
'Cassandra\\Exception\\DivideByZeroException' => 'cassandra/cassandra.php',
'Cassandra\\Exception\\DomainException' => 'cassandra/cassandra.php',
'Cassandra\\Exception\\ExecutionException' => 'cassandra/cassandra.php',
'Cassandra\\Exception\\InvalidArgumentException' => 'cassandra/cassandra.php',
'Cassandra\\Exception\\InvalidQueryException' => 'cassandra/cassandra.php',
'Cassandra\\Exception\\InvalidSyntaxException' => 'cassandra/cassandra.php',
'Cassandra\\Exception\\IsBootstrappingException' => 'cassandra/cassandra.php',
'Cassandra\\Exception\\LogicException' => 'cassandra/cassandra.php',
'Cassandra\\Exception\\OverloadedException' => 'cassandra/cassandra.php',
'Cassandra\\Exception\\ProtocolException' => 'cassandra/cassandra.php',
'Cassandra\\Exception\\RangeException' => 'cassandra/cassandra.php',
'Cassandra\\Exception\\ReadTimeoutException' => 'cassandra/cassandra.php',
'Cassandra\\Exception\\RuntimeException' => 'cassandra/cassandra.php',
'Cassandra\\Exception\\ServerException' => 'cassandra/cassandra.php',
'Cassandra\\Exception\\TimeoutException' => 'cassandra/cassandra.php',
'Cassandra\\Exception\\TruncateException' => 'cassandra/cassandra.php',
'Cassandra\\Exception\\UnauthorizedException' => 'cassandra/cassandra.php',
'Cassandra\\Exception\\UnavailableException' => 'cassandra/cassandra.php',
'Cassandra\\Exception\\UnpreparedException' => 'cassandra/cassandra.php',
'Cassandra\\Exception\\ValidationException' => 'cassandra/cassandra.php',
'Cassandra\\Exception\\WriteTimeoutException' => 'cassandra/cassandra.php',
'Cassandra\\ExecutionOptions' => 'cassandra/cassandra.php',
'Cassandra\\Float_' => 'cassandra/cassandra.php',
'Cassandra\\Function_' => 'cassandra/cassandra.php',
'Cassandra\\Future' => 'cassandra/cassandra.php',
'Cassandra\\FutureClose' => 'cassandra/cassandra.php',
'Cassandra\\FuturePreparedStatement' => 'cassandra/cassandra.php',
'Cassandra\\FutureRows' => 'cassandra/cassandra.php',
'Cassandra\\FutureSession' => 'cassandra/cassandra.php',
'Cassandra\\FutureValue' => 'cassandra/cassandra.php',
'Cassandra\\Index' => 'cassandra/cassandra.php',
'Cassandra\\Inet' => 'cassandra/cassandra.php',
'Cassandra\\Keyspace' => 'cassandra/cassandra.php',
'Cassandra\\Map' => 'cassandra/cassandra.php',
'Cassandra\\MaterializedView' => 'cassandra/cassandra.php',
'Cassandra\\Numeric' => 'cassandra/cassandra.php',
'Cassandra\\PreparedStatement' => 'cassandra/cassandra.php',
'Cassandra\\RetryPolicy' => 'cassandra/cassandra.php',
'Cassandra\\RetryPolicy\\DefaultPolicy' => 'cassandra/cassandra.php',
'Cassandra\\RetryPolicy\\DowngradingConsistency' => 'cassandra/cassandra.php',
'Cassandra\\RetryPolicy\\Fallthrough' => 'cassandra/cassandra.php',
'Cassandra\\RetryPolicy\\Logging' => 'cassandra/cassandra.php',
'Cassandra\\Rows' => 'cassandra/cassandra.php',
'Cassandra\\SSLOptions' => 'cassandra/cassandra.php',
'Cassandra\\SSLOptions\\Builder' => 'cassandra/cassandra.php',
'Cassandra\\Schema' => 'cassandra/cassandra.php',
'Cassandra\\Session' => 'cassandra/cassandra.php',
'Cassandra\\Set' => 'cassandra/cassandra.php',
'Cassandra\\SimpleStatement' => 'cassandra/cassandra.php',
'Cassandra\\Smallint' => 'cassandra/cassandra.php',
'Cassandra\\Statement' => 'cassandra/cassandra.php',
'Cassandra\\Table' => 'cassandra/cassandra.php',
'Cassandra\\Time' => 'cassandra/cassandra.php',
'Cassandra\\Timestamp' => 'cassandra/cassandra.php',
'Cassandra\\TimestampGenerator' => 'cassandra/cassandra.php',
'Cassandra\\TimestampGenerator\\Monotonic' => 'cassandra/cassandra.php',
'Cassandra\\TimestampGenerator\\ServerSide' => 'cassandra/cassandra.php',
'Cassandra\\Timeuuid' => 'cassandra/cassandra.php',
'Cassandra\\Tinyint' => 'cassandra/cassandra.php',
'Cassandra\\Tuple' => 'cassandra/cassandra.php',
'Cassandra\\Type' => 'cassandra/cassandra.php',
'Cassandra\\Type\\Collection' => 'cassandra/cassandra.php',
'Cassandra\\Type\\Custom' => 'cassandra/cassandra.php',
'Cassandra\\Type\\Map' => 'cassandra/cassandra.php',
'Cassandra\\Type\\Scalar' => 'cassandra/cassandra.php',
'Cassandra\\Type\\Set' => 'cassandra/cassandra.php',
'Cassandra\\Type\\Tuple' => 'cassandra/cassandra.php',
'Cassandra\\Type\\UserType' => 'cassandra/cassandra.php',
'Cassandra\\UserTypeValue' => 'cassandra/cassandra.php',
'Cassandra\\Uuid' => 'cassandra/cassandra.php',
'Cassandra\\UuidInterface' => 'cassandra/cassandra.php',
'Cassandra\\Value' => 'cassandra/cassandra.php',
'Cassandra\\Varint' => 'cassandra/cassandra.php',
'ClosedGeneratorException' => 'standard/_types.php',
'Closure' => 'Core/Core_c.php',
'Collator' => 'intl/intl.php',
@ -195,6 +295,11 @@ const CLASSES = array (
'FFI\\ParserException' => 'FFI/FFI.php',
'FilesystemIterator' => 'SPL/SPL_c1.php',
'FilterIterator' => 'SPL/SPL.php',
'GEOSGeometry' => 'geos/geos.php',
'GEOSWKBReader' => 'geos/geos.php',
'GEOSWKBWriter' => 'geos/geos.php',
'GEOSWKTReader' => 'geos/geos.php',
'GEOSWKTWriter' => 'geos/geos.php',
'GMP' => 'gmp/gmp.php',
'GearmanClient' => 'gearman/gearman.php',
'GearmanException' => 'gearman/gearman.php',
@ -718,15 +823,34 @@ const CLASSES = array (
'mysql_xdevapi\\Collection' => 'mysql_xdevapi/mysql_xdevapi.php',
'mysql_xdevapi\\CollectionAdd' => 'mysql_xdevapi/mysql_xdevapi.php',
'mysql_xdevapi\\CollectionFind' => 'mysql_xdevapi/mysql_xdevapi.php',
'mysql_xdevapi\\CollectionModify' => 'mysql_xdevapi/mysql_xdevapi.php',
'mysql_xdevapi\\CollectionRemove' => 'mysql_xdevapi/mysql_xdevapi.php',
'mysql_xdevapi\\ColumnResult' => 'mysql_xdevapi/mysql_xdevapi.php',
'mysql_xdevapi\\CrudOperationBindable' => 'mysql_xdevapi/mysql_xdevapi.php',
'mysql_xdevapi\\CrudOperationLimitable' => 'mysql_xdevapi/mysql_xdevapi.php',
'mysql_xdevapi\\CrudOperationSkippable' => 'mysql_xdevapi/mysql_xdevapi.php',
'mysql_xdevapi\\CrudOperationSortable' => 'mysql_xdevapi/mysql_xdevapi.php',
'mysql_xdevapi\\DatabaseObject' => 'mysql_xdevapi/mysql_xdevapi.php',
'mysql_xdevapi\\DocResult' => 'mysql_xdevapi/mysql_xdevapi.php',
'mysql_xdevapi\\Exception' => 'mysql_xdevapi/mysql_xdevapi.php',
'mysql_xdevapi\\Executable' => 'mysql_xdevapi/mysql_xdevapi.php',
'mysql_xdevapi\\ExecutionStatus' => 'mysql_xdevapi/mysql_xdevapi.php',
'mysql_xdevapi\\Expression' => 'mysql_xdevapi/mysql_xdevapi.php',
'mysql_xdevapi\\Result' => 'mysql_xdevapi/mysql_xdevapi.php',
'mysql_xdevapi\\RowResult' => 'mysql_xdevapi/mysql_xdevapi.php',
'mysql_xdevapi\\Schema' => 'mysql_xdevapi/mysql_xdevapi.php',
'mysql_xdevapi\\SchemaObject' => 'mysql_xdevapi/mysql_xdevapi.php',
'mysql_xdevapi\\Session' => 'mysql_xdevapi/mysql_xdevapi.php',
'mysql_xdevapi\\SqlStatement' => 'mysql_xdevapi/mysql_xdevapi.php',
'mysql_xdevapi\\SqlStatementResult' => 'mysql_xdevapi/mysql_xdevapi.php',
'mysql_xdevapi\\Statement' => 'mysql_xdevapi/mysql_xdevapi.php',
'mysql_xdevapi\\Table' => 'mysql_xdevapi/mysql_xdevapi.php',
'mysql_xdevapi\\TableDelete' => 'mysql_xdevapi/mysql_xdevapi.php',
'mysql_xdevapi\\TableInsert' => 'mysql_xdevapi/mysql_xdevapi.php',
'mysql_xdevapi\\TableSelect' => 'mysql_xdevapi/mysql_xdevapi.php',
'mysql_xdevapi\\TableUpdate' => 'mysql_xdevapi/mysql_xdevapi.php',
'mysql_xdevapi\\Warning' => 'mysql_xdevapi/mysql_xdevapi.php',
'mysql_xdevapi\\XSession' => 'mysql_xdevapi/mysql_xdevapi.php',
'mysqli' => 'mysqli/mysqli.php',
'mysqli_driver' => 'mysqli/mysqli.php',
'mysqli_result' => 'mysqli/mysqli.php',
@ -763,6 +887,11 @@ const FUNCTIONS = array (
'Couchbase\\passthruEncoder' => 'couchbase/couchbase.php',
'Couchbase\\zlibCompress' => 'couchbase/couchbase.php',
'Couchbase\\zlibDecompress' => 'couchbase/couchbase.php',
'GEOSLineMerge' => 'geos/geos.php',
'GEOSPolygonize' => 'geos/geos.php',
'GEOSRelateMatch' => 'geos/geos.php',
'GEOSSharedPaths' => 'geos/geos.php',
'GEOSVersion' => 'geos/geos.php',
'MongoDB\\BSON\\fromJSON' => 'mongodb/mongodb.php',
'MongoDB\\BSON\\fromPHP' => 'mongodb/mongodb.php',
'MongoDB\\BSON\\toJSON' => 'mongodb/mongodb.php',
@ -2610,8 +2739,11 @@ const FUNCTIONS = array (
'lcg_value' => 'standard/standard_8.php',
'lchgrp' => 'standard/standard_7.php',
'lchown' => 'standard/standard_7.php',
'ldap_8859_to_t61' => 'ldap/ldap.php',
'ldap_add' => 'ldap/ldap.php',
'ldap_add_ext' => 'ldap/ldap.php',
'ldap_bind' => 'ldap/ldap.php',
'ldap_bind_ext' => 'ldap/ldap.php',
'ldap_close' => 'ldap/ldap.php',
'ldap_compare' => 'ldap/ldap.php',
'ldap_connect' => 'ldap/ldap.php',
@ -2619,11 +2751,16 @@ const FUNCTIONS = array (
'ldap_control_paged_result_response' => 'ldap/ldap.php',
'ldap_count_entries' => 'ldap/ldap.php',
'ldap_delete' => 'ldap/ldap.php',
'ldap_delete_ext' => 'ldap/ldap.php',
'ldap_dn2ufn' => 'ldap/ldap.php',
'ldap_err2str' => 'ldap/ldap.php',
'ldap_errno' => 'ldap/ldap.php',
'ldap_error' => 'ldap/ldap.php',
'ldap_escape' => 'ldap/ldap.php',
'ldap_exop' => 'ldap/ldap.php',
'ldap_exop_passwd' => 'ldap/ldap.php',
'ldap_exop_refresh' => 'ldap/ldap.php',
'ldap_exop_whoami' => 'ldap/ldap.php',
'ldap_explode_dn' => 'ldap/ldap.php',
'ldap_first_attribute' => 'ldap/ldap.php',
'ldap_first_entry' => 'ldap/ldap.php',
@ -2637,23 +2774,29 @@ const FUNCTIONS = array (
'ldap_get_values_len' => 'ldap/ldap.php',
'ldap_list' => 'ldap/ldap.php',
'ldap_mod_add' => 'ldap/ldap.php',
'ldap_mod_add_ext' => 'ldap/ldap.php',
'ldap_mod_del' => 'ldap/ldap.php',
'ldap_mod_del_ext' => 'ldap/ldap.php',
'ldap_mod_replace' => 'ldap/ldap.php',
'ldap_mod_replace_ext' => 'ldap/ldap.php',
'ldap_modify' => 'ldap/ldap.php',
'ldap_modify_batch' => 'ldap/ldap.php',
'ldap_next_attribute' => 'ldap/ldap.php',
'ldap_next_entry' => 'ldap/ldap.php',
'ldap_next_reference' => 'ldap/ldap.php',
'ldap_parse_exop' => 'ldap/ldap.php',
'ldap_parse_reference' => 'ldap/ldap.php',
'ldap_parse_result' => 'ldap/ldap.php',
'ldap_read' => 'ldap/ldap.php',
'ldap_rename' => 'ldap/ldap.php',
'ldap_rename_ext' => 'ldap/ldap.php',
'ldap_sasl_bind' => 'ldap/ldap.php',
'ldap_search' => 'ldap/ldap.php',
'ldap_set_option' => 'ldap/ldap.php',
'ldap_set_rebind_proc' => 'ldap/ldap.php',
'ldap_sort' => 'ldap/ldap.php',
'ldap_start_tls' => 'ldap/ldap.php',
'ldap_t61_to_8859' => 'ldap/ldap.php',
'ldap_unbind' => 'ldap/ldap.php',
'levenshtein' => 'standard/standard_2.php',
'libxml_clear_errors' => 'libxml/libxml.php',
@ -3011,6 +3154,7 @@ const FUNCTIONS = array (
'mysql_tablename' => 'mysql/mysql.php',
'mysql_thread_id' => 'mysql/mysql.php',
'mysql_unbuffered_query' => 'mysql/mysql.php',
'mysql_xdevapi\\expression' => 'mysql_xdevapi/mysql_xdevapi.php',
'mysql_xdevapi\\getSession' => 'mysql_xdevapi/mysql_xdevapi.php',
'mysqli_affected_rows' => 'mysqli/mysqli.php',
'mysqli_autocommit' => 'mysqli/mysqli.php',
@ -3577,6 +3721,7 @@ const FUNCTIONS = array (
'output_reset_rewrite_vars' => 'standard/standard_9.php',
'pack' => 'standard/standard_7.php',
'parallel\\bootstrap' => 'parallel/parallel.php',
'parallel\\count' => 'parallel/parallel.php',
'parallel\\run' => 'parallel/parallel.php',
'parse_ini_file' => 'standard/standard_4.php',
'parse_ini_string' => 'standard/standard_4.php',
@ -6238,6 +6383,26 @@ const CONSTANTS = array (
'GEOIP_REGION_EDITION_REV0' => 'geoip/geoip.php',
'GEOIP_REGION_EDITION_REV1' => 'geoip/geoip.php',
'GEOIP_UNKNOWN_SPEED' => 'geoip/geoip.php',
'GEOSBUF_CAP_FLAT' => 'geos/geos.php',
'GEOSBUF_CAP_ROUND' => 'geos/geos.php',
'GEOSBUF_CAP_SQUARE' => 'geos/geos.php',
'GEOSBUF_JOIN_BEVEL' => 'geos/geos.php',
'GEOSBUF_JOIN_MITRE' => 'geos/geos.php',
'GEOSBUF_JOIN_ROUND' => 'geos/geos.php',
'GEOSRELATE_BNR_ENDPOINT' => 'geos/geos.php',
'GEOSRELATE_BNR_MOD2' => 'geos/geos.php',
'GEOSRELATE_BNR_MONOVALENT_ENDPOINT' => 'geos/geos.php',
'GEOSRELATE_BNR_MULTIVALENT_ENDPOINT' => 'geos/geos.php',
'GEOSRELATE_BNR_OGC' => 'geos/geos.php',
'GEOSVALID_ALLOW_SELFTOUCHING_RING_FORMING_HOLE' => 'geos/geos.php',
'GEOS_GEOMETRYCOLLECTION' => 'geos/geos.php',
'GEOS_LINEARRING' => 'geos/geos.php',
'GEOS_LINESTRING' => 'geos/geos.php',
'GEOS_MULTILINESTRING' => 'geos/geos.php',
'GEOS_MULTIPOINT' => 'geos/geos.php',
'GEOS_MULTIPOLYGON' => 'geos/geos.php',
'GEOS_POINT' => 'geos/geos.php',
'GEOS_POLYGON' => 'geos/geos.php',
'GLOB_AVAILABLE_FLAGS' => 'standard/standard_defines.php',
'GLOB_BRACE' => 'standard/standard_defines.php',
'GLOB_ERR' => 'standard/standard_defines.php',
@ -6775,12 +6940,41 @@ const CONSTANTS = array (
'LC_MONETARY' => 'standard/standard_defines.php',
'LC_NUMERIC' => 'standard/standard_defines.php',
'LC_TIME' => 'standard/standard_defines.php',
'LDAP_CONTROL_ASSERT' => 'ldap/ldap.php',
'LDAP_CONTROL_DONTUSECOPY' => 'ldap/ldap.php',
'LDAP_CONTROL_MANAGEDSAIT' => 'ldap/ldap.php',
'LDAP_CONTROL_PAGEDRESULTS' => 'ldap/ldap.php',
'LDAP_CONTROL_PASSWORDPOLICYREQUEST' => 'ldap/ldap.php',
'LDAP_CONTROL_PASSWORDPOLICYRESPONSE' => 'ldap/ldap.php',
'LDAP_CONTROL_POST_READ' => 'ldap/ldap.php',
'LDAP_CONTROL_PRE_READ' => 'ldap/ldap.php',
'LDAP_CONTROL_PROXY_AUTHZ' => 'ldap/ldap.php',
'LDAP_CONTROL_SORTREQUEST' => 'ldap/ldap.php',
'LDAP_CONTROL_SORTRESPONSE' => 'ldap/ldap.php',
'LDAP_CONTROL_SUBENTRIES' => 'ldap/ldap.php',
'LDAP_CONTROL_SYNC' => 'ldap/ldap.php',
'LDAP_CONTROL_SYNC_DONE' => 'ldap/ldap.php',
'LDAP_CONTROL_SYNC_STATE' => 'ldap/ldap.php',
'LDAP_CONTROL_VALUESRETURNFILTER' => 'ldap/ldap.php',
'LDAP_CONTROL_VLVREQUEST' => 'ldap/ldap.php',
'LDAP_CONTROL_VLVRESPONSE' => 'ldap/ldap.php',
'LDAP_CONTROL_X_DOMAIN_SCOPE' => 'ldap/ldap.php',
'LDAP_CONTROL_X_EXTENDED_DN' => 'ldap/ldap.php',
'LDAP_CONTROL_X_INCREMENTAL_VALUES' => 'ldap/ldap.php',
'LDAP_CONTROL_X_PERMISSIVE_MODIFY' => 'ldap/ldap.php',
'LDAP_CONTROL_X_SEARCH_OPTIONS' => 'ldap/ldap.php',
'LDAP_CONTROL_X_TREE_DELETE' => 'ldap/ldap.php',
'LDAP_DEREF_ALWAYS' => 'ldap/ldap.php',
'LDAP_DEREF_FINDING' => 'ldap/ldap.php',
'LDAP_DEREF_NEVER' => 'ldap/ldap.php',
'LDAP_DEREF_SEARCHING' => 'ldap/ldap.php',
'LDAP_ESCAPE_DN' => 'ldap/ldap.php',
'LDAP_ESCAPE_FILTER' => 'ldap/ldap.php',
'LDAP_EXOP_MODIFY_PASSWD' => 'ldap/ldap.php',
'LDAP_EXOP_REFRESH' => 'ldap/ldap.php',
'LDAP_EXOP_START_TLS' => 'ldap/ldap.php',
'LDAP_EXOP_TURN' => 'ldap/ldap.php',
'LDAP_EXOP_WHO_AM_I' => 'ldap/ldap.php',
'LDAP_MODIFY_BATCH_ADD' => 'ldap/ldap.php',
'LDAP_MODIFY_BATCH_ATTRIB' => 'ldap/ldap.php',
'LDAP_MODIFY_BATCH_MODTYPE' => 'ldap/ldap.php',
@ -8617,6 +8811,40 @@ const CONSTANTS = array (
'MYSQLX_LOCK_DEFAULT' => 'mysql_xdevapi/mysql_xdevapi.php',
'MYSQLX_LOCK_NOWAIT' => 'mysql_xdevapi/mysql_xdevapi.php',
'MYSQLX_LOCK_SKIP_LOCKED' => 'mysql_xdevapi/mysql_xdevapi.php',
'MYSQLX_TYPE_BIGINT' => 'mysql_xdevapi/mysql_xdevapi.php',
'MYSQLX_TYPE_BIT' => 'mysql_xdevapi/mysql_xdevapi.php',
'MYSQLX_TYPE_BLOB' => 'mysql_xdevapi/mysql_xdevapi.php',
'MYSQLX_TYPE_BYTES' => 'mysql_xdevapi/mysql_xdevapi.php',
'MYSQLX_TYPE_CHAR' => 'mysql_xdevapi/mysql_xdevapi.php',
'MYSQLX_TYPE_DATE' => 'mysql_xdevapi/mysql_xdevapi.php',
'MYSQLX_TYPE_DATETIME' => 'mysql_xdevapi/mysql_xdevapi.php',
'MYSQLX_TYPE_DECIMAL' => 'mysql_xdevapi/mysql_xdevapi.php',
'MYSQLX_TYPE_DOUBLE' => 'mysql_xdevapi/mysql_xdevapi.php',
'MYSQLX_TYPE_ENUM' => 'mysql_xdevapi/mysql_xdevapi.php',
'MYSQLX_TYPE_FLOAT' => 'mysql_xdevapi/mysql_xdevapi.php',
'MYSQLX_TYPE_GEOMETRY' => 'mysql_xdevapi/mysql_xdevapi.php',
'MYSQLX_TYPE_INT' => 'mysql_xdevapi/mysql_xdevapi.php',
'MYSQLX_TYPE_INT24' => 'mysql_xdevapi/mysql_xdevapi.php',
'MYSQLX_TYPE_INTERVAL' => 'mysql_xdevapi/mysql_xdevapi.php',
'MYSQLX_TYPE_JSON' => 'mysql_xdevapi/mysql_xdevapi.php',
'MYSQLX_TYPE_LONG' => 'mysql_xdevapi/mysql_xdevapi.php',
'MYSQLX_TYPE_LONGLONG' => 'mysql_xdevapi/mysql_xdevapi.php',
'MYSQLX_TYPE_LONG_BLOB' => 'mysql_xdevapi/mysql_xdevapi.php',
'MYSQLX_TYPE_MEDIUMINT' => 'mysql_xdevapi/mysql_xdevapi.php',
'MYSQLX_TYPE_MEDIUM_BLOB' => 'mysql_xdevapi/mysql_xdevapi.php',
'MYSQLX_TYPE_NEWDATE' => 'mysql_xdevapi/mysql_xdevapi.php',
'MYSQLX_TYPE_NEWDECIMAL' => 'mysql_xdevapi/mysql_xdevapi.php',
'MYSQLX_TYPE_NULL' => 'mysql_xdevapi/mysql_xdevapi.php',
'MYSQLX_TYPE_SET' => 'mysql_xdevapi/mysql_xdevapi.php',
'MYSQLX_TYPE_SHORT' => 'mysql_xdevapi/mysql_xdevapi.php',
'MYSQLX_TYPE_SMALLINT' => 'mysql_xdevapi/mysql_xdevapi.php',
'MYSQLX_TYPE_STRING' => 'mysql_xdevapi/mysql_xdevapi.php',
'MYSQLX_TYPE_TIME' => 'mysql_xdevapi/mysql_xdevapi.php',
'MYSQLX_TYPE_TIMESTAMP' => 'mysql_xdevapi/mysql_xdevapi.php',
'MYSQLX_TYPE_TINY' => 'mysql_xdevapi/mysql_xdevapi.php',
'MYSQLX_TYPE_TINY_BLOB' => 'mysql_xdevapi/mysql_xdevapi.php',
'MYSQLX_TYPE_VAR_STRING' => 'mysql_xdevapi/mysql_xdevapi.php',
'MYSQLX_TYPE_YEAR' => 'mysql_xdevapi/mysql_xdevapi.php',
'MYSQL_ASSOC' => 'mysql/mysql.php',
'MYSQL_BOTH' => 'mysql/mysql.php',
'MYSQL_CLIENT_COMPRESS' => 'mysql/mysql.php',

View File

@ -1597,6 +1597,29 @@ class ReflectionProperty implements Reflector {
*/
public function setAccessible ($accessible) {}
/**
* Gets property type
* @return ReflectionType|null
* @since 7.4.0
*/
public function getType() {}
/**
* Checks if property has type
* @return bool
* @since 7.4.0
*/
public function hasType() {}
/**
* Checks if property is initialized
* @param object $object [optional]<p>
* If the property is non-static an object must be provided.
* </p>
* @return bool
* @since 7.4.0
*/
public function isInitialized ($object) {}
}
/**

8117
cassandra/cassandra.php Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
version: '2'
services:
php:
image: php:7.3
build: .
volumes:
- .:/opt/project/phpstorm-stubs

745
geos/geos.php Normal file
View File

@ -0,0 +1,745 @@
<?php
/**
* @see https://github.com/libgeos/php-geos/blob/master/tests/000_General.phpt
*/
define('GEOSBUF_CAP_ROUND', 1);
define('GEOSBUF_CAP_FLAT', 2);
define('GEOSBUF_CAP_SQUARE', 3);
define('GEOSBUF_JOIN_ROUND', 1);
define('GEOSBUF_JOIN_MITRE', 2);
define('GEOSBUF_JOIN_BEVEL', 3);
define('GEOS_POINT', 0);
define('GEOS_LINESTRING', 1);
define('GEOS_LINEARRING', 2);
define('GEOS_POLYGON', 3);
define('GEOS_MULTIPOINT', 4);
define('GEOS_MULTILINESTRING', 5);
define('GEOS_MULTIPOLYGON', 6);
define('GEOS_GEOMETRYCOLLECTION', 7);
define('GEOSVALID_ALLOW_SELFTOUCHING_RING_FORMING_HOLE', 1);
define('GEOSRELATE_BNR_MOD2', 1);
define('GEOSRELATE_BNR_OGC', 1);
define('GEOSRELATE_BNR_ENDPOINT', 2);
define('GEOSRELATE_BNR_MULTIVALENT_ENDPOINT', 3);
define('GEOSRELATE_BNR_MONOVALENT_ENDPOINT', 4);
/**
* @return string
*/
function GEOSVersion(): string {}
/**
* @param GEOSGeometry $geom1
* @param GEOSGeometry $geom2
* @return GEOSGeometry
* @throws Exception
*/
function GEOSSharedPaths(GEOSGeometry $geom1, GEOSGeometry $geom2): GEOSGeometry {}
/**
* @param GEOSGeometry $geom
* @return array
* @throws Exception
*/
function GEOSLineMerge(GEOSGeometry $geom): array {}
/**
* @param string $matrix
* @param string $pattern
* @return bool
* @throws Exception
*/
function GEOSRelateMatch(string $matrix, string $pattern): bool {}
/**
* @param GEOSGeometry $geom
* @return array
* - 'rings'
* Type: array of GEOSGeometry
* Rings that can be formed by the costituent
* linework of geometry.
* - 'cut_edges' (optional)
* Type: array of GEOSGeometry
* Edges which are connected at both ends but
* which do not form part of polygon.
* - 'dangles'
* Type: array of GEOSGeometry
* Edges which have one or both ends which are
* not incident on another edge endpoint
* - 'invalid_rings'
* Type: array of GEOSGeometry
* Edges which form rings which are invalid
* (e.g. the component lines contain a self-intersection)
* @throws Exception
*/
function GEOSPolygonize(GEOSGeometry $geom): array {}
/**
* Class GEOSWKTReader
* @see https://github.com/libgeos/php-geos/blob/master/tests/003_WKTReader.phpt
*/
class GEOSWKTReader
{
/**
* GEOSWKTReader constructor.
*/
public function __construct() {}
/**
* @param string $wkt
* @return GEOSGeometry
* @throws Exception
*/
public function read(string $wkt): GEOSGeometry {}
}
/**
* Class GEOSWKTWriter
* @see https://github.com/libgeos/php-geos/blob/master/tests/002_WKTWriter.phpt
*/
class GEOSWKTWriter
{
/**
* GEOSWKTWriter constructor.
*/
public function __construct() {}
/**
* @param GEOSGeometry $geom
* @return string
* @throws Exception
*/
public function write(GEOSGeometry $geom): string {}
/**
* @param bool $trim
*/
public function setTrim(bool $trim): void {}
/**
* @param int $precision
*/
public function setRoundingPrecision(int $precision): void {}
/**
* @param int $dimension
* @throws Exception
*/
public function setOutputDimension(int $dimension): void {}
/**
* @return int
*/
public function getOutputDimension(): int {}
/**
* @param bool $old3d
*/
public function setOld3D(bool $old3d): void {}
}
/**
* Class GEOSGeometry
* @see https://github.com/libgeos/php-geos/blob/master/tests/001_Geometry.phpt
*/
class GEOSGeometry
{
/**
* GEOSGeometry constructor.
*/
public function __construct() {}
/**
* @return string
* @throws Exception
*/
public function __toString(): string {}
/**
* @param GEOSGeometry $geom
* @return GEOSGeometry
* @throws Exception
*/
public function project(GEOSGeometry $geom): GEOSGeometry {}
/**
* @param float $distance
* @param bool $normalized
* @return GEOSGeometry
* @throws Exception
*/
public function interpolate(float $distance, bool $normalized = false): GEOSGeometry {}
/**
* @param float $distance
* @param array $styleArray
* Keys supported:
* 'quad_segs'
* Type: int
* Number of segments used to approximate
* a quarter circle (defaults to 8).
* 'endcap'
* Type: long
* Endcap style (defaults to GEOSBUF_CAP_ROUND)
* 'join'
* Type: long
* Join style (defaults to GEOSBUF_JOIN_ROUND)
* 'mitre_limit'
* Type: double
* mitre ratio limit (only affects joins with GEOSBUF_JOIN_MITRE style)
* 'miter_limit' is also accepted as a synonym for 'mitre_limit'.
* 'single_sided'
* Type: bool
* If true buffer lines only on one side, so that the input line
* will be a portion of the boundary of the returned polygon.
* Only applies to lineal input. Defaults to false.
* @return GEOSGeometry
* @throws Exception
*/
public function buffer(float $distance, array $styleArray = [
'quad_segs' => 8,
'endcap' => GEOSBUF_CAP_ROUND,
'join' => GEOSBUF_JOIN_ROUND,
'mitre_limit' => 5.0,
'single_sided' => false
]): GEOSGeometry {}
/**
* @param float $distance
* @param array $styleArray
* Keys supported:
* 'quad_segs'
* Type: int
* Number of segments used to approximate
* a quarter circle (defaults to 8).
* 'join'
* Type: long
* Join style (defaults to GEOSBUF_JOIN_ROUND)
* 'mitre_limit'
* Type: double
* mitre ratio limit (only affects joins with GEOSBUF_JOIN_MITRE style)
* 'miter_limit' is also accepted as a synonym for 'mitre_limit'.
* @return GEOSGeometry
* @throws Exception
*/
public function offsetCurve(float $distance, array $styleArray = [
'quad_segs' => 8,
'join' => GEOSBUF_JOIN_ROUND,
'mitre_limit' => 5.0
]): GEOSGeometry {}
/**
* @return GEOSGeometry
* @throws Exception
*/
public function envelope(): GEOSGeometry {}
/**
* @param GEOSGeometry $geom
* @return GEOSGeometry
* @throws Exception
*/
public function intersection(GEOSGeometry $geom): GEOSGeometry {}
/**
* @return GEOSGeometry
* @throws Exception
*/
public function convexHull(): GEOSGeometry {}
/**
* @param GEOSGeometry $geom
* @return GEOSGeometry
* @throws Exception
*/
public function difference(GEOSGeometry $geom): GEOSGeometry {}
/**
* @param GEOSGeometry $geom
* @return GEOSGeometry
* @throws Exception
*/
public function symDifference(GEOSGeometry $geom): GEOSGeometry {}
/**
* @return GEOSGeometry
* @throws Exception
*/
public function boundary(): GEOSGeometry {}
/**
* @param GEOSGeometry|null $geom
* @return GEOSGeometry
* @throws Exception
*/
public function union(GEOSGeometry $geom = null): GEOSGeometry {}
/**
* @return GEOSGeometry
* @throws Exception
*/
public function pointOnSurface(): GEOSGeometry {}
/**
* @return GEOSGeometry
* @throws Exception
*/
public function centroid(): GEOSGeometry {}
/**
* @param GEOSGeometry $geom
* @param string|null $pattern
* @return bool|string
* @throws Exception
*/
public function relate(GEOSGeometry $geom, string $pattern = null) {}
/**
* @param GEOSGeometry $geom
* @param int $rule
* @return string
* @throws Exception
*/
public function relateBoundaryNodeRule(GEOSGeometry $geom, int $rule = GEOSRELATE_BNR_OGC): string {}
/**
* @param float $tolerance
* @param bool $preserveTopology
* @return GEOSGeometry
* @throws Exception
*/
public function simplify(float $tolerance, bool $preserveTopology = false): GEOSGeometry {}
/**
* @return GEOSGeometry
* @throws Exception
*/
public function normalize(): GEOSGeometry {}
/**
* @param float $gridSize
* @param int $flags
* @return GEOSGeometry
* @throws Exception
*/
public function setPrecision(float $gridSize, int $flags = 0): GEOSGeometry {}
/**
* @return float
*/
public function getPrecision(): float {}
/**
* @return GEOSGeometry
* @throws Exception
*/
public function extractUniquePoints(): GEOSGeometry {}
/**
* @param GEOSGeometry $geom
* @return bool
* @throws Exception
*/
public function disjoint(GEOSGeometry $geom): bool {}
/**
* @param GEOSGeometry $geom
* @return bool
* @throws Exception
*/
public function touches(GEOSGeometry $geom): bool {}
/**
* @param GEOSGeometry $geom
* @return bool
* @throws Exception
*/
public function intersects(GEOSGeometry $geom): bool {}
/**
* @param GEOSGeometry $geom
* @return bool
* @throws Exception
*/
public function crosses(GEOSGeometry $geom): bool {}
/**
* @param GEOSGeometry $geom
* @return bool
* @throws Exception
*/
public function within(GEOSGeometry $geom): bool {}
/**
* @param GEOSGeometry $geom
* @return bool
* @throws Exception
*/
public function contains(GEOSGeometry $geom): bool {}
/**
* @param GEOSGeometry $geom
* @return bool
* @throws Exception
*/
public function overlaps(GEOSGeometry $geom): bool {}
/**
* @param GEOSGeometry $geom
* @return bool
* @throws Exception
*/
public function covers(GEOSGeometry $geom): bool {}
/**
* @param GEOSGeometry $geom
* @return bool
* @throws Exception
*/
public function coveredBy(GEOSGeometry $geom): bool {}
/**
* @param GEOSGeometry $geom
* @return bool
* @throws Exception
*/
public function equals(GEOSGeometry $geom): bool {}
/**
* @param GEOSGeometry $geom
* @param float $tolerance
* @return bool
* @throws Exception
*/
public function equalsExact(GEOSGeometry $geom, float $tolerance = 0): bool {}
/**
* @return bool
* @throws Exception
*/
public function isEmpty(): bool {}
/**
* @return array
* @throws Exception
*/
public function checkValidity(): array {}
/**
* @return bool
* @throws Exception
*/
public function isSimple(): bool {}
/**
* @return bool
* @throws Exception
*/
public function isRing(): bool {}
/**
* @return bool
* @throws Exception
*/
public function hasZ(): bool {}
/**
* @return bool
* @throws Exception
*/
public function isClosed(): bool {}
/**
* @return string
* @throws Exception
*/
public function typeName(): string {}
/**
* @return int
* @throws Exception
*/
public function typeId(): int {}
/**
* @return int
*/
public function getSRID(): int {}
/**
* @param int $srid
* @throws Exception
*/
public function setSRID(int $srid): void {}
/**
* @return int
* @throws Exception
*/
public function numGeometries(): int {}
/**
* @param int $n
* @return GEOSGeometry
* @throws Exception
*/
public function geometryN(int $n): GEOSGeometry {}
/**
* @return int
* @throws Exception
*/
public function numInteriorRings(): int {}
/**
* @return int
* @throws Exception
*/
public function numPoints(): int {}
/**
* @return float
* @throws Exception
*/
public function getX(): float {}
/**
* @return float
* @throws Exception
*/
public function getY(): float {}
/**
* @param int $n
* @return GEOSGeometry
* @throws Exception
*/
public function interiorRingN(int $n): GEOSGeometry {}
/**
* @return GEOSGeometry
* @throws Exception
*/
public function exteriorRing(): GEOSGeometry {}
/**
* @return int
* @throws Exception
*/
public function numCoordinates(): int {}
/**
* @return int
* @throws Exception
*/
public function dimension(): int {}
/**
* @return int
* @throws Exception
*/
public function coordinateDimension(): int {}
/**
* @param int $n
* @return GEOSGeometry
* @throws Exception
*/
public function pointN(int $n): GEOSGeometry {}
/**
* @return GEOSGeometry
* @throws Exception
*/
public function startPoint(): GEOSGeometry {}
/**
* @return GEOSGeometry
* @throws Exception
*/
public function endPoint(): GEOSGeometry {}
/**
* @return float
* @throws Exception
*/
public function area(): float {}
/**
* @return float
* @throws Exception
*/
public function length(): float {}
/**
* @param GEOSGeometry $geom
* @return float
* @throws Exception
*/
public function distance(GEOSGeometry $geom): float {}
/**
* @param GEOSGeometry $geom
* @return float
* @throws Exception
*/
public function hausdorffDistance(GEOSGeometry $geom): float {}
/**
* @param GEOSGeometry $geom
* @param float $tolerance
* @return GEOSGeometry
*/
public function snapTo(GEOSGeometry $geom, float $tolerance): GEOSGeometry {}
/**
* @return GEOSGeometry
* @throws Exception
*/
public function node(): GEOSGeometry {}
/**
* @param float $tolerance Snapping tolerance to use for improved robustness
* @param bool $onlyEdges if true, will return a MULTILINESTRING,
* otherwise (the default) it will return a GEOMETRYCOLLECTION containing triangular POLYGONs.
* @return GEOSGeometry
* @throws Exception
*/
public function delaunayTriangulation(float $tolerance = 0.0, bool $onlyEdges = false): GEOSGeometry {}
/**
* @param float $tolerance Snapping tolerance to use for improved robustness
* @param bool $onlyEdges If true will return a MULTILINESTRING,
* otherwise (the default) it will return a GEOMETRYCOLLECTION containing POLYGONs.
* @param GEOSGeometry|null $extent Clip returned diagram by the extent of the given geometry
* @return GEOSGeometry
* @throws Exception
*/
public function voronoiDiagram(float $tolerance = 0.0, bool $onlyEdges = false, GEOSGeometry $extent = null): GEOSGeometry {}
/**
* @param float $xmin
* @param float $ymin
* @param float $xmax
* @param float $ymax
* @return GEOSGeometry
* @throws Exception
*/
public function clipByRect(float $xmin, float $ymin, float $xmax, float $ymax): GEOSGeometry {}
}
/**
* Class GEOSWKBWriter
* @see https://github.com/libgeos/php-geos/blob/master/tests/004_WKBWriter.phpt
*/
class GEOSWKBWriter
{
/**
* GEOSWKBWriter constructor.
*/
public function __construct() {}
/**
* @return int
*/
public function getOutputDimension(): int {}
/**
* @param int $dimension
* @throws Exception
*/
public function setOutputDimension(int $dimension): void {}
/**
* @return int
*/
public function getByteOrder(): int {}
/**
* @param int $byteOrder
* @throws Exception
*/
public function setByteOrder(int $byteOrder): void {}
/**
* @return int
*/
public function getIncludeSRID(): int {}
/**
* @param int $srid
* @throws Exception
*/
public function setIncludeSRID(int $srid): void {}
/**
* @param GEOSGeometry $geom
* @return string
* @throws Exception
*/
public function write(GEOSGeometry $geom): string {}
/**
* @param GEOSGeometry $geom
* @return string
* @throws Exception
*/
public function writeHEX(GEOSGeometry $geom): string {}
}
/**
* Class GEOSWKBReader
* @see https://github.com/libgeos/php-geos/blob/master/tests/005_WKBReader.phpt
*/
class GEOSWKBReader
{
/**
* GEOSWKBReader constructor.
*/
public function __construct() {}
/**
* @param string $wkb
* @return GEOSGeometry
* @throws Exception
*/
public function read(string $wkb): GEOSGeometry {}
/**
* @param string $wkb
* @return GEOSGeometry
* @throws Exception
*/
public function readHEX(string $wkb): GEOSGeometry {}
}

View File

@ -513,7 +513,7 @@ namespace Grpc
* @throws \InvalidArgumentException
*/
public static function createSsl(
$pem_root_certs,
$pem_root_certs = '',
$pem_private_key = '',
$pem_cert_chain = ''
) {}

View File

@ -2,6 +2,87 @@
// Start of ldap v.
/**
* PASSWD extended operation helper
* @link https://www.php.net/manual/en/function.ldap-exop-passwd.php
* @param resource $link An LDAP link identifier, returned by ldap_connect().
* @param string $user [optional] dn of the user to change the password of.
* @param string $oldpw [optional] The old password of this user. May be ommited depending of server configuration.
* @param string $newpw [optional] The new password for this user. May be omitted or empty to have a generated password.
* @param array $serverctrls [optional] If provided, a password policy request control is send with the request and this is filled with an array of LDAP Controls returned with the request.
* @return mixed Returns the generated password if newpw is empty or omitted. Otherwise returns TRUE on success and FALSE on failure.
* @since 7.2
*/
function ldap_exop_passwd ($link , $user = "" , $oldpw = "" , $newpw = "" , array &$serverctrls = []) {}
/**
* Refresh extended operation helper
* @link https://www.php.net/manual/en/function.ldap-exop-refresh.php
* @param resource $link An LDAP link identifier, returned by ldap_connect().
* @param string $dn dn of the entry to refresh.
* @param int $ttl $ttl Time in seconds (between 1 and 31557600) that the client requests that the entry exists in the directory before being automatically removed.
* @return mixed From RFC: The responseTtl field is the time in seconds which the server chooses to have as the time-to-live field for that entry. It must not be any smaller than that which the client requested, and it may be larger. However, to allow servers to maintain a relatively accurate directory, and to prevent clients from abusing the dynamic extensions, servers are permitted to shorten a client-requested time-to-live value, down to a minimum of 86400 seconds (one day). FALSE will be returned on error.
* @since 7.3
*/
function ldap_exop_refresh ($link, $dn ,$ttl) {}
/**
* WHOAMI extended operation helper
* @link https://www.php.net/manual/en/function.ldap-exop-whoami.php
* @param resource $link An LDAP link identifier, returned by ldap_connect().
* @return mixed The data returned by the server, or FALSE on error.
* @since 7.2
*/
function ldap_exop_whoami ($link) {}
/**
* Performs an extended operation on the specified link with reqoid the OID of the operation and reqdata the data.
* @link https://www.php.net/manual/en/function.ldap-exop.php
* @param resource $link An LDAP link identifier, returned by ldap_connect().
* @param string $reqoid The extended operation request OID. You may use one of LDAP_EXOP_START_TLS, LDAP_EXOP_MODIFY_PASSWD, LDAP_EXOP_REFRESH, LDAP_EXOP_WHO_AM_I, LDAP_EXOP_TURN, or a string with the OID of the operation you want to send.
* @param string $reqdata [optional] The extended operation request data. May be NULL for some operations like LDAP_EXOP_WHO_AM_I, may also need to be BER encoded.
* @param array $serverctrls [optional] If provided, a password policy request control is send with the request and this is filled with an array of LDAP Controls returned with the request.
* @param string $retdata [optional] Will be filled with the extended operation response data if provided. If not provided you may use ldap_parse_exop on the result object later to get this data.
* @param string $retoid [optional] Will be filled with the response OID if provided, usually equal to the request OID.
* @return mixed When used with retdata, returns TRUE on success or FALSE on error. When used without retdata, returns a result identifier or FALSE on error.
* @since 7.2
*/
function ldap_exop ($link , $reqoid , $reqdata = null , $serverctrls = [], &$retdata, &$retoid) {}
/**
* Parse LDAP extended operation data from result object result
* @link https://www.php.net/manual/en/function.ldap-parse-exop.php
* @param resource $link An LDAP link identifier, returned by ldap_connect().
* @param resource $result An LDAP result resource, returned by ldap_exop().
* @param string $retdata [optional] Will be filled by the response data.
* @param string $retoid [optional] Will be filled by the response OID.
* @return bool Returns TRUE on success or FALSE on failure.
* @since 7.2
*/
function ldap_parse_exop ($link , $result, &$retdata, &$retoid) {}
/**
* Translate 8859 characters to t61 characters
* @link https://www.php.net/manual/en/function.ldap-8859-to-t61.php
* @param string $value
* @return string
* @since 4.0.2
* @since 5.0
* @since 7.0
*/
function ldap_8859_to_t61($value) {}
/**
* Translate t61 characters to 8859 characters
* @link https://www.php.net/manual/en/function.ldap-t61-to-8859.php
* @param string $value
* @return string
* @since 4.0.2
* @since 5.0
* @since 7.0
*/
function ldap_t61_to_8859($value) {}
/**
* Connect to an LDAP server
* @link https://php.net/manual/en/function.ldap-connect.php
@ -49,9 +130,26 @@ function ldap_close ($link_identifier) {}
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
* @since 4.0
* @since 5.0
* @since 7.0
*/
function ldap_bind ($link_identifier, $bind_rdn = null, $bind_password = null) {}
/**
* Bind to LDAP directory
* Does the same thing as ldap_bind() but returns the LDAP result resource to be parsed with ldap_parse_result().
* @link https://php.net/manual/en/function.ldap-bind.php
* @param resource $link_identifier <p>
* An LDAP link identifier, returned by <b>ldap_connect</b>.
* </p>
* @param string $bind_rdn [optional]
* @param string $bind_password [optional]
* @param array $serverctrls [optional] Array of LDAP Controls to send with the request.
* @return resource
* @since 7.3
*/
function ldap_bind_ext ($link_identifier, $bind_rdn = null, $bind_password = null, $serverctrls = []) {}
/**
* Bind to LDAP directory using SASL
* @link https://php.net/manual/en/function.ldap-sasl-bind.php
@ -139,11 +237,12 @@ function ldap_unbind ($link_identifier) {}
* one of the following:
* <b>LDAP_DEREF_NEVER</b> - (default) aliases are never
* dereferenced.
* @param array $serverctrls [optional] Array of LDAP Controls to send with the request.
* @return resource|false a search result identifier or <b>FALSE</b> on error.
* @since 4.0
* @since 5.0
*/
function ldap_read ($link_identifier, $base_dn, $filter, array $attributes = null, $attrsonly = null, $sizelimit = null, $timelimit = null, $deref = null) {}
function ldap_read ($link_identifier, $base_dn, $filter, array $attributes = null, $attrsonly = null, $sizelimit = null, $timelimit = null, $deref = null, $serverctrls = []) {}
/**
* Single-level search
@ -198,11 +297,12 @@ function ldap_read ($link_identifier, $base_dn, $filter, array $attributes = nul
* one of the following:
* <b>LDAP_DEREF_NEVER</b> - (default) aliases are never
* dereferenced.
* @param array $serverctrls [optional] Array of LDAP Controls to send with the request.
* @return resource|false a search result identifier or <b>FALSE</b> on error.
* @since 4.0
* @since 5.0
*/
function ldap_list ($link_identifier, $base_dn, $filter, array $attributes = null, $attrsonly = null, $sizelimit = null, $timelimit = null, $deref = null) {}
function ldap_list ($link_identifier, $base_dn, $filter, array $attributes = null, $attrsonly = null, $sizelimit = null, $timelimit = null, $deref = null, $serverctrls = []) {}
/**
* Search LDAP tree
@ -261,11 +361,12 @@ function ldap_list ($link_identifier, $base_dn, $filter, array $attributes = nul
* one of the following:
* <b>LDAP_DEREF_NEVER</b> - (default) aliases are never
* dereferenced.
* @param array $serverctrls [optional] Array of LDAP Controls to send with the request.
* @return resource|false a search result identifier or <b>FALSE</b> on error.
* @since 4.0
* @since 5.0
*/
function ldap_search ($link_identifier, $base_dn, $filter, array $attributes = null, $attrsonly = null, $sizelimit = null, $timelimit = null, $deref = null) {}
function ldap_search ($link_identifier, $base_dn, $filter, array $attributes = null, $attrsonly = null, $sizelimit = null, $timelimit = null, $deref = null, $serverctrls = []) {}
/**
* Free result memory
@ -501,11 +602,39 @@ function ldap_dn2ufn ($dn) {}
* $entree["attribut2"][1] = "value2";
* </code>
* </p>
* @param array $serverctrls [optional] Array of LDAP Controls to send with the request.
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
* @since 4.0
* @since 5.0
*/
function ldap_add ($link_identifier, $dn, array $entry) {}
function ldap_add ($link_identifier, $dn, array $entry, $serverctrls = []) {}
/**
* Add entries to LDAP directory
* Does the same thing as ldap_add() but returns the LDAP result resource to be parsed with ldap_parse_result().
* @link https://www.php.net/manual/en/function.ldap-add-ext.php
* @param resource $link_identifier <p>
* An LDAP link identifier, returned by <b>ldap_connect</b>.
* </p>
* @param string $dn <p>
* The distinguished name of an LDAP entity.
* </p>
* @param array $entry <p>
* An array that specifies the information about the entry. The values in
* the entries are indexed by individual attributes.
* In case of multiple values for an attribute, they are indexed using
* integers starting with 0.
* <code>
* $entree["attribut1"] = "value";
* $entree["attribut2"][0] = "value1";
* $entree["attribut2"][1] = "value2";
* </code>
* </p>
* @param array $serverctrls [optional] Array of LDAP Controls to send with the request.
* @return resource
* @since 7.4
*/
function ldap_add_ext ($link_identifier, $dn, array $entry, $serverctrls = []) {}
/**
* Delete an entry from a directory
@ -516,15 +645,34 @@ function ldap_add ($link_identifier, $dn, array $entry) {}
* @param string $dn <p>
* The distinguished name of an LDAP entity.
* </p>
* @param array $serverctrls [optional] Array of LDAP Controls to send with the request.
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
* @since 4.0
* @since 5.0
* @since 7.0
*/
function ldap_delete ($link_identifier, $dn) {}
function ldap_delete ($link_identifier, $dn, $serverctrls = []) {}
/**
* Modify an LDAP entry
* @link https://php.net/manual/en/function.ldap-modify.php
* Delete an entry from a directory
* Does the same thing as ldap_delete() but returns the LDAP result resource to be parsed with ldap_parse_result().
* @link https://php.net/manual/en/function.ldap-delete-ext.php
* @param resource $link_identifier <p>
* An LDAP link identifier, returned by <b>ldap_connect</b>.
* </p>
* @param string $dn <p>
* The distinguished name of an LDAP entity.
* </p>
* @param array $serverctrls [optional] Array of LDAP Controls to send with the request.
* @return resource
* @since 7.3
*/
function ldap_delete_ext ($link_identifier, $dn, $serverctrls = []) {}
/**
* This function is an alias of: ldap_mod_replace().
* Replace attribute values with new ones
* @link https://php.net/manual/en/function.ldap-mod-replace.php
* @param resource $link_identifier <p>
* An LDAP link identifier, returned by <b>ldap_connect</b>.
* </p>
@ -532,11 +680,13 @@ function ldap_delete ($link_identifier, $dn) {}
* The distinguished name of an LDAP entity.
* </p>
* @param array $entry
* @param array $serverctrls [optional] Array of LDAP Controls to send with the request.
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
* @since 4.0
* @since 5.0
* @since 7.0
*/
function ldap_modify ($link_identifier, $dn, array $entry) {}
function ldap_modify ($link_identifier, $dn, array $entry, $serverctrls = []) {}
/**
* Add attribute values to current attributes
@ -548,11 +698,32 @@ function ldap_modify ($link_identifier, $dn, array $entry) {}
* The distinguished name of an LDAP entity.
* </p>
* @param array $entry
* @param array $serverctrls [optional] Array of LDAP Controls to send with the request.
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
* @since 4.0
* @since 5.0
* @since 7.0
*/
function ldap_mod_add ($link_identifier, $dn, array $entry) {}
function ldap_mod_add ($link_identifier, $dn, array $entry, $serverctrls = []) {}
/**
* Add attribute values to current attributes
* Does the same thing as ldap_mod_add() but returns the LDAP result resource to be parsed with ldap_parse_result().
* @link https://php.net/manual/en/function.ldap-mod-add-ext.php
* @param resource $link_identifier <p>
* An LDAP link identifier, returned by <b>ldap_connect</b>.
* </p>
* @param string $dn <p>
* The distinguished name of an LDAP entity.
* </p>
* @param array $entry
* @param array $serverctrls [optional] Array of LDAP Controls to send with the request.
* @return resource
* @since 4.0
* @since 5.0
* @since 7.0
*/
function ldap_mod_add_ext ($link_identifier, $dn, array $entry, $serverctrls = []) {}
/**
* Replace attribute values with new ones
@ -564,11 +735,30 @@ function ldap_mod_add ($link_identifier, $dn, array $entry) {}
* The distinguished name of an LDAP entity.
* </p>
* @param array $entry
* @param array $serverctrls [optional] Array of LDAP Controls to send with the request.
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
* @since 4.0
* @since 5.0
* @since 7.0
*/
function ldap_mod_replace ($link_identifier, $dn, array $entry) {}
function ldap_mod_replace ($link_identifier, $dn, array $entry, $serverctrls = []) {}
/**
* Replace attribute values with new ones
* Does the same thing as ldap_mod_replace() but returns the LDAP result resource to be parsed with ldap_parse_result().
* @link https://php.net/manual/en/function.ldap-mod-replace-ext.php
* @param resource $link_identifier <p>
* An LDAP link identifier, returned by <b>ldap_connect</b>.
* </p>
* @param string $dn <p>
* The distinguished name of an LDAP entity.
* </p>
* @param array $entry
* @param array $serverctrls [optional] Array of LDAP Controls to send with the request.
* @return resource
* @since 7.3
*/
function ldap_mod_replace_ext ($link_identifier, $dn, array $entry, $serverctrls = []) {}
/**
* Delete attribute values from current attributes
@ -580,11 +770,30 @@ function ldap_mod_replace ($link_identifier, $dn, array $entry) {}
* The distinguished name of an LDAP entity.
* </p>
* @param array $entry
* @param array $serverctrls [optional] Array of LDAP Controls to send with the request.
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
* @since 4.0
* @since 5.0
* @since 7.0
*/
function ldap_mod_del ($link_identifier, $dn, array $entry) {}
function ldap_mod_del ($link_identifier, $dn, array $entry, $serverctrls = []) {}
/**
* Delete attribute values from current attributes
* Does the same thing as ldap_mod_del() but returns the LDAP result resource to be parsed with ldap_parse_result().
* @link https://php.net/manual/en/function.ldap-mod-del-ext.php
* @param resource $link_identifier <p>
* An LDAP link identifier, returned by <b>ldap_connect</b>.
* </p>
* @param string $dn <p>
* The distinguished name of an LDAP entity.
* </p>
* @param array $entry
* @param array $serverctrls [optional] Array of LDAP Controls to send with the request.
* @return resource
* @since 7.3
*/
function ldap_mod_del_ext ($link_identifier, $dn, array $entry, $serverctrls = []) {}
/**
* Return the LDAP error number of the last LDAP command
@ -638,12 +847,14 @@ function ldap_error ($link_identifier) {}
* @param string $value <p>
* The compared value.
* </p>
* @param array $serverctrls [optional] Array of LDAP Controls to send with the request.
* @return mixed <b>TRUE</b> if <i>value</i> matches otherwise returns
* <b>FALSE</b>. Returns -1 on error.
* @since 4.0.2
* @since 5.0
* @since 7.0
*/
function ldap_compare ($link_identifier, $dn, $attribute, $value) {}
function ldap_compare ($link_identifier, $dn, $attribute, $value, $serverctrls = []) {}
/**
* Sort LDAP result entries
@ -684,11 +895,39 @@ function ldap_sort ($link, $result, $sortfilter) {}
* If <b>TRUE</b> the old RDN value(s) is removed, else the old RDN value(s)
* is retained as non-distinguished values of the entry.
* </p>
* @param array $serverctrls [optional] Array of LDAP Controls to send with the request.
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
* @since 4.0.5
* @since 5.0
* @since 7.0
*/
function ldap_rename ($link_identifier, $dn, $newrdn, $newparent, $deleteoldrdn) {}
function ldap_rename ($link_identifier, $dn, $newrdn, $newparent, $deleteoldrdn, $serverctrls = []) {}
/**
* Modify the name of an entry
* Does the same thing as ldap_rename() but returns the LDAP result resource to be parsed with ldap_parse_result().
* @link https://php.net/manual/en/function.ldap-rename-ext.php
* @param resource $link_identifier <p>
* An LDAP link identifier, returned by <b>ldap_connect</b>.
* </p>
* @param string $dn <p>
* The distinguished name of an LDAP entity.
* </p>
* @param string $newrdn <p>
* The new RDN.
* </p>
* @param string $newparent <p>
* The new parent/superior entry.
* </p>
* @param bool $deleteoldrdn <p>
* If <b>TRUE</b> the old RDN value(s) is removed, else the old RDN value(s)
* is retained as non-distinguished values of the entry.
* </p>
* @param array $serverctrls [optional] Array of LDAP Controls to send with the request.
* @return resource
* @since 7.3
*/
function ldap_rename_ext ($link_identifier, $dn, $newrdn, $newparent, $deleteoldrdn, $serverctrls = []) {}
/**
* Get the current value for given option
@ -910,11 +1149,12 @@ function ldap_parse_reference ($link, $entry, array &$referrals) {}
* @param string $matcheddn [optional]
* @param string $errmsg [optional]
* @param array $referrals [optional]
* @param array $serverctrls [optional] An array of LDAP Controls which have been sent with the response.
* @return bool
* @since 4.0.5
* @since 5.0
*/
function ldap_parse_result ($link, $result, &$errcode, &$matcheddn = null, &$errmsg = null, array &$referrals = null) {}
function ldap_parse_result ($link, $result, &$errcode, &$matcheddn = null, &$errmsg = null, array &$referrals = null, &$serverctrls = []) {}
/**
* Start TLS
@ -957,6 +1197,7 @@ function ldap_set_rebind_proc ($link, callable $callback) {}
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
* @since 5.4.0
* @deprecated Since 7.4
*/
function ldap_control_paged_result ($link, $pagesize, $iscritical = false, $cookie = "") {}
@ -975,18 +1216,20 @@ function ldap_control_paged_result ($link, $pagesize, $iscritical = false, $cook
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
* @since 5.4.0
* @deprecated Since 7.4
*/
function ldap_control_paged_result_response ($link, $result, &$cookie = null, &$estimated = null) {}
/**
* @param $subject
* @param $ignore [optional]
* @param $escape [optional] LDAP_ESCAPE_FILTER|LDAP_ESCAPE_DN or null
* Escape a string for use in an LDAP filter or DN
* @param string $value The value to escape.
* @param string $ignore [optional] Characters to ignore when escaping.
* @param int $flags [optional] The context the escaped string will be used in: LDAP_ESCAPE_FILTER for filters to be used with ldap_search(), or LDAP_ESCAPE_DN for DNs. If neither flag is passed, all chars are escaped.
* @return string
* @since 5.6.0
*/
function ldap_escape($subject, $ignore = null, $escape = null) {}
function ldap_escape ($value, $ignore = "", $flags = 0) {}
/**
* (PHP 5.4 &gt;= 5.4.26, PHP 5.5 &gt;= 5.5.10, PHP 5.6 &gt;= 5.6.0)
@ -1063,10 +1306,11 @@ function ldap_escape($subject, $ignore = null, $escape = null) {}
* any value for <em>modtype</em> must be one of the
* <b>LDAP_MODIFY_BATCH_*</b> constants listed above.
* </p></p>
* @param array $serverctrls [optional] Array of LDAP Controls to send with the request.
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
* @since 5.4.0
*/
function ldap_modify_batch ( $link_identifier , $dn , $entry) {}
function ldap_modify_batch ( $link_identifier , $dn , $entry, $serverctrls = []) {}
define('LDAP_ESCAPE_FILTER', 1);
define ('LDAP_ESCAPE_DN', 2);
@ -1203,5 +1447,200 @@ define('LDAP_OPT_TIMEOUT', 20482);
define('LDAP_OPT_DIAGNOSTIC_MESSAGE', 50);
/**
* Control Constant - Manage DSA IT (» RFC 3296)
* @link https://php.net/manual/en/ldap.constants.php
* @since 7.3
*/
define("LDAP_CONTROL_MANAGEDSAIT", "2.16.840.1.113730.3.4.2");
echo
/**
* Control Constant - Proxied Authorization (» RFC 4370)
* @link https://php.net/manual/en/ldap.constants.php
* @since 7.3
*/
define("LDAP_CONTROL_PROXY_AUTHZ", "2.16.840.1.113730.3.4.18");
/**
* Control Constant - Subentries (» RFC 3672)
* @link https://php.net/manual/en/ldap.constants.php
* @since 7.3
*/
define("LDAP_CONTROL_SUBENTRIES", "1.3.6.1.4.1.4203.1.10.1");
/**
* Control Constant - Filter returned values (» RFC 3876)
* @link https://php.net/manual/en/ldap.constants.php
* @since 7.3
*/
define("LDAP_CONTROL_VALUESRETURNFILTER", "1.2.826.0.1.3344810.2.3");
/**
* Control Constant - Assertion (» RFC 4528)
* @link https://php.net/manual/en/ldap.constants.php
* @since 7.3
*/
define("LDAP_CONTROL_ASSERT", "1.3.6.1.1.12");
/**
* Control Constant - Pre read (» RFC 4527)
* @link https://php.net/manual/en/ldap.constants.php
* @since 7.3
*/
define("LDAP_CONTROL_PRE_READ", "1.3.6.1.1.13.1");
/**
* Control Constant - Post read (» RFC 4527)
* @link https://php.net/manual/en/ldap.constants.php
* @since 7.3
*/
define("LDAP_CONTROL_POST_READ", "1.3.6.1.1.13.2");
/**
* Control Constant - Sort request (» RFC 2891)
* @link https://php.net/manual/en/ldap.constants.php
* @since 7.3
*/
define("LDAP_CONTROL_SORTREQUEST", "1.2.840.113556.1.4.473");
/**
* Control Constant - Sort response (» RFC 2891)
* @link https://php.net/manual/en/ldap.constants.php
* @since 7.3
*/
define("LDAP_CONTROL_SORTRESPONSE", "1.2.840.113556.1.4.474");
/**
* Control Constant - Paged results (» RFC 2696)
* @link https://php.net/manual/en/ldap.constants.php
* @since 7.3
*/
define("LDAP_CONTROL_PAGEDRESULTS", "1.2.840.113556.1.4.319");
/**
* Control Constant - Content Synchronization Operation (» RFC 4533)
* @link https://php.net/manual/en/ldap.constants.php
* @since 7.3
*/
define("LDAP_CONTROL_SYNC", "1.3.6.1.4.1.4203.1.9.1.1");
/**
* Control Constant - Content Synchronization Operation State (» RFC 4533)
* @link https://php.net/manual/en/ldap.constants.php
* @since 7.3
*/
define("LDAP_CONTROL_SYNC_STATE", "1.3.6.1.4.1.4203.1.9.1.2");
/**
* Control Constant - Content Synchronization Operation Done (» RFC 4533)
* @link https://php.net/manual/en/ldap.constants.php
* @since 7.3
*/
define("LDAP_CONTROL_SYNC_DONE", "1.3.6.1.4.1.4203.1.9.1.3");
/**
* Control Constant - Don't Use Copy (» RFC 6171)
* @link https://php.net/manual/en/ldap.constants.php
* @since 7.3
*/
define("LDAP_CONTROL_DONTUSECOPY", "1.3.6.1.1.22");
/**
* Control Constant - Password Policy Request
* @link https://php.net/manual/en/ldap.constants.php
* @since 7.3
*/
define("LDAP_CONTROL_PASSWORDPOLICYREQUEST", "1.3.6.1.4.1.42.2.27.8.5.1");
/**
* Control Constant - Password Policy Response
* @link https://php.net/manual/en/ldap.constants.php
* @since 7.3
*/
define("LDAP_CONTROL_PASSWORDPOLICYRESPONSE", "1.3.6.1.4.1.42.2.27.8.5.1");
/**
* Control Constant - Active Directory Incremental Values
* @link https://php.net/manual/en/ldap.constants.php
* @since 7.3
*/
define("LDAP_CONTROL_X_INCREMENTAL_VALUES", "1.2.840.113556.1.4.802");
/**
* Control Constant - Active Directory Domain Scope
* @link https://php.net/manual/en/ldap.constants.php
* @since 7.3
*/
define("LDAP_CONTROL_X_DOMAIN_SCOPE", "1.2.840.113556.1.4.1339");
/**
* Control Constant - Active Directory Permissive Modify
* @link https://php.net/manual/en/ldap.constants.php
* @since 7.3
*/
define("LDAP_CONTROL_X_PERMISSIVE_MODIFY", "1.2.840.113556.1.4.1413");
/**
* Control Constant - Active Directory Search Options
* @link https://php.net/manual/en/ldap.constants.php
* @since 7.3
*/
define("LDAP_CONTROL_X_SEARCH_OPTIONS", "1.2.840.113556.1.4.1340");
/**
* Control Constant - Active Directory Tree Delete
* @link https://php.net/manual/en/ldap.constants.php
* @since 7.3
*/
define("LDAP_CONTROL_X_TREE_DELETE", "1.2.840.113556.1.4.805");
/**
* Control Constant - Active Directory Extended DN
* @link https://php.net/manual/en/ldap.constants.php
* @since 7.3
*/
define("LDAP_CONTROL_X_EXTENDED_DN", "1.2.840.113556.1.4.529");
/**
* Control Constant - Virtual List View Request
* @link https://php.net/manual/en/ldap.constants.php
* @since 7.3
*/
define("LDAP_CONTROL_VLVREQUEST", "2.16.840.1.113730.3.4.9");
/**
* Control Constant - Virtual List View Response
* @link https://php.net/manual/en/ldap.constants.php
* @since 7.3
*/
define("LDAP_CONTROL_VLVRESPONSE", "2.16.840.1.113730.3.4.10");
/**
* Extended Operation constant - Modify password
*/
define("LDAP_EXOP_MODIFY_PASSWD", "1.3.6.1.4.1.4203.1.11.1");
/**
* Extended Operation Constant - Refresh
*/
define("LDAP_EXOP_REFRESH", "1.3.6.1.4.1.1466.101.119.1");
/**
* Extended Operation constant - Start TLS
*/
define("LDAP_EXOP_START_TLS", "1.3.6.1.4.1.1466.20037");
/**
* Extended Operation Constant - Turn
*/
define("LDAP_EXOP_TURN", "1.3.6.1.1.19");
/**
* Extended Operation Constant - WHOAMI
*/
define("LDAP_EXOP_WHO_AM_I", "1.3.6.1.4.1.4203.1.11.3");
// End of ldap v.
?>

View File

@ -835,7 +835,7 @@ function mb_convert_variables ($to_encoding, $from_encoding, &...$vars) {}
* </p>
* @param string $encoding &mbstring.encoding.parameter;
* @param bool $is_hex [optional]
* @return string The converted string.
* @return string|false|null The converted string.
* @since 4.0.6
* @since 5.0
*/
@ -852,7 +852,7 @@ function mb_encode_numericentity ($str, array $convmap, $encoding = null, $is_he
* the code area to convert.
* </p>
* @param string $encoding &mbstring.encoding.parameter;
* @return string The converted string.
* @return string|false|null The converted string.
* @since 4.0.6
* @since 5.0
*/

View File

@ -505,6 +505,20 @@ namespace PHPSTORM_META {
expectedArguments(\yaml_emit(), 1, YAML_ANY_ENCODING, YAML_UTF8_ENCODING, YAML_UTF16LE_ENCODING, YAML_UTF16BE_ENCODING);
expectedArguments(\yaml_emit(), 2, YAML_ANY_BREAK, YAML_CR_BREAK, YAML_LN_BREAK, YAML_CRLN_BREAK);
expectedArguments(\AMQPExchange::delete(), 1, AMQP_NOPARAM, AMQP_IFUNUSED);
expectedArguments(\AMQPExchange::publish(), 2, AMQP_NOPARAM | AMQP_MANDATORY | AMQP_IMMEDIATE);
expectedArguments(\AMQPExchange::setFlags(), 0, AMQP_PASSIVE | AMQP_DURABLE | AMQP_AUTODELETE | AMQP_INTERNAL);
expectedReturnValues(\AMQPExchange::getFlags(), AMQP_PASSIVE | AMQP_DURABLE | AMQP_AUTODELETE | AMQP_INTERNAL);
expectedArguments(\AMQPQueue::ack(), 1, AMQP_NOPARAM, AMQP_MULTIPLE);
expectedArguments(\AMQPQueue::consume(), 1, AMQP_NOPARAM | AMQP_AUTOACK | AMQP_JUST_CONSUME | AMQP_NOLOCAL);
expectedArguments(\AMQPQueue::delete(), 0, AMQP_NOPARAM | AMQP_IFUNUSED | AMQP_IFEMPTY);
expectedArguments(\AMQPQueue::get(), 0, AMQP_NOPARAM, AMQP_AUTOACK);
expectedArguments(\AMQPQueue::nack(), 1, AMQP_NOPARAM | AMQP_REQUEUE | AMQP_MULTIPLE);
expectedArguments(\AMQPQueue::reject(), 1, AMQP_NOPARAM, AMQP_REQUEUE);
expectedArguments(\AMQPQueue::setFlags(), 0, AMQP_NOPARAM | AMQP_DURABLE | AMQP_PASSIVE | AMQP_EXCLUSIVE | AMQP_AUTODELETE);
expectedReturnValues(\AMQPQueue::getFlags(), AMQP_NOPARAM | AMQP_DURABLE | AMQP_PASSIVE | AMQP_EXCLUSIVE | AMQP_AUTODELETE);
// override( \ServiceLocatorInterface::get(0),
// map( [
// "A" => \Exception::class,

View File

@ -1551,7 +1551,7 @@ namespace MongoDB {}
* Returns the command document
* The reply document will be converted from BSON to PHP using the default deserialization rules (e.g. BSON documents will be converted to stdClass).
* @link https://secure.php.net/manual/en/mongodb-driver-monitoring-commandstartedevent.getcommand.php
* @return string the command document as a stdClass object.
* @return object the command document as a stdClass object.
* @throws \InvalidArgumentException on argument parsing errors.
* @since 1.3.0
*/

File diff suppressed because it is too large Load Diff

View File

@ -3,33 +3,43 @@
namespace parallel;
use Closure;
use parallel\Runtime\Error\Bootstrap;
/**
* Shall use the provided file to bootstrap all runtimes created for automatic scheduling via parallel\run().
* Shall use the provided file to bootstrap all runtimes created for automatic scheduling via @see run().
*
* @param string $file
*
* @return void
*
* @throws Bootstrap if previously called for this process.
* @throws Bootstrap if called after parallel\run().
* @throws Runtime\Error\Bootstrap if previously called for this process.
* @throws Runtime\Error\Bootstrap if called after @see run().
*/
function bootstrap(string $file) {}
function bootstrap(string $file) : void{}
/**
* @see Runtime::run for run details and schematics
* @see Runtime::run() for more details
*
* @param Closure $task A Closure with specific characteristics.
* @param array|null $argv An array of arguments with specific characteristics to be passed to task at execution time.
* @param Closure $task
* @param array $argv
*
* @return Future
* Warning: The return \parallel\Future must not be ignored when the task contains a return or throw statement.
* ### Automatic Scheduling
* ---------------------------------------------------------------------------------------------------------------------
* If a \parallel\Runtime internally created and cached by a previous call to parallel\run() is idle, it will be used
* to execute the task. If no \parallel\Runtime is idle parallel will create and cache a \parallel\Runtime.
*
* @throws Runtime\Error\Closed if Runtime was closed.
* Note: \parallel\Runtime objects created by the programmer are not used for automatic scheduling.
*
* @return Future|null
*
* @throws Runtime\Error\Closed if \parallel\Runtime was closed.
* @throws Runtime\Error\IllegalFunction if task is a closure created from an internal function.
* @throws Runtime\Error\IllegalInstruction if task contains illegal instructions.
* @throws Runtime\Error\IllegalParameter if task accepts or argv contains illegal variables.
* @throws Runtime\Error\IllegalReturn if task returns illegally.
*/
function run(Closure $task, array $argv = null) : Future {}
function run(Closure $task, array $argv = null) : ?Future{}
#ifdef ZEND_DEBUG
/**
* @return int
*/
function count() : int{}
#endif

View File

@ -2,61 +2,107 @@
namespace parallel;
use parallel\Channel\Error\Closed;
use parallel\Channel\Error\Existence;
use parallel\Channel\Error\IllegalValue;
/**
* ### Unbuffered Channels
* ---------------------------------------------------------------------------------------------------------------------
* An unbuffered channel will block on calls to @see Channel::send() until there is a receiver, and block on calls
* to @see Channel::recv() until there is a sender. This means an unbuffered channel is not only a way to share
* data among tasks but also a simple method of synchronization.
*
* An unbuffered channel is the fastest way to share data among tasks, requiring the least copying.
*
* ### Buffered Channels
* ---------------------------------------------------------------------------------------------------------------------
* A buffered channel will not block on calls to @see Channel::send() until capacity is reached, calls to
* @see Channel::recv() will block until there is data in the buffer.
*
* ### Closures over Channels
* ---------------------------------------------------------------------------------------------------------------------
* A powerful feature of parallel channels is that they allow the exchange of closures between tasks (and runtimes).
*
* When a closure is sent over a channel the closure is buffered, it doesn't change the buffering of the channel
* transmitting the closure, but it does effect the static scope inside the closure: The same closure sent to
* different runtimes, or the same runtime, will not share their static scope.
*
* This means that whenever a closure is executed that was transmitted by a channel, static state will be as it was
* when the closure was buffered.
*
* ### Anonymous Channels
* ---------------------------------------------------------------------------------------------------------------------
* The anonymous channel constructor allows the programmer to avoid assigning names to every channel: parallel will
* generate a unique name for anonymous channels.
*/
final class Channel{
final class Channel
{
public const Infinite = -1;
/**
* Constant for Infinitely Buffered
*/
public const Infinite = -1;
/**
* Without capacity argument: Shall make an unbuffered channel with the given name.
* With capacity argument: Shall make a buffered channel with the given name and capacity
*
* @param string $name The name of the channel.
* @param int|null $capacity May be Channel::Infinite or a positive integer
*
* @return Channel
*
* @throws Existence if channel already exists.
*/
public static function make(string $name, int $capacity = null): Channel {}
/* Anonymous Constructor */
/**
* Shall open the channel with the given name.
*
* @param string $name The name of the channel.
*
* @return Channel
*
* @throws Existence if channel does not exist.
*/
public static function open(string $name): Channel {}
/**
* Shall make an anonymous unbuffered channel
* Shall make an anonymous buffered channel with the given capacity
*
* @param int $capacity May be Channel::Infinite or a positive integer
*/
public function __construct(int $capacity = null){}
/**
* Shall recv a value from this channel.
*
* @return mixed
*
* @throws Closed if channel is closed.
*/
public function recv() {}
/* Access */
/**
* Shall send the given value on this channel
*
* @param mixed $value
*
* @throws Closed if channel is closed.
* @throws IllegalValue if value is illegal. (Same arguments characteristics apply as for Runtime::run.)
*/
public function send($value): void {}
/**
* Shall make an unbuffered channel with the given name
* Shall make a buffered channel with the given name and capacity
*
* @param string $name The name of the channel.
* @param int $capacity May be Channel::Infinite or a positive integer
*
* @return Channel
*
* @throws Channel\Error\Existence if channel already exists.
*/
public static function make(string $name, int $capacity = null) : Channel{}
/**
* Shall close this channel.
*
* @throws Closed if channel is closed.
*/
public function close(): void {}
}
/**
* Shall open the channel with the given name
*
* @param string $name
* @return Channel
*
* @throws Channel\Error\Existence if channel does not exist.
*/
public static function open(string $name) : Channel{}
/* Sharing */
/**
* Shall send the given value on this channel
* @param mixed $value
*
* @throws Channel\Error\Closed if channel is closed.
* @throws Channel\Error\IllegalValue if value is illegal.
*/
public function send($value) : void{}
/**
* Shall recv a value from this channel
* @return mixed
*
* @throws Channel\Error\Closed if channel is closed.
*/
public function recv(){}
/* Closing */
/**
* Shall close this channel
* @throws Channel\Error\Closed if channel is closed.
*/
public function close() : void{}
/**
* Returns name of channel
* @return string
*/
public function __toString() : string{}
}

View File

@ -2,8 +2,5 @@
namespace parallel\Channel;
use parallel\Error as ParallelError;
class Error extends ParallelError
{
}
class Error extends \parallel\Error{
}

View File

@ -4,6 +4,5 @@ namespace parallel\Channel\Error;
use parallel\Channel\Error;
class Closed extends Error
{
}
class Closed extends Error{
}

View File

@ -4,6 +4,5 @@ namespace parallel\Channel\Error;
use parallel\Channel\Error;
class Existence extends Error
{
}
class Existence extends Error{
}

View File

@ -4,6 +4,5 @@ namespace parallel\Channel\Error;
use parallel\Channel\Error;
class IllegalValue extends Error
{
}
class IllegalValue extends Error{
}

View File

@ -2,8 +2,5 @@
namespace parallel;
use Error as CoreError;
class Error extends CoreError
{
}
class Error extends \Error{
}

View File

@ -2,102 +2,111 @@
namespace parallel;
use parallel\Events\Error;
use parallel\Events\Error\Existence;
use parallel\Events\Error\Timeout;
use parallel\Events\Event;
use parallel\Events\Input;
use Countable;
use parallel\Events\{Event, Input};
use Traversable;
final class Events
{
/**
* Shall set input for this event loop.
*
* @param Input $input
*
* @return void
*/
public function setInput(Input $input): void {}
/**
* ### The Event Loop
* ---------------------------------------------------------------------------------------------------------------------
* The Event loop monitors the state of sets of futures and or channels (targets) in order to perform read
* (Future::value(), Channel::recv()) and write (Channel::send()) operations as the targets become available and the
* operations may be performed without blocking the event loop.
*/
final class Events implements Countable, Traversable{
/**
* Shall watch for events on the given channel.
*
* @param Channel $channel
*
* @return void
*
* @throws Existence if channel was already added.
*/
public function addChannel(Channel $channel): void {}
/* Input */
/**
* Shall watch for events on the given future.
*
* @param string $name
* @param Future $future
*
* @return void
*
* @throws Existence if target with the given name was already added.
*/
public function addFuture(string $name, Future $future): void {}
/**
* Shall set input for this event loop
* @param Events\Input $input
*/
public function setInput(Input $input) : void{}
/**
* Shall remove the given target.
*
* @param string $target
*
* @return void
*
* @throws Existence if target with the given name was not found.
*/
public function remove(string $target): void {}
/* Targets */
/**
* Shall set blocking mode.
*
* By default when events are polled for, blocking will occur (at the PHP level) until the first event can be
* returned: Setting blocking mode to false will cause poll to return control if the first target polled is not
* ready.
*
* This differs from setting a timeout of 0 with parallel\Events::setTimeout(), since a timeout of 0, while
* allowed, will cause an exception to be raised, which may be extremely slow or wasteful if what is really
* desired is non-blocking behaviour.
*
* A non-blocking loop effects the return value of parallel\Events::poll(), such that it may be null before all
* events have been processed.
*
* @param bool $blocking
*
* @return void
*
* @throws Error if loop has timeout set.
*/
public function setBlocking(bool $blocking): void {}
/**
* Shall watch for events on the given channel
* @param Channel $channel
*
* @throws Events\Error\Existence if channel was already added.
*/
public function addChannel(Channel $channel) : void{}
/**
* Shall set the timeout in microseconds.
*
* By default when events are polled for, blocking will occur (at the PHP level) until the first event can be
* returned: Setting the timeout causes an exception to be thrown when the timeout is reached
*
* This differs from setting blocking mode to false with parallel\Events::setBlocking(), which will not cause an
* exception to be thrown.
*
* @param int $timeout
*
* @return void
*
* @throws Error if loop is non-blocking.
*/
public function setTimeout(int $timeout): void {}
/**
* Shall watch for events on the given future
*
* @param string $name
* @param Future $future
*
* @throws Events\Error\Existence if target with the given name was already added.
*/
public function addFuture(string $name, Future $future) : void{}
/**
* Shall poll for the next event.
*
* @return Event|null Should there be no targets remaining, null shall be returned. Should this be a non-blocking loop, and blocking would occur, null shall be returned. Otherwise Event is returned.
*
* @throws Timeout if timeout is used and reached.
*/
public function poll(): Event {}
}
/**
* Shall remove the given target
* @param string $target
*
* @throws Events\Error\Existence if target with the given name was not found.
*/
public function remove(string $target) : void{}
/* Behaviour */
/**
* Shall set blocking mode
*
* By default when events are polled for, blocking will occur (at the PHP level) until the first event can be
* returned: Setting blocking mode to false will cause poll to return control if the first target polled is not
* ready.
*
* This differs from setting a timeout of 0 with @see Events::setTimeout(), since a timeout of 0, while
* allowed, will cause an exception to be raised, which may be extremely slow or wasteful if what is really desired
* is non-blocking behaviour.
*
* A non-blocking loop effects the return value of @see Events::poll(), such that it may be null before all events
* have been processed.
*
* @param bool $blocking
*
* @throws Events\Error if loop has timeout set.
*/
public function setBlocking(bool $blocking) : void{}
/* Behaviour */
/**
* Shall set the timeout in microseconds
*
* By default when events are polled for, blocking will occur (at the PHP level) until the first event can be
* returned: Setting the timeout causes an exception to be thrown when the timeout is reached.
*
* This differs from setting blocking mode to false with @see Events::setBlocking(), which will not cause an
* exception to be thrown.
*
* @throws Events\Error if loop is non-blocking.
*
* @param int $timeout
*/
public function setTimeout(int $timeout) : void{}
/* Polling */
/**
* Shall poll for the next event
*
* Should there be no targets remaining, null shall be returned
* Should this be a non-blocking loop, and blocking would occur, null shall be returned
* Otherwise, the Event returned describes the event.
*
* @return Event|null
*
* @throws Events\Error\Timeout if timeout is used and reached.
*/
public function poll() : ?Event{}
/**
* @return int
*/
public function count() : int{}
}

View File

@ -2,8 +2,5 @@
namespace parallel\Events;
use parallel\Error as ParallelError;
class Error extends ParallelError
{
}
class Error extends \parallel\Error{
}

View File

@ -4,6 +4,5 @@ namespace parallel\Events\Error;
use parallel\Events\Error;
class Existence extends Error
{
}
class Existence extends Error{
}

View File

@ -4,6 +4,5 @@ namespace parallel\Events\Error;
use parallel\Events\Error;
class Timeout extends Error
{
}
class Timeout extends Error{
}

View File

@ -3,36 +3,31 @@
namespace parallel\Events;
/**
* When an Event is returned, Event::$object shall be removed from the loop that returned it, should the event be a
* write event the Input for Event::$source shall also be removed.
* When an Event is returned, @see Event::$object shall be removed from the loop that returned it, should the event be a
* write event the Input for @see Event::$source shall also be removed.
*/
final class Event
{
/**
* Shall be one of Event\Type constants.
*
* @var int
*/
public $type;
final class Event{
/**
* Shall be one of Event\Type constants
* @var int
*/
public $type;
/**
* Shall be the source of the event (target name).
*
* @var string
*/
public $source;
/**
* Shall be the source of the event (target name)
* @var string
*/
public $source;
/**
* Shall be either Future or Channel.
*
* @var object
*/
public $object;
/**
* Shall be either Future or Channel
* @var object
*/
public $object;
/***
* Shall be set for Read/Error events.
*
* @var mixed
*/
public $value;
}
/**
* Shall be set for Read/Error events
* @var mixed
*/
public $value;
}

View File

@ -0,0 +1,6 @@
<?php
namespace parallel\Events\Event;
class Error extends \parallel\Error{
}

View File

@ -2,51 +2,22 @@
namespace parallel\Events\Event;
/**
* The values of all constants are an implementation detail and cannot be relied upon.
* @link https://github.com/krakjoe/parallel/issues/37#issuecomment-493502459
*/
final class Type
{
/**
* Event::$object was read into Event::$value
*
* @var int
*/
public const Read = null;
final class Type{
/** Event::$object was read into Event::$value */
public const Read = 1;
/**
* Input for Event::$source written to Event::$object
*
* @var int
*/
public const Write = null;
/** Input for Event::$source written to Event::$object */
public const Write = 2;
/**
* Event::$object (Channel) was closed
*
* @var int
*/
public const Close = null;
/** Event::$object (Channel) was closed */
public const Close = 3;
/**
* Event::$object (Future) was cancelled
*
* @var int
*/
public const Cancel = null;
/** Event::$object (Future) was cancelled */
public const Cancel = 5;
/**
* Runtime executing Event::$object (Future) was killed
*
* @var int
*/
public const Kill = null;
/** Runtime executing Event::$object (Future) was killed */
public const Kill = 6;
/**
* Event::$object (Future) raised error
*
* @var int
*/
public const Error = null;
}
/** Event::$object (Future) raised error */
public const Error = 4;
}

View File

@ -2,37 +2,38 @@
namespace parallel\Events;
use parallel\Events\Input\Error\Existence;
use parallel\Events\Input\Error\IllegalValue;
/**
* ### Events Input
* ---------------------------------------------------------------------------------------------------------------------
* An Input object is a container for data that the @see \parallel\Events object will write to @see \parallel\Channel
* objects as they become available. Multiple event loops may share an Input container - parallel does not verify the
* contents of the container when it is set as the input for a \parallel\Events object.
*
* Note: When a parallel\Events object performs a write, the target is removed from the input object as if
* @see Input::remove() were called.
*/
final class Input{
final class Input
{
/**
* Shall set input for the given target
*
* @param string $target
* @param mixed $value
*
* @return void
*
* @throws Existence if input for target already exists.
* @throws IllegalValue if value is illegal (object, null).
*/
public function add(string $target, $value): void {}
/**
* Shall set input for the given target
*
* @param string $target
* @param mixed $value
*
* @throws Input\Error\Existence if input for target already exists.
* @throws Input\Error\IllegalValue if value is illegal (object, null).
*/
public function add(string $target, $value) : void{}
/**
* Shall remove input for the given target.
*
* @param string $target
*
* @throws Existence if input for target does not exist.
*/
public function remove(string $target): void {}
/**
* Shall remove input for the given target
* @param string $target
* @throws Input\Error\Existence if input for target does not exist.
*/
public function remove(string $target) : void{}
/**
* Shall remove input for all targets.
*
* @return void
*/
public function clear(): void {}
}
/**
* Shall remove input for all targets
*/
public function clear() : void{}
}

View File

@ -2,8 +2,5 @@
namespace parallel\Events\Input;
use parallel\Error as ParallelError;
class Error extends ParallelError
{
}
class Error extends \parallel\Error{
}

View File

@ -4,6 +4,5 @@ namespace parallel\Events\Input\Error;
use parallel\Events\Input\Error;
class Existence extends Error
{
}
class Existence extends Error{
}

View File

@ -4,6 +4,5 @@ namespace parallel\Events\Input\Error;
use parallel\Events\Input\Error;
class IllegalValue extends Error
{
}
class IllegalValue extends Error{
}

View File

@ -2,45 +2,58 @@
namespace parallel;
use parallel\Future\Error;
use Throwable;
final class Future
{
/**
* Shall return (and if necessary wait for) return from task.
*
* @throws Error if waiting failed (internal error).
* @throws Error\Killed if the Runtime executing task was killed.
* @throws Error\Cancelled if task was already cancelled.
* @throws Error\Foreign if task raised an unrecognized uncaught exception.
* @throws Throwable Shall rethrow \Throwable uncaught in task
*
* @return mixed
*/
public function value() {}
/**
* A Future represents the return value or uncaught exception from a task, and exposes an API for cancellation.
*
* The behaviour of a future also allows it to be used as a simple synchronization point even where the task does not
* return a value explicitly.
*
* @examples https://www.php.net/manual/ru/class.parallel-future.php
*/
final class Future{
/**
* Shall indicate if the task was cancelled.
*
* @return bool
*/
public function cancelled(): bool {}
/* Resolution */
/**
* Shall indicate if the task is completed.
*
* @return bool
*/
public function done(): bool {}
/**
* Shall return (and if necessary wait for) return from task
*
* @return mixed
*
* @throws Future\Error if waiting failed (internal error).
* @throws Future\Error\Killed if \parallel\Runtime executing task was killed.
* @throws Future\Error\Cancelled if task was cancelled.
* @throws Future\Error\Foreign if task raised an unrecognized uncaught exception.
* @throws Throwable Shall rethrow \Throwable uncaught in task
*/
public function value(){}
/**
* Shall try to cancel the task
*
* @throws Error\Killed if the Runtime executing task was killed.
* @throws Error\Cancelled if task was already cancelled.
*
* @return bool
*/
public function cancel(): bool {}
}
/* State */
/**
* Shall indicate if the task is completed
* @return bool
*/
public function done() : bool{}
/**
* Shall indicate if the task was cancelled
* @return bool
*/
public function cancelled() : bool{}
/* Cancellation */
/**
* Shall try to cancel the task
* Note: If task is running, it will be interrupted.
* Warning: Internal function calls in progress cannot be interrupted.
*
* @return bool
*
* @throws Future\Error\Killed if \parallel\Runtime executing task was killed.
* @throws Future\Error\Cancelled if task was already cancelled.
*/
public function cancel() : bool{}
}

View File

@ -2,8 +2,5 @@
namespace parallel\Future;
use parallel\Error as ParallelError;
class Error extends ParallelError
{
}
class Error extends \parallel\Error{
}

View File

@ -2,8 +2,7 @@
namespace parallel\Future\Error;
use parallel\Future\Error;
use parallel\Error;
class Cancelled extends Error
{
}
class Cancelled extends Error{
}

View File

@ -2,8 +2,7 @@
namespace parallel\Future\Error;
use parallel\Future\Error;
use parallel\Error;
class Foreign extends Error
{
}
class Foreign extends Error{
}

View File

@ -2,8 +2,7 @@
namespace parallel\Future\Error;
use parallel\Future\Error;
use parallel\Error;
class Killed extends Error
{
}
class Killed extends Error{
}

View File

@ -3,81 +3,115 @@
namespace parallel;
use Closure;
use parallel\Runtime\Bootstrap;
use parallel\Runtime\Error;
final class Runtime
{
/**
* When passed a bootstrap file: Shall construct a bootstrapped runtime.
* Without a passed bootstrap file: Shall construct a new runtime without bootstrapping.
*
* @param string|null $bootstrap The location of a bootstrap file, generally an autoloader.
*
* @throws Error if thread could not be created.
* @throws Bootstrap if bootstrapping failed.
*/
public function __construct($bootstrap = null) {}
/**
* Each runtime represents a single PHP thread, the thread is created (and bootstrapped) upon construction. The thread
* then waits for tasks to be scheduled: Scheduled tasks will be executed FIFO and then the thread will resume waiting
* until more tasks are scheduled, or it's closed, killed, or destroyed by the normal scoping rules of PHP objects.
*
* Warning: When a runtime is destroyed by the normal scoping rules of PHP objects, it will first execute all of the
* tasks that were scheduled, and block while doing so.
*
* When a new runtime is created, it does not share code with the thread (or process) that created it. This means it
* doesn't have the same classes and functions loaded, nor the same autoloader set. In some cases, a very lightweight
* runtime is desirable because the tasks that will be scheduled do not need access to the code in the parent thread.
* In those cases where the tasks do need to access the same code, it is enough to set an autoloader as the bootstrap.
*
* Note: preloading may be used in conjunction with parallel, in this case preloaded code is available without
* bootstrapping
*/
final class Runtime{
/**
* Shall schedule task for execution in parallel, passing argv at execution time when available.
*
* @param Closure $task A Closure with specific characteristics.
* @param array|null $argv
*
* Task Characteristics:
* Closures scheduled for parallel execution must not:
*
* accept or return by reference
* accept or return objects (that are not closures)
* execute a limited set of instructions
* Instructions prohibited in Closures intended for parallel execution are:
*
* yield
* use by-reference
* declare class
* declare named function
*
* Note:Nested closures may yield or use by-reference, but must not contain class or named function declarations.
* Note:No instructions are prohibited in the files which the task may include.
*
* Arguments Characteristics
* Arguments must not:
*
* contain references
* contain objects (that are not closures)
* contain resources
*
* Note: In the case of file stream resources, the resource will be cast to the file descriptor and passed as int
* where possible, this is unsupported on Windows.
*
* @return Future|null Returns a Future when the passed $task containers a return or throw statement, otherwise null.
* Warning: The return \parallel\Future must not be ignored when the task contains a return or throw statement.
*
* @throws Error\Closed if Runtime was closed.
* @throws Error\IllegalFunction if task is a closure created from an internal function.
* @throws Error\IllegalInstruction if task contains illegal instructions.
* @throws Error\IllegalParameter if task accepts or argv contains illegal variables.
* @throws Error\IllegalReturn if task returns illegally.
*/
public function run(Closure $task , array $argv = null) : Future {}
/* Create */
/**
* Shall request that the runtime shutsdown.
*
* Note: Tasks scheduled for execution will be executed before the shutdown occurs.
*
* @throws Error\Closed if Runtime was closed.
*/
public function close(): void {}
/**
* Shall construct a new runtime without bootstrapping.
* Shall construct a bootstrapped runtime.
*
* @param string $bootstrap The location of a bootstrap file, generally an autoloader.
*
* @throws Runtime\Error if thread could not be created
* @throws Runtime\Error\Bootstrap if bootstrapping failed
*/
public function __construct(string $bootstrap = null){}
/**
* Shall attempt to force the runtime to shutdown.
*
* Note: Tasks scheduled for execution will not be executed, the currently running task shall be interrupted.
* Warning: Internal function calls in progress cannot be interrupted.
*
* @throws Error\Closed if Runtime was closed.
*/
public function kill(): void {}
}
/* Execute */
/**
* Shall schedule task for execution in parallel, passing argv at execution time.
*
* @param Closure $task A Closure with specific characteristics.
* @param array $argv An array of arguments with specific characteristics to be passed to task at execution
* time.
*
* ### Task Characteristics
* -----------------------------------------------------------------------------------------------------------------
* Closures scheduled for parallel execution must not:
* - accept or return by reference
* - accept or return internal objects (see notes)
* - execute a limited set of instructions
*
* Instructions prohibited in Closures intended for parallel execution are:
* - yield
* - use by-reference
* - declare class
* - declare named function
*
* Note: Nested closures may yield or use by-reference, but must not contain class or named function declarations.
* Note: No instructions are prohibited in the files which the task may include.
*
* ### Arguments Characteristics
* -----------------------------------------------------------------------------------------------------------------
* Arguments must not:
* - contain references
* - contain resources
* - contain internal objects (see notes)
*
* Note: In the case of file stream resources, the resource will be cast to the file descriptor and passed as int
* where possible, this is unsupported on Windows
*
* ### Internal Objects Notes
* -----------------------------------------------------------------------------------------------------------------
* Internal objects generally use a custom structure which cannot be copied by value safely, PHP currently lacks
* the mechanics to do this (without serialization) and so only objects that do not use a custom structure may
* be shared.
*
* Some internal objects do not use a custom structure, for example @see \parallel\Events\Event and so may be
* shared. Closures are a special kind of internal object and support being copied by value, and so may be
* shared. Channels are central to writing parallel code and support concurrent access and execution by
* necessity, and so may be shared.
*
* Warning: A user class that extends an internal class may use a custom structure as defined by the internal
* class, in which case they cannot be copied by value safely, and so may not be shared.
*
* @return Future|null The return Future must not be ignored when the task contains a return or throw
* statement.
*
* @throws Runtime\Error\Closed if \parallel\Runtime was closed.
* @throws Runtime\Error\IllegalFunction if task is a closure created from an internal function.
* @throws Runtime\Error\IllegalInstruction if task contains illegal instructions.
* @throws Runtime\Error\IllegalParameter if task accepts or argv contains illegal variables.
* @throws Runtime\Error\IllegalReturn if task returns illegally.
*/
public function run(Closure $task, array $argv = null) : ?Future{}
/* Join */
/**
* Shall request that the runtime shutsdown.
* Note: Tasks scheduled for execution will be executed before the shutdown occurs.
*
* @throws Runtime\Error\Closed if Runtime was already closed.
*/
public function close() : void{}
/**
* Shall attempt to force the runtime to shutdown.
*
* Note: Tasks scheduled for execution will not be executed, the currently running task shall be interrupted.
* Warning: Internal function calls in progress cannot be interrupted.
*
* @throws Runtime\Error\Closed if Runtime was closed.
*/
public function kill() : void{}
}

View File

@ -1,7 +0,0 @@
<?php
namespace parallel\Runtime;
class Bootstrap extends Error
{
}

View File

@ -2,8 +2,5 @@
namespace parallel\Runtime;
use parallel\Error as ParallelError;
class Error extends ParallelError
{
}
class Error extends \parallel\Error{
}

View File

@ -4,6 +4,5 @@ namespace parallel\Runtime\Error;
use parallel\Runtime\Error;
class Bootstrap extends Error
{
}
class Bootstrap extends Error{
}

View File

@ -4,6 +4,5 @@ namespace parallel\Runtime\Error;
use parallel\Runtime\Error;
class Closed extends Error
{
}
class Closed extends Error{
}

View File

@ -4,6 +4,5 @@ namespace parallel\Runtime\Error;
use parallel\Runtime\Error;
class IllegalFunction extends Error
{
}
class IllegalFunction extends Error{
}

View File

@ -4,6 +4,5 @@ namespace parallel\Runtime\Error;
use parallel\Runtime\Error;
class IllegalInstruction extends Error
{
}
class IllegalInstruction extends Error{
}

View File

@ -4,6 +4,5 @@ namespace parallel\Runtime\Error;
use parallel\Runtime\Error;
class IllegalParameter extends Error
{
}
class IllegalParameter extends Error{
}

View File

@ -4,6 +4,5 @@ namespace parallel\Runtime\Error;
use parallel\Runtime\Error;
class IllegalReturn extends Error
{
}
class IllegalReturn extends Error{
}

View File

@ -0,0 +1,8 @@
<?php
namespace parallel\Runtime\Error;
use parallel\Runtime\Error;
class IllegalVariable extends Error{
}

View File

@ -0,0 +1,8 @@
<?php
namespace parallel\Runtime\Error;
use parallel\Runtime\Error;
class Killed extends Error{
}

View File

@ -0,0 +1,6 @@
<?php
namespace parallel\Runtime\Object;
class Unavailable{
}

View File

@ -0,0 +1,6 @@
<?php
namespace parallel\Runtime\Type;
class Unavailable{
}

View File

@ -2,59 +2,62 @@
namespace parallel;
use parallel\Sync\Error\IllegalValue;
/**
* The parallel\Sync class provides access to low level syncrhonization primites, mutex, condition variables, and
* allows the implementation of semaphores.
* The Sync class provides access to low level synchronization primitives, mutex, condition variables, and allows the
* implementation of semaphores.
*
* Synchronization for most applications is much better implemented using channels, however, in some cases authors of
* low level code may find it useful to be able to access these lower level mechanisms.
*/
final class Sync
{
/**
* Shall construct a new synchronization object containing the given scalar value. When not given a scalar value it
* shall construct a new synchronization object with no value.
*
* @param string|int|float|bool|null $value
*
* @throws IllegalValue if value is non-scalar.
*/
public function __construct($value = null) {}
final class Sync{
/**
* Shall atomically return the syncrhonization objects value.
*
* @return string|int|float|bool
*/
public function get() {}
/* Constructor */
/**
* Shall atomically set the value of the synchronization object.
*
* @param string|int|float|bool $value
*
* @throws IllegalValue if value is non-scalar.
*/
public function set($value) {}
/**
* Shall construct a new synchronization object with no value
* Shall construct a new synchronization object containing the given scalar value
*
* @param string|int|float|bool $value
*
* @throws Sync\Error\IllegalValue if value is non-scalar.
*/
public function __construct($value = null){}
/**
* Shall wait for notification on this synchronization object.
*/
public function wait() {}
/* Access */
/**
* Shall notify one (by default) or all threads waiting on the synchronization object.
*
* @param bool $all
*/
public function notify(bool $all = null) {}
/**
* Shall atomically return the synchronization objects value
* @return string|int|float|bool
*/
public function get(){}
/**
* Shall exclusively enter into the critical code.
*
* @param callable $critical
*/
public function __invoke(callable $critical) {}
}
/**
* Shall atomically set the value of the synchronization object
* @param string|int|float|bool $value
*
* @throws Sync\Error\IllegalValue if value is non-scalar.
*/
public function set($value){}
/* Synchronization */
/**
* Shall wait for notification on this synchronization object
* @return bool
*/
public function wait() : bool{}
/**
* Shall notify one (by default) or all threads waiting on the synchronization object
* @param bool $all
*
* @return bool
*/
public function notify(bool $all = null) : bool{}
/**
* Shall exclusively enter into the critical code
* @param callable $block
*/
public function __invoke(callable $block){}
}

View File

@ -2,8 +2,5 @@
namespace parallel\Sync;
use parallel\Error as ParallelError;
class Error extends ParallelError
{
}
class Error extends \parallel\Error{
}

View File

@ -4,6 +4,5 @@ namespace parallel\Sync\Error;
use parallel\Sync\Error;
class IllegalValue extends Error
{
}
class IllegalValue extends Error{
}

File diff suppressed because it is too large Load Diff

View File

@ -196,6 +196,7 @@ function socket_create ($domain, $type, $protocol) {}
/**
* @param resource $socket
* @return resource|false
*/
function socket_export_stream($socket) {}

View File

@ -1,12 +1,5 @@
<?php
/**
* @param string $str The string being translated.
* @param array $replace_pairs The replace_pairs parameter may be used as a substitute for to and from in which case it's an array in the form array('from' => 'to', ...).
* @return string A copy of str, translating all occurrences of each character in from to the corresponding character in to.
*/
function strtr ($str, array $replace_pairs) {};
/**
* (PHP 5.1)<br/>
* Halts the execution of the compiler. This can be useful to embed data in PHP scripts, like the installation files.

View File

@ -116,21 +116,21 @@ define('PASSWORD_ARGON2ID', 3);
* Available as of PHP 7.2.0.
* @since 7.2
*/
define ('PASSWORD_ARGON2_DEFAULT_MEMORY_COST', 1024);
define ('PASSWORD_ARGON2_DEFAULT_MEMORY_COST', 65536);
/**
* Default amount of time that Argon2lib will spend trying to compute a hash.
* Available as of PHP 7.2.0.
* @since 7.2
*/
define ('PASSWORD_ARGON2_DEFAULT_TIME_COST', 2);
define ('PASSWORD_ARGON2_DEFAULT_TIME_COST', 4);
/**
* Default number of threads that Argon2lib will use.
* Available as of PHP 7.2.0.
* @since 7.2
*/
define('PASSWORD_ARGON2_DEFAULT_THREADS', 2);
define('PASSWORD_ARGON2_DEFAULT_THREADS', 1);
/**
* (PHP 5 &gt;= 5.5.0, PHP 5)<br/>

View File

@ -655,11 +655,20 @@ function ucwords ($str, $delimiters = " \t\r\n\f\v") {}
* translating all occurrences of each character in
* from to the corresponding character in
* to.
* @since 4.0
* @since 5.0
*/
function strtr ($str, $from, $to) {}
/**
* Translate certain characters
* @link https://php.net/manual/en/function.strtr.php
* @param string $str The string being translated.
* @param array $replace_pairs The replace_pairs parameter may be used as a substitute for to and from in which case it's an array in the form array('from' => 'to', ...).
* @return string A copy of str, translating all occurrences of each character in from to the corresponding character in to.
* @since 5.0
*/
function strtr ($str, array $replace_pairs) {}
/**
* Quote string with slashes
* @link https://php.net/manual/en/function.addslashes.php

View File

@ -1003,6 +1003,12 @@
"problems": [
"parameter mismatch"
]
},
{
"name":"strtr",
"problems": [
"parameter mismatch"
]
}
],
"classes": [