From ba27e798e7c46c86d0fc845a2f819db764be8805 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 22 Apr 2015 12:59:58 +0200 Subject: php-pecl-mongodb: 0.5.0 (alpha) new package --- Makefile | 4 + REFLECTION | 1668 +++++++++++++++++++++++++++++++++++++++++++++++++ php-pecl-mongodb.spec | 216 +++++++ 3 files changed, 1888 insertions(+) create mode 100644 Makefile create mode 100644 REFLECTION create mode 100644 php-pecl-mongodb.spec diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..13af741 --- /dev/null +++ b/Makefile @@ -0,0 +1,4 @@ +SRCDIR := $(shell pwd) +NAME := $(shell basename $(SRCDIR)) +include ../../../common/Makefile + diff --git a/REFLECTION b/REFLECTION new file mode 100644 index 0000000..0df26f9 --- /dev/null +++ b/REFLECTION @@ -0,0 +1,1668 @@ +Extension [ extension #16 mongodb version 0.5.0 ] { + + - INI { + Entry [ mongodb.debug_log ] + Current = '' + } + } + + - Constants [2] { + Constant [ string MONGODB_VERSION ] { 0.5.0 } + Constant [ string MONGODB_STABILITY ] { alpha } + } + + - Functions { + Function [ function BSON\fromArray ] { + + - Parameters [1] { + Parameter #0 [ $array ] + } + } + Function [ function BSON\toArray ] { + + - Parameters [1] { + Parameter #0 [ $bson ] + } + } + Function [ function BSON\toJSON ] { + + - Parameters [1] { + Parameter #0 [ $bson ] + } + } + Function [ function BSON\fromJSON ] { + + - Parameters [1] { + Parameter #0 [ $json ] + } + } + } + + - Classes [36] { + Class [ final class MongoDB\Driver\Command ] { + + - Constants [0] { + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [0] { + } + + - Methods [2] { + Method [ final public method __construct ] { + + - Parameters [1] { + Parameter #0 [ $document ] + } + } + + Method [ public method __wakeUp ] { + } + } + } + + Class [ final class MongoDB\Driver\Cursor implements Traversable ] { + + - Constants [0] { + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [0] { + } + + - Methods [7] { + Method [ final private method __construct ] { + } + + Method [ final public method setTypeMap ] { + + - Parameters [1] { + Parameter #0 [ array $typemap ] + } + } + + Method [ final public method toArray ] { + + - Parameters [0] { + } + } + + Method [ final public method getId ] { + + - Parameters [0] { + } + } + + Method [ final public method getServer ] { + + - Parameters [0] { + } + } + + Method [ final public method isDead ] { + + - Parameters [0] { + } + } + + Method [ public method __wakeUp ] { + } + } + } + + Class [ final class MongoDB\Driver\CursorId ] { + + - Constants [0] { + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [0] { + } + + - Methods [3] { + Method [ final private method __construct ] { + } + + Method [ final public method __toString ] { + + - Parameters [0] { + } + } + + Method [ public method __wakeUp ] { + } + } + } + + Class [ final class MongoDB\Driver\Manager ] { + + - Constants [0] { + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [0] { + } + + - Methods [10] { + Method [ final public method __construct ] { + + - Parameters [3] { + Parameter #0 [ $uri ] + Parameter #1 [ array $options ] + Parameter #2 [ array $driverOptions ] + } + } + + Method [ final public method executeCommand ] { + + - Parameters [3] { + Parameter #0 [ $db ] + Parameter #1 [ MongoDB\Driver\Command $command ] + Parameter #2 [ MongoDB\Driver\ReadPreference or NULL $readPreference ] + } + } + + Method [ final public method executeQuery ] { + + - Parameters [3] { + Parameter #0 [ $namespace ] + Parameter #1 [ MongoDB\Driver\Query $zquery ] + Parameter #2 [ MongoDB\Driver\ReadPreference or NULL $readPreference ] + } + } + + Method [ final public method executeBulkWrite ] { + + - Parameters [3] { + Parameter #0 [ $namespace ] + Parameter #1 [ MongoDB\Driver\BulkWrite $zbulk ] + Parameter #2 [ MongoDB\Driver\WriteConcern or NULL $writeConcern ] + } + } + + Method [ final public method executeInsert ] { + + - Parameters [3] { + Parameter #0 [ $namespace ] + Parameter #1 [ $document ] + Parameter #2 [ MongoDB\Driver\WriteConcern or NULL $writeConcern ] + } + } + + Method [ final public method executeUpdate ] { + + - Parameters [5] { + Parameter #0 [ $namespace ] + Parameter #1 [ $zquery ] + Parameter #2 [ $newObj ] + Parameter #3 [ array or NULL $updateOptions ] + Parameter #4 [ MongoDB\Driver\WriteConcern or NULL $writeConcern ] + } + } + + Method [ final public method executeDelete ] { + + - Parameters [4] { + Parameter #0 [ $namespace ] + Parameter #1 [ $query ] + Parameter #2 [ array or NULL $deleteOptions ] + Parameter #3 [ MongoDB\Driver\WriteConcern or NULL $writeConcern ] + } + } + + Method [ final public method getServers ] { + + - Parameters [0] { + } + } + + Method [ final public method selectServer ] { + + - Parameters [1] { + Parameter #0 [ MongoDB\Driver\ReadPreference or NULL $readPreference ] + } + } + + Method [ public method __wakeUp ] { + } + } + } + + Class [ final class MongoDB\Driver\Query ] { + + - Constants [0] { + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [0] { + } + + - Methods [2] { + Method [ final public method __construct ] { + + - Parameters [2] { + Parameter #0 [ $filter ] + Parameter #1 [ array $options ] + } + } + + Method [ public method __wakeUp ] { + } + } + } + + Class [ final class MongoDB\Driver\ReadPreference ] { + + - Constants [5] { + Constant [ integer RP_PRIMARY ] { 1 } + Constant [ integer RP_PRIMARY_PREFERRED ] { 5 } + Constant [ integer RP_SECONDARY ] { 2 } + Constant [ integer RP_SECONDARY_PREFERRED ] { 6 } + Constant [ integer RP_NEAREST ] { 10 } + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [0] { + } + + - Methods [1] { + Method [ final public method __construct ] { + + - Parameters [2] { + Parameter #0 [ $readPreference ] + Parameter #1 [ array or NULL $tagSets ] + } + } + } + } + + Class [ final class MongoDB\Driver\Server ] { + + - Constants [9] { + Constant [ integer TYPE_UNKNOWN ] { 0 } + Constant [ integer TYPE_STANDALONE ] { 1 } + Constant [ integer TYPE_MONGOS ] { 2 } + Constant [ integer TYPE_POSSIBLE_PRIMARY ] { 3 } + Constant [ integer TYPE_RS_PRIMARY ] { 4 } + Constant [ integer TYPE_RS_SECONDARY ] { 5 } + Constant [ integer TYPE_RS_ARBITER ] { 6 } + Constant [ integer TYPE_RS_OTHER ] { 7 } + Constant [ integer TYPE_RS_GHOST ] { 8 } + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [0] { + } + + - Methods [16] { + Method [ final private method __construct ] { + } + + Method [ final public method executeCommand ] { + + - Parameters [2] { + Parameter #0 [ $db ] + Parameter #1 [ MongoDB\Driver\Command $command ] + } + } + + Method [ final public method executeQuery ] { + + - Parameters [2] { + Parameter #0 [ $namespace ] + Parameter #1 [ MongoDB\Driver\Query $zquery ] + } + } + + Method [ final public method executeBulkWrite ] { + + - Parameters [2] { + Parameter #0 [ $namespace ] + Parameter #1 [ MongoDB\Driver\BulkWrite $zbulk ] + } + } + + Method [ final public method getHost ] { + + - Parameters [0] { + } + } + + Method [ final public method getTags ] { + + - Parameters [0] { + } + } + + Method [ final public method getInfo ] { + + - Parameters [0] { + } + } + + Method [ final public method getLatency ] { + + - Parameters [0] { + } + } + + Method [ final public method getPort ] { + + - Parameters [0] { + } + } + + Method [ final public method getType ] { + + - Parameters [0] { + } + } + + Method [ final public method isPrimary ] { + + - Parameters [0] { + } + } + + Method [ final public method isSecondary ] { + + - Parameters [0] { + } + } + + Method [ final public method isArbiter ] { + + - Parameters [0] { + } + } + + Method [ final public method isHidden ] { + + - Parameters [0] { + } + } + + Method [ final public method isPassive ] { + + - Parameters [0] { + } + } + + Method [ public method __wakeUp ] { + } + } + } + + Class [ final class MongoDB\Driver\BulkWrite implements Countable ] { + + - Constants [0] { + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [0] { + } + + - Methods [6] { + Method [ public method __construct ] { + + - Parameters [1] { + Parameter #0 [ $ordered ] + } + } + + Method [ public method insert ] { + + - Parameters [1] { + Parameter #0 [ $document ] + } + } + + Method [ public method update ] { + + - Parameters [3] { + Parameter #0 [ $query ] + Parameter #1 [ $newObj ] + Parameter #2 [ array or NULL $updateOptions ] + } + } + + Method [ public method delete ] { + + - Parameters [2] { + Parameter #0 [ $query ] + Parameter #1 [ array or NULL $deleteOptions ] + } + } + + Method [ public method count ] { + + - Parameters [0] { + } + } + + Method [ public method __wakeUp ] { + } + } + } + + Class [ final class MongoDB\Driver\WriteConcern ] { + + - Constants [1] { + Constant [ string MAJORITY ] { majority } + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [0] { + } + + - Methods [1] { + Method [ final public method __construct ] { + + - Parameters [4] { + Parameter #0 [ $wstring ] + Parameter #1 [ $wtimeout ] + Parameter #2 [ $journal ] + Parameter #3 [ $fsync ] + } + } + } + } + + Class [ final class MongoDB\Driver\WriteConcernError ] { + + - Constants [0] { + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [0] { + } + + - Methods [5] { + Method [ final private method __construct ] { + } + + Method [ final public method getCode ] { + + - Parameters [0] { + } + } + + Method [ final public method getInfo ] { + + - Parameters [0] { + } + } + + Method [ final public method getMessage ] { + + - Parameters [0] { + } + } + + Method [ public method __wakeUp ] { + } + } + } + + Class [ final class MongoDB\Driver\WriteError ] { + + - Constants [0] { + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [0] { + } + + - Methods [6] { + Method [ final private method __construct ] { + } + + Method [ final public method getCode ] { + + - Parameters [0] { + } + } + + Method [ final public method getIndex ] { + + - Parameters [0] { + } + } + + Method [ final public method getMessage ] { + + - Parameters [0] { + } + } + + Method [ final public method getInfo ] { + + - Parameters [0] { + } + } + + Method [ public method __wakeUp ] { + } + } + } + + Class [ final class MongoDB\Driver\WriteResult ] { + + - Constants [0] { + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [0] { + } + + - Methods [13] { + Method [ final private method __construct ] { + } + + Method [ final public method getInsertedCount ] { + + - Parameters [0] { + } + } + + Method [ final public method getMatchedCount ] { + + - Parameters [0] { + } + } + + Method [ final public method getModifiedCount ] { + + - Parameters [0] { + } + } + + Method [ final public method getDeletedCount ] { + + - Parameters [0] { + } + } + + Method [ final public method getUpsertedCount ] { + + - Parameters [0] { + } + } + + Method [ final public method getInfo ] { + + - Parameters [0] { + } + } + + Method [ final public method getServer ] { + + - Parameters [0] { + } + } + + Method [ final public method getUpsertedIds ] { + + - Parameters [0] { + } + } + + Method [ final public method getWriteConcernError ] { + + - Parameters [0] { + } + } + + Method [ final public method getWriteErrors ] { + + - Parameters [0] { + } + } + + Method [ final public method isAcknowledged ] { + + - Parameters [0] { + } + } + + Method [ public method __wakeUp ] { + } + } + } + + Interface [ interface MongoDB\Driver\Exception ] { + + - Constants [0] { + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [0] { + } + + - Methods [0] { + } + } + + Class [ class MongoDB\Driver\RuntimeException extends RuntimeException implements MongoDB\Driver\Exception ] { + + - Constants [0] { + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [4] { + Property [ protected $message ] + Property [ protected $code ] + Property [ protected $file ] + Property [ protected $line ] + } + + - Methods [9] { + Method [ public method __construct ] { + + - Parameters [3] { + Parameter #0 [ $message ] + Parameter #1 [ $code ] + Parameter #2 [ $previous ] + } + } + + Method [ final public method getMessage ] { + } + + Method [ final public method getCode ] { + } + + Method [ final public method getFile ] { + } + + Method [ final public method getLine ] { + } + + Method [ final public method getTrace ] { + } + + Method [ final public method getPrevious ] { + } + + Method [ final public method getTraceAsString ] { + } + + Method [ public method __toString ] { + } + } + } + + Class [ class MongoDB\Driver\InvalidArgumentException extends InvalidArgumentException implements MongoDB\Driver\Exception ] { + + - Constants [0] { + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [4] { + Property [ protected $message ] + Property [ protected $code ] + Property [ protected $file ] + Property [ protected $line ] + } + + - Methods [9] { + Method [ public method __construct ] { + + - Parameters [3] { + Parameter #0 [ $message ] + Parameter #1 [ $code ] + Parameter #2 [ $previous ] + } + } + + Method [ final public method getMessage ] { + } + + Method [ final public method getCode ] { + } + + Method [ final public method getFile ] { + } + + Method [ final public method getLine ] { + } + + Method [ final public method getTrace ] { + } + + Method [ final public method getPrevious ] { + } + + Method [ final public method getTraceAsString ] { + } + + Method [ public method __toString ] { + } + } + } + + Class [ class MongoDB\Driver\ConnectionException extends MongoDB\Driver\RuntimeException implements MongoDB\Driver\Exception ] { + + - Constants [0] { + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [4] { + Property [ protected $message ] + Property [ protected $code ] + Property [ protected $file ] + Property [ protected $line ] + } + + - Methods [9] { + Method [ public method __construct ] { + + - Parameters [3] { + Parameter #0 [ $message ] + Parameter #1 [ $code ] + Parameter #2 [ $previous ] + } + } + + Method [ final public method getMessage ] { + } + + Method [ final public method getCode ] { + } + + Method [ final public method getFile ] { + } + + Method [ final public method getLine ] { + } + + Method [ final public method getTrace ] { + } + + Method [ final public method getPrevious ] { + } + + Method [ final public method getTraceAsString ] { + } + + Method [ public method __toString ] { + } + } + } + + Class [ class MongoDB\Driver\AuthenticationException extends MongoDB\Driver\ConnectionException implements MongoDB\Driver\Exception ] { + + - Constants [0] { + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [4] { + Property [ protected $message ] + Property [ protected $code ] + Property [ protected $file ] + Property [ protected $line ] + } + + - Methods [9] { + Method [ public method __construct ] { + + - Parameters [3] { + Parameter #0 [ $message ] + Parameter #1 [ $code ] + Parameter #2 [ $previous ] + } + } + + Method [ final public method getMessage ] { + } + + Method [ final public method getCode ] { + } + + Method [ final public method getFile ] { + } + + Method [ final public method getLine ] { + } + + Method [ final public method getTrace ] { + } + + Method [ final public method getPrevious ] { + } + + Method [ final public method getTraceAsString ] { + } + + Method [ public method __toString ] { + } + } + } + + Class [ final class MongoDB\Driver\SSLConnectionException extends MongoDB\Driver\ConnectionException implements MongoDB\Driver\Exception ] { + + - Constants [0] { + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [4] { + Property [ protected $message ] + Property [ protected $code ] + Property [ protected $file ] + Property [ protected $line ] + } + + - Methods [9] { + Method [ public method __construct ] { + + - Parameters [3] { + Parameter #0 [ $message ] + Parameter #1 [ $code ] + Parameter #2 [ $previous ] + } + } + + Method [ final public method getMessage ] { + } + + Method [ final public method getCode ] { + } + + Method [ final public method getFile ] { + } + + Method [ final public method getLine ] { + } + + Method [ final public method getTrace ] { + } + + Method [ final public method getPrevious ] { + } + + Method [ final public method getTraceAsString ] { + } + + Method [ public method __toString ] { + } + } + } + + Class [ class MongoDB\Driver\WriteException extends MongoDB\Driver\RuntimeException implements MongoDB\Driver\Exception ] { + + - Constants [0] { + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [5] { + Property [ protected $message ] + Property [ protected $code ] + Property [ protected $file ] + Property [ protected $line ] + Property [ protected $writeResult ] + } + + - Methods [10] { + Method [ final public method getWriteResult ] { + + - Parameters [0] { + } + } + + Method [ public method __construct ] { + + - Parameters [3] { + Parameter #0 [ $message ] + Parameter #1 [ $code ] + Parameter #2 [ $previous ] + } + } + + Method [ final public method getMessage ] { + } + + Method [ final public method getCode ] { + } + + Method [ final public method getFile ] { + } + + Method [ final public method getLine ] { + } + + Method [ final public method getTrace ] { + } + + Method [ final public method getPrevious ] { + } + + Method [ final public method getTraceAsString ] { + } + + Method [ public method __toString ] { + } + } + } + + Class [ class MongoDB\Driver\WriteConcernException extends MongoDB\Driver\WriteException implements MongoDB\Driver\Exception ] { + + - Constants [0] { + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [5] { + Property [ protected $message ] + Property [ protected $code ] + Property [ protected $file ] + Property [ protected $line ] + Property [ protected $writeResult ] + } + + - Methods [10] { + Method [ final public method getWriteResult ] { + + - Parameters [0] { + } + } + + Method [ public method __construct ] { + + - Parameters [3] { + Parameter #0 [ $message ] + Parameter #1 [ $code ] + Parameter #2 [ $previous ] + } + } + + Method [ final public method getMessage ] { + } + + Method [ final public method getCode ] { + } + + Method [ final public method getFile ] { + } + + Method [ final public method getLine ] { + } + + Method [ final public method getTrace ] { + } + + Method [ final public method getPrevious ] { + } + + Method [ final public method getTraceAsString ] { + } + + Method [ public method __toString ] { + } + } + } + + Class [ class MongoDB\Driver\BulkWriteException extends MongoDB\Driver\WriteException implements MongoDB\Driver\Exception ] { + + - Constants [0] { + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [5] { + Property [ protected $message ] + Property [ protected $code ] + Property [ protected $file ] + Property [ protected $line ] + Property [ protected $writeResult ] + } + + - Methods [10] { + Method [ final public method getWriteResult ] { + + - Parameters [0] { + } + } + + Method [ public method __construct ] { + + - Parameters [3] { + Parameter #0 [ $message ] + Parameter #1 [ $code ] + Parameter #2 [ $previous ] + } + } + + Method [ final public method getMessage ] { + } + + Method [ final public method getCode ] { + } + + Method [ final public method getFile ] { + } + + Method [ final public method getLine ] { + } + + Method [ final public method getTrace ] { + } + + Method [ final public method getPrevious ] { + } + + Method [ final public method getTraceAsString ] { + } + + Method [ public method __toString ] { + } + } + } + + Class [ final class MongoDB\Driver\DuplicateKeyException extends MongoDB\Driver\WriteException implements MongoDB\Driver\Exception ] { + + - Constants [0] { + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [5] { + Property [ protected $message ] + Property [ protected $code ] + Property [ protected $file ] + Property [ protected $line ] + Property [ protected $writeResult ] + } + + - Methods [10] { + Method [ final public method getWriteResult ] { + + - Parameters [0] { + } + } + + Method [ public method __construct ] { + + - Parameters [3] { + Parameter #0 [ $message ] + Parameter #1 [ $code ] + Parameter #2 [ $previous ] + } + } + + Method [ final public method getMessage ] { + } + + Method [ final public method getCode ] { + } + + Method [ final public method getFile ] { + } + + Method [ final public method getLine ] { + } + + Method [ final public method getTrace ] { + } + + Method [ final public method getPrevious ] { + } + + Method [ final public method getTraceAsString ] { + } + + Method [ public method __toString ] { + } + } + } + + Class [ final class MongoDB\Driver\ExecutionTimeoutException extends MongoDB\Driver\RuntimeException implements MongoDB\Driver\Exception ] { + + - Constants [0] { + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [4] { + Property [ protected $message ] + Property [ protected $code ] + Property [ protected $file ] + Property [ protected $line ] + } + + - Methods [9] { + Method [ public method __construct ] { + + - Parameters [3] { + Parameter #0 [ $message ] + Parameter #1 [ $code ] + Parameter #2 [ $previous ] + } + } + + Method [ final public method getMessage ] { + } + + Method [ final public method getCode ] { + } + + Method [ final public method getFile ] { + } + + Method [ final public method getLine ] { + } + + Method [ final public method getTrace ] { + } + + Method [ final public method getPrevious ] { + } + + Method [ final public method getTraceAsString ] { + } + + Method [ public method __toString ] { + } + } + } + + Class [ final class MongoDB\Driver\ConnectionTimeoutException extends MongoDB\Driver\ConnectionException implements MongoDB\Driver\Exception ] { + + - Constants [0] { + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [4] { + Property [ protected $message ] + Property [ protected $code ] + Property [ protected $file ] + Property [ protected $line ] + } + + - Methods [9] { + Method [ public method __construct ] { + + - Parameters [3] { + Parameter #0 [ $message ] + Parameter #1 [ $code ] + Parameter #2 [ $previous ] + } + } + + Method [ final public method getMessage ] { + } + + Method [ final public method getCode ] { + } + + Method [ final public method getFile ] { + } + + Method [ final public method getLine ] { + } + + Method [ final public method getTrace ] { + } + + Method [ final public method getPrevious ] { + } + + Method [ final public method getTraceAsString ] { + } + + Method [ public method __toString ] { + } + } + } + + Interface [ interface BSON\Type ] { + + - Constants [0] { + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [0] { + } + + - Methods [0] { + } + } + + Interface [ interface BSON\Serializable extends BSON\Type ] { + + - Constants [0] { + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [0] { + } + + - Methods [1] { + Method [ abstract public method bsonSerialize ] { + + - Parameters [0] { + } + } + } + } + + Interface [ interface BSON\Unserializable ] { + + - Constants [0] { + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [0] { + } + + - Methods [1] { + Method [ abstract public method bsonUnserialize ] { + + - Parameters [1] { + Parameter #0 [ array $data ] + } + } + } + } + + Interface [ interface BSON\Persistable extends BSON\Unserializable, BSON\Serializable, BSON\Type ] { + + - Constants [0] { + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [0] { + } + + - Methods [2] { + Method [ abstract public method bsonUnserialize ] { + + - Parameters [1] { + Parameter #0 [ array $data ] + } + } + + Method [ abstract public method bsonSerialize ] { + + - Parameters [0] { + } + } + } + } + + Class [ class BSON\Binary implements BSON\Type ] { + + - Constants [7] { + Constant [ integer TYPE_GENERIC ] { 0 } + Constant [ integer TYPE_FUNCTION ] { 1 } + Constant [ integer TYPE_OLD_BINARY ] { 2 } + Constant [ integer TYPE_OLD_UUID ] { 3 } + Constant [ integer TYPE_UUID ] { 4 } + Constant [ integer TYPE_MD5 ] { 5 } + Constant [ integer TYPE_USER_DEFINED ] { 128 } + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [0] { + } + + - Methods [2] { + Method [ public method __construct ] { + + - Parameters [2] { + Parameter #0 [ $data ] + Parameter #1 [ $subtype ] + } + } + + Method [ public method getSubType ] { + + - Parameters [0] { + } + } + } + } + + Class [ class BSON\Javascript implements BSON\Type ] { + + - Constants [0] { + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [0] { + } + + - Methods [1] { + Method [ final public method __construct ] { + + - Parameters [2] { + Parameter #0 [ $javascript ] + Parameter #1 [ $scope ] + } + } + } + } + + Class [ class BSON\MaxKey implements BSON\Type ] { + + - Constants [0] { + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [0] { + } + + - Methods [0] { + } + } + + Class [ class BSON\MinKey implements BSON\Type ] { + + - Constants [0] { + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [0] { + } + + - Methods [0] { + } + } + + Class [ class BSON\ObjectID implements BSON\Type ] { + + - Constants [0] { + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [0] { + } + + - Methods [2] { + Method [ public method __construct ] { + + - Parameters [1] { + Parameter #0 [ $id ] + } + } + + Method [ public method __toString ] { + + - Parameters [0] { + } + } + } + } + + Class [ class BSON\Regex implements BSON\Type ] { + + - Constants [0] { + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [0] { + } + + - Methods [4] { + Method [ public method __construct ] { + + - Parameters [2] { + Parameter #0 [ $pattern ] + Parameter #1 [ $flags ] + } + } + + Method [ public method getPattern ] { + + - Parameters [0] { + } + } + + Method [ public method getFlags ] { + + - Parameters [0] { + } + } + + Method [ public method __toString ] { + + - Parameters [0] { + } + } + } + } + + Class [ class BSON\Timestamp implements BSON\Type ] { + + - Constants [0] { + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [0] { + } + + - Methods [2] { + Method [ final public method __construct ] { + + - Parameters [2] { + Parameter #0 [ $increment ] + Parameter #1 [ $timestamp ] + } + } + + Method [ final public method __toString ] { + + - Parameters [0] { + } + } + } + } + + Class [ class BSON\UTCDatetime implements BSON\Type ] { + + - Constants [0] { + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [0] { + } + + - Methods [3] { + Method [ final public method __construct ] { + + - Parameters [1] { + Parameter #0 [ $milliseconds ] + } + } + + Method [ final public method __toString ] { + + - Parameters [0] { + } + } + + Method [ final public method toDateTime ] { + + - Parameters [0] { + } + } + } + } + } +} + diff --git a/php-pecl-mongodb.spec b/php-pecl-mongodb.spec new file mode 100644 index 0000000..a4bd250 --- /dev/null +++ b/php-pecl-mongodb.spec @@ -0,0 +1,216 @@ +# spec file for php-pecl-mongodb +# +# Copyright (c) 2015 Remi Collet +# License: CC-BY-SA +# http://creativecommons.org/licenses/by-sa/4.0/ +# +# Please, preserve the changelog entries +# +%{?scl: %scl_package php-pecl-mongodb} +%{!?php_inidir: %global php_inidir %{_sysconfdir}/php.d} +%{!?__pecl: %global __pecl %{_bindir}/pecl} +%{!?__php: %global __php %{_bindir}/php} + +%global with_zts 0%{?__ztsphp:1} +%global pecl_name mongodb +%if "%{php_version}" < "5.6" +%global ini_name %{pecl_name}.ini +%else +%global ini_name 40-%{pecl_name}.ini +%endif + +Summary: MongoDB driver for PHP +Name: %{?scl_prefix}php-pecl-%{pecl_name} +Version: 0.5.0 +Release: 1%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} +License: BSD +Group: Development/Languages +URL: http://pecl.php.net/package/%{pecl_name} +Source0: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz + +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildRequires: %{?scl_prefix}php-devel +BuildRequires: %{?scl_prefix}php-pear +BuildRequires: cyrus-sasl-devel +BuildRequires: openssl-devel + +Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api} +Requires: %{?scl_prefix}php(api) = %{php_core_api} +%{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}} + +Provides: %{?scl_prefix}php-%{pecl_name} = %{version} +Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version} +Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version} +Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version} + +%if "%{?vendor}" == "Remi Collet" && 0%{!?scl:1} +# Other third party repo stuff +Obsoletes: php53-pecl-%{pecl_name} <= %{version} +Obsoletes: php53u-pecl-%{pecl_name} <= %{version} +Obsoletes: php54-pecl-%{pecl_name} <= %{version} +Obsoletes: php54w-pecl-%{pecl_name} <= %{version} +%if "%{php_version}" > "5.5" +Obsoletes: php55u-pecl-%{pecl_name} <= %{version} +Obsoletes: php55w-pecl-%{pecl_name} <= %{version} +%endif +%if "%{php_version}" > "5.6" +Obsoletes: php56u-pecl-%{pecl_name} <= %{version} +Obsoletes: php56w-pecl-%{pecl_name} <= %{version} +%endif +%if "%{php_version}" > "7.0" +Obsoletes: php70u-pecl-%{pecl_name} <= %{version} +Obsoletes: php70w-pecl-%{pecl_name} <= %{version} +%endif +%endif + +%if 0%{?fedora} < 20 && 0%{?rhel} < 7 +# Filter shared private +%{?filter_provides_in: %filter_provides_in %{_libdir}/.*\.so$} +%{?filter_setup} +%endif + + +%description +The purpose of this driver is to provide exceptionally thin glue between +MongoDB and PHP, implementing only fundemental and performance-critical +components necessary to build a fully-functional MongoDB driver. + +Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')%{?scl: as Software Collection}. + + +%prep +%setup -q -c +mv %{pecl_name}-%{version} NTS + +# Don't install/register tests +sed -e 's/role="test"/role="src"/' \ + -e '/name="scripts/s/role="doc"/role="src"/' \ + -e '/Vagrantfile/s/role="doc"/role="src"/' \ + -i package.xml + +cd NTS + +# Sanity check, really often broken +extver=$(sed -n '/#define MONGODB_VERSION_S/{s/.* "//;s/".*$//;p}' php_phongo.h) +if test "x${extver}" != "x%{version}%{?prever:-%{prever}}"; then + : Error: Upstream extension version is ${extver}, expecting %{version}%{?prever:-%{prever}}. + exit 1 +fi +cd .. + +%if %{with_zts} +# Duplicate source tree for NTS / ZTS build +cp -pr NTS ZTS +%endif + +# Create configuration file +cat << 'EOF' | tee %{ini_name} +; Enable %{summary} extension module +extension=%{pecl_name}.so + +; Configuration +;mongodb.debug_log='' +EOF + + +%build +peclbuild() { +%configure \ + --enable-mongodb \ + --with-php-config=$1 + +make %{?_smp_mflags} +} + +cd NTS +%{_bindir}/phpize +peclbuild %{_bindir}/php-config + +%if %{with_zts} +cd ../ZTS +%{_bindir}/zts-phpize +peclbuild %{_bindir}/zts-php-config +%endif + + +%install +rm -rf %{buildroot} + +make -C NTS \ + install INSTALL_ROOT=%{buildroot} + +# install config file +install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name} + +# Install XML package description +install -D -m 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml + +%if %{with_zts} +make -C ZTS \ + install INSTALL_ROOT=%{buildroot} + +install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name} +%endif + +# Documentation +for i in $(grep 'role="doc"' package.xml | sed -e 's/^.*name="//;s/".*$//') +do install -Dpm 644 NTS/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i +done + + +# when pear installed alone, after us +%triggerin -- %{?scl_prefix}php-pear +if [ -x %{__pecl} ] ; then + %{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || : +fi + +# posttrans as pear can be installed after us +%posttrans +if [ -x %{__pecl} ] ; then + %{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || : +fi + +%postun +if [ $1 -eq 0 -a -x %{__pecl} ] ; then + %{pecl_uninstall} %{pecl_name} >/dev/null || : +fi + + +%check +cd NTS +: Minimal load test for NTS extension +%{__php} --no-php-ini \ + --define extension=modules/%{pecl_name}.so \ + --modules | grep %{pecl_name} + +%if %{with_zts} +cd ../ZTS +: Minimal load test for ZTS extension +%{__ztsphp} --no-php-ini \ + --define extension=modules/%{pecl_name}.so \ + --modules | grep %{pecl_name} +%endif + + +%clean +rm -rf %{buildroot} + + +%files +%defattr(-,root,root,-) +%{?_licensedir:%license NTS/LICENSE} +%doc %{pecl_docdir}/%{pecl_name} +%{pecl_xmldir}/%{name}.xml + +%config(noreplace) %{php_inidir}/%{ini_name} +%{php_extdir}/%{pecl_name}.so + +%if %{with_zts} +%config(noreplace) %{php_ztsinidir}/%{ini_name} +%{php_ztsextdir}/%{pecl_name}.so +%endif + + +%changelog +* Wed Apr 22 2015 Remi Collet - 0.5.0-1 +- initial package, version 0.5.0 (alpha) \ No newline at end of file -- cgit