Version Description
- fix widget bug (wrong share links)
Download this release
Release Info
Developer | 3UU |
Plugin | Shariff Wrapper |
Version | 1.9.9 |
Comparing to | |
See all releases |
Code changes from version 1.9.0 to 1.9.9
- admin.css +8 -0
- backend/index.php +20 -10
- backend/src/Backend.php +53 -83
- backend/src/Backend/BackendManager.php +90 -0
- backend/src/Backend/Facebook.php +29 -4
- backend/src/Backend/Request.php +11 -3
- backend/src/Backend/ServiceFactory.php +50 -0
- backend/src/Backend/ServiceInterface.php +1 -0
- backend/vendor/autoload.php +1 -1
- backend/vendor/composer/ClassLoader.php +26 -0
- backend/vendor/composer/autoload_namespaces.php +2 -0
- backend/vendor/composer/autoload_real.php +5 -5
- backend/vendor/composer/installed.json +295 -189
- backend/vendor/guzzlehttp/guzzle/CHANGELOG.md +26 -16
- backend/vendor/guzzlehttp/guzzle/src/Client.php +30 -21
- backend/vendor/guzzlehttp/guzzle/src/ClientInterface.php +1 -1
- backend/vendor/guzzlehttp/guzzle/src/Event/AbstractRequestEvent.php +10 -0
- backend/vendor/guzzlehttp/guzzle/src/Event/AbstractTransferEvent.php +0 -10
- backend/vendor/guzzlehttp/guzzle/src/Message/AppliesHeadersInterface.php +24 -0
- backend/vendor/guzzlehttp/guzzle/src/Pool.php +15 -4
- backend/vendor/guzzlehttp/guzzle/src/Post/PostBodyInterface.php +2 -9
- backend/vendor/guzzlehttp/guzzle/src/RequestFsm.php +82 -162
- backend/vendor/guzzlehttp/guzzle/src/RingBridge.php +4 -9
- backend/vendor/guzzlehttp/guzzle/src/Subscriber/Prepare.php +3 -3
- backend/vendor/zendframework/zend-cache/Zend/Cache/Exception/BadMethodCallException.php +1 -1
- backend/vendor/zendframework/zend-cache/Zend/Cache/Exception/ExceptionInterface.php +1 -1
- backend/vendor/zendframework/zend-cache/Zend/Cache/Exception/ExtensionNotLoadedException.php +1 -1
- backend/vendor/zendframework/zend-cache/Zend/Cache/Exception/InvalidArgumentException.php +1 -1
- backend/vendor/zendframework/zend-cache/Zend/Cache/Exception/LogicException.php +1 -1
- backend/vendor/zendframework/zend-cache/Zend/Cache/Exception/MissingDependencyException.php +1 -1
- backend/vendor/zendframework/zend-cache/Zend/Cache/Exception/MissingKeyException.php +1 -1
- backend/vendor/zendframework/zend-cache/Zend/Cache/Exception/OutOfSpaceException.php +1 -1
- backend/vendor/zendframework/zend-cache/Zend/Cache/Exception/RuntimeException.php +1 -1
- backend/vendor/zendframework/zend-cache/Zend/Cache/Exception/UnexpectedValueException.php +1 -1
- backend/vendor/zendframework/zend-cache/Zend/Cache/Exception/UnsupportedMethodCallException.php +1 -1
- backend/vendor/zendframework/zend-cache/Zend/Cache/Pattern/AbstractPattern.php +1 -1
- backend/vendor/zendframework/zend-cache/Zend/Cache/Pattern/CallbackCache.php +1 -1
- backend/vendor/zendframework/zend-cache/Zend/Cache/Pattern/CaptureCache.php +1 -2
- backend/vendor/zendframework/zend-cache/Zend/Cache/Pattern/ClassCache.php +1 -1
- backend/vendor/zendframework/zend-cache/Zend/Cache/Pattern/ObjectCache.php +1 -1
- backend/vendor/zendframework/zend-cache/Zend/Cache/Pattern/OutputCache.php +1 -1
- backend/vendor/zendframework/zend-cache/Zend/Cache/Pattern/PatternInterface.php +1 -1
- backend/vendor/zendframework/zend-cache/Zend/Cache/Pattern/PatternOptions.php +1 -1
- backend/vendor/zendframework/zend-cache/Zend/Cache/PatternFactory.php +1 -1
- backend/vendor/zendframework/zend-cache/Zend/Cache/PatternPluginManager.php +1 -1
- backend/vendor/zendframework/zend-cache/Zend/Cache/Service/StorageCacheAbstractServiceFactory.php +1 -1
- backend/vendor/zendframework/zend-cache/Zend/Cache/Service/StorageCacheFactory.php +1 -1
- backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/Adapter/AbstractAdapter.php +1 -1
- backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/Adapter/AbstractZendServer.php +1 -1
- backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/Adapter/AdapterOptions.php +3 -4
- backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/Adapter/Apc.php +16 -16
- backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/Adapter/ApcIterator.php +1 -2
- backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/Adapter/ApcOptions.php +1 -1
- backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/Adapter/BlackHole.php +1 -1
- backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/Adapter/Dba.php +3 -3
- backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/Adapter/DbaIterator.php +2 -2
- backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/Adapter/DbaOptions.php +1 -1
- backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/Adapter/Filesystem.php +17 -7
- backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/Adapter/FilesystemIterator.php +1 -2
- backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/Adapter/FilesystemOptions.php +1 -2
- backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/Adapter/KeyListIterator.php +1 -2
- backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/Adapter/Memcache.php +1 -1
- backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/Adapter/MemcacheOptions.php +1 -1
- backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/Adapter/MemcacheResourceManager.php +1 -1
- backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/Adapter/Memcached.php +3 -3
- backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/Adapter/MemcachedOptions.php +1 -1
- backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/Adapter/MemcachedResourceManager.php +1 -3
- backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/Adapter/Memory.php +23 -33
- backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/Adapter/MemoryOptions.php +1 -1
- backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/Adapter/Redis.php +4 -7
- backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/Adapter/RedisOptions.php +1 -1
- backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/Adapter/RedisResourceManager.php +1 -2
- backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/Adapter/Session.php +1 -2
- backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/Adapter/SessionOptions.php +1 -1
- backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/Adapter/WinCache.php +1 -2
- backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/Adapter/WinCacheOptions.php +1 -1
- backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/Adapter/XCache.php +3 -7
- backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/Adapter/XCacheOptions.php +1 -1
- backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/Adapter/ZendServerDisk.php +1 -2
- backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/Adapter/ZendServerShm.php +1 -2
- backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/AdapterPluginManager.php +1 -1
- backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/AvailableSpaceCapableInterface.php +1 -1
- backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/Capabilities.php +29 -29
- backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/ClearByNamespaceInterface.php +1 -1
- backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/ClearByPrefixInterface.php +1 -1
- backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/ClearExpiredInterface.php +1 -1
- backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/Event.php +1 -1
- backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/ExceptionEvent.php +1 -1
- backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/FlushableInterface.php +1 -1
- backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/IterableInterface.php +1 -1
- backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/IteratorInterface.php +1 -2
- backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/OptimizableInterface.php +1 -1
- backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/Plugin/AbstractPlugin.php +1 -1
- backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/Plugin/ClearExpiredByFactor.php +1 -1
- backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/Plugin/ExceptionHandler.php +1 -1
- backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/Plugin/IgnoreUserAbort.php +3 -3
- backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/Plugin/OptimizeByFactor.php +1 -1
- backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/Plugin/PluginInterface.php +1 -1
- backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/Plugin/PluginOptions.php +1 -1
- backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/Plugin/Serializer.php +1 -1
- backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/PluginManager.php +1 -1
- backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/PostEvent.php +1 -1
- backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/StorageInterface.php +1 -1
- backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/TaggableInterface.php +1 -1
- backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/TotalSpaceCapableInterface.php +1 -1
- backend/vendor/zendframework/zend-cache/Zend/Cache/StorageFactory.php +1 -1
- backend/vendor/zendframework/zend-cache/Zend/Cache/composer.json +1 -1
- backend/vendor/zendframework/zend-config/Zend/Config/AbstractConfigFactory.php +1 -1
- backend/vendor/zendframework/zend-config/Zend/Config/Config.php +1 -2
- backend/vendor/zendframework/zend-config/Zend/Config/Exception/ExceptionInterface.php +1 -1
- backend/vendor/zendframework/zend-config/Zend/Config/Exception/InvalidArgumentException.php +1 -1
- backend/vendor/zendframework/zend-config/Zend/Config/Exception/RuntimeException.php +1 -1
- backend/vendor/zendframework/zend-config/Zend/Config/Factory.php +6 -5
- backend/vendor/zendframework/zend-config/Zend/Config/Processor/Constant.php +1 -1
- backend/vendor/zendframework/zend-config/Zend/Config/Processor/Filter.php +1 -1
- backend/vendor/zendframework/zend-config/Zend/Config/Processor/ProcessorInterface.php +1 -1
- backend/vendor/zendframework/zend-config/Zend/Config/Processor/Queue.php +1 -1
- backend/vendor/zendframework/zend-config/Zend/Config/Processor/Token.php +1 -1
- backend/vendor/zendframework/zend-config/Zend/Config/Processor/Translator.php +1 -1
- backend/vendor/zendframework/zend-config/Zend/Config/Reader/Ini.php +1 -1
- backend/vendor/zendframework/zend-config/Zend/Config/Reader/JavaProperties.php +2 -2
- backend/vendor/zendframework/zend-config/Zend/Config/Reader/Json.php +1 -1
- backend/vendor/zendframework/zend-config/Zend/Config/Reader/ReaderInterface.php +1 -1
- backend/vendor/zendframework/zend-config/Zend/Config/Reader/Xml.php +8 -3
- backend/vendor/zendframework/zend-config/Zend/Config/Reader/Yaml.php +3 -3
- backend/vendor/zendframework/zend-config/Zend/Config/ReaderPluginManager.php +6 -5
- backend/vendor/zendframework/zend-config/Zend/Config/Writer/AbstractWriter.php +1 -1
- backend/vendor/zendframework/zend-config/Zend/Config/Writer/Ini.php +1 -1
- backend/vendor/zendframework/zend-config/Zend/Config/Writer/Json.php +1 -1
- backend/vendor/zendframework/zend-config/Zend/Config/Writer/PhpArray.php +1 -1
- backend/vendor/zendframework/zend-config/Zend/Config/Writer/WriterInterface.php +1 -1
- backend/vendor/zendframework/zend-config/Zend/Config/Writer/Xml.php +2 -2
- backend/vendor/zendframework/zend-config/Zend/Config/Writer/Yaml.php +2 -2
- backend/vendor/zendframework/zend-config/Zend/Config/WriterPluginManager.php +1 -1
- backend/vendor/zendframework/zend-eventmanager/Zend/EventManager/AbstractListenerAggregate.php +1 -1
- backend/vendor/zendframework/zend-eventmanager/Zend/EventManager/Event.php +1 -1
- backend/vendor/zendframework/zend-eventmanager/Zend/EventManager/EventInterface.php +1 -1
- backend/vendor/zendframework/zend-eventmanager/Zend/EventManager/EventManager.php +2 -2
- backend/vendor/zendframework/zend-eventmanager/Zend/EventManager/EventManagerAwareInterface.php +1 -1
- backend/vendor/zendframework/zend-eventmanager/Zend/EventManager/EventManagerAwareTrait.php +1 -1
- backend/vendor/zendframework/zend-eventmanager/Zend/EventManager/EventManagerInterface.php +2 -2
- backend/vendor/zendframework/zend-eventmanager/Zend/EventManager/EventsCapableInterface.php +1 -1
- backend/vendor/zendframework/zend-eventmanager/Zend/EventManager/Exception/DomainException.php +1 -1
- backend/vendor/zendframework/zend-eventmanager/Zend/EventManager/Exception/ExceptionInterface.php +1 -1
- backend/vendor/zendframework/zend-eventmanager/Zend/EventManager/Exception/InvalidArgumentException.php +1 -1
- backend/vendor/zendframework/zend-eventmanager/Zend/EventManager/Exception/InvalidCallbackException.php +1 -1
- backend/vendor/zendframework/zend-eventmanager/Zend/EventManager/Filter/FilterInterface.php +1 -1
- backend/vendor/zendframework/zend-eventmanager/Zend/EventManager/Filter/FilterIterator.php +1 -1
- backend/vendor/zendframework/zend-eventmanager/Zend/EventManager/FilterChain.php +1 -1
- backend/vendor/zendframework/zend-eventmanager/Zend/EventManager/GlobalEventManager.php +1 -1
- backend/vendor/zendframework/zend-eventmanager/Zend/EventManager/ListenerAggregateInterface.php +1 -1
- backend/vendor/zendframework/zend-eventmanager/Zend/EventManager/ListenerAggregateTrait.php +1 -1
- backend/vendor/zendframework/zend-eventmanager/Zend/EventManager/ProvidesEvents.php +1 -1
- backend/vendor/zendframework/zend-eventmanager/Zend/EventManager/ResponseCollection.php +1 -1
- backend/vendor/zendframework/zend-eventmanager/Zend/EventManager/SharedEventAggregateAwareInterface.php +1 -1
- backend/vendor/zendframework/zend-eventmanager/Zend/EventManager/SharedEventManager.php +1 -1
- backend/vendor/zendframework/zend-eventmanager/Zend/EventManager/SharedEventManagerAwareInterface.php +1 -1
- backend/vendor/zendframework/zend-eventmanager/Zend/EventManager/SharedEventManagerInterface.php +1 -1
- backend/vendor/zendframework/zend-eventmanager/Zend/EventManager/SharedListenerAggregateInterface.php +1 -1
- backend/vendor/zendframework/zend-eventmanager/Zend/EventManager/StaticEventManager.php +1 -1
- backend/vendor/zendframework/zend-json/Zend/Json/Decoder.php +17 -28
- backend/vendor/zendframework/zend-json/Zend/Json/Encoder.php +35 -41
- backend/vendor/zendframework/zend-json/Zend/Json/Exception/BadMethodCallException.php +3 -2
- backend/vendor/zendframework/zend-json/Zend/Json/Exception/ExceptionInterface.php +3 -2
- backend/vendor/zendframework/zend-json/Zend/Json/Exception/InvalidArgumentException.php +3 -2
- backend/vendor/zendframework/zend-json/Zend/Json/Exception/RecursionException.php +3 -2
- backend/vendor/zendframework/zend-json/Zend/Json/Exception/RuntimeException.php +3 -2
- backend/vendor/zendframework/zend-json/Zend/Json/Expr.php +1 -1
- backend/vendor/zendframework/zend-json/Zend/Json/Json.php +10 -5
- backend/vendor/zendframework/zend-json/Zend/Json/Server/Cache.php +3 -8
- backend/vendor/zendframework/zend-json/Zend/Json/Server/Client.php +1 -1
- backend/vendor/zendframework/zend-json/Zend/Json/Server/Error.php +1 -1
- backend/vendor/zendframework/zend-json/Zend/Json/Server/Exception/ErrorException.php +3 -2
- backend/vendor/zendframework/zend-json/Zend/Json/Server/Exception/ExceptionInterface.php +3 -2
- backend/vendor/zendframework/zend-json/Zend/Json/Server/Exception/HttpException.php +3 -2
- backend/vendor/zendframework/zend-json/Zend/Json/Server/Exception/InvalidArgumentException.php +3 -2
- backend/vendor/zendframework/zend-json/Zend/Json/Server/Exception/RuntimeException.php +3 -2
- backend/vendor/zendframework/zend-json/Zend/Json/Server/Request.php +2 -2
- backend/vendor/zendframework/zend-json/Zend/Json/Server/Request/Http.php +1 -1
- backend/vendor/zendframework/zend-json/Zend/Json/Server/Response.php +1 -1
- backend/vendor/zendframework/zend-json/Zend/Json/Server/Response/Http.php +1 -1
- backend/vendor/zendframework/zend-json/Zend/Json/Server/Server.php +1 -2
- backend/vendor/zendframework/zend-json/Zend/Json/Server/Smd.php +1 -1
- backend/vendor/zendframework/zend-json/Zend/Json/Server/Smd/Service.php +1 -1
- backend/vendor/zendframework/zend-json/Zend/Json/composer.json +2 -1
- backend/vendor/zendframework/zend-math/Zend/Math/BigInteger/Adapter/AdapterInterface.php +147 -0
- backend/vendor/zendframework/zend-math/Zend/Math/BigInteger/Adapter/Bcmath.php +334 -0
- backend/vendor/zendframework/zend-math/Zend/Math/BigInteger/Adapter/Gmp.php +321 -0
- backend/vendor/zendframework/zend-math/Zend/Math/BigInteger/AdapterPluginManager.php +55 -0
- backend/vendor/zendframework/zend-math/Zend/Math/BigInteger/BigInteger.php +121 -0
- backend/vendor/zendframework/zend-math/Zend/Math/BigInteger/Exception/DivisionByZeroException.php +17 -0
- backend/vendor/zendframework/zend-math/Zend/Math/BigInteger/Exception/ExceptionInterface.php +19 -0
- backend/vendor/zendframework/zend-math/Zend/Math/BigInteger/Exception/InvalidArgumentException.php +19 -0
- backend/vendor/zendframework/zend-math/Zend/Math/BigInteger/Exception/RuntimeException.php +19 -0
- backend/vendor/zendframework/zend-math/Zend/Math/CONTRIBUTING.md +3 -0
- backend/vendor/zendframework/zend-math/Zend/Math/Exception/DomainException.php +17 -0
- backend/vendor/zendframework/zend-math/Zend/Math/Exception/ExceptionInterface.php +14 -0
- backend/vendor/zendframework/zend-math/Zend/Math/Exception/InvalidArgumentException.php +18 -0
- backend/vendor/zendframework/zend-math/Zend/Math/Exception/RuntimeException.php +18 -0
- backend/vendor/zendframework/zend-math/Zend/Math/README.md +15 -0
- backend/vendor/zendframework/zend-math/Zend/Math/Rand.php +212 -0
- backend/vendor/zendframework/zend-math/Zend/Math/Source/HashTiming.php +111 -0
- backend/vendor/zendframework/zend-math/Zend/Math/composer.json +31 -0
- backend/vendor/zendframework/zend-serializer/Zend/Serializer/Adapter/AbstractAdapter.php +59 -0
- backend/vendor/zendframework/zend-serializer/Zend/Serializer/Adapter/AdapterInterface.php +31 -0
- backend/vendor/zendframework/zend-serializer/Zend/Serializer/Adapter/AdapterOptions.php +16 -0
- backend/vendor/zendframework/zend-serializer/Zend/Serializer/Adapter/IgBinary.php +85 -0
- backend/vendor/zendframework/zend-serializer/Zend/Serializer/Adapter/Json.php +97 -0
- backend/vendor/zendframework/zend-serializer/Zend/Serializer/Adapter/JsonOptions.php +87 -0
- backend/vendor/zendframework/zend-serializer/Zend/Serializer/Adapter/MsgPack.php +85 -0
- backend/vendor/zendframework/zend-serializer/Zend/Serializer/Adapter/PhpCode.php +60 -0
- backend/vendor/zendframework/zend-serializer/Zend/Serializer/Adapter/PhpSerialize.php +86 -0
- backend/vendor/zendframework/zend-serializer/Zend/Serializer/Adapter/PythonPickle.php +1356 -0
- backend/vendor/zendframework/zend-serializer/Zend/Serializer/Adapter/PythonPickleOptions.php +55 -0
- backend/vendor/zendframework/zend-serializer/Zend/Serializer/Adapter/Wddx.php +138 -0
- backend/vendor/zendframework/zend-serializer/Zend/Serializer/Adapter/WddxOptions.php +42 -0
- backend/vendor/zendframework/zend-serializer/Zend/Serializer/AdapterPluginManager.php +61 -0
- backend/vendor/zendframework/zend-serializer/Zend/Serializer/CONTRIBUTING.md +3 -0
- backend/vendor/zendframework/zend-serializer/Zend/Serializer/Exception/ExceptionInterface.php +14 -0
- backend/vendor/zendframework/zend-serializer/Zend/Serializer/Exception/ExtensionNotLoadedException.php +14 -0
- backend/vendor/zendframework/zend-serializer/Zend/Serializer/Exception/InvalidArgumentException.php +18 -0
- backend/vendor/zendframework/zend-serializer/Zend/Serializer/Exception/RuntimeException.php +17 -0
- backend/vendor/zendframework/zend-serializer/Zend/Serializer/README.md +15 -0
- backend/vendor/zendframework/zend-serializer/Zend/Serializer/Serializer.php +146 -0
- backend/vendor/zendframework/zend-serializer/Zend/Serializer/composer.json +34 -0
- backend/vendor/zendframework/zend-servicemanager/Zend/ServiceManager/AbstractFactoryInterface.php +1 -1
- backend/vendor/zendframework/zend-servicemanager/Zend/ServiceManager/AbstractPluginManager.php +18 -4
- backend/vendor/zendframework/zend-servicemanager/Zend/ServiceManager/Config.php +1 -1
- backend/vendor/zendframework/zend-servicemanager/Zend/ServiceManager/ConfigInterface.php +1 -1
- backend/vendor/zendframework/zend-servicemanager/Zend/ServiceManager/DelegatorFactoryInterface.php +1 -1
- backend/vendor/zendframework/zend-servicemanager/Zend/ServiceManager/Di/DiAbstractServiceFactory.php +1 -1
- backend/vendor/zendframework/zend-servicemanager/Zend/ServiceManager/Di/DiInstanceManagerProxy.php +1 -1
- backend/vendor/zendframework/zend-servicemanager/Zend/ServiceManager/Di/DiServiceFactory.php +1 -5
- backend/vendor/zendframework/zend-servicemanager/Zend/ServiceManager/Di/DiServiceInitializer.php +1 -1
- backend/vendor/zendframework/zend-servicemanager/Zend/ServiceManager/Exception/CircularDependencyFoundException.php +1 -1
- backend/vendor/zendframework/zend-servicemanager/Zend/ServiceManager/Exception/CircularReferenceException.php +1 -1
- backend/vendor/zendframework/zend-servicemanager/Zend/ServiceManager/Exception/ExceptionInterface.php +1 -1
- backend/vendor/zendframework/zend-servicemanager/Zend/ServiceManager/Exception/InvalidArgumentException.php +1 -1
- backend/vendor/zendframework/zend-servicemanager/Zend/ServiceManager/Exception/InvalidServiceNameException.php +1 -1
- backend/vendor/zendframework/zend-servicemanager/Zend/ServiceManager/Exception/RuntimeException.php +1 -1
- backend/vendor/zendframework/zend-servicemanager/Zend/ServiceManager/Exception/ServiceNotCreatedException.php +1 -1
- backend/vendor/zendframework/zend-servicemanager/Zend/ServiceManager/Exception/ServiceNotFoundException.php +1 -1
- backend/vendor/zendframework/zend-servicemanager/Zend/ServiceManager/FactoryInterface.php +1 -1
- backend/vendor/zendframework/zend-servicemanager/Zend/ServiceManager/InitializerInterface.php +1 -2
- backend/vendor/zendframework/zend-servicemanager/Zend/ServiceManager/MutableCreationOptionsInterface.php +1 -1
- backend/vendor/zendframework/zend-servicemanager/Zend/ServiceManager/Proxy/LazyServiceFactory.php +1 -1
- backend/vendor/zendframework/zend-servicemanager/Zend/ServiceManager/Proxy/LazyServiceFactoryFactory.php +1 -1
- backend/vendor/zendframework/zend-servicemanager/Zend/ServiceManager/ServiceLocatorAwareInterface.php +1 -1
- backend/vendor/zendframework/zend-servicemanager/Zend/ServiceManager/ServiceLocatorAwareTrait.php +1 -2
- backend/vendor/zendframework/zend-servicemanager/Zend/ServiceManager/ServiceLocatorInterface.php +1 -1
- backend/vendor/zendframework/zend-servicemanager/Zend/ServiceManager/ServiceManager.php +30 -16
- backend/vendor/zendframework/zend-servicemanager/Zend/ServiceManager/ServiceManagerAwareInterface.php +1 -1
- backend/vendor/zendframework/zend-servicemanager/Zend/ServiceManager/composer.json +1 -0
- backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/AbstractOptions.php +36 -24
- backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/ArrayObject.php +1 -1
- backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/ArraySerializableInterface.php +1 -1
- backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/ArrayStack.php +1 -1
- backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/ArrayUtils.php +3 -3
- backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/CallbackHandler.php +1 -1
- backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/DateTime.php +1 -1
- backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/DispatchableInterface.php +1 -1
- backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/ErrorHandler.php +1 -1
- backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Exception/BadMethodCallException.php +1 -1
- backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Exception/DomainException.php +1 -1
- backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Exception/ExceptionInterface.php +1 -1
- backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Exception/ExtensionNotLoadedException.php +1 -1
- backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Exception/InvalidArgumentException.php +1 -1
- backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Exception/InvalidCallbackException.php +1 -1
- backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Exception/LogicException.php +1 -1
- backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Exception/RuntimeException.php +1 -1
- backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Extractor/ExtractionInterface.php +1 -1
- backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Glob.php +1 -2
- backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Guard/AllGuardsTrait.php +1 -1
- backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Guard/ArrayOrTraversableGuardTrait.php +1 -1
- backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Guard/EmptyGuardTrait.php +1 -1
- backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Guard/GuardUtils.php +1 -1
- backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Guard/NullGuardTrait.php +1 -1
- backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Hydrator/AbstractHydrator.php +1 -1
- backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Hydrator/Aggregate/AggregateHydrator.php +1 -1
- backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Hydrator/Aggregate/ExtractEvent.php +1 -2
- backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Hydrator/Aggregate/HydrateEvent.php +1 -2
- backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Hydrator/Aggregate/HydratorListener.php +1 -2
- backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Hydrator/ArraySerializable.php +7 -8
- backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Hydrator/ClassMethods.php +12 -12
- backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Hydrator/Filter/FilterComposite.php +7 -11
- backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Hydrator/Filter/FilterInterface.php +1 -1
- backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Hydrator/Filter/FilterProviderInterface.php +1 -1
- backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Hydrator/Filter/GetFilter.php +1 -1
- backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Hydrator/Filter/HasFilter.php +1 -1
- backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Hydrator/Filter/IsFilter.php +1 -1
- backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Hydrator/Filter/MethodMatchFilter.php +1 -1
- backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Hydrator/Filter/NumberOfParameterFilter.php +1 -1
- backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Hydrator/Filter/OptionalParametersFilter.php +1 -1
- backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Hydrator/FilterEnabledInterface.php +1 -1
- backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Hydrator/HydrationInterface.php +1 -1
- backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Hydrator/HydratorAwareInterface.php +1 -1
- backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Hydrator/HydratorAwareTrait.php +1 -1
- backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Hydrator/HydratorInterface.php +1 -2
- backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Hydrator/HydratorOptionsInterface.php +1 -1
- backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Hydrator/HydratorPluginManager.php +1 -1
- backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Hydrator/NamingStrategy/NamingStrategyInterface.php +1 -1
- backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Hydrator/NamingStrategy/UnderscoreNamingStrategy.php +1 -1
- backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Hydrator/NamingStrategyEnabledInterface.php +1 -1
- backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Hydrator/ObjectProperty.php +49 -16
- backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Hydrator/Reflection.php +3 -3
- backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Hydrator/Strategy/ClosureStrategy.php +1 -1
- backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Hydrator/Strategy/DefaultStrategy.php +1 -1
- backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Hydrator/Strategy/SerializableStrategy.php +1 -1
- backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Hydrator/Strategy/StrategyInterface.php +1 -1
- backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Hydrator/StrategyEnabledInterface.php +1 -1
- backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/InitializableInterface.php +1 -1
- backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/JsonSerializable.php +1 -1
- backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/JsonSerializable/PhpLegacyCompatibility.php +1 -1
- backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Message.php +1 -1
- backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/MessageInterface.php +1 -2
- backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/ParameterObjectInterface.php +1 -1
- backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Parameters.php +2 -2
- backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/ParametersInterface.php +1 -1
- backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/PriorityList.php +44 -46
- backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/PriorityQueue.php +1 -1
- backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Request.php +1 -1
- backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/RequestInterface.php +1 -1
- backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Response.php +1 -1
- backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/ResponseInterface.php +1 -2
- backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/SplPriorityQueue.php +1 -3
- backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/SplQueue.php +1 -1
- backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/SplStack.php +1 -1
- backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/StringUtils.php +1 -2
- backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/StringWrapper/AbstractStringWrapper.php +1 -2
- backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/StringWrapper/Iconv.php +1 -1
- backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/StringWrapper/Intl.php +1 -1
- backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/StringWrapper/MbString.php +1 -1
- backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/StringWrapper/Native.php +1 -1
- backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/StringWrapper/StringWrapperInterface.php +1 -1
- backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/compatibility/autoload.php +1 -1
- backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/composer.json +4 -2
- locale/shariff3UU-de_DE.mo +0 -0
- locale/shariff3UU-de_DE.po +63 -35
- locale/shariff3UU-fr_FR.mo +0 -0
- locale/shariff3UU-fr_FR.po +26 -0
- pictos/colorBtns.png +0 -0
- pictos/defaultBtns.png +0 -0
- pictos/greyBtns.png +0 -0
- pictos/roundBtns.png +0 -0
- pictos/smallBtns.png +0 -0
- pictos/verticalBtns.png +0 -0
- pictos/whiteBtns.png +0 -0
- readme.txt +116 -86
- shariff.js +60 -18
- shariff.min.local.css +6 -1
- shariff.php +398 -151
- uninstall.php +51 -5
- updates.php +58 -0
admin.css
CHANGED
@@ -12,4 +12,12 @@
|
|
12 |
content:"\00D7";
|
13 |
font-weight:bold;
|
14 |
font-size:2em;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
}
|
12 |
content:"\00D7";
|
13 |
font-weight:bold;
|
14 |
font-size:2em;
|
15 |
+
}
|
16 |
+
|
17 |
+
input[required] {
|
18 |
+
border: 2px solid #ff0000;
|
19 |
+
}
|
20 |
+
|
21 |
+
:invalid {
|
22 |
+
border: 2px solid #ff0000;
|
23 |
}
|
backend/index.php
CHANGED
@@ -1,4 +1,14 @@
|
|
1 |
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
require_once __DIR__.'/vendor/autoload.php';
|
3 |
|
4 |
use Heise\Shariff\Backend;
|
@@ -28,22 +38,22 @@ class Application{
|
|
28 |
"6"=>"StumbleUpon",
|
29 |
"7"=>"Pinterest",
|
30 |
"8"=>"Xing");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
// if we have a constant for the ttl (default is 60 s)
|
32 |
if(defined('SHARIFF_BACKEND_TTL'))$tmp["cache"]["ttl"]=SHARIFF_BACKEND_TTL;
|
33 |
// if we have a constant for the tmp-dir
|
34 |
if(defined('SHARIFF_BACKEND_TMPDIR'))$tmp["cache"]["cacheDir"]=SHARIFF_BACKEND_TMPDIR;
|
35 |
// if we do not have a tmp-dir, we use the content dir of WP
|
36 |
if( empty($tmp["cache"]["cacheDir"]) ){
|
37 |
-
// force a short init because we only need WP core
|
38 |
-
define( 'SHORTINIT', true );
|
39 |
-
// build the wp-load/-config.php path
|
40 |
-
$wp_root_path = dirname( dirname( dirname( dirname( dirname( __FILE__ ) ) ) ) );
|
41 |
-
// include the config
|
42 |
-
include ( $wp_root_path . '/wp-config.php' );
|
43 |
-
// include wp-load.php file (that loads wp-config.php and bootstraps WP)
|
44 |
-
require( $wp_root_path . '/wp-load.php' );
|
45 |
-
// include for needed untrailingslashit()
|
46 |
-
require( $wp_root_path . '/wp-includes/formatting.php');
|
47 |
// to avoid conficts with other plugins and actual uploads we use a fixed date in the past
|
48 |
// month of my birthday would be great ;-) The wp_upload_dir() create the dir if not exists.
|
49 |
$upload_dir = @wp_upload_dir('1970/01');
|
1 |
<?php
|
2 |
+
define('WP_DEBUG', false);
|
3 |
+
|
4 |
+
// CACHEN untersagen
|
5 |
+
// Datum aus Vergangenheit
|
6 |
+
header("Expires: Sat, 24 Jan 1970 04:10:00 GMT"); // Datum aus Vergangenheit
|
7 |
+
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // Immer geaendert
|
8 |
+
header("Cache-Control: no-store, no-cache, must-revalidate");
|
9 |
+
header("Cache-Control: post-check=0, pre-check=0", false); // Speziell fuer MSIE 5
|
10 |
+
header("Pragma: no-cache");
|
11 |
+
|
12 |
require_once __DIR__.'/vendor/autoload.php';
|
13 |
|
14 |
use Heise\Shariff\Backend;
|
38 |
"6"=>"StumbleUpon",
|
39 |
"7"=>"Pinterest",
|
40 |
"8"=>"Xing");
|
41 |
+
// force a short init because we only need WP core
|
42 |
+
define( 'SHORTINIT', true );
|
43 |
+
// build the wp-load/-config.php path
|
44 |
+
$wp_root_path = dirname( dirname( dirname( dirname( dirname( __FILE__ ) ) ) ) );
|
45 |
+
// include the config
|
46 |
+
include ( $wp_root_path . '/wp-config.php' );
|
47 |
+
// include wp-load.php file (that loads wp-config.php and bootstraps WP)
|
48 |
+
require( $wp_root_path . '/wp-load.php' );
|
49 |
+
// include for needed untrailingslashit()
|
50 |
+
require( $wp_root_path . '/wp-includes/formatting.php');
|
51 |
// if we have a constant for the ttl (default is 60 s)
|
52 |
if(defined('SHARIFF_BACKEND_TTL'))$tmp["cache"]["ttl"]=SHARIFF_BACKEND_TTL;
|
53 |
// if we have a constant for the tmp-dir
|
54 |
if(defined('SHARIFF_BACKEND_TMPDIR'))$tmp["cache"]["cacheDir"]=SHARIFF_BACKEND_TMPDIR;
|
55 |
// if we do not have a tmp-dir, we use the content dir of WP
|
56 |
if( empty($tmp["cache"]["cacheDir"]) ){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
// to avoid conficts with other plugins and actual uploads we use a fixed date in the past
|
58 |
// month of my birthday would be great ;-) The wp_upload_dir() create the dir if not exists.
|
59 |
$upload_dir = @wp_upload_dir('1970/01');
|
backend/src/Backend.php
CHANGED
@@ -3,110 +3,80 @@
|
|
3 |
namespace Heise\Shariff;
|
4 |
|
5 |
use GuzzleHttp\Client;
|
6 |
-
use
|
|
|
7 |
use Zend\Cache\Storage\Adapter\Filesystem;
|
|
|
|
|
|
|
8 |
|
9 |
class Backend
|
10 |
{
|
11 |
-
|
12 |
-
protected $
|
13 |
-
protected $cache;
|
14 |
-
protected $client;
|
15 |
-
protected $domain;
|
16 |
-
protected $services;
|
17 |
|
18 |
public function __construct($config)
|
19 |
{
|
20 |
-
$
|
21 |
-
$
|
22 |
-
|
23 |
-
|
24 |
-
$this->cache = new Filesystem();
|
25 |
-
$options = $this->cache->getOptions();
|
26 |
-
$options->setCacheDir(
|
27 |
-
array_key_exists("cacheDir", $config["cache"])
|
28 |
-
? $config["cache"]["cacheDir"]
|
29 |
-
: sys_get_temp_dir()
|
30 |
-
);
|
31 |
-
$options->setNamespace('Shariff');
|
32 |
-
$options->setTtl($config["cache"]["ttl"]);
|
33 |
-
|
34 |
-
if (function_exists('register_postsend_function')) {
|
35 |
-
// for hhvm installations: executing after response / session close
|
36 |
-
register_postsend_function(function() {
|
37 |
-
$this->cache->clearExpired();
|
38 |
-
});
|
39 |
-
} else {
|
40 |
-
// default
|
41 |
-
$this->cache->clearExpired();
|
42 |
}
|
|
|
|
|
43 |
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
private function getServicesByName($serviceNames)
|
48 |
-
{
|
49 |
-
$services = array();
|
50 |
-
foreach ($serviceNames as $serviceName) {
|
51 |
-
$serviceName = 'Heise\Shariff\Backend\\'.$serviceName;
|
52 |
-
$services[] = new $serviceName();
|
53 |
}
|
54 |
-
return $services;
|
55 |
-
}
|
56 |
|
57 |
-
|
58 |
-
|
59 |
-
if ($this->domain) {
|
60 |
-
$parsed = parse_url($url);
|
61 |
-
if ($parsed["host"] != $this->domain) {
|
62 |
-
return false;
|
63 |
-
}
|
64 |
}
|
65 |
-
return true;
|
66 |
-
}
|
67 |
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
|
|
73 |
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
|
78 |
-
if ($
|
79 |
-
|
|
|
|
|
|
|
|
|
80 |
}
|
81 |
|
82 |
-
if (
|
83 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
84 |
}
|
85 |
|
86 |
-
$
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
$
|
|
|
|
|
91 |
);
|
|
|
92 |
|
93 |
-
$results = Pool::batch($this->client, $requests);
|
94 |
-
|
95 |
-
$counts = array();
|
96 |
-
$i = 0;
|
97 |
-
foreach ($this->services as $service) {
|
98 |
-
if (method_exists($results[$i], "json")) {
|
99 |
-
try {
|
100 |
-
$counts[ $service->getName() ] = intval($service->extractCount($results[$i]->json()));
|
101 |
-
} catch (\Exception $e) {
|
102 |
-
// Skip service if broken
|
103 |
-
}
|
104 |
-
}
|
105 |
-
$i++;
|
106 |
-
}
|
107 |
-
|
108 |
-
$this->cache->setItem($cache_key, json_encode($counts));
|
109 |
|
110 |
-
|
|
|
|
|
111 |
}
|
112 |
}
|
3 |
namespace Heise\Shariff;
|
4 |
|
5 |
use GuzzleHttp\Client;
|
6 |
+
use Heise\Shariff\Backend\BackendManager;
|
7 |
+
use Heise\Shariff\Backend\ServiceFactory;
|
8 |
use Zend\Cache\Storage\Adapter\Filesystem;
|
9 |
+
use Zend\Cache\Storage\Adapter\FilesystemOptions;
|
10 |
+
use Zend\Cache\Storage\ClearExpiredInterface;
|
11 |
+
use Zend\Cache\StorageFactory;
|
12 |
|
13 |
class Backend
|
14 |
{
|
15 |
+
/** @var BackendManager */
|
16 |
+
protected $backendManager;
|
|
|
|
|
|
|
|
|
17 |
|
18 |
public function __construct($config)
|
19 |
{
|
20 |
+
$domain = $config["domain"];
|
21 |
+
$clientOptions = [];
|
22 |
+
if (isset($config['client'])) {
|
23 |
+
$clientOptions = $config['client'];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
}
|
25 |
+
$client = new Client(['defaults' => $clientOptions]);
|
26 |
+
$baseCacheKey = md5(json_encode($config));
|
27 |
|
28 |
+
if (!isset($config['cache']['adapter'])) {
|
29 |
+
$config['cache']['adapter'] = 'Filesystem';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
}
|
|
|
|
|
31 |
|
32 |
+
if (!isset($config['cache']['adapterOptions'])) {
|
33 |
+
$config['cache']['adapterOptions'] = [];
|
|
|
|
|
|
|
|
|
|
|
34 |
}
|
|
|
|
|
35 |
|
36 |
+
$cache = StorageFactory::factory([
|
37 |
+
'adapter' => [
|
38 |
+
'name' => $config['cache']['adapter'],
|
39 |
+
'options' => $config['cache']['adapterOptions']
|
40 |
+
]
|
41 |
+
]);
|
42 |
|
43 |
+
$options = $cache->getOptions();
|
44 |
+
$options->setNamespace('Shariff');
|
45 |
+
$options->setTtl($config["cache"]["ttl"]);
|
46 |
|
47 |
+
if ($options instanceof FilesystemOptions) {
|
48 |
+
$options->setCacheDir(
|
49 |
+
array_key_exists("cacheDir", $config["cache"])
|
50 |
+
? $config["cache"]["cacheDir"]
|
51 |
+
: sys_get_temp_dir()
|
52 |
+
);
|
53 |
}
|
54 |
|
55 |
+
if ($cache instanceof ClearExpiredInterface) {
|
56 |
+
if (function_exists('register_postsend_function')) {
|
57 |
+
// for hhvm installations: executing after response / session close
|
58 |
+
register_postsend_function(function () use ($cache) {
|
59 |
+
$cache->clearExpired();
|
60 |
+
});
|
61 |
+
} else {
|
62 |
+
// default
|
63 |
+
$cache->clearExpired();
|
64 |
+
}
|
65 |
}
|
66 |
|
67 |
+
$serviceFactory = new ServiceFactory($client);
|
68 |
+
$this->backendManager = new BackendManager(
|
69 |
+
$baseCacheKey,
|
70 |
+
$cache,
|
71 |
+
$client,
|
72 |
+
$domain,
|
73 |
+
$serviceFactory->getServicesByName($config['services'], $config)
|
74 |
);
|
75 |
+
}
|
76 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
77 |
|
78 |
+
public function get($url)
|
79 |
+
{
|
80 |
+
return $this->backendManager->get($url);
|
81 |
}
|
82 |
}
|
backend/src/Backend/BackendManager.php
ADDED
@@ -0,0 +1,90 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Heise\Shariff\Backend;
|
4 |
+
|
5 |
+
use GuzzleHttp\Client;
|
6 |
+
use GuzzleHttp\Pool;
|
7 |
+
use Zend\Cache\Storage\StorageInterface;
|
8 |
+
|
9 |
+
class BackendManager
|
10 |
+
{
|
11 |
+
/** @var string */
|
12 |
+
protected $baseCacheKey;
|
13 |
+
|
14 |
+
/** @var StorageInterface */
|
15 |
+
protected $cache;
|
16 |
+
|
17 |
+
/** @var Client */
|
18 |
+
protected $client;
|
19 |
+
|
20 |
+
/** @var string */
|
21 |
+
protected $domain;
|
22 |
+
|
23 |
+
/** @var ServiceInterface[] */
|
24 |
+
protected $services;
|
25 |
+
|
26 |
+
public function __construct($baseCacheKey, $cache, $client, $domain, $services)
|
27 |
+
{
|
28 |
+
$this->baseCacheKey = $baseCacheKey;
|
29 |
+
$this->cache = $cache;
|
30 |
+
$this->client = $client;
|
31 |
+
$this->domain = $domain;
|
32 |
+
$this->services = $services;
|
33 |
+
}
|
34 |
+
|
35 |
+
private function isValidDomain($url)
|
36 |
+
{
|
37 |
+
if ($this->domain) {
|
38 |
+
$parsed = parse_url($url);
|
39 |
+
if ($parsed["host"] != $this->domain) {
|
40 |
+
return false;
|
41 |
+
}
|
42 |
+
}
|
43 |
+
return true;
|
44 |
+
}
|
45 |
+
|
46 |
+
public function get($url)
|
47 |
+
{
|
48 |
+
|
49 |
+
// Aenderungen an der Konfiguration invalidieren den Cache
|
50 |
+
$cache_key = md5($url.$this->baseCacheKey);
|
51 |
+
|
52 |
+
if (!filter_var($url, FILTER_VALIDATE_URL)) {
|
53 |
+
return null;
|
54 |
+
}
|
55 |
+
|
56 |
+
if ($this->cache->hasItem($cache_key)) {
|
57 |
+
return json_decode($this->cache->getItem($cache_key), true);
|
58 |
+
}
|
59 |
+
|
60 |
+
if (!$this->isValidDomain($url)) {
|
61 |
+
return null;
|
62 |
+
}
|
63 |
+
|
64 |
+
$requests = array_map(
|
65 |
+
function ($service) use ($url) {
|
66 |
+
return $service->getRequest($url);
|
67 |
+
},
|
68 |
+
$this->services
|
69 |
+
);
|
70 |
+
|
71 |
+
$results = Pool::batch($this->client, $requests);
|
72 |
+
|
73 |
+
$counts = array();
|
74 |
+
$i = 0;
|
75 |
+
foreach ($this->services as $service) {
|
76 |
+
if (method_exists($results[$i], "json")) {
|
77 |
+
try {
|
78 |
+
$counts[ $service->getName() ] = intval($service->extractCount($results[$i]->json()));
|
79 |
+
} catch (\Exception $e) {
|
80 |
+
// Skip service if broken
|
81 |
+
}
|
82 |
+
}
|
83 |
+
$i++;
|
84 |
+
}
|
85 |
+
|
86 |
+
$this->cache->setItem($cache_key, json_encode($counts));
|
87 |
+
|
88 |
+
return $counts;
|
89 |
+
}
|
90 |
+
}
|
backend/src/Backend/Facebook.php
CHANGED
@@ -12,13 +12,38 @@ class Facebook extends Request implements ServiceInterface
|
|
12 |
|
13 |
public function getRequest($url)
|
14 |
{
|
15 |
-
$
|
16 |
-
|
|
|
|
|
|
|
|
|
|
|
17 |
}
|
18 |
|
19 |
public function extractCount($data)
|
20 |
{
|
21 |
-
|
22 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
}
|
24 |
}
|
12 |
|
13 |
public function getRequest($url)
|
14 |
{
|
15 |
+
$accessToken = $this->getAccesToken();
|
16 |
+
if (null !== $accessToken) {
|
17 |
+
$query = 'https://graph.facebook.com/v2.2/?id=' . $url . '&' . $accessToken;
|
18 |
+
} else {
|
19 |
+
$query = 'https://graph.facebook.com/fql?q=SELECT total_count FROM link_stat WHERE url="'.$url.'"';
|
20 |
+
}
|
21 |
+
return $this->createRequest($query);
|
22 |
}
|
23 |
|
24 |
public function extractCount($data)
|
25 |
{
|
26 |
+
if (isset($data['data']) && isset($data['data'][0]) && isset($data['data'][0]['total_count'])) {
|
27 |
+
return $data['data'][0]['total_count'];
|
28 |
+
}
|
29 |
+
if (isset($data['share']) && isset($data['share']['share_count'])) {
|
30 |
+
return $data['share']['share_count'];
|
31 |
+
}
|
32 |
+
|
33 |
+
return null;
|
34 |
+
}
|
35 |
+
|
36 |
+
protected function getAccesToken()
|
37 |
+
{
|
38 |
+
if (isset($this->config['app_id']) && isset($this->config['secret'])) {
|
39 |
+
try {
|
40 |
+
$url = 'https://graph.facebook.com/oauth/access_token?client_id=' . $this->config['app_id']
|
41 |
+
. '&client_secret=' . $this->config['secret'] . '&grant_type=client_credentials';
|
42 |
+
$request = $this->client->createRequest('GET', $url);
|
43 |
+
return $this->client->send($request)->getBody(true);
|
44 |
+
} catch (\Exception $e) {
|
45 |
+
}
|
46 |
+
}
|
47 |
+
return null;
|
48 |
}
|
49 |
}
|
backend/src/Backend/Request.php
CHANGED
@@ -6,12 +6,15 @@ use GuzzleHttp\Client;
|
|
6 |
|
7 |
abstract class Request
|
8 |
{
|
9 |
-
|
10 |
protected $client;
|
11 |
|
12 |
-
|
|
|
|
|
|
|
13 |
{
|
14 |
-
$this->client =
|
15 |
}
|
16 |
|
17 |
protected function createRequest($url, $method = 'GET', $options = array())
|
@@ -27,4 +30,9 @@ abstract class Request
|
|
27 |
|
28 |
return $req;
|
29 |
}
|
|
|
|
|
|
|
|
|
|
|
30 |
}
|
6 |
|
7 |
abstract class Request
|
8 |
{
|
9 |
+
/** @var Client */
|
10 |
protected $client;
|
11 |
|
12 |
+
/** @var array */
|
13 |
+
protected $config;
|
14 |
+
|
15 |
+
public function __construct(Client $client)
|
16 |
{
|
17 |
+
$this->client = $client;
|
18 |
}
|
19 |
|
20 |
protected function createRequest($url, $method = 'GET', $options = array())
|
30 |
|
31 |
return $req;
|
32 |
}
|
33 |
+
|
34 |
+
public function setConfig(array $config)
|
35 |
+
{
|
36 |
+
$this->config = $config;
|
37 |
+
}
|
38 |
}
|
backend/src/Backend/ServiceFactory.php
ADDED
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Heise\Shariff\Backend;
|
4 |
+
|
5 |
+
use GuzzleHttp\Client;
|
6 |
+
|
7 |
+
class ServiceFactory
|
8 |
+
{
|
9 |
+
/** @var Client */
|
10 |
+
protected $client;
|
11 |
+
|
12 |
+
/** @var array */
|
13 |
+
protected $serviceMap;
|
14 |
+
|
15 |
+
public function __construct(Client $client)
|
16 |
+
{
|
17 |
+
$this->client = $client;
|
18 |
+
$this->serviceMap = array();
|
19 |
+
}
|
20 |
+
|
21 |
+
public function registerService($name, $service)
|
22 |
+
{
|
23 |
+
$this->serviceMap[$name] = $service;
|
24 |
+
}
|
25 |
+
|
26 |
+
public function getServicesByName($serviceNames, $config)
|
27 |
+
{
|
28 |
+
$services = array();
|
29 |
+
foreach ($serviceNames as $serviceName) {
|
30 |
+
$services[] = $this->createService($serviceName, $config);
|
31 |
+
}
|
32 |
+
return $services;
|
33 |
+
}
|
34 |
+
|
35 |
+
protected function createService($serviceName, $config)
|
36 |
+
{
|
37 |
+
if (isset($this->serviceMap[$serviceName])) {
|
38 |
+
$service = $this->serviceMap[$serviceName];
|
39 |
+
} else {
|
40 |
+
$serviceClass = 'Heise\Shariff\Backend\\'.$serviceName;
|
41 |
+
$service = new $serviceClass($this->client);
|
42 |
+
}
|
43 |
+
|
44 |
+
if (isset($config[$serviceName])) {
|
45 |
+
$service->setConfig($config[$serviceName]);
|
46 |
+
}
|
47 |
+
|
48 |
+
return $service;
|
49 |
+
}
|
50 |
+
}
|
backend/src/Backend/ServiceInterface.php
CHANGED
@@ -7,4 +7,5 @@ interface ServiceInterface
|
|
7 |
public function getRequest($url);
|
8 |
public function extractCount($data);
|
9 |
public function getName();
|
|
|
10 |
}
|
7 |
public function getRequest($url);
|
8 |
public function extractCount($data);
|
9 |
public function getName();
|
10 |
+
public function setConfig(array $config);
|
11 |
}
|
backend/vendor/autoload.php
CHANGED
@@ -4,4 +4,4 @@
|
|
4 |
|
5 |
require_once __DIR__ . '/composer' . '/autoload_real.php';
|
6 |
|
7 |
-
return
|
4 |
|
5 |
require_once __DIR__ . '/composer' . '/autoload_real.php';
|
6 |
|
7 |
+
return ComposerAutoloaderInitbfcd8973f252782d8f308b3dd140a9c7::getLoader();
|
backend/vendor/composer/ClassLoader.php
CHANGED
@@ -54,6 +54,8 @@ class ClassLoader
|
|
54 |
private $useIncludePath = false;
|
55 |
private $classMap = array();
|
56 |
|
|
|
|
|
57 |
public function getPrefixes()
|
58 |
{
|
59 |
if (!empty($this->prefixesPsr0)) {
|
@@ -248,6 +250,27 @@ class ClassLoader
|
|
248 |
return $this->useIncludePath;
|
249 |
}
|
250 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
251 |
/**
|
252 |
* Registers this instance as an autoloader.
|
253 |
*
|
@@ -299,6 +322,9 @@ class ClassLoader
|
|
299 |
if (isset($this->classMap[$class])) {
|
300 |
return $this->classMap[$class];
|
301 |
}
|
|
|
|
|
|
|
302 |
|
303 |
$file = $this->findFileWithExtension($class, '.php');
|
304 |
|
54 |
private $useIncludePath = false;
|
55 |
private $classMap = array();
|
56 |
|
57 |
+
private $classMapAuthoritative = false;
|
58 |
+
|
59 |
public function getPrefixes()
|
60 |
{
|
61 |
if (!empty($this->prefixesPsr0)) {
|
250 |
return $this->useIncludePath;
|
251 |
}
|
252 |
|
253 |
+
/**
|
254 |
+
* Turns off searching the prefix and fallback directories for classes
|
255 |
+
* that have not been registered with the class map.
|
256 |
+
*
|
257 |
+
* @param bool $classMapAuthoritative
|
258 |
+
*/
|
259 |
+
public function setClassMapAuthoritative($classMapAuthoritative)
|
260 |
+
{
|
261 |
+
$this->classMapAuthoritative = $classMapAuthoritative;
|
262 |
+
}
|
263 |
+
|
264 |
+
/**
|
265 |
+
* Should class lookup fail if not found in the current class map?
|
266 |
+
*
|
267 |
+
* @return bool
|
268 |
+
*/
|
269 |
+
public function isClassMapAuthoritative()
|
270 |
+
{
|
271 |
+
return $this->classMapAuthoritative;
|
272 |
+
}
|
273 |
+
|
274 |
/**
|
275 |
* Registers this instance as an autoloader.
|
276 |
*
|
322 |
if (isset($this->classMap[$class])) {
|
323 |
return $this->classMap[$class];
|
324 |
}
|
325 |
+
if ($this->classMapAuthoritative) {
|
326 |
+
return false;
|
327 |
+
}
|
328 |
|
329 |
$file = $this->findFileWithExtension($class, '.php');
|
330 |
|
backend/vendor/composer/autoload_namespaces.php
CHANGED
@@ -8,6 +8,8 @@ $baseDir = dirname($vendorDir);
|
|
8 |
return array(
|
9 |
'Zend\\Stdlib\\' => array($vendorDir . '/zendframework/zend-stdlib'),
|
10 |
'Zend\\ServiceManager\\' => array($vendorDir . '/zendframework/zend-servicemanager'),
|
|
|
|
|
11 |
'Zend\\Json\\' => array($vendorDir . '/zendframework/zend-json'),
|
12 |
'Zend\\EventManager\\' => array($vendorDir . '/zendframework/zend-eventmanager'),
|
13 |
'Zend\\Config\\' => array($vendorDir . '/zendframework/zend-config'),
|
8 |
return array(
|
9 |
'Zend\\Stdlib\\' => array($vendorDir . '/zendframework/zend-stdlib'),
|
10 |
'Zend\\ServiceManager\\' => array($vendorDir . '/zendframework/zend-servicemanager'),
|
11 |
+
'Zend\\Serializer\\' => array($vendorDir . '/zendframework/zend-serializer'),
|
12 |
+
'Zend\\Math\\' => array($vendorDir . '/zendframework/zend-math'),
|
13 |
'Zend\\Json\\' => array($vendorDir . '/zendframework/zend-json'),
|
14 |
'Zend\\EventManager\\' => array($vendorDir . '/zendframework/zend-eventmanager'),
|
15 |
'Zend\\Config\\' => array($vendorDir . '/zendframework/zend-config'),
|
backend/vendor/composer/autoload_real.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
-
class
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
@@ -19,9 +19,9 @@ class ComposerAutoloaderInit42c773bd7263c301a8af262571b7982a
|
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
-
spl_autoload_register(array('
|
23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
-
spl_autoload_unregister(array('
|
25 |
|
26 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
27 |
foreach ($map as $namespace => $path) {
|
@@ -42,14 +42,14 @@ class ComposerAutoloaderInit42c773bd7263c301a8af262571b7982a
|
|
42 |
|
43 |
$includeFiles = require __DIR__ . '/autoload_files.php';
|
44 |
foreach ($includeFiles as $file) {
|
45 |
-
|
46 |
}
|
47 |
|
48 |
return $loader;
|
49 |
}
|
50 |
}
|
51 |
|
52 |
-
function
|
53 |
{
|
54 |
require $file;
|
55 |
}
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
+
class ComposerAutoloaderInitbfcd8973f252782d8f308b3dd140a9c7
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
+
spl_autoload_register(array('ComposerAutoloaderInitbfcd8973f252782d8f308b3dd140a9c7', 'loadClassLoader'), true, true);
|
23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
+
spl_autoload_unregister(array('ComposerAutoloaderInitbfcd8973f252782d8f308b3dd140a9c7', 'loadClassLoader'));
|
25 |
|
26 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
27 |
foreach ($map as $namespace => $path) {
|
42 |
|
43 |
$includeFiles = require __DIR__ . '/autoload_files.php';
|
44 |
foreach ($includeFiles as $file) {
|
45 |
+
composerRequirebfcd8973f252782d8f308b3dd140a9c7($file);
|
46 |
}
|
47 |
|
48 |
return $loader;
|
49 |
}
|
50 |
}
|
51 |
|
52 |
+
function composerRequirebfcd8973f252782d8f308b3dd140a9c7($file)
|
53 |
{
|
54 |
require $file;
|
55 |
}
|
backend/vendor/composer/installed.json
CHANGED
@@ -51,20 +51,178 @@
|
|
51 |
"stream"
|
52 |
]
|
53 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
{
|
55 |
"name": "zendframework/zend-stdlib",
|
56 |
-
"version": "2.3.
|
57 |
-
"version_normalized": "2.3.
|
58 |
"target-dir": "Zend/Stdlib",
|
59 |
"source": {
|
60 |
"type": "git",
|
61 |
"url": "https://github.com/zendframework/Component_ZendStdlib.git",
|
62 |
-
"reference": "
|
63 |
},
|
64 |
"dist": {
|
65 |
"type": "zip",
|
66 |
-
"url": "https://api.github.com/repos/zendframework/Component_ZendStdlib/zipball/
|
67 |
-
"reference": "
|
68 |
"shasum": ""
|
69 |
},
|
70 |
"require": {
|
@@ -72,15 +230,17 @@
|
|
72 |
},
|
73 |
"require-dev": {
|
74 |
"zendframework/zend-eventmanager": "self.version",
|
|
|
75 |
"zendframework/zend-serializer": "self.version",
|
76 |
"zendframework/zend-servicemanager": "self.version"
|
77 |
},
|
78 |
"suggest": {
|
79 |
"zendframework/zend-eventmanager": "To support aggregate hydrator usage",
|
|
|
80 |
"zendframework/zend-serializer": "Zend\\Serializer component",
|
81 |
"zendframework/zend-servicemanager": "To support hydrator plugin manager usage"
|
82 |
},
|
83 |
-
"time": "
|
84 |
"type": "library",
|
85 |
"extra": {
|
86 |
"branch-alias": {
|
@@ -106,25 +266,25 @@
|
|
106 |
},
|
107 |
{
|
108 |
"name": "zendframework/zend-eventmanager",
|
109 |
-
"version": "2.3.
|
110 |
-
"version_normalized": "2.3.
|
111 |
"target-dir": "Zend/EventManager",
|
112 |
"source": {
|
113 |
"type": "git",
|
114 |
"url": "https://github.com/zendframework/Component_ZendEventManager.git",
|
115 |
-
"reference": "
|
116 |
},
|
117 |
"dist": {
|
118 |
"type": "zip",
|
119 |
-
"url": "https://api.github.com/repos/zendframework/Component_ZendEventManager/zipball/
|
120 |
-
"reference": "
|
121 |
"shasum": ""
|
122 |
},
|
123 |
"require": {
|
124 |
"php": ">=5.3.23",
|
125 |
"zendframework/zend-stdlib": "self.version"
|
126 |
},
|
127 |
-
"time": "
|
128 |
"type": "library",
|
129 |
"extra": {
|
130 |
"branch-alias": {
|
@@ -149,31 +309,31 @@
|
|
149 |
]
|
150 |
},
|
151 |
{
|
152 |
-
"name": "zendframework/zend-
|
153 |
-
"version": "2.3.
|
154 |
-
"version_normalized": "2.3.
|
155 |
-
"target-dir": "Zend/
|
156 |
"source": {
|
157 |
"type": "git",
|
158 |
-
"url": "https://github.com/zendframework/
|
159 |
-
"reference": "
|
160 |
},
|
161 |
"dist": {
|
162 |
"type": "zip",
|
163 |
-
"url": "https://api.github.com/repos/zendframework/
|
164 |
-
"reference": "
|
165 |
"shasum": ""
|
166 |
},
|
167 |
"require": {
|
168 |
"php": ">=5.3.23"
|
169 |
},
|
170 |
-
"require-dev": {
|
171 |
-
"zendframework/zend-di": "self.version"
|
172 |
-
},
|
173 |
"suggest": {
|
174 |
-
"
|
|
|
|
|
|
|
175 |
},
|
176 |
-
"time": "
|
177 |
"type": "library",
|
178 |
"extra": {
|
179 |
"branch-alias": {
|
@@ -184,7 +344,7 @@
|
|
184 |
"installation-source": "dist",
|
185 |
"autoload": {
|
186 |
"psr-0": {
|
187 |
-
"Zend\\
|
188 |
}
|
189 |
},
|
190 |
"notification-url": "https://packagist.org/downloads/",
|
@@ -193,45 +353,40 @@
|
|
193 |
],
|
194 |
"homepage": "https://github.com/zendframework/zf2",
|
195 |
"keywords": [
|
196 |
-
"
|
197 |
"zf2"
|
198 |
]
|
199 |
},
|
200 |
{
|
201 |
-
"name": "zendframework/zend-
|
202 |
-
"version": "2.3.
|
203 |
-
"version_normalized": "2.3.
|
204 |
-
"target-dir": "Zend/
|
205 |
"source": {
|
206 |
"type": "git",
|
207 |
-
"url": "https://github.com/zendframework/
|
208 |
-
"reference": "
|
209 |
},
|
210 |
"dist": {
|
211 |
"type": "zip",
|
212 |
-
"url": "https://api.github.com/repos/zendframework/
|
213 |
-
"reference": "
|
214 |
"shasum": ""
|
215 |
},
|
216 |
"require": {
|
217 |
"php": ">=5.3.23",
|
218 |
-
"zendframework/zend-eventmanager": "self.version",
|
219 |
-
"zendframework/zend-servicemanager": "self.version",
|
220 |
"zendframework/zend-stdlib": "self.version"
|
221 |
},
|
222 |
"require-dev": {
|
223 |
-
"zendframework/zend-
|
224 |
-
"zendframework/zend-
|
225 |
},
|
226 |
"suggest": {
|
227 |
-
"
|
228 |
-
"
|
229 |
-
"
|
230 |
-
"ext-wincache": "WinCache, to use the WinCache storage adapter",
|
231 |
-
"zendframework/zend-serializer": "Zend\\Serializer component",
|
232 |
-
"zendframework/zend-session": "Zend\\Session component"
|
233 |
},
|
234 |
-
"time": "
|
235 |
"type": "library",
|
236 |
"extra": {
|
237 |
"branch-alias": {
|
@@ -242,53 +397,49 @@
|
|
242 |
"installation-source": "dist",
|
243 |
"autoload": {
|
244 |
"psr-0": {
|
245 |
-
"Zend\\
|
246 |
}
|
247 |
},
|
248 |
"notification-url": "https://packagist.org/downloads/",
|
249 |
"license": [
|
250 |
"BSD-3-Clause"
|
251 |
],
|
252 |
-
"description": "provides
|
253 |
"homepage": "https://github.com/zendframework/zf2",
|
254 |
"keywords": [
|
255 |
-
"
|
256 |
"zf2"
|
257 |
]
|
258 |
},
|
259 |
{
|
260 |
-
"name": "zendframework/zend-
|
261 |
-
"version": "2.3.
|
262 |
-
"version_normalized": "2.3.
|
263 |
-
"target-dir": "Zend/
|
264 |
"source": {
|
265 |
"type": "git",
|
266 |
-
"url": "https://github.com/zendframework/
|
267 |
-
"reference": "
|
268 |
},
|
269 |
"dist": {
|
270 |
"type": "zip",
|
271 |
-
"url": "https://api.github.com/repos/zendframework/
|
272 |
-
"reference": "
|
273 |
"shasum": ""
|
274 |
},
|
275 |
"require": {
|
276 |
"php": ">=5.3.23",
|
|
|
|
|
277 |
"zendframework/zend-stdlib": "self.version"
|
278 |
},
|
279 |
"require-dev": {
|
280 |
-
"zendframework/zend-filter": "self.version",
|
281 |
-
"zendframework/zend-i18n": "self.version",
|
282 |
-
"zendframework/zend-json": "self.version",
|
283 |
"zendframework/zend-servicemanager": "self.version"
|
284 |
},
|
285 |
"suggest": {
|
286 |
-
"zendframework/zend-
|
287 |
-
"zendframework/zend-i18n": "Zend\\I18n component",
|
288 |
-
"zendframework/zend-json": "Zend\\Json to use the Json reader or writer classes",
|
289 |
-
"zendframework/zend-servicemanager": "Zend\\ServiceManager for use with the Config Factory to retrieve reader and writer instances"
|
290 |
},
|
291 |
-
"time": "
|
292 |
"type": "library",
|
293 |
"extra": {
|
294 |
"branch-alias": {
|
@@ -299,49 +450,47 @@
|
|
299 |
"installation-source": "dist",
|
300 |
"autoload": {
|
301 |
"psr-0": {
|
302 |
-
"Zend\\
|
303 |
}
|
304 |
},
|
305 |
"notification-url": "https://packagist.org/downloads/",
|
306 |
"license": [
|
307 |
"BSD-3-Clause"
|
308 |
],
|
309 |
-
"description": "provides
|
310 |
"homepage": "https://github.com/zendframework/zf2",
|
311 |
"keywords": [
|
312 |
-
"
|
313 |
"zf2"
|
314 |
]
|
315 |
},
|
316 |
{
|
317 |
-
"name": "zendframework/zend-
|
318 |
-
"version": "2.3.
|
319 |
-
"version_normalized": "2.3.
|
320 |
-
"target-dir": "Zend/
|
321 |
"source": {
|
322 |
"type": "git",
|
323 |
-
"url": "https://github.com/zendframework/
|
324 |
-
"reference": "
|
325 |
},
|
326 |
"dist": {
|
327 |
"type": "zip",
|
328 |
-
"url": "https://api.github.com/repos/zendframework/
|
329 |
-
"reference": "
|
330 |
"shasum": ""
|
331 |
},
|
332 |
"require": {
|
333 |
-
"php": ">=5.3.23"
|
334 |
-
"zendframework/zend-stdlib": "self.version"
|
335 |
},
|
336 |
"require-dev": {
|
337 |
-
"zendframework/zend-
|
338 |
-
"zendframework/zend-server": "self.version"
|
339 |
},
|
340 |
"suggest": {
|
341 |
-
"
|
342 |
-
"zendframework/zend-
|
343 |
},
|
344 |
-
"time": "
|
345 |
"type": "library",
|
346 |
"extra": {
|
347 |
"branch-alias": {
|
@@ -352,176 +501,133 @@
|
|
352 |
"installation-source": "dist",
|
353 |
"autoload": {
|
354 |
"psr-0": {
|
355 |
-
"Zend\\
|
356 |
}
|
357 |
},
|
358 |
"notification-url": "https://packagist.org/downloads/",
|
359 |
"license": [
|
360 |
"BSD-3-Clause"
|
361 |
],
|
362 |
-
"description": "provides convenience methods for serializing native PHP to JSON and decoding JSON to native PHP",
|
363 |
"homepage": "https://github.com/zendframework/zf2",
|
364 |
"keywords": [
|
365 |
-
"
|
366 |
"zf2"
|
367 |
]
|
368 |
},
|
369 |
{
|
370 |
-
"name": "
|
371 |
-
"version": "
|
372 |
-
"version_normalized": "2.
|
|
|
373 |
"source": {
|
374 |
"type": "git",
|
375 |
-
"url": "https://github.com/
|
376 |
-
"reference": "
|
377 |
},
|
378 |
"dist": {
|
379 |
"type": "zip",
|
380 |
-
"url": "https://api.github.com/repos/
|
381 |
-
"reference": "
|
382 |
"shasum": ""
|
383 |
},
|
384 |
"require": {
|
385 |
-
"php": ">=5.
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
"branch-alias": {
|
391 |
-
"dev-master": "2.0-dev"
|
392 |
-
}
|
393 |
-
},
|
394 |
-
"installation-source": "dist",
|
395 |
-
"autoload": {
|
396 |
-
"psr-4": {
|
397 |
-
"React\\Promise\\": "src/"
|
398 |
-
},
|
399 |
-
"files": [
|
400 |
-
"src/functions_include.php"
|
401 |
-
]
|
402 |
-
},
|
403 |
-
"notification-url": "https://packagist.org/downloads/",
|
404 |
-
"license": [
|
405 |
-
"MIT"
|
406 |
-
],
|
407 |
-
"authors": [
|
408 |
-
{
|
409 |
-
"name": "Jan Sorgalla",
|
410 |
-
"email": "jsorgalla@googlemail.com"
|
411 |
-
}
|
412 |
-
],
|
413 |
-
"description": "A lightweight implementation of CommonJS Promises/A for PHP"
|
414 |
-
},
|
415 |
-
{
|
416 |
-
"name": "guzzlehttp/ringphp",
|
417 |
-
"version": "1.0.5",
|
418 |
-
"version_normalized": "1.0.5.0",
|
419 |
-
"source": {
|
420 |
-
"type": "git",
|
421 |
-
"url": "https://github.com/guzzle/RingPHP.git",
|
422 |
-
"reference": "a903f51b692427318bc813217c0e6505287e79a4"
|
423 |
-
},
|
424 |
-
"dist": {
|
425 |
-
"type": "zip",
|
426 |
-
"url": "https://api.github.com/repos/guzzle/RingPHP/zipball/a903f51b692427318bc813217c0e6505287e79a4",
|
427 |
-
"reference": "a903f51b692427318bc813217c0e6505287e79a4",
|
428 |
-
"shasum": ""
|
429 |
-
},
|
430 |
-
"require": {
|
431 |
-
"guzzlehttp/streams": "~3.0",
|
432 |
-
"php": ">=5.4.0",
|
433 |
-
"react/promise": "~2.0"
|
434 |
},
|
435 |
"require-dev": {
|
436 |
-
"
|
437 |
-
"phpunit/phpunit": "~4.0"
|
438 |
},
|
439 |
"suggest": {
|
440 |
-
"ext-
|
|
|
|
|
|
|
|
|
|
|
441 |
},
|
442 |
-
"time": "
|
443 |
"type": "library",
|
444 |
"extra": {
|
445 |
"branch-alias": {
|
446 |
-
"dev-master": "
|
|
|
447 |
}
|
448 |
},
|
449 |
"installation-source": "dist",
|
450 |
"autoload": {
|
451 |
-
"psr-
|
452 |
-
"
|
453 |
}
|
454 |
},
|
455 |
"notification-url": "https://packagist.org/downloads/",
|
456 |
"license": [
|
457 |
-
"
|
458 |
],
|
459 |
-
"
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
}
|
465 |
]
|
466 |
},
|
467 |
{
|
468 |
-
"name": "
|
469 |
-
"version": "
|
470 |
-
"version_normalized": "
|
|
|
471 |
"source": {
|
472 |
"type": "git",
|
473 |
-
"url": "https://github.com/
|
474 |
-
"reference": "
|
475 |
},
|
476 |
"dist": {
|
477 |
"type": "zip",
|
478 |
-
"url": "https://api.github.com/repos/
|
479 |
-
"reference": "
|
480 |
"shasum": ""
|
481 |
},
|
482 |
"require": {
|
483 |
-
"
|
484 |
-
"
|
485 |
},
|
486 |
"require-dev": {
|
487 |
-
"
|
488 |
-
"
|
489 |
-
"
|
|
|
490 |
},
|
491 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
492 |
"type": "library",
|
493 |
"extra": {
|
494 |
"branch-alias": {
|
495 |
-
"dev-master": "
|
|
|
496 |
}
|
497 |
},
|
498 |
"installation-source": "dist",
|
499 |
"autoload": {
|
500 |
-
"psr-
|
501 |
-
"
|
502 |
}
|
503 |
},
|
504 |
"notification-url": "https://packagist.org/downloads/",
|
505 |
"license": [
|
506 |
-
"
|
507 |
-
],
|
508 |
-
"authors": [
|
509 |
-
{
|
510 |
-
"name": "Michael Dowling",
|
511 |
-
"email": "mtdowling@gmail.com",
|
512 |
-
"homepage": "https://github.com/mtdowling"
|
513 |
-
}
|
514 |
],
|
515 |
-
"description": "
|
516 |
-
"homepage": "
|
517 |
"keywords": [
|
518 |
-
"
|
519 |
-
"
|
520 |
-
"framework",
|
521 |
-
"http",
|
522 |
-
"http client",
|
523 |
-
"rest",
|
524 |
-
"web service"
|
525 |
]
|
526 |
}
|
527 |
]
|
51 |
"stream"
|
52 |
]
|
53 |
},
|
54 |
+
{
|
55 |
+
"name": "react/promise",
|
56 |
+
"version": "v2.2.0",
|
57 |
+
"version_normalized": "2.2.0.0",
|
58 |
+
"source": {
|
59 |
+
"type": "git",
|
60 |
+
"url": "https://github.com/reactphp/promise.git",
|
61 |
+
"reference": "365fcee430dfa4ace1fbc75737ca60ceea7eeeef"
|
62 |
+
},
|
63 |
+
"dist": {
|
64 |
+
"type": "zip",
|
65 |
+
"url": "https://api.github.com/repos/reactphp/promise/zipball/365fcee430dfa4ace1fbc75737ca60ceea7eeeef",
|
66 |
+
"reference": "365fcee430dfa4ace1fbc75737ca60ceea7eeeef",
|
67 |
+
"shasum": ""
|
68 |
+
},
|
69 |
+
"require": {
|
70 |
+
"php": ">=5.4.0"
|
71 |
+
},
|
72 |
+
"time": "2014-12-30 13:32:42",
|
73 |
+
"type": "library",
|
74 |
+
"extra": {
|
75 |
+
"branch-alias": {
|
76 |
+
"dev-master": "2.0-dev"
|
77 |
+
}
|
78 |
+
},
|
79 |
+
"installation-source": "dist",
|
80 |
+
"autoload": {
|
81 |
+
"psr-4": {
|
82 |
+
"React\\Promise\\": "src/"
|
83 |
+
},
|
84 |
+
"files": [
|
85 |
+
"src/functions_include.php"
|
86 |
+
]
|
87 |
+
},
|
88 |
+
"notification-url": "https://packagist.org/downloads/",
|
89 |
+
"license": [
|
90 |
+
"MIT"
|
91 |
+
],
|
92 |
+
"authors": [
|
93 |
+
{
|
94 |
+
"name": "Jan Sorgalla",
|
95 |
+
"email": "jsorgalla@googlemail.com"
|
96 |
+
}
|
97 |
+
],
|
98 |
+
"description": "A lightweight implementation of CommonJS Promises/A for PHP"
|
99 |
+
},
|
100 |
+
{
|
101 |
+
"name": "guzzlehttp/ringphp",
|
102 |
+
"version": "1.0.5",
|
103 |
+
"version_normalized": "1.0.5.0",
|
104 |
+
"source": {
|
105 |
+
"type": "git",
|
106 |
+
"url": "https://github.com/guzzle/RingPHP.git",
|
107 |
+
"reference": "a903f51b692427318bc813217c0e6505287e79a4"
|
108 |
+
},
|
109 |
+
"dist": {
|
110 |
+
"type": "zip",
|
111 |
+
"url": "https://api.github.com/repos/guzzle/RingPHP/zipball/a903f51b692427318bc813217c0e6505287e79a4",
|
112 |
+
"reference": "a903f51b692427318bc813217c0e6505287e79a4",
|
113 |
+
"shasum": ""
|
114 |
+
},
|
115 |
+
"require": {
|
116 |
+
"guzzlehttp/streams": "~3.0",
|
117 |
+
"php": ">=5.4.0",
|
118 |
+
"react/promise": "~2.0"
|
119 |
+
},
|
120 |
+
"require-dev": {
|
121 |
+
"ext-curl": "*",
|
122 |
+
"phpunit/phpunit": "~4.0"
|
123 |
+
},
|
124 |
+
"suggest": {
|
125 |
+
"ext-curl": "Guzzle will use specific adapters if cURL is present"
|
126 |
+
},
|
127 |
+
"time": "2014-12-11 05:50:32",
|
128 |
+
"type": "library",
|
129 |
+
"extra": {
|
130 |
+
"branch-alias": {
|
131 |
+
"dev-master": "1.0-dev"
|
132 |
+
}
|
133 |
+
},
|
134 |
+
"installation-source": "dist",
|
135 |
+
"autoload": {
|
136 |
+
"psr-4": {
|
137 |
+
"GuzzleHttp\\Ring\\": "src/"
|
138 |
+
}
|
139 |
+
},
|
140 |
+
"notification-url": "https://packagist.org/downloads/",
|
141 |
+
"license": [
|
142 |
+
"MIT"
|
143 |
+
],
|
144 |
+
"authors": [
|
145 |
+
{
|
146 |
+
"name": "Michael Dowling",
|
147 |
+
"email": "mtdowling@gmail.com",
|
148 |
+
"homepage": "https://github.com/mtdowling"
|
149 |
+
}
|
150 |
+
]
|
151 |
+
},
|
152 |
+
{
|
153 |
+
"name": "guzzlehttp/guzzle",
|
154 |
+
"version": "5.2.0",
|
155 |
+
"version_normalized": "5.2.0.0",
|
156 |
+
"source": {
|
157 |
+
"type": "git",
|
158 |
+
"url": "https://github.com/guzzle/guzzle.git",
|
159 |
+
"reference": "475b29ccd411f2fa8a408e64576418728c032cfa"
|
160 |
+
},
|
161 |
+
"dist": {
|
162 |
+
"type": "zip",
|
163 |
+
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/475b29ccd411f2fa8a408e64576418728c032cfa",
|
164 |
+
"reference": "475b29ccd411f2fa8a408e64576418728c032cfa",
|
165 |
+
"shasum": ""
|
166 |
+
},
|
167 |
+
"require": {
|
168 |
+
"guzzlehttp/ringphp": "~1.0",
|
169 |
+
"php": ">=5.4.0"
|
170 |
+
},
|
171 |
+
"require-dev": {
|
172 |
+
"ext-curl": "*",
|
173 |
+
"phpunit/phpunit": "~4.0",
|
174 |
+
"psr/log": "~1.0"
|
175 |
+
},
|
176 |
+
"time": "2015-01-28 01:03:29",
|
177 |
+
"type": "library",
|
178 |
+
"extra": {
|
179 |
+
"branch-alias": {
|
180 |
+
"dev-master": "5.0-dev"
|
181 |
+
}
|
182 |
+
},
|
183 |
+
"installation-source": "dist",
|
184 |
+
"autoload": {
|
185 |
+
"psr-4": {
|
186 |
+
"GuzzleHttp\\": "src/"
|
187 |
+
}
|
188 |
+
},
|
189 |
+
"notification-url": "https://packagist.org/downloads/",
|
190 |
+
"license": [
|
191 |
+
"MIT"
|
192 |
+
],
|
193 |
+
"authors": [
|
194 |
+
{
|
195 |
+
"name": "Michael Dowling",
|
196 |
+
"email": "mtdowling@gmail.com",
|
197 |
+
"homepage": "https://github.com/mtdowling"
|
198 |
+
}
|
199 |
+
],
|
200 |
+
"description": "Guzzle is a PHP HTTP client library and framework for building RESTful web service clients",
|
201 |
+
"homepage": "http://guzzlephp.org/",
|
202 |
+
"keywords": [
|
203 |
+
"client",
|
204 |
+
"curl",
|
205 |
+
"framework",
|
206 |
+
"http",
|
207 |
+
"http client",
|
208 |
+
"rest",
|
209 |
+
"web service"
|
210 |
+
]
|
211 |
+
},
|
212 |
{
|
213 |
"name": "zendframework/zend-stdlib",
|
214 |
+
"version": "2.3.4",
|
215 |
+
"version_normalized": "2.3.4.0",
|
216 |
"target-dir": "Zend/Stdlib",
|
217 |
"source": {
|
218 |
"type": "git",
|
219 |
"url": "https://github.com/zendframework/Component_ZendStdlib.git",
|
220 |
+
"reference": "280e4ee6a8fea96b3de00a39174758b4002a7358"
|
221 |
},
|
222 |
"dist": {
|
223 |
"type": "zip",
|
224 |
+
"url": "https://api.github.com/repos/zendframework/Component_ZendStdlib/zipball/280e4ee6a8fea96b3de00a39174758b4002a7358",
|
225 |
+
"reference": "280e4ee6a8fea96b3de00a39174758b4002a7358",
|
226 |
"shasum": ""
|
227 |
},
|
228 |
"require": {
|
230 |
},
|
231 |
"require-dev": {
|
232 |
"zendframework/zend-eventmanager": "self.version",
|
233 |
+
"zendframework/zend-filter": "self.version",
|
234 |
"zendframework/zend-serializer": "self.version",
|
235 |
"zendframework/zend-servicemanager": "self.version"
|
236 |
},
|
237 |
"suggest": {
|
238 |
"zendframework/zend-eventmanager": "To support aggregate hydrator usage",
|
239 |
+
"zendframework/zend-filter": "To support naming strategy hydrator usage",
|
240 |
"zendframework/zend-serializer": "Zend\\Serializer component",
|
241 |
"zendframework/zend-servicemanager": "To support hydrator plugin manager usage"
|
242 |
},
|
243 |
+
"time": "2015-01-14 16:44:17",
|
244 |
"type": "library",
|
245 |
"extra": {
|
246 |
"branch-alias": {
|
266 |
},
|
267 |
{
|
268 |
"name": "zendframework/zend-eventmanager",
|
269 |
+
"version": "2.3.4",
|
270 |
+
"version_normalized": "2.3.4.0",
|
271 |
"target-dir": "Zend/EventManager",
|
272 |
"source": {
|
273 |
"type": "git",
|
274 |
"url": "https://github.com/zendframework/Component_ZendEventManager.git",
|
275 |
+
"reference": "5992c202f13292415501aed41beba76404197866"
|
276 |
},
|
277 |
"dist": {
|
278 |
"type": "zip",
|
279 |
+
"url": "https://api.github.com/repos/zendframework/Component_ZendEventManager/zipball/5992c202f13292415501aed41beba76404197866",
|
280 |
+
"reference": "5992c202f13292415501aed41beba76404197866",
|
281 |
"shasum": ""
|
282 |
},
|
283 |
"require": {
|
284 |
"php": ">=5.3.23",
|
285 |
"zendframework/zend-stdlib": "self.version"
|
286 |
},
|
287 |
+
"time": "2015-01-14 16:44:17",
|
288 |
"type": "library",
|
289 |
"extra": {
|
290 |
"branch-alias": {
|
309 |
]
|
310 |
},
|
311 |
{
|
312 |
+
"name": "zendframework/zend-math",
|
313 |
+
"version": "2.3.4",
|
314 |
+
"version_normalized": "2.3.4.0",
|
315 |
+
"target-dir": "Zend/Math",
|
316 |
"source": {
|
317 |
"type": "git",
|
318 |
+
"url": "https://github.com/zendframework/Component_ZendMath.git",
|
319 |
+
"reference": "45e7544d499a11c97d8b8fec00597f646e105ffb"
|
320 |
},
|
321 |
"dist": {
|
322 |
"type": "zip",
|
323 |
+
"url": "https://api.github.com/repos/zendframework/Component_ZendMath/zipball/45e7544d499a11c97d8b8fec00597f646e105ffb",
|
324 |
+
"reference": "45e7544d499a11c97d8b8fec00597f646e105ffb",
|
325 |
"shasum": ""
|
326 |
},
|
327 |
"require": {
|
328 |
"php": ">=5.3.23"
|
329 |
},
|
|
|
|
|
|
|
330 |
"suggest": {
|
331 |
+
"ext-bcmath": "If using the bcmath functionality",
|
332 |
+
"ext-gmp": "If using the gmp functionality",
|
333 |
+
"ircmaxell/random-lib": "Fallback random byte generator for Zend\\Math\\Rand if OpenSSL/Mcrypt extensions are unavailable",
|
334 |
+
"zendframework/zend-servicemanager": ">= current version, if using the BigInteger::factory functionality"
|
335 |
},
|
336 |
+
"time": "2015-01-14 16:44:17",
|
337 |
"type": "library",
|
338 |
"extra": {
|
339 |
"branch-alias": {
|
344 |
"installation-source": "dist",
|
345 |
"autoload": {
|
346 |
"psr-0": {
|
347 |
+
"Zend\\Math\\": ""
|
348 |
}
|
349 |
},
|
350 |
"notification-url": "https://packagist.org/downloads/",
|
353 |
],
|
354 |
"homepage": "https://github.com/zendframework/zf2",
|
355 |
"keywords": [
|
356 |
+
"math",
|
357 |
"zf2"
|
358 |
]
|
359 |
},
|
360 |
{
|
361 |
+
"name": "zendframework/zend-json",
|
362 |
+
"version": "2.3.4",
|
363 |
+
"version_normalized": "2.3.4.0",
|
364 |
+
"target-dir": "Zend/Json",
|
365 |
"source": {
|
366 |
"type": "git",
|
367 |
+
"url": "https://github.com/zendframework/Component_ZendJson.git",
|
368 |
+
"reference": "24b072788f42a025e479901e0c6e5c0bf0dcd960"
|
369 |
},
|
370 |
"dist": {
|
371 |
"type": "zip",
|
372 |
+
"url": "https://api.github.com/repos/zendframework/Component_ZendJson/zipball/24b072788f42a025e479901e0c6e5c0bf0dcd960",
|
373 |
+
"reference": "24b072788f42a025e479901e0c6e5c0bf0dcd960",
|
374 |
"shasum": ""
|
375 |
},
|
376 |
"require": {
|
377 |
"php": ">=5.3.23",
|
|
|
|
|
378 |
"zendframework/zend-stdlib": "self.version"
|
379 |
},
|
380 |
"require-dev": {
|
381 |
+
"zendframework/zend-http": "self.version",
|
382 |
+
"zendframework/zend-server": "self.version"
|
383 |
},
|
384 |
"suggest": {
|
385 |
+
"zendframework/zend-http": "Zend\\Http component",
|
386 |
+
"zendframework/zend-server": "Zend\\Server component",
|
387 |
+
"zendframework/zendxml": "To support Zend\\Json\\Json::fromXml() usage"
|
|
|
|
|
|
|
388 |
},
|
389 |
+
"time": "2015-01-14 16:44:17",
|
390 |
"type": "library",
|
391 |
"extra": {
|
392 |
"branch-alias": {
|
397 |
"installation-source": "dist",
|
398 |
"autoload": {
|
399 |
"psr-0": {
|
400 |
+
"Zend\\Json\\": ""
|
401 |
}
|
402 |
},
|
403 |
"notification-url": "https://packagist.org/downloads/",
|
404 |
"license": [
|
405 |
"BSD-3-Clause"
|
406 |
],
|
407 |
+
"description": "provides convenience methods for serializing native PHP to JSON and decoding JSON to native PHP",
|
408 |
"homepage": "https://github.com/zendframework/zf2",
|
409 |
"keywords": [
|
410 |
+
"json",
|
411 |
"zf2"
|
412 |
]
|
413 |
},
|
414 |
{
|
415 |
+
"name": "zendframework/zend-serializer",
|
416 |
+
"version": "2.3.4",
|
417 |
+
"version_normalized": "2.3.4.0",
|
418 |
+
"target-dir": "Zend/Serializer",
|
419 |
"source": {
|
420 |
"type": "git",
|
421 |
+
"url": "https://github.com/zendframework/Component_ZendSerializer.git",
|
422 |
+
"reference": "8cc08516ff69b275f22d2378cba0e0b482ba33a1"
|
423 |
},
|
424 |
"dist": {
|
425 |
"type": "zip",
|
426 |
+
"url": "https://api.github.com/repos/zendframework/Component_ZendSerializer/zipball/8cc08516ff69b275f22d2378cba0e0b482ba33a1",
|
427 |
+
"reference": "8cc08516ff69b275f22d2378cba0e0b482ba33a1",
|
428 |
"shasum": ""
|
429 |
},
|
430 |
"require": {
|
431 |
"php": ">=5.3.23",
|
432 |
+
"zendframework/zend-json": "self.version",
|
433 |
+
"zendframework/zend-math": "self.version",
|
434 |
"zendframework/zend-stdlib": "self.version"
|
435 |
},
|
436 |
"require-dev": {
|
|
|
|
|
|
|
437 |
"zendframework/zend-servicemanager": "self.version"
|
438 |
},
|
439 |
"suggest": {
|
440 |
+
"zendframework/zend-servicemanager": "To support plugin manager support"
|
|
|
|
|
|
|
441 |
},
|
442 |
+
"time": "2015-01-14 16:44:17",
|
443 |
"type": "library",
|
444 |
"extra": {
|
445 |
"branch-alias": {
|
450 |
"installation-source": "dist",
|
451 |
"autoload": {
|
452 |
"psr-0": {
|
453 |
+
"Zend\\Serializer\\": ""
|
454 |
}
|
455 |
},
|
456 |
"notification-url": "https://packagist.org/downloads/",
|
457 |
"license": [
|
458 |
"BSD-3-Clause"
|
459 |
],
|
460 |
+
"description": "provides an adapter based interface to simply generate storable representation of PHP types by different facilities, and recover",
|
461 |
"homepage": "https://github.com/zendframework/zf2",
|
462 |
"keywords": [
|
463 |
+
"serializer",
|
464 |
"zf2"
|
465 |
]
|
466 |
},
|
467 |
{
|
468 |
+
"name": "zendframework/zend-servicemanager",
|
469 |
+
"version": "2.3.4",
|
470 |
+
"version_normalized": "2.3.4.0",
|
471 |
+
"target-dir": "Zend/ServiceManager",
|
472 |
"source": {
|
473 |
"type": "git",
|
474 |
+
"url": "https://github.com/zendframework/Component_ZendServiceManager.git",
|
475 |
+
"reference": "148b1ce06fa0ac7fe58e3bd396df57f1ee0e9e82"
|
476 |
},
|
477 |
"dist": {
|
478 |
"type": "zip",
|
479 |
+
"url": "https://api.github.com/repos/zendframework/Component_ZendServiceManager/zipball/148b1ce06fa0ac7fe58e3bd396df57f1ee0e9e82",
|
480 |
+
"reference": "148b1ce06fa0ac7fe58e3bd396df57f1ee0e9e82",
|
481 |
"shasum": ""
|
482 |
},
|
483 |
"require": {
|
484 |
+
"php": ">=5.3.23"
|
|
|
485 |
},
|
486 |
"require-dev": {
|
487 |
+
"zendframework/zend-di": "self.version"
|
|
|
488 |
},
|
489 |
"suggest": {
|
490 |
+
"ocramius/proxy-manager": "ProxyManager 0.5.* to handle lazy initialization of services",
|
491 |
+
"zendframework/zend-di": "Zend\\Di component"
|
492 |
},
|
493 |
+
"time": "2015-01-14 16:44:17",
|
494 |
"type": "library",
|
495 |
"extra": {
|
496 |
"branch-alias": {
|
501 |
"installation-source": "dist",
|
502 |
"autoload": {
|
503 |
"psr-0": {
|
504 |
+
"Zend\\ServiceManager\\": ""
|
505 |
}
|
506 |
},
|
507 |
"notification-url": "https://packagist.org/downloads/",
|
508 |
"license": [
|
509 |
"BSD-3-Clause"
|
510 |
],
|
|
|
511 |
"homepage": "https://github.com/zendframework/zf2",
|
512 |
"keywords": [
|
513 |
+
"servicemanager",
|
514 |
"zf2"
|
515 |
]
|
516 |
},
|
517 |
{
|
518 |
+
"name": "zendframework/zend-cache",
|
519 |
+
"version": "2.3.4",
|
520 |
+
"version_normalized": "2.3.4.0",
|
521 |
+
"target-dir": "Zend/Cache",
|
522 |
"source": {
|
523 |
"type": "git",
|
524 |
+
"url": "https://github.com/zendframework/Component_ZendCache.git",
|
525 |
+
"reference": "03cf30de6aa60ff9fb1a9f473202559a18b9f2f5"
|
526 |
},
|
527 |
"dist": {
|
528 |
"type": "zip",
|
529 |
+
"url": "https://api.github.com/repos/zendframework/Component_ZendCache/zipball/03cf30de6aa60ff9fb1a9f473202559a18b9f2f5",
|
530 |
+
"reference": "03cf30de6aa60ff9fb1a9f473202559a18b9f2f5",
|
531 |
"shasum": ""
|
532 |
},
|
533 |
"require": {
|
534 |
+
"php": ">=5.3.23",
|
535 |
+
"zendframework/zend-eventmanager": "self.version",
|
536 |
+
"zendframework/zend-serializer": "self.version",
|
537 |
+
"zendframework/zend-servicemanager": "self.version",
|
538 |
+
"zendframework/zend-stdlib": "self.version"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
539 |
},
|
540 |
"require-dev": {
|
541 |
+
"zendframework/zend-session": "self.version"
|
|
|
542 |
},
|
543 |
"suggest": {
|
544 |
+
"ext-apc": "APC >= 3.1.6 to use the APC storage adapter",
|
545 |
+
"ext-dba": "DBA, to use the DBA storage adapter",
|
546 |
+
"ext-memcached": "Memcached >= 1.0.0 to use the Memcached storage adapter",
|
547 |
+
"ext-wincache": "WinCache, to use the WinCache storage adapter",
|
548 |
+
"zendframework/zend-serializer": "Zend\\Serializer component",
|
549 |
+
"zendframework/zend-session": "Zend\\Session component"
|
550 |
},
|
551 |
+
"time": "2015-01-14 16:44:17",
|
552 |
"type": "library",
|
553 |
"extra": {
|
554 |
"branch-alias": {
|
555 |
+
"dev-master": "2.3-dev",
|
556 |
+
"dev-develop": "2.4-dev"
|
557 |
}
|
558 |
},
|
559 |
"installation-source": "dist",
|
560 |
"autoload": {
|
561 |
+
"psr-0": {
|
562 |
+
"Zend\\Cache\\": ""
|
563 |
}
|
564 |
},
|
565 |
"notification-url": "https://packagist.org/downloads/",
|
566 |
"license": [
|
567 |
+
"BSD-3-Clause"
|
568 |
],
|
569 |
+
"description": "provides a generic way to cache any data",
|
570 |
+
"homepage": "https://github.com/zendframework/zf2",
|
571 |
+
"keywords": [
|
572 |
+
"cache",
|
573 |
+
"zf2"
|
|
|
574 |
]
|
575 |
},
|
576 |
{
|
577 |
+
"name": "zendframework/zend-config",
|
578 |
+
"version": "2.3.4",
|
579 |
+
"version_normalized": "2.3.4.0",
|
580 |
+
"target-dir": "Zend/Config",
|
581 |
"source": {
|
582 |
"type": "git",
|
583 |
+
"url": "https://github.com/zendframework/Component_ZendConfig.git",
|
584 |
+
"reference": "c07bbcfd6c32e9eaf3de457cb880349f8c18885d"
|
585 |
},
|
586 |
"dist": {
|
587 |
"type": "zip",
|
588 |
+
"url": "https://api.github.com/repos/zendframework/Component_ZendConfig/zipball/c07bbcfd6c32e9eaf3de457cb880349f8c18885d",
|
589 |
+
"reference": "c07bbcfd6c32e9eaf3de457cb880349f8c18885d",
|
590 |
"shasum": ""
|
591 |
},
|
592 |
"require": {
|
593 |
+
"php": ">=5.3.23",
|
594 |
+
"zendframework/zend-stdlib": "self.version"
|
595 |
},
|
596 |
"require-dev": {
|
597 |
+
"zendframework/zend-filter": "self.version",
|
598 |
+
"zendframework/zend-i18n": "self.version",
|
599 |
+
"zendframework/zend-json": "self.version",
|
600 |
+
"zendframework/zend-servicemanager": "self.version"
|
601 |
},
|
602 |
+
"suggest": {
|
603 |
+
"zendframework/zend-filter": "Zend\\Filter component",
|
604 |
+
"zendframework/zend-i18n": "Zend\\I18n component",
|
605 |
+
"zendframework/zend-json": "Zend\\Json to use the Json reader or writer classes",
|
606 |
+
"zendframework/zend-servicemanager": "Zend\\ServiceManager for use with the Config Factory to retrieve reader and writer instances"
|
607 |
+
},
|
608 |
+
"time": "2015-01-14 16:44:17",
|
609 |
"type": "library",
|
610 |
"extra": {
|
611 |
"branch-alias": {
|
612 |
+
"dev-master": "2.3-dev",
|
613 |
+
"dev-develop": "2.4-dev"
|
614 |
}
|
615 |
},
|
616 |
"installation-source": "dist",
|
617 |
"autoload": {
|
618 |
+
"psr-0": {
|
619 |
+
"Zend\\Config\\": ""
|
620 |
}
|
621 |
},
|
622 |
"notification-url": "https://packagist.org/downloads/",
|
623 |
"license": [
|
624 |
+
"BSD-3-Clause"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
625 |
],
|
626 |
+
"description": "provides a nested object property based user interface for accessing this configuration data within application code",
|
627 |
+
"homepage": "https://github.com/zendframework/zf2",
|
628 |
"keywords": [
|
629 |
+
"config",
|
630 |
+
"zf2"
|
|
|
|
|
|
|
|
|
|
|
631 |
]
|
632 |
}
|
633 |
]
|
backend/vendor/guzzlehttp/guzzle/CHANGELOG.md
CHANGED
@@ -1,5 +1,15 @@
|
|
1 |
# CHANGELOG
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
## 5.1.0 - 2014-12-19
|
4 |
|
5 |
* Pool class no longer uses recursion when a request is intercepted.
|
@@ -91,10 +101,10 @@ The breaking changes in this release are relatively minor. The biggest thing to
|
|
91 |
look out for is that request and response objects no longer implement fluent
|
92 |
interfaces.
|
93 |
|
94 |
-
* Removed the fluent interfaces (i.e.,
|
95 |
-
responses,
|
96 |
-
|
97 |
-
|
98 |
why I did this: http://ocramius.github.io/blog/fluent-interfaces-are-evil/.
|
99 |
This also makes the Guzzle message interfaces compatible with the current
|
100 |
PSR-7 message proposal.
|
@@ -104,7 +114,7 @@ interfaces.
|
|
104 |
moved to `GuzzleHttp\Utils::jsonDecode`. `GuzzleHttp\get_path` moved to
|
105 |
`GuzzleHttp\Utils::getPath`. `GuzzleHttp\set_path` moved to
|
106 |
`GuzzleHttp\Utils::setPath`. `GuzzleHttp\batch` should now be
|
107 |
-
`GuzzleHttp\Pool::batch`, which returns an objectStorage`. Using functions.php
|
108 |
caused problems for many users: they aren't PSR-4 compliant, require an
|
109 |
explicit include, and needed an if-guard to ensure that the functions are not
|
110 |
declared multiple times.
|
@@ -125,10 +135,10 @@ interfaces.
|
|
125 |
written to.
|
126 |
* Removed the `asArray` parameter from
|
127 |
`GuzzleHttp\Message\MessageInterface::getHeader`. If you want to get a header
|
128 |
-
value as an array, then use the newly added
|
129 |
-
|
130 |
the PSR-7 interfaces.
|
131 |
-
*
|
132 |
custom request options using double-dispatch (this was an implementation
|
133 |
detail). Instead, you should now provide an associative array to the
|
134 |
constructor which is a mapping of the request option name mapping to a
|
@@ -141,9 +151,9 @@ interfaces.
|
|
141 |
* `GuzzleHttp\Stream\StreamInterface::getContents()` no longer accepts a
|
142 |
`maxLen` parameter. This update makes the Guzzle streams project
|
143 |
compatible with the current PSR-7 proposal.
|
144 |
-
*
|
145 |
-
|
146 |
-
|
147 |
argument. They now accept an associative array of options, including the
|
148 |
"size" key and "metadata" key which can be used to provide custom metadata.
|
149 |
|
@@ -522,7 +532,7 @@ interfaces.
|
|
522 |
directly via interfaces
|
523 |
* Removed the injecting of a request object onto a response object. The methods to get and set a request still exist
|
524 |
but are a no-op until removed.
|
525 |
-
* Most classes that used to require a
|
526 |
`Guzzle\Service\Command\ArrayCommandInterface`.
|
527 |
* Added `Guzzle\Http\Message\RequestInterface::startResponse()` to the RequestInterface to handle injecting a response
|
528 |
on a request while the request is still being transferred
|
@@ -853,15 +863,15 @@ interfaces.
|
|
853 |
* Bug: Fixed a bug in ExponentialBackoffPlugin that caused fatal errors when retrying an EntityEnclosingRequest that does not have a body
|
854 |
* Bug: Setting the response body of a request to null after completing a request, not when setting the state of a request to new
|
855 |
* Added multiple inheritance to service description commands
|
856 |
-
* Added an ApiCommandInterface and added
|
857 |
* Removed the default 2mb size cutoff from the Md5ValidatorPlugin so that it now defaults to validating everything
|
858 |
* Changed CurlMulti::perform to pass a smaller timeout to CurlMulti::executeHandles
|
859 |
|
860 |
## 2.8.2 - 2012-07-24
|
861 |
|
862 |
* Bug: Query string values set to 0 are no longer dropped from the query string
|
863 |
-
* Bug: A Collection object is no longer created each time a call is made to
|
864 |
-
* Bug:
|
865 |
* QueryString and Collection performance improvements
|
866 |
* Allowing dot notation for class paths in filters attribute of a service descriptions
|
867 |
|
@@ -878,7 +888,7 @@ interfaces.
|
|
878 |
* Changed setEncodeValues(bool) and setEncodeFields(bool) to useUrlEncoding(bool)
|
879 |
* Changed the aggregation functions of QueryString to be static methods
|
880 |
* Can now use fromString() with querystrings that have a leading ?
|
881 |
-
* cURL configuration values can be specified in service descriptions using
|
882 |
* Content-Length is set to 0 before emitting the request.before_send event when sending an empty request body
|
883 |
* Cookies are no longer URL decoded by default
|
884 |
* Bug: URI template variables set to null are no longer expanded
|
1 |
# CHANGELOG
|
2 |
|
3 |
+
## 5.2.0 - 2015-01-27
|
4 |
+
|
5 |
+
* Added `AppliesHeadersInterface` to make applying headers to a request based
|
6 |
+
on the body more generic and not specific to `PostBodyInterface`.
|
7 |
+
* Reduced the number of stack frames needed to send requests.
|
8 |
+
* Nested futures are now resolved in the client rather than the RequestFsm
|
9 |
+
* Finishing state transitions is now handled in the RequestFsm rather than the
|
10 |
+
RingBridge.
|
11 |
+
* Added a guard in the Pool class to not use recursion for request retries.
|
12 |
+
|
13 |
## 5.1.0 - 2014-12-19
|
14 |
|
15 |
* Pool class no longer uses recursion when a request is intercepted.
|
101 |
look out for is that request and response objects no longer implement fluent
|
102 |
interfaces.
|
103 |
|
104 |
+
* Removed the fluent interfaces (i.e., `return $this`) from requests,
|
105 |
+
responses, `GuzzleHttp\Collection`, `GuzzleHttp\Url`,
|
106 |
+
`GuzzleHttp\Query`, `GuzzleHttp\Post\PostBody`, and
|
107 |
+
`GuzzleHttp\Cookie\SetCookie`. This blog post provides a good outline of
|
108 |
why I did this: http://ocramius.github.io/blog/fluent-interfaces-are-evil/.
|
109 |
This also makes the Guzzle message interfaces compatible with the current
|
110 |
PSR-7 message proposal.
|
114 |
moved to `GuzzleHttp\Utils::jsonDecode`. `GuzzleHttp\get_path` moved to
|
115 |
`GuzzleHttp\Utils::getPath`. `GuzzleHttp\set_path` moved to
|
116 |
`GuzzleHttp\Utils::setPath`. `GuzzleHttp\batch` should now be
|
117 |
+
`GuzzleHttp\Pool::batch`, which returns an `objectStorage`. Using functions.php
|
118 |
caused problems for many users: they aren't PSR-4 compliant, require an
|
119 |
explicit include, and needed an if-guard to ensure that the functions are not
|
120 |
declared multiple times.
|
135 |
written to.
|
136 |
* Removed the `asArray` parameter from
|
137 |
`GuzzleHttp\Message\MessageInterface::getHeader`. If you want to get a header
|
138 |
+
value as an array, then use the newly added `getHeaderAsArray()` method of
|
139 |
+
`MessageInterface`. This change makes the Guzzle interfaces compatible with
|
140 |
the PSR-7 interfaces.
|
141 |
+
* `GuzzleHttp\Message\MessageFactory` no longer allows subclasses to add
|
142 |
custom request options using double-dispatch (this was an implementation
|
143 |
detail). Instead, you should now provide an associative array to the
|
144 |
constructor which is a mapping of the request option name mapping to a
|
151 |
* `GuzzleHttp\Stream\StreamInterface::getContents()` no longer accepts a
|
152 |
`maxLen` parameter. This update makes the Guzzle streams project
|
153 |
compatible with the current PSR-7 proposal.
|
154 |
+
* `GuzzleHttp\Stream\Stream::__construct`,
|
155 |
+
`GuzzleHttp\Stream\Stream::factory`, and
|
156 |
+
`GuzzleHttp\Stream\Utils::create` no longer accept a size in the second
|
157 |
argument. They now accept an associative array of options, including the
|
158 |
"size" key and "metadata" key which can be used to provide custom metadata.
|
159 |
|
532 |
directly via interfaces
|
533 |
* Removed the injecting of a request object onto a response object. The methods to get and set a request still exist
|
534 |
but are a no-op until removed.
|
535 |
+
* Most classes that used to require a `Guzzle\Service\Command\CommandInterface` typehint now request a
|
536 |
`Guzzle\Service\Command\ArrayCommandInterface`.
|
537 |
* Added `Guzzle\Http\Message\RequestInterface::startResponse()` to the RequestInterface to handle injecting a response
|
538 |
on a request while the request is still being transferred
|
863 |
* Bug: Fixed a bug in ExponentialBackoffPlugin that caused fatal errors when retrying an EntityEnclosingRequest that does not have a body
|
864 |
* Bug: Setting the response body of a request to null after completing a request, not when setting the state of a request to new
|
865 |
* Added multiple inheritance to service description commands
|
866 |
+
* Added an ApiCommandInterface and added `getParamNames()` and `hasParam()`
|
867 |
* Removed the default 2mb size cutoff from the Md5ValidatorPlugin so that it now defaults to validating everything
|
868 |
* Changed CurlMulti::perform to pass a smaller timeout to CurlMulti::executeHandles
|
869 |
|
870 |
## 2.8.2 - 2012-07-24
|
871 |
|
872 |
* Bug: Query string values set to 0 are no longer dropped from the query string
|
873 |
+
* Bug: A Collection object is no longer created each time a call is made to `Guzzle\Service\Command\AbstractCommand::getRequestHeaders()`
|
874 |
+
* Bug: `+` is now treated as an encoded space when parsing query strings
|
875 |
* QueryString and Collection performance improvements
|
876 |
* Allowing dot notation for class paths in filters attribute of a service descriptions
|
877 |
|
888 |
* Changed setEncodeValues(bool) and setEncodeFields(bool) to useUrlEncoding(bool)
|
889 |
* Changed the aggregation functions of QueryString to be static methods
|
890 |
* Can now use fromString() with querystrings that have a leading ?
|
891 |
+
* cURL configuration values can be specified in service descriptions using `curl.` prefixed parameters
|
892 |
* Content-Length is set to 0 before emitting the request.before_send event when sending an empty request body
|
893 |
* Cookies are no longer URL decoded by default
|
894 |
* Bug: URI template variables set to null are no longer expanded
|
backend/vendor/guzzlehttp/guzzle/src/Client.php
CHANGED
@@ -228,27 +228,27 @@ class Client implements ClientInterface
|
|
228 |
$trans = new Transaction($this, $request, $isFuture);
|
229 |
$fn = $this->fsm;
|
230 |
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
$fn($trans);
|
235 |
// Turn the normal response into a future if needed.
|
236 |
return $trans->response instanceof FutureInterface
|
237 |
? $trans->response
|
238 |
: new FutureResponse(new FulfilledPromise($trans->response));
|
239 |
-
} catch (RequestException $e) {
|
240 |
-
// Wrap the exception in a promise if the user asked for a future.
|
241 |
-
return new FutureResponse(new RejectedPromise($e));
|
242 |
}
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
: $trans->response;
|
249 |
-
} catch (\Exception $e) {
|
250 |
-
throw RequestException::wrapException($trans->request, $e);
|
251 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
252 |
}
|
253 |
}
|
254 |
|
@@ -281,9 +281,10 @@ class Client implements ClientInterface
|
|
281 |
/**
|
282 |
* Expand a URI template and inherit from the base URL if it's relative
|
283 |
*
|
284 |
-
* @param string|array $url URL or URI template to expand
|
285 |
-
*
|
286 |
* @return string
|
|
|
287 |
*/
|
288 |
private function buildUrl($url)
|
289 |
{
|
@@ -294,6 +295,11 @@ class Client implements ClientInterface
|
|
294 |
: (string) $this->baseUrl->combine($url);
|
295 |
}
|
296 |
|
|
|
|
|
|
|
|
|
|
|
297 |
// Absolute URL
|
298 |
if (strpos($url[0], '://')) {
|
299 |
return Utils::uriTemplate($url[0], $url[1]);
|
@@ -309,7 +315,12 @@ class Client implements ClientInterface
|
|
309 |
{
|
310 |
if (!isset($config['base_url'])) {
|
311 |
$this->baseUrl = new Url('', '');
|
312 |
-
} elseif (is_array($config['base_url'])) {
|
|
|
|
|
|
|
|
|
|
|
313 |
$this->baseUrl = Url::fromString(
|
314 |
Utils::uriTemplate(
|
315 |
$config['base_url'][0],
|
@@ -317,8 +328,6 @@ class Client implements ClientInterface
|
|
317 |
)
|
318 |
);
|
319 |
$config['base_url'] = (string) $this->baseUrl;
|
320 |
-
} else {
|
321 |
-
$this->baseUrl = Url::fromString($config['base_url']);
|
322 |
}
|
323 |
}
|
324 |
|
@@ -389,6 +398,6 @@ class Client implements ClientInterface
|
|
389 |
*/
|
390 |
public function sendAll($requests, array $options = [])
|
391 |
{
|
392 |
-
|
393 |
}
|
394 |
}
|
228 |
$trans = new Transaction($this, $request, $isFuture);
|
229 |
$fn = $this->fsm;
|
230 |
|
231 |
+
try {
|
232 |
+
$fn($trans);
|
233 |
+
if ($isFuture) {
|
|
|
234 |
// Turn the normal response into a future if needed.
|
235 |
return $trans->response instanceof FutureInterface
|
236 |
? $trans->response
|
237 |
: new FutureResponse(new FulfilledPromise($trans->response));
|
|
|
|
|
|
|
238 |
}
|
239 |
+
// Resolve deep futures if this is not a future
|
240 |
+
// transaction. This accounts for things like retries
|
241 |
+
// that do not have an immediate side-effect.
|
242 |
+
while ($trans->response instanceof FutureInterface) {
|
243 |
+
$trans->response = $trans->response->wait();
|
|
|
|
|
|
|
244 |
}
|
245 |
+
return $trans->response;
|
246 |
+
} catch (\Exception $e) {
|
247 |
+
if ($isFuture) {
|
248 |
+
// Wrap the exception in a promise
|
249 |
+
return new FutureResponse(new RejectedPromise($e));
|
250 |
+
}
|
251 |
+
throw RequestException::wrapException($trans->request, $e);
|
252 |
}
|
253 |
}
|
254 |
|
281 |
/**
|
282 |
* Expand a URI template and inherit from the base URL if it's relative
|
283 |
*
|
284 |
+
* @param string|array $url URL or an array of the URI template to expand
|
285 |
+
* followed by a hash of template varnames.
|
286 |
* @return string
|
287 |
+
* @throws \InvalidArgumentException
|
288 |
*/
|
289 |
private function buildUrl($url)
|
290 |
{
|
295 |
: (string) $this->baseUrl->combine($url);
|
296 |
}
|
297 |
|
298 |
+
if (!isset($url[1])) {
|
299 |
+
throw new \InvalidArgumentException('You must provide a hash of '
|
300 |
+
. 'varname options in the second element of a URL array.');
|
301 |
+
}
|
302 |
+
|
303 |
// Absolute URL
|
304 |
if (strpos($url[0], '://')) {
|
305 |
return Utils::uriTemplate($url[0], $url[1]);
|
315 |
{
|
316 |
if (!isset($config['base_url'])) {
|
317 |
$this->baseUrl = new Url('', '');
|
318 |
+
} elseif (!is_array($config['base_url'])) {
|
319 |
+
$this->baseUrl = Url::fromString($config['base_url']);
|
320 |
+
} elseif (count($config['base_url']) < 2) {
|
321 |
+
throw new \InvalidArgumentException('You must provide a hash of '
|
322 |
+
. 'varname options in the second element of a base_url array.');
|
323 |
+
} else {
|
324 |
$this->baseUrl = Url::fromString(
|
325 |
Utils::uriTemplate(
|
326 |
$config['base_url'][0],
|
328 |
)
|
329 |
);
|
330 |
$config['base_url'] = (string) $this->baseUrl;
|
|
|
|
|
331 |
}
|
332 |
}
|
333 |
|
398 |
*/
|
399 |
public function sendAll($requests, array $options = [])
|
400 |
{
|
401 |
+
Pool::send($this, $requests, $options);
|
402 |
}
|
403 |
}
|
backend/vendor/guzzlehttp/guzzle/src/ClientInterface.php
CHANGED
@@ -11,7 +11,7 @@ use GuzzleHttp\Message\ResponseInterface;
|
|
11 |
*/
|
12 |
interface ClientInterface extends HasEmitterInterface
|
13 |
{
|
14 |
-
const VERSION = '5.
|
15 |
|
16 |
/**
|
17 |
* Create and return a new {@see RequestInterface} object.
|
11 |
*/
|
12 |
interface ClientInterface extends HasEmitterInterface
|
13 |
{
|
14 |
+
const VERSION = '5.2.0';
|
15 |
|
16 |
/**
|
17 |
* Create and return a new {@see RequestInterface} object.
|
backend/vendor/guzzlehttp/guzzle/src/Event/AbstractRequestEvent.php
CHANGED
@@ -41,6 +41,16 @@ abstract class AbstractRequestEvent extends AbstractEvent
|
|
41 |
return $this->transaction->request;
|
42 |
}
|
43 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
/**
|
45 |
* @return Transaction
|
46 |
*/
|
41 |
return $this->transaction->request;
|
42 |
}
|
43 |
|
44 |
+
/**
|
45 |
+
* Get the number of transaction retries.
|
46 |
+
*
|
47 |
+
* @return int
|
48 |
+
*/
|
49 |
+
public function getRetryCount()
|
50 |
+
{
|
51 |
+
return $this->transaction->retries;
|
52 |
+
}
|
53 |
+
|
54 |
/**
|
55 |
* @return Transaction
|
56 |
*/
|
backend/vendor/guzzlehttp/guzzle/src/Event/AbstractTransferEvent.php
CHANGED
@@ -29,16 +29,6 @@ abstract class AbstractTransferEvent extends AbstractRequestEvent
|
|
29 |
: null;
|
30 |
}
|
31 |
|
32 |
-
/**
|
33 |
-
* Get the number of transaction retries.
|
34 |
-
*
|
35 |
-
* @return int
|
36 |
-
*/
|
37 |
-
public function getRetryCount()
|
38 |
-
{
|
39 |
-
return $this->transaction->retries;
|
40 |
-
}
|
41 |
-
|
42 |
/**
|
43 |
* Returns true/false if a response is available.
|
44 |
*
|
29 |
: null;
|
30 |
}
|
31 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
/**
|
33 |
* Returns true/false if a response is available.
|
34 |
*
|
backend/vendor/guzzlehttp/guzzle/src/Message/AppliesHeadersInterface.php
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace GuzzleHttp\Message;
|
3 |
+
|
4 |
+
/**
|
5 |
+
* Applies headers to a request.
|
6 |
+
*
|
7 |
+
* This interface can be used with Guzzle streams to apply body specific
|
8 |
+
* headers to a request during the PREPARE_REQUEST priority of the before event
|
9 |
+
*
|
10 |
+
* NOTE: a body that implements this interface will prevent a default
|
11 |
+
* content-type from being added to a request during the before event. If you
|
12 |
+
* want a default content-type to be added, then it will need to be done
|
13 |
+
* manually (e.g., using {@see GuzzleHttp\Mimetypes}).
|
14 |
+
*/
|
15 |
+
interface AppliesHeadersInterface
|
16 |
+
{
|
17 |
+
/**
|
18 |
+
* Apply headers to a request appropriate for the current state of the
|
19 |
+
* object.
|
20 |
+
*
|
21 |
+
* @param RequestInterface $request Request
|
22 |
+
*/
|
23 |
+
public function applyRequestHeaders(RequestInterface $request);
|
24 |
+
}
|
backend/vendor/guzzlehttp/guzzle/src/Pool.php
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
<?php
|
2 |
namespace GuzzleHttp;
|
3 |
|
|
|
4 |
use GuzzleHttp\Event\RequestEvents;
|
5 |
use GuzzleHttp\Message\RequestInterface;
|
6 |
use GuzzleHttp\Message\ResponseInterface;
|
@@ -52,7 +53,7 @@ class Pool implements FutureInterface
|
|
52 |
private $isRealized = false;
|
53 |
|
54 |
/**
|
55 |
-
* The option values for 'before', 'complete', 'error' and 'end' can be a
|
56 |
* callable, an associative array containing event data, or an array of
|
57 |
* event data arrays. Event data arrays contain the following keys:
|
58 |
*
|
@@ -146,7 +147,8 @@ class Pool implements FutureInterface
|
|
146 |
$requests,
|
147 |
array $options = []
|
148 |
) {
|
149 |
-
|
|
|
150 |
}
|
151 |
|
152 |
private function getPoolSize()
|
@@ -190,6 +192,7 @@ class Pool implements FutureInterface
|
|
190 |
} catch (\Exception $e) {
|
191 |
// Eat exceptions because they should be handled asynchronously
|
192 |
}
|
|
|
193 |
}
|
194 |
|
195 |
// Clean up no longer needed state.
|
@@ -282,9 +285,10 @@ class Pool implements FutureInterface
|
|
282 |
|
283 |
// Be sure to use "lazy" futures, meaning they do not send right away.
|
284 |
$request->getConfig()->set('future', 'lazy');
|
|
|
285 |
$this->attachListeners($request, $this->eventListeners);
|
|
|
286 |
$response = $this->client->send($request);
|
287 |
-
$hash = spl_object_hash($request);
|
288 |
$this->waitQueue[$hash] = $response;
|
289 |
$promise = $response->promise();
|
290 |
|
@@ -303,7 +307,9 @@ class Pool implements FutureInterface
|
|
303 |
// Use this function for both resolution and rejection.
|
304 |
$thenFn = function ($value) use ($request, $hash) {
|
305 |
$this->finishResponse($request, $value, $hash);
|
306 |
-
|
|
|
|
|
307 |
};
|
308 |
|
309 |
$promise->then($thenFn, $thenFn);
|
@@ -311,6 +317,11 @@ class Pool implements FutureInterface
|
|
311 |
return true;
|
312 |
}
|
313 |
|
|
|
|
|
|
|
|
|
|
|
314 |
private function finishResponse($request, $value, $hash)
|
315 |
{
|
316 |
unset($this->waitQueue[$hash]);
|
1 |
<?php
|
2 |
namespace GuzzleHttp;
|
3 |
|
4 |
+
use GuzzleHttp\Event\BeforeEvent;
|
5 |
use GuzzleHttp\Event\RequestEvents;
|
6 |
use GuzzleHttp\Message\RequestInterface;
|
7 |
use GuzzleHttp\Message\ResponseInterface;
|
53 |
private $isRealized = false;
|
54 |
|
55 |
/**
|
56 |
+
* The option values for 'before', 'complete', 'error' and 'end' can be a
|
57 |
* callable, an associative array containing event data, or an array of
|
58 |
* event data arrays. Event data arrays contain the following keys:
|
59 |
*
|
147 |
$requests,
|
148 |
array $options = []
|
149 |
) {
|
150 |
+
$pool = new self($client, $requests, $options);
|
151 |
+
$pool->wait();
|
152 |
}
|
153 |
|
154 |
private function getPoolSize()
|
192 |
} catch (\Exception $e) {
|
193 |
// Eat exceptions because they should be handled asynchronously
|
194 |
}
|
195 |
+
$this->addNextRequests();
|
196 |
}
|
197 |
|
198 |
// Clean up no longer needed state.
|
285 |
|
286 |
// Be sure to use "lazy" futures, meaning they do not send right away.
|
287 |
$request->getConfig()->set('future', 'lazy');
|
288 |
+
$hash = spl_object_hash($request);
|
289 |
$this->attachListeners($request, $this->eventListeners);
|
290 |
+
$request->getEmitter()->on('before', [$this, '_trackRetries'], RequestEvents::EARLY);
|
291 |
$response = $this->client->send($request);
|
|
|
292 |
$this->waitQueue[$hash] = $response;
|
293 |
$promise = $response->promise();
|
294 |
|
307 |
// Use this function for both resolution and rejection.
|
308 |
$thenFn = function ($value) use ($request, $hash) {
|
309 |
$this->finishResponse($request, $value, $hash);
|
310 |
+
if (!$request->getConfig()->get('_pool_retries')) {
|
311 |
+
$this->addNextRequests();
|
312 |
+
}
|
313 |
};
|
314 |
|
315 |
$promise->then($thenFn, $thenFn);
|
317 |
return true;
|
318 |
}
|
319 |
|
320 |
+
public function _trackRetries(BeforeEvent $e)
|
321 |
+
{
|
322 |
+
$e->getRequest()->getConfig()->set('_pool_retries', $e->getRetryCount());
|
323 |
+
}
|
324 |
+
|
325 |
private function finishResponse($request, $value, $hash)
|
326 |
{
|
327 |
unset($this->waitQueue[$hash]);
|
backend/vendor/guzzlehttp/guzzle/src/Post/PostBodyInterface.php
CHANGED
@@ -1,22 +1,15 @@
|
|
1 |
<?php
|
2 |
namespace GuzzleHttp\Post;
|
3 |
|
4 |
-
use GuzzleHttp\Message\
|
5 |
use GuzzleHttp\Stream\StreamInterface;
|
6 |
|
7 |
/**
|
8 |
* Represents a POST body that is sent as either a multipart/form-data stream
|
9 |
* or application/x-www-urlencoded stream.
|
10 |
*/
|
11 |
-
interface PostBodyInterface extends StreamInterface, \Countable
|
12 |
{
|
13 |
-
/**
|
14 |
-
* Apply headers to the request appropriate for the current state of the object
|
15 |
-
*
|
16 |
-
* @param RequestInterface $request Request
|
17 |
-
*/
|
18 |
-
public function applyRequestHeaders(RequestInterface $request);
|
19 |
-
|
20 |
/**
|
21 |
* Set a specific field
|
22 |
*
|
1 |
<?php
|
2 |
namespace GuzzleHttp\Post;
|
3 |
|
4 |
+
use GuzzleHttp\Message\AppliesHeadersInterface;
|
5 |
use GuzzleHttp\Stream\StreamInterface;
|
6 |
|
7 |
/**
|
8 |
* Represents a POST body that is sent as either a multipart/form-data stream
|
9 |
* or application/x-www-urlencoded stream.
|
10 |
*/
|
11 |
+
interface PostBodyInterface extends StreamInterface, \Countable, AppliesHeadersInterface
|
12 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
/**
|
14 |
* Set a specific field
|
15 |
*
|
backend/vendor/guzzlehttp/guzzle/src/RequestFsm.php
CHANGED
@@ -20,31 +20,6 @@ class RequestFsm
|
|
20 |
private $mf;
|
21 |
private $maxTransitions;
|
22 |
|
23 |
-
private $states = [
|
24 |
-
// When a mock intercepts the emitted "before" event, then we
|
25 |
-
// transition to the "complete" intercept state.
|
26 |
-
'before' => [
|
27 |
-
'success' => 'send',
|
28 |
-
'intercept' => 'complete',
|
29 |
-
'error' => 'error'
|
30 |
-
],
|
31 |
-
// The complete and error events are handled using the "then" of
|
32 |
-
// the RingPHP request, so we exit the FSM.
|
33 |
-
'send' => ['error' => 'error'],
|
34 |
-
'complete' => [
|
35 |
-
'success' => 'end',
|
36 |
-
'intercept' => 'retry',
|
37 |
-
'error' => 'error'
|
38 |
-
],
|
39 |
-
'error' => [
|
40 |
-
'success' => 'complete',
|
41 |
-
'intercept' => 'retry',
|
42 |
-
'error' => 'end'
|
43 |
-
],
|
44 |
-
'retry' => ['success' => 'before'],
|
45 |
-
'end' => [],
|
46 |
-
];
|
47 |
-
|
48 |
public function __construct(
|
49 |
callable $handler,
|
50 |
MessageFactoryInterface $messageFactory,
|
@@ -60,174 +35,119 @@ class RequestFsm
|
|
60 |
* optionally supplied $finalState is entered.
|
61 |
*
|
62 |
* @param Transaction $trans Transaction being transitioned.
|
63 |
-
* @param string $finalState The state to stop on. If unspecified,
|
64 |
-
* runs until a terminal state is found.
|
65 |
*
|
66 |
* @throws \Exception if a terminal state throws an exception.
|
67 |
*/
|
68 |
-
public function __invoke(Transaction $trans
|
69 |
{
|
70 |
-
$trans->_transitionCount =
|
71 |
|
72 |
if (!$trans->state) {
|
73 |
$trans->state = 'before';
|
74 |
}
|
75 |
|
76 |
-
|
77 |
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
. 'infinite loop.');
|
85 |
-
}
|
86 |
|
87 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
88 |
|
|
|
89 |
try {
|
90 |
-
|
91 |
-
$
|
92 |
-
if (
|
93 |
-
|
94 |
-
if (isset($state['intercept'])) {
|
95 |
-
$trans->state = $state['intercept'];
|
96 |
-
continue;
|
97 |
-
}
|
98 |
-
throw new StateException('Invalid intercept state '
|
99 |
-
. 'transition from ' . $trans->state);
|
100 |
}
|
101 |
-
|
102 |
-
if (isset($state['success'])) {
|
103 |
-
// Transition to the success state
|
104 |
-
$trans->state = $state['success'];
|
105 |
-
} else {
|
106 |
-
// Break: this is a terminal state with no transition.
|
107 |
-
break;
|
108 |
-
}
|
109 |
-
|
110 |
-
} catch (StateException $e) {
|
111 |
-
// State exceptions are thrown no matter what.
|
112 |
-
throw $e;
|
113 |
} catch (\Exception $e) {
|
|
|
114 |
$trans->exception = $e;
|
115 |
-
// Terminal error states throw the exception.
|
116 |
-
if (!isset($state['error'])) {
|
117 |
-
throw $e;
|
118 |
-
}
|
119 |
-
// Transition to the error state.
|
120 |
-
$trans->state = $state['error'];
|
121 |
}
|
|
|
122 |
}
|
123 |
-
}
|
124 |
-
|
125 |
-
private function before(Transaction $trans)
|
126 |
-
{
|
127 |
-
$trans->request->getEmitter()->emit('before', new BeforeEvent($trans));
|
128 |
-
|
129 |
-
// When a response is set during the before event (i.e., a mock), then
|
130 |
-
// we don't need to send anything. Skip ahead to the complete event
|
131 |
-
// by returning to to go to the intercept state.
|
132 |
-
return (bool) $trans->response;
|
133 |
-
}
|
134 |
-
|
135 |
-
private function retry(Transaction $trans)
|
136 |
-
{
|
137 |
-
$trans->response = $trans->exception = null;
|
138 |
-
$trans->retries++;
|
139 |
-
}
|
140 |
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
RingBridge::completeRingResponse($trans, $value, $this->mf, $this);
|
148 |
-
// Resolve deep futures if this is not a future transaction.
|
149 |
-
// This accounts for things like retries that would otherwise
|
150 |
-
// not have an immediate side-effect.
|
151 |
-
if (!$trans->future && $trans->response instanceof FutureInterface) {
|
152 |
-
$trans->response = $trans->response->wait();
|
153 |
}
|
154 |
-
|
|
|
|
|
|
|
|
|
|
|
155 |
}
|
156 |
-
|
157 |
-
}
|
158 |
-
|
159 |
-
/**
|
160 |
-
* Emits the error event and ensures that the exception is set and is an
|
161 |
-
* instance of RequestException. If the error event is not intercepted,
|
162 |
-
* then the exception is thrown and we transition to the "end" event. This
|
163 |
-
* event also allows requests to be retried, and when retried, transitions
|
164 |
-
* to the "before" event. Otherwise, when no retries, and the exception is
|
165 |
-
* intercepted, transition to the "complete" event.
|
166 |
-
*/
|
167 |
-
private function error(Transaction $trans)
|
168 |
-
{
|
169 |
-
// Convert non-request exception to a wrapped exception
|
170 |
-
if (!($trans->exception instanceof RequestException)) {
|
171 |
-
$trans->exception = RequestException::wrapException(
|
172 |
-
$trans->request, $trans->exception
|
173 |
-
);
|
174 |
-
}
|
175 |
-
|
176 |
-
// Dispatch an event and allow interception
|
177 |
-
$event = new ErrorEvent($trans);
|
178 |
-
$trans->request->getEmitter()->emit('error', $event);
|
179 |
-
|
180 |
-
if ($trans->state === 'retry') {
|
181 |
-
return true;
|
182 |
}
|
183 |
|
184 |
-
|
185 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
186 |
}
|
187 |
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
*/
|
195 |
-
private function complete(Transaction $trans)
|
196 |
-
{
|
197 |
-
// Futures will have their own end events emitted when dereferenced.
|
198 |
-
if ($trans->response instanceof FutureInterface) {
|
199 |
-
return false;
|
200 |
}
|
201 |
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
private function end(Transaction $trans)
|
213 |
-
{
|
214 |
-
// Futures will have their own end events emitted when dereferenced,
|
215 |
-
// but still emit, even for futures, when an exception is present.
|
216 |
-
if (!$trans->exception && $trans->response instanceof FutureInterface) {
|
217 |
return;
|
218 |
}
|
219 |
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
|
|
|
|
229 |
}
|
230 |
-
throw $trans->exception;
|
231 |
}
|
232 |
}
|
233 |
}
|
20 |
private $mf;
|
21 |
private $maxTransitions;
|
22 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
public function __construct(
|
24 |
callable $handler,
|
25 |
MessageFactoryInterface $messageFactory,
|
35 |
* optionally supplied $finalState is entered.
|
36 |
*
|
37 |
* @param Transaction $trans Transaction being transitioned.
|
|
|
|
|
38 |
*
|
39 |
* @throws \Exception if a terminal state throws an exception.
|
40 |
*/
|
41 |
+
public function __invoke(Transaction $trans)
|
42 |
{
|
43 |
+
$trans->_transitionCount = 0;
|
44 |
|
45 |
if (!$trans->state) {
|
46 |
$trans->state = 'before';
|
47 |
}
|
48 |
|
49 |
+
transition:
|
50 |
|
51 |
+
if (++$trans->_transitionCount > $this->maxTransitions) {
|
52 |
+
throw new StateException("Too many state transitions were "
|
53 |
+
. "encountered ({$trans->_transitionCount}). This likely "
|
54 |
+
. "means that a combination of event listeners are in an "
|
55 |
+
. "infinite loop.");
|
56 |
+
}
|
|
|
|
|
57 |
|
58 |
+
switch ($trans->state) {
|
59 |
+
case 'before': goto before;
|
60 |
+
case 'complete': goto complete;
|
61 |
+
case 'error': goto error;
|
62 |
+
case 'retry': goto retry;
|
63 |
+
case 'send': goto send;
|
64 |
+
case 'end': goto end;
|
65 |
+
default: throw new StateException("Invalid state: {$trans->state}");
|
66 |
+
}
|
67 |
|
68 |
+
before: {
|
69 |
try {
|
70 |
+
$trans->request->getEmitter()->emit('before', new BeforeEvent($trans));
|
71 |
+
$trans->state = 'send';
|
72 |
+
if ((bool) $trans->response) {
|
73 |
+
$trans->state = 'complete';
|
|
|
|
|
|
|
|
|
|
|
|
|
74 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
75 |
} catch (\Exception $e) {
|
76 |
+
$trans->state = 'error';
|
77 |
$trans->exception = $e;
|
|
|
|
|
|
|
|
|
|
|
|
|
78 |
}
|
79 |
+
goto transition;
|
80 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
81 |
|
82 |
+
complete: {
|
83 |
+
try {
|
84 |
+
if ($trans->response instanceof FutureInterface) {
|
85 |
+
// Futures will have their own end events emitted when
|
86 |
+
// dereferenced.
|
87 |
+
return;
|
|
|
|
|
|
|
|
|
|
|
|
|
88 |
}
|
89 |
+
$trans->state = 'end';
|
90 |
+
$trans->response->setEffectiveUrl($trans->request->getUrl());
|
91 |
+
$trans->request->getEmitter()->emit('complete', new CompleteEvent($trans));
|
92 |
+
} catch (\Exception $e) {
|
93 |
+
$trans->state = 'error';
|
94 |
+
$trans->exception = $e;
|
95 |
}
|
96 |
+
goto transition;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
97 |
}
|
98 |
|
99 |
+
error: {
|
100 |
+
try {
|
101 |
+
// Convert non-request exception to a wrapped exception
|
102 |
+
$trans->exception = RequestException::wrapException(
|
103 |
+
$trans->request, $trans->exception
|
104 |
+
);
|
105 |
+
$trans->state = 'end';
|
106 |
+
$trans->request->getEmitter()->emit('error', new ErrorEvent($trans));
|
107 |
+
// An intercepted request (not retried) transitions to complete
|
108 |
+
if (!$trans->exception && $trans->state !== 'retry') {
|
109 |
+
$trans->state = 'complete';
|
110 |
+
}
|
111 |
+
} catch (\Exception $e) {
|
112 |
+
$trans->state = 'end';
|
113 |
+
$trans->exception = $e;
|
114 |
+
}
|
115 |
+
goto transition;
|
116 |
}
|
117 |
|
118 |
+
retry: {
|
119 |
+
$trans->retries++;
|
120 |
+
$trans->response = null;
|
121 |
+
$trans->exception = null;
|
122 |
+
$trans->state = 'before';
|
123 |
+
goto transition;
|
|
|
|
|
|
|
|
|
|
|
|
|
124 |
}
|
125 |
|
126 |
+
send: {
|
127 |
+
$fn = $this->handler;
|
128 |
+
$trans->response = FutureResponse::proxy(
|
129 |
+
$fn(RingBridge::prepareRingRequest($trans)),
|
130 |
+
function ($value) use ($trans) {
|
131 |
+
RingBridge::completeRingResponse($trans, $value, $this->mf, $this);
|
132 |
+
$this($trans);
|
133 |
+
return $trans->response;
|
134 |
+
}
|
135 |
+
);
|
|
|
|
|
|
|
|
|
|
|
136 |
return;
|
137 |
}
|
138 |
|
139 |
+
end: {
|
140 |
+
$trans->request->getEmitter()->emit('end', new EndEvent($trans));
|
141 |
+
// Throw exceptions in the terminal event if the exception
|
142 |
+
// was not handled by an "end" event listener.
|
143 |
+
if ($trans->exception) {
|
144 |
+
if (!($trans->exception instanceof RequestException)) {
|
145 |
+
$trans->exception = RequestException::wrapException(
|
146 |
+
$trans->request, $trans->exception
|
147 |
+
);
|
148 |
+
}
|
149 |
+
throw $trans->exception;
|
150 |
}
|
|
|
151 |
}
|
152 |
}
|
153 |
}
|
backend/vendor/guzzlehttp/guzzle/src/RingBridge.php
CHANGED
@@ -72,19 +72,17 @@ class RingBridge
|
|
72 |
|
73 |
/**
|
74 |
* Handles the process of processing a response received from a ring
|
75 |
-
* handler. The created response is added to the transaction, and
|
76 |
-
*
|
77 |
*
|
78 |
* @param Transaction $trans Owns request and response.
|
79 |
* @param array $response Ring response array
|
80 |
* @param MessageFactoryInterface $messageFactory Creates response objects.
|
81 |
-
* @param callable $fsm Request FSM function.
|
82 |
*/
|
83 |
public static function completeRingResponse(
|
84 |
Transaction $trans,
|
85 |
array $response,
|
86 |
-
MessageFactoryInterface $messageFactory
|
87 |
-
callable $fsm
|
88 |
) {
|
89 |
$trans->state = 'complete';
|
90 |
$trans->transferInfo = isset($response['transfer_stats'])
|
@@ -116,9 +114,6 @@ class RingBridge
|
|
116 |
$trans->state = 'error';
|
117 |
$trans->exception = $response['error'];
|
118 |
}
|
119 |
-
|
120 |
-
// Complete the lifecycle of the request.
|
121 |
-
$fsm($trans);
|
122 |
}
|
123 |
|
124 |
/**
|
@@ -163,7 +158,7 @@ class RingBridge
|
|
163 |
Sending the request did not return a response, exception, or populate the
|
164 |
transaction with a response. This is most likely due to an incorrectly
|
165 |
implemented RingPHP handler. If you are simply trying to mock responses,
|
166 |
-
then it is
|
167 |
EOT;
|
168 |
return new RequestException($message, $request);
|
169 |
}
|
72 |
|
73 |
/**
|
74 |
* Handles the process of processing a response received from a ring
|
75 |
+
* handler. The created response is added to the transaction, and the
|
76 |
+
* transaction stat is set appropriately.
|
77 |
*
|
78 |
* @param Transaction $trans Owns request and response.
|
79 |
* @param array $response Ring response array
|
80 |
* @param MessageFactoryInterface $messageFactory Creates response objects.
|
|
|
81 |
*/
|
82 |
public static function completeRingResponse(
|
83 |
Transaction $trans,
|
84 |
array $response,
|
85 |
+
MessageFactoryInterface $messageFactory
|
|
|
86 |
) {
|
87 |
$trans->state = 'complete';
|
88 |
$trans->transferInfo = isset($response['transfer_stats'])
|
114 |
$trans->state = 'error';
|
115 |
$trans->exception = $response['error'];
|
116 |
}
|
|
|
|
|
|
|
117 |
}
|
118 |
|
119 |
/**
|
158 |
Sending the request did not return a response, exception, or populate the
|
159 |
transaction with a response. This is most likely due to an incorrectly
|
160 |
implemented RingPHP handler. If you are simply trying to mock responses,
|
161 |
+
then it is recommended to use the GuzzleHttp\Ring\Client\MockHandler.
|
162 |
EOT;
|
163 |
return new RequestException($message, $request);
|
164 |
}
|
backend/vendor/guzzlehttp/guzzle/src/Subscriber/Prepare.php
CHANGED
@@ -4,9 +4,9 @@ namespace GuzzleHttp\Subscriber;
|
|
4 |
use GuzzleHttp\Event\BeforeEvent;
|
5 |
use GuzzleHttp\Event\RequestEvents;
|
6 |
use GuzzleHttp\Event\SubscriberInterface;
|
|
|
7 |
use GuzzleHttp\Message\RequestInterface;
|
8 |
use GuzzleHttp\Mimetypes;
|
9 |
-
use GuzzleHttp\Post\PostBodyInterface;
|
10 |
use GuzzleHttp\Stream\StreamInterface;
|
11 |
|
12 |
/**
|
@@ -40,8 +40,8 @@ class Prepare implements SubscriberInterface
|
|
40 |
|
41 |
$this->addContentLength($request, $body);
|
42 |
|
43 |
-
if ($body instanceof
|
44 |
-
// Synchronize the
|
45 |
$body->applyRequestHeaders($request);
|
46 |
} elseif (!$request->hasHeader('Content-Type')) {
|
47 |
$this->addContentType($request, $body);
|
4 |
use GuzzleHttp\Event\BeforeEvent;
|
5 |
use GuzzleHttp\Event\RequestEvents;
|
6 |
use GuzzleHttp\Event\SubscriberInterface;
|
7 |
+
use GuzzleHttp\Message\AppliesHeadersInterface;
|
8 |
use GuzzleHttp\Message\RequestInterface;
|
9 |
use GuzzleHttp\Mimetypes;
|
|
|
10 |
use GuzzleHttp\Stream\StreamInterface;
|
11 |
|
12 |
/**
|
40 |
|
41 |
$this->addContentLength($request, $body);
|
42 |
|
43 |
+
if ($body instanceof AppliesHeadersInterface) {
|
44 |
+
// Synchronize the body with the request headers
|
45 |
$body->applyRequestHeaders($request);
|
46 |
} elseif (!$request->hasHeader('Content-Type')) {
|
47 |
$this->addContentType($request, $body);
|
backend/vendor/zendframework/zend-cache/Zend/Cache/Exception/BadMethodCallException.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-cache/Zend/Cache/Exception/ExceptionInterface.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-cache/Zend/Cache/Exception/ExtensionNotLoadedException.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-cache/Zend/Cache/Exception/InvalidArgumentException.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-cache/Zend/Cache/Exception/LogicException.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-cache/Zend/Cache/Exception/MissingDependencyException.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-cache/Zend/Cache/Exception/MissingKeyException.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-cache/Zend/Cache/Exception/OutOfSpaceException.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-cache/Zend/Cache/Exception/RuntimeException.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-cache/Zend/Cache/Exception/UnexpectedValueException.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-cache/Zend/Cache/Exception/UnsupportedMethodCallException.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-cache/Zend/Cache/Pattern/AbstractPattern.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-cache/Zend/Cache/Pattern/CallbackCache.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-cache/Zend/Cache/Pattern/CaptureCache.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
@@ -318,7 +318,6 @@ class CaptureCache extends AbstractPattern
|
|
318 |
$err = ErrorHandler::stop();
|
319 |
throw new Exception\RuntimeException("chmod('{$pathname}', 0{$oct}) failed", 0, $err);
|
320 |
}
|
321 |
-
|
322 |
} else {
|
323 |
// build-in mkdir function sets permission together with current umask
|
324 |
// which doesn't work well on multo threaded webservers
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
318 |
$err = ErrorHandler::stop();
|
319 |
throw new Exception\RuntimeException("chmod('{$pathname}', 0{$oct}) failed", 0, $err);
|
320 |
}
|
|
|
321 |
} else {
|
322 |
// build-in mkdir function sets permission together with current umask
|
323 |
// which doesn't work well on multo threaded webservers
|
backend/vendor/zendframework/zend-cache/Zend/Cache/Pattern/ClassCache.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-cache/Zend/Cache/Pattern/ObjectCache.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-cache/Zend/Cache/Pattern/OutputCache.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-cache/Zend/Cache/Pattern/PatternInterface.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-cache/Zend/Cache/Pattern/PatternOptions.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-cache/Zend/Cache/PatternFactory.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-cache/Zend/Cache/PatternPluginManager.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-cache/Zend/Cache/Service/StorageCacheAbstractServiceFactory.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-cache/Zend/Cache/Service/StorageCacheFactory.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/Adapter/AbstractAdapter.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/Adapter/AbstractZendServer.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/Adapter/AdapterOptions.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
@@ -22,11 +22,10 @@ use Zend\Stdlib\ErrorHandler;
|
|
22 |
*/
|
23 |
class AdapterOptions extends AbstractOptions
|
24 |
{
|
25 |
-
|
26 |
/**
|
27 |
* The adapter using these options
|
28 |
*
|
29 |
-
* @var null|
|
30 |
*/
|
31 |
protected $adapter;
|
32 |
|
@@ -259,7 +258,7 @@ class AdapterOptions extends AbstractOptions
|
|
259 |
}
|
260 |
|
261 |
if ($ttl < 0) {
|
262 |
-
|
263 |
}
|
264 |
}
|
265 |
}
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
22 |
*/
|
23 |
class AdapterOptions extends AbstractOptions
|
24 |
{
|
|
|
25 |
/**
|
26 |
* The adapter using these options
|
27 |
*
|
28 |
+
* @var null|StorageInterface
|
29 |
*/
|
30 |
protected $adapter;
|
31 |
|
258 |
}
|
259 |
|
260 |
if ($ttl < 0) {
|
261 |
+
throw new Exception\InvalidArgumentException("TTL can't be negative");
|
262 |
}
|
263 |
}
|
264 |
}
|
backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/Adapter/Apc.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
@@ -717,20 +717,16 @@ class Apc extends AbstractAdapter implements
|
|
717 |
*/
|
718 |
protected function normalizeMetadata(array & $metadata)
|
719 |
{
|
720 |
-
$
|
721 |
-
$metadata
|
722 |
-
|
723 |
-
$metadata['
|
724 |
-
$metadata['
|
725 |
-
$metadata['
|
726 |
-
|
727 |
-
|
728 |
-
$metadata['
|
729 |
-
$metadata['
|
730 |
-
$metadata['access_time'],
|
731 |
-
$metadata['deletion_time'],
|
732 |
-
$metadata['mem_size'],
|
733 |
-
$metadata['num_hits']
|
734 |
);
|
735 |
}
|
736 |
|
@@ -746,6 +742,10 @@ class Apc extends AbstractAdapter implements
|
|
746 |
*/
|
747 |
protected function internalCheckAndSetItem(& $token, & $normalizedKey, & $value)
|
748 |
{
|
749 |
-
|
|
|
|
|
|
|
|
|
750 |
}
|
751 |
}
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
717 |
*/
|
718 |
protected function normalizeMetadata(array & $metadata)
|
719 |
{
|
720 |
+
$apcMetadata = $metadata;
|
721 |
+
$metadata = array(
|
722 |
+
'internal_key' => isset($metadata['key']) ? $metadata['key'] : $metadata['info'],
|
723 |
+
'atime' => isset($metadata['access_time']) ? $metadata['access_time'] : $metadata['atime'],
|
724 |
+
'ctime' => isset($metadata['creation_time']) ? $metadata['creation_time'] : $metadata['ctime'],
|
725 |
+
'mtime' => isset($metadata['modified_time']) ? $metadata['modified_time'] : $metadata['mtime'],
|
726 |
+
'rtime' => isset($metadata['deletion_time']) ? $metadata['deletion_time'] : $metadata['dtime'],
|
727 |
+
'size' => $metadata['mem_size'],
|
728 |
+
'hits' => isset($metadata['nhits']) ? $metadata['nhits'] : $metadata['num_hits'],
|
729 |
+
'ttl' => $metadata['ttl'],
|
|
|
|
|
|
|
|
|
730 |
);
|
731 |
}
|
732 |
|
742 |
*/
|
743 |
protected function internalCheckAndSetItem(& $token, & $normalizedKey, & $value)
|
744 |
{
|
745 |
+
if (is_int($token) && is_int($value)) {
|
746 |
+
return apc_cas($normalizedKey, $token, $value);
|
747 |
+
}
|
748 |
+
|
749 |
+
return parent::internalCheckAndSetItem($token, $normalizedKey, $value);
|
750 |
}
|
751 |
}
|
backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/Adapter/ApcIterator.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
@@ -14,7 +14,6 @@ use Zend\Cache\Storage\IteratorInterface;
|
|
14 |
|
15 |
class ApcIterator implements IteratorInterface
|
16 |
{
|
17 |
-
|
18 |
/**
|
19 |
* The apc storage instance
|
20 |
*
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
14 |
|
15 |
class ApcIterator implements IteratorInterface
|
16 |
{
|
|
|
17 |
/**
|
18 |
* The apc storage instance
|
19 |
*
|
backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/Adapter/ApcOptions.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/Adapter/BlackHole.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/Adapter/Dba.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
@@ -189,7 +189,6 @@ class Dba extends AbstractAdapter implements
|
|
189 |
}
|
190 |
|
191 |
if (file_exists($pathname)) {
|
192 |
-
|
193 |
// close the dba file before delete
|
194 |
// and reopen (create) on next use
|
195 |
$this->_close();
|
@@ -226,7 +225,8 @@ class Dba extends AbstractAdapter implements
|
|
226 |
|
227 |
$this->_open();
|
228 |
|
229 |
-
do {
|
|
|
230 |
$recheck = false;
|
231 |
$internalKey = dba_firstkey($this->handle);
|
232 |
while ($internalKey !== false && $internalKey !== null) {
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
189 |
}
|
190 |
|
191 |
if (file_exists($pathname)) {
|
|
|
192 |
// close the dba file before delete
|
193 |
// and reopen (create) on next use
|
194 |
$this->_close();
|
225 |
|
226 |
$this->_open();
|
227 |
|
228 |
+
do {
|
229 |
+
// Workaround for PHP-Bug #62491 & #62492
|
230 |
$recheck = false;
|
231 |
$internalKey = dba_firstkey($this->handle);
|
232 |
while ($internalKey !== false && $internalKey !== null) {
|
backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/Adapter/DbaIterator.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
@@ -17,7 +17,7 @@ class DbaIterator implements IteratorInterface
|
|
17 |
/**
|
18 |
* The apc storage instance
|
19 |
*
|
20 |
-
* @var
|
21 |
*/
|
22 |
protected $storage;
|
23 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
17 |
/**
|
18 |
* The apc storage instance
|
19 |
*
|
20 |
+
* @var Dba
|
21 |
*/
|
22 |
protected $storage;
|
23 |
|
backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/Adapter/DbaOptions.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/Adapter/Filesystem.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
@@ -38,7 +38,6 @@ class Filesystem extends AbstractAdapter implements
|
|
38 |
TaggableInterface,
|
39 |
TotalSpaceCapableInterface
|
40 |
{
|
41 |
-
|
42 |
/**
|
43 |
* Buffered total space in bytes
|
44 |
*
|
@@ -529,7 +528,6 @@ class Filesystem extends AbstractAdapter implements
|
|
529 |
}
|
530 |
$success = true;
|
531 |
return $data;
|
532 |
-
|
533 |
} catch (BaseException $e) {
|
534 |
$success = false;
|
535 |
throw $e;
|
@@ -548,7 +546,6 @@ class Filesystem extends AbstractAdapter implements
|
|
548 |
$keys = $normalizedKeys; // Don't change argument passed by reference
|
549 |
$result = array();
|
550 |
while ($keys) {
|
551 |
-
|
552 |
// LOCK_NB if more than one items have to read
|
553 |
$nonBlocking = count($keys) > 1;
|
554 |
$wouldblock = null;
|
@@ -1416,8 +1413,16 @@ class Filesystem extends AbstractAdapter implements
|
|
1416 |
}
|
1417 |
|
1418 |
if (!$res) {
|
1419 |
-
$oct = ($perm === false) ? '777' : decoct($perm);
|
1420 |
$err = ErrorHandler::stop();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1421 |
throw new Exception\RuntimeException("mkdir('{$pathname}', 0{$oct}, true) failed", 0, $err);
|
1422 |
}
|
1423 |
|
@@ -1426,7 +1431,6 @@ class Filesystem extends AbstractAdapter implements
|
|
1426 |
$err = ErrorHandler::stop();
|
1427 |
throw new Exception\RuntimeException("chmod('{$pathname}', 0{$oct}) failed", 0, $err);
|
1428 |
}
|
1429 |
-
|
1430 |
} else {
|
1431 |
// build-in mkdir function sets permission together with current umask
|
1432 |
// which doesn't work well on multo threaded webservers
|
@@ -1456,6 +1460,13 @@ class Filesystem extends AbstractAdapter implements
|
|
1456 |
}
|
1457 |
|
1458 |
if (!$res) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1459 |
$oct = ($perm === false) ? '777' : decoct($perm);
|
1460 |
ErrorHandler::stop();
|
1461 |
throw new Exception\RuntimeException(
|
@@ -1503,7 +1514,6 @@ class Filesystem extends AbstractAdapter implements
|
|
1503 |
|
1504 |
// if locking and non blocking is enabled -> file_put_contents can't used
|
1505 |
if ($locking && $nonBlocking) {
|
1506 |
-
|
1507 |
$umask = ($umask !== false) ? umask($umask) : false;
|
1508 |
|
1509 |
$fp = fopen($file, 'cb');
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
38 |
TaggableInterface,
|
39 |
TotalSpaceCapableInterface
|
40 |
{
|
|
|
41 |
/**
|
42 |
* Buffered total space in bytes
|
43 |
*
|
528 |
}
|
529 |
$success = true;
|
530 |
return $data;
|
|
|
531 |
} catch (BaseException $e) {
|
532 |
$success = false;
|
533 |
throw $e;
|
546 |
$keys = $normalizedKeys; // Don't change argument passed by reference
|
547 |
$result = array();
|
548 |
while ($keys) {
|
|
|
549 |
// LOCK_NB if more than one items have to read
|
550 |
$nonBlocking = count($keys) > 1;
|
551 |
$wouldblock = null;
|
1413 |
}
|
1414 |
|
1415 |
if (!$res) {
|
|
|
1416 |
$err = ErrorHandler::stop();
|
1417 |
+
|
1418 |
+
// Issue 6435:
|
1419 |
+
// mkdir could fail because of a race condition it was already created by another process
|
1420 |
+
// after the first file_exists above
|
1421 |
+
if (file_exists($pathname)) {
|
1422 |
+
return;
|
1423 |
+
}
|
1424 |
+
|
1425 |
+
$oct = ($perm === false) ? '777' : decoct($perm);
|
1426 |
throw new Exception\RuntimeException("mkdir('{$pathname}', 0{$oct}, true) failed", 0, $err);
|
1427 |
}
|
1428 |
|
1431 |
$err = ErrorHandler::stop();
|
1432 |
throw new Exception\RuntimeException("chmod('{$pathname}', 0{$oct}) failed", 0, $err);
|
1433 |
}
|
|
|
1434 |
} else {
|
1435 |
// build-in mkdir function sets permission together with current umask
|
1436 |
// which doesn't work well on multo threaded webservers
|
1460 |
}
|
1461 |
|
1462 |
if (!$res) {
|
1463 |
+
// Issue 6435:
|
1464 |
+
// mkdir could fail because of a race condition it was already created by another process
|
1465 |
+
// after the first file_exists above ... go to the next path part.
|
1466 |
+
if (file_exists($path)) {
|
1467 |
+
continue;
|
1468 |
+
}
|
1469 |
+
|
1470 |
$oct = ($perm === false) ? '777' : decoct($perm);
|
1471 |
ErrorHandler::stop();
|
1472 |
throw new Exception\RuntimeException(
|
1514 |
|
1515 |
// if locking and non blocking is enabled -> file_put_contents can't used
|
1516 |
if ($locking && $nonBlocking) {
|
|
|
1517 |
$umask = ($umask !== false) ? umask($umask) : false;
|
1518 |
|
1519 |
$fp = fopen($file, 'cb');
|
backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/Adapter/FilesystemIterator.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
@@ -14,7 +14,6 @@ use Zend\Cache\Storage\IteratorInterface;
|
|
14 |
|
15 |
class FilesystemIterator implements IteratorInterface
|
16 |
{
|
17 |
-
|
18 |
/**
|
19 |
* The Filesystem storage instance
|
20 |
*
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
14 |
|
15 |
class FilesystemIterator implements IteratorInterface
|
16 |
{
|
|
|
17 |
/**
|
18 |
* The Filesystem storage instance
|
19 |
*
|
backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/Adapter/FilesystemOptions.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
@@ -17,7 +17,6 @@ use Zend\Cache\Exception;
|
|
17 |
*/
|
18 |
class FilesystemOptions extends AdapterOptions
|
19 |
{
|
20 |
-
|
21 |
/**
|
22 |
* Directory to store cache files
|
23 |
*
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
17 |
*/
|
18 |
class FilesystemOptions extends AdapterOptions
|
19 |
{
|
|
|
20 |
/**
|
21 |
* Directory to store cache files
|
22 |
*
|
backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/Adapter/KeyListIterator.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
@@ -15,7 +15,6 @@ use Zend\Cache\Storage\StorageInterface;
|
|
15 |
|
16 |
class KeyListIterator implements IteratorInterface, Countable
|
17 |
{
|
18 |
-
|
19 |
/**
|
20 |
* The storage instance
|
21 |
*
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
15 |
|
16 |
class KeyListIterator implements IteratorInterface, Countable
|
17 |
{
|
|
|
18 |
/**
|
19 |
* The storage instance
|
20 |
*
|
backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/Adapter/Memcache.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/Adapter/MemcacheOptions.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/Adapter/MemcacheResourceManager.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/Adapter/Memcached.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
@@ -222,7 +222,7 @@ class Memcached extends AbstractAdapter implements
|
|
222 |
}
|
223 |
|
224 |
$success = true;
|
225 |
-
if ($result === false
|
226 |
$rsCode = $memc->getResultCode();
|
227 |
if ($rsCode == MemcachedResource::RES_NOTFOUND) {
|
228 |
$result = null;
|
@@ -280,7 +280,7 @@ class Memcached extends AbstractAdapter implements
|
|
280 |
{
|
281 |
$memc = $this->getMemcachedResource();
|
282 |
$value = $memc->get($this->namespacePrefix . $normalizedKey);
|
283 |
-
if ($value === false
|
284 |
$rsCode = $memc->getResultCode();
|
285 |
if ($rsCode == MemcachedResource::RES_SUCCESS) {
|
286 |
return true;
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
222 |
}
|
223 |
|
224 |
$success = true;
|
225 |
+
if ($result === false) {
|
226 |
$rsCode = $memc->getResultCode();
|
227 |
if ($rsCode == MemcachedResource::RES_NOTFOUND) {
|
228 |
$result = null;
|
280 |
{
|
281 |
$memc = $this->getMemcachedResource();
|
282 |
$value = $memc->get($this->namespacePrefix . $normalizedKey);
|
283 |
+
if ($value === false) {
|
284 |
$rsCode = $memc->getResultCode();
|
285 |
if ($rsCode == MemcachedResource::RES_SUCCESS) {
|
286 |
return true;
|
backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/Adapter/MemcachedOptions.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/Adapter/MemcachedResourceManager.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
@@ -20,7 +20,6 @@ use Zend\Stdlib\ArrayUtils;
|
|
20 |
*/
|
21 |
class MemcachedResourceManager
|
22 |
{
|
23 |
-
|
24 |
/**
|
25 |
* Registered resources
|
26 |
*
|
@@ -80,7 +79,6 @@ class MemcachedResourceManager
|
|
80 |
$port = isset($server['port']) ? (int) $server['port'] : $port;
|
81 |
$weight = isset($server['weight']) ? (int) $server['weight'] : $weight;
|
82 |
}
|
83 |
-
|
84 |
} else {
|
85 |
// parse server from URI host{:?port}{?weight}
|
86 |
$server = trim($server);
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
20 |
*/
|
21 |
class MemcachedResourceManager
|
22 |
{
|
|
|
23 |
/**
|
24 |
* Registered resources
|
25 |
*
|
79 |
$port = isset($server['port']) ? (int) $server['port'] : $port;
|
80 |
$weight = isset($server['weight']) ? (int) $server['weight'] : $weight;
|
81 |
}
|
|
|
82 |
} else {
|
83 |
// parse server from URI host{:?port}{?weight}
|
84 |
$server = trim($server);
|
backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/Adapter/Memory.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
@@ -227,17 +227,12 @@ class Memory extends AbstractAdapter implements
|
|
227 |
public function setTags($key, array $tags)
|
228 |
{
|
229 |
$ns = $this->getOptions()->getNamespace();
|
230 |
-
if (
|
231 |
return false;
|
232 |
}
|
233 |
|
234 |
-
$
|
235 |
-
|
236 |
-
$data[$key]['tags'] = $tags;
|
237 |
-
return true;
|
238 |
-
}
|
239 |
-
|
240 |
-
return false;
|
241 |
}
|
242 |
|
243 |
/**
|
@@ -249,16 +244,11 @@ class Memory extends AbstractAdapter implements
|
|
249 |
public function getTags($key)
|
250 |
{
|
251 |
$ns = $this->getOptions()->getNamespace();
|
252 |
-
if (
|
253 |
-
return false;
|
254 |
-
}
|
255 |
-
|
256 |
-
$data = & $this->data[$ns];
|
257 |
-
if (!isset($data[$key])) {
|
258 |
return false;
|
259 |
}
|
260 |
|
261 |
-
return isset($data[$key]['tags']) ? $data[$key]['tags'] : array();
|
262 |
}
|
263 |
|
264 |
/**
|
@@ -274,7 +264,7 @@ class Memory extends AbstractAdapter implements
|
|
274 |
public function clearByTags(array $tags, $disjunction = false)
|
275 |
{
|
276 |
$ns = $this->getOptions()->getNamespace();
|
277 |
-
if (
|
278 |
return true;
|
279 |
}
|
280 |
|
@@ -654,16 +644,16 @@ class Memory extends AbstractAdapter implements
|
|
654 |
*/
|
655 |
protected function internalIncrementItem(& $normalizedKey, & $value)
|
656 |
{
|
657 |
-
$ns
|
658 |
-
|
659 |
-
|
660 |
-
$data[
|
661 |
-
$data[
|
662 |
-
$newValue = $data[
|
663 |
} else {
|
664 |
// initial value
|
665 |
-
$newValue
|
666 |
-
$data[$normalizedKey] = array($newValue, microtime(true));
|
667 |
}
|
668 |
|
669 |
return $newValue;
|
@@ -679,16 +669,16 @@ class Memory extends AbstractAdapter implements
|
|
679 |
*/
|
680 |
protected function internalDecrementItem(& $normalizedKey, & $value)
|
681 |
{
|
682 |
-
$ns
|
683 |
-
|
684 |
-
|
685 |
-
$data[
|
686 |
-
$data[
|
687 |
-
$newValue = $data[
|
688 |
} else {
|
689 |
// initial value
|
690 |
-
$newValue
|
691 |
-
$data[$normalizedKey] = array($newValue, microtime(true));
|
692 |
}
|
693 |
|
694 |
return $newValue;
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
227 |
public function setTags($key, array $tags)
|
228 |
{
|
229 |
$ns = $this->getOptions()->getNamespace();
|
230 |
+
if (!isset($this->data[$ns][$key])) {
|
231 |
return false;
|
232 |
}
|
233 |
|
234 |
+
$this->data[$ns][$key]['tags'] = $tags;
|
235 |
+
return true;
|
|
|
|
|
|
|
|
|
|
|
236 |
}
|
237 |
|
238 |
/**
|
244 |
public function getTags($key)
|
245 |
{
|
246 |
$ns = $this->getOptions()->getNamespace();
|
247 |
+
if (!isset($this->data[$ns][$key])) {
|
|
|
|
|
|
|
|
|
|
|
248 |
return false;
|
249 |
}
|
250 |
|
251 |
+
return isset($this->data[$ns][$key]['tags']) ? $this->data[$ns][$key]['tags'] : array();
|
252 |
}
|
253 |
|
254 |
/**
|
264 |
public function clearByTags(array $tags, $disjunction = false)
|
265 |
{
|
266 |
$ns = $this->getOptions()->getNamespace();
|
267 |
+
if (!isset($this->data[$ns])) {
|
268 |
return true;
|
269 |
}
|
270 |
|
644 |
*/
|
645 |
protected function internalIncrementItem(& $normalizedKey, & $value)
|
646 |
{
|
647 |
+
$ns = $this->getOptions()->getNamespace();
|
648 |
+
if (isset($this->data[$ns][$normalizedKey])) {
|
649 |
+
$data = & $this->data[$ns][$normalizedKey];
|
650 |
+
$data[0]+= $value;
|
651 |
+
$data[1] = microtime(true);
|
652 |
+
$newValue = $data[0];
|
653 |
} else {
|
654 |
// initial value
|
655 |
+
$newValue = $value;
|
656 |
+
$this->data[$ns][$normalizedKey] = array($newValue, microtime(true));
|
657 |
}
|
658 |
|
659 |
return $newValue;
|
669 |
*/
|
670 |
protected function internalDecrementItem(& $normalizedKey, & $value)
|
671 |
{
|
672 |
+
$ns = $this->getOptions()->getNamespace();
|
673 |
+
if (isset($this->data[$ns][$normalizedKey])) {
|
674 |
+
$data = & $this->data[$ns][$normalizedKey];
|
675 |
+
$data[0]-= $value;
|
676 |
+
$data[1] = microtime(true);
|
677 |
+
$newValue = $data[0];
|
678 |
} else {
|
679 |
// initial value
|
680 |
+
$newValue = -$value;
|
681 |
+
$this->data[$ns][$normalizedKey] = array($newValue, microtime(true));
|
682 |
}
|
683 |
|
684 |
return $newValue;
|
backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/Adapter/MemoryOptions.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/Adapter/Redis.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
@@ -22,7 +22,6 @@ class Redis extends AbstractAdapter implements
|
|
22 |
FlushableInterface,
|
23 |
TotalSpaceCapableInterface
|
24 |
{
|
25 |
-
|
26 |
/**
|
27 |
* Has this instance be initialized
|
28 |
*
|
@@ -173,7 +172,7 @@ class Redis extends AbstractAdapter implements
|
|
173 |
$redis = $this->getRedisResource();
|
174 |
|
175 |
$namespacedKeys = array();
|
176 |
-
foreach ($normalizedKeys as
|
177 |
$namespacedKeys[] = $this->namespacePrefix . $normalizedKey;
|
178 |
}
|
179 |
|
@@ -253,8 +252,8 @@ class Redis extends AbstractAdapter implements
|
|
253 |
$ttl = $this->getOptions()->getTtl();
|
254 |
|
255 |
$namespacedKeyValuePairs = array();
|
256 |
-
foreach ($normalizedKeyValuePairs as $normalizedKey =>
|
257 |
-
$namespacedKeyValuePairs[$this->namespacePrefix . $normalizedKey] =
|
258 |
}
|
259 |
try {
|
260 |
if ($ttl > 0) {
|
@@ -271,7 +270,6 @@ class Redis extends AbstractAdapter implements
|
|
271 |
} else {
|
272 |
$success = $redis->mSet($namespacedKeyValuePairs);
|
273 |
}
|
274 |
-
|
275 |
} catch (RedisResourceException $e) {
|
276 |
throw new Exception\RuntimeException($redis->getLastError(), $e->getCode(), $e);
|
277 |
}
|
@@ -387,7 +385,6 @@ class Redis extends AbstractAdapter implements
|
|
387 |
}
|
388 |
|
389 |
return $info['used_memory'];
|
390 |
-
|
391 |
}
|
392 |
|
393 |
/* status */
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
22 |
FlushableInterface,
|
23 |
TotalSpaceCapableInterface
|
24 |
{
|
|
|
25 |
/**
|
26 |
* Has this instance be initialized
|
27 |
*
|
172 |
$redis = $this->getRedisResource();
|
173 |
|
174 |
$namespacedKeys = array();
|
175 |
+
foreach ($normalizedKeys as $normalizedKey) {
|
176 |
$namespacedKeys[] = $this->namespacePrefix . $normalizedKey;
|
177 |
}
|
178 |
|
252 |
$ttl = $this->getOptions()->getTtl();
|
253 |
|
254 |
$namespacedKeyValuePairs = array();
|
255 |
+
foreach ($normalizedKeyValuePairs as $normalizedKey => $value) {
|
256 |
+
$namespacedKeyValuePairs[$this->namespacePrefix . $normalizedKey] = $value;
|
257 |
}
|
258 |
try {
|
259 |
if ($ttl > 0) {
|
270 |
} else {
|
271 |
$success = $redis->mSet($namespacedKeyValuePairs);
|
272 |
}
|
|
|
273 |
} catch (RedisResourceException $e) {
|
274 |
throw new Exception\RuntimeException($redis->getLastError(), $e->getCode(), $e);
|
275 |
}
|
385 |
}
|
386 |
|
387 |
return $info['used_memory'];
|
|
|
388 |
}
|
389 |
|
390 |
/* status */
|
backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/Adapter/RedisOptions.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/Adapter/RedisResourceManager.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
@@ -189,7 +189,6 @@ class RedisResourceManager
|
|
189 |
$port = isset($server['port']) ? (int) $server['port'] : $port;
|
190 |
$timeout = isset($server['timeout']) ? (int) $server['timeout'] : $timeout;
|
191 |
}
|
192 |
-
|
193 |
} else {
|
194 |
// parse server from URI host{:?port}
|
195 |
$server = trim($server);
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
189 |
$port = isset($server['port']) ? (int) $server['port'] : $port;
|
190 |
$timeout = isset($server['timeout']) ? (int) $server['timeout'] : $timeout;
|
191 |
}
|
|
|
192 |
} else {
|
193 |
// parse server from URI host{:?port}
|
194 |
$server = trim($server);
|
backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/Adapter/Session.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
@@ -22,7 +22,6 @@ class Session extends AbstractAdapter implements
|
|
22 |
FlushableInterface,
|
23 |
IterableInterface
|
24 |
{
|
25 |
-
|
26 |
/**
|
27 |
* Set options.
|
28 |
*
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
22 |
FlushableInterface,
|
23 |
IterableInterface
|
24 |
{
|
|
|
25 |
/**
|
26 |
* Set options.
|
27 |
*
|
backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/Adapter/SessionOptions.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/Adapter/WinCache.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
@@ -22,7 +22,6 @@ class WinCache extends AbstractAdapter implements
|
|
22 |
FlushableInterface,
|
23 |
TotalSpaceCapableInterface
|
24 |
{
|
25 |
-
|
26 |
/**
|
27 |
* Constructor
|
28 |
*
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
22 |
FlushableInterface,
|
23 |
TotalSpaceCapableInterface
|
24 |
{
|
|
|
25 |
/**
|
26 |
* Constructor
|
27 |
*
|
backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/Adapter/WinCacheOptions.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/Adapter/XCache.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
@@ -28,7 +28,6 @@ class XCache extends AbstractAdapter implements
|
|
28 |
IterableInterface,
|
29 |
TotalSpaceCapableInterface
|
30 |
{
|
31 |
-
|
32 |
/**
|
33 |
* Backup HTTP authentication properties of $_SERVER array
|
34 |
*
|
@@ -46,7 +45,7 @@ class XCache extends AbstractAdapter implements
|
|
46 |
/**
|
47 |
* Constructor
|
48 |
*
|
49 |
-
* @param null|array|Traversable|
|
50 |
* @throws Exception\ExceptionInterface
|
51 |
*/
|
52 |
public function __construct($options = null)
|
@@ -75,7 +74,7 @@ class XCache extends AbstractAdapter implements
|
|
75 |
/**
|
76 |
* Set options.
|
77 |
*
|
78 |
-
* @param array|Traversable|
|
79 |
* @return XCache
|
80 |
* @see getOptions()
|
81 |
*/
|
@@ -221,7 +220,6 @@ class XCache extends AbstractAdapter implements
|
|
221 |
*/
|
222 |
public function getIterator()
|
223 |
{
|
224 |
-
|
225 |
$options = $this->getOptions();
|
226 |
$namespace = $options->getNamespace();
|
227 |
$keys = array();
|
@@ -237,7 +235,6 @@ class XCache extends AbstractAdapter implements
|
|
237 |
}
|
238 |
}
|
239 |
} else {
|
240 |
-
|
241 |
$prefix = $namespace . $options->getNamespaceSeparator();
|
242 |
$prefixL = strlen($prefix);
|
243 |
|
@@ -313,7 +310,6 @@ class XCache extends AbstractAdapter implements
|
|
313 |
$internalKey = $prefix . $normalizedKey;
|
314 |
|
315 |
if (xcache_isset($internalKey)) {
|
316 |
-
|
317 |
$this->initAdminAuth();
|
318 |
$cnt = xcache_count(XC_TYPE_VAR);
|
319 |
for ($i=0; $i < $cnt; $i++) {
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
28 |
IterableInterface,
|
29 |
TotalSpaceCapableInterface
|
30 |
{
|
|
|
31 |
/**
|
32 |
* Backup HTTP authentication properties of $_SERVER array
|
33 |
*
|
45 |
/**
|
46 |
* Constructor
|
47 |
*
|
48 |
+
* @param null|array|Traversable|XCacheOptions $options
|
49 |
* @throws Exception\ExceptionInterface
|
50 |
*/
|
51 |
public function __construct($options = null)
|
74 |
/**
|
75 |
* Set options.
|
76 |
*
|
77 |
+
* @param array|Traversable|XCacheOptions $options
|
78 |
* @return XCache
|
79 |
* @see getOptions()
|
80 |
*/
|
220 |
*/
|
221 |
public function getIterator()
|
222 |
{
|
|
|
223 |
$options = $this->getOptions();
|
224 |
$namespace = $options->getNamespace();
|
225 |
$keys = array();
|
235 |
}
|
236 |
}
|
237 |
} else {
|
|
|
238 |
$prefix = $namespace . $options->getNamespaceSeparator();
|
239 |
$prefixL = strlen($prefix);
|
240 |
|
310 |
$internalKey = $prefix . $normalizedKey;
|
311 |
|
312 |
if (xcache_isset($internalKey)) {
|
|
|
313 |
$this->initAdminAuth();
|
314 |
$cnt = xcache_count(XC_TYPE_VAR);
|
315 |
for ($i=0; $i < $cnt; $i++) {
|
backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/Adapter/XCacheOptions.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/Adapter/ZendServerDisk.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
@@ -22,7 +22,6 @@ class ZendServerDisk extends AbstractZendServer implements
|
|
22 |
FlushableInterface,
|
23 |
TotalSpaceCapableInterface
|
24 |
{
|
25 |
-
|
26 |
/**
|
27 |
* Buffered total space in bytes
|
28 |
*
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
22 |
FlushableInterface,
|
23 |
TotalSpaceCapableInterface
|
24 |
{
|
|
|
25 |
/**
|
26 |
* Buffered total space in bytes
|
27 |
*
|
backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/Adapter/ZendServerShm.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
@@ -19,7 +19,6 @@ class ZendServerShm extends AbstractZendServer implements
|
|
19 |
FlushableInterface,
|
20 |
TotalSpaceCapableInterface
|
21 |
{
|
22 |
-
|
23 |
/**
|
24 |
* Constructor
|
25 |
*
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
19 |
FlushableInterface,
|
20 |
TotalSpaceCapableInterface
|
21 |
{
|
|
|
22 |
/**
|
23 |
* Constructor
|
24 |
*
|
backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/AdapterPluginManager.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/AvailableSpaceCapableInterface.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/Capabilities.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
@@ -40,8 +40,8 @@ class Capabilities
|
|
40 |
/**
|
41 |
* Expire read
|
42 |
*
|
43 |
-
|
44 |
-
|
45 |
*
|
46 |
* @var null|bool
|
47 |
*/
|
@@ -50,8 +50,8 @@ class Capabilities
|
|
50 |
/**
|
51 |
* Max. key length
|
52 |
*
|
53 |
-
|
54 |
-
|
55 |
*
|
56 |
* @var null|int
|
57 |
*/
|
@@ -60,8 +60,8 @@ class Capabilities
|
|
60 |
/**
|
61 |
* Min. TTL (0 means items never expire)
|
62 |
*
|
63 |
-
|
64 |
-
|
65 |
*
|
66 |
* @var null|int
|
67 |
*/
|
@@ -70,8 +70,8 @@ class Capabilities
|
|
70 |
/**
|
71 |
* Max. TTL (0 means infinite)
|
72 |
*
|
73 |
-
|
74 |
-
|
75 |
*
|
76 |
* @var null|int
|
77 |
*/
|
@@ -80,8 +80,8 @@ class Capabilities
|
|
80 |
/**
|
81 |
* Namespace is prefix
|
82 |
*
|
83 |
-
|
84 |
-
|
85 |
*
|
86 |
* @var null|bool
|
87 |
*/
|
@@ -90,8 +90,8 @@ class Capabilities
|
|
90 |
/**
|
91 |
* Namespace separator
|
92 |
*
|
93 |
-
|
94 |
-
|
95 |
*
|
96 |
* @var null|string
|
97 |
*/
|
@@ -100,28 +100,28 @@ class Capabilities
|
|
100 |
/**
|
101 |
* Static ttl
|
102 |
*
|
103 |
-
|
104 |
-
|
105 |
*
|
106 |
* @var null|bool
|
107 |
*/
|
108 |
protected $staticTtl;
|
109 |
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
protected $supportedDatatypes;
|
119 |
|
120 |
/**
|
121 |
* Supported metdata
|
122 |
*
|
123 |
-
|
124 |
-
|
125 |
*
|
126 |
* @var null|array
|
127 |
*/
|
@@ -130,8 +130,8 @@ class Capabilities
|
|
130 |
/**
|
131 |
* TTL precision
|
132 |
*
|
133 |
-
|
134 |
-
|
135 |
*
|
136 |
* @var null|int
|
137 |
*/
|
@@ -140,8 +140,8 @@ class Capabilities
|
|
140 |
/**
|
141 |
* Use request time
|
142 |
*
|
143 |
-
|
144 |
-
|
145 |
*
|
146 |
* @var null|bool
|
147 |
*/
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
40 |
/**
|
41 |
* Expire read
|
42 |
*
|
43 |
+
* If it's NULL the capability isn't set and the getter
|
44 |
+
* returns the base capability or the default value.
|
45 |
*
|
46 |
* @var null|bool
|
47 |
*/
|
50 |
/**
|
51 |
* Max. key length
|
52 |
*
|
53 |
+
* If it's NULL the capability isn't set and the getter
|
54 |
+
* returns the base capability or the default value.
|
55 |
*
|
56 |
* @var null|int
|
57 |
*/
|
60 |
/**
|
61 |
* Min. TTL (0 means items never expire)
|
62 |
*
|
63 |
+
* If it's NULL the capability isn't set and the getter
|
64 |
+
* returns the base capability or the default value.
|
65 |
*
|
66 |
* @var null|int
|
67 |
*/
|
70 |
/**
|
71 |
* Max. TTL (0 means infinite)
|
72 |
*
|
73 |
+
* If it's NULL the capability isn't set and the getter
|
74 |
+
* returns the base capability or the default value.
|
75 |
*
|
76 |
* @var null|int
|
77 |
*/
|
80 |
/**
|
81 |
* Namespace is prefix
|
82 |
*
|
83 |
+
* If it's NULL the capability isn't set and the getter
|
84 |
+
* returns the base capability or the default value.
|
85 |
*
|
86 |
* @var null|bool
|
87 |
*/
|
90 |
/**
|
91 |
* Namespace separator
|
92 |
*
|
93 |
+
* If it's NULL the capability isn't set and the getter
|
94 |
+
* returns the base capability or the default value.
|
95 |
*
|
96 |
* @var null|string
|
97 |
*/
|
100 |
/**
|
101 |
* Static ttl
|
102 |
*
|
103 |
+
* If it's NULL the capability isn't set and the getter
|
104 |
+
* returns the base capability or the default value.
|
105 |
*
|
106 |
* @var null|bool
|
107 |
*/
|
108 |
protected $staticTtl;
|
109 |
|
110 |
+
/**
|
111 |
+
* Supported datatypes
|
112 |
+
*
|
113 |
+
* If it's NULL the capability isn't set and the getter
|
114 |
+
* returns the base capability or the default value.
|
115 |
+
*
|
116 |
+
* @var null|array
|
117 |
+
*/
|
118 |
protected $supportedDatatypes;
|
119 |
|
120 |
/**
|
121 |
* Supported metdata
|
122 |
*
|
123 |
+
* If it's NULL the capability isn't set and the getter
|
124 |
+
* returns the base capability or the default value.
|
125 |
*
|
126 |
* @var null|array
|
127 |
*/
|
130 |
/**
|
131 |
* TTL precision
|
132 |
*
|
133 |
+
* If it's NULL the capability isn't set and the getter
|
134 |
+
* returns the base capability or the default value.
|
135 |
*
|
136 |
* @var null|int
|
137 |
*/
|
140 |
/**
|
141 |
* Use request time
|
142 |
*
|
143 |
+
* If it's NULL the capability isn't set and the getter
|
144 |
+
* returns the base capability or the default value.
|
145 |
*
|
146 |
* @var null|bool
|
147 |
*/
|
backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/ClearByNamespaceInterface.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/ClearByPrefixInterface.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/ClearExpiredInterface.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/Event.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/ExceptionEvent.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/FlushableInterface.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/IterableInterface.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/IteratorInterface.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
@@ -13,7 +13,6 @@ use Iterator;
|
|
13 |
|
14 |
interface IteratorInterface extends Iterator
|
15 |
{
|
16 |
-
|
17 |
const CURRENT_AS_SELF = 0;
|
18 |
const CURRENT_AS_KEY = 1;
|
19 |
const CURRENT_AS_VALUE = 2;
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
13 |
|
14 |
interface IteratorInterface extends Iterator
|
15 |
{
|
|
|
16 |
const CURRENT_AS_SELF = 0;
|
17 |
const CURRENT_AS_KEY = 1;
|
18 |
const CURRENT_AS_VALUE = 2;
|
backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/OptimizableInterface.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/Plugin/AbstractPlugin.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/Plugin/ClearExpiredByFactor.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/Plugin/ExceptionHandler.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/Plugin/IgnoreUserAbort.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
@@ -85,7 +85,7 @@ class IgnoreUserAbort extends AbstractPlugin
|
|
85 |
public function onBefore(Event $event)
|
86 |
{
|
87 |
if ($this->activatedTarget === null && !ignore_user_abort(true)) {
|
88 |
-
$this->activatedTarget = $event->
|
89 |
}
|
90 |
}
|
91 |
|
@@ -101,7 +101,7 @@ class IgnoreUserAbort extends AbstractPlugin
|
|
101 |
*/
|
102 |
public function onAfter(Event $event)
|
103 |
{
|
104 |
-
if ($this->activatedTarget === $event->
|
105 |
// exit if connection aborted
|
106 |
if ($this->getOptions()->getExitOnAbort() && connection_aborted()) {
|
107 |
exit;
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
85 |
public function onBefore(Event $event)
|
86 |
{
|
87 |
if ($this->activatedTarget === null && !ignore_user_abort(true)) {
|
88 |
+
$this->activatedTarget = $event->getStorage();
|
89 |
}
|
90 |
}
|
91 |
|
101 |
*/
|
102 |
public function onAfter(Event $event)
|
103 |
{
|
104 |
+
if ($this->activatedTarget === $event->getStorage()) {
|
105 |
// exit if connection aborted
|
106 |
if ($this->getOptions()->getExitOnAbort() && connection_aborted()) {
|
107 |
exit;
|
backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/Plugin/OptimizeByFactor.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/Plugin/PluginInterface.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/Plugin/PluginOptions.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/Plugin/Serializer.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/PluginManager.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/PostEvent.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/StorageInterface.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/TaggableInterface.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/TotalSpaceCapableInterface.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-cache/Zend/Cache/StorageFactory.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-cache/Zend/Cache/composer.json
CHANGED
@@ -17,10 +17,10 @@
|
|
17 |
"php": ">=5.3.23",
|
18 |
"zendframework/zend-stdlib": "self.version",
|
19 |
"zendframework/zend-servicemanager": "self.version",
|
|
|
20 |
"zendframework/zend-eventmanager": "self.version"
|
21 |
},
|
22 |
"require-dev": {
|
23 |
-
"zendframework/zend-serializer": "self.version",
|
24 |
"zendframework/zend-session": "self.version"
|
25 |
},
|
26 |
"suggest": {
|
17 |
"php": ">=5.3.23",
|
18 |
"zendframework/zend-stdlib": "self.version",
|
19 |
"zendframework/zend-servicemanager": "self.version",
|
20 |
+
"zendframework/zend-serializer": "self.version",
|
21 |
"zendframework/zend-eventmanager": "self.version"
|
22 |
},
|
23 |
"require-dev": {
|
|
|
24 |
"zendframework/zend-session": "self.version"
|
25 |
},
|
26 |
"suggest": {
|
backend/vendor/zendframework/zend-config/Zend/Config/AbstractConfigFactory.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-config/Zend/Config/Config.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
@@ -117,7 +117,6 @@ class Config implements Countable, Iterator, ArrayAccess
|
|
117 |
public function __set($name, $value)
|
118 |
{
|
119 |
if ($this->allowModifications) {
|
120 |
-
|
121 |
if (is_array($value)) {
|
122 |
$value = new static($value, true);
|
123 |
}
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
117 |
public function __set($name, $value)
|
118 |
{
|
119 |
if ($this->allowModifications) {
|
|
|
120 |
if (is_array($value)) {
|
121 |
$value = new static($value, true);
|
122 |
}
|
backend/vendor/zendframework/zend-config/Zend/Config/Exception/ExceptionInterface.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-config/Zend/Config/Exception/InvalidArgumentException.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-config/Zend/Config/Exception/RuntimeException.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-config/Zend/Config/Factory.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
@@ -34,10 +34,11 @@ class Factory
|
|
34 |
* @var array
|
35 |
*/
|
36 |
protected static $extensions = array(
|
37 |
-
'ini'
|
38 |
-
'json'
|
39 |
-
'xml'
|
40 |
-
'yaml'
|
|
|
41 |
);
|
42 |
|
43 |
/**
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
34 |
* @var array
|
35 |
*/
|
36 |
protected static $extensions = array(
|
37 |
+
'ini' => 'ini',
|
38 |
+
'json' => 'json',
|
39 |
+
'xml' => 'xml',
|
40 |
+
'yaml' => 'yaml',
|
41 |
+
'properties' => 'javaproperties',
|
42 |
);
|
43 |
|
44 |
/**
|
backend/vendor/zendframework/zend-config/Zend/Config/Processor/Constant.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-config/Zend/Config/Processor/Filter.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-config/Zend/Config/Processor/ProcessorInterface.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-config/Zend/Config/Processor/Queue.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-config/Zend/Config/Processor/Token.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-config/Zend/Config/Processor/Translator.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-config/Zend/Config/Reader/Ini.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-config/Zend/Config/Reader/JavaProperties.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
@@ -106,7 +106,7 @@ class JavaProperties implements ReaderInterface
|
|
106 |
$key = "";
|
107 |
$isWaitingOtherLine = false;
|
108 |
foreach ($lines as $i => $line) {
|
109 |
-
|
110 |
if (empty($line)
|
111 |
|| (!$isWaitingOtherLine && strpos($line, "#") === 0)
|
112 |
|| (!$isWaitingOtherLine && strpos($line, "!") === 0)) {
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
106 |
$key = "";
|
107 |
$isWaitingOtherLine = false;
|
108 |
foreach ($lines as $i => $line) {
|
109 |
+
// Ignore empty lines and commented lines
|
110 |
if (empty($line)
|
111 |
|| (!$isWaitingOtherLine && strpos($line, "#") === 0)
|
112 |
|| (!$isWaitingOtherLine && strpos($line, "!") === 0)) {
|
backend/vendor/zendframework/zend-config/Zend/Config/Reader/Json.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-config/Zend/Config/Reader/ReaderInterface.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-config/Zend/Config/Reader/Xml.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
@@ -59,7 +59,6 @@ class Xml implements ReaderInterface
|
|
59 |
$filename
|
60 |
));
|
61 |
}
|
62 |
-
|
63 |
$this->reader = new XMLReader();
|
64 |
$this->reader->open($filename, null, LIBXML_XINCLUDE);
|
65 |
|
@@ -76,6 +75,7 @@ class Xml implements ReaderInterface
|
|
76 |
);
|
77 |
$return = $this->process();
|
78 |
restore_error_handler();
|
|
|
79 |
|
80 |
return $return;
|
81 |
}
|
@@ -110,6 +110,7 @@ class Xml implements ReaderInterface
|
|
110 |
);
|
111 |
$return = $this->process();
|
112 |
restore_error_handler();
|
|
|
113 |
|
114 |
return $return;
|
115 |
}
|
@@ -150,7 +151,11 @@ class Xml implements ReaderInterface
|
|
150 |
}
|
151 |
|
152 |
if ($attributes) {
|
153 |
-
if (
|
|
|
|
|
|
|
|
|
154 |
$child = array();
|
155 |
}
|
156 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
59 |
$filename
|
60 |
));
|
61 |
}
|
|
|
62 |
$this->reader = new XMLReader();
|
63 |
$this->reader->open($filename, null, LIBXML_XINCLUDE);
|
64 |
|
75 |
);
|
76 |
$return = $this->process();
|
77 |
restore_error_handler();
|
78 |
+
$this->reader->close();
|
79 |
|
80 |
return $return;
|
81 |
}
|
110 |
);
|
111 |
$return = $this->process();
|
112 |
restore_error_handler();
|
113 |
+
$this->reader->close();
|
114 |
|
115 |
return $return;
|
116 |
}
|
151 |
}
|
152 |
|
153 |
if ($attributes) {
|
154 |
+
if (is_string($child)) {
|
155 |
+
$child = array('_' => $child);
|
156 |
+
}
|
157 |
+
|
158 |
+
if (! is_array($child) ) {
|
159 |
$child = array();
|
160 |
}
|
161 |
|
backend/vendor/zendframework/zend-config/Zend/Config/Reader/Yaml.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
@@ -92,7 +92,7 @@ class Yaml implements ReaderInterface
|
|
92 |
}
|
93 |
|
94 |
if (null === $this->getYamlDecoder()) {
|
95 |
-
|
96 |
}
|
97 |
|
98 |
$this->directory = dirname($filename);
|
@@ -116,7 +116,7 @@ class Yaml implements ReaderInterface
|
|
116 |
public function fromString($string)
|
117 |
{
|
118 |
if (null === $this->getYamlDecoder()) {
|
119 |
-
|
120 |
}
|
121 |
if (empty($string)) {
|
122 |
return array();
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
92 |
}
|
93 |
|
94 |
if (null === $this->getYamlDecoder()) {
|
95 |
+
throw new Exception\RuntimeException("You didn't specify a Yaml callback decoder");
|
96 |
}
|
97 |
|
98 |
$this->directory = dirname($filename);
|
116 |
public function fromString($string)
|
117 |
{
|
118 |
if (null === $this->getYamlDecoder()) {
|
119 |
+
throw new Exception\RuntimeException("You didn't specify a Yaml callback decoder");
|
120 |
}
|
121 |
if (empty($string)) {
|
122 |
return array();
|
backend/vendor/zendframework/zend-config/Zend/Config/ReaderPluginManager.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
@@ -19,10 +19,11 @@ class ReaderPluginManager extends AbstractPluginManager
|
|
19 |
* @var array
|
20 |
*/
|
21 |
protected $invokableClasses = array(
|
22 |
-
'ini'
|
23 |
-
'json'
|
24 |
-
'xml'
|
25 |
-
'yaml'
|
|
|
26 |
);
|
27 |
|
28 |
/**
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
19 |
* @var array
|
20 |
*/
|
21 |
protected $invokableClasses = array(
|
22 |
+
'ini' => 'Zend\Config\Reader\Ini',
|
23 |
+
'json' => 'Zend\Config\Reader\Json',
|
24 |
+
'xml' => 'Zend\Config\Reader\Xml',
|
25 |
+
'yaml' => 'Zend\Config\Reader\Yaml',
|
26 |
+
'javaproperties' => 'Zend\Config\Reader\JavaProperties',
|
27 |
);
|
28 |
|
29 |
/**
|
backend/vendor/zendframework/zend-config/Zend/Config/Writer/AbstractWriter.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-config/Zend/Config/Writer/Ini.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-config/Zend/Config/Writer/Json.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-config/Zend/Config/Writer/PhpArray.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-config/Zend/Config/Writer/WriterInterface.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-config/Zend/Config/Writer/Xml.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
@@ -71,7 +71,7 @@ class Xml extends AbstractWriter
|
|
71 |
|
72 |
if ($branchType === 'numeric') {
|
73 |
if (is_array($value)) {
|
74 |
-
$this->addBranch($
|
75 |
} else {
|
76 |
$writer->writeElement($branchName, (string) $value);
|
77 |
}
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
71 |
|
72 |
if ($branchType === 'numeric') {
|
73 |
if (is_array($value)) {
|
74 |
+
$this->addBranch($branchName, $value, $writer);
|
75 |
} else {
|
76 |
$writer->writeElement($branchName, (string) $value);
|
77 |
}
|
backend/vendor/zendframework/zend-config/Zend/Config/Writer/Yaml.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
@@ -72,7 +72,7 @@ class Yaml extends AbstractWriter
|
|
72 |
public function processConfig(array $config)
|
73 |
{
|
74 |
if (null === $this->getYamlEncoder()) {
|
75 |
-
|
76 |
}
|
77 |
|
78 |
$config = call_user_func($this->getYamlEncoder(), $config);
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
72 |
public function processConfig(array $config)
|
73 |
{
|
74 |
if (null === $this->getYamlEncoder()) {
|
75 |
+
throw new Exception\RuntimeException("You didn't specify a Yaml callback encoder");
|
76 |
}
|
77 |
|
78 |
$config = call_user_func($this->getYamlEncoder(), $config);
|
backend/vendor/zendframework/zend-config/Zend/Config/WriterPluginManager.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-eventmanager/Zend/EventManager/AbstractListenerAggregate.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-eventmanager/Zend/EventManager/Event.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-eventmanager/Zend/EventManager/EventInterface.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-eventmanager/Zend/EventManager/EventManager.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
@@ -530,7 +530,7 @@ class EventManager implements EventManagerInterface
|
|
530 |
* Used to inject shared listeners and wildcard listeners.
|
531 |
*
|
532 |
* @param PriorityQueue $masterListeners
|
533 |
-
* @param
|
534 |
* @return void
|
535 |
*/
|
536 |
protected function insertListeners($masterListeners, $listeners)
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
530 |
* Used to inject shared listeners and wildcard listeners.
|
531 |
*
|
532 |
* @param PriorityQueue $masterListeners
|
533 |
+
* @param array|Traversable $listeners
|
534 |
* @return void
|
535 |
*/
|
536 |
protected function insertListeners($masterListeners, $listeners)
|
backend/vendor/zendframework/zend-eventmanager/Zend/EventManager/EventManagerAwareInterface.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-eventmanager/Zend/EventManager/EventManagerAwareTrait.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-eventmanager/Zend/EventManager/EventManagerInterface.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
@@ -37,7 +37,7 @@ interface EventManagerInterface extends SharedEventManagerAwareInterface
|
|
37 |
public function trigger($event, $target = null, $argv = array(), $callback = null);
|
38 |
|
39 |
/**
|
40 |
-
* Trigger an event until the given callback returns a boolean
|
41 |
*
|
42 |
* Should allow handling the following scenarios:
|
43 |
* - Passing Event object and callback only
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
37 |
public function trigger($event, $target = null, $argv = array(), $callback = null);
|
38 |
|
39 |
/**
|
40 |
+
* Trigger an event until the given callback returns a boolean true
|
41 |
*
|
42 |
* Should allow handling the following scenarios:
|
43 |
* - Passing Event object and callback only
|
backend/vendor/zendframework/zend-eventmanager/Zend/EventManager/EventsCapableInterface.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-eventmanager/Zend/EventManager/Exception/DomainException.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-eventmanager/Zend/EventManager/Exception/ExceptionInterface.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-eventmanager/Zend/EventManager/Exception/InvalidArgumentException.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-eventmanager/Zend/EventManager/Exception/InvalidCallbackException.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-eventmanager/Zend/EventManager/Filter/FilterInterface.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-eventmanager/Zend/EventManager/Filter/FilterIterator.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-eventmanager/Zend/EventManager/FilterChain.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-eventmanager/Zend/EventManager/GlobalEventManager.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-eventmanager/Zend/EventManager/ListenerAggregateInterface.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-eventmanager/Zend/EventManager/ListenerAggregateTrait.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-eventmanager/Zend/EventManager/ProvidesEvents.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-eventmanager/Zend/EventManager/ResponseCollection.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-eventmanager/Zend/EventManager/SharedEventAggregateAwareInterface.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-eventmanager/Zend/EventManager/SharedEventManager.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-eventmanager/Zend/EventManager/SharedEventManagerAwareInterface.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-eventmanager/Zend/EventManager/SharedEventManagerInterface.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-eventmanager/Zend/EventManager/SharedListenerAggregateInterface.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-eventmanager/Zend/EventManager/StaticEventManager.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-json/Zend/Json/Decoder.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
@@ -18,7 +18,6 @@ use Zend\Json\Exception\RuntimeException;
|
|
18 |
*/
|
19 |
class Decoder
|
20 |
{
|
21 |
-
|
22 |
/**
|
23 |
* Parse tokens used to decode the JSON object. These are not
|
24 |
* for public consumption, they are just used internally to the
|
@@ -266,7 +265,7 @@ class Decoder
|
|
266 |
throw new RuntimeException('Missing ":" in object encoding: ' . $this->source);
|
267 |
}
|
268 |
|
269 |
-
$
|
270 |
$members[$key] = $this->_decodeValue();
|
271 |
$tok = $this->token;
|
272 |
|
@@ -335,25 +334,17 @@ class Decoder
|
|
335 |
return $result;
|
336 |
}
|
337 |
|
338 |
-
|
339 |
/**
|
340 |
* Removes whitespace characters from the source input
|
341 |
*/
|
342 |
protected function _eatWhitespace()
|
343 |
{
|
344 |
-
if (preg_match(
|
345 |
-
|
346 |
-
$this->source,
|
347 |
-
$matches,
|
348 |
-
PREG_OFFSET_CAPTURE,
|
349 |
-
$this->offset)
|
350 |
-
&& $matches[0][1] == $this->offset)
|
351 |
-
{
|
352 |
$this->offset += strlen($matches[0][0]);
|
353 |
}
|
354 |
}
|
355 |
|
356 |
-
|
357 |
/**
|
358 |
* Retrieves the next token from the source stream
|
359 |
*
|
@@ -377,8 +368,8 @@ class Decoder
|
|
377 |
|
378 |
switch ($str{$i}) {
|
379 |
case '{':
|
380 |
-
|
381 |
-
|
382 |
case '}':
|
383 |
$this->token = self::RBRACE;
|
384 |
break;
|
@@ -394,7 +385,7 @@ class Decoder
|
|
394 |
case ':':
|
395 |
$this->token = self::COLON;
|
396 |
break;
|
397 |
-
case
|
398 |
$result = '';
|
399 |
do {
|
400 |
$i++;
|
@@ -411,31 +402,31 @@ class Decoder
|
|
411 |
}
|
412 |
$chr = $str{$i};
|
413 |
switch ($chr) {
|
414 |
-
case '"'
|
415 |
$result .= '"';
|
416 |
break;
|
417 |
case '\\':
|
418 |
$result .= '\\';
|
419 |
break;
|
420 |
-
case '/'
|
421 |
$result .= '/';
|
422 |
break;
|
423 |
-
case 'b'
|
424 |
$result .= "\x08";
|
425 |
break;
|
426 |
-
case 'f'
|
427 |
$result .= "\x0c";
|
428 |
break;
|
429 |
-
case 'n'
|
430 |
$result .= "\x0a";
|
431 |
break;
|
432 |
-
case 'r'
|
433 |
$result .= "\x0d";
|
434 |
break;
|
435 |
-
case 't'
|
436 |
$result .= "\x09";
|
437 |
break;
|
438 |
-
case '\''
|
439 |
$result .= '\'';
|
440 |
break;
|
441 |
default:
|
@@ -470,7 +461,7 @@ class Decoder
|
|
470 |
if (($i+ 3) < $strLength && substr($str, $start, 4) == "null") {
|
471 |
$this->token = self::DATUM;
|
472 |
}
|
473 |
-
$this->tokenValue =
|
474 |
$i += 3;
|
475 |
break;
|
476 |
}
|
@@ -482,9 +473,7 @@ class Decoder
|
|
482 |
|
483 |
$chr = $str{$i};
|
484 |
if ($chr == '-' || $chr == '.' || ($chr >= '0' && $chr <= '9')) {
|
485 |
-
if (preg_match('/-?([0-9])*(\.[0-9]*)?((e|E)((-|\+)?)[0-9]+)?/s',
|
486 |
-
$str, $matches, PREG_OFFSET_CAPTURE, $start) && $matches[0][1] == $start) {
|
487 |
-
|
488 |
$datum = $matches[0][0];
|
489 |
|
490 |
if (is_numeric($datum)) {
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
18 |
*/
|
19 |
class Decoder
|
20 |
{
|
|
|
21 |
/**
|
22 |
* Parse tokens used to decode the JSON object. These are not
|
23 |
* for public consumption, they are just used internally to the
|
265 |
throw new RuntimeException('Missing ":" in object encoding: ' . $this->source);
|
266 |
}
|
267 |
|
268 |
+
$this->_getNextToken();
|
269 |
$members[$key] = $this->_decodeValue();
|
270 |
$tok = $this->token;
|
271 |
|
334 |
return $result;
|
335 |
}
|
336 |
|
|
|
337 |
/**
|
338 |
* Removes whitespace characters from the source input
|
339 |
*/
|
340 |
protected function _eatWhitespace()
|
341 |
{
|
342 |
+
if (preg_match('/([\t\b\f\n\r ])*/s', $this->source, $matches, PREG_OFFSET_CAPTURE, $this->offset)
|
343 |
+
&& $matches[0][1] == $this->offset) {
|
|
|
|
|
|
|
|
|
|
|
|
|
344 |
$this->offset += strlen($matches[0][0]);
|
345 |
}
|
346 |
}
|
347 |
|
|
|
348 |
/**
|
349 |
* Retrieves the next token from the source stream
|
350 |
*
|
368 |
|
369 |
switch ($str{$i}) {
|
370 |
case '{':
|
371 |
+
$this->token = self::LBRACE;
|
372 |
+
break;
|
373 |
case '}':
|
374 |
$this->token = self::RBRACE;
|
375 |
break;
|
385 |
case ':':
|
386 |
$this->token = self::COLON;
|
387 |
break;
|
388 |
+
case '"':
|
389 |
$result = '';
|
390 |
do {
|
391 |
$i++;
|
402 |
}
|
403 |
$chr = $str{$i};
|
404 |
switch ($chr) {
|
405 |
+
case '"':
|
406 |
$result .= '"';
|
407 |
break;
|
408 |
case '\\':
|
409 |
$result .= '\\';
|
410 |
break;
|
411 |
+
case '/':
|
412 |
$result .= '/';
|
413 |
break;
|
414 |
+
case 'b':
|
415 |
$result .= "\x08";
|
416 |
break;
|
417 |
+
case 'f':
|
418 |
$result .= "\x0c";
|
419 |
break;
|
420 |
+
case 'n':
|
421 |
$result .= "\x0a";
|
422 |
break;
|
423 |
+
case 'r':
|
424 |
$result .= "\x0d";
|
425 |
break;
|
426 |
+
case 't':
|
427 |
$result .= "\x09";
|
428 |
break;
|
429 |
+
case '\'':
|
430 |
$result .= '\'';
|
431 |
break;
|
432 |
default:
|
461 |
if (($i+ 3) < $strLength && substr($str, $start, 4) == "null") {
|
462 |
$this->token = self::DATUM;
|
463 |
}
|
464 |
+
$this->tokenValue = null;
|
465 |
$i += 3;
|
466 |
break;
|
467 |
}
|
473 |
|
474 |
$chr = $str{$i};
|
475 |
if ($chr == '-' || $chr == '.' || ($chr >= '0' && $chr <= '9')) {
|
476 |
+
if (preg_match('/-?([0-9])*(\.[0-9]*)?((e|E)((-|\+)?)[0-9]+)?/s', $str, $matches, PREG_OFFSET_CAPTURE, $start) && $matches[0][1] == $start) {
|
|
|
|
|
477 |
$datum = $matches[0][0];
|
478 |
|
479 |
if (is_numeric($datum)) {
|
backend/vendor/zendframework/zend-json/Zend/Json/Encoder.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
@@ -95,7 +95,6 @@ class Encoder
|
|
95 |
return $this->_encodeDatum($value);
|
96 |
}
|
97 |
|
98 |
-
|
99 |
/**
|
100 |
* Encode an object to JSON by encoding each of the public properties
|
101 |
*
|
@@ -112,12 +111,9 @@ class Encoder
|
|
112 |
{
|
113 |
if ($this->cycleCheck) {
|
114 |
if ($this->_wasVisited($value)) {
|
115 |
-
|
116 |
if (isset($this->options['silenceCyclicalExceptions'])
|
117 |
&& $this->options['silenceCyclicalExceptions']===true) {
|
118 |
-
|
119 |
return '"* RECURSION (' . str_replace('\\', '\\\\', get_class($value)) . ') *"';
|
120 |
-
|
121 |
} else {
|
122 |
throw new RecursionException(
|
123 |
'Cycles not supported in JSON encoding, cycle introduced by '
|
@@ -132,7 +128,7 @@ class Encoder
|
|
132 |
$props = '';
|
133 |
|
134 |
if (method_exists($value, 'toJson')) {
|
135 |
-
$props =',' . preg_replace("/^\{(.*)\}$/","\\1", $value->toJson());
|
136 |
} else {
|
137 |
if ($value instanceof IteratorAggregate) {
|
138 |
$propCollection = $value->getIterator();
|
@@ -158,7 +154,6 @@ class Encoder
|
|
158 |
. $props . '}';
|
159 |
}
|
160 |
|
161 |
-
|
162 |
/**
|
163 |
* Determine if an object has been serialized already
|
164 |
*
|
@@ -174,7 +169,6 @@ class Encoder
|
|
174 |
return false;
|
175 |
}
|
176 |
|
177 |
-
|
178 |
/**
|
179 |
* JSON encode an array value
|
180 |
*
|
@@ -218,7 +212,6 @@ class Encoder
|
|
218 |
return $result;
|
219 |
}
|
220 |
|
221 |
-
|
222 |
/**
|
223 |
* JSON encode a basic data type (string, number, boolean, null)
|
224 |
*
|
@@ -244,7 +237,6 @@ class Encoder
|
|
244 |
return $result;
|
245 |
}
|
246 |
|
247 |
-
|
248 |
/**
|
249 |
* JSON encode a string value by escaping characters as necessary
|
250 |
*
|
@@ -268,7 +260,6 @@ class Encoder
|
|
268 |
return '"' . $string . '"';
|
269 |
}
|
270 |
|
271 |
-
|
272 |
/**
|
273 |
* Encode the constants associated with the ReflectionClass
|
274 |
* parameter. The encoding format is based on the class2 format
|
@@ -293,7 +284,6 @@ class Encoder
|
|
293 |
return $result . "}";
|
294 |
}
|
295 |
|
296 |
-
|
297 |
/**
|
298 |
* Encode the public methods of the ReflectionClass in the
|
299 |
* class2 format
|
@@ -356,7 +346,6 @@ class Encoder
|
|
356 |
return $result . "}";
|
357 |
}
|
358 |
|
359 |
-
|
360 |
/**
|
361 |
* Encode the public properties of the ReflectionClass in the class2
|
362 |
* format.
|
@@ -370,7 +359,6 @@ class Encoder
|
|
370 |
$properties = $cls->getProperties();
|
371 |
$propValues = get_class_vars($cls->getName());
|
372 |
$result = "variables:{";
|
373 |
-
$cnt = 0;
|
374 |
|
375 |
$tmpArray = array();
|
376 |
foreach ($properties as $prop) {
|
@@ -413,7 +401,6 @@ class Encoder
|
|
413 |
. self::_encodeVariables($cls) .'});';
|
414 |
}
|
415 |
|
416 |
-
|
417 |
/**
|
418 |
* Encode several classes at once
|
419 |
*
|
@@ -474,9 +461,12 @@ class Encoder
|
|
474 |
case (($ordVarC & 0xF0) == 0xE0):
|
475 |
// characters U-00000800 - U-0000FFFF, mask 1110XXXX
|
476 |
// see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
477 |
-
$char = pack(
|
478 |
-
|
479 |
-
|
|
|
|
|
|
|
480 |
$i += 2;
|
481 |
$utf16 = self::_utf82utf16($char);
|
482 |
$ascii .= sprintf('\u%04s', bin2hex($utf16));
|
@@ -485,10 +475,13 @@ class Encoder
|
|
485 |
case (($ordVarC & 0xF8) == 0xF0):
|
486 |
// characters U-00010000 - U-001FFFFF, mask 11110XXX
|
487 |
// see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
488 |
-
$char = pack(
|
489 |
-
|
490 |
-
|
491 |
-
|
|
|
|
|
|
|
492 |
$i += 3;
|
493 |
$utf16 = self::_utf82utf16($char);
|
494 |
$ascii .= sprintf('\u%04s', bin2hex($utf16));
|
@@ -497,11 +490,14 @@ class Encoder
|
|
497 |
case (($ordVarC & 0xFC) == 0xF8):
|
498 |
// characters U-00200000 - U-03FFFFFF, mask 111110XX
|
499 |
// see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
500 |
-
$char = pack(
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
|
|
|
|
|
|
505 |
$i += 4;
|
506 |
$utf16 = self::_utf82utf16($char);
|
507 |
$ascii .= sprintf('\u%04s', bin2hex($utf16));
|
@@ -510,12 +506,15 @@ class Encoder
|
|
510 |
case (($ordVarC & 0xFE) == 0xFC):
|
511 |
// characters U-04000000 - U-7FFFFFFF, mask 1111110X
|
512 |
// see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
513 |
-
$char = pack(
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
|
|
|
|
|
|
519 |
$i += 5;
|
520 |
$utf16 = self::_utf82utf16($char);
|
521 |
$ascii .= sprintf('\u%04s', bin2hex($utf16));
|
@@ -524,7 +523,7 @@ class Encoder
|
|
524 |
}
|
525 |
|
526 |
return $ascii;
|
527 |
-
|
528 |
|
529 |
/**
|
530 |
* Convert a string from one UTF-8 char to one UTF-16 char.
|
@@ -555,17 +554,12 @@ class Encoder
|
|
555 |
case 2:
|
556 |
// return a UTF-16 character from a 2-byte UTF-8 char
|
557 |
// see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
558 |
-
return chr(0x07 & (ord($utf8{0}) >> 2))
|
559 |
-
. chr((0xC0 & (ord($utf8{0}) << 6))
|
560 |
-
| (0x3F & ord($utf8{1})));
|
561 |
|
562 |
case 3:
|
563 |
// return a UTF-16 character from a 3-byte UTF-8 char
|
564 |
// see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
565 |
-
return chr((0xF0 & (ord($utf8{0}) << 4))
|
566 |
-
| (0x0F & (ord($utf8{1}) >> 2)))
|
567 |
-
. chr((0xC0 & (ord($utf8{1}) << 6))
|
568 |
-
| (0x7F & ord($utf8{2})));
|
569 |
}
|
570 |
|
571 |
// ignoring UTF-32 for now, sorry
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
95 |
return $this->_encodeDatum($value);
|
96 |
}
|
97 |
|
|
|
98 |
/**
|
99 |
* Encode an object to JSON by encoding each of the public properties
|
100 |
*
|
111 |
{
|
112 |
if ($this->cycleCheck) {
|
113 |
if ($this->_wasVisited($value)) {
|
|
|
114 |
if (isset($this->options['silenceCyclicalExceptions'])
|
115 |
&& $this->options['silenceCyclicalExceptions']===true) {
|
|
|
116 |
return '"* RECURSION (' . str_replace('\\', '\\\\', get_class($value)) . ') *"';
|
|
|
117 |
} else {
|
118 |
throw new RecursionException(
|
119 |
'Cycles not supported in JSON encoding, cycle introduced by '
|
128 |
$props = '';
|
129 |
|
130 |
if (method_exists($value, 'toJson')) {
|
131 |
+
$props = ',' . preg_replace("/^\{(.*)\}$/", "\\1", $value->toJson());
|
132 |
} else {
|
133 |
if ($value instanceof IteratorAggregate) {
|
134 |
$propCollection = $value->getIterator();
|
154 |
. $props . '}';
|
155 |
}
|
156 |
|
|
|
157 |
/**
|
158 |
* Determine if an object has been serialized already
|
159 |
*
|
169 |
return false;
|
170 |
}
|
171 |
|
|
|
172 |
/**
|
173 |
* JSON encode an array value
|
174 |
*
|
212 |
return $result;
|
213 |
}
|
214 |
|
|
|
215 |
/**
|
216 |
* JSON encode a basic data type (string, number, boolean, null)
|
217 |
*
|
237 |
return $result;
|
238 |
}
|
239 |
|
|
|
240 |
/**
|
241 |
* JSON encode a string value by escaping characters as necessary
|
242 |
*
|
260 |
return '"' . $string . '"';
|
261 |
}
|
262 |
|
|
|
263 |
/**
|
264 |
* Encode the constants associated with the ReflectionClass
|
265 |
* parameter. The encoding format is based on the class2 format
|
284 |
return $result . "}";
|
285 |
}
|
286 |
|
|
|
287 |
/**
|
288 |
* Encode the public methods of the ReflectionClass in the
|
289 |
* class2 format
|
346 |
return $result . "}";
|
347 |
}
|
348 |
|
|
|
349 |
/**
|
350 |
* Encode the public properties of the ReflectionClass in the class2
|
351 |
* format.
|
359 |
$properties = $cls->getProperties();
|
360 |
$propValues = get_class_vars($cls->getName());
|
361 |
$result = "variables:{";
|
|
|
362 |
|
363 |
$tmpArray = array();
|
364 |
foreach ($properties as $prop) {
|
401 |
. self::_encodeVariables($cls) .'});';
|
402 |
}
|
403 |
|
|
|
404 |
/**
|
405 |
* Encode several classes at once
|
406 |
*
|
461 |
case (($ordVarC & 0xF0) == 0xE0):
|
462 |
// characters U-00000800 - U-0000FFFF, mask 1110XXXX
|
463 |
// see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
464 |
+
$char = pack(
|
465 |
+
'C*',
|
466 |
+
$ordVarC,
|
467 |
+
ord($value[$i + 1]),
|
468 |
+
ord($value[$i + 2])
|
469 |
+
);
|
470 |
$i += 2;
|
471 |
$utf16 = self::_utf82utf16($char);
|
472 |
$ascii .= sprintf('\u%04s', bin2hex($utf16));
|
475 |
case (($ordVarC & 0xF8) == 0xF0):
|
476 |
// characters U-00010000 - U-001FFFFF, mask 11110XXX
|
477 |
// see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
478 |
+
$char = pack(
|
479 |
+
'C*',
|
480 |
+
$ordVarC,
|
481 |
+
ord($value[$i + 1]),
|
482 |
+
ord($value[$i + 2]),
|
483 |
+
ord($value[$i + 3])
|
484 |
+
);
|
485 |
$i += 3;
|
486 |
$utf16 = self::_utf82utf16($char);
|
487 |
$ascii .= sprintf('\u%04s', bin2hex($utf16));
|
490 |
case (($ordVarC & 0xFC) == 0xF8):
|
491 |
// characters U-00200000 - U-03FFFFFF, mask 111110XX
|
492 |
// see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
493 |
+
$char = pack(
|
494 |
+
'C*',
|
495 |
+
$ordVarC,
|
496 |
+
ord($value[$i + 1]),
|
497 |
+
ord($value[$i + 2]),
|
498 |
+
ord($value[$i + 3]),
|
499 |
+
ord($value[$i + 4])
|
500 |
+
);
|
501 |
$i += 4;
|
502 |
$utf16 = self::_utf82utf16($char);
|
503 |
$ascii .= sprintf('\u%04s', bin2hex($utf16));
|
506 |
case (($ordVarC & 0xFE) == 0xFC):
|
507 |
// characters U-04000000 - U-7FFFFFFF, mask 1111110X
|
508 |
// see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
509 |
+
$char = pack(
|
510 |
+
'C*',
|
511 |
+
$ordVarC,
|
512 |
+
ord($value[$i + 1]),
|
513 |
+
ord($value[$i + 2]),
|
514 |
+
ord($value[$i + 3]),
|
515 |
+
ord($value[$i + 4]),
|
516 |
+
ord($value[$i + 5])
|
517 |
+
);
|
518 |
$i += 5;
|
519 |
$utf16 = self::_utf82utf16($char);
|
520 |
$ascii .= sprintf('\u%04s', bin2hex($utf16));
|
523 |
}
|
524 |
|
525 |
return $ascii;
|
526 |
+
}
|
527 |
|
528 |
/**
|
529 |
* Convert a string from one UTF-8 char to one UTF-16 char.
|
554 |
case 2:
|
555 |
// return a UTF-16 character from a 2-byte UTF-8 char
|
556 |
// see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
557 |
+
return chr(0x07 & (ord($utf8{0}) >> 2)) . chr((0xC0 & (ord($utf8{0}) << 6)) | (0x3F & ord($utf8{1})));
|
|
|
|
|
558 |
|
559 |
case 3:
|
560 |
// return a UTF-16 character from a 3-byte UTF-8 char
|
561 |
// see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
562 |
+
return chr((0xF0 & (ord($utf8{0}) << 4)) | (0x0F & (ord($utf8{1}) >> 2))) . chr((0xC0 & (ord($utf8{1}) << 6)) | (0x7F & ord($utf8{2})));
|
|
|
|
|
|
|
563 |
}
|
564 |
|
565 |
// ignoring UTF-32 for now, sorry
|
backend/vendor/zendframework/zend-json/Zend/Json/Exception/BadMethodCallException.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
@@ -11,4 +11,5 @@ namespace Zend\Json\Exception;
|
|
11 |
|
12 |
class BadMethodCallException extends \BadMethodCallException implements
|
13 |
ExceptionInterface
|
14 |
-
{
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
11 |
|
12 |
class BadMethodCallException extends \BadMethodCallException implements
|
13 |
ExceptionInterface
|
14 |
+
{
|
15 |
+
}
|
backend/vendor/zendframework/zend-json/Zend/Json/Exception/ExceptionInterface.php
CHANGED
@@ -3,11 +3,12 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
10 |
namespace Zend\Json\Exception;
|
11 |
|
12 |
interface ExceptionInterface
|
13 |
-
{
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
10 |
namespace Zend\Json\Exception;
|
11 |
|
12 |
interface ExceptionInterface
|
13 |
+
{
|
14 |
+
}
|
backend/vendor/zendframework/zend-json/Zend/Json/Exception/InvalidArgumentException.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
@@ -11,4 +11,5 @@ namespace Zend\Json\Exception;
|
|
11 |
|
12 |
class InvalidArgumentException extends \InvalidArgumentException implements
|
13 |
ExceptionInterface
|
14 |
-
{
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
11 |
|
12 |
class InvalidArgumentException extends \InvalidArgumentException implements
|
13 |
ExceptionInterface
|
14 |
+
{
|
15 |
+
}
|
backend/vendor/zendframework/zend-json/Zend/Json/Exception/RecursionException.php
CHANGED
@@ -3,11 +3,12 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
10 |
namespace Zend\Json\Exception;
|
11 |
|
12 |
class RecursionException extends RuntimeException
|
13 |
-
{
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
10 |
namespace Zend\Json\Exception;
|
11 |
|
12 |
class RecursionException extends RuntimeException
|
13 |
+
{
|
14 |
+
}
|
backend/vendor/zendframework/zend-json/Zend/Json/Exception/RuntimeException.php
CHANGED
@@ -3,11 +3,12 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
10 |
namespace Zend\Json\Exception;
|
11 |
|
12 |
class RuntimeException extends \RuntimeException implements ExceptionInterface
|
13 |
-
{
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
10 |
namespace Zend\Json\Exception;
|
11 |
|
12 |
class RuntimeException extends \RuntimeException implements ExceptionInterface
|
13 |
+
{
|
14 |
+
}
|
backend/vendor/zendframework/zend-json/Zend/Json/Expr.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-json/Zend/Json/Json.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
@@ -160,9 +160,11 @@ class Json
|
|
160 |
* @return mixed
|
161 |
*/
|
162 |
protected static function _recursiveJsonExprFinder(
|
163 |
-
&$value,
|
|
|
|
|
164 |
) {
|
165 |
-
|
166 |
// TODO: Optimize with ascii keys, if performance is bad
|
167 |
$magicKey = "____" . $currentKey . "_" . (count($javascriptExpressions));
|
168 |
$javascriptExpressions[] = array(
|
@@ -285,6 +287,7 @@ class Json
|
|
285 |
}
|
286 |
|
287 |
/**
|
|
|
288 |
* fromXml - Converts XML to JSON
|
289 |
*
|
290 |
* Converts a XML formatted string into a JSON formatted string.
|
@@ -352,7 +355,9 @@ class Json
|
|
352 |
|
353 |
$inLiteral = false;
|
354 |
foreach ($tokens as $token) {
|
355 |
-
if ($token == "")
|
|
|
|
|
356 |
|
357 |
$prefix = str_repeat($ind, $indent);
|
358 |
if (!$inLiteral && ($token == "{" || $token == "[")) {
|
@@ -381,5 +386,5 @@ class Json
|
|
381 |
}
|
382 |
}
|
383 |
return $result;
|
384 |
-
|
385 |
}
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
160 |
* @return mixed
|
161 |
*/
|
162 |
protected static function _recursiveJsonExprFinder(
|
163 |
+
&$value,
|
164 |
+
array &$javascriptExpressions,
|
165 |
+
$currentKey = null
|
166 |
) {
|
167 |
+
if ($value instanceof Expr) {
|
168 |
// TODO: Optimize with ascii keys, if performance is bad
|
169 |
$magicKey = "____" . $currentKey . "_" . (count($javascriptExpressions));
|
170 |
$javascriptExpressions[] = array(
|
287 |
}
|
288 |
|
289 |
/**
|
290 |
+
* @deprecated by https://github.com/zendframework/zf2/pull/6778
|
291 |
* fromXml - Converts XML to JSON
|
292 |
*
|
293 |
* Converts a XML formatted string into a JSON formatted string.
|
355 |
|
356 |
$inLiteral = false;
|
357 |
foreach ($tokens as $token) {
|
358 |
+
if ($token == "") {
|
359 |
+
continue;
|
360 |
+
}
|
361 |
|
362 |
$prefix = str_repeat($ind, $indent);
|
363 |
if (!$inLiteral && ($token == "{" || $token == "[")) {
|
386 |
}
|
387 |
}
|
388 |
return $result;
|
389 |
+
}
|
390 |
}
|
backend/vendor/zendframework/zend-json/Zend/Json/Server/Cache.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
@@ -28,9 +28,7 @@ class Cache extends ServerCache
|
|
28 |
*/
|
29 |
public static function saveSmd($filename, Server $server)
|
30 |
{
|
31 |
-
if (!is_string($filename)
|
32 |
-
|| (!file_exists($filename) && !is_writable(dirname($filename))))
|
33 |
-
{
|
34 |
return false;
|
35 |
}
|
36 |
|
@@ -56,10 +54,7 @@ class Cache extends ServerCache
|
|
56 |
*/
|
57 |
public static function getSmd($filename)
|
58 |
{
|
59 |
-
if (!is_string($filename)
|
60 |
-
|| !file_exists($filename)
|
61 |
-
|| !is_readable($filename))
|
62 |
-
{
|
63 |
return false;
|
64 |
}
|
65 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
28 |
*/
|
29 |
public static function saveSmd($filename, Server $server)
|
30 |
{
|
31 |
+
if (!is_string($filename) || (!file_exists($filename) && !is_writable(dirname($filename)))) {
|
|
|
|
|
32 |
return false;
|
33 |
}
|
34 |
|
54 |
*/
|
55 |
public static function getSmd($filename)
|
56 |
{
|
57 |
+
if (!is_string($filename) || !file_exists($filename) || !is_readable($filename)) {
|
|
|
|
|
|
|
58 |
return false;
|
59 |
}
|
60 |
|
backend/vendor/zendframework/zend-json/Zend/Json/Server/Client.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-json/Zend/Json/Server/Error.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-json/Zend/Json/Server/Exception/ErrorException.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
@@ -16,4 +16,5 @@ use Zend\Json\Exception;
|
|
16 |
*/
|
17 |
class ErrorException extends Exception\BadMethodCallException implements
|
18 |
ExceptionInterface
|
19 |
-
{
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
16 |
*/
|
17 |
class ErrorException extends Exception\BadMethodCallException implements
|
18 |
ExceptionInterface
|
19 |
+
{
|
20 |
+
}
|
backend/vendor/zendframework/zend-json/Zend/Json/Server/Exception/ExceptionInterface.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
@@ -12,4 +12,5 @@ namespace Zend\Json\Server\Exception;
|
|
12 |
use Zend\Json\Exception\ExceptionInterface as Exception;
|
13 |
|
14 |
interface ExceptionInterface extends Exception
|
15 |
-
{
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
12 |
use Zend\Json\Exception\ExceptionInterface as Exception;
|
13 |
|
14 |
interface ExceptionInterface extends Exception
|
15 |
+
{
|
16 |
+
}
|
backend/vendor/zendframework/zend-json/Zend/Json/Server/Exception/HttpException.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
@@ -14,4 +14,5 @@ namespace Zend\Json\Server\Exception;
|
|
14 |
* JSON-RPC method call.
|
15 |
*/
|
16 |
class HttpException extends RuntimeException
|
17 |
-
{
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
14 |
* JSON-RPC method call.
|
15 |
*/
|
16 |
class HttpException extends RuntimeException
|
17 |
+
{
|
18 |
+
}
|
backend/vendor/zendframework/zend-json/Zend/Json/Server/Exception/InvalidArgumentException.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
@@ -13,4 +13,5 @@ use Zend\Json\Exception;
|
|
13 |
|
14 |
class InvalidArgumentException extends Exception\InvalidArgumentException implements
|
15 |
ExceptionInterface
|
16 |
-
{
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
13 |
|
14 |
class InvalidArgumentException extends Exception\InvalidArgumentException implements
|
15 |
ExceptionInterface
|
16 |
+
{
|
17 |
+
}
|
backend/vendor/zendframework/zend-json/Zend/Json/Server/Exception/RuntimeException.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
@@ -13,4 +13,5 @@ use Zend\Json\Exception;
|
|
13 |
|
14 |
class RuntimeException extends Exception\RuntimeException implements
|
15 |
ExceptionInterface
|
16 |
-
{
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
13 |
|
14 |
class RuntimeException extends Exception\RuntimeException implements
|
15 |
ExceptionInterface
|
16 |
+
{
|
17 |
+
}
|
backend/vendor/zendframework/zend-json/Zend/Json/Server/Request.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
@@ -253,7 +253,7 @@ class Request
|
|
253 |
try {
|
254 |
$options = Json\Json::decode($json, Json\Json::TYPE_ARRAY);
|
255 |
$this->setOptions($options);
|
256 |
-
} catch(\Exception $e) {
|
257 |
$this->isParseError = true;
|
258 |
}
|
259 |
}
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
253 |
try {
|
254 |
$options = Json\Json::decode($json, Json\Json::TYPE_ARRAY);
|
255 |
$this->setOptions($options);
|
256 |
+
} catch (\Exception $e) {
|
257 |
$this->isParseError = true;
|
258 |
}
|
259 |
}
|
backend/vendor/zendframework/zend-json/Zend/Json/Server/Request/Http.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-json/Zend/Json/Server/Response.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-json/Zend/Json/Server/Response/Http.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-json/Zend/Json/Server/Server.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
@@ -534,7 +534,6 @@ class Server extends AbstractServer
|
|
534 |
if ('function' == $callback->getType()) {
|
535 |
$reflection = new ReflectionFunction($callback->getFunction());
|
536 |
} else {
|
537 |
-
|
538 |
$reflection = new ReflectionMethod(
|
539 |
$callback->getClass(),
|
540 |
$callback->getMethod()
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
534 |
if ('function' == $callback->getType()) {
|
535 |
$reflection = new ReflectionFunction($callback->getFunction());
|
536 |
} else {
|
|
|
537 |
$reflection = new ReflectionMethod(
|
538 |
$callback->getClass(),
|
539 |
$callback->getMethod()
|
backend/vendor/zendframework/zend-json/Zend/Json/Server/Smd.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-json/Zend/Json/Server/Smd/Service.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-json/Zend/Json/composer.json
CHANGED
@@ -23,7 +23,8 @@
|
|
23 |
},
|
24 |
"suggest": {
|
25 |
"zendframework/zend-http": "Zend\\Http component",
|
26 |
-
"zendframework/zend-server": "Zend\\Server component"
|
|
|
27 |
},
|
28 |
"extra": {
|
29 |
"branch-alias": {
|
23 |
},
|
24 |
"suggest": {
|
25 |
"zendframework/zend-http": "Zend\\Http component",
|
26 |
+
"zendframework/zend-server": "Zend\\Server component",
|
27 |
+
"zendframework/zendxml": "To support Zend\\Json\\Json::fromXml() usage"
|
28 |
},
|
29 |
"extra": {
|
30 |
"branch-alias": {
|
backend/vendor/zendframework/zend-math/Zend/Math/BigInteger/Adapter/AdapterInterface.php
ADDED
@@ -0,0 +1,147 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Zend Framework (http://framework.zend.com/)
|
4 |
+
*
|
5 |
+
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
+
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
+
*/
|
9 |
+
|
10 |
+
namespace Zend\Math\BigInteger\Adapter;
|
11 |
+
|
12 |
+
interface AdapterInterface
|
13 |
+
{
|
14 |
+
/**
|
15 |
+
* Base62 alphabet for arbitrary base conversion
|
16 |
+
*/
|
17 |
+
const BASE62_ALPHABET = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Create adapter-specific representation of a big integer
|
21 |
+
*
|
22 |
+
* @param string $operand
|
23 |
+
* @param int|null $base
|
24 |
+
* @return mixed
|
25 |
+
*/
|
26 |
+
public function init($operand, $base = null);
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Add two big integers
|
30 |
+
*
|
31 |
+
* @param string $leftOperand
|
32 |
+
* @param string $rightOperand
|
33 |
+
* @return string
|
34 |
+
*/
|
35 |
+
public function add($leftOperand, $rightOperand);
|
36 |
+
|
37 |
+
/**
|
38 |
+
* Subtract two big integers
|
39 |
+
*
|
40 |
+
* @param string $leftOperand
|
41 |
+
* @param string $rightOperand
|
42 |
+
* @return string
|
43 |
+
*/
|
44 |
+
public function sub($leftOperand, $rightOperand);
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Multiply two big integers
|
48 |
+
*
|
49 |
+
* @param string $leftOperand
|
50 |
+
* @param string $rightOperand
|
51 |
+
* @return string
|
52 |
+
*/
|
53 |
+
public function mul($leftOperand, $rightOperand);
|
54 |
+
|
55 |
+
/**
|
56 |
+
* Divide two big integers
|
57 |
+
* (this method returns only int part of result)
|
58 |
+
*
|
59 |
+
* @param string $leftOperand
|
60 |
+
* @param string $rightOperand
|
61 |
+
* @return string
|
62 |
+
*/
|
63 |
+
public function div($leftOperand, $rightOperand);
|
64 |
+
|
65 |
+
/**
|
66 |
+
* Raise a big integers to another
|
67 |
+
*
|
68 |
+
* @param string $operand
|
69 |
+
* @param string $exp
|
70 |
+
* @return string
|
71 |
+
*/
|
72 |
+
public function pow($operand, $exp);
|
73 |
+
|
74 |
+
/**
|
75 |
+
* Get the square root of a big integer
|
76 |
+
*
|
77 |
+
* @param string $operand
|
78 |
+
* @return string
|
79 |
+
*/
|
80 |
+
public function sqrt($operand);
|
81 |
+
|
82 |
+
/**
|
83 |
+
* Get absolute value of a big integer
|
84 |
+
*
|
85 |
+
* @param string $operand
|
86 |
+
* @return string
|
87 |
+
*/
|
88 |
+
public function abs($operand);
|
89 |
+
|
90 |
+
/**
|
91 |
+
* Get modulus of a big integer
|
92 |
+
*
|
93 |
+
* @param string $leftOperand
|
94 |
+
* @param string $modulus
|
95 |
+
* @return string
|
96 |
+
*/
|
97 |
+
public function mod($leftOperand, $modulus);
|
98 |
+
|
99 |
+
/**
|
100 |
+
* Raise a big integer to another, reduced by a specified modulus
|
101 |
+
*
|
102 |
+
* @param string $leftOperand
|
103 |
+
* @param string $rightOperand
|
104 |
+
* @param string $modulus
|
105 |
+
* @return string
|
106 |
+
*/
|
107 |
+
public function powmod($leftOperand, $rightOperand, $modulus);
|
108 |
+
|
109 |
+
/**
|
110 |
+
* Compare two big integers
|
111 |
+
* Returns < 0 if leftOperand is less than rightOperand;
|
112 |
+
* > 0 if leftOperand is greater than rightOperand, and 0 if they are equal.
|
113 |
+
*
|
114 |
+
* @param string $leftOperand
|
115 |
+
* @param string $rightOperand
|
116 |
+
* @return int
|
117 |
+
*/
|
118 |
+
public function comp($leftOperand, $rightOperand);
|
119 |
+
|
120 |
+
/**
|
121 |
+
* Convert big integer into it's binary number representation
|
122 |
+
*
|
123 |
+
* @param string $int
|
124 |
+
* @param bool $twoc
|
125 |
+
* @return string
|
126 |
+
*/
|
127 |
+
public function intToBin($int, $twoc = false);
|
128 |
+
|
129 |
+
/**
|
130 |
+
* Convert binary number into big integer
|
131 |
+
*
|
132 |
+
* @param string $bytes
|
133 |
+
* @param bool $twoc
|
134 |
+
* @return string
|
135 |
+
*/
|
136 |
+
public function binToInt($bytes, $twoc = false);
|
137 |
+
|
138 |
+
/**
|
139 |
+
* Convert a number between arbitrary bases
|
140 |
+
*
|
141 |
+
* @param string $operand
|
142 |
+
* @param int $fromBase
|
143 |
+
* @param int $toBase
|
144 |
+
* @return string
|
145 |
+
*/
|
146 |
+
public function baseConvert($operand, $fromBase, $toBase = 10);
|
147 |
+
}
|
backend/vendor/zendframework/zend-math/Zend/Math/BigInteger/Adapter/Bcmath.php
ADDED
@@ -0,0 +1,334 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Zend Framework (http://framework.zend.com/)
|
4 |
+
*
|
5 |
+
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
+
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
+
*/
|
9 |
+
|
10 |
+
namespace Zend\Math\BigInteger\Adapter;
|
11 |
+
|
12 |
+
use Zend\Math\BigInteger\Exception;
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Bcmath extension adapter
|
16 |
+
*/
|
17 |
+
class Bcmath implements AdapterInterface
|
18 |
+
{
|
19 |
+
/**
|
20 |
+
* Constructor
|
21 |
+
* Sets Bcmath scale factor to zero
|
22 |
+
*/
|
23 |
+
public function __construct()
|
24 |
+
{
|
25 |
+
bcscale(0);
|
26 |
+
}
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Create string representing big integer in decimal form from arbitrary integer format
|
30 |
+
*
|
31 |
+
* @param string $operand
|
32 |
+
* @param int|null $base
|
33 |
+
* @return bool|string
|
34 |
+
*/
|
35 |
+
public function init($operand, $base = null)
|
36 |
+
{
|
37 |
+
$sign = (strpos($operand, '-') === 0) ? '-' : '';
|
38 |
+
$operand = ltrim($operand, '-+');
|
39 |
+
|
40 |
+
if (null === $base) {
|
41 |
+
// decimal
|
42 |
+
if (preg_match('#^([1-9][0-9]*)$#', $operand, $m)) {
|
43 |
+
$base = 10;
|
44 |
+
$operand = $m[1];
|
45 |
+
// octal
|
46 |
+
} elseif (preg_match('#^(0[0-7]+)$#', $operand, $m)) {
|
47 |
+
$base = 8;
|
48 |
+
$operand = $m[1];
|
49 |
+
// hex
|
50 |
+
} elseif (preg_match('#^(?:0x)?([0-9a-f]+)$#', strtolower($operand), $m)) {
|
51 |
+
$base = 16;
|
52 |
+
$operand = $m[1];
|
53 |
+
// scientific notation
|
54 |
+
} elseif (preg_match('#^([1-9]?\.?[0-9]+)[eE]\+?([0-9]+)$#', $operand, $m)) {
|
55 |
+
$base = 10;
|
56 |
+
$operand = bcmul($m[1], bcpow('10', $m[2]));
|
57 |
+
} else {
|
58 |
+
return false;
|
59 |
+
}
|
60 |
+
}
|
61 |
+
|
62 |
+
if ($base != 10) {
|
63 |
+
$operand = $this->baseConvert($operand, $base, 10);
|
64 |
+
}
|
65 |
+
|
66 |
+
$prod = bcmul($operand, '1');
|
67 |
+
if (bccomp($operand, $prod) !== 0) {
|
68 |
+
return false;
|
69 |
+
}
|
70 |
+
|
71 |
+
return $sign . $operand;
|
72 |
+
}
|
73 |
+
|
74 |
+
/**
|
75 |
+
* Add two big integers
|
76 |
+
*
|
77 |
+
* @param string $leftOperand
|
78 |
+
* @param string $rightOperand
|
79 |
+
* @return string
|
80 |
+
*/
|
81 |
+
public function add($leftOperand, $rightOperand)
|
82 |
+
{
|
83 |
+
return bcadd($leftOperand, $rightOperand);
|
84 |
+
}
|
85 |
+
|
86 |
+
/**
|
87 |
+
* Subtract two big integers
|
88 |
+
*
|
89 |
+
* @param string $leftOperand
|
90 |
+
* @param string $rightOperand
|
91 |
+
* @return string
|
92 |
+
*/
|
93 |
+
public function sub($leftOperand, $rightOperand)
|
94 |
+
{
|
95 |
+
return bcsub($leftOperand, $rightOperand);
|
96 |
+
}
|
97 |
+
|
98 |
+
/**
|
99 |
+
* Multiply two big integers
|
100 |
+
*
|
101 |
+
* @param string $leftOperand
|
102 |
+
* @param string $rightOperand
|
103 |
+
* @return string
|
104 |
+
*/
|
105 |
+
public function mul($leftOperand, $rightOperand)
|
106 |
+
{
|
107 |
+
return bcmul($leftOperand, $rightOperand);
|
108 |
+
}
|
109 |
+
|
110 |
+
/**
|
111 |
+
* Divide two big integers and return integer part result.
|
112 |
+
* Raises exception if the divisor is zero.
|
113 |
+
*
|
114 |
+
* @param string $leftOperand
|
115 |
+
* @param string $rightOperand
|
116 |
+
* @return string
|
117 |
+
* @throws Exception\DivisionByZeroException
|
118 |
+
*/
|
119 |
+
public function div($leftOperand, $rightOperand)
|
120 |
+
{
|
121 |
+
if ($rightOperand == 0) {
|
122 |
+
throw new Exception\DivisionByZeroException(
|
123 |
+
"Division by zero; divisor = {$rightOperand}"
|
124 |
+
);
|
125 |
+
}
|
126 |
+
|
127 |
+
$result = bcdiv($leftOperand, $rightOperand);
|
128 |
+
|
129 |
+
return $result;
|
130 |
+
}
|
131 |
+
|
132 |
+
/**
|
133 |
+
* Raise a big integers to another
|
134 |
+
*
|
135 |
+
* @param string $operand
|
136 |
+
* @param string $exp
|
137 |
+
* @return string
|
138 |
+
*/
|
139 |
+
public function pow($operand, $exp)
|
140 |
+
{
|
141 |
+
return bcpow($operand, $exp);
|
142 |
+
}
|
143 |
+
|
144 |
+
/**
|
145 |
+
* Get the square root of a big integer
|
146 |
+
*
|
147 |
+
* @param string $operand
|
148 |
+
* @return string
|
149 |
+
*/
|
150 |
+
public function sqrt($operand)
|
151 |
+
{
|
152 |
+
return bcsqrt($operand);
|
153 |
+
}
|
154 |
+
|
155 |
+
/**
|
156 |
+
* Get absolute value of a big integer
|
157 |
+
*
|
158 |
+
* @param string $operand
|
159 |
+
* @return string
|
160 |
+
*/
|
161 |
+
public function abs($operand)
|
162 |
+
{
|
163 |
+
return ltrim($operand, '-');
|
164 |
+
}
|
165 |
+
|
166 |
+
/**
|
167 |
+
* Get modulus of a big integer
|
168 |
+
*
|
169 |
+
* @param string $leftOperand
|
170 |
+
* @param string $rightOperand
|
171 |
+
* @return string
|
172 |
+
*/
|
173 |
+
public function mod($leftOperand, $rightOperand)
|
174 |
+
{
|
175 |
+
return bcmod($leftOperand, $rightOperand);
|
176 |
+
}
|
177 |
+
|
178 |
+
/**
|
179 |
+
* Raise a big integer to another, reduced by a specified modulus
|
180 |
+
*
|
181 |
+
* @param string $leftOperand
|
182 |
+
* @param string $rightOperand
|
183 |
+
* @param string $modulus
|
184 |
+
* @return string
|
185 |
+
*/
|
186 |
+
public function powmod($leftOperand, $rightOperand, $modulus)
|
187 |
+
{
|
188 |
+
return bcpowmod($leftOperand, $rightOperand, $modulus);
|
189 |
+
}
|
190 |
+
|
191 |
+
/**
|
192 |
+
* Compare two big integers and returns result as an integer where
|
193 |
+
* Returns < 0 if leftOperand is less than rightOperand;
|
194 |
+
* > 0 if leftOperand is greater than rightOperand, and 0 if they are equal.
|
195 |
+
*
|
196 |
+
* @param string $leftOperand
|
197 |
+
* @param string $rightOperand
|
198 |
+
* @return int
|
199 |
+
*/
|
200 |
+
public function comp($leftOperand, $rightOperand)
|
201 |
+
{
|
202 |
+
return bccomp($leftOperand, $rightOperand);
|
203 |
+
}
|
204 |
+
|
205 |
+
/**
|
206 |
+
* Convert big integer into it's binary number representation
|
207 |
+
*
|
208 |
+
* @param string $operand
|
209 |
+
* @param bool $twoc return in two's complement form
|
210 |
+
* @return string
|
211 |
+
*/
|
212 |
+
public function intToBin($operand, $twoc = false)
|
213 |
+
{
|
214 |
+
$nb = chr(0);
|
215 |
+
$isNegative = (strpos($operand, '-') === 0) ? true : false;
|
216 |
+
$operand = ltrim($operand, '+-0');
|
217 |
+
|
218 |
+
if (empty($operand)) {
|
219 |
+
return $nb;
|
220 |
+
}
|
221 |
+
|
222 |
+
if ($isNegative && $twoc) {
|
223 |
+
$operand = bcsub($operand, '1');
|
224 |
+
}
|
225 |
+
|
226 |
+
$bytes = '';
|
227 |
+
while (bccomp($operand, '0', 0) > 0) {
|
228 |
+
$temp = bcmod($operand, '16777216');
|
229 |
+
$bytes = chr($temp >> 16) . chr($temp >> 8) . chr($temp) . $bytes;
|
230 |
+
$operand = bcdiv($operand, '16777216');
|
231 |
+
}
|
232 |
+
$bytes = ltrim($bytes, $nb);
|
233 |
+
|
234 |
+
if ($twoc) {
|
235 |
+
if (ord($bytes[0]) & 0x80) {
|
236 |
+
$bytes = $nb . $bytes;
|
237 |
+
}
|
238 |
+
return $isNegative ? ~$bytes : $bytes;
|
239 |
+
}
|
240 |
+
|
241 |
+
return $bytes;
|
242 |
+
}
|
243 |
+
|
244 |
+
/**
|
245 |
+
* Convert big integer into it's binary number representation
|
246 |
+
*
|
247 |
+
* @param string $bytes
|
248 |
+
* @param bool $twoc whether binary number is in twos' complement form
|
249 |
+
* @return string
|
250 |
+
*/
|
251 |
+
public function binToInt($bytes, $twoc = false)
|
252 |
+
{
|
253 |
+
$isNegative = ((ord($bytes[0]) & 0x80) && $twoc);
|
254 |
+
|
255 |
+
if ($isNegative) {
|
256 |
+
$bytes = ~$bytes;
|
257 |
+
}
|
258 |
+
|
259 |
+
$len = (strlen($bytes) + 3) & 0xfffffffc;
|
260 |
+
$bytes = str_pad($bytes, $len, chr(0), STR_PAD_LEFT);
|
261 |
+
|
262 |
+
$result = '0';
|
263 |
+
for ($i = 0; $i < $len; $i += 4) {
|
264 |
+
$result = bcmul($result, '4294967296'); // 2**32
|
265 |
+
$result = bcadd($result, 0x1000000 * ord($bytes[$i]) +
|
266 |
+
((ord($bytes[$i + 1]) << 16) |
|
267 |
+
(ord($bytes[$i + 2]) << 8) |
|
268 |
+
ord($bytes[$i + 3])));
|
269 |
+
}
|
270 |
+
|
271 |
+
if ($isNegative) {
|
272 |
+
$result = bcsub('-' . $result, '1');
|
273 |
+
}
|
274 |
+
|
275 |
+
return $result;
|
276 |
+
}
|
277 |
+
|
278 |
+
/**
|
279 |
+
* Base conversion. Bases 2..62 are supported
|
280 |
+
*
|
281 |
+
* @param string $operand
|
282 |
+
* @param int $fromBase
|
283 |
+
* @param int $toBase
|
284 |
+
* @return string
|
285 |
+
* @throws Exception\InvalidArgumentException
|
286 |
+
*/
|
287 |
+
public function baseConvert($operand, $fromBase, $toBase = 10)
|
288 |
+
{
|
289 |
+
if ($fromBase == $toBase) {
|
290 |
+
return $operand;
|
291 |
+
}
|
292 |
+
|
293 |
+
if ($fromBase < 2 || $fromBase > 62) {
|
294 |
+
throw new Exception\InvalidArgumentException(
|
295 |
+
"Unsupported base: {$fromBase}, should be 2..62"
|
296 |
+
);
|
297 |
+
}
|
298 |
+
if ($toBase < 2 || $toBase > 62) {
|
299 |
+
throw new Exception\InvalidArgumentException(
|
300 |
+
"Unsupported base: {$toBase}, should be 2..62"
|
301 |
+
);
|
302 |
+
}
|
303 |
+
|
304 |
+
$sign = (strpos($operand, '-') === 0) ? '-' : '';
|
305 |
+
$operand = ltrim($operand, '-+');
|
306 |
+
|
307 |
+
$chars = self::BASE62_ALPHABET;
|
308 |
+
|
309 |
+
// convert to decimal
|
310 |
+
if ($fromBase == 10) {
|
311 |
+
$decimal = $operand;
|
312 |
+
} else {
|
313 |
+
$decimal = '0';
|
314 |
+
for ($i = 0, $len = strlen($operand); $i < $len; $i++) {
|
315 |
+
$decimal = bcmul($decimal, $fromBase);
|
316 |
+
$decimal = bcadd($decimal, strpos($chars, $operand[$i]));
|
317 |
+
}
|
318 |
+
}
|
319 |
+
|
320 |
+
if ($toBase == 10) {
|
321 |
+
return $decimal;
|
322 |
+
}
|
323 |
+
|
324 |
+
// convert decimal to base
|
325 |
+
$result = '';
|
326 |
+
do {
|
327 |
+
$remainder = bcmod($decimal, $toBase);
|
328 |
+
$decimal = bcdiv($decimal, $toBase);
|
329 |
+
$result = $chars[$remainder] . $result;
|
330 |
+
} while (bccomp($decimal, '0'));
|
331 |
+
|
332 |
+
return $sign . $result;
|
333 |
+
}
|
334 |
+
}
|
backend/vendor/zendframework/zend-math/Zend/Math/BigInteger/Adapter/Gmp.php
ADDED
@@ -0,0 +1,321 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Zend Framework (http://framework.zend.com/)
|
4 |
+
*
|
5 |
+
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
+
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
+
*/
|
9 |
+
|
10 |
+
namespace Zend\Math\BigInteger\Adapter;
|
11 |
+
|
12 |
+
use Zend\Math\BigInteger\Exception;
|
13 |
+
|
14 |
+
/**
|
15 |
+
* GMP extension adapter
|
16 |
+
*/
|
17 |
+
class Gmp implements AdapterInterface
|
18 |
+
{
|
19 |
+
/**
|
20 |
+
* Create string representing big integer in decimal form from arbitrary integer format
|
21 |
+
*
|
22 |
+
* @param string $operand
|
23 |
+
* @param int|null $base
|
24 |
+
* @return bool|string
|
25 |
+
*/
|
26 |
+
public function init($operand, $base = null)
|
27 |
+
{
|
28 |
+
$sign = (strpos($operand, '-') === 0) ? '-' : '';
|
29 |
+
$operand = ltrim($operand, '-+');
|
30 |
+
|
31 |
+
if (null === $base) {
|
32 |
+
// scientific notation
|
33 |
+
if (preg_match('#^(?:([1-9])\.)?([0-9]+)[eE]\+?([0-9]+)$#', $operand, $m)) {
|
34 |
+
if (!empty($m[1])) {
|
35 |
+
if ($m[3] < strlen($m[2])) {
|
36 |
+
return false;
|
37 |
+
}
|
38 |
+
} else {
|
39 |
+
$m[1] = '';
|
40 |
+
}
|
41 |
+
$operand = str_pad(($m[1] . $m[2]), ($m[3] + 1), '0', STR_PAD_RIGHT);
|
42 |
+
} else {
|
43 |
+
// let GMP guess base
|
44 |
+
$base = 0;
|
45 |
+
}
|
46 |
+
}
|
47 |
+
|
48 |
+
set_error_handler(function () { /* Do nothing */}, \E_WARNING);
|
49 |
+
$res = gmp_init($sign . $operand, $base);
|
50 |
+
restore_error_handler();
|
51 |
+
if ($res === false) {
|
52 |
+
return false;
|
53 |
+
}
|
54 |
+
|
55 |
+
return gmp_strval($res);
|
56 |
+
}
|
57 |
+
|
58 |
+
/**
|
59 |
+
* Add two big integers
|
60 |
+
*
|
61 |
+
* @param string $leftOperand
|
62 |
+
* @param string $rightOperand
|
63 |
+
* @return string
|
64 |
+
*/
|
65 |
+
public function add($leftOperand, $rightOperand)
|
66 |
+
{
|
67 |
+
$result = gmp_add($leftOperand, $rightOperand);
|
68 |
+
return gmp_strval($result);
|
69 |
+
}
|
70 |
+
|
71 |
+
/**
|
72 |
+
* Subtract two big integers
|
73 |
+
*
|
74 |
+
* @param string $leftOperand
|
75 |
+
* @param string $rightOperand
|
76 |
+
* @return string
|
77 |
+
*/
|
78 |
+
public function sub($leftOperand, $rightOperand)
|
79 |
+
{
|
80 |
+
$result = gmp_sub($leftOperand, $rightOperand);
|
81 |
+
return gmp_strval($result);
|
82 |
+
}
|
83 |
+
|
84 |
+
/**
|
85 |
+
* Multiply two big integers
|
86 |
+
*
|
87 |
+
* @param string $leftOperand
|
88 |
+
* @param string $rightOperand
|
89 |
+
* @return string
|
90 |
+
*/
|
91 |
+
public function mul($leftOperand, $rightOperand)
|
92 |
+
{
|
93 |
+
$result = gmp_mul($leftOperand, $rightOperand);
|
94 |
+
return gmp_strval($result);
|
95 |
+
}
|
96 |
+
|
97 |
+
/**
|
98 |
+
* Divide two big integers and return integer part result.
|
99 |
+
* Raises exception if the divisor is zero.
|
100 |
+
*
|
101 |
+
* @param string $leftOperand
|
102 |
+
* @param string $rightOperand
|
103 |
+
* @return string|null
|
104 |
+
* @throws Exception\DivisionByZeroException
|
105 |
+
*/
|
106 |
+
public function div($leftOperand, $rightOperand)
|
107 |
+
{
|
108 |
+
if ($rightOperand == 0) {
|
109 |
+
throw new Exception\DivisionByZeroException(
|
110 |
+
"Division by zero; divisor = {$rightOperand}"
|
111 |
+
);
|
112 |
+
}
|
113 |
+
|
114 |
+
$result = gmp_div_q($leftOperand, $rightOperand);
|
115 |
+
return gmp_strval($result);
|
116 |
+
}
|
117 |
+
|
118 |
+
/**
|
119 |
+
* Raise a big integers to another
|
120 |
+
*
|
121 |
+
* @param string $operand
|
122 |
+
* @param string $exp
|
123 |
+
* @return string
|
124 |
+
*/
|
125 |
+
public function pow($operand, $exp)
|
126 |
+
{
|
127 |
+
$result = gmp_pow($operand, $exp);
|
128 |
+
return gmp_strval($result);
|
129 |
+
}
|
130 |
+
|
131 |
+
/**
|
132 |
+
* Get the square root of a big integer
|
133 |
+
*
|
134 |
+
* @param string $operand
|
135 |
+
* @return string
|
136 |
+
*/
|
137 |
+
public function sqrt($operand)
|
138 |
+
{
|
139 |
+
$result = gmp_sqrt($operand);
|
140 |
+
return gmp_strval($result);
|
141 |
+
}
|
142 |
+
|
143 |
+
/**
|
144 |
+
* Get absolute value of a big integer
|
145 |
+
*
|
146 |
+
* @param string $operand
|
147 |
+
* @return string
|
148 |
+
*/
|
149 |
+
public function abs($operand)
|
150 |
+
{
|
151 |
+
$result = gmp_abs($operand);
|
152 |
+
return gmp_strval($result);
|
153 |
+
}
|
154 |
+
|
155 |
+
/**
|
156 |
+
* Get modulus of a big integer
|
157 |
+
*
|
158 |
+
* @param string $leftOperand
|
159 |
+
* @param string $modulus
|
160 |
+
* @return string
|
161 |
+
*/
|
162 |
+
public function mod($leftOperand, $modulus)
|
163 |
+
{
|
164 |
+
$result = gmp_mod($leftOperand, $modulus);
|
165 |
+
return gmp_strval($result);
|
166 |
+
}
|
167 |
+
|
168 |
+
/**
|
169 |
+
* Raise a big integer to another, reduced by a specified modulus
|
170 |
+
*
|
171 |
+
* @param string $leftOperand
|
172 |
+
* @param string $rightOperand
|
173 |
+
* @param string $modulus
|
174 |
+
* @return string
|
175 |
+
*/
|
176 |
+
public function powmod($leftOperand, $rightOperand, $modulus)
|
177 |
+
{
|
178 |
+
$result = gmp_powm($leftOperand, $rightOperand, $modulus);
|
179 |
+
return gmp_strval($result);
|
180 |
+
}
|
181 |
+
|
182 |
+
/**
|
183 |
+
* Compare two big integers and returns result as an integer where
|
184 |
+
* Returns < 0 if leftOperand is less than rightOperand;
|
185 |
+
* > 0 if leftOperand is greater than rightOperand, and 0 if they are equal.
|
186 |
+
*
|
187 |
+
* @param string $leftOperand
|
188 |
+
* @param string $rightOperand
|
189 |
+
* @return int
|
190 |
+
*/
|
191 |
+
public function comp($leftOperand, $rightOperand)
|
192 |
+
{
|
193 |
+
return gmp_cmp($leftOperand, $rightOperand);
|
194 |
+
}
|
195 |
+
|
196 |
+
/**
|
197 |
+
* Convert big integer into it's binary number representation
|
198 |
+
*
|
199 |
+
* @param string $int
|
200 |
+
* @param bool $twoc return in twos' complement form
|
201 |
+
* @return string
|
202 |
+
*/
|
203 |
+
public function intToBin($int, $twoc = false)
|
204 |
+
{
|
205 |
+
$nb = chr(0);
|
206 |
+
$isNegative = (strpos($int, '-') === 0) ? true : false;
|
207 |
+
$int = ltrim($int, '+-0');
|
208 |
+
|
209 |
+
if (empty($int)) {
|
210 |
+
return $nb;
|
211 |
+
}
|
212 |
+
|
213 |
+
if ($isNegative && $twoc) {
|
214 |
+
$int = gmp_sub($int, '1');
|
215 |
+
}
|
216 |
+
|
217 |
+
$hex = gmp_strval($int, 16);
|
218 |
+
if (strlen($hex) & 1) {
|
219 |
+
$hex = '0' . $hex;
|
220 |
+
}
|
221 |
+
|
222 |
+
$bytes = pack('H*', $hex);
|
223 |
+
$bytes = ltrim($bytes, $nb);
|
224 |
+
|
225 |
+
if ($twoc) {
|
226 |
+
if (ord($bytes[0]) & 0x80) {
|
227 |
+
$bytes = $nb . $bytes;
|
228 |
+
}
|
229 |
+
return $isNegative ? ~$bytes : $bytes;
|
230 |
+
}
|
231 |
+
|
232 |
+
return $bytes;
|
233 |
+
}
|
234 |
+
|
235 |
+
/**
|
236 |
+
* Convert binary number into big integer
|
237 |
+
*
|
238 |
+
* @param string $bytes
|
239 |
+
* @param bool $twoc whether binary number is in twos' complement form
|
240 |
+
* @return string
|
241 |
+
*/
|
242 |
+
public function binToInt($bytes, $twoc = false)
|
243 |
+
{
|
244 |
+
$isNegative = ((ord($bytes[0]) & 0x80) && $twoc);
|
245 |
+
|
246 |
+
$sign = '';
|
247 |
+
if ($isNegative) {
|
248 |
+
$bytes = ~$bytes;
|
249 |
+
$sign = '-';
|
250 |
+
}
|
251 |
+
|
252 |
+
$result = gmp_init($sign . bin2hex($bytes), 16);
|
253 |
+
|
254 |
+
if ($isNegative) {
|
255 |
+
$result = gmp_sub($result, '1');
|
256 |
+
}
|
257 |
+
|
258 |
+
return gmp_strval($result);
|
259 |
+
}
|
260 |
+
|
261 |
+
/**
|
262 |
+
* Base conversion. Bases 2..62 are supported
|
263 |
+
*
|
264 |
+
* @param string $operand
|
265 |
+
* @param int $fromBase
|
266 |
+
* @param int $toBase
|
267 |
+
* @return string
|
268 |
+
* @throws Exception\InvalidArgumentException
|
269 |
+
*/
|
270 |
+
public function baseConvert($operand, $fromBase, $toBase = 10)
|
271 |
+
{
|
272 |
+
if ($fromBase == $toBase) {
|
273 |
+
return $operand;
|
274 |
+
}
|
275 |
+
|
276 |
+
if ($fromBase < 2 || $fromBase > 62) {
|
277 |
+
throw new Exception\InvalidArgumentException(
|
278 |
+
"Unsupported base: {$fromBase}, should be 2..62"
|
279 |
+
);
|
280 |
+
}
|
281 |
+
if ($toBase < 2 || $toBase > 62) {
|
282 |
+
throw new Exception\InvalidArgumentException(
|
283 |
+
"Unsupported base: {$toBase}, should be 2..62"
|
284 |
+
);
|
285 |
+
}
|
286 |
+
|
287 |
+
if ($fromBase <= 36 && $toBase <= 36) {
|
288 |
+
return gmp_strval(gmp_init($operand, $fromBase), $toBase);
|
289 |
+
}
|
290 |
+
|
291 |
+
$sign = (strpos($operand, '-') === 0) ? '-' : '';
|
292 |
+
$operand = ltrim($operand, '-+');
|
293 |
+
|
294 |
+
$chars = self::BASE62_ALPHABET;
|
295 |
+
|
296 |
+
// convert operand to decimal
|
297 |
+
if ($fromBase !== 10) {
|
298 |
+
$decimal = '0';
|
299 |
+
for ($i = 0, $len = strlen($operand); $i < $len; $i++) {
|
300 |
+
$decimal = gmp_mul($decimal, $fromBase);
|
301 |
+
$decimal = gmp_add($decimal, strpos($chars, $operand[$i]));
|
302 |
+
}
|
303 |
+
} else {
|
304 |
+
$decimal = gmp_init($operand);
|
305 |
+
}
|
306 |
+
|
307 |
+
if ($toBase == 10) {
|
308 |
+
return gmp_strval($decimal);
|
309 |
+
}
|
310 |
+
|
311 |
+
// convert decimal to base
|
312 |
+
$result = '';
|
313 |
+
do {
|
314 |
+
list($decimal, $remainder) = gmp_div_qr($decimal, $toBase);
|
315 |
+
$pos = gmp_strval($remainder);
|
316 |
+
$result = $chars[$pos] . $result;
|
317 |
+
} while (gmp_cmp($decimal, '0'));
|
318 |
+
|
319 |
+
return $sign . $result;
|
320 |
+
}
|
321 |
+
}
|
backend/vendor/zendframework/zend-math/Zend/Math/BigInteger/AdapterPluginManager.php
ADDED
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Zend Framework (http://framework.zend.com/)
|
4 |
+
*
|
5 |
+
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
+
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
+
*/
|
9 |
+
|
10 |
+
namespace Zend\Math\BigInteger;
|
11 |
+
|
12 |
+
use Zend\ServiceManager\AbstractPluginManager;
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Plugin manager implementation for BigInteger adapters.
|
16 |
+
*
|
17 |
+
* Enforces that adapters retrieved are instances of
|
18 |
+
* Adapter\AdapterInterface. Additionally, it registers a number of default
|
19 |
+
* adapters available.
|
20 |
+
*/
|
21 |
+
class AdapterPluginManager extends AbstractPluginManager
|
22 |
+
{
|
23 |
+
/**
|
24 |
+
* Default set of adapters
|
25 |
+
*
|
26 |
+
* @var array
|
27 |
+
*/
|
28 |
+
protected $invokableClasses = array(
|
29 |
+
'bcmath' => 'Zend\Math\BigInteger\Adapter\Bcmath',
|
30 |
+
'gmp' => 'Zend\Math\BigInteger\Adapter\Gmp',
|
31 |
+
);
|
32 |
+
|
33 |
+
/**
|
34 |
+
* Validate the plugin
|
35 |
+
*
|
36 |
+
* Checks that the adapter loaded is an instance of Adapter\AdapterInterface.
|
37 |
+
*
|
38 |
+
* @param mixed $plugin
|
39 |
+
* @return void
|
40 |
+
* @throws Exception\RuntimeException if invalid
|
41 |
+
*/
|
42 |
+
public function validatePlugin($plugin)
|
43 |
+
{
|
44 |
+
if ($plugin instanceof Adapter\AdapterInterface) {
|
45 |
+
// we're okay
|
46 |
+
return;
|
47 |
+
}
|
48 |
+
|
49 |
+
throw new Exception\RuntimeException(sprintf(
|
50 |
+
'Plugin of type %s is invalid; must implement %s\Adapter\AdapterInterface',
|
51 |
+
(is_object($plugin) ? get_class($plugin) : gettype($plugin)),
|
52 |
+
__NAMESPACE__
|
53 |
+
));
|
54 |
+
}
|
55 |
+
}
|
backend/vendor/zendframework/zend-math/Zend/Math/BigInteger/BigInteger.php
ADDED
@@ -0,0 +1,121 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Zend Framework (http://framework.zend.com/)
|
4 |
+
*
|
5 |
+
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
+
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
+
*/
|
9 |
+
|
10 |
+
namespace Zend\Math\BigInteger;
|
11 |
+
|
12 |
+
abstract class BigInteger
|
13 |
+
{
|
14 |
+
/**
|
15 |
+
* Plugin manager for loading adapters
|
16 |
+
*
|
17 |
+
* @var null|AdapterPluginManager
|
18 |
+
*/
|
19 |
+
protected static $adapters = null;
|
20 |
+
|
21 |
+
/**
|
22 |
+
* The default adapter.
|
23 |
+
*
|
24 |
+
* @var Adapter\AdapterInterface
|
25 |
+
*/
|
26 |
+
protected static $defaultAdapter = null;
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Create a BigInteger adapter instance
|
30 |
+
*
|
31 |
+
* @param string|Adapter\AdapterInterface|null $adapterName
|
32 |
+
* @return Adapter\AdapterInterface
|
33 |
+
*/
|
34 |
+
public static function factory($adapterName = null)
|
35 |
+
{
|
36 |
+
if (null === $adapterName) {
|
37 |
+
return static::getAvailableAdapter();
|
38 |
+
} elseif ($adapterName instanceof Adapter\AdapterInterface) {
|
39 |
+
return $adapterName;
|
40 |
+
}
|
41 |
+
|
42 |
+
return static::getAdapterPluginManager()->get($adapterName);
|
43 |
+
}
|
44 |
+
|
45 |
+
/**
|
46 |
+
* Set adapter plugin manager
|
47 |
+
*
|
48 |
+
* @param AdapterPluginManager $adapters
|
49 |
+
*/
|
50 |
+
public static function setAdapterPluginManager(AdapterPluginManager $adapters)
|
51 |
+
{
|
52 |
+
static::$adapters = $adapters;
|
53 |
+
}
|
54 |
+
|
55 |
+
/**
|
56 |
+
* Get the adapter plugin manager
|
57 |
+
*
|
58 |
+
* @return AdapterPluginManager
|
59 |
+
*/
|
60 |
+
public static function getAdapterPluginManager()
|
61 |
+
{
|
62 |
+
if (static::$adapters === null) {
|
63 |
+
static::$adapters = new AdapterPluginManager();
|
64 |
+
}
|
65 |
+
return static::$adapters;
|
66 |
+
}
|
67 |
+
|
68 |
+
/**
|
69 |
+
* Set default BigInteger adapter
|
70 |
+
*
|
71 |
+
* @param string|Adapter\AdapterInterface $adapter
|
72 |
+
*/
|
73 |
+
public static function setDefaultAdapter($adapter)
|
74 |
+
{
|
75 |
+
static::$defaultAdapter = static::factory($adapter);
|
76 |
+
}
|
77 |
+
|
78 |
+
/**
|
79 |
+
* Get default BigInteger adapter
|
80 |
+
*
|
81 |
+
* @return null|Adapter\AdapterInterface
|
82 |
+
*/
|
83 |
+
public static function getDefaultAdapter()
|
84 |
+
{
|
85 |
+
if (null === static::$defaultAdapter) {
|
86 |
+
static::$defaultAdapter = static::getAvailableAdapter();
|
87 |
+
}
|
88 |
+
return static::$defaultAdapter;
|
89 |
+
}
|
90 |
+
|
91 |
+
/**
|
92 |
+
* Determine and return available adapter
|
93 |
+
*
|
94 |
+
* @return Adapter\AdapterInterface
|
95 |
+
* @throws Exception\RuntimeException
|
96 |
+
*/
|
97 |
+
public static function getAvailableAdapter()
|
98 |
+
{
|
99 |
+
if (extension_loaded('gmp')) {
|
100 |
+
$adapterName = 'Gmp';
|
101 |
+
} elseif (extension_loaded('bcmath')) {
|
102 |
+
$adapterName = 'Bcmath';
|
103 |
+
} else {
|
104 |
+
throw new Exception\RuntimeException('Big integer math support is not detected');
|
105 |
+
}
|
106 |
+
return static::factory($adapterName);
|
107 |
+
}
|
108 |
+
|
109 |
+
/**
|
110 |
+
* Call adapter methods statically
|
111 |
+
*
|
112 |
+
* @param string $method
|
113 |
+
* @param mixed $args
|
114 |
+
* @return mixed
|
115 |
+
*/
|
116 |
+
public static function __callStatic($method, $args)
|
117 |
+
{
|
118 |
+
$adapter = static::getDefaultAdapter();
|
119 |
+
return call_user_func_array(array($adapter, $method), $args);
|
120 |
+
}
|
121 |
+
}
|
backend/vendor/zendframework/zend-math/Zend/Math/BigInteger/Exception/DivisionByZeroException.php
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Zend Framework (http://framework.zend.com/)
|
4 |
+
*
|
5 |
+
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
+
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
+
*/
|
9 |
+
|
10 |
+
namespace Zend\Math\BigInteger\Exception;
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Division by zero exception
|
14 |
+
*/
|
15 |
+
class DivisionByZeroException extends RuntimeException implements ExceptionInterface
|
16 |
+
{
|
17 |
+
}
|
backend/vendor/zendframework/zend-math/Zend/Math/BigInteger/Exception/ExceptionInterface.php
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Zend Framework (http://framework.zend.com/)
|
4 |
+
*
|
5 |
+
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
+
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
+
*/
|
9 |
+
|
10 |
+
namespace Zend\Math\BigInteger\Exception;
|
11 |
+
|
12 |
+
use Zend\Math\Exception;
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Invalid argument exception
|
16 |
+
*/
|
17 |
+
interface ExceptionInterface extends Exception\ExceptionInterface
|
18 |
+
{
|
19 |
+
}
|
backend/vendor/zendframework/zend-math/Zend/Math/BigInteger/Exception/InvalidArgumentException.php
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Zend Framework (http://framework.zend.com/)
|
4 |
+
*
|
5 |
+
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
+
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
+
*/
|
9 |
+
|
10 |
+
namespace Zend\Math\BigInteger\Exception;
|
11 |
+
|
12 |
+
use Zend\Math\Exception;
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Invalid argument exception
|
16 |
+
*/
|
17 |
+
class InvalidArgumentException extends Exception\InvalidArgumentException implements ExceptionInterface
|
18 |
+
{
|
19 |
+
}
|
backend/vendor/zendframework/zend-math/Zend/Math/BigInteger/Exception/RuntimeException.php
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Zend Framework (http://framework.zend.com/)
|
4 |
+
*
|
5 |
+
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
+
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
+
*/
|
9 |
+
|
10 |
+
namespace Zend\Math\BigInteger\Exception;
|
11 |
+
|
12 |
+
use Zend\Math\Exception;
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Runtime exception
|
16 |
+
*/
|
17 |
+
class RuntimeException extends Exception\RuntimeException implements ExceptionInterface
|
18 |
+
{
|
19 |
+
}
|
backend/vendor/zendframework/zend-math/Zend/Math/CONTRIBUTING.md
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
1 |
+
# CONTRIBUTING
|
2 |
+
|
3 |
+
Please don't open pull requests against this repository, please use https://github.com/zendframework/zf2.
|
backend/vendor/zendframework/zend-math/Zend/Math/Exception/DomainException.php
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Zend Framework (http://framework.zend.com/)
|
4 |
+
*
|
5 |
+
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
+
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
+
*/
|
9 |
+
|
10 |
+
namespace Zend\Math\Exception;
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Invalid argument exception
|
14 |
+
*/
|
15 |
+
class DomainException extends \DomainException implements ExceptionInterface
|
16 |
+
{
|
17 |
+
}
|
backend/vendor/zendframework/zend-math/Zend/Math/Exception/ExceptionInterface.php
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Zend Framework (http://framework.zend.com/)
|
4 |
+
*
|
5 |
+
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
+
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
+
*/
|
9 |
+
|
10 |
+
namespace Zend\Math\Exception;
|
11 |
+
|
12 |
+
interface ExceptionInterface
|
13 |
+
{
|
14 |
+
}
|
backend/vendor/zendframework/zend-math/Zend/Math/Exception/InvalidArgumentException.php
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Zend Framework (http://framework.zend.com/)
|
4 |
+
*
|
5 |
+
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
+
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
+
*/
|
9 |
+
|
10 |
+
namespace Zend\Math\Exception;
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Invalid argument exception
|
14 |
+
*/
|
15 |
+
class InvalidArgumentException extends \InvalidArgumentException implements
|
16 |
+
ExceptionInterface
|
17 |
+
{
|
18 |
+
}
|
backend/vendor/zendframework/zend-math/Zend/Math/Exception/RuntimeException.php
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Zend Framework (http://framework.zend.com/)
|
4 |
+
*
|
5 |
+
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
+
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
+
*/
|
9 |
+
|
10 |
+
namespace Zend\Math\Exception;
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Runtime argument exception
|
14 |
+
*/
|
15 |
+
class RuntimeException extends \RuntimeException implements
|
16 |
+
ExceptionInterface
|
17 |
+
{
|
18 |
+
}
|
backend/vendor/zendframework/zend-math/Zend/Math/README.md
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Math Component from ZF2
|
2 |
+
=======================
|
3 |
+
|
4 |
+
This is the Math component for ZF2.
|
5 |
+
|
6 |
+
- File issues at https://github.com/zendframework/zf2/issues
|
7 |
+
- Create pull requests against https://github.com/zendframework/zf2
|
8 |
+
- Documentation is at http://framework.zend.com/docs
|
9 |
+
|
10 |
+
LICENSE
|
11 |
+
-------
|
12 |
+
|
13 |
+
The files in this archive are released under the [Zend Framework
|
14 |
+
license](http://framework.zend.com/license), which is a 3-clause BSD license.
|
15 |
+
|
backend/vendor/zendframework/zend-math/Zend/Math/Rand.php
ADDED
@@ -0,0 +1,212 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Zend Framework (http://framework.zend.com/)
|
4 |
+
*
|
5 |
+
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
+
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
+
*/
|
9 |
+
|
10 |
+
namespace Zend\Math;
|
11 |
+
|
12 |
+
use RandomLib;
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Pseudorandom number generator (PRNG)
|
16 |
+
*/
|
17 |
+
abstract class Rand
|
18 |
+
{
|
19 |
+
/**
|
20 |
+
* Alternative random byte generator using RandomLib
|
21 |
+
*
|
22 |
+
* @var RandomLib\Generator
|
23 |
+
*/
|
24 |
+
protected static $generator = null;
|
25 |
+
|
26 |
+
/**
|
27 |
+
* Generate random bytes using OpenSSL or Mcrypt and mt_rand() as fallback
|
28 |
+
*
|
29 |
+
* @param int $length
|
30 |
+
* @param bool $strong true if you need a strong random generator (cryptography)
|
31 |
+
* @return string
|
32 |
+
* @throws Exception\RuntimeException
|
33 |
+
*/
|
34 |
+
public static function getBytes($length, $strong = false)
|
35 |
+
{
|
36 |
+
$length = (int) $length;
|
37 |
+
|
38 |
+
if ($length <= 0) {
|
39 |
+
return false;
|
40 |
+
}
|
41 |
+
|
42 |
+
if (function_exists('openssl_random_pseudo_bytes')) {
|
43 |
+
$bytes = openssl_random_pseudo_bytes($length, $usable);
|
44 |
+
if (true === $usable) {
|
45 |
+
return $bytes;
|
46 |
+
}
|
47 |
+
}
|
48 |
+
if (function_exists('mcrypt_create_iv')) {
|
49 |
+
$bytes = mcrypt_create_iv($length, MCRYPT_DEV_URANDOM);
|
50 |
+
if ($bytes !== false && strlen($bytes) === $length) {
|
51 |
+
return $bytes;
|
52 |
+
}
|
53 |
+
}
|
54 |
+
$checkAlternatives = (file_exists('/dev/urandom') && is_readable('/dev/urandom'))
|
55 |
+
|| class_exists('\\COM', false);
|
56 |
+
if (true === $strong && false === $checkAlternatives) {
|
57 |
+
throw new Exception\RuntimeException (
|
58 |
+
'This PHP environment doesn\'t support secure random number generation. ' .
|
59 |
+
'Please consider installing the OpenSSL and/or Mcrypt extensions'
|
60 |
+
);
|
61 |
+
}
|
62 |
+
$generator = self::getAlternativeGenerator();
|
63 |
+
return $generator->generate($length);
|
64 |
+
}
|
65 |
+
|
66 |
+
/**
|
67 |
+
* Retrieve a fallback/alternative RNG generator
|
68 |
+
*
|
69 |
+
* @return RandomLib\Generator
|
70 |
+
*/
|
71 |
+
public static function getAlternativeGenerator()
|
72 |
+
{
|
73 |
+
if (null !== static::$generator) {
|
74 |
+
return static::$generator;
|
75 |
+
}
|
76 |
+
if (!class_exists('RandomLib\\Factory')) {
|
77 |
+
throw new Exception\RuntimeException(
|
78 |
+
'The RandomLib fallback pseudorandom number generator (PRNG) '
|
79 |
+
. ' must be installed in the absence of the OpenSSL and '
|
80 |
+
. 'Mcrypt extensions'
|
81 |
+
);
|
82 |
+
}
|
83 |
+
$factory = new RandomLib\Factory;
|
84 |
+
$factory->registerSource(
|
85 |
+
'HashTiming',
|
86 |
+
'Zend\Math\Source\HashTiming'
|
87 |
+
);
|
88 |
+
static::$generator = $factory->getMediumStrengthGenerator();
|
89 |
+
return static::$generator;
|
90 |
+
}
|
91 |
+
|
92 |
+
/**
|
93 |
+
* Generate random boolean
|
94 |
+
*
|
95 |
+
* @param bool $strong true if you need a strong random generator (cryptography)
|
96 |
+
* @return bool
|
97 |
+
*/
|
98 |
+
public static function getBoolean($strong = false)
|
99 |
+
{
|
100 |
+
$byte = static::getBytes(1, $strong);
|
101 |
+
return (bool) (ord($byte) % 2);
|
102 |
+
}
|
103 |
+
|
104 |
+
/**
|
105 |
+
* Generate a random integer between $min and $max
|
106 |
+
*
|
107 |
+
* @param int $min
|
108 |
+
* @param int $max
|
109 |
+
* @param bool $strong true if you need a strong random generator (cryptography)
|
110 |
+
* @return int
|
111 |
+
* @throws Exception\DomainException
|
112 |
+
*/
|
113 |
+
public static function getInteger($min, $max, $strong = false)
|
114 |
+
{
|
115 |
+
if ($min > $max) {
|
116 |
+
throw new Exception\DomainException(
|
117 |
+
'The min parameter must be lower than max parameter'
|
118 |
+
);
|
119 |
+
}
|
120 |
+
$range = $max - $min;
|
121 |
+
if ($range == 0) {
|
122 |
+
return $max;
|
123 |
+
} elseif ($range > PHP_INT_MAX || is_float($range)) {
|
124 |
+
throw new Exception\DomainException(
|
125 |
+
'The supplied range is too great to generate'
|
126 |
+
);
|
127 |
+
}
|
128 |
+
|
129 |
+
// calculate number of bits required to store range on this machine
|
130 |
+
$r = $range;
|
131 |
+
$bits = 0;
|
132 |
+
while ($r) {
|
133 |
+
$bits++;
|
134 |
+
$r >>= 1;
|
135 |
+
}
|
136 |
+
|
137 |
+
$bits = (int) max($bits, 1);
|
138 |
+
$bytes = (int) max(ceil($bits / 8), 1);
|
139 |
+
$filter = (int) ((1 << $bits) - 1);
|
140 |
+
|
141 |
+
do {
|
142 |
+
$rnd = hexdec(bin2hex(static::getBytes($bytes, $strong)));
|
143 |
+
$rnd &= $filter;
|
144 |
+
} while ($rnd > $range);
|
145 |
+
|
146 |
+
return ($min + $rnd);
|
147 |
+
}
|
148 |
+
|
149 |
+
/**
|
150 |
+
* Generate random float (0..1)
|
151 |
+
* This function generates floats with platform-dependent precision
|
152 |
+
*
|
153 |
+
* PHP uses double precision floating-point format (64-bit) which has
|
154 |
+
* 52-bits of significand precision. We gather 7 bytes of random data,
|
155 |
+
* and we fix the exponent to the bias (1023). In this way we generate
|
156 |
+
* a float of 1.mantissa.
|
157 |
+
*
|
158 |
+
* @param bool $strong true if you need a strong random generator (cryptography)
|
159 |
+
* @return float
|
160 |
+
*/
|
161 |
+
public static function getFloat($strong = false)
|
162 |
+
{
|
163 |
+
$bytes = static::getBytes(7, $strong);
|
164 |
+
$bytes[6] = $bytes[6] | chr(0xF0);
|
165 |
+
$bytes .= chr(63); // exponent bias (1023)
|
166 |
+
list(, $float) = unpack('d', $bytes);
|
167 |
+
|
168 |
+
return ($float - 1);
|
169 |
+
}
|
170 |
+
|
171 |
+
/**
|
172 |
+
* Generate a random string of specified length.
|
173 |
+
*
|
174 |
+
* Uses supplied character list for generating the new string.
|
175 |
+
* If no character list provided - uses Base 64 character set.
|
176 |
+
*
|
177 |
+
* @param int $length
|
178 |
+
* @param string|null $charlist
|
179 |
+
* @param bool $strong true if you need a strong random generator (cryptography)
|
180 |
+
* @return string
|
181 |
+
* @throws Exception\DomainException
|
182 |
+
*/
|
183 |
+
public static function getString($length, $charlist = null, $strong = false)
|
184 |
+
{
|
185 |
+
if ($length < 1) {
|
186 |
+
throw new Exception\DomainException('Length should be >= 1');
|
187 |
+
}
|
188 |
+
|
189 |
+
// charlist is empty or not provided
|
190 |
+
if (empty($charlist)) {
|
191 |
+
$numBytes = ceil($length * 0.75);
|
192 |
+
$bytes = static::getBytes($numBytes, $strong);
|
193 |
+
return substr(rtrim(base64_encode($bytes), '='), 0, $length);
|
194 |
+
}
|
195 |
+
|
196 |
+
$listLen = strlen($charlist);
|
197 |
+
|
198 |
+
if ($listLen == 1) {
|
199 |
+
return str_repeat($charlist, $length);
|
200 |
+
}
|
201 |
+
|
202 |
+
$bytes = static::getBytes($length, $strong);
|
203 |
+
$pos = 0;
|
204 |
+
$result = '';
|
205 |
+
for ($i = 0; $i < $length; $i++) {
|
206 |
+
$pos = ($pos + ord($bytes[$i])) % $listLen;
|
207 |
+
$result .= $charlist[$pos];
|
208 |
+
}
|
209 |
+
|
210 |
+
return $result;
|
211 |
+
}
|
212 |
+
}
|
backend/vendor/zendframework/zend-math/Zend/Math/Source/HashTiming.php
ADDED
@@ -0,0 +1,111 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Zend Framework (http://framework.zend.com/)
|
4 |
+
*
|
5 |
+
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
+
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
+
*/
|
9 |
+
namespace Zend\Math\Source;
|
10 |
+
|
11 |
+
use RandomLib;
|
12 |
+
use SecurityLib\Strength;
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Author:
|
16 |
+
* George Argyros <argyros.george@gmail.com>
|
17 |
+
*
|
18 |
+
* Copyright (c) 2012, George Argyros
|
19 |
+
* All rights reserved.
|
20 |
+
*
|
21 |
+
* Redistribution and use in source and binary forms, with or without
|
22 |
+
* modification, are permitted provided that the following conditions are met:
|
23 |
+
* * Redistributions of source code must retain the above copyright
|
24 |
+
* notice, this list of conditions and the following disclaimer.
|
25 |
+
* * Redistributions in binary form must reproduce the above copyright
|
26 |
+
* notice, this list of conditions and the following disclaimer in the
|
27 |
+
* documentation and/or other materials provided with the distribution.
|
28 |
+
* * Neither the name of the <organization> nor the
|
29 |
+
* names of its contributors may be used to endorse or promote products
|
30 |
+
* derived from this software without specific prior written permission.
|
31 |
+
*
|
32 |
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
33 |
+
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
34 |
+
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
35 |
+
* DISCLAIMED. IN NO EVENT SHALL GEORGE ARGYROS BE LIABLE FOR ANY
|
36 |
+
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
37 |
+
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
38 |
+
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
39 |
+
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
40 |
+
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
41 |
+
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
42 |
+
*
|
43 |
+
*
|
44 |
+
*
|
45 |
+
* The function is providing, at least at the systems tested :),
|
46 |
+
* $len bytes of entropy under any PHP installation or operating system.
|
47 |
+
* The execution time should be at most 10-20 ms in any system.
|
48 |
+
*
|
49 |
+
* Modified by Padraic Brady as part of Zend Framework to use 25% of the
|
50 |
+
* original version's iterations.
|
51 |
+
*/
|
52 |
+
class HashTiming implements RandomLib\Source
|
53 |
+
{
|
54 |
+
/**
|
55 |
+
* Return an instance of Strength indicating the strength of the source
|
56 |
+
*
|
57 |
+
* @return Strength An instance of one of the strength classes
|
58 |
+
*/
|
59 |
+
public static function getStrength()
|
60 |
+
{
|
61 |
+
return new Strength(Strength::VERYLOW);
|
62 |
+
}
|
63 |
+
|
64 |
+
/**
|
65 |
+
* Generate a random string of the specified size
|
66 |
+
*
|
67 |
+
* @param int $size The size of the requested random string
|
68 |
+
*
|
69 |
+
* @return string A string of the requested size
|
70 |
+
*/
|
71 |
+
public function generate($size)
|
72 |
+
{
|
73 |
+
$result = '';
|
74 |
+
$entropy = '';
|
75 |
+
$msec_per_round = 400;
|
76 |
+
$bits_per_round = 2;
|
77 |
+
$total = $size;
|
78 |
+
$hash_length = 20;
|
79 |
+
|
80 |
+
while (strlen($result) < $size) {
|
81 |
+
$bytes = ($total > $hash_length)? $hash_length : $total;
|
82 |
+
$total -= $bytes;
|
83 |
+
for ($i=1; $i < 3; $i++) {
|
84 |
+
$t1 = microtime(true);
|
85 |
+
$seed = mt_rand();
|
86 |
+
for ($j=1; $j < 50; $j++) {
|
87 |
+
$seed = sha1($seed);
|
88 |
+
}
|
89 |
+
$t2 = microtime(true);
|
90 |
+
$entropy .= $t1 . $t2;
|
91 |
+
}
|
92 |
+
$div = (int) (($t2 - $t1) * 1000000);
|
93 |
+
if ($div <= 0) {
|
94 |
+
$div = 400;
|
95 |
+
}
|
96 |
+
$rounds = (int) ($msec_per_round * 50 / $div);
|
97 |
+
$iter = $bytes * (int) (ceil(8 / $bits_per_round));
|
98 |
+
for ($i = 0; $i < $iter; $i ++) {
|
99 |
+
$t1 = microtime();
|
100 |
+
$seed = sha1(mt_rand());
|
101 |
+
for ($j = 0; $j < $rounds; $j++) {
|
102 |
+
$seed = sha1($seed);
|
103 |
+
}
|
104 |
+
$t2 = microtime();
|
105 |
+
$entropy .= $t1 . $t2;
|
106 |
+
}
|
107 |
+
$result .= sha1($entropy, true);
|
108 |
+
}
|
109 |
+
return substr($result, 0, $size);
|
110 |
+
}
|
111 |
+
}
|
backend/vendor/zendframework/zend-math/Zend/Math/composer.json
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"name": "zendframework/zend-math",
|
3 |
+
"description": " ",
|
4 |
+
"license": "BSD-3-Clause",
|
5 |
+
"keywords": [
|
6 |
+
"zf2",
|
7 |
+
"math"
|
8 |
+
],
|
9 |
+
"homepage": "https://github.com/zendframework/zf2",
|
10 |
+
"autoload": {
|
11 |
+
"psr-0": {
|
12 |
+
"Zend\\Math\\": ""
|
13 |
+
}
|
14 |
+
},
|
15 |
+
"target-dir": "Zend/Math",
|
16 |
+
"require": {
|
17 |
+
"php": ">=5.3.23"
|
18 |
+
},
|
19 |
+
"suggest": {
|
20 |
+
"ext-bcmath": "If using the bcmath functionality",
|
21 |
+
"ext-gmp": "If using the gmp functionality",
|
22 |
+
"ircmaxell/random-lib": "Fallback random byte generator for Zend\\Math\\Rand if OpenSSL/Mcrypt extensions are unavailable",
|
23 |
+
"zendframework/zend-servicemanager": ">= current version, if using the BigInteger::factory functionality"
|
24 |
+
},
|
25 |
+
"extra": {
|
26 |
+
"branch-alias": {
|
27 |
+
"dev-master": "2.3-dev",
|
28 |
+
"dev-develop": "2.4-dev"
|
29 |
+
}
|
30 |
+
}
|
31 |
+
}
|
backend/vendor/zendframework/zend-serializer/Zend/Serializer/Adapter/AbstractAdapter.php
ADDED
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Zend Framework (http://framework.zend.com/)
|
4 |
+
*
|
5 |
+
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
+
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
+
*/
|
9 |
+
|
10 |
+
namespace Zend\Serializer\Adapter;
|
11 |
+
|
12 |
+
abstract class AbstractAdapter implements AdapterInterface
|
13 |
+
{
|
14 |
+
/**
|
15 |
+
* @var AdapterOptions
|
16 |
+
*/
|
17 |
+
protected $options = null;
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Constructor
|
21 |
+
*
|
22 |
+
* @param array|\Traversable|AdapterOptions $options
|
23 |
+
*/
|
24 |
+
public function __construct($options = null)
|
25 |
+
{
|
26 |
+
if ($options !== null) {
|
27 |
+
$this->setOptions($options);
|
28 |
+
}
|
29 |
+
}
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Set adapter options
|
33 |
+
*
|
34 |
+
* @param array|\Traversable|AdapterOptions $options
|
35 |
+
* @return AbstractAdapter
|
36 |
+
*/
|
37 |
+
public function setOptions($options)
|
38 |
+
{
|
39 |
+
if (!$options instanceof AdapterOptions) {
|
40 |
+
$options = new AdapterOptions($options);
|
41 |
+
}
|
42 |
+
|
43 |
+
$this->options = $options;
|
44 |
+
return $this;
|
45 |
+
}
|
46 |
+
|
47 |
+
/**
|
48 |
+
* Get adapter options
|
49 |
+
*
|
50 |
+
* @return AdapterOptions
|
51 |
+
*/
|
52 |
+
public function getOptions()
|
53 |
+
{
|
54 |
+
if ($this->options === null) {
|
55 |
+
$this->options = new AdapterOptions();
|
56 |
+
}
|
57 |
+
return $this->options;
|
58 |
+
}
|
59 |
+
}
|
backend/vendor/zendframework/zend-serializer/Zend/Serializer/Adapter/AdapterInterface.php
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Zend Framework (http://framework.zend.com/)
|
4 |
+
*
|
5 |
+
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
+
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
+
*/
|
9 |
+
|
10 |
+
namespace Zend\Serializer\Adapter;
|
11 |
+
|
12 |
+
interface AdapterInterface
|
13 |
+
{
|
14 |
+
/**
|
15 |
+
* Generates a storable representation of a value.
|
16 |
+
*
|
17 |
+
* @param mixed $value Data to serialize
|
18 |
+
* @return string
|
19 |
+
* @throws \Zend\Serializer\Exception\ExceptionInterface
|
20 |
+
*/
|
21 |
+
public function serialize($value);
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Creates a PHP value from a stored representation.
|
25 |
+
*
|
26 |
+
* @param string $serialized Serialized string
|
27 |
+
* @return mixed
|
28 |
+
* @throws \Zend\Serializer\Exception\ExceptionInterface
|
29 |
+
*/
|
30 |
+
public function unserialize($serialized);
|
31 |
+
}
|
backend/vendor/zendframework/zend-serializer/Zend/Serializer/Adapter/AdapterOptions.php
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Zend Framework (http://framework.zend.com/)
|
4 |
+
*
|
5 |
+
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
+
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
+
*/
|
9 |
+
|
10 |
+
namespace Zend\Serializer\Adapter;
|
11 |
+
|
12 |
+
use Zend\Stdlib\AbstractOptions;
|
13 |
+
|
14 |
+
class AdapterOptions extends AbstractOptions
|
15 |
+
{
|
16 |
+
}
|
backend/vendor/zendframework/zend-serializer/Zend/Serializer/Adapter/IgBinary.php
ADDED
@@ -0,0 +1,85 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Zend Framework (http://framework.zend.com/)
|
4 |
+
*
|
5 |
+
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
+
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
+
*/
|
9 |
+
|
10 |
+
namespace Zend\Serializer\Adapter;
|
11 |
+
|
12 |
+
use Zend\Serializer\Exception;
|
13 |
+
use Zend\Stdlib\ErrorHandler;
|
14 |
+
|
15 |
+
class IgBinary extends AbstractAdapter
|
16 |
+
{
|
17 |
+
/**
|
18 |
+
* @var string Serialized null value
|
19 |
+
*/
|
20 |
+
private static $serializedNull = null;
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Constructor
|
24 |
+
*
|
25 |
+
* @throws Exception\ExtensionNotLoadedException If igbinary extension is not present
|
26 |
+
*/
|
27 |
+
public function __construct($options = null)
|
28 |
+
{
|
29 |
+
if (!extension_loaded('igbinary')) {
|
30 |
+
throw new Exception\ExtensionNotLoadedException(
|
31 |
+
'PHP extension "igbinary" is required for this adapter'
|
32 |
+
);
|
33 |
+
}
|
34 |
+
|
35 |
+
if (static::$serializedNull === null) {
|
36 |
+
static::$serializedNull = igbinary_serialize(null);
|
37 |
+
}
|
38 |
+
|
39 |
+
parent::__construct($options);
|
40 |
+
}
|
41 |
+
|
42 |
+
/**
|
43 |
+
* Serialize PHP value to igbinary
|
44 |
+
*
|
45 |
+
* @param mixed $value
|
46 |
+
* @return string
|
47 |
+
* @throws Exception\RuntimeException on igbinary error
|
48 |
+
*/
|
49 |
+
public function serialize($value)
|
50 |
+
{
|
51 |
+
ErrorHandler::start();
|
52 |
+
$ret = igbinary_serialize($value);
|
53 |
+
$err = ErrorHandler::stop();
|
54 |
+
|
55 |
+
if ($ret === false) {
|
56 |
+
throw new Exception\RuntimeException('Serialization failed', 0, $err);
|
57 |
+
}
|
58 |
+
|
59 |
+
return $ret;
|
60 |
+
}
|
61 |
+
|
62 |
+
/**
|
63 |
+
* Deserialize igbinary string to PHP value
|
64 |
+
*
|
65 |
+
* @param string $serialized
|
66 |
+
* @return mixed
|
67 |
+
* @throws Exception\RuntimeException on igbinary error
|
68 |
+
*/
|
69 |
+
public function unserialize($serialized)
|
70 |
+
{
|
71 |
+
if ($serialized === static::$serializedNull) {
|
72 |
+
return null;
|
73 |
+
}
|
74 |
+
|
75 |
+
ErrorHandler::start();
|
76 |
+
$ret = igbinary_unserialize($serialized);
|
77 |
+
$err = ErrorHandler::stop();
|
78 |
+
|
79 |
+
if ($ret === null) {
|
80 |
+
throw new Exception\RuntimeException('Unserialization failed', 0, $err);
|
81 |
+
}
|
82 |
+
|
83 |
+
return $ret;
|
84 |
+
}
|
85 |
+
}
|
backend/vendor/zendframework/zend-serializer/Zend/Serializer/Adapter/Json.php
ADDED
@@ -0,0 +1,97 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Zend Framework (http://framework.zend.com/)
|
4 |
+
*
|
5 |
+
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
+
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
+
*/
|
9 |
+
|
10 |
+
namespace Zend\Serializer\Adapter;
|
11 |
+
|
12 |
+
use Zend\Json\Json as ZendJson;
|
13 |
+
use Zend\Serializer\Exception;
|
14 |
+
|
15 |
+
class Json extends AbstractAdapter
|
16 |
+
{
|
17 |
+
/**
|
18 |
+
* @var JsonOptions
|
19 |
+
*/
|
20 |
+
protected $options = null;
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Set options
|
24 |
+
*
|
25 |
+
* @param array|\Traversable|JsonOptions $options
|
26 |
+
* @return Json
|
27 |
+
*/
|
28 |
+
public function setOptions($options)
|
29 |
+
{
|
30 |
+
if (!$options instanceof JsonOptions) {
|
31 |
+
$options = new JsonOptions($options);
|
32 |
+
}
|
33 |
+
|
34 |
+
$this->options = $options;
|
35 |
+
return $this;
|
36 |
+
}
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Get options
|
40 |
+
*
|
41 |
+
* @return JsonOptions
|
42 |
+
*/
|
43 |
+
public function getOptions()
|
44 |
+
{
|
45 |
+
if ($this->options === null) {
|
46 |
+
$this->options = new JsonOptions();
|
47 |
+
}
|
48 |
+
return $this->options;
|
49 |
+
}
|
50 |
+
|
51 |
+
/**
|
52 |
+
* Serialize PHP value to JSON
|
53 |
+
*
|
54 |
+
* @param mixed $value
|
55 |
+
* @return string
|
56 |
+
* @throws Exception\InvalidArgumentException
|
57 |
+
* @throws Exception\RuntimeException
|
58 |
+
*/
|
59 |
+
public function serialize($value)
|
60 |
+
{
|
61 |
+
$options = $this->getOptions();
|
62 |
+
$cycleCheck = $options->getCycleCheck();
|
63 |
+
$opts = array(
|
64 |
+
'enableJsonExprFinder' => $options->getEnableJsonExprFinder(),
|
65 |
+
'objectDecodeType' => $options->getObjectDecodeType(),
|
66 |
+
);
|
67 |
+
|
68 |
+
try {
|
69 |
+
return ZendJson::encode($value, $cycleCheck, $opts);
|
70 |
+
} catch (\InvalidArgumentException $e) {
|
71 |
+
throw new Exception\InvalidArgumentException('Serialization failed: ' . $e->getMessage(), 0, $e);
|
72 |
+
} catch (\Exception $e) {
|
73 |
+
throw new Exception\RuntimeException('Serialization failed: ' . $e->getMessage(), 0, $e);
|
74 |
+
}
|
75 |
+
}
|
76 |
+
|
77 |
+
/**
|
78 |
+
* Deserialize JSON to PHP value
|
79 |
+
*
|
80 |
+
* @param string $json
|
81 |
+
* @return mixed
|
82 |
+
* @throws Exception\InvalidArgumentException
|
83 |
+
* @throws Exception\RuntimeException
|
84 |
+
*/
|
85 |
+
public function unserialize($json)
|
86 |
+
{
|
87 |
+
try {
|
88 |
+
$ret = ZendJson::decode($json, $this->getOptions()->getObjectDecodeType());
|
89 |
+
} catch (\InvalidArgumentException $e) {
|
90 |
+
throw new Exception\InvalidArgumentException('Unserialization failed: ' . $e->getMessage(), 0, $e);
|
91 |
+
} catch (\Exception $e) {
|
92 |
+
throw new Exception\RuntimeException('Unserialization failed: ' . $e->getMessage(), 0, $e);
|
93 |
+
}
|
94 |
+
|
95 |
+
return $ret;
|
96 |
+
}
|
97 |
+
}
|
backend/vendor/zendframework/zend-serializer/Zend/Serializer/Adapter/JsonOptions.php
ADDED
@@ -0,0 +1,87 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Zend Framework (http://framework.zend.com/)
|
4 |
+
*
|
5 |
+
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
+
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
+
*/
|
9 |
+
|
10 |
+
namespace Zend\Serializer\Adapter;
|
11 |
+
|
12 |
+
use Zend\Json\Json as ZendJson;
|
13 |
+
use Zend\Serializer\Exception;
|
14 |
+
|
15 |
+
class JsonOptions extends AdapterOptions
|
16 |
+
{
|
17 |
+
/**
|
18 |
+
* @var int
|
19 |
+
*/
|
20 |
+
protected $cycleCheck = false;
|
21 |
+
|
22 |
+
protected $enableJsonExprFinder = false;
|
23 |
+
|
24 |
+
protected $objectDecodeType = ZendJson::TYPE_ARRAY;
|
25 |
+
|
26 |
+
/**
|
27 |
+
* @param bool $flag
|
28 |
+
* @return JsonOptions
|
29 |
+
*/
|
30 |
+
public function setCycleCheck($flag)
|
31 |
+
{
|
32 |
+
$this->cycleCheck = (bool) $flag;
|
33 |
+
return $this;
|
34 |
+
}
|
35 |
+
|
36 |
+
/**
|
37 |
+
* @return bool
|
38 |
+
*/
|
39 |
+
public function getCycleCheck()
|
40 |
+
{
|
41 |
+
return $this->cycleCheck;
|
42 |
+
}
|
43 |
+
|
44 |
+
/**
|
45 |
+
* @param bool $flag
|
46 |
+
* @return JsonOptions
|
47 |
+
*/
|
48 |
+
public function setEnableJsonExprFinder($flag)
|
49 |
+
{
|
50 |
+
$this->enableJsonExprFinder = (bool) $flag;
|
51 |
+
return $this;
|
52 |
+
}
|
53 |
+
|
54 |
+
/**
|
55 |
+
* @return bool
|
56 |
+
*/
|
57 |
+
public function getEnableJsonExprFinder()
|
58 |
+
{
|
59 |
+
return $this->enableJsonExprFinder;
|
60 |
+
}
|
61 |
+
|
62 |
+
/**
|
63 |
+
* @param int $type
|
64 |
+
* @return JsonOptions
|
65 |
+
* @throws Exception\InvalidArgumentException
|
66 |
+
*/
|
67 |
+
public function setObjectDecodeType($type)
|
68 |
+
{
|
69 |
+
if ($type != ZendJson::TYPE_ARRAY && $type != ZendJson::TYPE_OBJECT) {
|
70 |
+
throw new Exception\InvalidArgumentException(
|
71 |
+
'Unknown decode type: ' . $type
|
72 |
+
);
|
73 |
+
}
|
74 |
+
|
75 |
+
$this->objectDecodeType = (int) $type;
|
76 |
+
|
77 |
+
return $this;
|
78 |
+
}
|
79 |
+
|
80 |
+
/**
|
81 |
+
* @return int
|
82 |
+
*/
|
83 |
+
public function getObjectDecodeType()
|
84 |
+
{
|
85 |
+
return $this->objectDecodeType;
|
86 |
+
}
|
87 |
+
}
|
backend/vendor/zendframework/zend-serializer/Zend/Serializer/Adapter/MsgPack.php
ADDED
@@ -0,0 +1,85 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Zend Framework (http://framework.zend.com/)
|
4 |
+
*
|
5 |
+
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
+
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
+
*/
|
9 |
+
|
10 |
+
namespace Zend\Serializer\Adapter;
|
11 |
+
|
12 |
+
use Zend\Serializer\Exception;
|
13 |
+
use Zend\Stdlib\ErrorHandler;
|
14 |
+
|
15 |
+
class MsgPack extends AbstractAdapter
|
16 |
+
{
|
17 |
+
/**
|
18 |
+
* @var string Serialized 0 value
|
19 |
+
*/
|
20 |
+
private static $serialized0 = null;
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Constructor
|
24 |
+
*
|
25 |
+
* @throws Exception\ExtensionNotLoadedException If msgpack extension is not present
|
26 |
+
*/
|
27 |
+
public function __construct($options = null)
|
28 |
+
{
|
29 |
+
if (!extension_loaded('msgpack')) {
|
30 |
+
throw new Exception\ExtensionNotLoadedException(
|
31 |
+
'PHP extension "msgpack" is required for this adapter'
|
32 |
+
);
|
33 |
+
}
|
34 |
+
|
35 |
+
if (static::$serialized0 === null) {
|
36 |
+
static::$serialized0 = msgpack_serialize(0);
|
37 |
+
}
|
38 |
+
|
39 |
+
parent::__construct($options);
|
40 |
+
}
|
41 |
+
|
42 |
+
/**
|
43 |
+
* Serialize PHP value to msgpack
|
44 |
+
*
|
45 |
+
* @param mixed $value
|
46 |
+
* @return string
|
47 |
+
* @throws Exception\RuntimeException on msgpack error
|
48 |
+
*/
|
49 |
+
public function serialize($value)
|
50 |
+
{
|
51 |
+
ErrorHandler::start();
|
52 |
+
$ret = msgpack_serialize($value);
|
53 |
+
$err = ErrorHandler::stop();
|
54 |
+
|
55 |
+
if ($ret === false) {
|
56 |
+
throw new Exception\RuntimeException('Serialization failed', 0, $err);
|
57 |
+
}
|
58 |
+
|
59 |
+
return $ret;
|
60 |
+
}
|
61 |
+
|
62 |
+
/**
|
63 |
+
* Deserialize msgpack string to PHP value
|
64 |
+
*
|
65 |
+
* @param string $serialized
|
66 |
+
* @return mixed
|
67 |
+
* @throws Exception\RuntimeException on msgpack error
|
68 |
+
*/
|
69 |
+
public function unserialize($serialized)
|
70 |
+
{
|
71 |
+
if ($serialized === static::$serialized0) {
|
72 |
+
return 0;
|
73 |
+
}
|
74 |
+
|
75 |
+
ErrorHandler::start();
|
76 |
+
$ret = msgpack_unserialize($serialized);
|
77 |
+
$err = ErrorHandler::stop();
|
78 |
+
|
79 |
+
if ($ret === 0) {
|
80 |
+
throw new Exception\RuntimeException('Unserialization failed', 0, $err);
|
81 |
+
}
|
82 |
+
|
83 |
+
return $ret;
|
84 |
+
}
|
85 |
+
}
|
backend/vendor/zendframework/zend-serializer/Zend/Serializer/Adapter/PhpCode.php
ADDED
@@ -0,0 +1,60 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Zend Framework (http://framework.zend.com/)
|
4 |
+
*
|
5 |
+
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
+
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
+
*/
|
9 |
+
|
10 |
+
namespace Zend\Serializer\Adapter;
|
11 |
+
|
12 |
+
use Zend\Serializer\Exception;
|
13 |
+
use Zend\Stdlib\ErrorHandler;
|
14 |
+
|
15 |
+
class PhpCode extends AbstractAdapter
|
16 |
+
{
|
17 |
+
/**
|
18 |
+
* Serialize PHP using var_export
|
19 |
+
*
|
20 |
+
* @param mixed $value
|
21 |
+
* @return string
|
22 |
+
*/
|
23 |
+
public function serialize($value)
|
24 |
+
{
|
25 |
+
return var_export($value, true);
|
26 |
+
}
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Deserialize PHP string
|
30 |
+
*
|
31 |
+
* Warning: this uses eval(), and should likely be avoided.
|
32 |
+
*
|
33 |
+
* @param string $code
|
34 |
+
* @return mixed
|
35 |
+
* @throws Exception\RuntimeException on eval error
|
36 |
+
*/
|
37 |
+
public function unserialize($code)
|
38 |
+
{
|
39 |
+
ErrorHandler::start(E_ALL);
|
40 |
+
$ret = null;
|
41 |
+
// This suppression is due to the fact that the ErrorHandler cannot
|
42 |
+
// catch syntax errors, and is intentionally left in place.
|
43 |
+
$eval = @eval('$ret=' . $code . ';');
|
44 |
+
$err = ErrorHandler::stop();
|
45 |
+
|
46 |
+
if ($eval === false || $err) {
|
47 |
+
$msg = 'eval failed';
|
48 |
+
|
49 |
+
// Error handler doesn't catch syntax errors
|
50 |
+
if ($eval === false) {
|
51 |
+
$lastErr = error_get_last();
|
52 |
+
$msg .= ': ' . $lastErr['message'];
|
53 |
+
}
|
54 |
+
|
55 |
+
throw new Exception\RuntimeException($msg, 0, $err);
|
56 |
+
}
|
57 |
+
|
58 |
+
return $ret;
|
59 |
+
}
|
60 |
+
}
|
backend/vendor/zendframework/zend-serializer/Zend/Serializer/Adapter/PhpSerialize.php
ADDED
@@ -0,0 +1,86 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Zend Framework (http://framework.zend.com/)
|
4 |
+
*
|
5 |
+
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
+
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
+
*/
|
9 |
+
|
10 |
+
namespace Zend\Serializer\Adapter;
|
11 |
+
|
12 |
+
use Zend\Serializer\Exception;
|
13 |
+
use Zend\Stdlib\ErrorHandler;
|
14 |
+
|
15 |
+
class PhpSerialize extends AbstractAdapter
|
16 |
+
{
|
17 |
+
/**
|
18 |
+
* Serialized boolean false value
|
19 |
+
*
|
20 |
+
* @var null|string
|
21 |
+
*/
|
22 |
+
private static $serializedFalse = null;
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Constructor
|
26 |
+
*/
|
27 |
+
public function __construct($options = null)
|
28 |
+
{
|
29 |
+
// needed to check if a returned false is based on a serialize false
|
30 |
+
// or based on failure (igbinary can overwrite [un]serialize functions)
|
31 |
+
if (static::$serializedFalse === null) {
|
32 |
+
static::$serializedFalse = serialize(false);
|
33 |
+
}
|
34 |
+
|
35 |
+
parent::__construct($options);
|
36 |
+
}
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Serialize using serialize()
|
40 |
+
*
|
41 |
+
* @param mixed $value
|
42 |
+
* @return string
|
43 |
+
* @throws Exception\RuntimeException On serialize error
|
44 |
+
*/
|
45 |
+
public function serialize($value)
|
46 |
+
{
|
47 |
+
ErrorHandler::start();
|
48 |
+
$ret = serialize($value);
|
49 |
+
$err = ErrorHandler::stop();
|
50 |
+
if ($err) {
|
51 |
+
throw new Exception\RuntimeException('Serialization failed', 0, $err);
|
52 |
+
}
|
53 |
+
|
54 |
+
return $ret;
|
55 |
+
}
|
56 |
+
|
57 |
+
/**
|
58 |
+
* Unserialize
|
59 |
+
*
|
60 |
+
* @todo Allow integration with unserialize_callback_func
|
61 |
+
* @param string $serialized
|
62 |
+
* @return mixed
|
63 |
+
* @throws Exception\RuntimeException on unserialize error
|
64 |
+
*/
|
65 |
+
public function unserialize($serialized)
|
66 |
+
{
|
67 |
+
if (!is_string($serialized) || !preg_match('/^((s|i|d|b|a|O|C):|N;)/', $serialized)) {
|
68 |
+
return $serialized;
|
69 |
+
}
|
70 |
+
|
71 |
+
// If we have a serialized boolean false value, just return false;
|
72 |
+
// prevents the unserialize handler from creating an error.
|
73 |
+
if ($serialized === static::$serializedFalse) {
|
74 |
+
return false;
|
75 |
+
}
|
76 |
+
|
77 |
+
ErrorHandler::start(E_NOTICE);
|
78 |
+
$ret = unserialize($serialized);
|
79 |
+
$err = ErrorHandler::stop();
|
80 |
+
if ($ret === false) {
|
81 |
+
throw new Exception\RuntimeException('Unserialization failed', 0, $err);
|
82 |
+
}
|
83 |
+
|
84 |
+
return $ret;
|
85 |
+
}
|
86 |
+
}
|
backend/vendor/zendframework/zend-serializer/Zend/Serializer/Adapter/PythonPickle.php
ADDED
@@ -0,0 +1,1356 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Zend Framework (http://framework.zend.com/)
|
4 |
+
*
|
5 |
+
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
+
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
+
*/
|
9 |
+
|
10 |
+
namespace Zend\Serializer\Adapter;
|
11 |
+
|
12 |
+
use stdClass;
|
13 |
+
use Traversable;
|
14 |
+
use Zend\Math\BigInteger;
|
15 |
+
use Zend\Serializer\Exception;
|
16 |
+
use Zend\Stdlib\ArrayUtils;
|
17 |
+
|
18 |
+
/**
|
19 |
+
* @link http://www.python.org
|
20 |
+
* @see Phython3.1/Lib/pickle.py
|
21 |
+
* @see Phython3.1/Modules/_pickle.c
|
22 |
+
* @link http://pickle-js.googlecode.com
|
23 |
+
*/
|
24 |
+
class PythonPickle extends AbstractAdapter
|
25 |
+
{
|
26 |
+
/**
|
27 |
+
* Pickle opcodes. See pickletools.py for extensive docs.
|
28 |
+
* @link http://hg.python.org/cpython/file/2.7/Lib/pickletools.py
|
29 |
+
* The listing here is in kind-of alphabetical order of 1-character pickle code.
|
30 |
+
* pickletools groups them by purpose.
|
31 |
+
*/
|
32 |
+
const OP_MARK = '('; // push special markobject on stack
|
33 |
+
const OP_STOP = '.'; // every pickle ends with STOP
|
34 |
+
const OP_POP = '0'; // discard topmost stack item
|
35 |
+
const OP_POP_MARK = '1'; // discard stack top through topmost markobject
|
36 |
+
const OP_DUP = '2'; // duplicate top stack item
|
37 |
+
const OP_FLOAT = 'F'; // push float object; decimal string argument
|
38 |
+
const OP_INT = 'I'; // push integer or bool; decimal string argument
|
39 |
+
const OP_BININT = 'J'; // push four-byte signed int
|
40 |
+
const OP_BININT1 = 'K'; // push 1-byte unsigned int
|
41 |
+
const OP_LONG = 'L'; // push long; decimal string argument
|
42 |
+
const OP_BININT2 = 'M'; // push 2-byte unsigned int
|
43 |
+
const OP_NONE = 'N'; // push None
|
44 |
+
const OP_PERSID = 'P'; // push persistent object; id is taken from string arg
|
45 |
+
const OP_BINPERSID = 'Q'; // " " " ; " " " " stack
|
46 |
+
const OP_REDUCE = 'R'; // apply callable to argtuple, both on stack
|
47 |
+
const OP_STRING = 'S'; // push string; NL-terminated string argument
|
48 |
+
const OP_BINSTRING = 'T'; // push string; counted binary string argument
|
49 |
+
const OP_SHORT_BINSTRING = 'U'; // " " ; " " " " < 256 bytes
|
50 |
+
const OP_UNICODE = 'V'; // push Unicode string; raw-unicode-escaped'd argument
|
51 |
+
const OP_BINUNICODE = 'X'; // " " " ; counted UTF-8 string argument
|
52 |
+
const OP_APPEND = 'a'; // append stack top to list below it
|
53 |
+
const OP_BUILD = 'b'; // call __setstate__ or __dict__.update()
|
54 |
+
const OP_GLOBAL = 'c'; // push self.find_class(modname, name); 2 string args
|
55 |
+
const OP_DICT = 'd'; // build a dict from stack items
|
56 |
+
const OP_EMPTY_DICT = '}'; // push empty dict
|
57 |
+
const OP_APPENDS = 'e'; // extend list on stack by topmost stack slice
|
58 |
+
const OP_GET = 'g'; // push item from memo on stack; index is string arg
|
59 |
+
const OP_BINGET = 'h'; // " " " " " " ; " " 1-byte arg
|
60 |
+
const OP_INST = 'i'; // build & push class instance
|
61 |
+
const OP_LONG_BINGET = 'j'; // push item from memo on stack; index is 4-byte arg
|
62 |
+
const OP_LIST = 'l'; // build list from topmost stack items
|
63 |
+
const OP_EMPTY_LIST = ']'; // push empty list
|
64 |
+
const OP_OBJ = 'o'; // build & push class instance
|
65 |
+
const OP_PUT = 'p'; // store stack top in memo; index is string arg
|
66 |
+
const OP_BINPUT = 'q'; // " " " " " ; " " 1-byte arg
|
67 |
+
const OP_LONG_BINPUT = 'r'; // " " " " " ; " " 4-byte arg
|
68 |
+
const OP_SETITEM = 's'; // add key+value pair to dict
|
69 |
+
const OP_TUPLE = 't'; // build tuple from topmost stack items
|
70 |
+
const OP_EMPTY_TUPLE = ')'; // push empty tuple
|
71 |
+
const OP_SETITEMS = 'u'; // modify dict by adding topmost key+value pairs
|
72 |
+
const OP_BINFLOAT = 'G'; // push float; arg is 8-byte float encoding
|
73 |
+
|
74 |
+
/* Protocol 2 */
|
75 |
+
const OP_PROTO = "\x80"; // identify pickle protocol
|
76 |
+
const OP_NEWOBJ = "\x81"; // build object by applying cls.__new__ to argtuple
|
77 |
+
const OP_EXT1 = "\x82"; // push object from extension registry; 1-byte index
|
78 |
+
const OP_EXT2 = "\x83"; // ditto, but 2-byte index
|
79 |
+
const OP_EXT4 = "\x84"; // ditto, but 4-byte index
|
80 |
+
const OP_TUPLE1 = "\x85"; // build 1-tuple from stack top
|
81 |
+
const OP_TUPLE2 = "\x86"; // build 2-tuple from two topmost stack items
|
82 |
+
const OP_TUPLE3 = "\x87"; // build 3-tuple from three topmost stack items
|
83 |
+
const OP_NEWTRUE = "\x88"; // push True
|
84 |
+
const OP_NEWFALSE = "\x89"; // push False
|
85 |
+
const OP_LONG1 = "\x8a"; // push long from < 256 bytes
|
86 |
+
const OP_LONG4 = "\x8b"; // push really big long
|
87 |
+
|
88 |
+
/* Protocol 3 (Python 3.x) */
|
89 |
+
const OP_BINBYTES = 'B'; // push bytes; counted binary string argument
|
90 |
+
const OP_SHORT_BINBYTES = 'C'; // " " ; " " " " < 256 bytes
|
91 |
+
|
92 |
+
/**
|
93 |
+
* Whether or not the system is little-endian
|
94 |
+
*
|
95 |
+
* @var bool
|
96 |
+
*/
|
97 |
+
protected static $isLittleEndian = null;
|
98 |
+
|
99 |
+
/**
|
100 |
+
* @var array Strings representing quotes
|
101 |
+
*/
|
102 |
+
protected static $quoteString = array(
|
103 |
+
'\\' => '\\\\',
|
104 |
+
"\x00" => '\\x00', "\x01" => '\\x01', "\x02" => '\\x02', "\x03" => '\\x03',
|
105 |
+
"\x04" => '\\x04', "\x05" => '\\x05', "\x06" => '\\x06', "\x07" => '\\x07',
|
106 |
+
"\x08" => '\\x08', "\x09" => '\\t', "\x0a" => '\\n', "\x0b" => '\\x0b',
|
107 |
+
"\x0c" => '\\x0c', "\x0d" => '\\r', "\x0e" => '\\x0e', "\x0f" => '\\x0f',
|
108 |
+
"\x10" => '\\x10', "\x11" => '\\x11', "\x12" => '\\x12', "\x13" => '\\x13',
|
109 |
+
"\x14" => '\\x14', "\x15" => '\\x15', "\x16" => '\\x16', "\x17" => '\\x17',
|
110 |
+
"\x18" => '\\x18', "\x19" => '\\x19', "\x1a" => '\\x1a', "\x1b" => '\\x1b',
|
111 |
+
"\x1c" => '\\x1c', "\x1d" => '\\x1d', "\x1e" => '\\x1e', "\x1f" => '\\x1f',
|
112 |
+
"\xff" => '\\xff'
|
113 |
+
);
|
114 |
+
|
115 |
+
// process vars
|
116 |
+
protected $protocol = null;
|
117 |
+
protected $memo = array();
|
118 |
+
protected $pickle = '';
|
119 |
+
protected $pickleLen = 0;
|
120 |
+
protected $pos = 0;
|
121 |
+
protected $stack = array();
|
122 |
+
protected $marker = null;
|
123 |
+
|
124 |
+
/**
|
125 |
+
* @var BigInteger\Adapter\AdapterInterface
|
126 |
+
*/
|
127 |
+
protected $bigIntegerAdapter = null;
|
128 |
+
|
129 |
+
/**
|
130 |
+
* @var PythonPickleOptions
|
131 |
+
*/
|
132 |
+
protected $options = null;
|
133 |
+
|
134 |
+
/**
|
135 |
+
* Constructor.
|
136 |
+
*
|
137 |
+
* @param array|Traversable|PythonPickleOptions $options Optional
|
138 |
+
*/
|
139 |
+
public function __construct($options = null)
|
140 |
+
{
|
141 |
+
// init
|
142 |
+
if (static::$isLittleEndian === null) {
|
143 |
+
static::$isLittleEndian = (pack('l', 1) === "\x01\x00\x00\x00");
|
144 |
+
}
|
145 |
+
|
146 |
+
$this->marker = new stdClass();
|
147 |
+
|
148 |
+
parent::__construct($options);
|
149 |
+
}
|
150 |
+
|
151 |
+
/**
|
152 |
+
* Set options
|
153 |
+
*
|
154 |
+
* @param array|Traversable|PythonPickleOptions $options
|
155 |
+
* @return PythonPickle
|
156 |
+
*/
|
157 |
+
public function setOptions($options)
|
158 |
+
{
|
159 |
+
if (!$options instanceof PythonPickleOptions) {
|
160 |
+
$options = new PythonPickleOptions($options);
|
161 |
+
}
|
162 |
+
|
163 |
+
$this->options = $options;
|
164 |
+
return $this;
|
165 |
+
}
|
166 |
+
|
167 |
+
/**
|
168 |
+
* Get options
|
169 |
+
*
|
170 |
+
* @return PythonPickleOptions
|
171 |
+
*/
|
172 |
+
public function getOptions()
|
173 |
+
{
|
174 |
+
if ($this->options === null) {
|
175 |
+
$this->options = new PythonPickleOptions();
|
176 |
+
}
|
177 |
+
return $this->options;
|
178 |
+
}
|
179 |
+
|
180 |
+
/* serialize */
|
181 |
+
|
182 |
+
/**
|
183 |
+
* Serialize PHP to PythonPickle format
|
184 |
+
*
|
185 |
+
* @param mixed $value
|
186 |
+
* @return string
|
187 |
+
*/
|
188 |
+
public function serialize($value)
|
189 |
+
{
|
190 |
+
$this->clearProcessVars();
|
191 |
+
$this->protocol = $this->getOptions()->getProtocol();
|
192 |
+
|
193 |
+
// write
|
194 |
+
if ($this->protocol >= 2) {
|
195 |
+
$this->writeProto($this->protocol);
|
196 |
+
}
|
197 |
+
$this->write($value);
|
198 |
+
$this->writeStop();
|
199 |
+
|
200 |
+
$pickle = $this->pickle;
|
201 |
+
$this->clearProcessVars();
|
202 |
+
|
203 |
+
return $pickle;
|
204 |
+
}
|
205 |
+
|
206 |
+
/**
|
207 |
+
* Write a value
|
208 |
+
*
|
209 |
+
* @param mixed $value
|
210 |
+
* @throws Exception\RuntimeException on invalid or unrecognized value type
|
211 |
+
*/
|
212 |
+
protected function write($value)
|
213 |
+
{
|
214 |
+
if ($value === null) {
|
215 |
+
$this->writeNull();
|
216 |
+
} elseif (is_bool($value)) {
|
217 |
+
$this->writeBool($value);
|
218 |
+
} elseif (is_int($value)) {
|
219 |
+
$this->writeInt($value);
|
220 |
+
} elseif (is_float($value)) {
|
221 |
+
$this->writeFloat($value);
|
222 |
+
} elseif (is_string($value)) {
|
223 |
+
// TODO: write unicode / binary
|
224 |
+
$this->writeString($value);
|
225 |
+
} elseif (is_array($value)) {
|
226 |
+
if (ArrayUtils::isList($value)) {
|
227 |
+
$this->writeArrayList($value);
|
228 |
+
} else {
|
229 |
+
$this->writeArrayDict($value);
|
230 |
+
}
|
231 |
+
} elseif (is_object($value)) {
|
232 |
+
$this->writeObject($value);
|
233 |
+
} else {
|
234 |
+
throw new Exception\RuntimeException(sprintf(
|
235 |
+
'PHP-Type "%s" can not be serialized by %s',
|
236 |
+
gettype($value),
|
237 |
+
get_class($this)
|
238 |
+
));
|
239 |
+
}
|
240 |
+
}
|
241 |
+
|
242 |
+
/**
|
243 |
+
* Write pickle protocol
|
244 |
+
*
|
245 |
+
* @param int $protocol
|
246 |
+
*/
|
247 |
+
protected function writeProto($protocol)
|
248 |
+
{
|
249 |
+
$this->pickle .= self::OP_PROTO . $protocol;
|
250 |
+
}
|
251 |
+
|
252 |
+
/**
|
253 |
+
* Write a get
|
254 |
+
*
|
255 |
+
* @param int $id Id of memo
|
256 |
+
*/
|
257 |
+
protected function writeGet($id)
|
258 |
+
{
|
259 |
+
if ($this->protocol == 0) {
|
260 |
+
$this->pickle .= self::OP_GET . $id . "\r\n";
|
261 |
+
} elseif ($id <= 0xFF) {
|
262 |
+
// BINGET + chr(i)
|
263 |
+
$this->pickle .= self::OP_BINGET . chr($id);
|
264 |
+
} else {
|
265 |
+
// LONG_BINGET + pack("<i", i)
|
266 |
+
$bin = pack('l', $id);
|
267 |
+
if (static::$isLittleEndian === false) {
|
268 |
+
$bin = strrev($bin);
|
269 |
+
}
|
270 |
+
$this->pickle .= self::OP_LONG_BINGET . $bin;
|
271 |
+
}
|
272 |
+
}
|
273 |
+
|
274 |
+
/**
|
275 |
+
* Write a put
|
276 |
+
*
|
277 |
+
* @param int $id Id of memo
|
278 |
+
*/
|
279 |
+
protected function writePut($id)
|
280 |
+
{
|
281 |
+
if ($this->protocol == 0) {
|
282 |
+
$this->pickle .= self::OP_PUT . $id . "\r\n";
|
283 |
+
} elseif ($id <= 0xff) {
|
284 |
+
// BINPUT + chr(i)
|
285 |
+
$this->pickle .= self::OP_BINPUT . chr($id);
|
286 |
+
} else {
|
287 |
+
// LONG_BINPUT + pack("<i", i)
|
288 |
+
$bin = pack('l', $id);
|
289 |
+
if (static::$isLittleEndian === false) {
|
290 |
+
$bin = strrev($bin);
|
291 |
+
}
|
292 |
+
$this->pickle .= self::OP_LONG_BINPUT . $bin;
|
293 |
+
}
|
294 |
+
}
|
295 |
+
|
296 |
+
/**
|
297 |
+
* Write a null as None
|
298 |
+
*
|
299 |
+
*/
|
300 |
+
protected function writeNull()
|
301 |
+
{
|
302 |
+
$this->pickle .= self::OP_NONE;
|
303 |
+
}
|
304 |
+
|
305 |
+
/**
|
306 |
+
* Write boolean value
|
307 |
+
*
|
308 |
+
* @param bool $value
|
309 |
+
*/
|
310 |
+
protected function writeBool($value)
|
311 |
+
{
|
312 |
+
if ($this->protocol >= 2) {
|
313 |
+
$this->pickle .= ($value === true) ? self::OP_NEWTRUE : self::OP_NEWFALSE;
|
314 |
+
} else {
|
315 |
+
$this->pickle .= self::OP_INT . (($value === true) ? '01' : '00') . "\r\n";
|
316 |
+
}
|
317 |
+
}
|
318 |
+
|
319 |
+
/**
|
320 |
+
* Write an integer value
|
321 |
+
*
|
322 |
+
* @param int $value
|
323 |
+
*/
|
324 |
+
protected function writeInt($value)
|
325 |
+
{
|
326 |
+
if ($this->protocol == 0) {
|
327 |
+
$this->pickle .= self::OP_INT . $value . "\r\n";
|
328 |
+
return;
|
329 |
+
}
|
330 |
+
|
331 |
+
if ($value >= 0) {
|
332 |
+
if ($value <= 0xFF) {
|
333 |
+
// self.write(BININT1 + chr(obj))
|
334 |
+
$this->pickle .= self::OP_BININT1 . chr($value);
|
335 |
+
} elseif ($value <= 0xFFFF) {
|
336 |
+
// self.write("%c%c%c" % (BININT2, obj&0xff, obj>>8))
|
337 |
+
$this->pickle .= self::OP_BININT2 . pack('v', $value);
|
338 |
+
}
|
339 |
+
return;
|
340 |
+
}
|
341 |
+
|
342 |
+
// Next check for 4-byte signed ints:
|
343 |
+
$highBits = $value >> 31; // note that Python shift sign-extends
|
344 |
+
if ($highBits == 0 || $highBits == -1) {
|
345 |
+
// All high bits are copies of bit 2**31, so the value
|
346 |
+
// fits in a 4-byte signed int.
|
347 |
+
// self.write(BININT + pack("<i", obj))
|
348 |
+
$bin = pack('l', $value);
|
349 |
+
if (static::$isLittleEndian === false) {
|
350 |
+
$bin = strrev($bin);
|
351 |
+
}
|
352 |
+
$this->pickle .= self::OP_BININT . $bin;
|
353 |
+
return;
|
354 |
+
}
|
355 |
+
}
|
356 |
+
|
357 |
+
/**
|
358 |
+
* Write a float value
|
359 |
+
*
|
360 |
+
* @param float $value
|
361 |
+
*/
|
362 |
+
protected function writeFloat($value)
|
363 |
+
{
|
364 |
+
if ($this->protocol == 0) {
|
365 |
+
$this->pickle .= self::OP_FLOAT . $value . "\r\n";
|
366 |
+
} else {
|
367 |
+
// self.write(BINFLOAT + pack('>d', obj))
|
368 |
+
$bin = pack('d', $value);
|
369 |
+
if (static::$isLittleEndian === true) {
|
370 |
+
$bin = strrev($bin);
|
371 |
+
}
|
372 |
+
$this->pickle .= self::OP_BINFLOAT . $bin;
|
373 |
+
}
|
374 |
+
}
|
375 |
+
|
376 |
+
/**
|
377 |
+
* Write a string value
|
378 |
+
*
|
379 |
+
* @param string $value
|
380 |
+
*/
|
381 |
+
protected function writeString($value)
|
382 |
+
{
|
383 |
+
if (($id = $this->searchMemo($value)) !== false) {
|
384 |
+
$this->writeGet($id);
|
385 |
+
return;
|
386 |
+
}
|
387 |
+
|
388 |
+
if ($this->protocol == 0) {
|
389 |
+
$this->pickle .= self::OP_STRING . $this->quoteString($value) . "\r\n";
|
390 |
+
} else {
|
391 |
+
$n = strlen($value);
|
392 |
+
if ($n <= 0xFF) {
|
393 |
+
// self.write(SHORT_BINSTRING + chr(n) + obj)
|
394 |
+
$this->pickle .= self::OP_SHORT_BINSTRING . chr($n) . $value;
|
395 |
+
} else {
|
396 |
+
// self.write(BINSTRING + pack("<i", n) + obj)
|
397 |
+
$binLen = pack('l', $n);
|
398 |
+
if (static::$isLittleEndian === false) {
|
399 |
+
$binLen = strrev($binLen);
|
400 |
+
}
|
401 |
+
$this->pickle .= self::OP_BINSTRING . $binLen . $value;
|
402 |
+
}
|
403 |
+
}
|
404 |
+
|
405 |
+
$this->memorize($value);
|
406 |
+
}
|
407 |
+
|
408 |
+
/**
|
409 |
+
* Write an associative array value as dictionary
|
410 |
+
*
|
411 |
+
* @param array|Traversable $value
|
412 |
+
*/
|
413 |
+
protected function writeArrayDict($value)
|
414 |
+
{
|
415 |
+
if (($id = $this->searchMemo($value)) !== false) {
|
416 |
+
$this->writeGet($id);
|
417 |
+
return;
|
418 |
+
}
|
419 |
+
|
420 |
+
$this->pickle .= self::OP_MARK . self::OP_DICT;
|
421 |
+
$this->memorize($value);
|
422 |
+
|
423 |
+
foreach ($value as $k => $v) {
|
424 |
+
$this->write($k);
|
425 |
+
$this->write($v);
|
426 |
+
$this->pickle .= self::OP_SETITEM;
|
427 |
+
}
|
428 |
+
}
|
429 |
+
|
430 |
+
/**
|
431 |
+
* Write a simple array value as list
|
432 |
+
*
|
433 |
+
* @param array $value
|
434 |
+
*/
|
435 |
+
protected function writeArrayList(array $value)
|
436 |
+
{
|
437 |
+
if (($id = $this->searchMemo($value)) !== false) {
|
438 |
+
$this->writeGet($id);
|
439 |
+
return;
|
440 |
+
}
|
441 |
+
|
442 |
+
$this->pickle .= self::OP_MARK . self::OP_LIST;
|
443 |
+
$this->memorize($value);
|
444 |
+
|
445 |
+
foreach ($value as $v) {
|
446 |
+
$this->write($v);
|
447 |
+
$this->pickle .= self::OP_APPEND;
|
448 |
+
}
|
449 |
+
}
|
450 |
+
|
451 |
+
/**
|
452 |
+
* Write an object as a dictionary
|
453 |
+
*
|
454 |
+
* @param object $value
|
455 |
+
*/
|
456 |
+
protected function writeObject($value)
|
457 |
+
{
|
458 |
+
// The main differences between a SplFixedArray and a normal PHP array is
|
459 |
+
// that the SplFixedArray is of fixed length and allows only integers
|
460 |
+
// within the range as indexes.
|
461 |
+
if ($value instanceof \SplFixedArray) {
|
462 |
+
$this->writeArrayList($value->toArray());
|
463 |
+
|
464 |
+
// Use the object method toArray if available
|
465 |
+
} elseif (method_exists($value, 'toArray')) {
|
466 |
+
$this->writeArrayDict($value->toArray());
|
467 |
+
|
468 |
+
// If the object is an iterator simply iterate it
|
469 |
+
// and convert it to a dictionary
|
470 |
+
} elseif ($value instanceof Traversable) {
|
471 |
+
$this->writeArrayDict($value);
|
472 |
+
|
473 |
+
// other objects are simply converted by using its properties
|
474 |
+
} else {
|
475 |
+
$this->writeArrayDict(get_object_vars($value));
|
476 |
+
}
|
477 |
+
}
|
478 |
+
|
479 |
+
/**
|
480 |
+
* Write stop
|
481 |
+
*/
|
482 |
+
protected function writeStop()
|
483 |
+
{
|
484 |
+
$this->pickle .= self::OP_STOP;
|
485 |
+
}
|
486 |
+
|
487 |
+
/* serialize helper */
|
488 |
+
|
489 |
+
/**
|
490 |
+
* Add a value to the memo and write the id
|
491 |
+
*
|
492 |
+
* @param mixed $value
|
493 |
+
*/
|
494 |
+
protected function memorize($value)
|
495 |
+
{
|
496 |
+
$id = count($this->memo);
|
497 |
+
$this->memo[$id] = $value;
|
498 |
+
$this->writePut($id);
|
499 |
+
}
|
500 |
+
|
501 |
+
/**
|
502 |
+
* Search a value in the memo and return the id
|
503 |
+
*
|
504 |
+
* @param mixed $value
|
505 |
+
* @return int|bool The id or false
|
506 |
+
*/
|
507 |
+
protected function searchMemo($value)
|
508 |
+
{
|
509 |
+
return array_search($value, $this->memo, true);
|
510 |
+
}
|
511 |
+
|
512 |
+
/**
|
513 |
+
* Quote/Escape a string
|
514 |
+
*
|
515 |
+
* @param string $str
|
516 |
+
* @return string quoted string
|
517 |
+
*/
|
518 |
+
protected function quoteString($str)
|
519 |
+
{
|
520 |
+
$quoteArr = static::$quoteString;
|
521 |
+
|
522 |
+
if (($cntSingleQuote = substr_count($str, "'"))
|
523 |
+
&& ($cntDoubleQuote = substr_count($str, '"'))
|
524 |
+
&& ($cntSingleQuote < $cntDoubleQuote)
|
525 |
+
) {
|
526 |
+
$quoteArr['"'] = '\\"';
|
527 |
+
$enclosure = '"';
|
528 |
+
} else {
|
529 |
+
$quoteArr["'"] = "\\'";
|
530 |
+
$enclosure = "'";
|
531 |
+
}
|
532 |
+
|
533 |
+
return $enclosure . strtr($str, $quoteArr) . $enclosure;
|
534 |
+
}
|
535 |
+
|
536 |
+
/* unserialize */
|
537 |
+
|
538 |
+
/**
|
539 |
+
* Unserialize from Python Pickle format to PHP
|
540 |
+
*
|
541 |
+
* @param string $pickle
|
542 |
+
* @return mixed
|
543 |
+
* @throws Exception\RuntimeException on invalid Pickle string
|
544 |
+
*/
|
545 |
+
public function unserialize($pickle)
|
546 |
+
{
|
547 |
+
// init process vars
|
548 |
+
$this->clearProcessVars();
|
549 |
+
$this->pickle = $pickle;
|
550 |
+
$this->pickleLen = strlen($this->pickle);
|
551 |
+
|
552 |
+
// read pickle string
|
553 |
+
while (($op = $this->read(1)) !== self::OP_STOP) {
|
554 |
+
$this->load($op);
|
555 |
+
}
|
556 |
+
|
557 |
+
if (!count($this->stack)) {
|
558 |
+
throw new Exception\RuntimeException('No data found');
|
559 |
+
}
|
560 |
+
|
561 |
+
$ret = array_pop($this->stack);
|
562 |
+
|
563 |
+
// clear process vars
|
564 |
+
$this->clearProcessVars();
|
565 |
+
|
566 |
+
return $ret;
|
567 |
+
}
|
568 |
+
|
569 |
+
/**
|
570 |
+
* Clear temp variables needed for processing
|
571 |
+
*/
|
572 |
+
protected function clearProcessVars()
|
573 |
+
{
|
574 |
+
$this->pos = 0;
|
575 |
+
$this->pickle = '';
|
576 |
+
$this->pickleLen = 0;
|
577 |
+
$this->memo = array();
|
578 |
+
$this->stack = array();
|
579 |
+
}
|
580 |
+
|
581 |
+
/**
|
582 |
+
* Load a pickle opcode
|
583 |
+
*
|
584 |
+
* @param string $op
|
585 |
+
* @throws Exception\RuntimeException on invalid opcode
|
586 |
+
*/
|
587 |
+
protected function load($op)
|
588 |
+
{
|
589 |
+
switch ($op) {
|
590 |
+
case self::OP_PUT:
|
591 |
+
$this->loadPut();
|
592 |
+
break;
|
593 |
+
case self::OP_BINPUT:
|
594 |
+
$this->loadBinPut();
|
595 |
+
break;
|
596 |
+
case self::OP_LONG_BINPUT:
|
597 |
+
$this->loadLongBinPut();
|
598 |
+
break;
|
599 |
+
case self::OP_GET:
|
600 |
+
$this->loadGet();
|
601 |
+
break;
|
602 |
+
case self::OP_BINGET:
|
603 |
+
$this->loadBinGet();
|
604 |
+
break;
|
605 |
+
case self::OP_LONG_BINGET:
|
606 |
+
$this->loadLongBinGet();
|
607 |
+
break;
|
608 |
+
case self::OP_NONE:
|
609 |
+
$this->loadNone();
|
610 |
+
break;
|
611 |
+
case self::OP_NEWTRUE:
|
612 |
+
$this->loadNewTrue();
|
613 |
+
break;
|
614 |
+
case self::OP_NEWFALSE:
|
615 |
+
$this->loadNewFalse();
|
616 |
+
break;
|
617 |
+
case self::OP_INT:
|
618 |
+
$this->loadInt();
|
619 |
+
break;
|
620 |
+
case self::OP_BININT:
|
621 |
+
$this->loadBinInt();
|
622 |
+
break;
|
623 |
+
case self::OP_BININT1:
|
624 |
+
$this->loadBinInt1();
|
625 |
+
break;
|
626 |
+
case self::OP_BININT2:
|
627 |
+
$this->loadBinInt2();
|
628 |
+
break;
|
629 |
+
case self::OP_LONG:
|
630 |
+
$this->loadLong();
|
631 |
+
break;
|
632 |
+
case self::OP_LONG1:
|
633 |
+
$this->loadLong1();
|
634 |
+
break;
|
635 |
+
case self::OP_LONG4:
|
636 |
+
$this->loadLong4();
|
637 |
+
break;
|
638 |
+
case self::OP_FLOAT:
|
639 |
+
$this->loadFloat();
|
640 |
+
break;
|
641 |
+
case self::OP_BINFLOAT:
|
642 |
+
$this->loadBinFloat();
|
643 |
+
break;
|
644 |
+
case self::OP_STRING:
|
645 |
+
$this->loadString();
|
646 |
+
break;
|
647 |
+
case self::OP_BINSTRING:
|
648 |
+
$this->loadBinString();
|
649 |
+
break;
|
650 |
+
case self::OP_SHORT_BINSTRING:
|
651 |
+
$this->loadShortBinString();
|
652 |
+
break;
|
653 |
+
case self::OP_BINBYTES:
|
654 |
+
$this->loadBinBytes();
|
655 |
+
break;
|
656 |
+
case self::OP_SHORT_BINBYTES:
|
657 |
+
$this->loadShortBinBytes();
|
658 |
+
break;
|
659 |
+
case self::OP_UNICODE:
|
660 |
+
$this->loadUnicode();
|
661 |
+
break;
|
662 |
+
case self::OP_BINUNICODE:
|
663 |
+
$this->loadBinUnicode();
|
664 |
+
break;
|
665 |
+
case self::OP_MARK:
|
666 |
+
$this->loadMark();
|
667 |
+
break;
|
668 |
+
case self::OP_LIST:
|
669 |
+
$this->loadList();
|
670 |
+
break;
|
671 |
+
case self::OP_EMPTY_LIST:
|
672 |
+
$this->loadEmptyList();
|
673 |
+
break;
|
674 |
+
case self::OP_APPEND:
|
675 |
+
$this->loadAppend();
|
676 |
+
break;
|
677 |
+
case self::OP_APPENDS:
|
678 |
+
$this->loadAppends();
|
679 |
+
break;
|
680 |
+
case self::OP_DICT:
|
681 |
+
$this->loadDict();
|
682 |
+
break;
|
683 |
+
case self::OP_EMPTY_DICT:
|
684 |
+
$this->_loadEmptyDict();
|
685 |
+
break;
|
686 |
+
case self::OP_SETITEM:
|
687 |
+
$this->loadSetItem();
|
688 |
+
break;
|
689 |
+
case self::OP_SETITEMS:
|
690 |
+
$this->loadSetItems();
|
691 |
+
break;
|
692 |
+
case self::OP_TUPLE:
|
693 |
+
$this->loadTuple();
|
694 |
+
break;
|
695 |
+
case self::OP_TUPLE1:
|
696 |
+
$this->loadTuple1();
|
697 |
+
break;
|
698 |
+
case self::OP_TUPLE2:
|
699 |
+
$this->loadTuple2();
|
700 |
+
break;
|
701 |
+
case self::OP_TUPLE3:
|
702 |
+
$this->loadTuple3();
|
703 |
+
break;
|
704 |
+
case self::OP_PROTO:
|
705 |
+
$this->loadProto();
|
706 |
+
break;
|
707 |
+
default:
|
708 |
+
throw new Exception\RuntimeException("Invalid or unknown opcode '{$op}'");
|
709 |
+
}
|
710 |
+
}
|
711 |
+
|
712 |
+
/**
|
713 |
+
* Load a PUT opcode
|
714 |
+
*
|
715 |
+
* @throws Exception\RuntimeException on missing stack
|
716 |
+
*/
|
717 |
+
protected function loadPut()
|
718 |
+
{
|
719 |
+
$id = (int) $this->readline();
|
720 |
+
|
721 |
+
$lastStack = count($this->stack) - 1;
|
722 |
+
if (!isset($this->stack[$lastStack])) {
|
723 |
+
throw new Exception\RuntimeException('No stack exist');
|
724 |
+
}
|
725 |
+
$this->memo[$id] =& $this->stack[$lastStack];
|
726 |
+
}
|
727 |
+
|
728 |
+
/**
|
729 |
+
* Load a binary PUT
|
730 |
+
*
|
731 |
+
* @throws Exception\RuntimeException on missing stack
|
732 |
+
*/
|
733 |
+
protected function loadBinPut()
|
734 |
+
{
|
735 |
+
$id = ord($this->read(1));
|
736 |
+
|
737 |
+
$lastStack = count($this->stack)-1;
|
738 |
+
if (!isset($this->stack[$lastStack])) {
|
739 |
+
throw new Exception\RuntimeException('No stack exist');
|
740 |
+
}
|
741 |
+
$this->memo[$id] =& $this->stack[$lastStack];
|
742 |
+
}
|
743 |
+
|
744 |
+
/**
|
745 |
+
* Load a long binary PUT
|
746 |
+
*
|
747 |
+
* @throws Exception\RuntimeException on missing stack
|
748 |
+
*/
|
749 |
+
protected function loadLongBinPut()
|
750 |
+
{
|
751 |
+
$bin = $this->read(4);
|
752 |
+
if (static::$isLittleEndian === false) {
|
753 |
+
$bin = strrev($bin);
|
754 |
+
}
|
755 |
+
list(, $id) = unpack('l', $bin);
|
756 |
+
|
757 |
+
$lastStack = count($this->stack)-1;
|
758 |
+
if (!isset($this->stack[$lastStack])) {
|
759 |
+
throw new Exception\RuntimeException('No stack exist');
|
760 |
+
}
|
761 |
+
$this->memo[$id] =& $this->stack[$lastStack];
|
762 |
+
}
|
763 |
+
|
764 |
+
/**
|
765 |
+
* Load a GET operation
|
766 |
+
*
|
767 |
+
* @throws Exception\RuntimeException on missing GET identifier
|
768 |
+
*/
|
769 |
+
protected function loadGet()
|
770 |
+
{
|
771 |
+
$id = (int) $this->readline();
|
772 |
+
|
773 |
+
if (!array_key_exists($id, $this->memo)) {
|
774 |
+
throw new Exception\RuntimeException('Get id "' . $id . '" not found in memo');
|
775 |
+
}
|
776 |
+
$this->stack[] =& $this->memo[$id];
|
777 |
+
}
|
778 |
+
|
779 |
+
/**
|
780 |
+
* Load a binary GET operation
|
781 |
+
*
|
782 |
+
* @throws Exception\RuntimeException on missing GET identifier
|
783 |
+
*/
|
784 |
+
protected function loadBinGet()
|
785 |
+
{
|
786 |
+
$id = ord($this->read(1));
|
787 |
+
|
788 |
+
if (!array_key_exists($id, $this->memo)) {
|
789 |
+
throw new Exception\RuntimeException('Get id "' . $id . '" not found in memo');
|
790 |
+
}
|
791 |
+
$this->stack[] =& $this->memo[$id];
|
792 |
+
}
|
793 |
+
|
794 |
+
/**
|
795 |
+
* Load a long binary GET operation
|
796 |
+
*
|
797 |
+
* @throws Exception\RuntimeException on missing GET identifier
|
798 |
+
*/
|
799 |
+
protected function loadLongBinGet()
|
800 |
+
{
|
801 |
+
$bin = $this->read(4);
|
802 |
+
if (static::$isLittleEndian === false) {
|
803 |
+
$bin = strrev($bin);
|
804 |
+
}
|
805 |
+
list(, $id) = unpack('l', $bin);
|
806 |
+
|
807 |
+
if (!array_key_exists($id, $this->memo)) {
|
808 |
+
throw new Exception\RuntimeException('Get id "' . $id . '" not found in memo');
|
809 |
+
}
|
810 |
+
$this->stack[] =& $this->memo[$id];
|
811 |
+
}
|
812 |
+
|
813 |
+
/**
|
814 |
+
* Load a NONE operator
|
815 |
+
*/
|
816 |
+
protected function loadNone()
|
817 |
+
{
|
818 |
+
$this->stack[] = null;
|
819 |
+
}
|
820 |
+
|
821 |
+
/**
|
822 |
+
* Load a boolean TRUE operator
|
823 |
+
*/
|
824 |
+
protected function loadNewTrue()
|
825 |
+
{
|
826 |
+
$this->stack[] = true;
|
827 |
+
}
|
828 |
+
|
829 |
+
/**
|
830 |
+
* Load a boolean FALSE operator
|
831 |
+
*/
|
832 |
+
protected function loadNewFalse()
|
833 |
+
{
|
834 |
+
$this->stack[] = false;
|
835 |
+
}
|
836 |
+
|
837 |
+
/**
|
838 |
+
* Load an integer operator
|
839 |
+
*/
|
840 |
+
protected function loadInt()
|
841 |
+
{
|
842 |
+
$line = $this->readline();
|
843 |
+
if ($line === '01') {
|
844 |
+
$this->stack[] = true;
|
845 |
+
} elseif ($line === '00') {
|
846 |
+
$this->stack[] = false;
|
847 |
+
} else {
|
848 |
+
$this->stack[] = (int) $line;
|
849 |
+
}
|
850 |
+
}
|
851 |
+
|
852 |
+
/**
|
853 |
+
* Load a binary integer operator
|
854 |
+
*/
|
855 |
+
protected function loadBinInt()
|
856 |
+
{
|
857 |
+
$bin = $this->read(4);
|
858 |
+
if (static::$isLittleEndian === false) {
|
859 |
+
$bin = strrev($bin);
|
860 |
+
}
|
861 |
+
list(, $int) = unpack('l', $bin);
|
862 |
+
$this->stack[] = $int;
|
863 |
+
}
|
864 |
+
|
865 |
+
/**
|
866 |
+
* Load the first byte of a binary integer
|
867 |
+
*/
|
868 |
+
protected function loadBinInt1()
|
869 |
+
{
|
870 |
+
$this->stack[] = ord($this->read(1));
|
871 |
+
}
|
872 |
+
|
873 |
+
/**
|
874 |
+
* Load the second byte of a binary integer
|
875 |
+
*/
|
876 |
+
protected function loadBinInt2()
|
877 |
+
{
|
878 |
+
$bin = $this->read(2);
|
879 |
+
list(, $int) = unpack('v', $bin);
|
880 |
+
$this->stack[] = $int;
|
881 |
+
}
|
882 |
+
|
883 |
+
/**
|
884 |
+
* Load a long (float) operator
|
885 |
+
*/
|
886 |
+
protected function loadLong()
|
887 |
+
{
|
888 |
+
$data = rtrim($this->readline(), 'L');
|
889 |
+
if ($data === '') {
|
890 |
+
$this->stack[] = 0;
|
891 |
+
} else {
|
892 |
+
$this->stack[] = $data;
|
893 |
+
}
|
894 |
+
}
|
895 |
+
|
896 |
+
/**
|
897 |
+
* Load a one byte long integer
|
898 |
+
*/
|
899 |
+
protected function loadLong1()
|
900 |
+
{
|
901 |
+
$n = ord($this->read(1));
|
902 |
+
$data = $this->read($n);
|
903 |
+
$this->stack[] = $this->decodeBinLong($data);
|
904 |
+
}
|
905 |
+
|
906 |
+
/**
|
907 |
+
* Load a 4 byte long integer
|
908 |
+
*
|
909 |
+
*/
|
910 |
+
protected function loadLong4()
|
911 |
+
{
|
912 |
+
$nBin = $this->read(4);
|
913 |
+
if (static::$isLittleEndian === false) {
|
914 |
+
$nBin = strrev($$nBin);
|
915 |
+
}
|
916 |
+
list(, $n) = unpack('l', $nBin);
|
917 |
+
$data = $this->read($n);
|
918 |
+
|
919 |
+
$this->stack[] = $this->decodeBinLong($data);
|
920 |
+
}
|
921 |
+
|
922 |
+
/**
|
923 |
+
* Load a float value
|
924 |
+
*
|
925 |
+
*/
|
926 |
+
protected function loadFloat()
|
927 |
+
{
|
928 |
+
$float = (float) $this->readline();
|
929 |
+
$this->stack[] = $float;
|
930 |
+
}
|
931 |
+
|
932 |
+
/**
|
933 |
+
* Load a binary float value
|
934 |
+
*
|
935 |
+
*/
|
936 |
+
protected function loadBinFloat()
|
937 |
+
{
|
938 |
+
$bin = $this->read(8);
|
939 |
+
if (static::$isLittleEndian === true) {
|
940 |
+
$bin = strrev($bin);
|
941 |
+
}
|
942 |
+
list(, $float) = unpack('d', $bin);
|
943 |
+
$this->stack[] = $float;
|
944 |
+
}
|
945 |
+
|
946 |
+
/**
|
947 |
+
* Load a string
|
948 |
+
*
|
949 |
+
*/
|
950 |
+
protected function loadString()
|
951 |
+
{
|
952 |
+
$this->stack[] = $this->unquoteString((string) $this->readline());
|
953 |
+
}
|
954 |
+
|
955 |
+
/**
|
956 |
+
* Load a binary string
|
957 |
+
*
|
958 |
+
*/
|
959 |
+
protected function loadBinString()
|
960 |
+
{
|
961 |
+
$bin = $this->read(4);
|
962 |
+
if (!static::$isLittleEndian) {
|
963 |
+
$bin = strrev($bin);
|
964 |
+
}
|
965 |
+
list(, $len) = unpack('l', $bin);
|
966 |
+
$this->stack[] = (string) $this->read($len);
|
967 |
+
}
|
968 |
+
|
969 |
+
/**
|
970 |
+
* Load a short binary string
|
971 |
+
*
|
972 |
+
*/
|
973 |
+
protected function loadShortBinString()
|
974 |
+
{
|
975 |
+
$len = ord($this->read(1));
|
976 |
+
$this->stack[] = (string) $this->read($len);
|
977 |
+
}
|
978 |
+
|
979 |
+
/**
|
980 |
+
* Load arbitrary binary bytes
|
981 |
+
*/
|
982 |
+
protected function loadBinBytes()
|
983 |
+
{
|
984 |
+
// read byte length
|
985 |
+
$nBin = $this->read(4);
|
986 |
+
if (static::$isLittleEndian === false) {
|
987 |
+
$nBin = strrev($$nBin);
|
988 |
+
}
|
989 |
+
list(, $n) = unpack('l', $nBin);
|
990 |
+
$this->stack[] = $this->read($n);
|
991 |
+
}
|
992 |
+
|
993 |
+
/**
|
994 |
+
* Load a single binary byte
|
995 |
+
*/
|
996 |
+
protected function loadShortBinBytes()
|
997 |
+
{
|
998 |
+
$n = ord($this->read(1));
|
999 |
+
$this->stack[] = $this->read($n);
|
1000 |
+
}
|
1001 |
+
|
1002 |
+
/**
|
1003 |
+
* Load a unicode string
|
1004 |
+
*/
|
1005 |
+
protected function loadUnicode()
|
1006 |
+
{
|
1007 |
+
$data = $this->readline();
|
1008 |
+
$pattern = '/\\\\u([a-fA-F0-9]{4})/u'; // \uXXXX
|
1009 |
+
$data = preg_replace_callback($pattern, array($this, '_convertMatchingUnicodeSequence2Utf8'), $data);
|
1010 |
+
|
1011 |
+
$this->stack[] = $data;
|
1012 |
+
}
|
1013 |
+
|
1014 |
+
/**
|
1015 |
+
* Convert a unicode sequence to UTF-8
|
1016 |
+
*
|
1017 |
+
* @param array $match
|
1018 |
+
* @return string
|
1019 |
+
*/
|
1020 |
+
protected function _convertMatchingUnicodeSequence2Utf8(array $match)
|
1021 |
+
{
|
1022 |
+
return $this->hex2Utf8($match[1]);
|
1023 |
+
}
|
1024 |
+
|
1025 |
+
/**
|
1026 |
+
* Convert a hex string to a UTF-8 string
|
1027 |
+
*
|
1028 |
+
* @param string $hex
|
1029 |
+
* @return string
|
1030 |
+
* @throws Exception\RuntimeException on unmatched unicode sequence
|
1031 |
+
*/
|
1032 |
+
protected function hex2Utf8($hex)
|
1033 |
+
{
|
1034 |
+
$uniCode = hexdec($hex);
|
1035 |
+
|
1036 |
+
if ($uniCode < 0x80) { // 1Byte
|
1037 |
+
$utf8Char = chr($uniCode);
|
1038 |
+
} elseif ($uniCode < 0x800) { // 2Byte
|
1039 |
+
$utf8Char = chr(0xC0 | $uniCode >> 6)
|
1040 |
+
. chr(0x80 | $uniCode & 0x3F);
|
1041 |
+
} elseif ($uniCode < 0x10000) { // 3Byte
|
1042 |
+
$utf8Char = chr(0xE0 | $uniCode >> 12)
|
1043 |
+
. chr(0x80 | $uniCode >> 6 & 0x3F)
|
1044 |
+
. chr(0x80 | $uniCode & 0x3F);
|
1045 |
+
} elseif ($uniCode < 0x110000) { // 4Byte
|
1046 |
+
$utf8Char = chr(0xF0 | $uniCode >> 18)
|
1047 |
+
. chr(0x80 | $uniCode >> 12 & 0x3F)
|
1048 |
+
. chr(0x80 | $uniCode >> 6 & 0x3F)
|
1049 |
+
. chr(0x80 | $uniCode & 0x3F);
|
1050 |
+
} else {
|
1051 |
+
throw new Exception\RuntimeException(
|
1052 |
+
sprintf('Unsupported unicode character found "%s"', dechex($uniCode))
|
1053 |
+
);
|
1054 |
+
}
|
1055 |
+
|
1056 |
+
return $utf8Char;
|
1057 |
+
}
|
1058 |
+
|
1059 |
+
/**
|
1060 |
+
* Load binary unicode sequence
|
1061 |
+
*/
|
1062 |
+
protected function loadBinUnicode()
|
1063 |
+
{
|
1064 |
+
// read byte length
|
1065 |
+
$n = $this->read(4);
|
1066 |
+
if (static::$isLittleEndian === false) {
|
1067 |
+
$n = strrev($n);
|
1068 |
+
}
|
1069 |
+
list(, $n) = unpack('l', $n);
|
1070 |
+
$data = $this->read($n);
|
1071 |
+
|
1072 |
+
$this->stack[] = $data;
|
1073 |
+
}
|
1074 |
+
|
1075 |
+
/**
|
1076 |
+
* Load a marker sequence
|
1077 |
+
*/
|
1078 |
+
protected function loadMark()
|
1079 |
+
{
|
1080 |
+
$this->stack[] = $this->marker;
|
1081 |
+
}
|
1082 |
+
|
1083 |
+
/**
|
1084 |
+
* Load an array (list)
|
1085 |
+
*/
|
1086 |
+
protected function loadList()
|
1087 |
+
{
|
1088 |
+
$k = $this->lastMarker();
|
1089 |
+
$this->stack[$k] = array();
|
1090 |
+
|
1091 |
+
// remove all elements after marker
|
1092 |
+
for ($i = $k + 1, $max = count($this->stack); $i < $max; $i++) {
|
1093 |
+
unset($this->stack[$i]);
|
1094 |
+
}
|
1095 |
+
}
|
1096 |
+
|
1097 |
+
/**
|
1098 |
+
* Load an append (to list) sequence
|
1099 |
+
*/
|
1100 |
+
protected function loadAppend()
|
1101 |
+
{
|
1102 |
+
$value = array_pop($this->stack);
|
1103 |
+
$list =& $this->stack[count($this->stack) - 1];
|
1104 |
+
$list[] = $value;
|
1105 |
+
}
|
1106 |
+
|
1107 |
+
/**
|
1108 |
+
* Load an empty list sequence
|
1109 |
+
*/
|
1110 |
+
protected function loadEmptyList()
|
1111 |
+
{
|
1112 |
+
$this->stack[] = array();
|
1113 |
+
}
|
1114 |
+
|
1115 |
+
/**
|
1116 |
+
* Load multiple append (to list) sequences at once
|
1117 |
+
*/
|
1118 |
+
protected function loadAppends()
|
1119 |
+
{
|
1120 |
+
$k = $this->lastMarker();
|
1121 |
+
$list =& $this->stack[$k - 1];
|
1122 |
+
$max = count($this->stack);
|
1123 |
+
for ($i = $k + 1; $i < $max; $i++) {
|
1124 |
+
$list[] = $this->stack[$i];
|
1125 |
+
unset($this->stack[$i]);
|
1126 |
+
}
|
1127 |
+
unset($this->stack[$k]);
|
1128 |
+
}
|
1129 |
+
|
1130 |
+
/**
|
1131 |
+
* Load an associative array (Python dictionary)
|
1132 |
+
*/
|
1133 |
+
protected function loadDict()
|
1134 |
+
{
|
1135 |
+
$k = $this->lastMarker();
|
1136 |
+
$this->stack[$k] = array();
|
1137 |
+
|
1138 |
+
// remove all elements after marker
|
1139 |
+
$max = count($this->stack);
|
1140 |
+
for ($i = $k + 1; $i < $max; $i++) {
|
1141 |
+
unset($this->stack[$i]);
|
1142 |
+
}
|
1143 |
+
}
|
1144 |
+
|
1145 |
+
/**
|
1146 |
+
* Load an item from a set
|
1147 |
+
*/
|
1148 |
+
protected function loadSetItem()
|
1149 |
+
{
|
1150 |
+
$value = array_pop($this->stack);
|
1151 |
+
$key = array_pop($this->stack);
|
1152 |
+
$dict =& $this->stack[count($this->stack) - 1];
|
1153 |
+
$dict[$key] = $value;
|
1154 |
+
}
|
1155 |
+
|
1156 |
+
/**
|
1157 |
+
* Load an empty dictionary
|
1158 |
+
*/
|
1159 |
+
protected function _loadEmptyDict()
|
1160 |
+
{
|
1161 |
+
$this->stack[] = array();
|
1162 |
+
}
|
1163 |
+
|
1164 |
+
/**
|
1165 |
+
* Load set items
|
1166 |
+
*/
|
1167 |
+
protected function loadSetItems()
|
1168 |
+
{
|
1169 |
+
$k = $this->lastMarker();
|
1170 |
+
$dict =& $this->stack[$k - 1];
|
1171 |
+
$max = count($this->stack);
|
1172 |
+
for ($i = $k + 1; $i < $max; $i += 2) {
|
1173 |
+
$key = $this->stack[$i];
|
1174 |
+
$value = $this->stack[$i + 1];
|
1175 |
+
$dict[$key] = $value;
|
1176 |
+
unset($this->stack[$i], $this->stack[$i+1]);
|
1177 |
+
}
|
1178 |
+
unset($this->stack[$k]);
|
1179 |
+
}
|
1180 |
+
|
1181 |
+
/**
|
1182 |
+
* Load a tuple
|
1183 |
+
*/
|
1184 |
+
protected function loadTuple()
|
1185 |
+
{
|
1186 |
+
$k = $this->lastMarker();
|
1187 |
+
$this->stack[$k] = array();
|
1188 |
+
$tuple =& $this->stack[$k];
|
1189 |
+
$max = count($this->stack);
|
1190 |
+
for ($i = $k + 1; $i < $max; $i++) {
|
1191 |
+
$tuple[] = $this->stack[$i];
|
1192 |
+
unset($this->stack[$i]);
|
1193 |
+
}
|
1194 |
+
}
|
1195 |
+
|
1196 |
+
/**
|
1197 |
+
* Load single item tuple
|
1198 |
+
*/
|
1199 |
+
protected function loadTuple1()
|
1200 |
+
{
|
1201 |
+
$value1 = array_pop($this->stack);
|
1202 |
+
$this->stack[] = array($value1);
|
1203 |
+
}
|
1204 |
+
|
1205 |
+
/**
|
1206 |
+
* Load two item tuple
|
1207 |
+
*
|
1208 |
+
*/
|
1209 |
+
protected function loadTuple2()
|
1210 |
+
{
|
1211 |
+
$value2 = array_pop($this->stack);
|
1212 |
+
$value1 = array_pop($this->stack);
|
1213 |
+
$this->stack[] = array($value1, $value2);
|
1214 |
+
}
|
1215 |
+
|
1216 |
+
/**
|
1217 |
+
* Load three item tuple
|
1218 |
+
*
|
1219 |
+
*/
|
1220 |
+
protected function loadTuple3()
|
1221 |
+
{
|
1222 |
+
$value3 = array_pop($this->stack);
|
1223 |
+
$value2 = array_pop($this->stack);
|
1224 |
+
$value1 = array_pop($this->stack);
|
1225 |
+
$this->stack[] = array($value1, $value2, $value3);
|
1226 |
+
}
|
1227 |
+
|
1228 |
+
/**
|
1229 |
+
* Load a proto value
|
1230 |
+
*
|
1231 |
+
* @throws Exception\RuntimeException if Pickle version does not support this feature
|
1232 |
+
*/
|
1233 |
+
protected function loadProto()
|
1234 |
+
{
|
1235 |
+
$proto = ord($this->read(1));
|
1236 |
+
if ($proto < 2 || $proto > 3) {
|
1237 |
+
throw new Exception\RuntimeException(
|
1238 |
+
"Invalid or unknown protocol version '{$proto}' detected"
|
1239 |
+
);
|
1240 |
+
}
|
1241 |
+
$this->protocol = $proto;
|
1242 |
+
}
|
1243 |
+
|
1244 |
+
/* unserialize helper */
|
1245 |
+
|
1246 |
+
/**
|
1247 |
+
* Read a segment of the pickle
|
1248 |
+
*
|
1249 |
+
* @param mixed $len
|
1250 |
+
* @return string
|
1251 |
+
* @throws Exception\RuntimeException if position matches end of data
|
1252 |
+
*/
|
1253 |
+
protected function read($len)
|
1254 |
+
{
|
1255 |
+
if (($this->pos + $len) > $this->pickleLen) {
|
1256 |
+
throw new Exception\RuntimeException('End of data');
|
1257 |
+
}
|
1258 |
+
|
1259 |
+
$this->pos += $len;
|
1260 |
+
return substr($this->pickle, ($this->pos - $len), $len);
|
1261 |
+
}
|
1262 |
+
|
1263 |
+
/**
|
1264 |
+
* Read a line of the pickle at once
|
1265 |
+
*
|
1266 |
+
* @return string
|
1267 |
+
* @throws Exception\RuntimeException if no EOL character found
|
1268 |
+
*/
|
1269 |
+
protected function readline()
|
1270 |
+
{
|
1271 |
+
$eolLen = 2;
|
1272 |
+
$eolPos = strpos($this->pickle, "\r\n", $this->pos);
|
1273 |
+
if ($eolPos === false) {
|
1274 |
+
$eolPos = strpos($this->pickle, "\n", $this->pos);
|
1275 |
+
$eolLen = 1;
|
1276 |
+
}
|
1277 |
+
|
1278 |
+
if ($eolPos === false) {
|
1279 |
+
throw new Exception\RuntimeException('No new line found');
|
1280 |
+
}
|
1281 |
+
$ret = substr($this->pickle, $this->pos, $eolPos-$this->pos);
|
1282 |
+
$this->pos = $eolPos + $eolLen;
|
1283 |
+
|
1284 |
+
return $ret;
|
1285 |
+
}
|
1286 |
+
|
1287 |
+
/**
|
1288 |
+
* Unquote/Unescape a quoted string
|
1289 |
+
*
|
1290 |
+
* @param string $str quoted string
|
1291 |
+
* @return string unquoted string
|
1292 |
+
*/
|
1293 |
+
protected function unquoteString($str)
|
1294 |
+
{
|
1295 |
+
$quoteArr = array_flip(static::$quoteString);
|
1296 |
+
|
1297 |
+
if ($str[0] == '"') {
|
1298 |
+
$quoteArr['\\"'] = '"';
|
1299 |
+
} else {
|
1300 |
+
$quoteArr["\\'"] = "'";
|
1301 |
+
}
|
1302 |
+
|
1303 |
+
return strtr(substr(trim($str), 1, -1), $quoteArr);
|
1304 |
+
}
|
1305 |
+
|
1306 |
+
/**
|
1307 |
+
* Return last marker position in stack
|
1308 |
+
*
|
1309 |
+
* @return int
|
1310 |
+
*/
|
1311 |
+
protected function lastMarker()
|
1312 |
+
{
|
1313 |
+
for ($k = count($this->stack)-1; $k >= 0; $k -= 1) {
|
1314 |
+
if ($this->stack[$k] === $this->marker) {
|
1315 |
+
break;
|
1316 |
+
}
|
1317 |
+
}
|
1318 |
+
return $k;
|
1319 |
+
}
|
1320 |
+
|
1321 |
+
/**
|
1322 |
+
* Decode a binary long sequence
|
1323 |
+
*
|
1324 |
+
* @param string $data
|
1325 |
+
* @return int|float|string
|
1326 |
+
*/
|
1327 |
+
protected function decodeBinLong($data)
|
1328 |
+
{
|
1329 |
+
$nbytes = strlen($data);
|
1330 |
+
|
1331 |
+
if ($nbytes == 0) {
|
1332 |
+
return 0;
|
1333 |
+
}
|
1334 |
+
|
1335 |
+
$long = 0;
|
1336 |
+
if ($nbytes > 7) {
|
1337 |
+
if ($this->bigIntegerAdapter === null) {
|
1338 |
+
$this->bigIntegerAdapter = BigInteger\BigInteger::getDefaultAdapter();
|
1339 |
+
}
|
1340 |
+
if (static::$isLittleEndian === true) {
|
1341 |
+
$data = strrev($data);
|
1342 |
+
}
|
1343 |
+
$long = $this->bigIntegerAdapter->binToInt($data, true);
|
1344 |
+
} else {
|
1345 |
+
for ($i = 0; $i < $nbytes; $i++) {
|
1346 |
+
$long += ord($data[$i]) * pow(256, $i);
|
1347 |
+
}
|
1348 |
+
if (0x80 <= ord($data[$nbytes - 1])) {
|
1349 |
+
$long -= pow(2, $nbytes * 8);
|
1350 |
+
// $long-= 1 << ($nbytes * 8);
|
1351 |
+
}
|
1352 |
+
}
|
1353 |
+
|
1354 |
+
return $long;
|
1355 |
+
}
|
1356 |
+
}
|
backend/vendor/zendframework/zend-serializer/Zend/Serializer/Adapter/PythonPickleOptions.php
ADDED
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Zend Framework (http://framework.zend.com/)
|
4 |
+
*
|
5 |
+
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
+
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
+
*/
|
9 |
+
|
10 |
+
namespace Zend\Serializer\Adapter;
|
11 |
+
|
12 |
+
use Zend\Serializer\Exception;
|
13 |
+
|
14 |
+
class PythonPickleOptions extends AdapterOptions
|
15 |
+
{
|
16 |
+
/**
|
17 |
+
* Pickle protocol version to serialize data
|
18 |
+
*
|
19 |
+
* @var int
|
20 |
+
*/
|
21 |
+
protected $protocol = 0;
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Set pickle protocol version to serialize data
|
25 |
+
*
|
26 |
+
* Supported versions are 0, 1, 2 and 3
|
27 |
+
*
|
28 |
+
* @param int $protocol
|
29 |
+
* @return PythonPickleOptions
|
30 |
+
* @throws Exception\InvalidArgumentException
|
31 |
+
*/
|
32 |
+
public function setProtocol($protocol)
|
33 |
+
{
|
34 |
+
$protocol = (int) $protocol;
|
35 |
+
if ($protocol < 0 || $protocol > 3) {
|
36 |
+
throw new Exception\InvalidArgumentException(
|
37 |
+
"Invalid or unknown protocol version '{$protocol}'"
|
38 |
+
);
|
39 |
+
}
|
40 |
+
|
41 |
+
$this->protocol = $protocol;
|
42 |
+
|
43 |
+
return $this;
|
44 |
+
}
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Get pickle protocol version to serialize data
|
48 |
+
*
|
49 |
+
* @return int
|
50 |
+
*/
|
51 |
+
public function getProtocol()
|
52 |
+
{
|
53 |
+
return $this->protocol;
|
54 |
+
}
|
55 |
+
}
|
backend/vendor/zendframework/zend-serializer/Zend/Serializer/Adapter/Wddx.php
ADDED
@@ -0,0 +1,138 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Zend Framework (http://framework.zend.com/)
|
4 |
+
*
|
5 |
+
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
+
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
+
*/
|
9 |
+
|
10 |
+
namespace Zend\Serializer\Adapter;
|
11 |
+
|
12 |
+
use Zend\Serializer\Exception;
|
13 |
+
use Zend\Stdlib\ErrorHandler;
|
14 |
+
|
15 |
+
/**
|
16 |
+
* @link http://www.infoloom.com/gcaconfs/WEB/chicago98/simeonov.HTM
|
17 |
+
* @link http://en.wikipedia.org/wiki/WDDX
|
18 |
+
*/
|
19 |
+
class Wddx extends AbstractAdapter
|
20 |
+
{
|
21 |
+
/**
|
22 |
+
* @var WddxOptions
|
23 |
+
*/
|
24 |
+
protected $options = null;
|
25 |
+
|
26 |
+
/**
|
27 |
+
* Constructor
|
28 |
+
*
|
29 |
+
* @param array|\Traversable|WddxOptions $options
|
30 |
+
* @throws Exception\ExtensionNotLoadedException if wddx extension not found
|
31 |
+
*/
|
32 |
+
public function __construct($options = null)
|
33 |
+
{
|
34 |
+
if (!extension_loaded('wddx')) {
|
35 |
+
throw new Exception\ExtensionNotLoadedException(
|
36 |
+
'PHP extension "wddx" is required for this adapter'
|
37 |
+
);
|
38 |
+
}
|
39 |
+
|
40 |
+
parent::__construct($options);
|
41 |
+
}
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Set options
|
45 |
+
*
|
46 |
+
* @param array|\Traversable|WddxOptions $options
|
47 |
+
* @return Wddx
|
48 |
+
*/
|
49 |
+
public function setOptions($options)
|
50 |
+
{
|
51 |
+
if (!$options instanceof WddxOptions) {
|
52 |
+
$options = new WddxOptions($options);
|
53 |
+
}
|
54 |
+
|
55 |
+
$this->options = $options;
|
56 |
+
return $this;
|
57 |
+
}
|
58 |
+
|
59 |
+
/**
|
60 |
+
* Get options
|
61 |
+
*
|
62 |
+
* @return WddxOptions
|
63 |
+
*/
|
64 |
+
public function getOptions()
|
65 |
+
{
|
66 |
+
if ($this->options === null) {
|
67 |
+
$this->options = new WddxOptions();
|
68 |
+
}
|
69 |
+
return $this->options;
|
70 |
+
}
|
71 |
+
|
72 |
+
/**
|
73 |
+
* Serialize PHP to WDDX
|
74 |
+
*
|
75 |
+
* @param mixed $value
|
76 |
+
* @return string
|
77 |
+
* @throws Exception\RuntimeException on wddx error
|
78 |
+
*/
|
79 |
+
public function serialize($value)
|
80 |
+
{
|
81 |
+
$comment = $this->getOptions()->getComment();
|
82 |
+
|
83 |
+
ErrorHandler::start();
|
84 |
+
if ($comment !== '') {
|
85 |
+
$wddx = wddx_serialize_value($value, $comment);
|
86 |
+
} else {
|
87 |
+
$wddx = wddx_serialize_value($value);
|
88 |
+
}
|
89 |
+
$error = ErrorHandler::stop();
|
90 |
+
|
91 |
+
if ($wddx === false) {
|
92 |
+
throw new Exception\RuntimeException('Serialization failed', 0, $error);
|
93 |
+
}
|
94 |
+
|
95 |
+
return $wddx;
|
96 |
+
}
|
97 |
+
|
98 |
+
/**
|
99 |
+
* Unserialize from WDDX to PHP
|
100 |
+
*
|
101 |
+
* @param string $wddx
|
102 |
+
* @return mixed
|
103 |
+
* @throws Exception\RuntimeException on wddx error
|
104 |
+
* @throws Exception\InvalidArgumentException if invalid xml
|
105 |
+
*/
|
106 |
+
public function unserialize($wddx)
|
107 |
+
{
|
108 |
+
$ret = wddx_deserialize($wddx);
|
109 |
+
|
110 |
+
if ($ret === null && class_exists('SimpleXMLElement', false)) {
|
111 |
+
// check if the returned NULL is valid
|
112 |
+
// or based on an invalid wddx string
|
113 |
+
try {
|
114 |
+
$oldLibxmlDisableEntityLoader = libxml_disable_entity_loader(true);
|
115 |
+
$dom = new \DOMDocument;
|
116 |
+
$dom->loadXML($wddx);
|
117 |
+
foreach ($dom->childNodes as $child) {
|
118 |
+
if ($child->nodeType === XML_DOCUMENT_TYPE_NODE) {
|
119 |
+
throw new Exception\InvalidArgumentException(
|
120 |
+
'Invalid XML: Detected use of illegal DOCTYPE'
|
121 |
+
);
|
122 |
+
}
|
123 |
+
}
|
124 |
+
$simpleXml = simplexml_import_dom($dom);
|
125 |
+
//$simpleXml = new \SimpleXMLElement($wddx);
|
126 |
+
libxml_disable_entity_loader($oldLibxmlDisableEntityLoader);
|
127 |
+
if (isset($simpleXml->data[0]->null[0])) {
|
128 |
+
return null; // valid null
|
129 |
+
}
|
130 |
+
throw new Exception\RuntimeException('Unserialization failed: Invalid wddx packet');
|
131 |
+
} catch (\Exception $e) {
|
132 |
+
throw new Exception\RuntimeException('Unserialization failed: ' . $e->getMessage(), 0, $e);
|
133 |
+
}
|
134 |
+
}
|
135 |
+
|
136 |
+
return $ret;
|
137 |
+
}
|
138 |
+
}
|
backend/vendor/zendframework/zend-serializer/Zend/Serializer/Adapter/WddxOptions.php
ADDED
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Zend Framework (http://framework.zend.com/)
|
4 |
+
*
|
5 |
+
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
+
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
+
*/
|
9 |
+
|
10 |
+
namespace Zend\Serializer\Adapter;
|
11 |
+
|
12 |
+
class WddxOptions extends AdapterOptions
|
13 |
+
{
|
14 |
+
/**
|
15 |
+
* Wddx packet header comment
|
16 |
+
*
|
17 |
+
* @var string
|
18 |
+
*/
|
19 |
+
protected $comment = '';
|
20 |
+
|
21 |
+
/**
|
22 |
+
* Set WDDX header comment
|
23 |
+
*
|
24 |
+
* @param string $comment
|
25 |
+
* @return WddxOptions
|
26 |
+
*/
|
27 |
+
public function setComment($comment)
|
28 |
+
{
|
29 |
+
$this->comment = (string) $comment;
|
30 |
+
return $this;
|
31 |
+
}
|
32 |
+
|
33 |
+
/**
|
34 |
+
* Get WDDX header comment
|
35 |
+
*
|
36 |
+
* @return string
|
37 |
+
*/
|
38 |
+
public function getComment()
|
39 |
+
{
|
40 |
+
return $this->comment;
|
41 |
+
}
|
42 |
+
}
|
backend/vendor/zendframework/zend-serializer/Zend/Serializer/AdapterPluginManager.php
ADDED
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Zend Framework (http://framework.zend.com/)
|
4 |
+
*
|
5 |
+
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
+
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
+
*/
|
9 |
+
|
10 |
+
namespace Zend\Serializer;
|
11 |
+
|
12 |
+
use Zend\ServiceManager\AbstractPluginManager;
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Plugin manager implementation for serializer adapters.
|
16 |
+
*
|
17 |
+
* Enforces that adapters retrieved are instances of
|
18 |
+
* Adapter\AdapterInterface. Additionally, it registers a number of default
|
19 |
+
* adapters available.
|
20 |
+
*/
|
21 |
+
class AdapterPluginManager extends AbstractPluginManager
|
22 |
+
{
|
23 |
+
/**
|
24 |
+
* Default set of adapters
|
25 |
+
*
|
26 |
+
* @var array
|
27 |
+
*/
|
28 |
+
protected $invokableClasses = array(
|
29 |
+
'igbinary' => 'Zend\Serializer\Adapter\IgBinary',
|
30 |
+
'json' => 'Zend\Serializer\Adapter\Json',
|
31 |
+
'msgpack' => 'Zend\Serializer\Adapter\MsgPack',
|
32 |
+
'phpcode' => 'Zend\Serializer\Adapter\PhpCode',
|
33 |
+
'phpserialize' => 'Zend\Serializer\Adapter\PhpSerialize',
|
34 |
+
'pythonpickle' => 'Zend\Serializer\Adapter\PythonPickle',
|
35 |
+
'wddx' => 'Zend\Serializer\Adapter\Wddx',
|
36 |
+
);
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Validate the plugin
|
40 |
+
*
|
41 |
+
* Checks that the adapter loaded is an instance
|
42 |
+
* of Adapter\AdapterInterface.
|
43 |
+
*
|
44 |
+
* @param mixed $plugin
|
45 |
+
* @return void
|
46 |
+
* @throws Exception\RuntimeException if invalid
|
47 |
+
*/
|
48 |
+
public function validatePlugin($plugin)
|
49 |
+
{
|
50 |
+
if ($plugin instanceof Adapter\AdapterInterface) {
|
51 |
+
// we're okay
|
52 |
+
return;
|
53 |
+
}
|
54 |
+
|
55 |
+
throw new Exception\RuntimeException(sprintf(
|
56 |
+
'Plugin of type %s is invalid; must implement %s\Adapter\AdapterInterface',
|
57 |
+
(is_object($plugin) ? get_class($plugin) : gettype($plugin)),
|
58 |
+
__NAMESPACE__
|
59 |
+
));
|
60 |
+
}
|
61 |
+
}
|
backend/vendor/zendframework/zend-serializer/Zend/Serializer/CONTRIBUTING.md
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
1 |
+
# CONTRIBUTING
|
2 |
+
|
3 |
+
Please don't open pull requests against this repository, please use https://github.com/zendframework/zf2.
|
backend/vendor/zendframework/zend-serializer/Zend/Serializer/Exception/ExceptionInterface.php
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Zend Framework (http://framework.zend.com/)
|
4 |
+
*
|
5 |
+
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
+
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
+
*/
|
9 |
+
|
10 |
+
namespace Zend\Serializer\Exception;
|
11 |
+
|
12 |
+
interface ExceptionInterface
|
13 |
+
{
|
14 |
+
}
|
backend/vendor/zendframework/zend-serializer/Zend/Serializer/Exception/ExtensionNotLoadedException.php
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Zend Framework (http://framework.zend.com/)
|
4 |
+
*
|
5 |
+
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
+
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
+
*/
|
9 |
+
|
10 |
+
namespace Zend\Serializer\Exception;
|
11 |
+
|
12 |
+
class ExtensionNotLoadedException extends RuntimeException
|
13 |
+
{
|
14 |
+
}
|
backend/vendor/zendframework/zend-serializer/Zend/Serializer/Exception/InvalidArgumentException.php
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Zend Framework (http://framework.zend.com/)
|
4 |
+
*
|
5 |
+
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
+
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
+
*/
|
9 |
+
|
10 |
+
namespace Zend\Serializer\Exception;
|
11 |
+
|
12 |
+
/**
|
13 |
+
* @used InvalidArgumentException
|
14 |
+
*/
|
15 |
+
class InvalidArgumentException extends \InvalidArgumentException implements
|
16 |
+
ExceptionInterface
|
17 |
+
{
|
18 |
+
}
|
backend/vendor/zendframework/zend-serializer/Zend/Serializer/Exception/RuntimeException.php
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Zend Framework (http://framework.zend.com/)
|
4 |
+
*
|
5 |
+
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
+
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
+
*/
|
9 |
+
|
10 |
+
namespace Zend\Serializer\Exception;
|
11 |
+
|
12 |
+
/**
|
13 |
+
* @used RuntimeException
|
14 |
+
*/
|
15 |
+
class RuntimeException extends \RuntimeException implements ExceptionInterface
|
16 |
+
{
|
17 |
+
}
|
backend/vendor/zendframework/zend-serializer/Zend/Serializer/README.md
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Serializer Component from ZF2
|
2 |
+
=============================
|
3 |
+
|
4 |
+
This is the Serializer component for ZF2.
|
5 |
+
|
6 |
+
- File issues at https://github.com/zendframework/zf2/issues
|
7 |
+
- Create pull requests against https://github.com/zendframework/zf2
|
8 |
+
- Documentation is at http://framework.zend.com/docs
|
9 |
+
|
10 |
+
LICENSE
|
11 |
+
-------
|
12 |
+
|
13 |
+
The files in this archive are released under the [Zend Framework
|
14 |
+
license](http://framework.zend.com/license), which is a 3-clause BSD license.
|
15 |
+
|
backend/vendor/zendframework/zend-serializer/Zend/Serializer/Serializer.php
ADDED
@@ -0,0 +1,146 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Zend Framework (http://framework.zend.com/)
|
4 |
+
*
|
5 |
+
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
+
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
+
*/
|
9 |
+
|
10 |
+
namespace Zend\Serializer;
|
11 |
+
|
12 |
+
use Zend\Serializer\Adapter\AdapterInterface as Adapter;
|
13 |
+
|
14 |
+
abstract class Serializer
|
15 |
+
{
|
16 |
+
/**
|
17 |
+
* Plugin manager for loading adapters
|
18 |
+
*
|
19 |
+
* @var null|AdapterPluginManager
|
20 |
+
*/
|
21 |
+
protected static $adapters;
|
22 |
+
|
23 |
+
/**
|
24 |
+
* The default adapter.
|
25 |
+
*
|
26 |
+
* @var string|Adapter
|
27 |
+
*/
|
28 |
+
protected static $defaultAdapter = 'PhpSerialize';
|
29 |
+
|
30 |
+
/**
|
31 |
+
* Create a serializer adapter instance.
|
32 |
+
*
|
33 |
+
* @param string|Adapter $adapterName Name of the adapter class
|
34 |
+
* @param array |\Traversable|null $adapterOptions Serializer options
|
35 |
+
* @return Adapter
|
36 |
+
*/
|
37 |
+
public static function factory($adapterName, $adapterOptions = null)
|
38 |
+
{
|
39 |
+
if ($adapterName instanceof Adapter) {
|
40 |
+
return $adapterName; // $adapterName is already an adapter object
|
41 |
+
}
|
42 |
+
|
43 |
+
return static::getAdapterPluginManager()->get($adapterName, $adapterOptions);
|
44 |
+
}
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Change the adapter plugin manager
|
48 |
+
*
|
49 |
+
* @param AdapterPluginManager $adapters
|
50 |
+
* @return void
|
51 |
+
*/
|
52 |
+
public static function setAdapterPluginManager(AdapterPluginManager $adapters)
|
53 |
+
{
|
54 |
+
static::$adapters = $adapters;
|
55 |
+
}
|
56 |
+
|
57 |
+
/**
|
58 |
+
* Get the adapter plugin manager
|
59 |
+
*
|
60 |
+
* @return AdapterPluginManager
|
61 |
+
*/
|
62 |
+
public static function getAdapterPluginManager()
|
63 |
+
{
|
64 |
+
if (static::$adapters === null) {
|
65 |
+
static::$adapters = new AdapterPluginManager();
|
66 |
+
}
|
67 |
+
return static::$adapters;
|
68 |
+
}
|
69 |
+
|
70 |
+
/**
|
71 |
+
* Resets the internal adapter plugin manager
|
72 |
+
*
|
73 |
+
* @return AdapterPluginManager
|
74 |
+
*/
|
75 |
+
public static function resetAdapterPluginManager()
|
76 |
+
{
|
77 |
+
static::$adapters = new AdapterPluginManager();
|
78 |
+
return static::$adapters;
|
79 |
+
}
|
80 |
+
|
81 |
+
/**
|
82 |
+
* Change the default adapter.
|
83 |
+
*
|
84 |
+
* @param string|Adapter $adapter
|
85 |
+
* @param array|\Traversable|null $adapterOptions
|
86 |
+
*/
|
87 |
+
public static function setDefaultAdapter($adapter, $adapterOptions = null)
|
88 |
+
{
|
89 |
+
static::$defaultAdapter = static::factory($adapter, $adapterOptions);
|
90 |
+
}
|
91 |
+
|
92 |
+
/**
|
93 |
+
* Get the default adapter.
|
94 |
+
*
|
95 |
+
* @return Adapter
|
96 |
+
*/
|
97 |
+
public static function getDefaultAdapter()
|
98 |
+
{
|
99 |
+
if (!static::$defaultAdapter instanceof Adapter) {
|
100 |
+
static::setDefaultAdapter(static::$defaultAdapter);
|
101 |
+
}
|
102 |
+
return static::$defaultAdapter;
|
103 |
+
}
|
104 |
+
|
105 |
+
/**
|
106 |
+
* Generates a storable representation of a value using the default adapter.
|
107 |
+
* Optionally different adapter could be provided as second argument
|
108 |
+
*
|
109 |
+
* @param mixed $value
|
110 |
+
* @param string|Adapter $adapter
|
111 |
+
* @param array|\Traversable|null $adapterOptions Adapter constructor options
|
112 |
+
* only used to create adapter instance
|
113 |
+
* @return string
|
114 |
+
*/
|
115 |
+
public static function serialize($value, $adapter = null, $adapterOptions = null)
|
116 |
+
{
|
117 |
+
if ($adapter !== null) {
|
118 |
+
$adapter = static::factory($adapter, $adapterOptions);
|
119 |
+
} else {
|
120 |
+
$adapter = static::getDefaultAdapter();
|
121 |
+
}
|
122 |
+
|
123 |
+
return $adapter->serialize($value);
|
124 |
+
}
|
125 |
+
|
126 |
+
/**
|
127 |
+
* Creates a PHP value from a stored representation using the default adapter.
|
128 |
+
* Optionally different adapter could be provided as second argument
|
129 |
+
*
|
130 |
+
* @param string $serialized
|
131 |
+
* @param string|Adapter $adapter
|
132 |
+
* @param array|\Traversable|null $adapterOptions Adapter constructor options
|
133 |
+
* only used to create adapter instance
|
134 |
+
* @return mixed
|
135 |
+
*/
|
136 |
+
public static function unserialize($serialized, $adapter = null, $adapterOptions = null)
|
137 |
+
{
|
138 |
+
if ($adapter !== null) {
|
139 |
+
$adapter = static::factory($adapter, $adapterOptions);
|
140 |
+
} else {
|
141 |
+
$adapter = static::getDefaultAdapter();
|
142 |
+
}
|
143 |
+
|
144 |
+
return $adapter->unserialize($serialized);
|
145 |
+
}
|
146 |
+
}
|
backend/vendor/zendframework/zend-serializer/Zend/Serializer/composer.json
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"name": "zendframework/zend-serializer",
|
3 |
+
"description": "provides an adapter based interface to simply generate storable representation of PHP types by different facilities, and recover",
|
4 |
+
"license": "BSD-3-Clause",
|
5 |
+
"keywords": [
|
6 |
+
"zf2",
|
7 |
+
"serializer"
|
8 |
+
],
|
9 |
+
"homepage": "https://github.com/zendframework/zf2",
|
10 |
+
"autoload": {
|
11 |
+
"psr-0": {
|
12 |
+
"Zend\\Serializer\\": ""
|
13 |
+
}
|
14 |
+
},
|
15 |
+
"target-dir": "Zend/Serializer",
|
16 |
+
"require": {
|
17 |
+
"php": ">=5.3.23",
|
18 |
+
"zendframework/zend-stdlib": "self.version",
|
19 |
+
"zendframework/zend-json": "self.version",
|
20 |
+
"zendframework/zend-math": "self.version"
|
21 |
+
},
|
22 |
+
"require-dev": {
|
23 |
+
"zendframework/zend-servicemanager": "self.version"
|
24 |
+
},
|
25 |
+
"suggest": {
|
26 |
+
"zendframework/zend-servicemanager": "To support plugin manager support"
|
27 |
+
},
|
28 |
+
"extra": {
|
29 |
+
"branch-alias": {
|
30 |
+
"dev-master": "2.3-dev",
|
31 |
+
"dev-develop": "2.4-dev"
|
32 |
+
}
|
33 |
+
}
|
34 |
+
}
|
backend/vendor/zendframework/zend-servicemanager/Zend/ServiceManager/AbstractFactoryInterface.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-servicemanager/Zend/ServiceManager/AbstractPluginManager.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
@@ -164,6 +164,16 @@ abstract class AbstractPluginManager extends ServiceManager implements ServiceLo
|
|
164 |
{
|
165 |
$invokable = $this->invokableClasses[$canonicalName];
|
166 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
167 |
if (null === $this->creationOptions
|
168 |
|| (is_array($this->creationOptions) && empty($this->creationOptions))
|
169 |
) {
|
@@ -206,9 +216,13 @@ abstract class AbstractPluginManager extends ServiceManager implements ServiceLo
|
|
206 |
} elseif (is_callable($factory)) {
|
207 |
$instance = $this->createServiceViaCallback($factory, $canonicalName, $requestedName);
|
208 |
} else {
|
209 |
-
throw new Exception\ServiceNotCreatedException(
|
210 |
-
|
211 |
-
|
|
|
|
|
|
|
|
|
212 |
}
|
213 |
|
214 |
return $instance;
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
164 |
{
|
165 |
$invokable = $this->invokableClasses[$canonicalName];
|
166 |
|
167 |
+
if (!class_exists($invokable)) {
|
168 |
+
throw new Exception\ServiceNotFoundException(sprintf(
|
169 |
+
'%s: failed retrieving "%s%s" via invokable class "%s"; class does not exist',
|
170 |
+
get_class($this) . '::' . __FUNCTION__,
|
171 |
+
$canonicalName,
|
172 |
+
($requestedName ? '(alias: ' . $requestedName . ')' : ''),
|
173 |
+
$invokable
|
174 |
+
));
|
175 |
+
}
|
176 |
+
|
177 |
if (null === $this->creationOptions
|
178 |
|| (is_array($this->creationOptions) && empty($this->creationOptions))
|
179 |
) {
|
216 |
} elseif (is_callable($factory)) {
|
217 |
$instance = $this->createServiceViaCallback($factory, $canonicalName, $requestedName);
|
218 |
} else {
|
219 |
+
throw new Exception\ServiceNotCreatedException(
|
220 |
+
sprintf(
|
221 |
+
'While attempting to create %s%s an invalid factory was registered for this instance type.',
|
222 |
+
$canonicalName,
|
223 |
+
($requestedName ? '(alias: ' . $requestedName . ')' : '')
|
224 |
+
)
|
225 |
+
);
|
226 |
}
|
227 |
|
228 |
return $instance;
|
backend/vendor/zendframework/zend-servicemanager/Zend/ServiceManager/Config.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-servicemanager/Zend/ServiceManager/ConfigInterface.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-servicemanager/Zend/ServiceManager/DelegatorFactoryInterface.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-servicemanager/Zend/ServiceManager/Di/DiAbstractServiceFactory.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-servicemanager/Zend/ServiceManager/Di/DiInstanceManagerProxy.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-servicemanager/Zend/ServiceManager/Di/DiServiceFactory.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
@@ -100,12 +100,9 @@ class DiServiceFactory extends Di implements FactoryInterface
|
|
100 |
}
|
101 |
|
102 |
try {
|
103 |
-
|
104 |
$service = parent::get($name, $params);
|
105 |
return $service;
|
106 |
-
|
107 |
} catch (DiClassNotFoundException $e) {
|
108 |
-
|
109 |
// allow this di service to get dependencies from the service locator AFTER trying di
|
110 |
if ($this->useServiceLocator == self::USE_SL_AFTER_DI && $this->serviceLocator->has($name)) {
|
111 |
return $this->serviceLocator->get($name);
|
@@ -117,6 +114,5 @@ class DiServiceFactory extends Di implements FactoryInterface
|
|
117 |
);
|
118 |
}
|
119 |
}
|
120 |
-
|
121 |
}
|
122 |
}
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
100 |
}
|
101 |
|
102 |
try {
|
|
|
103 |
$service = parent::get($name, $params);
|
104 |
return $service;
|
|
|
105 |
} catch (DiClassNotFoundException $e) {
|
|
|
106 |
// allow this di service to get dependencies from the service locator AFTER trying di
|
107 |
if ($this->useServiceLocator == self::USE_SL_AFTER_DI && $this->serviceLocator->has($name)) {
|
108 |
return $this->serviceLocator->get($name);
|
114 |
);
|
115 |
}
|
116 |
}
|
|
|
117 |
}
|
118 |
}
|
backend/vendor/zendframework/zend-servicemanager/Zend/ServiceManager/Di/DiServiceInitializer.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-servicemanager/Zend/ServiceManager/Exception/CircularDependencyFoundException.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-servicemanager/Zend/ServiceManager/Exception/CircularReferenceException.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-servicemanager/Zend/ServiceManager/Exception/ExceptionInterface.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-servicemanager/Zend/ServiceManager/Exception/InvalidArgumentException.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-servicemanager/Zend/ServiceManager/Exception/InvalidServiceNameException.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-servicemanager/Zend/ServiceManager/Exception/RuntimeException.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-servicemanager/Zend/ServiceManager/Exception/ServiceNotCreatedException.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-servicemanager/Zend/ServiceManager/Exception/ServiceNotFoundException.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-servicemanager/Zend/ServiceManager/FactoryInterface.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-servicemanager/Zend/ServiceManager/InitializerInterface.php
CHANGED
@@ -3,13 +3,12 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
10 |
namespace Zend\ServiceManager;
|
11 |
|
12 |
-
|
13 |
interface InitializerInterface
|
14 |
{
|
15 |
/**
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
10 |
namespace Zend\ServiceManager;
|
11 |
|
|
|
12 |
interface InitializerInterface
|
13 |
{
|
14 |
/**
|
backend/vendor/zendframework/zend-servicemanager/Zend/ServiceManager/MutableCreationOptionsInterface.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-servicemanager/Zend/ServiceManager/Proxy/LazyServiceFactory.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-servicemanager/Zend/ServiceManager/Proxy/LazyServiceFactoryFactory.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-servicemanager/Zend/ServiceManager/ServiceLocatorAwareInterface.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-servicemanager/Zend/ServiceManager/ServiceLocatorAwareTrait.php
CHANGED
@@ -3,13 +3,12 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
10 |
namespace Zend\ServiceManager;
|
11 |
|
12 |
-
|
13 |
trait ServiceLocatorAwareTrait
|
14 |
{
|
15 |
/**
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
10 |
namespace Zend\ServiceManager;
|
11 |
|
|
|
12 |
trait ServiceLocatorAwareTrait
|
13 |
{
|
14 |
/**
|
backend/vendor/zendframework/zend-servicemanager/Zend/ServiceManager/ServiceLocatorInterface.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-servicemanager/Zend/ServiceManager/ServiceManager.php
CHANGED
@@ -3,17 +3,14 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
10 |
namespace Zend\ServiceManager;
|
11 |
|
12 |
-
use ReflectionClass;
|
13 |
-
|
14 |
class ServiceManager implements ServiceLocatorInterface
|
15 |
{
|
16 |
-
|
17 |
/**@#+
|
18 |
* Constants
|
19 |
*/
|
@@ -429,6 +426,30 @@ class ServiceManager implements ServiceLocatorInterface
|
|
429 |
return $this;
|
430 |
}
|
431 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
432 |
/**
|
433 |
* Resolve the alias for the given canonical name
|
434 |
*
|
@@ -968,6 +989,7 @@ class ServiceManager implements ServiceLocatorInterface
|
|
968 |
{
|
969 |
foreach ($this->peeringServiceManagers as $peeringServiceManager) {
|
970 |
if ($peeringServiceManager->has($name)) {
|
|
|
971 |
return $peeringServiceManager->get($name);
|
972 |
}
|
973 |
}
|
@@ -982,6 +1004,7 @@ class ServiceManager implements ServiceLocatorInterface
|
|
982 |
|
983 |
foreach ($this->peeringServiceManagers as $peeringServiceManager) {
|
984 |
if ($peeringServiceManager->has($name)) {
|
|
|
985 |
return $peeringServiceManager->get($name);
|
986 |
}
|
987 |
}
|
@@ -1130,7 +1153,6 @@ class ServiceManager implements ServiceLocatorInterface
|
|
1130 |
};
|
1131 |
|
1132 |
for ($i = 0; $i < $delegatorsCount; $i += 1) {
|
1133 |
-
|
1134 |
$delegatorFactory = $this->delegators[$canonicalName][$i];
|
1135 |
|
1136 |
if (is_string($delegatorFactory)) {
|
@@ -1165,6 +1187,8 @@ class ServiceManager implements ServiceLocatorInterface
|
|
1165 |
* @see https://bugs.php.net/bug.php?id=53727
|
1166 |
* @see https://github.com/zendframework/zf2/pull/1807
|
1167 |
*
|
|
|
|
|
1168 |
* @param string $className
|
1169 |
* @param string $type
|
1170 |
* @return bool
|
@@ -1173,17 +1197,7 @@ class ServiceManager implements ServiceLocatorInterface
|
|
1173 |
*/
|
1174 |
protected static function isSubclassOf($className, $type)
|
1175 |
{
|
1176 |
-
|
1177 |
-
return true;
|
1178 |
-
}
|
1179 |
-
if (PHP_VERSION_ID >= 50307) {
|
1180 |
-
return false;
|
1181 |
-
}
|
1182 |
-
if (!interface_exists($type)) {
|
1183 |
-
return false;
|
1184 |
-
}
|
1185 |
-
$r = new ReflectionClass($className);
|
1186 |
-
return $r->implementsInterface($type);
|
1187 |
}
|
1188 |
|
1189 |
/**
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
10 |
namespace Zend\ServiceManager;
|
11 |
|
|
|
|
|
12 |
class ServiceManager implements ServiceLocatorInterface
|
13 |
{
|
|
|
14 |
/**@#+
|
15 |
* Constants
|
16 |
*/
|
426 |
return $this;
|
427 |
}
|
428 |
|
429 |
+
/**
|
430 |
+
* @param string $name
|
431 |
+
* @return bool
|
432 |
+
* @throws Exception\ServiceNotFoundException
|
433 |
+
*/
|
434 |
+
public function isShared($name)
|
435 |
+
{
|
436 |
+
$cName = $this->canonicalizeName($name);
|
437 |
+
|
438 |
+
if (!$this->has($name)) {
|
439 |
+
throw new Exception\ServiceNotFoundException(sprintf(
|
440 |
+
'%s: A service by the name "%s" was not found',
|
441 |
+
get_class($this) . '::' . __FUNCTION__,
|
442 |
+
$name
|
443 |
+
));
|
444 |
+
}
|
445 |
+
|
446 |
+
if (!isset($this->shared[$cName])) {
|
447 |
+
return $this->shareByDefault();
|
448 |
+
}
|
449 |
+
|
450 |
+
return $this->shared[$cName];
|
451 |
+
}
|
452 |
+
|
453 |
/**
|
454 |
* Resolve the alias for the given canonical name
|
455 |
*
|
989 |
{
|
990 |
foreach ($this->peeringServiceManagers as $peeringServiceManager) {
|
991 |
if ($peeringServiceManager->has($name)) {
|
992 |
+
$this->shared[$name] = $peeringServiceManager->isShared($name);
|
993 |
return $peeringServiceManager->get($name);
|
994 |
}
|
995 |
}
|
1004 |
|
1005 |
foreach ($this->peeringServiceManagers as $peeringServiceManager) {
|
1006 |
if ($peeringServiceManager->has($name)) {
|
1007 |
+
$this->shared[$name] = $peeringServiceManager->isShared($name);
|
1008 |
return $peeringServiceManager->get($name);
|
1009 |
}
|
1010 |
}
|
1153 |
};
|
1154 |
|
1155 |
for ($i = 0; $i < $delegatorsCount; $i += 1) {
|
|
|
1156 |
$delegatorFactory = $this->delegators[$canonicalName][$i];
|
1157 |
|
1158 |
if (is_string($delegatorFactory)) {
|
1187 |
* @see https://bugs.php.net/bug.php?id=53727
|
1188 |
* @see https://github.com/zendframework/zf2/pull/1807
|
1189 |
*
|
1190 |
+
* @deprecated since zf 2.3 requires PHP >= 5.3.23
|
1191 |
+
*
|
1192 |
* @param string $className
|
1193 |
* @param string $type
|
1194 |
* @return bool
|
1197 |
*/
|
1198 |
protected static function isSubclassOf($className, $type)
|
1199 |
{
|
1200 |
+
return is_subclass_of($className, $type);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1201 |
}
|
1202 |
|
1203 |
/**
|
backend/vendor/zendframework/zend-servicemanager/Zend/ServiceManager/ServiceManagerAwareInterface.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-servicemanager/Zend/ServiceManager/composer.json
CHANGED
@@ -20,6 +20,7 @@
|
|
20 |
"zendframework/zend-di": "self.version"
|
21 |
},
|
22 |
"suggest": {
|
|
|
23 |
"zendframework/zend-di": "Zend\\Di component"
|
24 |
},
|
25 |
"extra": {
|
20 |
"zendframework/zend-di": "self.version"
|
21 |
},
|
22 |
"suggest": {
|
23 |
+
"ocramius/proxy-manager": "ProxyManager 0.5.* to handle lazy initialization of services",
|
24 |
"zendframework/zend-di": "Zend\\Di component"
|
25 |
},
|
26 |
"extra": {
|
backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/AbstractOptions.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
@@ -47,10 +47,15 @@ abstract class AbstractOptions implements ParameterObjectInterface
|
|
47 |
}
|
48 |
|
49 |
if (!is_array($options) && !$options instanceof Traversable) {
|
50 |
-
throw new Exception\InvalidArgumentException(
|
51 |
-
|
52 |
-
|
53 |
-
|
|
|
|
|
|
|
|
|
|
|
54 |
}
|
55 |
|
56 |
foreach ($options as $key => $value) {
|
@@ -73,7 +78,9 @@ abstract class AbstractOptions implements ParameterObjectInterface
|
|
73 |
return '_' . strtolower($letter);
|
74 |
};
|
75 |
foreach ($this as $key => $value) {
|
76 |
-
if ($key === '__strictMode__')
|
|
|
|
|
77 |
$normalizedKey = preg_replace_callback('/([A-Z])/', $transform, $key);
|
78 |
$array[$normalizedKey] = $value;
|
79 |
}
|
@@ -91,17 +98,21 @@ abstract class AbstractOptions implements ParameterObjectInterface
|
|
91 |
*/
|
92 |
public function __set($key, $value)
|
93 |
{
|
94 |
-
$setter = 'set' . str_replace('
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
. 'which must be defined'
|
100 |
-
);
|
101 |
-
} elseif (!$this->__strictMode__ && !method_exists($this, $setter)) {
|
102 |
return;
|
103 |
}
|
104 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
105 |
}
|
106 |
|
107 |
/**
|
@@ -114,16 +125,17 @@ abstract class AbstractOptions implements ParameterObjectInterface
|
|
114 |
*/
|
115 |
public function __get($key)
|
116 |
{
|
117 |
-
$getter = 'get' . str_replace('
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
. 'have a matching ' . $getter . ' getter method '
|
122 |
-
. 'which must be defined'
|
123 |
-
);
|
124 |
}
|
125 |
|
126 |
-
|
|
|
|
|
|
|
|
|
127 |
}
|
128 |
|
129 |
/**
|
@@ -152,7 +164,7 @@ abstract class AbstractOptions implements ParameterObjectInterface
|
|
152 |
} catch (Exception\BadMethodCallException $e) {
|
153 |
throw new Exception\InvalidArgumentException(
|
154 |
'The class property $' . $key . ' cannot be unset as'
|
155 |
-
|
156 |
0,
|
157 |
$e
|
158 |
);
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
47 |
}
|
48 |
|
49 |
if (!is_array($options) && !$options instanceof Traversable) {
|
50 |
+
throw new Exception\InvalidArgumentException(
|
51 |
+
sprintf(
|
52 |
+
'Parameter provided to %s must be an %s, %s or %s',
|
53 |
+
__METHOD__,
|
54 |
+
'array',
|
55 |
+
'Traversable',
|
56 |
+
'Zend\Stdlib\AbstractOptions'
|
57 |
+
)
|
58 |
+
);
|
59 |
}
|
60 |
|
61 |
foreach ($options as $key => $value) {
|
78 |
return '_' . strtolower($letter);
|
79 |
};
|
80 |
foreach ($this as $key => $value) {
|
81 |
+
if ($key === '__strictMode__') {
|
82 |
+
continue;
|
83 |
+
}
|
84 |
$normalizedKey = preg_replace_callback('/([A-Z])/', $transform, $key);
|
85 |
$array[$normalizedKey] = $value;
|
86 |
}
|
98 |
*/
|
99 |
public function __set($key, $value)
|
100 |
{
|
101 |
+
$setter = 'set' . str_replace('_', '', $key);
|
102 |
+
|
103 |
+
if (method_exists($this, $setter)) {
|
104 |
+
$this->{$setter}($value);
|
105 |
+
|
|
|
|
|
|
|
106 |
return;
|
107 |
}
|
108 |
+
|
109 |
+
if ($this->__strictMode__) {
|
110 |
+
throw new Exception\BadMethodCallException(sprintf(
|
111 |
+
'The option "%s" does not have a matching "%s" setter method which must be defined',
|
112 |
+
$key,
|
113 |
+
'set' . str_replace(' ', '', ucwords(str_replace('_', ' ', $key)))
|
114 |
+
));
|
115 |
+
}
|
116 |
}
|
117 |
|
118 |
/**
|
125 |
*/
|
126 |
public function __get($key)
|
127 |
{
|
128 |
+
$getter = 'get' . str_replace('_', '', $key);
|
129 |
+
|
130 |
+
if (method_exists($this, $getter)) {
|
131 |
+
return $this->{$getter}();
|
|
|
|
|
|
|
132 |
}
|
133 |
|
134 |
+
throw new Exception\BadMethodCallException(sprintf(
|
135 |
+
'The option "%s" does not have a matching "%s" getter method which must be defined',
|
136 |
+
$key,
|
137 |
+
'get' . str_replace(' ', '', ucwords(str_replace('_', ' ', $key)))
|
138 |
+
));
|
139 |
}
|
140 |
|
141 |
/**
|
164 |
} catch (Exception\BadMethodCallException $e) {
|
165 |
throw new Exception\InvalidArgumentException(
|
166 |
'The class property $' . $key . ' cannot be unset as'
|
167 |
+
. ' NULL is an invalid value for it',
|
168 |
0,
|
169 |
$e
|
170 |
);
|
backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/ArrayObject.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/ArraySerializableInterface.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/ArrayStack.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/ArrayUtils.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
@@ -257,8 +257,8 @@ abstract class ArrayUtils
|
|
257 |
public static function merge(array $a, array $b, $preserveNumericKeys = false)
|
258 |
{
|
259 |
foreach ($b as $key => $value) {
|
260 |
-
if (array_key_exists($key, $a)) {
|
261 |
-
if (is_int($key)
|
262 |
$a[] = $value;
|
263 |
} elseif (is_array($value) && is_array($a[$key])) {
|
264 |
$a[$key] = static::merge($a[$key], $value, $preserveNumericKeys);
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
257 |
public static function merge(array $a, array $b, $preserveNumericKeys = false)
|
258 |
{
|
259 |
foreach ($b as $key => $value) {
|
260 |
+
if (isset($a[$key]) || array_key_exists($key, $a)) {
|
261 |
+
if (!$preserveNumericKeys && is_int($key)) {
|
262 |
$a[] = $value;
|
263 |
} elseif (is_array($value) && is_array($a[$key])) {
|
264 |
$a[$key] = static::merge($a[$key], $value, $preserveNumericKeys);
|
backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/CallbackHandler.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/DateTime.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/DispatchableInterface.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/ErrorHandler.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Exception/BadMethodCallException.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Exception/DomainException.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Exception/ExceptionInterface.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Exception/ExtensionNotLoadedException.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Exception/InvalidArgumentException.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Exception/InvalidCallbackException.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Exception/LogicException.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Exception/RuntimeException.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Extractor/ExtractionInterface.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Glob.php
CHANGED
@@ -3,13 +3,12 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
10 |
namespace Zend\Stdlib;
|
11 |
|
12 |
-
|
13 |
/**
|
14 |
* Wrapper for glob with fallback if GLOB_BRACE is not available.
|
15 |
*/
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
10 |
namespace Zend\Stdlib;
|
11 |
|
|
|
12 |
/**
|
13 |
* Wrapper for glob with fallback if GLOB_BRACE is not available.
|
14 |
*/
|
backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Guard/AllGuardsTrait.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Guard/ArrayOrTraversableGuardTrait.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Guard/EmptyGuardTrait.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Guard/GuardUtils.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Guard/NullGuardTrait.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Hydrator/AbstractHydrator.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Hydrator/Aggregate/AggregateHydrator.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Hydrator/Aggregate/ExtractEvent.php
CHANGED
@@ -3,13 +3,12 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
10 |
namespace Zend\Stdlib\Hydrator\Aggregate;
|
11 |
|
12 |
-
|
13 |
use Zend\EventManager\Event;
|
14 |
|
15 |
/**
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
10 |
namespace Zend\Stdlib\Hydrator\Aggregate;
|
11 |
|
|
|
12 |
use Zend\EventManager\Event;
|
13 |
|
14 |
/**
|
backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Hydrator/Aggregate/HydrateEvent.php
CHANGED
@@ -3,13 +3,12 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
10 |
namespace Zend\Stdlib\Hydrator\Aggregate;
|
11 |
|
12 |
-
|
13 |
use Zend\EventManager\Event;
|
14 |
|
15 |
/**
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
10 |
namespace Zend\Stdlib\Hydrator\Aggregate;
|
11 |
|
|
|
12 |
use Zend\EventManager\Event;
|
13 |
|
14 |
/**
|
backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Hydrator/Aggregate/HydratorListener.php
CHANGED
@@ -3,13 +3,12 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
10 |
namespace Zend\Stdlib\Hydrator\Aggregate;
|
11 |
|
12 |
-
|
13 |
use Zend\EventManager\AbstractListenerAggregate;
|
14 |
use Zend\EventManager\EventManagerInterface;
|
15 |
use Zend\Stdlib\Hydrator\HydratorInterface;
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
10 |
namespace Zend\Stdlib\Hydrator\Aggregate;
|
11 |
|
|
|
12 |
use Zend\EventManager\AbstractListenerAggregate;
|
13 |
use Zend\EventManager\EventManagerInterface;
|
14 |
use Zend\Stdlib\Hydrator\HydratorInterface;
|
backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Hydrator/ArraySerializable.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
@@ -13,7 +13,6 @@ use Zend\Stdlib\Exception;
|
|
13 |
|
14 |
class ArraySerializable extends AbstractHydrator
|
15 |
{
|
16 |
-
|
17 |
/**
|
18 |
* Extract values from the provided object
|
19 |
*
|
@@ -26,9 +25,9 @@ class ArraySerializable extends AbstractHydrator
|
|
26 |
public function extract($object)
|
27 |
{
|
28 |
if (!is_callable(array($object, 'getArrayCopy'))) {
|
29 |
-
throw new Exception\BadMethodCallException(
|
30 |
-
'%s expects the provided object to implement getArrayCopy()', __METHOD__
|
31 |
-
)
|
32 |
}
|
33 |
|
34 |
$data = $object->getArrayCopy();
|
@@ -75,9 +74,9 @@ class ArraySerializable extends AbstractHydrator
|
|
75 |
} elseif (is_callable(array($object, 'populate'))) {
|
76 |
$object->populate($replacement);
|
77 |
} else {
|
78 |
-
throw new Exception\BadMethodCallException(
|
79 |
-
'%s expects the provided object to implement exchangeArray() or populate()', __METHOD__
|
80 |
-
)
|
81 |
}
|
82 |
return $object;
|
83 |
}
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
13 |
|
14 |
class ArraySerializable extends AbstractHydrator
|
15 |
{
|
|
|
16 |
/**
|
17 |
* Extract values from the provided object
|
18 |
*
|
25 |
public function extract($object)
|
26 |
{
|
27 |
if (!is_callable(array($object, 'getArrayCopy'))) {
|
28 |
+
throw new Exception\BadMethodCallException(
|
29 |
+
sprintf('%s expects the provided object to implement getArrayCopy()', __METHOD__)
|
30 |
+
);
|
31 |
}
|
32 |
|
33 |
$data = $object->getArrayCopy();
|
74 |
} elseif (is_callable(array($object, 'populate'))) {
|
75 |
$object->populate($replacement);
|
76 |
} else {
|
77 |
+
throw new Exception\BadMethodCallException(
|
78 |
+
sprintf('%s expects the provided object to implement exchangeArray() or populate()', __METHOD__)
|
79 |
+
);
|
80 |
}
|
81 |
return $object;
|
82 |
}
|
backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Hydrator/ClassMethods.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
@@ -45,10 +45,10 @@ class ClassMethods extends AbstractHydrator implements HydratorOptionsInterface
|
|
45 |
|
46 |
$this->callableMethodFilter = new OptionalParametersFilter();
|
47 |
|
48 |
-
$this->filterComposite->addFilter(
|
49 |
-
$this->filterComposite->addFilter(
|
50 |
-
$this->filterComposite->addFilter(
|
51 |
-
$this->filterComposite->addFilter(
|
52 |
}
|
53 |
|
54 |
/**
|
@@ -109,16 +109,16 @@ class ClassMethods extends AbstractHydrator implements HydratorOptionsInterface
|
|
109 |
public function extract($object)
|
110 |
{
|
111 |
if (!is_object($object)) {
|
112 |
-
throw new Exception\BadMethodCallException(
|
113 |
-
'%s expects the provided $object to be a PHP object)', __METHOD__
|
114 |
-
)
|
115 |
}
|
116 |
|
117 |
$filter = null;
|
118 |
if ($object instanceof FilterProviderInterface) {
|
119 |
$filter = new FilterComposite(
|
120 |
array($object->getFilter()),
|
121 |
-
array(new MethodMatchFilter(
|
122 |
);
|
123 |
} else {
|
124 |
$filter = $this->filterComposite;
|
@@ -168,9 +168,9 @@ class ClassMethods extends AbstractHydrator implements HydratorOptionsInterface
|
|
168 |
public function hydrate(array $data, $object)
|
169 |
{
|
170 |
if (!is_object($object)) {
|
171 |
-
throw new Exception\BadMethodCallException(
|
172 |
-
'%s expects the provided $object to be a PHP object)', __METHOD__
|
173 |
-
)
|
174 |
}
|
175 |
|
176 |
foreach ($data as $property => $value) {
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
45 |
|
46 |
$this->callableMethodFilter = new OptionalParametersFilter();
|
47 |
|
48 |
+
$this->filterComposite->addFilter('is', new IsFilter());
|
49 |
+
$this->filterComposite->addFilter('has', new HasFilter());
|
50 |
+
$this->filterComposite->addFilter('get', new GetFilter());
|
51 |
+
$this->filterComposite->addFilter('parameter', new OptionalParametersFilter(), FilterComposite::CONDITION_AND);
|
52 |
}
|
53 |
|
54 |
/**
|
109 |
public function extract($object)
|
110 |
{
|
111 |
if (!is_object($object)) {
|
112 |
+
throw new Exception\BadMethodCallException(
|
113 |
+
sprintf('%s expects the provided $object to be a PHP object)', __METHOD__)
|
114 |
+
);
|
115 |
}
|
116 |
|
117 |
$filter = null;
|
118 |
if ($object instanceof FilterProviderInterface) {
|
119 |
$filter = new FilterComposite(
|
120 |
array($object->getFilter()),
|
121 |
+
array(new MethodMatchFilter('getFilter'))
|
122 |
);
|
123 |
} else {
|
124 |
$filter = $this->filterComposite;
|
168 |
public function hydrate(array $data, $object)
|
169 |
{
|
170 |
if (!is_object($object)) {
|
171 |
+
throw new Exception\BadMethodCallException(
|
172 |
+
sprintf('%s expects the provided $object to be a PHP object)', __METHOD__)
|
173 |
+
);
|
174 |
}
|
175 |
|
176 |
foreach ($data as $property => $value) {
|
backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Hydrator/Filter/FilterComposite.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
namespace Zend\Stdlib\Hydrator\Filter;
|
@@ -40,12 +40,10 @@ class FilterComposite implements FilterInterface
|
|
40 |
*/
|
41 |
public function __construct($orFilter = array(), $andFilter = array())
|
42 |
{
|
43 |
-
array_walk(
|
|
|
44 |
function ($value, $key) {
|
45 |
-
if (
|
46 |
-
!is_callable($value)
|
47 |
-
&& !$value instanceof FilterInterface
|
48 |
-
) {
|
49 |
throw new InvalidArgumentException(
|
50 |
'The value of ' . $key . ' should be either a callable or ' .
|
51 |
'an instance of Zend\Stdlib\Hydrator\Filter\FilterInterface'
|
@@ -54,12 +52,10 @@ class FilterComposite implements FilterInterface
|
|
54 |
}
|
55 |
);
|
56 |
|
57 |
-
array_walk(
|
|
|
58 |
function ($value, $key) {
|
59 |
-
if (
|
60 |
-
!is_callable($value)
|
61 |
-
&& !$value instanceof FilterInterface
|
62 |
-
) {
|
63 |
throw new InvalidArgumentException(
|
64 |
'The value of ' . $key . ' should be either a callable or ' .
|
65 |
'an instance of Zend\Stdlib\Hydrator\Filter\FilterInterface'
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
namespace Zend\Stdlib\Hydrator\Filter;
|
40 |
*/
|
41 |
public function __construct($orFilter = array(), $andFilter = array())
|
42 |
{
|
43 |
+
array_walk(
|
44 |
+
$orFilter,
|
45 |
function ($value, $key) {
|
46 |
+
if (!is_callable($value) && !$value instanceof FilterInterface) {
|
|
|
|
|
|
|
47 |
throw new InvalidArgumentException(
|
48 |
'The value of ' . $key . ' should be either a callable or ' .
|
49 |
'an instance of Zend\Stdlib\Hydrator\Filter\FilterInterface'
|
52 |
}
|
53 |
);
|
54 |
|
55 |
+
array_walk(
|
56 |
+
$andFilter,
|
57 |
function ($value, $key) {
|
58 |
+
if (!is_callable($value) && !$value instanceof FilterInterface) {
|
|
|
|
|
|
|
59 |
throw new InvalidArgumentException(
|
60 |
'The value of ' . $key . ' should be either a callable or ' .
|
61 |
'an instance of Zend\Stdlib\Hydrator\Filter\FilterInterface'
|
backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Hydrator/Filter/FilterInterface.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
namespace Zend\Stdlib\Hydrator\Filter;
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
namespace Zend\Stdlib\Hydrator\Filter;
|
backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Hydrator/Filter/FilterProviderInterface.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
namespace Zend\Stdlib\Hydrator\Filter;
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
namespace Zend\Stdlib\Hydrator\Filter;
|
backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Hydrator/Filter/GetFilter.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
namespace Zend\Stdlib\Hydrator\Filter;
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
namespace Zend\Stdlib\Hydrator\Filter;
|
backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Hydrator/Filter/HasFilter.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
namespace Zend\Stdlib\Hydrator\Filter;
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
namespace Zend\Stdlib\Hydrator\Filter;
|
backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Hydrator/Filter/IsFilter.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
namespace Zend\Stdlib\Hydrator\Filter;
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
namespace Zend\Stdlib\Hydrator\Filter;
|
backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Hydrator/Filter/MethodMatchFilter.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
namespace Zend\Stdlib\Hydrator\Filter;
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
namespace Zend\Stdlib\Hydrator\Filter;
|
backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Hydrator/Filter/NumberOfParameterFilter.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Hydrator/Filter/OptionalParametersFilter.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
namespace Zend\Stdlib\Hydrator\Filter;
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
namespace Zend\Stdlib\Hydrator\Filter;
|
backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Hydrator/FilterEnabledInterface.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Hydrator/HydrationInterface.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Hydrator/HydratorAwareInterface.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Hydrator/HydratorAwareTrait.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Hydrator/HydratorInterface.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
@@ -13,5 +13,4 @@ use Zend\Stdlib\Extractor\ExtractionInterface;
|
|
13 |
|
14 |
interface HydratorInterface extends HydrationInterface, ExtractionInterface
|
15 |
{
|
16 |
-
|
17 |
}
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
13 |
|
14 |
interface HydratorInterface extends HydrationInterface, ExtractionInterface
|
15 |
{
|
|
|
16 |
}
|
backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Hydrator/HydratorOptionsInterface.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Hydrator/HydratorPluginManager.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Hydrator/NamingStrategy/NamingStrategyInterface.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Hydrator/NamingStrategy/UnderscoreNamingStrategy.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Hydrator/NamingStrategyEnabledInterface.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Hydrator/ObjectProperty.php
CHANGED
@@ -3,48 +3,56 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
10 |
namespace Zend\Stdlib\Hydrator;
|
11 |
|
12 |
use Zend\Stdlib\Exception;
|
|
|
|
|
13 |
|
14 |
class ObjectProperty extends AbstractHydrator
|
15 |
{
|
16 |
/**
|
17 |
-
*
|
|
|
|
|
|
|
|
|
|
|
18 |
*
|
19 |
* Extracts the accessible non-static properties of the given $object.
|
20 |
*
|
21 |
-
* @param object $object
|
22 |
-
* @return array
|
23 |
* @throws Exception\BadMethodCallException for a non-object $object
|
24 |
*/
|
25 |
public function extract($object)
|
26 |
{
|
27 |
if (!is_object($object)) {
|
28 |
-
throw new Exception\BadMethodCallException(
|
29 |
-
'%s expects the provided $object to be a PHP object)', __METHOD__
|
30 |
-
)
|
31 |
}
|
32 |
|
33 |
-
$data
|
34 |
-
|
35 |
$filter = $this->getFilter();
|
|
|
36 |
foreach ($data as $name => $value) {
|
37 |
// Filter keys, removing any we don't want
|
38 |
-
if (
|
39 |
unset($data[$name]);
|
40 |
continue;
|
41 |
}
|
|
|
42 |
// Replace name if extracted differ
|
43 |
$extracted = $this->extractName($name, $object);
|
|
|
44 |
if ($extracted !== $name) {
|
45 |
unset($data[$name]);
|
46 |
$name = $extracted;
|
47 |
}
|
|
|
48 |
$data[$name] = $this->extractValue($name, $value, $object);
|
49 |
}
|
50 |
|
@@ -52,26 +60,51 @@ class ObjectProperty extends AbstractHydrator
|
|
52 |
}
|
53 |
|
54 |
/**
|
|
|
|
|
55 |
* Hydrate an object by populating public properties
|
56 |
*
|
57 |
* Hydrates an object by setting public properties of the object.
|
58 |
*
|
59 |
-
* @param array $data
|
60 |
-
* @param object $object
|
61 |
-
* @return object
|
62 |
* @throws Exception\BadMethodCallException for a non-object $object
|
63 |
*/
|
64 |
public function hydrate(array $data, $object)
|
65 |
{
|
66 |
if (!is_object($object)) {
|
67 |
-
throw new Exception\BadMethodCallException(
|
68 |
-
'%s expects the provided $object to be a PHP object)', __METHOD__
|
69 |
-
)
|
70 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
71 |
foreach ($data as $name => $value) {
|
72 |
$property = $this->hydrateName($name, $data);
|
|
|
|
|
|
|
|
|
|
|
73 |
$object->$property = $this->hydrateValue($property, $value, $data);
|
74 |
}
|
|
|
75 |
return $object;
|
76 |
}
|
77 |
}
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
10 |
namespace Zend\Stdlib\Hydrator;
|
11 |
|
12 |
use Zend\Stdlib\Exception;
|
13 |
+
use ReflectionClass;
|
14 |
+
use ReflectionProperty;
|
15 |
|
16 |
class ObjectProperty extends AbstractHydrator
|
17 |
{
|
18 |
/**
|
19 |
+
* @var array[] indexed by class name and then property name
|
20 |
+
*/
|
21 |
+
private static $skippedPropertiesCache = array();
|
22 |
+
|
23 |
+
/**
|
24 |
+
* {@inheritDoc}
|
25 |
*
|
26 |
* Extracts the accessible non-static properties of the given $object.
|
27 |
*
|
|
|
|
|
28 |
* @throws Exception\BadMethodCallException for a non-object $object
|
29 |
*/
|
30 |
public function extract($object)
|
31 |
{
|
32 |
if (!is_object($object)) {
|
33 |
+
throw new Exception\BadMethodCallException(
|
34 |
+
sprintf('%s expects the provided $object to be a PHP object)', __METHOD__)
|
35 |
+
);
|
36 |
}
|
37 |
|
38 |
+
$data = get_object_vars($object);
|
|
|
39 |
$filter = $this->getFilter();
|
40 |
+
|
41 |
foreach ($data as $name => $value) {
|
42 |
// Filter keys, removing any we don't want
|
43 |
+
if (! $filter->filter($name)) {
|
44 |
unset($data[$name]);
|
45 |
continue;
|
46 |
}
|
47 |
+
|
48 |
// Replace name if extracted differ
|
49 |
$extracted = $this->extractName($name, $object);
|
50 |
+
|
51 |
if ($extracted !== $name) {
|
52 |
unset($data[$name]);
|
53 |
$name = $extracted;
|
54 |
}
|
55 |
+
|
56 |
$data[$name] = $this->extractValue($name, $value, $object);
|
57 |
}
|
58 |
|
60 |
}
|
61 |
|
62 |
/**
|
63 |
+
* {@inheritDoc}
|
64 |
+
*
|
65 |
* Hydrate an object by populating public properties
|
66 |
*
|
67 |
* Hydrates an object by setting public properties of the object.
|
68 |
*
|
|
|
|
|
|
|
69 |
* @throws Exception\BadMethodCallException for a non-object $object
|
70 |
*/
|
71 |
public function hydrate(array $data, $object)
|
72 |
{
|
73 |
if (!is_object($object)) {
|
74 |
+
throw new Exception\BadMethodCallException(
|
75 |
+
sprintf('%s expects the provided $object to be a PHP object)', __METHOD__)
|
76 |
+
);
|
77 |
}
|
78 |
+
|
79 |
+
$properties = & self::$skippedPropertiesCache[get_class($object)];
|
80 |
+
|
81 |
+
if (! isset($properties)) {
|
82 |
+
$reflection = new ReflectionClass($object);
|
83 |
+
$properties = array_fill_keys(
|
84 |
+
array_map(
|
85 |
+
function (ReflectionProperty $property) {
|
86 |
+
return $property->getName();
|
87 |
+
},
|
88 |
+
$reflection->getProperties(
|
89 |
+
ReflectionProperty::IS_PRIVATE
|
90 |
+
+ ReflectionProperty::IS_PROTECTED
|
91 |
+
+ ReflectionProperty::IS_STATIC
|
92 |
+
)
|
93 |
+
),
|
94 |
+
true
|
95 |
+
);
|
96 |
+
}
|
97 |
+
|
98 |
foreach ($data as $name => $value) {
|
99 |
$property = $this->hydrateName($name, $data);
|
100 |
+
|
101 |
+
if (isset($properties[$property])) {
|
102 |
+
continue;
|
103 |
+
}
|
104 |
+
|
105 |
$object->$property = $this->hydrateValue($property, $value, $data);
|
106 |
}
|
107 |
+
|
108 |
return $object;
|
109 |
}
|
110 |
}
|
backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Hydrator/Reflection.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
@@ -16,7 +16,7 @@ class Reflection extends AbstractHydrator
|
|
16 |
{
|
17 |
/**
|
18 |
* Simple in-memory array cache of ReflectionProperties used.
|
19 |
-
* @var
|
20 |
*/
|
21 |
protected static $reflProperties = array();
|
22 |
|
@@ -67,7 +67,7 @@ class Reflection extends AbstractHydrator
|
|
67 |
*
|
68 |
* @param string|object $input
|
69 |
* @throws Exception\InvalidArgumentException
|
70 |
-
* @return
|
71 |
*/
|
72 |
protected static function getReflProperties($input)
|
73 |
{
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
16 |
{
|
17 |
/**
|
18 |
* Simple in-memory array cache of ReflectionProperties used.
|
19 |
+
* @var \ReflectionProperty[]
|
20 |
*/
|
21 |
protected static $reflProperties = array();
|
22 |
|
67 |
*
|
68 |
* @param string|object $input
|
69 |
* @throws Exception\InvalidArgumentException
|
70 |
+
* @return \ReflectionProperty[]
|
71 |
*/
|
72 |
protected static function getReflProperties($input)
|
73 |
{
|
backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Hydrator/Strategy/ClosureStrategy.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Hydrator/Strategy/DefaultStrategy.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Hydrator/Strategy/SerializableStrategy.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Hydrator/Strategy/StrategyInterface.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Hydrator/StrategyEnabledInterface.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/InitializableInterface.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/JsonSerializable.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/JsonSerializable/PhpLegacyCompatibility.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Message.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/MessageInterface.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
@@ -41,5 +41,4 @@ interface MessageInterface
|
|
41 |
* @return mixed
|
42 |
*/
|
43 |
public function getContent();
|
44 |
-
|
45 |
}
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
41 |
* @return mixed
|
42 |
*/
|
43 |
public function getContent();
|
|
|
44 |
}
|
backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/ParameterObjectInterface.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Parameters.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
@@ -83,7 +83,7 @@ class Parameters extends PhpArrayObject implements ParametersInterface
|
|
83 |
*/
|
84 |
public function offsetGet($name)
|
85 |
{
|
86 |
-
|
87 |
return parent::offsetGet($name);
|
88 |
}
|
89 |
return null;
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
83 |
*/
|
84 |
public function offsetGet($name)
|
85 |
{
|
86 |
+
if ($this->offsetExists($name)) {
|
87 |
return parent::offsetGet($name);
|
88 |
}
|
89 |
return null;
|
backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/ParametersInterface.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/PriorityList.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
@@ -12,9 +12,6 @@ namespace Zend\Stdlib;
|
|
12 |
use Countable;
|
13 |
use Iterator;
|
14 |
|
15 |
-
/**
|
16 |
-
* Priority list
|
17 |
-
*/
|
18 |
class PriorityList implements Iterator, Countable
|
19 |
{
|
20 |
const EXTR_DATA = 0x00000001;
|
@@ -23,7 +20,7 @@ class PriorityList implements Iterator, Countable
|
|
23 |
/**
|
24 |
* Internal list of all items.
|
25 |
*
|
26 |
-
* @var array
|
27 |
*/
|
28 |
protected $items = array();
|
29 |
|
@@ -58,8 +55,9 @@ class PriorityList implements Iterator, Countable
|
|
58 |
* Insert a new item.
|
59 |
*
|
60 |
* @param string $name
|
61 |
-
* @param mixed
|
62 |
-
* @param int
|
|
|
63 |
* @return void
|
64 |
*/
|
65 |
public function insert($name, $value, $priority = 0)
|
@@ -74,13 +72,23 @@ class PriorityList implements Iterator, Countable
|
|
74 |
);
|
75 |
}
|
76 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
77 |
public function setPriority($name, $priority)
|
78 |
{
|
79 |
if (!isset($this->items[$name])) {
|
80 |
throw new \Exception("item $name not found");
|
81 |
}
|
|
|
82 |
$this->items[$name]['priority'] = (int) $priority;
|
83 |
-
$this->sorted
|
|
|
84 |
return $this;
|
85 |
}
|
86 |
|
@@ -92,11 +100,10 @@ class PriorityList implements Iterator, Countable
|
|
92 |
*/
|
93 |
public function remove($name)
|
94 |
{
|
95 |
-
if (
|
96 |
-
|
97 |
}
|
98 |
|
99 |
-
$this->count--;
|
100 |
unset($this->items[$name]);
|
101 |
}
|
102 |
|
@@ -107,7 +114,7 @@ class PriorityList implements Iterator, Countable
|
|
107 |
*/
|
108 |
public function clear()
|
109 |
{
|
110 |
-
$this->items
|
111 |
$this->serial = 0;
|
112 |
$this->count = 0;
|
113 |
$this->sorted = false;
|
@@ -158,25 +165,26 @@ class PriorityList implements Iterator, Countable
|
|
158 |
/**
|
159 |
* Get/Set serial order mode
|
160 |
*
|
161 |
-
* @param bool $flag
|
|
|
162 |
* @return bool
|
163 |
*/
|
164 |
public function isLIFO($flag = null)
|
165 |
{
|
166 |
if ($flag !== null) {
|
167 |
-
|
168 |
-
|
|
|
|
|
169 |
$this->sorted = false;
|
170 |
}
|
171 |
}
|
172 |
-
|
|
|
173 |
}
|
174 |
|
175 |
/**
|
176 |
-
*
|
177 |
-
*
|
178 |
-
* @see Iterator::rewind()
|
179 |
-
* @return void
|
180 |
*/
|
181 |
public function rewind()
|
182 |
{
|
@@ -185,22 +193,17 @@ class PriorityList implements Iterator, Countable
|
|
185 |
}
|
186 |
|
187 |
/**
|
188 |
-
*
|
189 |
-
*
|
190 |
-
* @see Iterator::current()
|
191 |
-
* @return mixed
|
192 |
*/
|
193 |
public function current()
|
194 |
{
|
195 |
$node = current($this->items);
|
196 |
-
|
|
|
197 |
}
|
198 |
|
199 |
/**
|
200 |
-
*
|
201 |
-
*
|
202 |
-
* @see Iterator::key()
|
203 |
-
* @return string
|
204 |
*/
|
205 |
public function key()
|
206 |
{
|
@@ -208,33 +211,25 @@ class PriorityList implements Iterator, Countable
|
|
208 |
}
|
209 |
|
210 |
/**
|
211 |
-
*
|
212 |
-
*
|
213 |
-
* @see Iterator::next()
|
214 |
-
* @return mixed
|
215 |
*/
|
216 |
public function next()
|
217 |
{
|
218 |
$node = next($this->items);
|
219 |
-
|
|
|
220 |
}
|
221 |
|
222 |
/**
|
223 |
-
*
|
224 |
-
*
|
225 |
-
* @see Iterator::valid()
|
226 |
-
* @return bool
|
227 |
*/
|
228 |
public function valid()
|
229 |
{
|
230 |
-
return ($this->
|
231 |
}
|
232 |
|
233 |
/**
|
234 |
-
*
|
235 |
-
*
|
236 |
-
* @see Countable::count()
|
237 |
-
* @return int
|
238 |
*/
|
239 |
public function count()
|
240 |
{
|
@@ -245,18 +240,21 @@ class PriorityList implements Iterator, Countable
|
|
245 |
* Return list as array
|
246 |
*
|
247 |
* @param int $flag
|
|
|
248 |
* @return array
|
249 |
*/
|
250 |
public function toArray($flag = self::EXTR_DATA)
|
251 |
{
|
252 |
$this->sort();
|
|
|
253 |
if ($flag == self::EXTR_BOTH) {
|
254 |
return $this->items;
|
255 |
}
|
|
|
256 |
return array_map(
|
257 |
-
($
|
258 |
-
|
259 |
-
|
260 |
$this->items
|
261 |
);
|
262 |
}
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
12 |
use Countable;
|
13 |
use Iterator;
|
14 |
|
|
|
|
|
|
|
15 |
class PriorityList implements Iterator, Countable
|
16 |
{
|
17 |
const EXTR_DATA = 0x00000001;
|
20 |
/**
|
21 |
* Internal list of all items.
|
22 |
*
|
23 |
+
* @var array[]
|
24 |
*/
|
25 |
protected $items = array();
|
26 |
|
55 |
* Insert a new item.
|
56 |
*
|
57 |
* @param string $name
|
58 |
+
* @param mixed $value
|
59 |
+
* @param int $priority
|
60 |
+
*
|
61 |
* @return void
|
62 |
*/
|
63 |
public function insert($name, $value, $priority = 0)
|
72 |
);
|
73 |
}
|
74 |
|
75 |
+
/**
|
76 |
+
* @param string $name
|
77 |
+
* @param int $priority
|
78 |
+
*
|
79 |
+
* @return $this
|
80 |
+
*
|
81 |
+
* @throws \Exception
|
82 |
+
*/
|
83 |
public function setPriority($name, $priority)
|
84 |
{
|
85 |
if (!isset($this->items[$name])) {
|
86 |
throw new \Exception("item $name not found");
|
87 |
}
|
88 |
+
|
89 |
$this->items[$name]['priority'] = (int) $priority;
|
90 |
+
$this->sorted = false;
|
91 |
+
|
92 |
return $this;
|
93 |
}
|
94 |
|
100 |
*/
|
101 |
public function remove($name)
|
102 |
{
|
103 |
+
if (isset($this->items[$name])) {
|
104 |
+
$this->count--;
|
105 |
}
|
106 |
|
|
|
107 |
unset($this->items[$name]);
|
108 |
}
|
109 |
|
114 |
*/
|
115 |
public function clear()
|
116 |
{
|
117 |
+
$this->items = array();
|
118 |
$this->serial = 0;
|
119 |
$this->count = 0;
|
120 |
$this->sorted = false;
|
165 |
/**
|
166 |
* Get/Set serial order mode
|
167 |
*
|
168 |
+
* @param bool|null $flag
|
169 |
+
*
|
170 |
* @return bool
|
171 |
*/
|
172 |
public function isLIFO($flag = null)
|
173 |
{
|
174 |
if ($flag !== null) {
|
175 |
+
$isLifo = $flag === true ? 1 : -1;
|
176 |
+
|
177 |
+
if ($isLifo !== $this->isLIFO) {
|
178 |
+
$this->isLIFO = $isLifo;
|
179 |
$this->sorted = false;
|
180 |
}
|
181 |
}
|
182 |
+
|
183 |
+
return 1 === $this->isLIFO;
|
184 |
}
|
185 |
|
186 |
/**
|
187 |
+
* {@inheritDoc}
|
|
|
|
|
|
|
188 |
*/
|
189 |
public function rewind()
|
190 |
{
|
193 |
}
|
194 |
|
195 |
/**
|
196 |
+
* {@inheritDoc}
|
|
|
|
|
|
|
197 |
*/
|
198 |
public function current()
|
199 |
{
|
200 |
$node = current($this->items);
|
201 |
+
|
202 |
+
return $node ? $node['data'] : false;
|
203 |
}
|
204 |
|
205 |
/**
|
206 |
+
* {@inheritDoc}
|
|
|
|
|
|
|
207 |
*/
|
208 |
public function key()
|
209 |
{
|
211 |
}
|
212 |
|
213 |
/**
|
214 |
+
* {@inheritDoc}
|
|
|
|
|
|
|
215 |
*/
|
216 |
public function next()
|
217 |
{
|
218 |
$node = next($this->items);
|
219 |
+
|
220 |
+
return $node ? $node['data'] : false;
|
221 |
}
|
222 |
|
223 |
/**
|
224 |
+
* {@inheritDoc}
|
|
|
|
|
|
|
225 |
*/
|
226 |
public function valid()
|
227 |
{
|
228 |
+
return current($this->items) !== false;
|
229 |
}
|
230 |
|
231 |
/**
|
232 |
+
* {@inheritDoc}
|
|
|
|
|
|
|
233 |
*/
|
234 |
public function count()
|
235 |
{
|
240 |
* Return list as array
|
241 |
*
|
242 |
* @param int $flag
|
243 |
+
*
|
244 |
* @return array
|
245 |
*/
|
246 |
public function toArray($flag = self::EXTR_DATA)
|
247 |
{
|
248 |
$this->sort();
|
249 |
+
|
250 |
if ($flag == self::EXTR_BOTH) {
|
251 |
return $this->items;
|
252 |
}
|
253 |
+
|
254 |
return array_map(
|
255 |
+
function ($item) use ($flag) {
|
256 |
+
return ($flag == PriorityList::EXTR_PRIORITY) ? $item['priority'] : $item['data'];
|
257 |
+
},
|
258 |
$this->items
|
259 |
);
|
260 |
}
|
backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/PriorityQueue.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Request.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/RequestInterface.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/Response.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/ResponseInterface.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
@@ -11,5 +11,4 @@ namespace Zend\Stdlib;
|
|
11 |
|
12 |
interface ResponseInterface extends MessageInterface
|
13 |
{
|
14 |
-
|
15 |
}
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
11 |
|
12 |
interface ResponseInterface extends MessageInterface
|
13 |
{
|
|
|
14 |
}
|
backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/SplPriorityQueue.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
@@ -42,7 +42,6 @@ class SplPriorityQueue extends \SplPriorityQueue implements Serializable
|
|
42 |
parent::insert($datum, $priority);
|
43 |
}
|
44 |
|
45 |
-
|
46 |
/**
|
47 |
* Serialize to an array
|
48 |
*
|
@@ -59,7 +58,6 @@ class SplPriorityQueue extends \SplPriorityQueue implements Serializable
|
|
59 |
return $array;
|
60 |
}
|
61 |
|
62 |
-
|
63 |
/**
|
64 |
* Serialize
|
65 |
*
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
42 |
parent::insert($datum, $priority);
|
43 |
}
|
44 |
|
|
|
45 |
/**
|
46 |
* Serialize to an array
|
47 |
*
|
58 |
return $array;
|
59 |
}
|
60 |
|
|
|
61 |
/**
|
62 |
* Serialize
|
63 |
*
|
backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/SplQueue.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/SplStack.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/StringUtils.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
@@ -19,7 +19,6 @@ use Zend\Stdlib\StringWrapper\StringWrapperInterface;
|
|
19 |
*/
|
20 |
abstract class StringUtils
|
21 |
{
|
22 |
-
|
23 |
/**
|
24 |
* Ordered list of registered string wrapper instances
|
25 |
*
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
19 |
*/
|
20 |
abstract class StringUtils
|
21 |
{
|
|
|
22 |
/**
|
23 |
* Ordered list of registered string wrapper instances
|
24 |
*
|
backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/StringWrapper/AbstractStringWrapper.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
@@ -67,7 +67,6 @@ abstract class AbstractStringWrapper implements StringWrapperInterface
|
|
67 |
);
|
68 |
}
|
69 |
|
70 |
-
|
71 |
if ($convertEncoding !== null) {
|
72 |
$convertEncodingUpper = strtoupper($convertEncoding);
|
73 |
if (!in_array($convertEncodingUpper, $supportedEncodings)) {
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
67 |
);
|
68 |
}
|
69 |
|
|
|
70 |
if ($convertEncoding !== null) {
|
71 |
$convertEncodingUpper = strtoupper($convertEncoding);
|
72 |
if (!in_array($convertEncodingUpper, $supportedEncodings)) {
|
backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/StringWrapper/Iconv.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/StringWrapper/Intl.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/StringWrapper/MbString.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/StringWrapper/Native.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/StringWrapper/StringWrapperInterface.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
|
backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/compatibility/autoload.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
-
* @copyright Copyright (c) 2005-
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
* @deprecated
|
9 |
*/
|
3 |
* Zend Framework (http://framework.zend.com/)
|
4 |
*
|
5 |
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
6 |
+
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
* @deprecated
|
9 |
*/
|
backend/vendor/zendframework/zend-stdlib/Zend/Stdlib/composer.json
CHANGED
@@ -19,12 +19,14 @@
|
|
19 |
"require-dev": {
|
20 |
"zendframework/zend-eventmanager": "self.version",
|
21 |
"zendframework/zend-serializer": "self.version",
|
22 |
-
"zendframework/zend-servicemanager": "self.version"
|
|
|
23 |
},
|
24 |
"suggest": {
|
25 |
"zendframework/zend-eventmanager": "To support aggregate hydrator usage",
|
26 |
"zendframework/zend-serializer": "Zend\\Serializer component",
|
27 |
-
"zendframework/zend-servicemanager": "To support hydrator plugin manager usage"
|
|
|
28 |
},
|
29 |
"extra": {
|
30 |
"branch-alias": {
|
19 |
"require-dev": {
|
20 |
"zendframework/zend-eventmanager": "self.version",
|
21 |
"zendframework/zend-serializer": "self.version",
|
22 |
+
"zendframework/zend-servicemanager": "self.version",
|
23 |
+
"zendframework/zend-filter": "self.version"
|
24 |
},
|
25 |
"suggest": {
|
26 |
"zendframework/zend-eventmanager": "To support aggregate hydrator usage",
|
27 |
"zendframework/zend-serializer": "Zend\\Serializer component",
|
28 |
+
"zendframework/zend-servicemanager": "To support hydrator plugin manager usage",
|
29 |
+
"zendframework/zend-filter": "To support naming strategy hydrator usage"
|
30 |
},
|
31 |
"extra": {
|
32 |
"branch-alias": {
|
locale/shariff3UU-de_DE.mo
CHANGED
Binary file
|
locale/shariff3UU-de_DE.po
CHANGED
@@ -3,167 +3,195 @@ msgstr ""
|
|
3 |
"Project-Id-Version: Shariff for WP posts, pages, themes and as widget v1.2.4\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
"POT-Creation-Date: \n"
|
6 |
-
"PO-Revision-Date: 2015-04-
|
7 |
"Last-Translator: sands <sands@sm-circus.com>\n"
|
8 |
"Language-Team: \n"
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
13 |
-
"X-Generator: Poedit 1.7.
|
|
|
|
|
14 |
"X-Poedit-SourceCharset: utf-8\n"
|
15 |
-
"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2
|
16 |
"X-Poedit-Basepath: ../\n"
|
17 |
-
"X-
|
18 |
-
"Language: de_DE\n"
|
19 |
"X-Poedit-SearchPath-0: .\n"
|
|
|
20 |
|
21 |
-
# @ shariff3UU
|
22 |
#: shariff.php:44
|
|
|
23 |
msgid "Enable Shariff for all post and configure the options with these settings."
|
24 |
msgstr "Aktiviere Shariff für alle Posts und stelle die Parameter ein."
|
25 |
|
26 |
-
# @ shariff3UU
|
27 |
#: shariff.php:52
|
|
|
28 |
msgid "Check to put Shariff at the begin off all posts."
|
29 |
msgstr "Shariff vor jedem Post einfügen."
|
30 |
|
31 |
-
# @ shariff3UU
|
32 |
#: shariff.php:56
|
|
|
33 |
msgid "Select button language."
|
34 |
msgstr "Sprache für die Button vorbelegen."
|
35 |
|
36 |
-
# @ shariff3UU
|
37 |
#: shariff.php:60
|
|
|
38 |
msgid "Select theme (Shariff button design)."
|
39 |
msgstr "Wähle ein Design"
|
40 |
|
41 |
-
# @ shariff3UU
|
42 |
#: shariff.php:64
|
|
|
43 |
msgid "Check this to make orientation of buttons <b>vertical</b>."
|
44 |
msgstr "Buttons vertikal anordnen."
|
45 |
|
46 |
-
# @ shariff3UU
|
47 |
#: shariff.php:69
|
|
|
48 |
msgid "Put in the service do you want enable (<code>facebook|twitter|googleplus|whatsapp|mail|mailto|printer| pinterest|linkedin|xing|reddit|stumbleupon|flattr|info</code>). Use the pipe sign | between two or more services."
|
49 |
msgstr "Schreibe den Namen des Service, der eingebunden werden soll (<code>facebook|twitter|googleplus|whatsapp|mail|mailto|printer| pinterest|linkedin|xing|reddit|stumbleupon|flattr|info</code>). Verwende das Pipe-Zeichen | bei zwei oder mehr Services als Trenner."
|
50 |
|
51 |
-
# @ shariff3UU
|
52 |
#: shariff.php:73
|
|
|
53 |
msgid "Check this to show share statistic."
|
54 |
msgstr "Zeige Statistik in den Buttons."
|
55 |
|
56 |
-
# @ shariff3UU
|
57 |
#: shariff.php:78
|
|
|
58 |
msgid "Change the default link of the \"info\" button to:"
|
59 |
msgstr "Ändere den Standard-Link von \"info\" zu"
|
60 |
|
61 |
-
# @ shariff3UU
|
62 |
#: shariff.php:143
|
|
|
63 |
msgid "This configures the default behavior of Shariff for your blog. You can overwrite this in single posts or pages with the options within the <code>[shariff]</code> shorttag."
|
64 |
msgstr "Hier konfigurierst Du das Standard-Verhalten von Shariff für alle Posts im Blog. Es läßt sich in einzelnen Posts oder Seiten mit dem Shorttag <code>[shariff]</code> anpassen."
|
65 |
|
66 |
-
# @ shariff3UU
|
67 |
#: shariff.php:97
|
|
|
68 |
msgid "browser selected"
|
69 |
msgstr "vom Browser bestimmt"
|
70 |
|
71 |
-
# @ shariff3UU
|
72 |
#: shariff.php:281
|
|
|
73 |
msgid "Add Shariff as configured in the admin menue."
|
74 |
msgstr "Fügt Shariff wie im Admin-Menü konfiguriert an."
|
75 |
|
76 |
-
# @ shariff3UU
|
77 |
#: shariff.php:296
|
|
|
78 |
msgid "Title"
|
79 |
msgstr "Titel"
|
80 |
|
81 |
-
# @ shariff3UU
|
82 |
#: shariff.php:83
|
|
|
83 |
msgid "CSS style attributes for the CSS container _around_ Shariff"
|
84 |
msgstr "CSS Stil-Attribute für den Rahmen-Container _um_ Shariff"
|
85 |
|
86 |
-
# @ shariff3UU
|
87 |
#: shariff.php:149
|
|
|
88 |
msgid "please read about it in the FAQ"
|
89 |
msgstr "bitte lies Details dazu in der FAQ"
|
90 |
|
91 |
-
# @ shariff3UU
|
92 |
#: shariff.php:455
|
|
|
93 |
msgid "Please check your "
|
94 |
msgstr "Bitte überprüfe die "
|
95 |
|
96 |
-
# @ shariff3UU
|
97 |
#: shariff.php:455
|
|
|
98 |
msgid "Shariff-Settings</a> - We have new detailed options where shariff buttons can be displayed! Also please read the FAQ about planed changes of the mail/mailto service functionality."
|
99 |
msgstr "Shariff-Einstellungen</a> - Wir haben neue und detailliertere Optionen, wo die Shariff-Buttons erscheinen sollen! Ausserdem ändert sich bald die Funktionalität des mail/mailto-Service. Mehr dazu in der FAQ."
|
100 |
|
101 |
-
# @ shariff3UU
|
102 |
#: shariff.php:48
|
|
|
103 |
msgid "Check to put Shariff at the end off all posts."
|
104 |
msgstr "Shariff am Ende von jedem Post einfügen (Einzelansicht)."
|
105 |
|
106 |
-
# @ shariff3UU
|
107 |
#: shariff.php:52
|
|
|
108 |
msgid "Check to put Shariff at the beginning off all posts."
|
109 |
msgstr "Shariff am Anfang von jedem Post einfügen (Einzelansicht)."
|
110 |
|
111 |
-
# @ shariff3UU
|
112 |
#: shariff.php:56
|
|
|
113 |
msgid "Check to put Shariff at the end off all posts on the overview page."
|
114 |
msgstr "Shariff am Ende von jedem Post einfügen (Übersichts-Seite)."
|
115 |
|
116 |
-
# @ shariff3UU
|
117 |
#: shariff.php:60
|
|
|
118 |
msgid "Check to put Shariff at the beginning off all posts on the overview page."
|
119 |
msgstr "Shariff am Anfang von jedem Post einfügen (Übersichts-Seite)."
|
120 |
|
121 |
-
|
|
|
|
|
|
|
|
|
122 |
#: shariff.php:64
|
|
|
123 |
msgid "Check to put Shariff at the end off all pages."
|
124 |
msgstr "Shariff am Ende von jeder Seite einfügen."
|
125 |
|
126 |
-
# @ shariff3UU
|
127 |
#: shariff.php:68
|
|
|
128 |
msgid "Check to put Shariff at the beginning off all pages."
|
129 |
msgstr "Shariff am Anfang von jeder Seite einfügen."
|
130 |
|
131 |
-
# @ shariff3UU
|
132 |
#: shariff.php:129
|
|
|
133 |
msgid "Set the screen name for Twitter (via) to"
|
134 |
msgstr "Setze für Twitter folgenden Screen-Namen (via)"
|
135 |
|
136 |
-
# @ shariff3UU
|
137 |
#: shariff.php:149
|
|
|
138 |
msgid "Select the alignment of the Shariff buttons"
|
139 |
msgstr "Positioniere die Shariff-Buttons"
|
140 |
|
141 |
-
# @ shariff3UU
|
142 |
#: shariff.php:154
|
|
|
143 |
msgid "Select the alignment of the Shariff buttons in the widget"
|
144 |
msgstr "Positioniere die Shariff-Buttons im Widget"
|
145 |
|
146 |
-
# @ shariff3UU
|
147 |
#: shariff.php:144
|
|
|
148 |
msgid "Set the username for Flattr to"
|
149 |
msgstr "Nutze für Flattr folgenden Benutzernamen"
|
150 |
|
151 |
-
# @ shariff3UU
|
152 |
#: shariff.php:293
|
|
|
153 |
msgid "left"
|
154 |
msgstr "links"
|
155 |
|
156 |
-
# @ shariff3UU
|
157 |
#: shariff.php:294
|
|
|
158 |
msgid "center"
|
159 |
msgstr "mittig"
|
160 |
|
161 |
-
# @ shariff3UU
|
162 |
#: shariff.php:294
|
|
|
163 |
msgid "right"
|
164 |
msgstr "rechts"
|
165 |
|
166 |
-
# @ shariff3UU
|
167 |
#: shariff.php:667
|
|
|
168 |
msgid "Shariff-Settings</a> - Flattr was selected, but no username was provided! Please enter your <strong>Flattr username</strong> in the shariff options!"
|
169 |
msgstr "Shariff-Einstellungen</a> - Flattr wurde ausgewählt, aber kein Benutzername angegeben! Bitte den eigenen <strong>Flattr-Benutzernamen</strong> in den Shariff-Einstellungen eintragen!"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
"Project-Id-Version: Shariff for WP posts, pages, themes and as widget v1.2.4\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
"POT-Creation-Date: \n"
|
6 |
+
"PO-Revision-Date: 2015-04-24 19:14:51+0000\n"
|
7 |
"Last-Translator: sands <sands@sm-circus.com>\n"
|
8 |
"Language-Team: \n"
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
13 |
+
"X-Generator: Poedit 1.7.6\n"
|
14 |
+
"X-Poedit-Language: \n"
|
15 |
+
"X-Poedit-Country: \n"
|
16 |
"X-Poedit-SourceCharset: utf-8\n"
|
17 |
+
"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;\n"
|
18 |
"X-Poedit-Basepath: ../\n"
|
19 |
+
"X-Poedit-Bookmarks: \n"
|
|
|
20 |
"X-Poedit-SearchPath-0: .\n"
|
21 |
+
"X-Textdomain-Support: yes"
|
22 |
|
|
|
23 |
#: shariff.php:44
|
24 |
+
#@ shariff3UU
|
25 |
msgid "Enable Shariff for all post and configure the options with these settings."
|
26 |
msgstr "Aktiviere Shariff für alle Posts und stelle die Parameter ein."
|
27 |
|
|
|
28 |
#: shariff.php:52
|
29 |
+
#@ shariff3UU
|
30 |
msgid "Check to put Shariff at the begin off all posts."
|
31 |
msgstr "Shariff vor jedem Post einfügen."
|
32 |
|
|
|
33 |
#: shariff.php:56
|
34 |
+
#@ shariff3UU
|
35 |
msgid "Select button language."
|
36 |
msgstr "Sprache für die Button vorbelegen."
|
37 |
|
|
|
38 |
#: shariff.php:60
|
39 |
+
#@ shariff3UU
|
40 |
msgid "Select theme (Shariff button design)."
|
41 |
msgstr "Wähle ein Design"
|
42 |
|
|
|
43 |
#: shariff.php:64
|
44 |
+
#@ shariff3UU
|
45 |
msgid "Check this to make orientation of buttons <b>vertical</b>."
|
46 |
msgstr "Buttons vertikal anordnen."
|
47 |
|
|
|
48 |
#: shariff.php:69
|
49 |
+
#@ shariff3UU
|
50 |
msgid "Put in the service do you want enable (<code>facebook|twitter|googleplus|whatsapp|mail|mailto|printer| pinterest|linkedin|xing|reddit|stumbleupon|flattr|info</code>). Use the pipe sign | between two or more services."
|
51 |
msgstr "Schreibe den Namen des Service, der eingebunden werden soll (<code>facebook|twitter|googleplus|whatsapp|mail|mailto|printer| pinterest|linkedin|xing|reddit|stumbleupon|flattr|info</code>). Verwende das Pipe-Zeichen | bei zwei oder mehr Services als Trenner."
|
52 |
|
|
|
53 |
#: shariff.php:73
|
54 |
+
#@ shariff3UU
|
55 |
msgid "Check this to show share statistic."
|
56 |
msgstr "Zeige Statistik in den Buttons."
|
57 |
|
|
|
58 |
#: shariff.php:78
|
59 |
+
#@ shariff3UU
|
60 |
msgid "Change the default link of the \"info\" button to:"
|
61 |
msgstr "Ändere den Standard-Link von \"info\" zu"
|
62 |
|
|
|
63 |
#: shariff.php:143
|
64 |
+
#@ shariff3UU
|
65 |
msgid "This configures the default behavior of Shariff for your blog. You can overwrite this in single posts or pages with the options within the <code>[shariff]</code> shorttag."
|
66 |
msgstr "Hier konfigurierst Du das Standard-Verhalten von Shariff für alle Posts im Blog. Es läßt sich in einzelnen Posts oder Seiten mit dem Shorttag <code>[shariff]</code> anpassen."
|
67 |
|
|
|
68 |
#: shariff.php:97
|
69 |
+
#@ shariff3UU
|
70 |
msgid "browser selected"
|
71 |
msgstr "vom Browser bestimmt"
|
72 |
|
|
|
73 |
#: shariff.php:281
|
74 |
+
#@ shariff3UU
|
75 |
msgid "Add Shariff as configured in the admin menue."
|
76 |
msgstr "Fügt Shariff wie im Admin-Menü konfiguriert an."
|
77 |
|
|
|
78 |
#: shariff.php:296
|
79 |
+
#@ shariff3UU
|
80 |
msgid "Title"
|
81 |
msgstr "Titel"
|
82 |
|
|
|
83 |
#: shariff.php:83
|
84 |
+
#@ shariff3UU
|
85 |
msgid "CSS style attributes for the CSS container _around_ Shariff"
|
86 |
msgstr "CSS Stil-Attribute für den Rahmen-Container _um_ Shariff"
|
87 |
|
|
|
88 |
#: shariff.php:149
|
89 |
+
#@ shariff3UU
|
90 |
msgid "please read about it in the FAQ"
|
91 |
msgstr "bitte lies Details dazu in der FAQ"
|
92 |
|
|
|
93 |
#: shariff.php:455
|
94 |
+
#@ shariff3UU
|
95 |
msgid "Please check your "
|
96 |
msgstr "Bitte überprüfe die "
|
97 |
|
|
|
98 |
#: shariff.php:455
|
99 |
+
#@ shariff3UU
|
100 |
msgid "Shariff-Settings</a> - We have new detailed options where shariff buttons can be displayed! Also please read the FAQ about planed changes of the mail/mailto service functionality."
|
101 |
msgstr "Shariff-Einstellungen</a> - Wir haben neue und detailliertere Optionen, wo die Shariff-Buttons erscheinen sollen! Ausserdem ändert sich bald die Funktionalität des mail/mailto-Service. Mehr dazu in der FAQ."
|
102 |
|
|
|
103 |
#: shariff.php:48
|
104 |
+
#@ shariff3UU
|
105 |
msgid "Check to put Shariff at the end off all posts."
|
106 |
msgstr "Shariff am Ende von jedem Post einfügen (Einzelansicht)."
|
107 |
|
|
|
108 |
#: shariff.php:52
|
109 |
+
#@ shariff3UU
|
110 |
msgid "Check to put Shariff at the beginning off all posts."
|
111 |
msgstr "Shariff am Anfang von jedem Post einfügen (Einzelansicht)."
|
112 |
|
|
|
113 |
#: shariff.php:56
|
114 |
+
#@ shariff3UU
|
115 |
msgid "Check to put Shariff at the end off all posts on the overview page."
|
116 |
msgstr "Shariff am Ende von jedem Post einfügen (Übersichts-Seite)."
|
117 |
|
|
|
118 |
#: shariff.php:60
|
119 |
+
#@ shariff3UU
|
120 |
msgid "Check to put Shariff at the beginning off all posts on the overview page."
|
121 |
msgstr "Shariff am Anfang von jedem Post einfügen (Übersichts-Seite)."
|
122 |
|
123 |
+
#: shariff.php:152
|
124 |
+
#@ shariff3UU
|
125 |
+
msgid "Check to put Shariff at the end off all extension pages (e.g. product sites)."
|
126 |
+
msgstr "Shariff am Ende aller Erweiterungen einfügen (z.B. Artikelseiten in Shops)."
|
127 |
+
|
128 |
#: shariff.php:64
|
129 |
+
#@ shariff3UU
|
130 |
msgid "Check to put Shariff at the end off all pages."
|
131 |
msgstr "Shariff am Ende von jeder Seite einfügen."
|
132 |
|
|
|
133 |
#: shariff.php:68
|
134 |
+
#@ shariff3UU
|
135 |
msgid "Check to put Shariff at the beginning off all pages."
|
136 |
msgstr "Shariff am Anfang von jeder Seite einfügen."
|
137 |
|
|
|
138 |
#: shariff.php:129
|
139 |
+
#@ shariff3UU
|
140 |
msgid "Set the screen name for Twitter (via) to"
|
141 |
msgstr "Setze für Twitter folgenden Screen-Namen (via)"
|
142 |
|
|
|
143 |
#: shariff.php:149
|
144 |
+
#@ shariff3UU
|
145 |
msgid "Select the alignment of the Shariff buttons"
|
146 |
msgstr "Positioniere die Shariff-Buttons"
|
147 |
|
|
|
148 |
#: shariff.php:154
|
149 |
+
#@ shariff3UU
|
150 |
msgid "Select the alignment of the Shariff buttons in the widget"
|
151 |
msgstr "Positioniere die Shariff-Buttons im Widget"
|
152 |
|
|
|
153 |
#: shariff.php:144
|
154 |
+
#@ shariff3UU
|
155 |
msgid "Set the username for Flattr to"
|
156 |
msgstr "Nutze für Flattr folgenden Benutzernamen"
|
157 |
|
|
|
158 |
#: shariff.php:293
|
159 |
+
#@ shariff3UU
|
160 |
msgid "left"
|
161 |
msgstr "links"
|
162 |
|
|
|
163 |
#: shariff.php:294
|
164 |
+
#@ shariff3UU
|
165 |
msgid "center"
|
166 |
msgstr "mittig"
|
167 |
|
|
|
168 |
#: shariff.php:294
|
169 |
+
#@ shariff3UU
|
170 |
msgid "right"
|
171 |
msgstr "rechts"
|
172 |
|
|
|
173 |
#: shariff.php:667
|
174 |
+
#@ shariff3UU
|
175 |
msgid "Shariff-Settings</a> - Flattr was selected, but no username was provided! Please enter your <strong>Flattr username</strong> in the shariff options!"
|
176 |
msgstr "Shariff-Einstellungen</a> - Flattr wurde ausgewählt, aber kein Benutzername angegeben! Bitte den eigenen <strong>Flattr-Benutzernamen</strong> in den Shariff-Einstellungen eintragen!"
|
177 |
+
|
178 |
+
#: shariff.php:117
|
179 |
+
#@ shariff3UU
|
180 |
+
msgid "Settings"
|
181 |
+
msgstr "Einstellungen"
|
182 |
+
|
183 |
+
#: shariff.php:373
|
184 |
+
#@ shariff3UU
|
185 |
+
msgid "Choose image"
|
186 |
+
msgstr "Bild wählen"
|
187 |
+
|
188 |
+
#: shariff.php:216
|
189 |
+
#@ shariff3UU
|
190 |
+
msgid "Select the default image for Pinterest in case no other usable image is found."
|
191 |
+
msgstr "Setze ein Standardbild für Pinterest, falls kein anderes gefunden werden kann."
|
192 |
+
|
193 |
+
# @ shariff3UU
|
194 |
+
#: shariff.php:168
|
195 |
+
msgid "Check this to make the buttons 30% smaller (all designs)."
|
196 |
+
msgstr "Auswählen, um alle Buttons - unabhängig vom Design - 30% kleiner zu machen."
|
197 |
+
|
locale/shariff3UU-fr_FR.mo
CHANGED
Binary file
|
locale/shariff3UU-fr_FR.po
CHANGED
@@ -118,6 +118,11 @@ msgstr "Vérifiez mettre Shariff à la fin de tous les messages sur la page d'ap
|
|
118 |
msgid "Check to put Shariff at the beginning off all posts on the overview page."
|
119 |
msgstr "Vérifiez mettre Shariff au début de tous les messages sur la page de présentation."
|
120 |
|
|
|
|
|
|
|
|
|
|
|
121 |
# @ shariff3UU
|
122 |
#: shariff.php:64
|
123 |
msgid "Check to put Shariff at the end off all pages."
|
@@ -167,3 +172,24 @@ msgstr "droit"
|
|
167 |
#: shariff.php:667
|
168 |
msgid "Shariff-Settings</a> - Flattr was selected, but no username was provided! Please enter your <strong>Flattr username</strong> in the shariff options!"
|
169 |
msgstr "Shariff-Paramètres</a> - Flattr est sélectionné mais aucun nom d'utilisateur spécifié! Se il vous plaît entrez votre propre <strong>nom d'utilisateur</strong> dans les paramètres Flattr Shariff!"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
118 |
msgid "Check to put Shariff at the beginning off all posts on the overview page."
|
119 |
msgstr "Vérifiez mettre Shariff au début de tous les messages sur la page de présentation."
|
120 |
|
121 |
+
#: shariff.php:152
|
122 |
+
#@ shariff3UU
|
123 |
+
msgid "Check to put Shariff at the end off all extension pages (e.g. product sites)."
|
124 |
+
msgstr "Check to put Shariff at the end off all extension pages (e.g. product sites)."
|
125 |
+
|
126 |
# @ shariff3UU
|
127 |
#: shariff.php:64
|
128 |
msgid "Check to put Shariff at the end off all pages."
|
172 |
#: shariff.php:667
|
173 |
msgid "Shariff-Settings</a> - Flattr was selected, but no username was provided! Please enter your <strong>Flattr username</strong> in the shariff options!"
|
174 |
msgstr "Shariff-Paramètres</a> - Flattr est sélectionné mais aucun nom d'utilisateur spécifié! Se il vous plaît entrez votre propre <strong>nom d'utilisateur</strong> dans les paramètres Flattr Shariff!"
|
175 |
+
|
176 |
+
#: shariff.php:117
|
177 |
+
#@ shariff3UU
|
178 |
+
msgid "Settings"
|
179 |
+
msgstr "Settings"
|
180 |
+
|
181 |
+
#: shariff.php:373
|
182 |
+
#@ shariff3UU
|
183 |
+
msgid "Choose image"
|
184 |
+
msgstr "Choose image"
|
185 |
+
|
186 |
+
#: shariff.php:216
|
187 |
+
#@ shariff3UU
|
188 |
+
msgid "Select the default image for Pinterest in case no other usable image is found."
|
189 |
+
msgstr "Select the default image for Pinterest in case no other usable image is found."
|
190 |
+
|
191 |
+
# @ shariff3UU
|
192 |
+
#: shariff.php:168
|
193 |
+
msgid "Check this to make the buttons 30% smaller (all designs)."
|
194 |
+
msgstr "Check this to make the buttons 30% smaller (all designs)."
|
195 |
+
|
pictos/colorBtns.png
ADDED
Binary file
|
pictos/defaultBtns.png
CHANGED
Binary file
|
pictos/greyBtns.png
CHANGED
Binary file
|
pictos/roundBtns.png
CHANGED
Binary file
|
pictos/smallBtns.png
ADDED
Binary file
|
pictos/verticalBtns.png
CHANGED
Binary file
|
pictos/whiteBtns.png
CHANGED
Binary file
|
readme.txt
CHANGED
@@ -1,60 +1,53 @@
|
|
1 |
-
=== Shariff
|
2 |
Contributors: 3UU, starguide
|
3 |
Tags: Twitter, Facebook, GooglePlus, sharebutton, sharing, privacy, social, whatsapp
|
4 |
Requires at least: 3.0.1
|
5 |
-
Tested up to: 4.
|
6 |
Stable tag: trunk
|
7 |
License: MIT
|
8 |
License URI: http://opensource.org/licenses/MIT
|
9 |
Donate link: http://folge.link/?bitcoin=1Ritz1iUaLaxuYcXhUCoFhkVRH6GWiMTP
|
10 |
|
11 |
-
This is a wrapper to Shariff.
|
12 |
|
13 |
== Description ==
|
14 |
|
15 |
The "original" share buttons send data of your visitors to the social
|
16 |
-
network
|
17 |
german computer magazin CT has developed "Shariff" `(/ˈʃɛɹɪf/)` that
|
18 |
-
|
19 |
wrapper to this software. It allows you to use it within your posts
|
20 |
-
with the shorttag `[shariff]` and
|
21 |
original code.
|
22 |
|
23 |
For more informations about the Shariff software check out the
|
24 |
[GitHub project](https://github.com/heiseonline/shariff) and
|
25 |
-
about the project
|
26 |
|
27 |
-
You can use this plugin
|
28 |
-
|
29 |
|
30 |
== Installation ==
|
31 |
|
32 |
-
1. Upload
|
33 |
-
2. Activate the plugin
|
34 |
-
3. Use <code>[shariff]</code> anywhere in your post or
|
35 |
|
36 |
-
To enable it for all posts
|
37 |
|
38 |
== Screenshots ==
|
39 |
|
40 |
-
1. Insert as shorttag with options in a post
|
41 |
-
2. Share-Buttons on the site in vertical order
|
42 |
-
3. Options menu
|
43 |
-
4. Widget menu. Shorttag
|
44 |
-
5.
|
45 |
|
46 |
== Frequently Asked Questions ==
|
47 |
|
48 |
= Q: How can I change the position of all buttons =
|
49 |
-
A:
|
50 |
-
|
51 |
-
`[shariff style="text-align: center;"]`
|
52 |
-
The same way work the "style option" within the admin menu.
|
53 |
-
Please notice that because of the nature of CascadingSS you can not change
|
54 |
-
the look of the buttons! If do you want this please read about the
|
55 |
-
design options later on. Also the code example is really only an example.
|
56 |
-
The you have to use your own style information depending on the theme/design
|
57 |
-
do you use.
|
58 |
|
59 |
= Q: Can I use it in my theme? =
|
60 |
A: Yes.
|
@@ -63,116 +56,153 @@ Backend is an example. You can use all options of the shorttag. But first
|
|
63 |
you should have a look at the widget.
|
64 |
|
65 |
= Q: How can I configure the widget? =
|
66 |
-
A: It
|
67 |
-
However you can put in a shorttag that overwrites the default options. It
|
68 |
-
has the same format as
|
69 |
|
70 |
-
= Q: Why are shares
|
71 |
-
A: Shariff
|
72 |
-
requested by your server
|
73 |
-
server. However I am not sure if
|
74 |
-
default.
|
75 |
|
76 |
= Q: How can I show the share counts? =
|
77 |
-
A:
|
78 |
|
79 |
= Q: I do not see counts =
|
80 |
-
A: First make sure the
|
81 |
-
look at the
|
82 |
-
directory shariff
|
83 |
|
84 |
-
= Q:
|
85 |
A: The backend should work well with all common configurations. If the
|
86 |
backend does not work and you do not have very special needs for your
|
87 |
-
configuration perhaps you should think about
|
88 |
there are some very special servers e.g. some load balancer that need
|
89 |
-
|
90 |
backend with the PHP constant
|
91 |
`define("SHARIFF_BACKEND_TMPDIR","/example/path/to/tmp");`
|
92 |
-
There is also the option to change the default TTL from
|
93 |
`define("SHARIFF_BACKEND_TTL","88");`
|
94 |
|
95 |
= Q: I need some more options. How could I get them? =
|
96 |
A: This plugin is a wrapper to the original project files of Shariff. As
|
97 |
-
long as the original will not get more options we will not add more to this
|
98 |
plugin.
|
99 |
|
100 |
= Q: How can I change the design? =
|
101 |
-
A: Have a look at the parameters "theme" and "orientation". They work
|
102 |
-
like the original code parameters that are explained at
|
103 |
http://heiseonline.github.io/shariff/ Or you can have a look at my test page
|
104 |
at http://shariff.3uu.net/shariff-sample-page-with-all-options to get an
|
105 |
-
overview. But
|
106 |
-
|
107 |
only to get an impression of the design options.
|
108 |
|
109 |
= Q: How can I change the design of a single button? =
|
110 |
-
A: If you are a CSS guru please feel free to modify the css file.
|
111 |
-
idea because
|
112 |
-
at the style attribute of the shorttag.
|
113 |
-
|
114 |
-
really a CSS guru you will know what does the magic
|
115 |
|
116 |
= Q: Can I add [shariff] on all posts? =
|
117 |
-
A: Yes, use the
|
118 |
-
have access to your wp-config.php file there is also an other way. Add
|
119 |
-
`define('SHARIFF_ALL_POSTS','[shariff]');`
|
120 |
-
to it. The shortcut will be put at the end of all single posts and processed.
|
121 |
-
You can use all options that work with the shortcut.
|
122 |
|
123 |
= Q: Can I change the design on a single post? =
|
124 |
-
A: Yes. If the [shariff... shortcut is found
|
125 |
-
|
126 |
|
127 |
-
= Q: But I want hide it on a single post! =
|
128 |
-
A: Do you really know what
|
129 |
anywhere in your post "hideshariff". It will be removed and Shariff will
|
130 |
not be added. This will make it compatible with the other plugin "Shariff for
|
131 |
Wordpress" that has been published at the same day. You can also use
|
132 |
-
"/hideshariff" to write "hideshariff" in your post.
|
133 |
|
134 |
-
= Q: What are the differences between
|
135 |
-
A: One is developed by
|
136 |
-
this plugin
|
137 |
-
you use the configuration option to add it on all posts - it will only
|
138 |
-
shown on single post pages. And this plugin also provide a widget.
|
139 |
|
140 |
= Q: The fonts load slowly, can I use a CDN? =
|
141 |
A: The best way would be to use a CDN for your blog host. The original
|
142 |
shariff project has references to CDN hosted fonts. But it is possible that
|
143 |
-
the hoster
|
144 |
-
page. This would enable tracking again depending on how honest the font
|
145 |
hoster is. So I strongly suggest to use the copy that is within the plugin
|
146 |
-
directory
|
147 |
|
148 |
= Q: I do not get the numbers / Got error "tmp dir must be writable" =
|
149 |
A: Your webserver must be able to connect to other webservers. Please check
|
150 |
-
your PHP configuration and firewall settings. If
|
151 |
must be writable" your webserver does not have a directory to write
|
152 |
temporary data. Also please have in mind that the plugin has a timeout of 60
|
153 |
-
seconds because most services do not accept more request.
|
154 |
|
155 |
-
= Q: Pinterest does not show an
|
156 |
-
A: You can add
|
157 |
-
|
158 |
-
|
159 |
|
160 |
= Q: Can I set a fixed URL to share? =
|
161 |
A: You can use the "url" parameter within the shortcode
|
162 |
`[shariff url="http://www.example.com/"]`
|
163 |
-
This is also available within widgets. However I think it is not a good idea
|
164 |
-
to manipulate the URI because it
|
165 |
-
So you should only use it if this is really needed and you do really know
|
166 |
-
what
|
167 |
|
168 |
= Migration needed =
|
169 |
-
Version
|
170 |
-
the original that
|
171 |
-
|
172 |
-
functionality. So please change you configuration
|
173 |
-
joke ;-)
|
174 |
|
175 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
176 |
= 1.9 =
|
177 |
- add Flattr
|
178 |
- improve version control
|
1 |
+
=== Shariff Wrapper ===
|
2 |
Contributors: 3UU, starguide
|
3 |
Tags: Twitter, Facebook, GooglePlus, sharebutton, sharing, privacy, social, whatsapp
|
4 |
Requires at least: 3.0.1
|
5 |
+
Tested up to: 4.2
|
6 |
Stable tag: trunk
|
7 |
License: MIT
|
8 |
License URI: http://opensource.org/licenses/MIT
|
9 |
Donate link: http://folge.link/?bitcoin=1Ritz1iUaLaxuYcXhUCoFhkVRH6GWiMTP
|
10 |
|
11 |
+
This is a wrapper to Shariff. It enables shares with Twitter, Facebook ... on posts, pages and themes with no harm for visitors privacy.
|
12 |
|
13 |
== Description ==
|
14 |
|
15 |
The "original" share buttons send data of your visitors to the social
|
16 |
+
network sites, even if they do not click on a share button. The
|
17 |
german computer magazin CT has developed "Shariff" `(/ˈʃɛɹɪf/)` that
|
18 |
+
fullfills the strict data protection laws in Germany. This plugin is a
|
19 |
wrapper to this software. It allows you to use it within your posts
|
20 |
+
with the shorttag `[shariff]` and provides all design options of the
|
21 |
original code.
|
22 |
|
23 |
For more informations about the Shariff software check out the
|
24 |
[GitHub project](https://github.com/heiseonline/shariff) and
|
25 |
+
read about the project itself [c’t information page](http://ct.de/shariff) (in German).
|
26 |
|
27 |
+
You can use this plugin on posts, pages, the main page, product sites and
|
28 |
+
as a widget.
|
29 |
|
30 |
== Installation ==
|
31 |
|
32 |
+
1. Upload everything to the `/wp-content/plugins/` directory
|
33 |
+
2. Activate the plugin using the plugins menu in WordPress
|
34 |
+
3. Use <code>[shariff]</code> anywhere in your post and/or use the admin menu.
|
35 |
|
36 |
+
To enable it for all posts please check the options in the admin menu.
|
37 |
|
38 |
== Screenshots ==
|
39 |
|
40 |
+
1. Insert as shorttag with options in a post.
|
41 |
+
2. Share-Buttons on the site in vertical order.
|
42 |
+
3. Options menu.
|
43 |
+
4. Widget menu. Shorttag works like in posts.
|
44 |
+
5. Also any widget can have its own design.
|
45 |
|
46 |
== Frequently Asked Questions ==
|
47 |
|
48 |
= Q: How can I change the position of all buttons =
|
49 |
+
A: Have a look at the alignment options in the admin menu or checkout the
|
50 |
+
style option.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
|
52 |
= Q: Can I use it in my theme? =
|
53 |
A: Yes.
|
56 |
you should have a look at the widget.
|
57 |
|
58 |
= Q: How can I configure the widget? =
|
59 |
+
A: It uses the same options that have been configured in the admin menu.
|
60 |
+
However, you can put in a shorttag that overwrites the default options. It
|
61 |
+
has the same format as you use in posts.
|
62 |
|
63 |
+
= Q: Why are shares not listed? =
|
64 |
+
A: Shariff tries to protect your visitors. In order to do this, the statistics have to
|
65 |
+
be requested by your server, so social networks only see a request of your blog
|
66 |
+
server and not from your visitor. However, I am not sure if you want this. Therefore it
|
67 |
+
is not enabled by default.
|
68 |
|
69 |
= Q: How can I show the share counts? =
|
70 |
+
A: Enable it in admin menu in general or add `backend="on"` to the shariff shorttag in your post.
|
71 |
|
72 |
= Q: I do not see counts =
|
73 |
+
A: First make sure the you have it enabled. If so, please have a
|
74 |
+
look at the bottom of the admin menu. There is a hint, which
|
75 |
+
directory shariff tries to use for the cache.
|
76 |
|
77 |
+
= Q: How can I change the options of the backend? =
|
78 |
A: The backend should work well with all common configurations. If the
|
79 |
backend does not work and you do not have very special needs for your
|
80 |
+
configuration perhaps you should think about another hoster ;-) However,
|
81 |
there are some very special servers e.g. some load balancer that need
|
82 |
+
adjustments. You can set the directory to use for temporary files of the
|
83 |
backend with the PHP constant
|
84 |
`define("SHARIFF_BACKEND_TMPDIR","/example/path/to/tmp");`
|
85 |
+
There is also the option to change the default TTL from 60s with
|
86 |
`define("SHARIFF_BACKEND_TTL","88");`
|
87 |
|
88 |
= Q: I need some more options. How could I get them? =
|
89 |
A: This plugin is a wrapper to the original project files of Shariff. As
|
90 |
+
long as the original will not get more options, we will not add more to this
|
91 |
plugin.
|
92 |
|
93 |
= Q: How can I change the design? =
|
94 |
+
A: Have a look at the parameters "theme" and "orientation" and "buttonsize". They work
|
95 |
+
mostly like the original code parameters that are explained at
|
96 |
http://heiseonline.github.io/shariff/ Or you can have a look at my test page
|
97 |
at http://shariff.3uu.net/shariff-sample-page-with-all-options to get an
|
98 |
+
overview. But please be warned: This is my test page! It is possible that you
|
99 |
+
find features that are only provided in the development version. Use it
|
100 |
only to get an impression of the design options.
|
101 |
|
102 |
= Q: How can I change the design of a single button? =
|
103 |
+
A: If you are a CSS guru please feel free to modify the css file. But of course this
|
104 |
+
is a bad idea, because all changes will be destroyed with the next update! Have a look
|
105 |
+
at the style attribute of the shorttag. If you put in any value it will create
|
106 |
+
a DIV container with the ID "ShariffSC" around the buttons. If you are
|
107 |
+
really a CSS guru you will know what does the magic from here on out. ;-)
|
108 |
|
109 |
= Q: Can I add [shariff] on all posts? =
|
110 |
+
A: Yes, use the first checkbox in the admin menu to enable it.
|
|
|
|
|
|
|
|
|
111 |
|
112 |
= Q: Can I change the design on a single post? =
|
113 |
+
A: Yes. If the [shariff...] shortcut is found in a post, it has priority over all settings
|
114 |
+
from the admin menu.
|
115 |
|
116 |
+
= Q: But I want to hide it on a single post! =
|
117 |
+
A: Do you really know what you want? ;-) However it is possible. Write
|
118 |
anywhere in your post "hideshariff". It will be removed and Shariff will
|
119 |
not be added. This will make it compatible with the other plugin "Shariff for
|
120 |
Wordpress" that has been published at the same day. You can also use
|
121 |
+
"/hideshariff" to write "hideshariff" in your post.
|
122 |
|
123 |
+
= Q: What are the differences between these two plugins? =
|
124 |
+
A: One is developed by us, one by someone else. ;-) The main difference is that
|
125 |
+
this plugin has a few more options.
|
|
|
|
|
126 |
|
127 |
= Q: The fonts load slowly, can I use a CDN? =
|
128 |
A: The best way would be to use a CDN for your blog host. The original
|
129 |
shariff project has references to CDN hosted fonts. But it is possible that
|
130 |
+
the hoster sends headers that force the browser to reload the fonts on any
|
131 |
+
page. This would enable tracking again, depending on how honest the font
|
132 |
hoster is. So I strongly suggest to use the copy that is within the plugin
|
133 |
+
directory on your server.
|
134 |
|
135 |
= Q: I do not get the numbers / Got error "tmp dir must be writable" =
|
136 |
A: Your webserver must be able to connect to other webservers. Please check
|
137 |
+
your PHP configuration and firewall settings. If you get the error "tmp dir
|
138 |
must be writable" your webserver does not have a directory to write
|
139 |
temporary data. Also please have in mind that the plugin has a timeout of 60
|
140 |
+
seconds, because most services do not accept more request.
|
141 |
|
142 |
+
= Q: Pinterest does not show an image =
|
143 |
+
A: You can add media="http://wwww.example.com/yourImage.png"
|
144 |
+
within the [shariff...] shorttag or add it in the admin menu. Of course with
|
145 |
+
the link to your image. ;-)
|
146 |
|
147 |
= Q: Can I set a fixed URL to share? =
|
148 |
A: You can use the "url" parameter within the shortcode
|
149 |
`[shariff url="http://www.example.com/"]`
|
150 |
+
This is also available within widgets. However, I think it is not a good idea
|
151 |
+
to manipulate the URI, because it could mislead your visitors.
|
152 |
+
So you should only use it, if this is really needed and you do really know
|
153 |
+
what you are doing. Therefore it is not available within the admin menu.
|
154 |
|
155 |
= Migration needed =
|
156 |
+
Version 2.0: We plan to change the behavior of the service "mail" back to
|
157 |
+
the original one that provides an e-mail form on the side and not a mailto-link.
|
158 |
+
Therfore a new service "mailto" has been defined that provides the current mailto
|
159 |
+
functionality. So please change you configuration asap.
|
|
|
160 |
|
161 |
== Changelog ==
|
162 |
+
|
163 |
+
= 1.9.9 =
|
164 |
+
- fix widget bug (wrong share links)
|
165 |
+
|
166 |
+
= 1.9.8 =
|
167 |
+
- add headers to avoid caching of backend data
|
168 |
+
- tested with WP 4.2 beta
|
169 |
+
- add option to use on custom pages (e.g. WooCommerce)
|
170 |
+
- better handling of pinterest media attribute
|
171 |
+
- bugfix: SHARIFF_BACKEND_TMPDIR in backend
|
172 |
+
- improve uninstal of cache dir (todo: change to a better named dir)
|
173 |
+
- add option to use smaller size buttons
|
174 |
+
- fix again target of the mailto-link
|
175 |
+
- cleanup code
|
176 |
+
|
177 |
+
= 1.9.7 =
|
178 |
+
- roll back to stable
|
179 |
+
|
180 |
+
= 1.9.6 =
|
181 |
+
- now really go back to 1st block in loop at WMPU
|
182 |
+
|
183 |
+
= 1.9.5 =
|
184 |
+
- nu abba: missing version update
|
185 |
+
|
186 |
+
= 1.9.4 =
|
187 |
+
- fix update bug on WPMS
|
188 |
+
|
189 |
+
= 1.9.3 =
|
190 |
+
- add missing backend files. Last change for this Sunday ;-)
|
191 |
+
|
192 |
+
= 1.9.2 =
|
193 |
+
- fix stupid bug with the update file :-( Sorry!
|
194 |
+
- fix initialisation of REMOTEHOSTS
|
195 |
+
|
196 |
+
= 1.9.1 =
|
197 |
+
- merge with original Shariff JS/CSS code version 1.9.3
|
198 |
+
- CSS theme default like Heise default again + "add" theme color
|
199 |
+
- fix the theme "white"
|
200 |
+
- backend now up to date
|
201 |
+
- disable WPDebug in backend config
|
202 |
+
- improve uninstall (options shariff3UU, shariff3UUversion,
|
203 |
+
widget_shariff) and compatible with multisite installations
|
204 |
+
- improve deactivation
|
205 |
+
|
206 |
= 1.9 =
|
207 |
- add Flattr
|
208 |
- improve version control
|
shariff.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
|
2 |
-
|
3 |
-
* shariff - v1.
|
4 |
* https://github.com/heiseonline/shariff
|
5 |
* Copyright (c) 2015 Ines Pauer, Philipp Busse, Sebastian Hilbig, Erich Kramer, Deniz Sesli
|
6 |
* Licensed under the MIT <http://www.opensource.org/licenses/mit-license.php> license
|
@@ -9,48 +9,90 @@
|
|
9 |
|
10 |
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
|
11 |
module.exports=window;
|
|
|
|
|
12 |
},{}],2:[function(require,module,exports){
|
13 |
(function (global){
|
14 |
!function(o){function e(o){throw RangeError(L[o])}function n(o,e){for(var n=o.length;n--;)o[n]=e(o[n]);return o}function t(o,e){return n(o.split(S),e).join(".")}function r(o){for(var e,n,t=[],r=0,u=o.length;u>r;)e=o.charCodeAt(r++),e>=55296&&56319>=e&&u>r?(n=o.charCodeAt(r++),56320==(64512&n)?t.push(((1023&e)<<10)+(1023&n)+65536):(t.push(e),r--)):t.push(e);return t}function u(o){return n(o,function(o){var e="";return o>65535&&(o-=65536,e+=R(o>>>10&1023|55296),o=56320|1023&o),e+=R(o)}).join("")}function i(o){return 10>o-48?o-22:26>o-65?o-65:26>o-97?o-97:x}function f(o,e){return o+22+75*(26>o)-((0!=e)<<5)}function c(o,e,n){var t=0;for(o=n?P(o/m):o>>1,o+=P(o/e);o>M*C>>1;t+=x)o=P(o/M);return P(t+(M+1)*o/(o+j))}function l(o){var n,t,r,f,l,d,s,a,p,h,v=[],g=o.length,w=0,j=I,m=A;for(t=o.lastIndexOf(F),0>t&&(t=0),r=0;t>r;++r)o.charCodeAt(r)>=128&&e("not-basic"),v.push(o.charCodeAt(r));for(f=t>0?t+1:0;g>f;){for(l=w,d=1,s=x;f>=g&&e("invalid-input"),a=i(o.charCodeAt(f++)),(a>=x||a>P((b-w)/d))&&e("overflow"),w+=a*d,p=m>=s?y:s>=m+C?C:s-m,!(p>a);s+=x)h=x-p,d>P(b/h)&&e("overflow"),d*=h;n=v.length+1,m=c(w-l,n,0==l),P(w/n)>b-j&&e("overflow"),j+=P(w/n),w%=n,v.splice(w++,0,j)}return u(v)}function d(o){var n,t,u,i,l,d,s,a,p,h,v,g,w,j,m,E=[];for(o=r(o),g=o.length,n=I,t=0,l=A,d=0;g>d;++d)v=o[d],128>v&&E.push(R(v));for(u=i=E.length,i&&E.push(F);g>u;){for(s=b,d=0;g>d;++d)v=o[d],v>=n&&s>v&&(s=v);for(w=u+1,s-n>P((b-t)/w)&&e("overflow"),t+=(s-n)*w,n=s,d=0;g>d;++d)if(v=o[d],n>v&&++t>b&&e("overflow"),v==n){for(a=t,p=x;h=l>=p?y:p>=l+C?C:p-l,!(h>a);p+=x)m=a-h,j=x-h,E.push(R(f(h+m%j,0))),a=P(m/j);E.push(R(f(a,0))),l=c(t,w,u==i),t=0,++u}++t,++n}return E.join("")}function s(o){return t(o,function(o){return E.test(o)?l(o.slice(4).toLowerCase()):o})}function a(o){return t(o,function(o){return O.test(o)?"xn--"+d(o):o})}var p="object"==typeof exports&&exports,h="object"==typeof module&&module&&module.exports==p&&module,v="object"==typeof global&&global;(v.global===v||v.window===v)&&(o=v);var g,w,b=2147483647,x=36,y=1,C=26,j=38,m=700,A=72,I=128,F="-",E=/^xn--/,O=/[^ -~]/,S=/\x2E|\u3002|\uFF0E|\uFF61/g,L={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},M=x-y,P=Math.floor,R=String.fromCharCode;if(g={version:"1.2.4",ucs2:{decode:r,encode:u},decode:l,encode:d,toASCII:a,toUnicode:s},"function"==typeof define&&"object"==typeof define.amd&&define.amd)define("punycode",function(){return g});else if(p&&!p.nodeType)if(h)h.exports=g;else for(w in g)g.hasOwnProperty(w)&&(p[w]=g[w]);else o.punycode=g}(this);
|
|
|
|
|
15 |
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
16 |
},{}],3:[function(require,module,exports){
|
17 |
"use strict";function hasOwnProperty(r,e){return Object.prototype.hasOwnProperty.call(r,e)}module.exports=function(r,e,t,n){e=e||"&",t=t||"=";var o={};if("string"!=typeof r||0===r.length)return o;var a=/\+/g;r=r.split(e);var s=1e3;n&&"number"==typeof n.maxKeys&&(s=n.maxKeys);var p=r.length;s>0&&p>s&&(p=s);for(var y=0;p>y;++y){var u,c,i,l,f=r[y].replace(a,"%20"),v=f.indexOf(t);v>=0?(u=f.substr(0,v),c=f.substr(v+1)):(u=f,c=""),i=decodeURIComponent(u),l=decodeURIComponent(c),hasOwnProperty(o,i)?isArray(o[i])?o[i].push(l):o[i]=[o[i],l]:o[i]=l}return o};var isArray=Array.isArray||function(r){return"[object Array]"===Object.prototype.toString.call(r)};
|
|
|
|
|
18 |
},{}],4:[function(require,module,exports){
|
19 |
"use strict";function map(r,e){if(r.map)return r.map(e);for(var t=[],n=0;n<r.length;n++)t.push(e(r[n],n));return t}var stringifyPrimitive=function(r){switch(typeof r){case"string":return r;case"boolean":return r?"true":"false";case"number":return isFinite(r)?r:"";default:return""}};module.exports=function(r,e,t,n){return e=e||"&",t=t||"=",null===r&&(r=void 0),"object"==typeof r?map(objectKeys(r),function(n){var i=encodeURIComponent(stringifyPrimitive(n))+t;return isArray(r[n])?map(r[n],function(r){return i+encodeURIComponent(stringifyPrimitive(r))}).join(e):i+encodeURIComponent(stringifyPrimitive(r[n]))}).join(e):n?encodeURIComponent(stringifyPrimitive(n))+t+encodeURIComponent(stringifyPrimitive(r)):""};var isArray=Array.isArray||function(r){return"[object Array]"===Object.prototype.toString.call(r)},objectKeys=Object.keys||function(r){var e=[];for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&e.push(t);return e};
|
|
|
|
|
20 |
},{}],5:[function(require,module,exports){
|
21 |
"use strict";exports.decode=exports.parse=require("./decode"),exports.encode=exports.stringify=require("./encode");
|
|
|
|
|
22 |
},{"./decode":3,"./encode":4}],6:[function(require,module,exports){
|
23 |
-
function Url(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function urlParse(t,s,e){if(t&&isObject(t)&&t instanceof Url)return t;var h=new Url;return h.parse(t,s,e),h}function urlFormat(t){return isString(t)&&(t=urlParse(t)),t instanceof Url?t.format():Url.prototype.format.call(t)}function urlResolve(t,s){return urlParse(t,!1,!0).resolve(s)}function urlResolveObject(t,s){return t?urlParse(t,!1,!0).resolveObject(s):s}function isString(t){return"string"==typeof t}function isObject(t){return"object"==typeof t&&null!==t}function isNull(t){return null===t}function isNullOrUndefined(t){return null==t}var punycode=require("punycode");exports.parse=urlParse,exports.resolve=urlResolve,exports.resolveObject=urlResolveObject,exports.format=urlFormat,exports.Url=Url;var protocolPattern=/^([a-z0-9.+-]+:)/i,portPattern=/:[0-9]*$/,delims=["<",">",'"',"`"," ","\r","\n"," "],unwise=["{","}","|","\\","^","`"].concat(delims),autoEscape=["'"].concat(unwise),nonHostChars=["%","/","?",";","#"].concat(autoEscape),hostEndingChars=["/","?","#"],hostnameMaxLen=255,hostnamePartPattern=/^[a-z0-9A-Z_-]{0,63}$/,hostnamePartStart=/^([a-z0-9A-Z_-]{0,63})(.*)$/,unsafeProtocol={javascript:!0,"javascript:":!0},hostlessProtocol={javascript:!0,"javascript:":!0},slashedProtocol={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},querystring=require("querystring");Url.prototype.parse=function(t,s,e){if(!isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var h=t;h=h.trim();var r=protocolPattern.exec(h);if(r){r=r[0];var o=r.toLowerCase();this.protocol=o,h=h.substr(r.length)}if(e||r||h.match(/^\/\/[^@\/]+@[^@\/]+/)){var a="//"===h.substr(0,2);!a||r&&hostlessProtocol[r]||(h=h.substr(2),this.slashes=!0)}if(!hostlessProtocol[r]&&(a||r&&!slashedProtocol[r])){for(var n=-1,i=0;i<hostEndingChars.length;i++){var l=h.indexOf(hostEndingChars[i]);-1!==l&&(-1===n||n>l)&&(n=l)}var c,u;u=-1===n?h.lastIndexOf("@"):h.lastIndexOf("@",n),-1!==u&&(c=h.slice(0,u),h=h.slice(u+1),this.auth=decodeURIComponent(c)),n=-1;for(var i=0;i<nonHostChars.length;i++){var l=h.indexOf(nonHostChars[i]);-1!==l&&(-1===n||n>l)&&(n=l)}-1===n&&(n=h.length),this.host=h.slice(0,n),h=h.slice(n),this.parseHost(),this.hostname=this.hostname||"";var p="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!p)for(var f=this.hostname.split(/\./),i=0,m=f.length;m>i;i++){var v=f[i];if(v&&!v.match(hostnamePartPattern)){for(var g="",y=0,d=v.length;d>y;y++)g+=v.charCodeAt(y)>127?"x":v[y];if(!g.match(hostnamePartPattern)){var P=f.slice(0,i),b=f.slice(i+1),j=v.match(hostnamePartStart);j&&(P.push(j[1]),b.unshift(j[2])),b.length&&(h="/"+b.join(".")+h),this.hostname=P.join(".");break}}}if(this.hostname
|
|
|
|
|
24 |
},{"punycode":2,"querystring":5}],7:[function(require,module,exports){
|
25 |
-
"use strict";module.exports=function(e){var
|
|
|
|
|
26 |
},{}],8:[function(require,module,exports){
|
27 |
"use strict";module.exports=function(t){var e=encodeURIComponent(t.getURL()),r=t.getMeta("DC.title"),a=t.getMeta("DC.creator"),n="",o="";return r.length>0&&a.length>0?r+=" - "+a:r=t.getTitle(),null!==t.options.flattruser&&(n=t.options.flattruser),o="de"===t.options.lang||"fr"===t.options.lang||"es"===t.options.lang?t.options.lang+"_"+t.options.lang.toUpperCase():"en_US",{popup:!0,noblank:!1,mobileonly:!1,shareText:"flattr",name:"flattr",faName:"s3uu-flattr",title:{de:"Beitrag flattrn!",en:"Flattr this!",fr:"Flattré!",es:"Flattr!"},shareUrl:"https://flattr.com/submit/auto?url="+e+t.getReferrerTrack()+"&title="+encodeURIComponent(r)+"&description=&language="+o+"&tags=&category=text&user_id="+n}};
|
|
|
|
|
28 |
},{}],9:[function(require,module,exports){
|
29 |
-
"use strict";module.exports=function(e){var o=encodeURIComponent(e.getURL());return{popup:!0,
|
|
|
|
|
30 |
},{}],10:[function(require,module,exports){
|
31 |
-
"use strict";module.exports=function(e){return{popup:!1,
|
|
|
|
|
32 |
},{}],11:[function(require,module,exports){
|
33 |
-
"use strict";module.exports=function(e){var n=encodeURIComponent(e.getURL());return{popup:!0,
|
|
|
|
|
34 |
},{}],12:[function(require,module,exports){
|
35 |
-
"use strict";module.exports=function(e){return{popup:!1,
|
|
|
|
|
36 |
},{}],13:[function(require,module,exports){
|
37 |
-
"use strict";module.exports=function(e){return{popup:!1,
|
|
|
|
|
38 |
},{}],14:[function(require,module,exports){
|
39 |
-
"use strict";module.exports=function(e){var t=encodeURIComponent(e.getURL());return{popup:!0,
|
|
|
|
|
40 |
},{}],15:[function(require,module,exports){
|
41 |
-
"use strict";module.exports=function(r){return{popup:!1,
|
|
|
|
|
42 |
},{}],16:[function(require,module,exports){
|
43 |
-
"use strict";module.exports=function(e){var
|
|
|
|
|
44 |
},{}],17:[function(require,module,exports){
|
45 |
-
"use strict";module.exports=function(e){var t=encodeURIComponent(e.getURL());return{popup:!0,
|
|
|
|
|
46 |
},{}],18:[function(require,module,exports){
|
47 |
-
|
|
|
|
|
|
|
|
|
48 |
},{"url":6}],19:[function(require,module,exports){
|
49 |
-
"use strict";module.exports=function(e){var t=encodeURIComponent(e.getURL()),a=e.getMeta("DC.title"),p=e.getMeta("DC.creator");return a.length>0&&p.length>0?a+=" - "+p:a=e.getTitle(),{popup:!1,
|
|
|
|
|
50 |
},{}],20:[function(require,module,exports){
|
51 |
-
"use strict";module.exports=function(e){var r=encodeURIComponent(e.getURL());return{popup:!0,
|
|
|
|
|
52 |
},{}],21:[function(require,module,exports){
|
53 |
(function (global){
|
54 |
-
"use strict";var
|
55 |
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
56 |
-
},{"./services/facebook":7,"./services/flattr":8,"./services/googleplus":9,"./services/info":10,"./services/linkedin":11,"./services/mail":12,"./services/mailto":13,"./services/pinterest":14,"./services/printer":15,"./services/reddit":16,"./services/stumbleupon":17,"./services/twitter":18,"./services/whatsapp":19,"./services/xing":20,"browserify-window":1}]},{},[21]);
|
1 |
|
2 |
+
/*!
|
3 |
+
* shariff - v1.9.3 - 25.04.2015
|
4 |
* https://github.com/heiseonline/shariff
|
5 |
* Copyright (c) 2015 Ines Pauer, Philipp Busse, Sebastian Hilbig, Erich Kramer, Deniz Sesli
|
6 |
* Licensed under the MIT <http://www.opensource.org/licenses/mit-license.php> license
|
9 |
|
10 |
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
|
11 |
module.exports=window;
|
12 |
+
|
13 |
+
|
14 |
},{}],2:[function(require,module,exports){
|
15 |
(function (global){
|
16 |
!function(o){function e(o){throw RangeError(L[o])}function n(o,e){for(var n=o.length;n--;)o[n]=e(o[n]);return o}function t(o,e){return n(o.split(S),e).join(".")}function r(o){for(var e,n,t=[],r=0,u=o.length;u>r;)e=o.charCodeAt(r++),e>=55296&&56319>=e&&u>r?(n=o.charCodeAt(r++),56320==(64512&n)?t.push(((1023&e)<<10)+(1023&n)+65536):(t.push(e),r--)):t.push(e);return t}function u(o){return n(o,function(o){var e="";return o>65535&&(o-=65536,e+=R(o>>>10&1023|55296),o=56320|1023&o),e+=R(o)}).join("")}function i(o){return 10>o-48?o-22:26>o-65?o-65:26>o-97?o-97:x}function f(o,e){return o+22+75*(26>o)-((0!=e)<<5)}function c(o,e,n){var t=0;for(o=n?P(o/m):o>>1,o+=P(o/e);o>M*C>>1;t+=x)o=P(o/M);return P(t+(M+1)*o/(o+j))}function l(o){var n,t,r,f,l,d,s,a,p,h,v=[],g=o.length,w=0,j=I,m=A;for(t=o.lastIndexOf(F),0>t&&(t=0),r=0;t>r;++r)o.charCodeAt(r)>=128&&e("not-basic"),v.push(o.charCodeAt(r));for(f=t>0?t+1:0;g>f;){for(l=w,d=1,s=x;f>=g&&e("invalid-input"),a=i(o.charCodeAt(f++)),(a>=x||a>P((b-w)/d))&&e("overflow"),w+=a*d,p=m>=s?y:s>=m+C?C:s-m,!(p>a);s+=x)h=x-p,d>P(b/h)&&e("overflow"),d*=h;n=v.length+1,m=c(w-l,n,0==l),P(w/n)>b-j&&e("overflow"),j+=P(w/n),w%=n,v.splice(w++,0,j)}return u(v)}function d(o){var n,t,u,i,l,d,s,a,p,h,v,g,w,j,m,E=[];for(o=r(o),g=o.length,n=I,t=0,l=A,d=0;g>d;++d)v=o[d],128>v&&E.push(R(v));for(u=i=E.length,i&&E.push(F);g>u;){for(s=b,d=0;g>d;++d)v=o[d],v>=n&&s>v&&(s=v);for(w=u+1,s-n>P((b-t)/w)&&e("overflow"),t+=(s-n)*w,n=s,d=0;g>d;++d)if(v=o[d],n>v&&++t>b&&e("overflow"),v==n){for(a=t,p=x;h=l>=p?y:p>=l+C?C:p-l,!(h>a);p+=x)m=a-h,j=x-h,E.push(R(f(h+m%j,0))),a=P(m/j);E.push(R(f(a,0))),l=c(t,w,u==i),t=0,++u}++t,++n}return E.join("")}function s(o){return t(o,function(o){return E.test(o)?l(o.slice(4).toLowerCase()):o})}function a(o){return t(o,function(o){return O.test(o)?"xn--"+d(o):o})}var p="object"==typeof exports&&exports,h="object"==typeof module&&module&&module.exports==p&&module,v="object"==typeof global&&global;(v.global===v||v.window===v)&&(o=v);var g,w,b=2147483647,x=36,y=1,C=26,j=38,m=700,A=72,I=128,F="-",E=/^xn--/,O=/[^ -~]/,S=/\x2E|\u3002|\uFF0E|\uFF61/g,L={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},M=x-y,P=Math.floor,R=String.fromCharCode;if(g={version:"1.2.4",ucs2:{decode:r,encode:u},decode:l,encode:d,toASCII:a,toUnicode:s},"function"==typeof define&&"object"==typeof define.amd&&define.amd)define("punycode",function(){return g});else if(p&&!p.nodeType)if(h)h.exports=g;else for(w in g)g.hasOwnProperty(w)&&(p[w]=g[w]);else o.punycode=g}(this);
|
17 |
+
|
18 |
+
|
19 |
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
20 |
},{}],3:[function(require,module,exports){
|
21 |
"use strict";function hasOwnProperty(r,e){return Object.prototype.hasOwnProperty.call(r,e)}module.exports=function(r,e,t,n){e=e||"&",t=t||"=";var o={};if("string"!=typeof r||0===r.length)return o;var a=/\+/g;r=r.split(e);var s=1e3;n&&"number"==typeof n.maxKeys&&(s=n.maxKeys);var p=r.length;s>0&&p>s&&(p=s);for(var y=0;p>y;++y){var u,c,i,l,f=r[y].replace(a,"%20"),v=f.indexOf(t);v>=0?(u=f.substr(0,v),c=f.substr(v+1)):(u=f,c=""),i=decodeURIComponent(u),l=decodeURIComponent(c),hasOwnProperty(o,i)?isArray(o[i])?o[i].push(l):o[i]=[o[i],l]:o[i]=l}return o};var isArray=Array.isArray||function(r){return"[object Array]"===Object.prototype.toString.call(r)};
|
22 |
+
|
23 |
+
|
24 |
},{}],4:[function(require,module,exports){
|
25 |
"use strict";function map(r,e){if(r.map)return r.map(e);for(var t=[],n=0;n<r.length;n++)t.push(e(r[n],n));return t}var stringifyPrimitive=function(r){switch(typeof r){case"string":return r;case"boolean":return r?"true":"false";case"number":return isFinite(r)?r:"";default:return""}};module.exports=function(r,e,t,n){return e=e||"&",t=t||"=",null===r&&(r=void 0),"object"==typeof r?map(objectKeys(r),function(n){var i=encodeURIComponent(stringifyPrimitive(n))+t;return isArray(r[n])?map(r[n],function(r){return i+encodeURIComponent(stringifyPrimitive(r))}).join(e):i+encodeURIComponent(stringifyPrimitive(r[n]))}).join(e):n?encodeURIComponent(stringifyPrimitive(n))+t+encodeURIComponent(stringifyPrimitive(r)):""};var isArray=Array.isArray||function(r){return"[object Array]"===Object.prototype.toString.call(r)},objectKeys=Object.keys||function(r){var e=[];for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&e.push(t);return e};
|
26 |
+
|
27 |
+
|
28 |
},{}],5:[function(require,module,exports){
|
29 |
"use strict";exports.decode=exports.parse=require("./decode"),exports.encode=exports.stringify=require("./encode");
|
30 |
+
|
31 |
+
|
32 |
},{"./decode":3,"./encode":4}],6:[function(require,module,exports){
|
33 |
+
function Url(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function urlParse(t,s,e){if(t&&isObject(t)&&t instanceof Url)return t;var h=new Url;return h.parse(t,s,e),h}function urlFormat(t){return isString(t)&&(t=urlParse(t)),t instanceof Url?t.format():Url.prototype.format.call(t)}function urlResolve(t,s){return urlParse(t,!1,!0).resolve(s)}function urlResolveObject(t,s){return t?urlParse(t,!1,!0).resolveObject(s):s}function isString(t){return"string"==typeof t}function isObject(t){return"object"==typeof t&&null!==t}function isNull(t){return null===t}function isNullOrUndefined(t){return null==t}var punycode=require("punycode");exports.parse=urlParse,exports.resolve=urlResolve,exports.resolveObject=urlResolveObject,exports.format=urlFormat,exports.Url=Url;var protocolPattern=/^([a-z0-9.+-]+:)/i,portPattern=/:[0-9]*$/,delims=["<",">",'"',"`"," ","\r","\n"," "],unwise=["{","}","|","\\","^","`"].concat(delims),autoEscape=["'"].concat(unwise),nonHostChars=["%","/","?",";","#"].concat(autoEscape),hostEndingChars=["/","?","#"],hostnameMaxLen=255,hostnamePartPattern=/^[a-z0-9A-Z_-]{0,63}$/,hostnamePartStart=/^([a-z0-9A-Z_-]{0,63})(.*)$/,unsafeProtocol={javascript:!0,"javascript:":!0},hostlessProtocol={javascript:!0,"javascript:":!0},slashedProtocol={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},querystring=require("querystring");Url.prototype.parse=function(t,s,e){if(!isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var h=t;h=h.trim();var r=protocolPattern.exec(h);if(r){r=r[0];var o=r.toLowerCase();this.protocol=o,h=h.substr(r.length)}if(e||r||h.match(/^\/\/[^@\/]+@[^@\/]+/)){var a="//"===h.substr(0,2);!a||r&&hostlessProtocol[r]||(h=h.substr(2),this.slashes=!0)}if(!hostlessProtocol[r]&&(a||r&&!slashedProtocol[r])){for(var n=-1,i=0;i<hostEndingChars.length;i++){var l=h.indexOf(hostEndingChars[i]);-1!==l&&(-1===n||n>l)&&(n=l)}var c,u;u=-1===n?h.lastIndexOf("@"):h.lastIndexOf("@",n),-1!==u&&(c=h.slice(0,u),h=h.slice(u+1),this.auth=decodeURIComponent(c)),n=-1;for(var i=0;i<nonHostChars.length;i++){var l=h.indexOf(nonHostChars[i]);-1!==l&&(-1===n||n>l)&&(n=l)}-1===n&&(n=h.length),this.host=h.slice(0,n),h=h.slice(n),this.parseHost(),this.hostname=this.hostname||"";var p="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!p)for(var f=this.hostname.split(/\./),i=0,m=f.length;m>i;i++){var v=f[i];if(v&&!v.match(hostnamePartPattern)){for(var g="",y=0,d=v.length;d>y;y++)g+=v.charCodeAt(y)>127?"x":v[y];if(!g.match(hostnamePartPattern)){var P=f.slice(0,i),b=f.slice(i+1),j=v.match(hostnamePartStart);j&&(P.push(j[1]),b.unshift(j[2])),b.length&&(h="/"+b.join(".")+h),this.hostname=P.join(".");break}}}if(this.hostname.length>hostnameMaxLen?this.hostname="":this.hostname=this.hostname.toLowerCase(),!p){for(var O=this.hostname.split("."),q=[],i=0;i<O.length;++i){var x=O[i];q.push(x.match(/[^A-Za-z0-9_-]/)?"xn--"+punycode.encode(x):x)}this.hostname=q.join(".")}var U=this.port?":"+this.port:"",C=this.hostname||"";this.host=C+U,this.href+=this.host,p&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==h[0]&&(h="/"+h))}if(!unsafeProtocol[o])for(var i=0,m=autoEscape.length;m>i;i++){var A=autoEscape[i],E=encodeURIComponent(A);E===A&&(E=escape(A)),h=h.split(A).join(E)}var w=h.indexOf("#");-1!==w&&(this.hash=h.substr(w),h=h.slice(0,w));var R=h.indexOf("?");if(-1!==R?(this.search=h.substr(R),this.query=h.substr(R+1),s&&(this.query=querystring.parse(this.query)),h=h.slice(0,R)):s&&(this.search="",this.query={}),h&&(this.pathname=h),slashedProtocol[o]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var U=this.pathname||"",x=this.search||"";this.path=U+x}return this.href=this.format(),this},Url.prototype.format=function(){var t=this.auth||"";t&&(t=encodeURIComponent(t),t=t.replace(/%3A/i,":"),t+="@");var s=this.protocol||"",e=this.pathname||"",h=this.hash||"",r=!1,o="";this.host?r=t+this.host:this.hostname&&(r=t+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(r+=":"+this.port)),this.query&&isObject(this.query)&&Object.keys(this.query).length&&(o=querystring.stringify(this.query));var a=this.search||o&&"?"+o||"";return s&&":"!==s.substr(-1)&&(s+=":"),this.slashes||(!s||slashedProtocol[s])&&r!==!1?(r="//"+(r||""),e&&"/"!==e.charAt(0)&&(e="/"+e)):r||(r=""),h&&"#"!==h.charAt(0)&&(h="#"+h),a&&"?"!==a.charAt(0)&&(a="?"+a),e=e.replace(/[?#]/g,function(t){return encodeURIComponent(t)}),a=a.replace("#","%23"),s+r+e+a+h},Url.prototype.resolve=function(t){return this.resolveObject(urlParse(t,!1,!0)).format()},Url.prototype.resolveObject=function(t){if(isString(t)){var s=new Url;s.parse(t,!1,!0),t=s}var e=new Url;if(Object.keys(this).forEach(function(t){e[t]=this[t]},this),e.hash=t.hash,""===t.href)return e.href=e.format(),e;if(t.slashes&&!t.protocol)return Object.keys(t).forEach(function(s){"protocol"!==s&&(e[s]=t[s])}),slashedProtocol[e.protocol]&&e.hostname&&!e.pathname&&(e.path=e.pathname="/"),e.href=e.format(),e;if(t.protocol&&t.protocol!==e.protocol){if(!slashedProtocol[t.protocol])return Object.keys(t).forEach(function(s){e[s]=t[s]}),e.href=e.format(),e;if(e.protocol=t.protocol,t.host||hostlessProtocol[t.protocol])e.pathname=t.pathname;else{for(var h=(t.pathname||"").split("/");h.length&&!(t.host=h.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),""!==h[0]&&h.unshift(""),h.length<2&&h.unshift(""),e.pathname=h.join("/")}if(e.search=t.search,e.query=t.query,e.host=t.host||"",e.auth=t.auth,e.hostname=t.hostname||t.host,e.port=t.port,e.pathname||e.search){var r=e.pathname||"",o=e.search||"";e.path=r+o}return e.slashes=e.slashes||t.slashes,e.href=e.format(),e}var a=e.pathname&&"/"===e.pathname.charAt(0),n=t.host||t.pathname&&"/"===t.pathname.charAt(0),i=n||a||e.host&&t.pathname,l=i,c=e.pathname&&e.pathname.split("/")||[],h=t.pathname&&t.pathname.split("/")||[],u=e.protocol&&!slashedProtocol[e.protocol];if(u&&(e.hostname="",e.port=null,e.host&&(""===c[0]?c[0]=e.host:c.unshift(e.host)),e.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(""===h[0]?h[0]=t.host:h.unshift(t.host)),t.host=null),i=i&&(""===h[0]||""===c[0])),n)e.host=t.host||""===t.host?t.host:e.host,e.hostname=t.hostname||""===t.hostname?t.hostname:e.hostname,e.search=t.search,e.query=t.query,c=h;else if(h.length)c||(c=[]),c.pop(),c=c.concat(h),e.search=t.search,e.query=t.query;else if(!isNullOrUndefined(t.search)){if(u){e.hostname=e.host=c.shift();var p=e.host&&e.host.indexOf("@")>0?e.host.split("@"):!1;p&&(e.auth=p.shift(),e.host=e.hostname=p.shift())}return e.search=t.search,e.query=t.query,isNull(e.pathname)&&isNull(e.search)||(e.path=(e.pathname?e.pathname:"")+(e.search?e.search:"")),e.href=e.format(),e}if(!c.length)return e.pathname=null,e.search?e.path="/"+e.search:e.path=null,e.href=e.format(),e;for(var f=c.slice(-1)[0],m=(e.host||t.host)&&("."===f||".."===f)||""===f,v=0,g=c.length;g>=0;g--)f=c[g],"."==f?c.splice(g,1):".."===f?(c.splice(g,1),v++):v&&(c.splice(g,1),v--);if(!i&&!l)for(;v--;v)c.unshift("..");!i||""===c[0]||c[0]&&"/"===c[0].charAt(0)||c.unshift(""),m&&"/"!==c.join("/").substr(-1)&&c.push("");var y=""===c[0]||c[0]&&"/"===c[0].charAt(0);if(u){e.hostname=e.host=y?"":c.length?c.shift():"";var p=e.host&&e.host.indexOf("@")>0?e.host.split("@"):!1;p&&(e.auth=p.shift(),e.host=e.hostname=p.shift())}return i=i||e.host&&c.length,i&&!y&&c.unshift(""),c.length?e.pathname=c.join("/"):(e.pathname=null,e.path=null),isNull(e.pathname)&&isNull(e.search)||(e.path=(e.pathname?e.pathname:"")+(e.search?e.search:"")),e.auth=t.auth||e.auth,e.slashes=e.slashes||t.slashes,e.href=e.format(),e},Url.prototype.parseHost=function(){var t=this.host,s=portPattern.exec(t);s&&(s=s[0],":"!==s&&(this.port=s.substr(1)),t=t.substr(0,t.length-s.length)),t&&(this.hostname=t)};
|
34 |
+
|
35 |
+
|
36 |
},{"punycode":2,"querystring":5}],7:[function(require,module,exports){
|
37 |
+
"use strict";module.exports=function(e){var o=encodeURIComponent(e.getURL());return{popup:!0,mobileonly:!1,shareText:{de:"teilen",en:"share",es:"compartir",fr:"partager",it:"condividi",da:"del",nl:"delen"},name:"facebook",faName:"s3uu-facebook",title:{de:"Bei Facebook teilen",en:"Share on Facebook",es:"Compartir en Facebook",fr:"Partager sur Facebook",it:"Condividi su Facebook",da:"Del på Facebook",nl:"Delen op Facebook"},shareUrl:"https://www.facebook.com/sharer/sharer.php?u="+o+e.getReferrerTrack()}};
|
38 |
+
|
39 |
+
|
40 |
},{}],8:[function(require,module,exports){
|
41 |
"use strict";module.exports=function(t){var e=encodeURIComponent(t.getURL()),r=t.getMeta("DC.title"),a=t.getMeta("DC.creator"),n="",o="";return r.length>0&&a.length>0?r+=" - "+a:r=t.getTitle(),null!==t.options.flattruser&&(n=t.options.flattruser),o="de"===t.options.lang||"fr"===t.options.lang||"es"===t.options.lang?t.options.lang+"_"+t.options.lang.toUpperCase():"en_US",{popup:!0,noblank:!1,mobileonly:!1,shareText:"flattr",name:"flattr",faName:"s3uu-flattr",title:{de:"Beitrag flattrn!",en:"Flattr this!",fr:"Flattré!",es:"Flattr!"},shareUrl:"https://flattr.com/submit/auto?url="+e+t.getReferrerTrack()+"&title="+encodeURIComponent(r)+"&description=&language="+o+"&tags=&category=text&user_id="+n}};
|
42 |
+
|
43 |
+
|
44 |
},{}],9:[function(require,module,exports){
|
45 |
+
"use strict";module.exports=function(e){var o=encodeURIComponent(e.getURL());return{popup:!0,mobileonly:!1,shareText:"+1",name:"googleplus",faName:"s3uu-google-plus",title:{de:"Bei Google+ teilen",en:"Share on Google+",es:"Compartir en Google+",fr:"Partager sur Goolge+",it:"Condividi su Google+",da:"Del på Google+",nl:"Delen op Google+"},shareUrl:"https://plus.google.com/share?url="+o+e.getReferrerTrack()}};
|
46 |
+
|
47 |
+
|
48 |
},{}],10:[function(require,module,exports){
|
49 |
+
"use strict";module.exports=function(e){return{popup:!1,blank:!0,mobileonly:!1,shareText:"Info",name:"info",faName:"s3uu-info",title:{de:"weitere Informationen",en:"more information",es:"más informaciones",fr:"plus d'informations",it:"maggiori informazioni",da:"flere oplysninger",nl:"verdere informatie"},shareUrl:e.getInfoUrl()}};
|
50 |
+
|
51 |
+
|
52 |
},{}],11:[function(require,module,exports){
|
53 |
+
"use strict";module.exports=function(e){var n=encodeURIComponent(e.getURL()),t=e.getMeta("DC.title"),i=e.getMeta("DC.creator");return t.length>0&&i.length>0?t+=" - "+i:t=e.getTitle(),{popup:!0,mobileonly:!1,shareText:{de:"teilen",en:"share",es:"compartir",fr:"partager",it:"condividi",da:"del",nl:"delen"},name:"linkedin",faName:"s3uu-linkedin",title:{de:"Bei LinkedIn teilen",en:"Share on LinkedIn",es:"Compartir en LinkedIn",fr:"Partager sur LinkedIn",it:"Condividi su LinkedIn",da:"Del på LinkedIn",nl:"Delen op LinkedIn"},shareUrl:"https://www.linkedin.com/shareArticle?mini=true&url="+n+e.getReferrerTrack()+"&title="+encodeURIComponent(t)}};
|
54 |
+
|
55 |
+
|
56 |
},{}],12:[function(require,module,exports){
|
57 |
+
"use strict";module.exports=function(e){var a=encodeURIComponent(e.getURL()),t=e.getMeta("DC.title"),n=e.getMeta("DC.creator");return t.length>0&&n.length>0?t+=" - "+n:t=e.getTitle(),{popup:!1,mobileonly:!1,blank:!1,shareText:"mail",name:"mail",faName:"s3uu-envelope",title:{de:"Per E-Mail versenden",en:"Send by email",es:"Enviar por email",fr:"Envoyer par courriel",it:"Inviare via email",da:"Sende via e-mail",nl:"Sturen via e-mail "},shareUrl:"mailto:?body="+a+e.getReferrerTrack()+"&subject="+encodeURIComponent(t)}};
|
58 |
+
|
59 |
+
|
60 |
},{}],13:[function(require,module,exports){
|
61 |
+
"use strict";module.exports=function(e){var t=encodeURIComponent(e.getURL()),a=e.getMeta("DC.title"),n=e.getMeta("DC.creator");return a.length>0&&n.length>0?a+=" - "+n:a=e.getTitle(),{popup:!1,mobileonly:!1,blank:!1,shareText:"mail to",name:"mailto",faName:"s3uu-envelope",title:{de:"Per E-Mail versenden",en:"Send by email",es:"Enviar por email",fr:"Envoyer par courriel",it:"Inviare via email",da:"Sende via e-mail",nl:"Sturen via e-mail "},shareUrl:"mailto:?body="+t+e.getReferrerTrack()+"&subject="+encodeURIComponent(a)}};
|
62 |
+
|
63 |
+
|
64 |
},{}],14:[function(require,module,exports){
|
65 |
+
"use strict";module.exports=function(e){var t=encodeURIComponent(e.getURL()),n=e.getMeta("DC.title"),r=e.getMeta("DC.creator");return n.length>0&&r.length>0?n+=" - "+r:n=e.getTitle(),{popup:!0,mobileonly:!1,shareText:"Pin it",name:"pinterest",faName:"s3uu-pinterest",title:{de:"Bei Pinterest pinnen",en:"Pin it on Pinterest",es:"Compartir en Pinterest",fr:"Partager sur Pinterest",it:"Condividi su Pinterest",da:"Del på Pinterest",nl:"Delen op Pinterest"},shareUrl:"https://www.pinterest.com/pin/create/button/?url="+t+e.getReferrerTrack()+"&media="+e.getMedia()+"&description="+encodeURIComponent(n)}};
|
66 |
+
|
67 |
+
|
68 |
},{}],15:[function(require,module,exports){
|
69 |
+
"use strict";module.exports=function(r){return{popup:!1,mobileonly:!1,shareText:{de:"drucken",en:"print",fr:"imprimer",es:"imprimir"},name:"printer",faName:"s3uu-print",title:{de:"drucken",en:"print",fr:"imprimer",es:"imprimir",it:"imprimere",da:"dat trykke",nl:"drukken"},shareUrl:"javascript:window.print()"}};
|
70 |
+
|
71 |
+
|
72 |
},{}],16:[function(require,module,exports){
|
73 |
+
"use strict";module.exports=function(e){var d=encodeURIComponent(e.getURL());return{popup:!0,mobileonly:!1,shareText:{de:"teilen",en:"share",es:"compartir",fr:"partager",it:"condividi",da:"del",nl:"delen"},name:"reddit",faName:"s3uu-reddit",title:{de:"Bei Reddit teilen",en:"Share on Reddit",es:"Compartir en Reddit",fr:"Partager sur Reddit",it:"Condividi su Reddit",da:"Del på Reddit",nl:"Delen op Reddit"},shareUrl:"https://www.reddit.com/submit?url="+d+e.getReferrerTrack()}};
|
74 |
+
|
75 |
+
|
76 |
},{}],17:[function(require,module,exports){
|
77 |
+
"use strict";module.exports=function(e){var t=encodeURIComponent(e.getURL());return{popup:!0,mobileonly:!1,shareText:{de:"teilen",en:"share",es:"compartir",fr:"partager",it:"condividi",da:"del",nl:"delen"},name:"stumbleupon",faName:"s3uu-stumbleupon",title:{de:"Bei StumbleUpon teilen",en:"Share on StumbleUpon",es:"Compartir en StumbleUpon",fr:"Partager sur StumbleUpon",it:"Condividi su StumbleUpon",da:"Del på StumbleUpon",nl:"Delen op StumbleUpon"},shareUrl:"https://www.stumbleupon.com/submit?url="+t+e.getReferrerTrack()}};
|
78 |
+
|
79 |
+
|
80 |
},{}],18:[function(require,module,exports){
|
81 |
+
(function (global){
|
82 |
+
"use strict";var url=require("url"),$=(typeof window !== "undefined" ? window.jQuery : typeof global !== "undefined" ? global.jQuery : null),abbreviateText=function(e,t){var r=$("<div/>").html(e).text();if(r.length<=t)return e;var i=r.substring(0,t-1).lastIndexOf(" ");return r=encodeURIComponent(r.substring(0,i))+"…"};module.exports=function(e){var t=url.parse("https://twitter.com/intent/tweet",!0),r=e.getMeta("DC.title"),i=e.getMeta("DC.creator");return r.length>0&&i.length>0?r+=" - "+i:r=e.getTitle(),t.query.text=abbreviateText(r,120),t.query.url=e.getURL(),null!==e.options.twitterVia&&(t.query.via=e.options.twitterVia),delete t.search,{popup:!0,mobileonly:!1,shareText:"tweet",name:"twitter",faName:"s3uu-twitter",title:{de:"Bei Twitter teilen",en:"Share on Twitter",es:"Compartir en Twitter",fr:"Partager sur Twitter",it:"Condividi su Twitter",da:"Del på Twitter",nl:"Delen op Twitter"},shareUrl:url.format(t)+e.getReferrerTrack()}};
|
83 |
+
|
84 |
+
|
85 |
+
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
86 |
},{"url":6}],19:[function(require,module,exports){
|
87 |
+
"use strict";module.exports=function(e){var t=encodeURIComponent(e.getURL()),a=e.getMeta("DC.title"),p=e.getMeta("DC.creator");return a.length>0&&p.length>0?a+=" - "+p:a=e.getTitle(),{popup:!1,mobileonly:!0,shareText:{de:"teilen",en:"share",es:"compartir",fr:"partager",it:"condividi",da:"del",nl:"delen"},name:"whatsapp",faName:"s3uu-whatsapp",title:{de:"Bei Whatsapp teilen",en:"Share on Whatsapp",es:"Compartir en Whatsapp",fr:"Partager sur Whatsapp",it:"Condividi su Whatsapp",da:"Del på Whatsapp",nl:"Delen op Whatsapp"},shareUrl:"whatsapp://send?text="+encodeURIComponent(a)+"%20"+t+e.getReferrerTrack()}};
|
88 |
+
|
89 |
+
|
90 |
},{}],20:[function(require,module,exports){
|
91 |
+
"use strict";module.exports=function(e){var r=encodeURIComponent(e.getURL());return{popup:!0,mobileonly:!1,shareText:{de:"teilen",en:"share",es:"compartir",fr:"partager",it:"condividi",da:"del",nl:"delen"},name:"xing",faName:"s3uu-xing",title:{de:"Bei XING teilen",en:"Share on XING",es:"Compartir en XING",fr:"Partager sur XING",it:"Condividi su XING",da:"Del på XING",nl:"Delen op XING"},shareUrl:"https://www.xing.com/social_plugins/share?url="+r+e.getReferrerTrack()}};
|
92 |
+
|
93 |
+
|
94 |
},{}],21:[function(require,module,exports){
|
95 |
(function (global){
|
96 |
+
"use strict";var $=(typeof window !== "undefined" ? window.jQuery : typeof global !== "undefined" ? global.jQuery : null),url=require("url"),window=require("browserify-window"),Shariff=function(e,t){var r=this;this.element=e,$(e).empty(),this.options=$.extend({},this.defaults,t,$(e).data());var i=[require("./services/facebook"),require("./services/googleplus"),require("./services/twitter"),require("./services/whatsapp"),require("./services/mail"),require("./services/info"),require("./services/mailto"),require("./services/linkedin"),require("./services/xing"),require("./services/pinterest"),require("./services/reddit"),require("./services/stumbleupon"),require("./services/printer"),require("./services/flattr")];this.services=$.map(this.options.services,function(e){var t;return i.forEach(function(i){return i=i(r),i.name===e?(t=i,null):void 0}),t}),this._addButtonList(),null!==this.options.backendUrl&&this.getShares().then($.proxy(this._updateCounts,this))};Shariff.prototype={defaults:{theme:"default",backendUrl:null,infoUrl:"http://ct.de/-2467514",lang:"de",mailUrl:function(){var e=url.parse(this.getURL(),!0);return e.query.view="mail",delete e.search,url.format(e)},orientation:"horizontal",buttonsize:"big",referrerTrack:null,services:["twitter","facebook","googleplus","info"],title:function(){return $("title").text()},twitterVia:null,url:function(){var e=global.document.location.href,t=$("link[rel=canonical]").attr("href")||this.getMeta("og:url")||"";return t.length>0&&(t.indexOf("http")<0&&(t=global.document.location.protocol+"//"+global.document.location.host+t),e=t),e}},$socialshareElement:function(){return $(this.element)},getLocalized:function(e,t){return"object"==typeof e[t]?e[t][this.options.lang]:"string"==typeof e[t]?e[t]:void 0},getMeta:function(e){var t=$('meta[name="'+e+'"],[property="'+e+'"]').attr("content");return t||""},getInfoUrl:function(){return this.options.infoUrl},getURL:function(){return this.getOption("url")},getOption:function(e){var t=this.options[e];return"function"==typeof t?$.proxy(t,this)():t},getTitle:function(){return this.getOption("title")},getReferrerTrack:function(){return this.options.referrerTrack||""},getMedia:function(){return this.getOption("media")},getShares:function(){var e=url.parse(this.options.backendUrl,!0);return e.query.url=this.getURL(),delete e.search,$.getJSON(url.format(e))},_updateCounts:function(e){var t=this;$.each(e,function(e,r){r>=1e3&&(r=Math.round(r/1e3)+"k"),$(t.element).find("."+e+" a").append('<span class="share_count">'+r)})},_addButtonList:function(){var e=this,t=this.$socialshareElement(),r="theme-"+this.options.theme,i="orientation-"+this.options.orientation,n="col-"+this.options.services.length,o="buttonsize-"+this.options.buttonsize,s=$("<ul>").addClass(r).addClass(i).addClass(n).addClass(o);this.services.forEach(function(t){if(!t.mobileonly||"undefined"!=typeof window.orientation||"object"==typeof window.document.ontouchstart){var r=$('<li class="shariff-button">').addClass(t.name),i='<span class="share_text">'+e.getLocalized(t,"shareText"),n=$("<a>").attr("href",t.shareUrl).append(i);"undefined"!=typeof t.faName&&n.prepend('<span class="s3uu '+t.faName+'">'),t.popup?n.attr("rel","popup"):t.blank&&n.attr("target","_blank"),n.attr("title",e.getLocalized(t,"title")),r.append(n),s.append(r)}}),s.on("click",'[rel="popup"]',function(e){e.preventDefault();var t=$(this).attr("href"),r="_blank",i="1000",n="500",o="width="+i+",height="+n;global.window.open(t,r,o)}),t.append(s)}},module.exports=Shariff,global.Shariff=Shariff,$(".shariff").each(function(){this.hasOwnProperty("shariff")||(this.shariff=new Shariff(this))});
|
97 |
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
98 |
+
},{"./services/facebook":7,"./services/flattr":8,"./services/googleplus":9,"./services/info":10,"./services/linkedin":11,"./services/mail":12,"./services/mailto":13,"./services/pinterest":14,"./services/printer":15,"./services/reddit":16,"./services/stumbleupon":17,"./services/twitter":18,"./services/whatsapp":19,"./services/xing":20,"browserify-window":1,"url":6}]},{},[21]);
|
shariff.min.local.css
CHANGED
@@ -1 +1,6 @@
|
|
1 |
-
|
|
|
|
|
|
|
|
|
|
1 |
+
/*!
|
2 |
+
* shariff - v1.9.3 - 27.04.2015
|
3 |
+
* https://github.com/heiseonline/shariff
|
4 |
+
* Copyright (c) 2015 Ines Pauer, Philipp Busse, Sebastian Hilbig, Erich Kramer, Deniz Sesli
|
5 |
+
* Licensed under the MIT <http://www.opensource.org/licenses/mit-license.php> license
|
6 |
+
*/@font-face{font-family:shariff3uu;src:url(fonts/shariff3uu.eot);src:url(fonts/shariff3uu.eot)format('embedded-opentype'),url(fonts/shariff3uu.woff)format('woff'),url(fonts/shariff3uu.ttf)format('truetype'),url(fonts/shariff3uu.svg)format('svg');font-weight:400;font-style:normal}.shariff .s3uu{font-family:shariff3uu;speak:none;font-variant:normal;text-transform:none;line-height:1;display:inline-block;-webkit-font-feature-settings:normal;-moz-font-feature-settings:normal;font-feature-settings:normal;-webkit-font-kerning:auto;-moz-font-kerning:auto;font-kerning:auto;-webkit-font-language-override:normal;-moz-font-language-override:normal;font-language-override:normal;font-size:inherit;font-size-adjust:none;font-stretch:normal;font-synthesis:weight style;text-rendering:auto;width:35px;line-height:35px;text-align:center;vertical-align:middle;font-size:20px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.shariff .s3uu-facebook:before{content:"\e800"}.shariff .s3uu-twitter:before{content:"\e801"}.shariff .s3uu-google-plus:before{content:"\e802"}.shariff .s3uu-pinterest:before{content:"\e803"}.shariff .s3uu-xing:before{content:"\e804"}.shariff .s3uu-linkedin:before{content:"\e805"}.shariff .s3uu-reddit:before{content:"\e806"}.shariff .s3uu-stumbleupon:before{content:"\e807"}.shariff .s3uu-envelope:before{content:"\e808"}.shariff .s3uu-print:before{content:"\e809"}.shariff .s3uu-info:before{content:"\e80a"}.shariff .s3uu-flattr:before{content:"\e80b"}.shariff .s3uu-whatsapp:before{content:"\f232"}.shariff .icon-vk:before{content:"\e600"}.shariff{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-flow:row wrap;-ms-flex-flow:row wrap;flex-flow:row wrap;-webkit-justify-content:flex-start;-ms-flex-pack:start;justify-content:flex-start}.shariff::after,.shariff::before{content:" ";display:table}.shariff::after{clear:both}.shariff span{color:inherit}.shariff ul{display:-webkit-flex;display:-ms-flexbox;display:flex;display:-webkit-inline;-webkit-flex-flow:row wrap;-ms-flex-flow:row wrap;flex-flow:row wrap;-webkit-justify-content:flex-start;-ms-flex-pack:start;justify-content:flex-start;padding:0;margin:0}.shariff ul li{list-style-type:none}.shariff ul li::before{content:normal!important}.shariff li{height:35px;box-sizing:border-box;overflow:hidden;margin:5px!important;padding:0!important;text-indent:0!important}.shariff li a{color:#fff;position:relative;display:block;height:35px;text-decoration:none;box-sizing:border-box}.shariff li .share_count,.shariff li .share_text{font-family:Arial,Helvetica,sans-serif;font-size:12px;vertical-align:middle;line-height:36px}.shariff li .s3uu{width:35px;line-height:35px;text-align:center;vertical-align:top;font-size:20px}.shariff li .share_count{padding:0 8px;height:33px;position:absolute;top:0;right:0;margin:1px;background-color:rgba(255,255,255,.5)}.shariff .orientation-horizontal li{-webkit-box-flex:1}.shariff .orientation-horizontal .info{-webkit-box-flex:0}.shariff .orientation-horizontal li{float:left;-webkit-flex:none;-ms-flex:none;flex:none}.shariff .orientation-horizontal li .share_text{display:block;text-indent:-9999px;padding-left:3px}.shariff .orientation-horizontal li .share_count{display:none}.shariff .theme-default .shariff-button a{color:#fff}.shariff .theme-color .share_count{background-color:transparent!important;color:#fff}.shariff .theme-color a{color:#fff!important}.shariff .theme-color a:hover{color:#fff}.shariff .theme-grey .share_count{background-color:transparent}.shariff .theme-grey .shariff-button a{background-color:#b0b0b0;color:#fff}.shariff .theme-white .share_count{background-color:transparent}.shariff .theme-white .shariff-button{border:1px solid #ddd}.shariff .theme-white .shariff-button a{background-color:#fff;color:0}.shariff .theme-white .shariff-button a:hover{background-color:#eee}.shariff .theme-round .share_count{display:inline;height:100%;padding:0;right:0;left:0;top:0;margin:0;width:100%;background-color:transparent;color:transparent!important}.shariff .theme-round .shariff-button{width:35px!important;min-width:35px!important;height:35px;border-radius:50%;margin:5px}.shariff .theme-round .share_text{display:block;text-indent:-9999px}.shariff .theme-round li{background:0 0}.shariff .theme-round li .s3uu{vertical-align:baseline}.shariff .theme-round li a{color:#fff}.shariff .theme-round a{text-align:center;color:#fff;position:relative;height:35px}.shariff .theme-round li.facebook .share_count:hover{background-color:#99adcf!important;color:#183a75!important}.shariff .theme-round li.twitter .share_count:hover{background-color:#96d4ee!important;color:#0174a4!important}.shariff .theme-round li.googleplus .share_count:hover{background-color:#eda79d!important;color:#a31601!important}.shariff .theme-round li.pinterest .share_count:hover{background-color:#ff050f!important;color:#fff!important}.shariff .theme-round li.linkedin .share_count:hover{background-color:#99adcf!important;color:#183a75!important}.shariff .theme-round li.xing .share_count:hover{background-color:#4fa5a7!important;color:#15686a!important}.shariff .theme-round li.reddit .share_count:hover{background-color:#e9f2fa!important;color:#000!important}.shariff .theme-round li.stumbleupon .share_count:hover{background-color:#fb613c!important;color:#fff!important}.shariff .theme-round li.flattr .share_count:hover{background-color:#f67c1a!important;color:#fff!important}.shariff .orientation-vertical{width:120px}.shariff .orientation-vertical li{width:100%}.shariff .orientation-vertical li a{color:#fff}.shariff .orientation-vertical.theme-round{width:50px!important}.shariff .buttonsize-small li{height:25px}.shariff .buttonsize-small li a{height:25px}.shariff .buttonsize-small li .share_count,.shariff .buttonsize-small li .share_text{font-size:11px;line-height:25px}.shariff .buttonsize-small li .s3uu{width:25px;line-height:25px;font-size:16px}.shariff .buttonsize-small li .share_text{padding-left:1px!important}.shariff .buttonsize-small li .share_count{padding:0 5px;height:23px}.shariff .orientation-vertical.buttonsize-small{width:90px}.shariff .theme-round.buttonsize-small li .s3uu{margin-top:0}.shariff .theme-round.buttonsize-small .shariff-button{width:25px!important;min-width:25px!important;height:25px!important}.shariff .theme-round.buttonsize-small .share_count{padding:0!important;height:25px!important}.widget .shariff .theme-color li a,.widget .shariff .theme-default li a,.widget .shariff .theme-grey li a,.widget .shariff .theme-round li a{color:#fff}.widget .shariff .theme-color li a:hover,.widget .shariff .theme-default li a:hover,.widget .shariff .theme-grey li a:hover,.widget .shariff .theme-round li a:hover{color:#fff}@media only screen and (max-width:360px){.shariff .orientation-horizontal li{min-width:35px;max-width:35px}.shariff .orientation-horizontal.buttonsize-small li{min-width:25px;max-width:25px}}@media only screen and (min-width:360px){.shariff .orientation-horizontal li{min-width:80px;width:auto}.shariff .orientation-horizontal li .share_count{display:block}.shariff .orientation-horizontal.col-1 li,.shariff .orientation-horizontal.col-2 li{min-width:120px;max-width:120px}.shariff .orientation-horizontal.col-1 li .share_text,.shariff .orientation-horizontal.col-2 li .share_text{text-indent:0;display:inline}.shariff .orientation-horizontal.col-5 li,.shariff .orientation-horizontal.col-6 li{-webkit-flex:none;-ms-flex:none;flex:none}}@media only screen and (min-width:640px){.shariff .orientation-horizontal.col-3 li{min-width:120px;max-width:120px}.shariff .orientation-horizontal.col-3 li .share_text{text-indent:0;display:inline}.shariff .orientation-horizontal.col-3.buttonsize-small li{min-width:90px;max-width:90px}.shariff .orientation-horizontal.col-3.buttonsize-small li .share_text{text-indent:0;display:inline}}@media only screen and (min-width:768px){.shariff .orientation-horizontal li{min-width:120px;max-width:120px}.shariff .orientation-horizontal li .share_text{text-indent:0;display:inline}.shariff .orientation-horizontal.col-5 li,.shariff .orientation-horizontal.col-6 li{-webkit-flex:1;-ms-flex:1;flex:1}.shariff .orientation-horizontal.buttonsize-small li{min-width:90px;max-width:90px}.shariff .orientation-horizontal.buttonsize-small li .share_text{text-indent:0;display:inline}.shariff .orientation-horizontal.buttonsize-small.col-5 li,.shariff .orientation-horizontal.buttonsize-small.col-6 li{-webkit-flex:1;-ms-flex:1;flex:1}}@media only screen and (min-width:1024px){.shariff li{height:35px}.shariff li a{height:35px}.shariff li .s3uu{width:35px;line-height:35px}.shariff .buttonsize-small li{height:25px}.shariff .buttonsize-small li a{height:25px}.shariff .buttonsize-small li .s3uu{width:25px;line-height:25px}}.shariff .twitter a{background-color:#55acee}.shariff .twitter a:hover{background-color:#32bbf5}.shariff .theme-default .twitter .share_count{color:#147bc9}.shariff .theme-white .twitter a{color:#55acee}.shariff .theme-white .twitter a:hover{color:#55acee}.shariff .facebook a{background-color:#3b5998;color:#fff}.shariff .facebook a:hover{background-color:#4273c8}.shariff .theme-default .facebook .share_count{color:#1e2e4f}.shariff .theme-white .facebook a{color:#3b5998!important}.shariff .theme-white .facebook a:hover{color:#3b5998}.shariff .googleplus a{background-color:#d34836}.shariff .googleplus a:hover{background-color:#f75b44}.shariff .theme-default .googleplus .share_count{color:#86291d}.shariff .theme-white .googleplus a{color:#d34836}.shariff .theme-white .googleplus a:hover{color:#d34836}.shariff .mail a{background-color:#999}.shariff .mail a:hover{background-color:#a8a8a8}.shariff .theme-white .mail a{color:#999}.shariff .theme-white .mail a:hover{color:#999}.shariff .buttonsize-small .mail .s3uu{font-size:14px!important}.shariff .mailto a{background-color:#999}.shariff .mailto a:hover{background-color:#a8a8a8}.shariff .theme-white .mailto a{color:#999}.shariff .theme-white .mailto a:hover{color:#999}.shariff .buttonsize-small .mailto .s3uu{font-size:14px!important}.shariff .info{border:1px solid #ccc}.shariff .info a{color:#666!important;background-color:#fff;text-align:center}.shariff .info a:hover{background-color:#efefef}.shariff .info .s3uu-info{width:35px}.shariff .info .share_text{display:block!important;text-indent:-9999px!important}.shariff .theme-grey .info a{background-color:#fff}.shariff .theme-grey .info a:hover{background-color:#efefef}.shariff .orientation-vertical .info{width:35px;float:left}.shariff .orientation-vertical.buttonsize-small .info{width:25px;float:left}@media only screen and (min-width:360px){.shariff .orientation-horizontal .info{lex:none!important;width:35px;min-width:35px}.shariff .orientation-vertical .info{width:35px}.shariff .orientation-vertical.buttonsize-small .info{width:25px}.shariff .orientation-vertical.buttonsize-small .info .s3uu{line-height:24px;width:24px}.shariff .orientation-horizontal.buttonsize-small .info{width:25px;min-width:25px}.shariff .orientation-horizontal.buttonsize-small .info .s3uu{line-height:24px;width:24px}}.shariff .whatsapp a{background-color:#5cbe4a}.shariff .whatsapp a:hover{background-color:#34af23}.shariff .s3uu-whatsapp{margin-left:1px}.shariff .theme-white .whatsapp a{color:#5cbe4a}.shariff .theme-white .whatsapp a:hover{color:#5cbe4a}.shariff .xing a{background-color:#126567;color:#fff}.shariff .xing a:hover{background-color:#29888a}.shariff .theme-default .xing .share_count{color:#031010}.shariff .theme-white .xing a{color:#126567}.shariff .theme-white .xing a:hover{color:#126567}.shariff .pinterest a{background-color:#cb2027;color:#fff}.shariff .pinterest a:hover{background-color:#e70f18}.shariff .theme-default .pinterest .share_count{color:#731216}.shariff .theme-white .pinterest a{color:#cb2027!important}.shariff .theme-white .pinterest a:hover{color:#cb2027}.shariff .stumbleupon a{background-color:#eb4b24}.shariff .stumbleupon a:hover{background-color:#e1370e}.shariff .stumbleupon .s3uu-stumbleupon{font-size:20px}.shariff .stumbleupon .s3uu-stumbleupon .buttonsize-small{font-size:16px}.shariff .theme-default .stumbleupon .share_count{color:#9b2a0e}.shariff .theme-white .stumbleupon a{color:#eb4b24!important}.shariff .theme-white .stumbleupon a:hover{color:#eb4b24}.shariff .printer a{background-color:#999}.shariff .printer a:hover{background-color:#a8a8a8}.shariff .theme-white .printer a{color:#999}.shariff .theme-white .printer a:hover{color:#999}.shariff .reddit a{background-color:#cee3f8;color:#000!important}.shariff .reddit a:hover{background-color:#bedcf9}.shariff .reddit .share_count{color:#000}.shariff .theme-white .reddit a{color:#000!important}.shariff .theme-grey .reddit a{color:#fff!important}.shariff .theme-grey .reddit a .share_count{color:#fff!important}.widget .shariff .theme-color .reddit a,.widget .shariff .theme-round .reddit a,.widget .shariff .theme-white .reddit a{color:#000!important}.shariff .linkedin a{background-color:#007bb6}.shariff .linkedin a:hover{background-color:#1488bf}.shariff .theme-default .linkedin .share_count{color:#003650}.shariff .theme-white .linkedin a{color:#007bb6}.shariff .theme-white .linkedin a:hover{color:#007bb6}.shariff .flattr a{background-color:#7ea352;color:#fff}.shariff .flattr a .s3uu{font-size:18px}.shariff .flattr a:hover{background-color:#f67c1a}.shariff .theme-default .flattr .share_count{color:#4a5f30}.shariff .theme-default .flattr a:hover .share_count{color:#a44c06}.shariff .theme-white .flattr a{color:#7ea352}.shariff .theme-white .flattr a:hover{color:#7ea352}.shariff .buttonsize-small .flattr a .s3uu{font-size:14px}
|
shariff.php
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* Plugin Name: Shariff
|
4 |
* Plugin URI: http://www.3uu.org/plugins.htm
|
5 |
* Description: This is a wrapper to Shariff. Enables shares in posts and/or themes with Twitter, Facebook, GooglePlus... with no harm for visitors privacy.
|
6 |
-
* Version: 1.9.
|
7 |
-
* Author:
|
8 |
* Author URI: http://www.DatenVerwurstungsZentrale.com/
|
9 |
* License: http://opensource.org/licenses/MIT
|
10 |
* Donate link: http://folge.link/?bitcoin:1Ritz1iUaLaxuYcXhUCoFhkVRH6GWiMTP
|
@@ -15,10 +15,9 @@
|
|
15 |
* services: [facebook|twitter|googleplus|whatsapp|mail|mailto|printer|pinterest|linkedin|xing|reddit|stumbleupon|info]
|
16 |
* info_url: http://ct.de/-2467514
|
17 |
* lang: de|en|fr
|
18 |
-
* theme: default|grey|white|round
|
19 |
* orientation: vertical
|
20 |
* twitter_via: screenname
|
21 |
-
* (see http://heiseonline.github.io/shariff/)
|
22 |
* style: CSS code that will be used in a DIV container arround shariff
|
23 |
*/
|
24 |
|
@@ -32,61 +31,92 @@ if ( is_admin() ){
|
|
32 |
add_action( 'init', 'shariff3UU_init_locale' );
|
33 |
}
|
34 |
|
|
|
|
|
|
|
|
|
35 |
// Update function to perform tasks _once_ after an update, based on version number to work for automatic as well as manual updates
|
36 |
function shariff3UU_update() {
|
37 |
-
|
38 |
-
/******************** VERSION ANPASSEN *******************************/
|
39 |
-
$code_version = "1.9.0"; // Set code version - needs to be adjusted for every new version!
|
40 |
-
/******************** VERSION ANPASSEN *******************************/
|
41 |
|
42 |
-
|
43 |
-
$
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
// Migration < v 1.7
|
50 |
-
if(empty($GLOBALS["shariff3UUoptions"]["version"]) || $GLOBALS["shariff3UUoptions"]["version"] < "1.7"){
|
51 |
-
if(isset($GLOBALS["shariff3UUoptions"]["add_all"])){
|
52 |
-
if($GLOBALS["shariff3UUoptions"]["add_all"]=='1'){
|
53 |
-
$GLOBALS["shariff3UUoptions"]["add_after_all_posts"]='1'; $GLOBALS["shariff3UUoptions"]["add_after_all_pages"]='1';
|
54 |
-
unset($GLOBALS["shariff3UUoptions"]["add_all"]);
|
55 |
-
}
|
56 |
-
}
|
57 |
-
if(isset($GLOBALS["shariff3UUoptions"]["add_before_all"])){
|
58 |
-
if($GLOBALS["shariff3UUoptions"]["add_before_all"]=='1'){
|
59 |
-
$GLOBALS["shariff3UUoptions"]["add_before_all_posts"]='1'; $GLOBALS["shariff3UUoptions"]["add_before_all_pages"]='1';
|
60 |
-
unset($GLOBALS["shariff3UUoptions"]["add_before_all"]);
|
61 |
-
}
|
62 |
-
}
|
63 |
-
}
|
64 |
-
// End Migration < v 1.7
|
65 |
|
66 |
-
|
67 |
-
$users = get_users('role=administrator');
|
68 |
-
foreach ($users as $user) { if( !get_user_meta($user, 'shariff3UU_ignore_notice' )) { delete_user_meta($user->ID, 'shariff3UU_ignore_notice'); } }
|
69 |
|
70 |
-
|
71 |
|
72 |
-
|
73 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
74 |
|
75 |
-
|
76 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
77 |
|
78 |
-
//
|
79 |
-
$
|
80 |
|
81 |
-
//
|
82 |
-
|
|
|
83 |
}
|
84 |
-
|
85 |
add_action('admin_init', 'shariff3UU_update');
|
86 |
|
87 |
-
//
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
88 |
function admin_style() {
|
89 |
-
|
|
|
|
|
|
|
|
|
90 |
}
|
91 |
add_action('admin_enqueue_scripts', 'admin_style');
|
92 |
|
@@ -103,17 +133,10 @@ function shariff3UU_options_init(){
|
|
103 |
// register settings and call sanitize function
|
104 |
register_setting( 'pluginPage', 'shariff3UU', 'shariff3UU_options_sanitize' );
|
105 |
|
106 |
-
// get options
|
107 |
-
$GLOBALS["shariff3UUoptions"]=get_option( 'shariff3UU' );
|
108 |
-
|
109 |
add_settings_section( 'shariff3UU_pluginPage_section', __( 'Enable Shariff for all post and configure the options with these settings.', 'shariff3UU' ),
|
110 |
'shariff3UU_options_section_callback', 'pluginPage'
|
111 |
);
|
112 |
|
113 |
-
# add_settings_field( 'shariff3UU_checkbox_add_all', __( 'Check to put Shariff at the end off all posts.', 'shariff3UU' ),
|
114 |
-
# 'shariff3UU_checkbox_add_all_render', 'pluginPage', 'shariff3UU_pluginPage_section'
|
115 |
-
# );
|
116 |
-
|
117 |
add_settings_field( 'shariff3UU_checkbox_add_after_all_posts', __( 'Check to put Shariff at the end off all posts.', 'shariff3UU' ),
|
118 |
'shariff3UU_checkbox_add_after_all_posts_render', 'pluginPage', 'shariff3UU_pluginPage_section'
|
119 |
);
|
@@ -126,9 +149,9 @@ function shariff3UU_options_init(){
|
|
126 |
'shariff3UU_checkbox_add_after_all_overview_render', 'pluginPage', 'shariff3UU_pluginPage_section'
|
127 |
);
|
128 |
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
|
133 |
add_settings_field( 'shariff3UU_checkbox_add_before_all_posts', __( 'Check to put Shariff at the beginning off all posts.', 'shariff3UU' ),
|
134 |
'shariff3UU_checkbox_add_before_all_posts_render', 'pluginPage', 'shariff3UU_pluginPage_section'
|
@@ -150,12 +173,16 @@ function shariff3UU_options_init(){
|
|
150 |
'shariff3UU_radio_theme_render', 'pluginPage', 'shariff3UU_pluginPage_section'
|
151 |
);
|
152 |
|
|
|
|
|
|
|
|
|
153 |
add_settings_field( 'shariff3UU_checkbox_vertical', __( 'Check this to make orientation of buttons <b>vertical</b>.', 'shariff3UU' ),
|
154 |
'shariff3UU_checkbox_vertical_render', 'pluginPage', 'shariff3UU_pluginPage_section'
|
155 |
);
|
156 |
|
157 |
add_settings_field( 'shariff3UU_text_services',
|
158 |
-
__( 'Put in the service do you want enable (<code>facebook|twitter|googleplus|whatsapp|mail|mailto|printer|
|
159 |
'shariff3UU_text_services_render', 'pluginPage', 'shariff3UU_pluginPage_section'
|
160 |
);
|
161 |
|
@@ -192,20 +219,28 @@ function shariff3UU_options_init(){
|
|
192 |
add_settings_field( 'shariff3UU_radio_align_widget', __( 'Select the alignment of the Shariff buttons in the widget', 'shariff3UU' ),
|
193 |
'shariff3UU_radio_align_widget_render', 'pluginPage', 'shariff3UU_pluginPage_section'
|
194 |
);
|
195 |
-
|
|
|
|
|
|
|
|
|
|
|
196 |
}
|
197 |
|
198 |
// sanitize input from the settings page
|
199 |
function shariff3UU_options_sanitize( $input ){
|
200 |
$valid = array();
|
|
|
201 |
if(isset($input["add_after_all_posts"])) $valid["add_after_all_posts"] = $input["add_after_all_posts"];
|
202 |
if(isset($input["add_before_all_posts"])) $valid["add_before_all_posts"] = absint( $input["add_before_all_posts"] );
|
203 |
if(isset($input["add_after_all_overview"])) $valid["add_after_all_overview"] = absint( $input["add_after_all_overview"] );
|
204 |
if(isset($input["add_before_all_overview"])) $valid["add_before_all_overview"] = absint( $input["add_before_all_overview"] );
|
205 |
if(isset($input["add_after_all_pages"])) $valid["add_after_all_pages"] = absint( $input["add_after_all_pages"] );
|
206 |
if(isset($input["add_before_all_pages"])) $valid["add_before_all_pages"] = absint( $input["add_before_all_pages"] );
|
|
|
207 |
if(isset($input["language"])) $valid["language"] = sanitize_text_field( $input["language"] );
|
208 |
if(isset($input["theme"])) $valid["theme"] = sanitize_text_field( $input["theme"] );
|
|
|
209 |
if(isset($input["vertical"])) $valid["vertical"] = absint( $input["vertical"] );
|
210 |
if(isset($input["services"])) $valid["services"] = str_replace(' ', '',sanitize_text_field( $input["services"] ));
|
211 |
if(isset($input["backend"])) $valid["backend"] = absint( $input["backend"] );
|
@@ -216,52 +251,57 @@ function shariff3UU_options_sanitize( $input ){
|
|
216 |
if(isset($input["style"])) $valid["style"] = sanitize_text_field( $input["style"] );
|
217 |
if(isset($input["align"])) $valid["align"] = sanitize_text_field( $input["align"] );
|
218 |
if(isset($input["align_widget"])) $valid["align_widget"] = sanitize_text_field( $input["align_widget"] );
|
219 |
-
|
220 |
-
//
|
221 |
-
|
222 |
-
if(isset($input["new"])) $valid["new"] = absint( $input["new"] );
|
223 |
return $valid;
|
224 |
}
|
225 |
|
226 |
// render admin options: use isset() to prevent errors while debug mode is on
|
227 |
function shariff3UU_checkbox_add_after_all_posts_render(){
|
228 |
echo "<input type='checkbox' name='shariff3UU[add_after_all_posts]' ";
|
229 |
-
if(isset($GLOBALS["
|
230 |
echo " value='1'>";
|
231 |
}
|
232 |
|
233 |
-
function
|
234 |
-
echo "<input type='checkbox' name='shariff3UU[
|
235 |
-
if(isset($GLOBALS["
|
236 |
echo " value='1'>";
|
237 |
}
|
238 |
|
239 |
function shariff3UU_checkbox_add_after_all_overview_render(){
|
240 |
echo "<input type='checkbox' name='shariff3UU[add_after_all_overview]' ";
|
241 |
-
if(isset($GLOBALS["
|
242 |
echo " value='1'>";
|
243 |
}
|
244 |
|
245 |
-
function
|
246 |
-
echo "<input type='checkbox' name='shariff3UU[
|
247 |
-
if(isset($GLOBALS["
|
248 |
echo " value='1'>";
|
249 |
}
|
250 |
|
251 |
-
function
|
252 |
-
echo "<input type='checkbox' name='shariff3UU[
|
253 |
-
if(isset($GLOBALS["
|
254 |
echo " value='1'>";
|
255 |
}
|
256 |
|
257 |
function shariff3UU_checkbox_add_before_all_pages_render(){
|
258 |
echo "<input type='checkbox' name='shariff3UU[add_before_all_pages]' ";
|
259 |
-
if(isset($GLOBALS["
|
|
|
|
|
|
|
|
|
|
|
|
|
260 |
echo " value='1'>";
|
261 |
}
|
262 |
|
263 |
function shariff3UU_select_language_render(){
|
264 |
-
$options = $GLOBALS["
|
265 |
echo "<select name='shariff3UU[language]'>
|
266 |
<option value='' ". selected( $options['language'], '', 0 ) .">". __( 'browser selected', 'shariff3UU') ."</option>
|
267 |
<option value='en' ". selected( $options['language'], 'en', 0 ) .">English</option>
|
@@ -271,24 +311,31 @@ function shariff3UU_select_language_render(){
|
|
271 |
}
|
272 |
|
273 |
function shariff3UU_radio_theme_render(){
|
274 |
-
$options = $GLOBALS["
|
275 |
# $wpurl=site_url();
|
276 |
echo "<table border='0'>
|
277 |
<tr><td><input type='radio' name='shariff3UU[theme]' value='' ". checked( $options['theme'], '',0 ) .">default</td><td><img src='".WP_CONTENT_URL."/plugins/shariff/pictos/defaultBtns.png'></td></tr>
|
|
|
278 |
<tr><td><input type='radio' name='shariff3UU[theme]' value='grey' ". checked( $options['theme'], 'grey',0 ) .">grey</td><td><img src='".WP_CONTENT_URL."/plugins/shariff/pictos/greyBtns.png'><br></td></tr>
|
279 |
<tr><td><input type='radio' name='shariff3UU[theme]' value='white' ". checked( $options['theme'], 'white',0 ) .">white</td><td><img src='".WP_CONTENT_URL."/plugins/shariff/pictos/whiteBtns.png'><br></td></tr>
|
280 |
<tr><td><input type='radio' name='shariff3UU[theme]' value='round' ". checked( $options['theme'], 'round',0 ) .">round</td><td><img src='".WP_CONTENT_URL."/plugins/shariff/pictos/roundBtns.png'><br></td></tr>
|
281 |
</table>";
|
282 |
}
|
283 |
|
|
|
|
|
|
|
|
|
|
|
|
|
284 |
function shariff3UU_checkbox_vertical_render(){
|
285 |
echo "<input type='checkbox' name='shariff3UU[vertical]' ";
|
286 |
-
if(isset($GLOBALS['
|
287 |
echo " value='1'><img src='". WP_CONTENT_URL ."/plugins/shariff/pictos/verticalBtns.png' align='top'>";
|
288 |
}
|
289 |
|
290 |
function shariff3UU_text_services_render(){
|
291 |
-
(isset($GLOBALS["
|
292 |
echo "<input type='text' name='shariff3UU[services]' value='". esc_html($services) ."' size='50' placeholder='twitter|facebook|googleplus|info'>";
|
293 |
}
|
294 |
|
@@ -300,32 +347,32 @@ function shariff3UU_checkbox_backend_render(){
|
|
300 |
// check that PHP version is okay
|
301 |
if (version_compare(PHP_VERSION, '5.4.0') < 1) echo "PHP version 5.4 or better is needed to enable the backend. ";
|
302 |
echo "<input type='checkbox' name='shariff3UU[backend]' ";
|
303 |
-
if(isset($GLOBALS['
|
304 |
echo " value='1'>";
|
305 |
}
|
306 |
|
307 |
function shariff3UU_text_info_url_render(){
|
308 |
-
(isset($GLOBALS['
|
309 |
echo "<input type='text' name='shariff3UU[info_url]' value='". esc_html($info_url) ."' size='50' placeholder='http://ct.de/-2467514'>";
|
310 |
}
|
311 |
|
312 |
function shariff3UU_text_twittervia_render(){
|
313 |
-
(isset($GLOBALS['
|
314 |
echo "<input type='text' name='shariff3UU[twitter_via]' value='". $twitter_via ."' size='50' placeholder='screenname'>";
|
315 |
}
|
316 |
|
317 |
function shariff3UU_text_flattruser_render(){
|
318 |
-
(isset($GLOBALS['
|
319 |
echo "<input type='text' name='shariff3UU[flattruser]' value='". $flattruser ."' size='50' placeholder='username'>";
|
320 |
}
|
321 |
|
322 |
function shariff3UU_text_style_render(){
|
323 |
-
(isset($GLOBALS['
|
324 |
echo "<input type='text' name='shariff3UU[style]' value='". esc_html($style) ."' size='50' placeholder='".__( 'please read about it in the FAQ', 'shariff3UU' )."'>";
|
325 |
}
|
326 |
|
327 |
function shariff3UU_radio_align_render(){
|
328 |
-
$options = $GLOBALS["
|
329 |
echo "<table border='0'><tr>
|
330 |
<td><input type='radio' name='shariff3UU[align]' value='flex-start' ". checked( $options['align'], 'flex-start',0 ) .">".__( 'left', 'shariff3UU' )."</td>
|
331 |
<td><input type='radio' name='shariff3UU[align]' value='center' ". checked( $options['align'], 'center',0 ) .">".__( 'center', 'shariff3UU' )."</td>
|
@@ -334,22 +381,50 @@ function shariff3UU_radio_align_render(){
|
|
334 |
}
|
335 |
|
336 |
function shariff3UU_radio_align_widget_render(){
|
337 |
-
$options = $GLOBALS["
|
338 |
echo "<table border='0'><tr>
|
339 |
<td><input type='radio' name='shariff3UU[align_widget]' value='flex-start' ". checked( $options['align_widget'], 'flex-start',0 ) .">".__( 'left', 'shariff3UU' )."</td>
|
340 |
<td><input type='radio' name='shariff3UU[align_widget]' value='center' ". checked( $options['align_widget'], 'center',0 ) .">".__( 'center', 'shariff3UU' )."</td>
|
341 |
<td><input type='radio' name='shariff3UU[align_widget]' value='flex-end' ". checked( $options['align_widget'], 'flex-end',0 ) .">".__( 'right', 'shariff3UU' )."</td>
|
342 |
</tr></table>";
|
343 |
}
|
344 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
345 |
function shariff3UU_options_section_callback(){
|
346 |
echo __( 'This configures the default behavior of Shariff for your blog. You can overwrite this in single posts or pages with the options within the <code>[shariff]</code> shorttag.', 'shariff3UU' );
|
347 |
}
|
348 |
|
349 |
function shariff3UU_options_page(){
|
350 |
-
$GLOBALS["shariff3UUoptions"]=get_option( 'shariff3UU' );
|
351 |
/* The <div> with the class "wrap" makes sure that messages are displayed below the title and not above */
|
352 |
-
echo '<div class="wrap"><h2>Shariff ' . $GLOBALS["
|
|
|
353 |
settings_fields( 'pluginPage' );
|
354 |
do_settings_sections( 'pluginPage' );
|
355 |
submit_button();
|
@@ -377,10 +452,10 @@ function shariff3UU_options_page(){
|
|
377 |
// the shorttag by the sidewide configured options
|
378 |
function buildShariffShorttag(){
|
379 |
// get options
|
380 |
-
$shariff3UU =
|
381 |
|
382 |
// menu configured option over old constant
|
383 |
-
// however backward compatible to:
|
384 |
// Define it in wp-config.php with the shortcode that should added to all posts. Example:
|
385 |
// define('SHARIFF_ALL_POSTS','[shariff services="facebook|twitter|googleplus" backend="on"]');
|
386 |
// This is a workaround as long as we did not have more options with an own admin page.
|
@@ -394,6 +469,8 @@ function buildShariffShorttag(){
|
|
394 |
if(isset($shariff3UU["vertical"])) if($shariff3UU["vertical"]=='1') $shorttag.=' orientation="vertical"';
|
395 |
// *** theme ***
|
396 |
if(!empty($shariff3UU["theme"])) $shorttag.=' theme="'.$shariff3UU["theme"].'"';
|
|
|
|
|
397 |
// *** lang ***
|
398 |
if(!empty($shariff3UU["language"])) $shorttag.=' lang="'.$shariff3UU["language"].'"';
|
399 |
//*** services ***
|
@@ -419,18 +496,109 @@ function buildShariffShorttag(){
|
|
419 |
|
420 |
// add mail from if view=mail
|
421 |
function sharif3UUaddMailForm($content){
|
422 |
-
|
423 |
-
//
|
424 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
425 |
// falls mail uebergeben, setze als return-path
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
426 |
}
|
427 |
|
428 |
-
//
|
429 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
430 |
|
431 |
-
// add shorttag to
|
432 |
function shariffPosts($content) {
|
433 |
-
$shariff3UU =
|
|
|
|
|
|
|
|
|
434 |
|
435 |
// conditional to make it functional compatible to the hack in yanniks plugin
|
436 |
// if we want see it as text - replace the slash
|
@@ -443,33 +611,29 @@ function shariffPosts($content) {
|
|
443 |
return $content;
|
444 |
}
|
445 |
|
446 |
-
// add it to single posts view only
|
447 |
-
// expact the new values for adds on overview are set
|
448 |
-
if( !is_singular() && isset($shariff3UU["add_after_all_overview"]) && isset($shariff3UU["add_before_all_overview"])){
|
449 |
-
if($shariff3UU["add_after_all_overview"]!='1' && $shariff3UU["add_before_all_overview"]!='1' ) return $content;
|
450 |
-
}
|
451 |
-
|
452 |
// now add Shariff
|
453 |
if( !is_singular() ) {
|
454 |
// auf der Uebersichtsseite
|
455 |
-
if(isset($shariff3UU["add_before_all_overview"])) if($shariff3UU["add_before_all_overview"]=='1')
|
456 |
-
if(isset($shariff3UU["add_after_all_overview"])) if($shariff3UU["add_after_all_overview"]=='1')
|
|
|
457 |
}elseif( is_singular( 'post' ) ){
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
if(isset($shariff3UU["add_after_all_posts"]) && $shariff3UU["add_after_all_posts"]=='1' && ((isset($shariff3UU["add_all"]) && $shariff3UU["add_all"]!='1') || (!isset($shariff3UU["add_all"])))) $content.=buildShariffShorttag();
|
462 |
} elseif ( is_singular( 'page' ) ) {
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
//
|
471 |
-
|
472 |
-
|
|
|
|
|
473 |
}
|
474 |
|
475 |
// altes verhalten
|
@@ -477,10 +641,11 @@ function shariffPosts($content) {
|
|
477 |
|
478 |
return $content;
|
479 |
}
|
|
|
480 |
|
481 |
// add the align-style option to the css file
|
482 |
function shariff3UU_align_styles() {
|
483 |
-
$shariff3UU =
|
484 |
$custom_css = '';
|
485 |
wp_enqueue_style('shariffcss', plugins_url('/shariff.min.local.css',__FILE__));
|
486 |
|
@@ -514,34 +679,26 @@ add_action( 'wp_enqueue_scripts', 'shariff3UU_align_styles' );
|
|
514 |
|
515 |
// Render the shorttag to the HTML shorttag of Shariff
|
516 |
function RenderShariff( $atts , $content = null) {
|
517 |
-
|
518 |
-
|
519 |
-
// use the old set of services to make it backward compatible
|
520 |
-
if(empty($shariff3UU["services"]))$shariff3UU["services"]="twitter|facebook|googleplus|info";
|
521 |
|
522 |
-
if
|
523 |
-
|
524 |
-
if(!empty($shariff3UU["style"])) $atts["style"]=$shariff3UU["style"];
|
525 |
-
if(!empty($shariff3UU["theme"])) $atts["theme"]=$shariff3UU["theme"];
|
526 |
-
if(!empty($shariff3UU["language"])) $atts["language"]=$shariff3UU["language"];
|
527 |
-
if(!empty($shariff3UU["info_url"])) $atts["info_url"]=$shariff3UU["info_url"];
|
528 |
-
if(!empty($shariff3UU["twitter_via"])) $atts["twitter_via"]=$shariff3UU["twitter_via"];
|
529 |
-
if(!empty($shariff3UU["flattruser"])) $atts["flattruser"]=$shariff3UU["flattruser"];
|
530 |
-
if(isset($shariff3UU["vertical"])) if($shariff3UU["vertical"]=='1') $atts["orientation"]='vertical';
|
531 |
-
if(isset($shariff3UU["backend"])) if($shariff3UU["backend"]=='1') $atts["backend"]='on';
|
532 |
-
}
|
533 |
|
534 |
-
//
|
535 |
-
|
536 |
-
if($shariff3UU["
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
}
|
542 |
|
|
|
|
|
|
|
543 |
// make sure that use default WP jquery is loaded
|
544 |
wp_enqueue_script('jquery');
|
|
|
545 |
// the JS must be loaded at footer. Make sure that wp_footer() is present in yout theme!
|
546 |
wp_enqueue_script('shariffjs', plugins_url('/shariff.js',__FILE__),'','',true);
|
547 |
|
@@ -566,10 +723,10 @@ function RenderShariff( $atts , $content = null) {
|
|
566 |
if(array_key_exists('theme', $atts)) $output.=" data-theme='". esc_html($atts['theme'])."'";
|
567 |
// rtzTodo: use geoip if possible
|
568 |
if(array_key_exists('lang', $atts)) $output.=" data-lang='". esc_html($atts['lang'])."'";
|
569 |
-
if(array_key_exists('image', $atts)) $output.=" data-image='". esc_html($atts['image'])."'";
|
570 |
-
if(array_key_exists('media', $atts)) $output.=" data-media='". esc_html($atts['media'])."'";
|
571 |
if(array_key_exists('twitter_via', $atts)) $output.=" data-twitter-via='". esc_html($atts['twitter_via'])."'";
|
572 |
if(array_key_exists('flattruser', $atts)) $output.=" data-flattruser='". esc_html($atts['flattruser'])."'";
|
|
|
|
|
573 |
|
574 |
// if services are set do only use this
|
575 |
if(array_key_exists('services', $atts)){
|
@@ -591,8 +748,23 @@ function RenderShariff( $atts , $content = null) {
|
|
591 |
$output.=']\'';
|
592 |
}
|
593 |
|
594 |
-
//
|
595 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
596 |
|
597 |
// enable share statistic request
|
598 |
// Make sure u have set the domain of the blog in shariff/backend/shariff.json
|
@@ -610,6 +782,17 @@ function RenderShariff( $atts , $content = null) {
|
|
610 |
return $output;
|
611 |
}
|
612 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
613 |
// Widget
|
614 |
class ShariffWidget extends WP_Widget {
|
615 |
public function __construct() {
|
@@ -662,15 +845,19 @@ class ShariffWidget extends WP_Widget {
|
|
662 |
// draw widget
|
663 |
public function widget($args, $instance) {
|
664 |
extract($args);
|
|
|
|
|
665 |
// Container
|
666 |
echo $before_widget;
|
667 |
// print title
|
668 |
$title = (empty($instance['shariff-title'])) ? '' : apply_filters('shariff-title', $instance['shariff-title']);
|
669 |
if(!empty($title)) { echo $before_title . $title . $after_title; }
|
|
|
670 |
// print shorttag
|
671 |
// if is not configured, use the global options from admin menu
|
672 |
if ($instance['shariff-tag']=='[shariff]') $shorttag=buildShariffShorttag();
|
673 |
else $shorttag=$instance['shariff-tag'];
|
|
|
674 |
// set url to current page to prevent sharing the first or last post on pages with multiple posts e.g. the overview page
|
675 |
$wpurl = get_bloginfo('wpurl');
|
676 |
$siteurl = get_bloginfo('url');
|
@@ -686,7 +873,24 @@ class ShariffWidget extends WP_Widget {
|
|
686 |
$wp_title = wp_title( '', false);
|
687 |
if(!empty($wp_title)) $page_title = ltrim($wp_title); // wp_title for all pages that have it
|
688 |
else $page_title = get_bloginfo('name'); // the site name for static start pages where wp_title is not set
|
689 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
690 |
|
691 |
// process the shortcode
|
692 |
echo do_shortcode($shorttag);
|
@@ -723,10 +927,53 @@ add_action('admin_init', 'shariff3UU_nag_ignore');
|
|
723 |
|
724 |
/* Display an info notice if flattr is set as a service, but no username is entered */
|
725 |
function shariff3UU_flattr_notice() {
|
726 |
-
$shariff3UU
|
727 |
-
if((strpos($shariff3UU["services"], 'flattr') != false) && empty($shariff3UU["flattruser"]) && current_user_can( 'manage_options' )) {
|
728 |
echo "<div class='error'><p>" . __('Please check your ', 'shariff3UU') . "<a href='" . get_bloginfo('wpurl') . "/wp-admin/options-general.php?page=shariff3uu'>" . __('Shariff-Settings</a> - Flattr was selected, but no username was provided! Please enter your <strong>Flattr username</strong> in the shariff options!', 'shariff3UU') . "</span></p></div>";
|
729 |
}
|
730 |
}
|
731 |
add_action('admin_notices', 'shariff3UU_flattr_notice');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
732 |
?>
|
1 |
<?php
|
2 |
/**
|
3 |
+
* Plugin Name: Shariff Wrapper
|
4 |
* Plugin URI: http://www.3uu.org/plugins.htm
|
5 |
* Description: This is a wrapper to Shariff. Enables shares in posts and/or themes with Twitter, Facebook, GooglePlus... with no harm for visitors privacy.
|
6 |
+
* Version: 1.9.9
|
7 |
+
* Author: 3UU
|
8 |
* Author URI: http://www.DatenVerwurstungsZentrale.com/
|
9 |
* License: http://opensource.org/licenses/MIT
|
10 |
* Donate link: http://folge.link/?bitcoin:1Ritz1iUaLaxuYcXhUCoFhkVRH6GWiMTP
|
15 |
* services: [facebook|twitter|googleplus|whatsapp|mail|mailto|printer|pinterest|linkedin|xing|reddit|stumbleupon|info]
|
16 |
* info_url: http://ct.de/-2467514
|
17 |
* lang: de|en|fr
|
18 |
+
* theme: default|color|grey|white|round
|
19 |
* orientation: vertical
|
20 |
* twitter_via: screenname
|
|
|
21 |
* style: CSS code that will be used in a DIV container arround shariff
|
22 |
*/
|
23 |
|
31 |
add_action( 'init', 'shariff3UU_init_locale' );
|
32 |
}
|
33 |
|
34 |
+
// brachen wir eh sowohl im FE wie im Adminbereich, also koennen wir es auch gleich global EINMAL holen
|
35 |
+
// get options
|
36 |
+
$shariff3UU=get_option( 'shariff3UU' );
|
37 |
+
|
38 |
// Update function to perform tasks _once_ after an update, based on version number to work for automatic as well as manual updates
|
39 |
function shariff3UU_update() {
|
|
|
|
|
|
|
|
|
40 |
|
41 |
+
/******************** VERSION ANPASSEN *******************************/
|
42 |
+
$code_version = "1.9.9"; // Set code version - needs to be adjusted for every new version!
|
43 |
+
/******************** VERSION ANPASSEN *******************************/
|
44 |
+
|
45 |
+
$do_admin_notice=false;
|
46 |
+
|
47 |
+
if(empty($GLOBALS["shariff3UU"]["version"]) || ( isset($GLOBALS["shariff3UU"]["version"]) && version_compare($GLOBALS["shariff3UU"]["version"], $code_version) == '-1') ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
|
49 |
+
include(plugin_dir_path(__FILE__).'updates.php');
|
|
|
|
|
50 |
|
51 |
+
if(!isset($wpdb)) { global $wpdb; }
|
52 |
|
53 |
+
/* Delete user meta entry shariff3UU_ignore_notice to display update message again after an update */
|
54 |
+
// check for multisite
|
55 |
+
if (is_multisite() && $do_admin_notice==true) {
|
56 |
+
$blogs = $wpdb->get_results("SELECT blog_id FROM {$wpdb->blogs}", ARRAY_A);
|
57 |
+
if ($blogs) {
|
58 |
+
foreach($blogs as $blog) {
|
59 |
+
// switch to each blog
|
60 |
+
switch_to_blog($blog['blog_id']);
|
61 |
+
// delete user meta entry shariff3UU_ignore_notice
|
62 |
+
$users = get_users('role=administrator');
|
63 |
+
foreach ($users as $user) { if ( !get_user_meta($user, 'shariff3UU_ignore_notice' )) { delete_user_meta($user->ID, 'shariff3UU_ignore_notice'); } }
|
64 |
+
// switch back to main
|
65 |
+
restore_current_blog();
|
66 |
+
}
|
67 |
+
}
|
68 |
+
} elseif($do_admin_notice==true) {
|
69 |
+
$users = get_users('role=administrator');
|
70 |
+
foreach ($users as $user) { if ( !get_user_meta($user, 'shariff3UU_ignore_notice' )) { delete_user_meta($user->ID, 'shariff3UU_ignore_notice'); } }
|
71 |
+
}
|
72 |
|
73 |
+
/* Clear cache direcotry */
|
74 |
+
// check for multisite
|
75 |
+
if (is_multisite()) {
|
76 |
+
global $wpdb;
|
77 |
+
$current_blog_id=get_current_blog_id();
|
78 |
+
$blogs = $wpdb->get_results("SELECT blog_id FROM {$wpdb->blogs}", ARRAY_A);
|
79 |
+
if ($blogs) {
|
80 |
+
foreach($blogs as $blog) {
|
81 |
+
// switch to each blog
|
82 |
+
switch_to_blog($blog['blog_id']);
|
83 |
+
// delete cache dir
|
84 |
+
shariff_removecachedir();
|
85 |
+
// switch back to main
|
86 |
+
restore_current_blog();
|
87 |
+
}
|
88 |
+
}
|
89 |
+
} else {
|
90 |
+
// delete cache dir
|
91 |
+
shariff_removecachedir();
|
92 |
+
}
|
93 |
|
94 |
+
// set new version
|
95 |
+
$GLOBALS["shariff3UU"]["version"]=$code_version;
|
96 |
|
97 |
+
// Remove empty elements and save to options table
|
98 |
+
$shariff3UU = array_filter($GLOBALS["shariff3UU"]);
|
99 |
+
update_option( 'shariff3UU', $shariff3UU );
|
100 |
}
|
101 |
+
}
|
102 |
add_action('admin_init', 'shariff3UU_update');
|
103 |
|
104 |
+
// Add settings link on plugin page
|
105 |
+
function shariff3UU_settings_link($links) {
|
106 |
+
$settings_link = '<a href="options-general.php?page=shariff3uu">' . __( 'Settings', 'shariff3UU' ) . '</a>';
|
107 |
+
array_unshift($links, $settings_link);
|
108 |
+
return $links;
|
109 |
+
}
|
110 |
+
$plugin = plugin_basename(__FILE__);
|
111 |
+
add_filter("plugin_action_links_$plugin", 'shariff3UU_settings_link' );
|
112 |
+
|
113 |
+
// scyrpts and styles for admin pages e.g. info notice
|
114 |
function admin_style() {
|
115 |
+
// styles for admin info notice
|
116 |
+
wp_enqueue_style('admin_css', plugins_url('admin.css', __FILE__));
|
117 |
+
// scripts for pinterest default image media uploader
|
118 |
+
wp_enqueue_script('jquery');
|
119 |
+
wp_enqueue_media();
|
120 |
}
|
121 |
add_action('admin_enqueue_scripts', 'admin_style');
|
122 |
|
133 |
// register settings and call sanitize function
|
134 |
register_setting( 'pluginPage', 'shariff3UU', 'shariff3UU_options_sanitize' );
|
135 |
|
|
|
|
|
|
|
136 |
add_settings_section( 'shariff3UU_pluginPage_section', __( 'Enable Shariff for all post and configure the options with these settings.', 'shariff3UU' ),
|
137 |
'shariff3UU_options_section_callback', 'pluginPage'
|
138 |
);
|
139 |
|
|
|
|
|
|
|
|
|
140 |
add_settings_field( 'shariff3UU_checkbox_add_after_all_posts', __( 'Check to put Shariff at the end off all posts.', 'shariff3UU' ),
|
141 |
'shariff3UU_checkbox_add_after_all_posts_render', 'pluginPage', 'shariff3UU_pluginPage_section'
|
142 |
);
|
149 |
'shariff3UU_checkbox_add_after_all_overview_render', 'pluginPage', 'shariff3UU_pluginPage_section'
|
150 |
);
|
151 |
|
152 |
+
add_settings_field( 'shariff3UU_checkbox_add_after_all_custom_type', __( 'Check to put Shariff at the end off all extension pages (e.g. product sites).', 'shariff3UU' ),
|
153 |
+
'shariff3UU_checkbox_add_after_all_custom_type_render', 'pluginPage', 'shariff3UU_pluginPage_section'
|
154 |
+
);
|
155 |
|
156 |
add_settings_field( 'shariff3UU_checkbox_add_before_all_posts', __( 'Check to put Shariff at the beginning off all posts.', 'shariff3UU' ),
|
157 |
'shariff3UU_checkbox_add_before_all_posts_render', 'pluginPage', 'shariff3UU_pluginPage_section'
|
173 |
'shariff3UU_radio_theme_render', 'pluginPage', 'shariff3UU_pluginPage_section'
|
174 |
);
|
175 |
|
176 |
+
add_settings_field( 'shariff3UU_checkbox_buttonsize', __( 'Check this to make the buttons 30% smaller (all designs).', 'shariff3UU' ),
|
177 |
+
'shariff3UU_checkbox_buttonsize_render', 'pluginPage', 'shariff3UU_pluginPage_section'
|
178 |
+
);
|
179 |
+
|
180 |
add_settings_field( 'shariff3UU_checkbox_vertical', __( 'Check this to make orientation of buttons <b>vertical</b>.', 'shariff3UU' ),
|
181 |
'shariff3UU_checkbox_vertical_render', 'pluginPage', 'shariff3UU_pluginPage_section'
|
182 |
);
|
183 |
|
184 |
add_settings_field( 'shariff3UU_text_services',
|
185 |
+
__( 'Put in the service do you want enable (<code>facebook|twitter|googleplus|whatsapp|mail|mailto|printer|pinterest|linkedin| xing|reddit|stumbleupon|flattr|info</code>). Use the pipe sign | between two or more services.', 'shariff3UU' ),
|
186 |
'shariff3UU_text_services_render', 'pluginPage', 'shariff3UU_pluginPage_section'
|
187 |
);
|
188 |
|
219 |
add_settings_field( 'shariff3UU_radio_align_widget', __( 'Select the alignment of the Shariff buttons in the widget', 'shariff3UU' ),
|
220 |
'shariff3UU_radio_align_widget_render', 'pluginPage', 'shariff3UU_pluginPage_section'
|
221 |
);
|
222 |
+
|
223 |
+
// default image for pinterest
|
224 |
+
add_settings_field( 'shariff3UU_text_default_pinterest', __( 'Select the default image for Pinterest in case no other usable image is found.', 'shariff3UU' ),
|
225 |
+
'shariff3UU_text_default_pinterest_render', 'pluginPage', 'shariff3UU_pluginPage_section'
|
226 |
+
);
|
227 |
+
|
228 |
}
|
229 |
|
230 |
// sanitize input from the settings page
|
231 |
function shariff3UU_options_sanitize( $input ){
|
232 |
$valid = array();
|
233 |
+
if(isset($input["version"])) $valid["version"] = sanitize_text_field( $input["version"] );
|
234 |
if(isset($input["add_after_all_posts"])) $valid["add_after_all_posts"] = $input["add_after_all_posts"];
|
235 |
if(isset($input["add_before_all_posts"])) $valid["add_before_all_posts"] = absint( $input["add_before_all_posts"] );
|
236 |
if(isset($input["add_after_all_overview"])) $valid["add_after_all_overview"] = absint( $input["add_after_all_overview"] );
|
237 |
if(isset($input["add_before_all_overview"])) $valid["add_before_all_overview"] = absint( $input["add_before_all_overview"] );
|
238 |
if(isset($input["add_after_all_pages"])) $valid["add_after_all_pages"] = absint( $input["add_after_all_pages"] );
|
239 |
if(isset($input["add_before_all_pages"])) $valid["add_before_all_pages"] = absint( $input["add_before_all_pages"] );
|
240 |
+
if(isset($input["add_after_all_custom_type"]))$valid["add_after_all_custom_type"] = absint( $input["add_after_all_custom_type"] );
|
241 |
if(isset($input["language"])) $valid["language"] = sanitize_text_field( $input["language"] );
|
242 |
if(isset($input["theme"])) $valid["theme"] = sanitize_text_field( $input["theme"] );
|
243 |
+
if(isset($input["buttonsize"])) $valid["buttonsize"] = absint( $input["buttonsize"] );
|
244 |
if(isset($input["vertical"])) $valid["vertical"] = absint( $input["vertical"] );
|
245 |
if(isset($input["services"])) $valid["services"] = str_replace(' ', '',sanitize_text_field( $input["services"] ));
|
246 |
if(isset($input["backend"])) $valid["backend"] = absint( $input["backend"] );
|
251 |
if(isset($input["style"])) $valid["style"] = sanitize_text_field( $input["style"] );
|
252 |
if(isset($input["align"])) $valid["align"] = sanitize_text_field( $input["align"] );
|
253 |
if(isset($input["align_widget"])) $valid["align_widget"] = sanitize_text_field( $input["align_widget"] );
|
254 |
+
if(isset($input["default_pinterest"])) $valid["default_pinterest"] = sanitize_text_field( $input["default_pinterest"] );
|
255 |
+
// remove empty elements
|
256 |
+
$valid = array_filter($valid);
|
|
|
257 |
return $valid;
|
258 |
}
|
259 |
|
260 |
// render admin options: use isset() to prevent errors while debug mode is on
|
261 |
function shariff3UU_checkbox_add_after_all_posts_render(){
|
262 |
echo "<input type='checkbox' name='shariff3UU[add_after_all_posts]' ";
|
263 |
+
if(isset($GLOBALS["shariff3UU"]["add_after_all_posts"])) echo checked( $GLOBALS["shariff3UU"]["add_after_all_posts"], 1, 0 );
|
264 |
echo " value='1'>";
|
265 |
}
|
266 |
|
267 |
+
function shariff3UU_checkbox_add_after_all_pages_render(){
|
268 |
+
echo "<input type='checkbox' name='shariff3UU[add_after_all_pages]' ";
|
269 |
+
if(isset($GLOBALS["shariff3UU"]["add_after_all_pages"])) echo checked( $GLOBALS["shariff3UU"]["add_after_all_pages"], 1, 0 );
|
270 |
echo " value='1'>";
|
271 |
}
|
272 |
|
273 |
function shariff3UU_checkbox_add_after_all_overview_render(){
|
274 |
echo "<input type='checkbox' name='shariff3UU[add_after_all_overview]' ";
|
275 |
+
if(isset($GLOBALS["shariff3UU"]["add_after_all_overview"])) echo checked( $GLOBALS["shariff3UU"]["add_after_all_overview"], 1, 0 );
|
276 |
echo " value='1'>";
|
277 |
}
|
278 |
|
279 |
+
function shariff3UU_checkbox_add_after_all_custom_type_render(){
|
280 |
+
echo "<input type='checkbox' name='shariff3UU[add_after_all_custom_type]' ";
|
281 |
+
if(isset($GLOBALS["shariff3UU"]["add_after_all_custom_type"])) echo checked( $GLOBALS["shariff3UU"]["add_after_all_custom_type"], 1, 0 );
|
282 |
echo " value='1'>";
|
283 |
}
|
284 |
|
285 |
+
function shariff3UU_checkbox_add_before_all_posts_render(){
|
286 |
+
echo "<input type='checkbox' name='shariff3UU[add_before_all_posts]' ";
|
287 |
+
if(isset($GLOBALS["shariff3UU"]["add_before_all_posts"])) echo checked( $GLOBALS["shariff3UU"]["add_before_all_posts"], 1, 0 );
|
288 |
echo " value='1'>";
|
289 |
}
|
290 |
|
291 |
function shariff3UU_checkbox_add_before_all_pages_render(){
|
292 |
echo "<input type='checkbox' name='shariff3UU[add_before_all_pages]' ";
|
293 |
+
if(isset($GLOBALS["shariff3UU"]["add_before_all_pages"])) echo checked( $GLOBALS["shariff3UU"]["add_before_all_pages"], 1, 0 );
|
294 |
+
echo " value='1'>";
|
295 |
+
}
|
296 |
+
|
297 |
+
function shariff3UU_checkbox_add_before_all_overview_render(){
|
298 |
+
echo "<input type='checkbox' name='shariff3UU[add_before_all_overview]' ";
|
299 |
+
if(isset($GLOBALS["shariff3UU"]["add_before_all_overview"])) echo checked( $GLOBALS["shariff3UU"]["add_before_all_overview"], 1, 0 );
|
300 |
echo " value='1'>";
|
301 |
}
|
302 |
|
303 |
function shariff3UU_select_language_render(){
|
304 |
+
$options = $GLOBALS["shariff3UU"]; if(!isset($options["language"]))$options["language"]='';
|
305 |
echo "<select name='shariff3UU[language]'>
|
306 |
<option value='' ". selected( $options['language'], '', 0 ) .">". __( 'browser selected', 'shariff3UU') ."</option>
|
307 |
<option value='en' ". selected( $options['language'], 'en', 0 ) .">English</option>
|
311 |
}
|
312 |
|
313 |
function shariff3UU_radio_theme_render(){
|
314 |
+
$options = $GLOBALS["shariff3UU"]; if(!isset($options["theme"]))$options["theme"]='';
|
315 |
# $wpurl=site_url();
|
316 |
echo "<table border='0'>
|
317 |
<tr><td><input type='radio' name='shariff3UU[theme]' value='' ". checked( $options['theme'], '',0 ) .">default</td><td><img src='".WP_CONTENT_URL."/plugins/shariff/pictos/defaultBtns.png'></td></tr>
|
318 |
+
<tr><td><input type='radio' name='shariff3UU[theme]' value='color' ". checked( $options['theme'], 'color',0 ) .">color</td><td><img src='".WP_CONTENT_URL."/plugins/shariff/pictos/colorBtns.png'><br></td></tr>
|
319 |
<tr><td><input type='radio' name='shariff3UU[theme]' value='grey' ". checked( $options['theme'], 'grey',0 ) .">grey</td><td><img src='".WP_CONTENT_URL."/plugins/shariff/pictos/greyBtns.png'><br></td></tr>
|
320 |
<tr><td><input type='radio' name='shariff3UU[theme]' value='white' ". checked( $options['theme'], 'white',0 ) .">white</td><td><img src='".WP_CONTENT_URL."/plugins/shariff/pictos/whiteBtns.png'><br></td></tr>
|
321 |
<tr><td><input type='radio' name='shariff3UU[theme]' value='round' ". checked( $options['theme'], 'round',0 ) .">round</td><td><img src='".WP_CONTENT_URL."/plugins/shariff/pictos/roundBtns.png'><br></td></tr>
|
322 |
</table>";
|
323 |
}
|
324 |
|
325 |
+
function shariff3UU_checkbox_buttonsize_render(){
|
326 |
+
echo "<input type='checkbox' name='shariff3UU[buttonsize]' ";
|
327 |
+
if(isset($GLOBALS['shariff3UU']['buttonsize'])) echo checked( $GLOBALS['shariff3UU']['buttonsize'], 1,0 );
|
328 |
+
echo " value='1'><img src='". WP_CONTENT_URL ."/plugins/shariff/pictos/smallBtns.png' align='middle'>";
|
329 |
+
}
|
330 |
+
|
331 |
function shariff3UU_checkbox_vertical_render(){
|
332 |
echo "<input type='checkbox' name='shariff3UU[vertical]' ";
|
333 |
+
if(isset($GLOBALS['shariff3UU']['vertical'])) echo checked( $GLOBALS['shariff3UU']['vertical'], 1,0 );
|
334 |
echo " value='1'><img src='". WP_CONTENT_URL ."/plugins/shariff/pictos/verticalBtns.png' align='top'>";
|
335 |
}
|
336 |
|
337 |
function shariff3UU_text_services_render(){
|
338 |
+
(isset($GLOBALS["shariff3UU"]["services"])) ? $services = $GLOBALS["shariff3UU"]["services"] : $services = '';
|
339 |
echo "<input type='text' name='shariff3UU[services]' value='". esc_html($services) ."' size='50' placeholder='twitter|facebook|googleplus|info'>";
|
340 |
}
|
341 |
|
347 |
// check that PHP version is okay
|
348 |
if (version_compare(PHP_VERSION, '5.4.0') < 1) echo "PHP version 5.4 or better is needed to enable the backend. ";
|
349 |
echo "<input type='checkbox' name='shariff3UU[backend]' ";
|
350 |
+
if(isset($GLOBALS['shariff3UU']['backend'])) echo checked( $GLOBALS['shariff3UU']['backend'], 1,0 );
|
351 |
echo " value='1'>";
|
352 |
}
|
353 |
|
354 |
function shariff3UU_text_info_url_render(){
|
355 |
+
(isset($GLOBALS['shariff3UU']['info_url'])) ? $info_url = $GLOBALS['shariff3UU']['info_url'] : $info_url = '';
|
356 |
echo "<input type='text' name='shariff3UU[info_url]' value='". esc_html($info_url) ."' size='50' placeholder='http://ct.de/-2467514'>";
|
357 |
}
|
358 |
|
359 |
function shariff3UU_text_twittervia_render(){
|
360 |
+
(isset($GLOBALS['shariff3UU']['twitter_via'])) ? $twitter_via = $GLOBALS['shariff3UU']['twitter_via'] : $twitter_via = '';
|
361 |
echo "<input type='text' name='shariff3UU[twitter_via]' value='". $twitter_via ."' size='50' placeholder='screenname'>";
|
362 |
}
|
363 |
|
364 |
function shariff3UU_text_flattruser_render(){
|
365 |
+
(isset($GLOBALS['shariff3UU']['flattruser'])) ? $flattruser = $GLOBALS['shariff3UU']['flattruser'] : $flattruser = '';
|
366 |
echo "<input type='text' name='shariff3UU[flattruser]' value='". $flattruser ."' size='50' placeholder='username'>";
|
367 |
}
|
368 |
|
369 |
function shariff3UU_text_style_render(){
|
370 |
+
(isset($GLOBALS['shariff3UU']['style'])) ? $style = $GLOBALS['shariff3UU']['style'] : $style = '';
|
371 |
echo "<input type='text' name='shariff3UU[style]' value='". esc_html($style) ."' size='50' placeholder='".__( 'please read about it in the FAQ', 'shariff3UU' )."'>";
|
372 |
}
|
373 |
|
374 |
function shariff3UU_radio_align_render(){
|
375 |
+
$options = $GLOBALS["shariff3UU"]; if(!isset($options["align"]))$options["align"]='flex-start';
|
376 |
echo "<table border='0'><tr>
|
377 |
<td><input type='radio' name='shariff3UU[align]' value='flex-start' ". checked( $options['align'], 'flex-start',0 ) .">".__( 'left', 'shariff3UU' )."</td>
|
378 |
<td><input type='radio' name='shariff3UU[align]' value='center' ". checked( $options['align'], 'center',0 ) .">".__( 'center', 'shariff3UU' )."</td>
|
381 |
}
|
382 |
|
383 |
function shariff3UU_radio_align_widget_render(){
|
384 |
+
$options = $GLOBALS["shariff3UU"]; if(!isset($options["align_widget"]))$options["align_widget"]='flex-start';
|
385 |
echo "<table border='0'><tr>
|
386 |
<td><input type='radio' name='shariff3UU[align_widget]' value='flex-start' ". checked( $options['align_widget'], 'flex-start',0 ) .">".__( 'left', 'shariff3UU' )."</td>
|
387 |
<td><input type='radio' name='shariff3UU[align_widget]' value='center' ". checked( $options['align_widget'], 'center',0 ) .">".__( 'center', 'shariff3UU' )."</td>
|
388 |
<td><input type='radio' name='shariff3UU[align_widget]' value='flex-end' ". checked( $options['align_widget'], 'flex-end',0 ) .">".__( 'right', 'shariff3UU' )."</td>
|
389 |
</tr></table>";
|
390 |
}
|
391 |
+
|
392 |
+
function shariff3UU_text_default_pinterest_render(){
|
393 |
+
$options = $GLOBALS["shariff3UU"];
|
394 |
+
if(!isset($options["default_pinterest"]))$options["default_pinterest"]='';
|
395 |
+
echo '<div><input type="text" name="shariff3UU[default_pinterest]" value="'. $options["default_pinterest"] .'" id="image_url" class="regular-text"> <input type="button" name="upload-btn" id="upload-btn" class="button-secondary" value="' . __( 'Choose image', 'shariff3UU' ) . '"></div>';
|
396 |
+
echo '<script type="text/javascript">
|
397 |
+
jQuery(document).ready(function($){
|
398 |
+
$("#upload-btn").click(function(e) {
|
399 |
+
e.preventDefault();
|
400 |
+
var image = wp.media({
|
401 |
+
title: "Choose image",
|
402 |
+
// mutiple: true if you want to upload multiple files at once
|
403 |
+
multiple: false
|
404 |
+
}).open()
|
405 |
+
.on("select", function(e){
|
406 |
+
// This will return the selected image from the Media Uploader, the result is an object
|
407 |
+
var uploaded_image = image.state().get("selection").first();
|
408 |
+
// We convert uploaded_image to a JSON object to make accessing it easier
|
409 |
+
// Output to the console uploaded_image
|
410 |
+
console.log(uploaded_image);
|
411 |
+
var image_url = uploaded_image.toJSON().url;
|
412 |
+
// Let"s assign the url value to the input field
|
413 |
+
$("#image_url").val(image_url);
|
414 |
+
});
|
415 |
+
});
|
416 |
+
});
|
417 |
+
</script>';
|
418 |
+
}
|
419 |
+
|
420 |
function shariff3UU_options_section_callback(){
|
421 |
echo __( 'This configures the default behavior of Shariff for your blog. You can overwrite this in single posts or pages with the options within the <code>[shariff]</code> shorttag.', 'shariff3UU' );
|
422 |
}
|
423 |
|
424 |
function shariff3UU_options_page(){
|
|
|
425 |
/* The <div> with the class "wrap" makes sure that messages are displayed below the title and not above */
|
426 |
+
echo '<div class="wrap"><h2>Shariff ' . $GLOBALS["shariff3UU"]["version"] . '</h2><form action="options.php" method="post">';
|
427 |
+
echo '<input type="hidden" name="shariff3UU[version]" value="'. $GLOBALS["shariff3UU"]["version"] .'">';
|
428 |
settings_fields( 'pluginPage' );
|
429 |
do_settings_sections( 'pluginPage' );
|
430 |
submit_button();
|
452 |
// the shorttag by the sidewide configured options
|
453 |
function buildShariffShorttag(){
|
454 |
// get options
|
455 |
+
$shariff3UU = $GLOBALS["shariff3UU"];
|
456 |
|
457 |
// menu configured option over old constant
|
458 |
+
// however backward compatible to:
|
459 |
// Define it in wp-config.php with the shortcode that should added to all posts. Example:
|
460 |
// define('SHARIFF_ALL_POSTS','[shariff services="facebook|twitter|googleplus" backend="on"]');
|
461 |
// This is a workaround as long as we did not have more options with an own admin page.
|
469 |
if(isset($shariff3UU["vertical"])) if($shariff3UU["vertical"]=='1') $shorttag.=' orientation="vertical"';
|
470 |
// *** theme ***
|
471 |
if(!empty($shariff3UU["theme"])) $shorttag.=' theme="'.$shariff3UU["theme"].'"';
|
472 |
+
// *** buttonsize ***
|
473 |
+
if(isset($shariff3UU["buttonsize"])) if($shariff3UU["buttonsize"]=='1') $shorttag.=' buttonsize="small"';
|
474 |
// *** lang ***
|
475 |
if(!empty($shariff3UU["language"])) $shorttag.=' lang="'.$shariff3UU["language"].'"';
|
476 |
//*** services ***
|
496 |
|
497 |
// add mail from if view=mail
|
498 |
function sharif3UUaddMailForm($content){
|
499 |
+
if(WP_DEBUG==TRUE)echo 'WP_DEBUG-rtz: aktueller Warte-Count ist: '.limitRemoteUser().' sec. >5 wirft Fehler.';
|
500 |
+
// Sprache setzen. Default DE
|
501 |
+
$lang='DE';
|
502 |
+
// falls wir eine im Backend gesetzte Sprache haben
|
503 |
+
if(isset($GLOBALS["shariff3UU"]["language"]) && $GLOBALS["shariff3UU"]["language"]=='en')$lang='EN';
|
504 |
+
// sonst per GeoIP reinziehen
|
505 |
+
else switch(@geoip_country_code_by_name($_SERVER[REMOTE_ADDR])){case 'DE': $lang='DE'; break; case 'AT': $lang='DE'; break; case 'CH': $lang='DE'; break; default: $lang='EN';}
|
506 |
+
|
507 |
+
$mf_headline['DE'] ='Diesen Beitrag per E-Mail versenden:';
|
508 |
+
$mf_headline['EN'] ='Send this page by email';
|
509 |
+
$mf_rcpt['DE'] ='E-Mail-Adresse(n) Empfänger (maximal 5)';
|
510 |
+
$mf_rcpt['EN'] ='Email address of the recipient (max 5) ';
|
511 |
+
$mf_from['DE'] ='E-Mail-Adresse des Absenders';
|
512 |
+
$mf_from['EN'] ='Email of the sender';
|
513 |
+
$mf_name['DE'] ='Name des Absenders (optional)';
|
514 |
+
$mf_name['EN'] ='Name of the sender (optional)';
|
515 |
+
$mf_comment['DE'] ='Zusatztext';
|
516 |
+
$mf_comment['EN'] ='additional text';
|
517 |
+
|
518 |
+
$mailform='<form action="'.get_permalink().'" method="GET">';
|
519 |
+
$mailform.='<input type="hidden" name="act" value="sendMail">';
|
520 |
+
$mailform.='<div id="mail_formular" style="background: none repeat scroll 0% 0% #EEE; font-size: 90%; padding: 0.2em 1em;">';
|
521 |
+
$mailform.='<p><strong>'.$mf_headline[$lang].'</strong></p>';
|
522 |
+
$mailform.='<p><em>'.$mf_rcpt[$lang].'</em><br /><input type="email" name="mailto" value="" placeholder="to@example.com"></p>';
|
523 |
+
$mailform.='<p><em>'.$mf_from[$lang].'</em><br /><input type="email" name="from" value="" placeholder="from@example.com"></p>';
|
524 |
+
$mailform.='<p><em>'.$mf_name[$lang].'</em><br /><input type="text" name="sender" value="" placeholder="Your Name"></p>';
|
525 |
+
$mailform.='<p><em>'.$mf_comment[$lang].'</em><br /><textarea name="mail_comment" rows="2" cols="45"></textarea></p>';
|
526 |
+
$mailform.='<p><input type="submit" value="E-Mail abschicken" /></p>';
|
527 |
+
if($lang=='DE') $mailform.='<p>Die hier eingegebenen Daten werden nur dazu verwendet, die E-Mail in Ihrem Namen zu versenden. Es erfolgt keine Weitergabe an Dritte oder eine Analyse zu Marketing-Zwecken.</p>';
|
528 |
+
$mailform.='</form></div>';
|
529 |
+
return $mailform.$content;
|
530 |
+
}
|
531 |
+
|
532 |
+
// send mail
|
533 |
+
function sharif3UUprocSentMail(){
|
534 |
+
// Der Zusatztext darf keine Links enthalten, sonst zu verlockend fuer Spamer
|
535 |
+
// optional robinson einbauen
|
536 |
+
// optional auf eingeloggte User beschraenken, dann aber auch nicht allgemein anzeigen
|
537 |
+
|
538 |
+
$wait=limitRemoteUser('5');
|
539 |
+
if($wait > '5'){ echo 'Please wait '. $wait .' sec until your next mail. '; die('Ooops!!!'); }
|
540 |
+
|
541 |
+
// build the array with recipients
|
542 |
+
$arr=explode(',',$_REQUEST["mailto"]);
|
543 |
+
if($arr==FALSE)$arr=array($_REQUEST["mailto"]);
|
544 |
+
// max 5
|
545 |
+
for($i=0;$i<count($arr);$i++){
|
546 |
+
if($i=='4') break;
|
547 |
+
$mailto[]=sanitize_email($arr[$i]);
|
548 |
+
}
|
549 |
+
|
550 |
+
$subject='Shariff share '.get_permalink();
|
551 |
+
$message="Jemand moechte Dir die Seite \r\n";
|
552 |
+
$message.=get_permalink();
|
553 |
+
$message.="\r\nempfehlen.\r\n\r\n";
|
554 |
+
$message.=$_REQUEST['mail_comment'];
|
555 |
+
$message.="\r\n-- \r\nDu erhaelst diese Email, weil der Betreiber der Seite das \r\n";
|
556 |
+
$message.="Plugin Shariff Wrapper auf seinem Blog aktiviert hat. Es wurde \r\n";
|
557 |
+
$message.="entwickelt, um eine weitgehendst anonyme Nutzung der Seite zu erlauben. \r\n";
|
558 |
+
$message.="Der Seitenbetreiber hat daher auch keine Moeglichkeit, naehere \r\n";
|
559 |
+
$message.="Informationen zum tatsaechlen Absender dieser Email zu geben. ";
|
560 |
+
# $message.="Du kannst Dich aber selbst auf eine Robinson-Liste setzen \r\n";
|
561 |
+
# $message.="und wirst dann nie wieder Emails von diesem Plugin auf dem Blog erhalten.";
|
562 |
+
|
563 |
// falls mail uebergeben, setze als return-path
|
564 |
+
if(isset($_REQUEST["from"])) $headers="Reply-To: <".sanitize_email($_REQUEST["from"]).">\r\n";
|
565 |
+
|
566 |
+
echo '<b>'.$subject.'</b><br>';
|
567 |
+
echo nl2br("$message").'<br>';
|
568 |
+
#echo $headers.'<br>';
|
569 |
+
|
570 |
+
if(empty($mailto['0'])) echo ('Ooops, no usuable email address found.');
|
571 |
+
else wp_mail( $mailto, $subject, $message, $headers); // The function is available after the hook 'plugins_loaded'.
|
572 |
}
|
573 |
|
574 |
+
// set a timeout until new mails are possible
|
575 |
+
function limitRemoteUser($wait='1'){
|
576 |
+
global $shariff3UU;
|
577 |
+
|
578 |
+
//rtzrtz: aumgeschiebene aus dem DOS-Blocker. Nochmal gruebeln, ob wir das ohne memcache mit der Performance schaffen. Daher auch nur Grundfunktionalitaet.
|
579 |
+
|
580 |
+
if(!isset($shariff3UU['REMOTEHOSTS'])) $shariff3UU['REMOTEHOSTS']='';
|
581 |
+
$HOSTS=json_decode($shariff3UU['REMOTEHOSTS'],true);
|
582 |
+
// Wartezeit in sekunden
|
583 |
+
// $wait=1;
|
584 |
+
if($HOSTS[$_SERVER['REMOTE_ADDR']]-time()+$wait > 0){ if($HOSTS[$_SERVER['REMOTE_ADDR']]-time() < 86400) $wait=($HOSTS[$_SERVER['REMOTE_ADDR']]-time()+$wait)*2; }
|
585 |
+
$HOSTS[$_SERVER['REMOTE_ADDR']]=time()+$wait;
|
586 |
+
// Etwas Muellentsorgung
|
587 |
+
if(count($HOSTS)%10 == 0 ){ while (list($key, $value) = each($HOSTS)){ if($value-time()+$wait < 0) { unset($HOSTS[$key]); update_option( 'shariff3UU', $shariff3UU ); } } }
|
588 |
+
$REMOTEHOSTS=json_encode($HOSTS);
|
589 |
+
$shariff3UU['REMOTEHOSTS']=$REMOTEHOSTS;
|
590 |
+
// update nur, wenn wir nicht unter heftigen DOS liegen
|
591 |
+
if($HOSTS[$_SERVER['REMOTE_ADDR']]-time() < '60') update_option( 'shariff3UU', $shariff3UU );
|
592 |
+
return $HOSTS[$_SERVER['REMOTE_ADDR']]-time();
|
593 |
+
}
|
594 |
|
595 |
+
// add shorttag to posts
|
596 |
function shariffPosts($content) {
|
597 |
+
$shariff3UU = $GLOBALS["shariff3UU"];
|
598 |
+
|
599 |
+
// prepend the mail form
|
600 |
+
if(isset($_REQUEST['view']) && $_REQUEST['view']=='mail')$content=sharif3UUaddMailForm($content);
|
601 |
+
if(isset($_REQUEST['act']) && $_REQUEST['act']=='sendMail') sharif3UUprocSentMail();
|
602 |
|
603 |
// conditional to make it functional compatible to the hack in yanniks plugin
|
604 |
// if we want see it as text - replace the slash
|
611 |
return $content;
|
612 |
}
|
613 |
|
|
|
|
|
|
|
|
|
|
|
|
|
614 |
// now add Shariff
|
615 |
if( !is_singular() ) {
|
616 |
// auf der Uebersichtsseite
|
617 |
+
if(isset($shariff3UU["add_before_all_overview"])) if($shariff3UU["add_before_all_overview"]=='1') $content=buildShariffShorttag().$content;
|
618 |
+
if(isset($shariff3UU["add_after_all_overview"])) if($shariff3UU["add_after_all_overview"]=='1') $content.=buildShariffShorttag();
|
619 |
+
// einzelner Beitrag
|
620 |
}elseif( is_singular( 'post' ) ){
|
621 |
+
if(isset($shariff3UU["add_before_all_posts"]) && $shariff3UU["add_before_all_posts"]=='1' ) $content=buildShariffShorttag().$content;
|
622 |
+
if(isset($shariff3UU["add_after_all_posts"]) && $shariff3UU["add_after_all_posts"]=='1' ) $content.=buildShariffShorttag();
|
623 |
+
// Seite
|
|
|
624 |
} elseif ( is_singular( 'page' ) ) {
|
625 |
+
if(isset($shariff3UU["add_before_all_pages"]) && $shariff3UU["add_before_all_pages"]=='1' ) $content=buildShariffShorttag().$content;
|
626 |
+
if(isset($shariff3UU["add_after_all_pages"]) && $shariff3UU["add_after_all_pages"]=='1' ) $content.=buildShariffShorttag();
|
627 |
+
} else {
|
628 |
+
// alle custom_post_types holen
|
629 |
+
$all_custom_post_types = get_post_types( array ( '_builtin' => FALSE ) );
|
630 |
+
if ( is_array($all_custom_post_types) ){
|
631 |
+
$custom_types = array_keys( $all_custom_post_types );
|
632 |
+
// type der aktuellen seite
|
633 |
+
$current_post_type = get_post_type();
|
634 |
+
// falls custom types auch gesharifft werden sollen
|
635 |
+
if(in_array( $current_post_type, $custom_types ) && isset($shariff3UU["add_after_all_custom_type"]) && $shariff3UU["add_after_all_custom_type"]=='1' ) $content.=buildShariffShorttag();
|
636 |
+
}
|
637 |
}
|
638 |
|
639 |
// altes verhalten
|
641 |
|
642 |
return $content;
|
643 |
}
|
644 |
+
add_filter('the_content', 'shariffPosts');
|
645 |
|
646 |
// add the align-style option to the css file
|
647 |
function shariff3UU_align_styles() {
|
648 |
+
$shariff3UU = $GLOBALS["shariff3UU"];
|
649 |
$custom_css = '';
|
650 |
wp_enqueue_style('shariffcss', plugins_url('/shariff.min.local.css',__FILE__));
|
651 |
|
679 |
|
680 |
// Render the shorttag to the HTML shorttag of Shariff
|
681 |
function RenderShariff( $atts , $content = null) {
|
682 |
+
// get options
|
683 |
+
$shariff3UU = $GLOBALS["shariff3UU"];
|
|
|
|
|
684 |
|
685 |
+
// avoid errors if no attributes are given - use the old set of services to make it backward compatible
|
686 |
+
if(empty($shariff3UU["services"]))$shariff3UU["services"]="twitter|facebook|googleplus|info";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
687 |
|
688 |
+
// use the backend option for every option that is not set in the shorttag
|
689 |
+
$backend_options = $shariff3UU;
|
690 |
+
if(isset($shariff3UU["vertical"])) if($shariff3UU["vertical"]=='1') $backend_options["orientation"]='vertical';
|
691 |
+
if(isset($shariff3UU["backend"])) if($shariff3UU["backend"]=='1') $backend_options["backend"]='on';
|
692 |
+
if(isset($shariff3UU["buttonsize"])) if($shariff3UU["buttonsize"]=='1') $backend_options["buttonsize"]='small';
|
693 |
+
if ( empty($atts) ) $atts = $backend_options;
|
694 |
+
else $atts = array_merge($backend_options,$atts);
|
|
|
695 |
|
696 |
+
// remove empty elements (no need to write data-something="" to html)
|
697 |
+
$atts = array_filter($atts);
|
698 |
+
|
699 |
// make sure that use default WP jquery is loaded
|
700 |
wp_enqueue_script('jquery');
|
701 |
+
|
702 |
// the JS must be loaded at footer. Make sure that wp_footer() is present in yout theme!
|
703 |
wp_enqueue_script('shariffjs', plugins_url('/shariff.js',__FILE__),'','',true);
|
704 |
|
723 |
if(array_key_exists('theme', $atts)) $output.=" data-theme='". esc_html($atts['theme'])."'";
|
724 |
// rtzTodo: use geoip if possible
|
725 |
if(array_key_exists('lang', $atts)) $output.=" data-lang='". esc_html($atts['lang'])."'";
|
|
|
|
|
726 |
if(array_key_exists('twitter_via', $atts)) $output.=" data-twitter-via='". esc_html($atts['twitter_via'])."'";
|
727 |
if(array_key_exists('flattruser', $atts)) $output.=" data-flattruser='". esc_html($atts['flattruser'])."'";
|
728 |
+
if(array_key_exists('buttonsize', $atts)) $output.=" data-buttonsize='". esc_html($atts['buttonsize'])."'";
|
729 |
+
|
730 |
|
731 |
// if services are set do only use this
|
732 |
if(array_key_exists('services', $atts)){
|
748 |
$output.=']\'';
|
749 |
}
|
750 |
|
751 |
+
// get image for pinterest (attribut -> featured image -> first image -> default image -> shariff hint)
|
752 |
+
// Die Verschachtelung ist Absicht, um möglichst wenige Aufrufe zu verursachen.
|
753 |
+
if (array_key_exists('services', $atts)) if (strstr($atts["services"], 'pinterest')) {
|
754 |
+
if (array_key_exists('media', $atts)) $output .= " data-media='" . esc_html($atts['media']) . "'";
|
755 |
+
else {
|
756 |
+
$feat_image = wp_get_attachment_url( get_post_thumbnail_id() );
|
757 |
+
if (!empty($feat_image)) $output .= " data-media='" . esc_html($feat_image) . "'";
|
758 |
+
else {
|
759 |
+
$first_image = catch_image();
|
760 |
+
if (!empty($first_image)) $output .= " data-media='" . esc_html($first_image) . "'";
|
761 |
+
else {
|
762 |
+
if(isset($shariff3UU["default_pinterest"])) $output .= " data-media='" . $shariff3UU["default_pinterest"] . "'";
|
763 |
+
else $output .= " data-media='" . plugins_url('/pictos/defaultHint.jpg',__FILE__) . "'";
|
764 |
+
}
|
765 |
+
}
|
766 |
+
}
|
767 |
+
}
|
768 |
|
769 |
// enable share statistic request
|
770 |
// Make sure u have set the domain of the blog in shariff/backend/shariff.json
|
782 |
return $output;
|
783 |
}
|
784 |
|
785 |
+
/* helper function to get the first image */
|
786 |
+
function catch_image() {
|
787 |
+
$files = get_children('post_parent='.get_the_ID().'&post_type=attachment&post_mime_type=image');
|
788 |
+
if($files) {
|
789 |
+
$keys = array_reverse(array_keys($files));
|
790 |
+
$num = $keys[0];
|
791 |
+
$imageurl = wp_get_attachment_url($num);
|
792 |
+
return $imageurl;
|
793 |
+
}
|
794 |
+
}
|
795 |
+
|
796 |
// Widget
|
797 |
class ShariffWidget extends WP_Widget {
|
798 |
public function __construct() {
|
845 |
// draw widget
|
846 |
public function widget($args, $instance) {
|
847 |
extract($args);
|
848 |
+
// get options
|
849 |
+
$shariff3UU = $GLOBALS["shariff3UU"];
|
850 |
// Container
|
851 |
echo $before_widget;
|
852 |
// print title
|
853 |
$title = (empty($instance['shariff-title'])) ? '' : apply_filters('shariff-title', $instance['shariff-title']);
|
854 |
if(!empty($title)) { echo $before_title . $title . $after_title; }
|
855 |
+
|
856 |
// print shorttag
|
857 |
// if is not configured, use the global options from admin menu
|
858 |
if ($instance['shariff-tag']=='[shariff]') $shorttag=buildShariffShorttag();
|
859 |
else $shorttag=$instance['shariff-tag'];
|
860 |
+
|
861 |
// set url to current page to prevent sharing the first or last post on pages with multiple posts e.g. the overview page
|
862 |
$wpurl = get_bloginfo('wpurl');
|
863 |
$siteurl = get_bloginfo('url');
|
873 |
$wp_title = wp_title( '', false);
|
874 |
if(!empty($wp_title)) $page_title = ltrim($wp_title); // wp_title for all pages that have it
|
875 |
else $page_title = get_bloginfo('name'); // the site name for static start pages where wp_title is not set
|
876 |
+
|
877 |
+
// same for media
|
878 |
+
$media = '';
|
879 |
+
if (array_key_exists('services', $shariff3UU) && strstr($shariff3UU["services"], 'pinterest') && (strpos($shorttag,'media=') === false )) {
|
880 |
+
$feat_image = wp_get_attachment_url( get_post_thumbnail_id() );
|
881 |
+
if (!empty($feat_image)) $media = ' media="' . esc_html($feat_image) . '"';
|
882 |
+
else {
|
883 |
+
$first_image = catch_image();
|
884 |
+
if (!empty($first_image)) $media = ' media="' . esc_html($first_image) . '"';
|
885 |
+
else {
|
886 |
+
if(isset($shariff3UU["default_pinterest"])) $media = ' media="' . $shariff3UU["default_pinterest"] . '"';
|
887 |
+
else $media = ' media="' . plugins_url('/pictos/defaultHint.jpg',__FILE__) . '"';
|
888 |
+
}
|
889 |
+
}
|
890 |
+
}
|
891 |
+
|
892 |
+
// build shorttag
|
893 |
+
$shorttag=substr($shorttag,0,-1) . ' title="' . $page_title . '" url="' . $page_url . '"' . $media . ']'; // add url, title and media to the shorttag
|
894 |
|
895 |
// process the shortcode
|
896 |
echo do_shortcode($shorttag);
|
927 |
|
928 |
/* Display an info notice if flattr is set as a service, but no username is entered */
|
929 |
function shariff3UU_flattr_notice() {
|
930 |
+
if(isset($GLOBALS["shariff3UU"]["services"]) && (strpos($GLOBALS["shariff3UU"]["services"], 'flattr') != false) && empty($GLOBALS["shariff3UU"]["flattruser"]) && current_user_can( 'manage_options' )) {
|
|
|
931 |
echo "<div class='error'><p>" . __('Please check your ', 'shariff3UU') . "<a href='" . get_bloginfo('wpurl') . "/wp-admin/options-general.php?page=shariff3uu'>" . __('Shariff-Settings</a> - Flattr was selected, but no username was provided! Please enter your <strong>Flattr username</strong> in the shariff options!', 'shariff3UU') . "</span></p></div>";
|
932 |
}
|
933 |
}
|
934 |
add_action('admin_notices', 'shariff3UU_flattr_notice');
|
935 |
+
|
936 |
+
/* Clear cache upon deactivation */
|
937 |
+
function shariff3UU_deactivate() {
|
938 |
+
// check for multisite
|
939 |
+
if (is_multisite()) {
|
940 |
+
global $wpdb;
|
941 |
+
$current_blog_id=get_current_blog_id();
|
942 |
+
$blogs = $wpdb->get_results("SELECT blog_id FROM {$wpdb->blogs}", ARRAY_A);
|
943 |
+
if ($blogs) {
|
944 |
+
foreach($blogs as $blog) {
|
945 |
+
// switch to each blog
|
946 |
+
switch_to_blog($blog['blog_id']);
|
947 |
+
// delete cache dir
|
948 |
+
shariff_removecachedir();
|
949 |
+
// switch back to main
|
950 |
+
restore_current_blog();
|
951 |
+
}
|
952 |
+
}
|
953 |
+
} else {
|
954 |
+
// delete cache dir
|
955 |
+
shariff_removecachedir();
|
956 |
+
}
|
957 |
+
}
|
958 |
+
register_deactivation_hook( __FILE__, 'shariff3UU_deactivate' );
|
959 |
+
|
960 |
+
/* Delete cache directory */
|
961 |
+
function shariff_removecachedir(){
|
962 |
+
$upload_dir = wp_upload_dir();
|
963 |
+
$cache_dir = $upload_dir['basedir'].'/1970/01';
|
964 |
+
$cache_dir2 = $upload_dir['basedir'].'/1970';
|
965 |
+
shariff_removefiles( $cache_dir );
|
966 |
+
// Remove /1970/01 and /1970 if they are empty
|
967 |
+
@rmdir($cache_dir);
|
968 |
+
@rmdir($cache_dir2);
|
969 |
+
}
|
970 |
+
|
971 |
+
/* Helper function to delete .dat files that begin with "Shariff" and empty folders that also start with "Shariff" */
|
972 |
+
function shariff_removefiles($directory){
|
973 |
+
foreach(glob("{$directory}/Shariff*") as $file) {
|
974 |
+
if(is_dir($file)) shariff_removefiles($file);
|
975 |
+
else if(substr($file, -4) == '.dat') @unlink($file);
|
976 |
+
}
|
977 |
+
@rmdir($directory);
|
978 |
+
}
|
979 |
?>
|
uninstall.php
CHANGED
@@ -5,11 +5,57 @@
|
|
5 |
if ( !defined( 'WP_UNINSTALL_PLUGIN' ) ) exit();
|
6 |
|
7 |
$option_name = 'shariff3UU';
|
|
|
8 |
|
9 |
-
//
|
10 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
|
12 |
-
|
13 |
-
|
14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
?>
|
5 |
if ( !defined( 'WP_UNINSTALL_PLUGIN' ) ) exit();
|
6 |
|
7 |
$option_name = 'shariff3UU';
|
8 |
+
$widget_name = 'widget_shariff';
|
9 |
|
10 |
+
// check for multisite
|
11 |
+
if (is_multisite()) {
|
12 |
+
global $wpdb;
|
13 |
+
$blogs = $wpdb->get_results("SELECT blog_id FROM {$wpdb->blogs}", ARRAY_A);
|
14 |
+
if ($blogs) {
|
15 |
+
foreach($blogs as $blog) {
|
16 |
+
// switch to each blog
|
17 |
+
switch_to_blog($blog['blog_id']);
|
18 |
+
// delete options from options table
|
19 |
+
delete_option( $option_name );
|
20 |
+
delete_option( $widget_name );
|
21 |
+
// delete user meta entry shariff3UU_ignore_notice
|
22 |
+
$users = get_users('role=administrator');
|
23 |
+
foreach ($users as $user) { if ( !get_user_meta($user, 'shariff3UU_ignore_notice' )) { delete_user_meta($user->ID, 'shariff3UU_ignore_notice'); } };
|
24 |
+
// delete cache dir
|
25 |
+
shariff_removecachedir();
|
26 |
+
// switch back to main
|
27 |
+
restore_current_blog();
|
28 |
+
}
|
29 |
+
}
|
30 |
+
} else {
|
31 |
+
// delete options from options table
|
32 |
+
delete_option( $option_name );
|
33 |
+
delete_option( $version_name );
|
34 |
+
delete_option( $widget_name );
|
35 |
+
// delete user meta entry shariff3UU_ignore_notice
|
36 |
+
$users = get_users('role=administrator');
|
37 |
+
foreach ($users as $user) { if ( !get_user_meta($user, 'shariff3UU_ignore_notice' )) { delete_user_meta($user->ID, 'shariff3UU_ignore_notice'); } };
|
38 |
+
// delete cache dir
|
39 |
+
shariff_removecachedir();
|
40 |
+
}
|
41 |
|
42 |
+
/* Delete cache directory */
|
43 |
+
function shariff_removecachedir(){
|
44 |
+
$upload_dir = wp_upload_dir();
|
45 |
+
$cache_dir = $upload_dir['basedir'].'/1970/01';
|
46 |
+
$cache_dir2 = $upload_dir['basedir'].'/1970';
|
47 |
+
shariff_removefiles( $cache_dir );
|
48 |
+
// Remove /1970/01 and /1970 if they are empty
|
49 |
+
@rmdir($cache_dir);
|
50 |
+
@rmdir($cache_dir2);
|
51 |
+
}
|
52 |
+
|
53 |
+
/* Helper function to delete .dat files that begin with "Shariff" and empty folders that also start with "Shariff" */
|
54 |
+
function shariff_removefiles($directory){
|
55 |
+
foreach(glob("{$directory}/Shariff*") as $file) {
|
56 |
+
if(is_dir($file)) shariff_removefiles($file);
|
57 |
+
else if(substr($file, -4) == '.dat') @unlink($file);
|
58 |
+
}
|
59 |
+
@rmdir($directory);
|
60 |
+
}
|
61 |
?>
|
updates.php
ADDED
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
Would be included by shariff3UU_update() only if needed.
|
4 |
+
Put all update task here and feel free to split files per update
|
5 |
+
but make sure that all "older" updates are checked first.
|
6 |
+
To enable a admin notice plz set
|
7 |
+
$do_admin_notice=true;
|
8 |
+
At least you must set
|
9 |
+
$GLOBALS["shariff3UU"]["version"] = [YOUR VERSION];
|
10 |
+
to avoid includes later on.
|
11 |
+
**/
|
12 |
+
|
13 |
+
// Migration < v 1.7
|
14 |
+
if(empty($GLOBALS["shariff3UU"]["version"]) || ( isset($GLOBALS["shariff3UU"]["version"]) && version_compare($GLOBALS["shariff3UU"]["version"], '1.7') == '-1') ) {
|
15 |
+
if(isset($GLOBALS["shariff3UU"]["add_all"])){
|
16 |
+
if($GLOBALS["shariff3UU"]["add_all"]=='1'){ $GLOBALS["shariff3UU"]["add_after_all_posts"]='1'; $GLOBALS["shariff3UU"]["add_after_all_pages"]='1'; unset($GLOBALS["shariff3UU"]["add_all"]); }
|
17 |
+
}
|
18 |
+
if(isset($GLOBALS["shariff3UU"]["add_before_all"])){
|
19 |
+
if($GLOBALS["shariff3UU"]["add_before_all"]=='1'){ $GLOBALS["shariff3UU"]["add_before_all_posts"]='1'; $GLOBALS["shariff3UU"]["add_before_all_pages"]='1'; unset($GLOBALS["shariff3UU"]["add_before_all"]); }
|
20 |
+
}
|
21 |
+
$GLOBALS["shariff3UU"]["version"] = '1.7';
|
22 |
+
$do_admin_notice=true;
|
23 |
+
}
|
24 |
+
|
25 |
+
// Migration < v 1.9.7
|
26 |
+
if(!isset($wpdb)) { global $wpdb; }
|
27 |
+
if( version_compare($GLOBALS["shariff3UU"]["version"], '1.9.7') == '-1') {
|
28 |
+
// clear wrong entries from the past
|
29 |
+
if (!is_multisite()){ $users = get_users('role=administrator'); foreach ($users as $user) { if ( !get_user_meta($user, 'shariff_ignore_notice' )) { delete_user_meta($user->ID, 'shariff_ignore_notice'); } }
|
30 |
+
}else{
|
31 |
+
$current_blog_id=get_current_blog_id();
|
32 |
+
if($blogs = $wpdb->get_results("SELECT blog_id FROM {$wpdb->blogs}", ARRAY_A)){
|
33 |
+
foreach($blogs as $blog) {
|
34 |
+
// switch to each blog
|
35 |
+
switch_to_blog($blog['blog_id']);
|
36 |
+
// delete user meta entry shariff_ignore_notice
|
37 |
+
$users = get_users('role=administrator');
|
38 |
+
foreach ($users as $user) { if ( !get_user_meta($user, 'shariff_ignore_notice' )) { delete_user_meta($user->ID, 'shariff_ignore_notice'); } }
|
39 |
+
// switch back to main
|
40 |
+
restore_current_blog();
|
41 |
+
}
|
42 |
+
}
|
43 |
+
}
|
44 |
+
$GLOBALS["shariff3UU"]["version"] = '1.9.7';
|
45 |
+
}
|
46 |
+
|
47 |
+
// Migration < v 2.0
|
48 |
+
if( version_compare($GLOBALS["shariff3UU"]["version"], '2.0') == '-1') {
|
49 |
+
// switch service mail to mailto if mailto is not set in services too
|
50 |
+
// services ist bei Erstinstallation leer -> isset() und strpos kann 0 zurückliefern (gefunden an nullter Stelle), was als false verstanden werden würde, daher === notwendig
|
51 |
+
if(isset($GLOBALS["shariff3UU"]["services"]) && strpos($GLOBALS["shariff3UU"]["services"],'mail')!== FALSE && strpos($GLOBALS["shariff3UU"]["services"],'mailto') === FALSE){
|
52 |
+
$GLOBALS["shariff3UU"]["services"]=str_replace('mail', 'mailto', $GLOBALS["shariff3UU"]["services"]);
|
53 |
+
update_option( 'shariff3UU', $GLOBALS["shariff3UU"] );
|
54 |
+
}
|
55 |
+
$GLOBALS["shariff3UU"]["version"] = '2.0.0';
|
56 |
+
}
|
57 |
+
|
58 |
+
?>
|