diff --git a/core/.gitignore b/core/.gitignore deleted file mode 100644 index 91bd4cd..0000000 --- a/core/.gitignore +++ /dev/null @@ -1,16 +0,0 @@ -# SimpleTest breaks with the following files, so avoid adding them. -vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services1-1.php -vendor/symfony/class-loader/Symfony/Component/ClassLoader/Tests/Fixtures/php5.4/traits.php -vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services11.php - -# The resources for the Validator component are not required. -vendor/symfony/validator/Symfony/Component/Validator/Resources - -# Symfony Validator depends on Symfony Translation but only requires the -# TranslatorInterface. Thus, we add only the required interface from Symfony -# Translation by ignoring everything except the interface. -vendor/symfony/translation/Symfony/Component/Translation/* -!vendor/symfony/translation/Symfony/Component/Translation/TranslatorInterface.php - -# PHPUnit provides some binary dependencies that are already available. -vendor/phpunit/phpunit/build/dependencies diff --git a/core/vendor/autoload.php b/core/vendor/autoload.php deleted file mode 100644 index 5111b1b..0000000 --- a/core/vendor/autoload.php +++ /dev/null @@ -1,7 +0,0 @@ - - * Jordi Boggiano - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Composer\Autoload; - -/** - * ClassLoader implements a PSR-0 class loader - * - * See https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md - * - * $loader = new \Composer\Autoload\ClassLoader(); - * - * // register classes with namespaces - * $loader->add('Symfony\Component', __DIR__.'/component'); - * $loader->add('Symfony', __DIR__.'/framework'); - * - * // activate the autoloader - * $loader->register(); - * - * // to enable searching the include path (eg. for PEAR packages) - * $loader->setUseIncludePath(true); - * - * In this example, if you try to use a class in the Symfony\Component - * namespace or one of its children (Symfony\Component\Console for instance), - * the autoloader will first look for the class under the component/ - * directory, and it will then fallback to the framework/ directory if not - * found before giving up. - * - * This class is loosely based on the Symfony UniversalClassLoader. - * - * @author Fabien Potencier - * @author Jordi Boggiano - */ -class ClassLoader -{ - // PSR-4 - private $prefixLengthsPsr4 = array(); - private $prefixDirsPsr4 = array(); - private $fallbackDirsPsr4 = array(); - - // PSR-0 - private $prefixesPsr0 = array(); - private $fallbackDirsPsr0 = array(); - - private $useIncludePath = false; - private $classMap = array(); - - public function getPrefixes() - { - if (!empty($this->prefixesPsr0)) { - return call_user_func_array('array_merge', $this->prefixesPsr0); - } - return array(); - } - - public function getPrefixesPsr4() - { - return $this->prefixDirsPsr4; - } - - public function getFallbackDirs() - { - return $this->fallbackDirsPsr0; - } - - public function getFallbackDirsPsr4() - { - return $this->fallbackDirsPsr4; - } - - public function getClassMap() - { - return $this->classMap; - } - - /** - * @param array $classMap Class to filename map - */ - public function addClassMap(array $classMap) - { - if ($this->classMap) { - $this->classMap = array_merge($this->classMap, $classMap); - } else { - $this->classMap = $classMap; - } - } - - /** - * Registers a set of PSR-0 directories for a given prefix, either - * appending or prepending to the ones previously set for this prefix. - * - * @param string $prefix The prefix - * @param array|string $paths The PSR-0 root directories - * @param bool $prepend Whether to prepend the directories - */ - public function add($prefix, $paths, $prepend = false) - { - if (!$prefix) { - if ($prepend) { - $this->fallbackDirsPsr0 = array_merge( - (array) $paths, - $this->fallbackDirsPsr0 - ); - } else { - $this->fallbackDirsPsr0 = array_merge( - $this->fallbackDirsPsr0, - (array) $paths - ); - } - - return; - } - - $first = $prefix[0]; - if (!isset($this->prefixesPsr0[$first][$prefix])) { - $this->prefixesPsr0[$first][$prefix] = (array) $paths; - - return; - } - if ($prepend) { - $this->prefixesPsr0[$first][$prefix] = array_merge( - (array) $paths, - $this->prefixesPsr0[$first][$prefix] - ); - } else { - $this->prefixesPsr0[$first][$prefix] = array_merge( - $this->prefixesPsr0[$first][$prefix], - (array) $paths - ); - } - } - - /** - * Registers a set of PSR-4 directories for a given namespace, either - * appending or prepending to the ones previously set for this namespace. - * - * @param string $prefix The prefix/namespace, with trailing '\\' - * @param array|string $paths The PSR-0 base directories - * @param bool $prepend Whether to prepend the directories - * - * @throws \InvalidArgumentException - */ - public function addPsr4($prefix, $paths, $prepend = false) - { - if (!$prefix) { - // Register directories for the root namespace. - if ($prepend) { - $this->fallbackDirsPsr4 = array_merge( - (array) $paths, - $this->fallbackDirsPsr4 - ); - } else { - $this->fallbackDirsPsr4 = array_merge( - $this->fallbackDirsPsr4, - (array) $paths - ); - } - } elseif (!isset($this->prefixDirsPsr4[$prefix])) { - // Register directories for a new namespace. - $length = strlen($prefix); - if ('\\' !== $prefix[$length - 1]) { - throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); - } - $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; - $this->prefixDirsPsr4[$prefix] = (array) $paths; - } elseif ($prepend) { - // Prepend directories for an already registered namespace. - $this->prefixDirsPsr4[$prefix] = array_merge( - (array) $paths, - $this->prefixDirsPsr4[$prefix] - ); - } else { - // Append directories for an already registered namespace. - $this->prefixDirsPsr4[$prefix] = array_merge( - $this->prefixDirsPsr4[$prefix], - (array) $paths - ); - } - } - - /** - * Registers a set of PSR-0 directories for a given prefix, - * replacing any others previously set for this prefix. - * - * @param string $prefix The prefix - * @param array|string $paths The PSR-0 base directories - */ - public function set($prefix, $paths) - { - if (!$prefix) { - $this->fallbackDirsPsr0 = (array) $paths; - } else { - $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths; - } - } - - /** - * Registers a set of PSR-4 directories for a given namespace, - * replacing any others previously set for this namespace. - * - * @param string $prefix The prefix/namespace, with trailing '\\' - * @param array|string $paths The PSR-4 base directories - * - * @throws \InvalidArgumentException - */ - public function setPsr4($prefix, $paths) - { - if (!$prefix) { - $this->fallbackDirsPsr4 = (array) $paths; - } else { - $length = strlen($prefix); - if ('\\' !== $prefix[$length - 1]) { - throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); - } - $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; - $this->prefixDirsPsr4[$prefix] = (array) $paths; - } - } - - /** - * Turns on searching the include path for class files. - * - * @param bool $useIncludePath - */ - public function setUseIncludePath($useIncludePath) - { - $this->useIncludePath = $useIncludePath; - } - - /** - * Can be used to check if the autoloader uses the include path to check - * for classes. - * - * @return bool - */ - public function getUseIncludePath() - { - return $this->useIncludePath; - } - - /** - * Registers this instance as an autoloader. - * - * @param bool $prepend Whether to prepend the autoloader or not - */ - public function register($prepend = false) - { - spl_autoload_register(array($this, 'loadClass'), true, $prepend); - } - - /** - * Unregisters this instance as an autoloader. - */ - public function unregister() - { - spl_autoload_unregister(array($this, 'loadClass')); - } - - /** - * Loads the given class or interface. - * - * @param string $class The name of the class - * @return bool|null True if loaded, null otherwise - */ - public function loadClass($class) - { - if ($file = $this->findFile($class)) { - includeFile($file); - - return true; - } - } - - /** - * Finds the path to the file where the class is defined. - * - * @param string $class The name of the class - * - * @return string|false The path if found, false otherwise - */ - public function findFile($class) - { - // work around for PHP 5.3.0 - 5.3.2 https://bugs.php.net/50731 - if ('\\' == $class[0]) { - $class = substr($class, 1); - } - - // class map lookup - if (isset($this->classMap[$class])) { - return $this->classMap[$class]; - } - - $file = $this->findFileWithExtension($class, '.php'); - - // Search for Hack files if we are running on HHVM - if ($file === null && defined('HHVM_VERSION')) { - $file = $this->findFileWithExtension($class, '.hh'); - } - - if ($file === null) { - // Remember that this class does not exist. - return $this->classMap[$class] = false; - } - - return $file; - } - - private function findFileWithExtension($class, $ext) - { - // PSR-4 lookup - $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext; - - $first = $class[0]; - if (isset($this->prefixLengthsPsr4[$first])) { - foreach ($this->prefixLengthsPsr4[$first] as $prefix => $length) { - if (0 === strpos($class, $prefix)) { - foreach ($this->prefixDirsPsr4[$prefix] as $dir) { - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) { - return $file; - } - } - } - } - } - - // PSR-4 fallback dirs - foreach ($this->fallbackDirsPsr4 as $dir) { - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) { - return $file; - } - } - - // PSR-0 lookup - if (false !== $pos = strrpos($class, '\\')) { - // namespaced class name - $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1) - . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR); - } else { - // PEAR-like class name - $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext; - } - - if (isset($this->prefixesPsr0[$first])) { - foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) { - if (0 === strpos($class, $prefix)) { - foreach ($dirs as $dir) { - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { - return $file; - } - } - } - } - } - - // PSR-0 fallback dirs - foreach ($this->fallbackDirsPsr0 as $dir) { - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { - return $file; - } - } - - // PSR-0 include paths. - if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) { - return $file; - } - } -} - -/** - * Scope isolated include. - * - * Prevents access to $this/self from included files. - */ -function includeFile($file) -{ - include $file; -} diff --git a/core/vendor/composer/autoload_classmap.php b/core/vendor/composer/autoload_classmap.php deleted file mode 100644 index 670145c..0000000 --- a/core/vendor/composer/autoload_classmap.php +++ /dev/null @@ -1,402 +0,0 @@ - $vendorDir . '/phpunit/php-file-iterator/File/Iterator.php', - 'File_Iterator_Facade' => $vendorDir . '/phpunit/php-file-iterator/File/Iterator/Facade.php', - 'File_Iterator_Factory' => $vendorDir . '/phpunit/php-file-iterator/File/Iterator/Factory.php', - 'PHPUnit_Exception' => $vendorDir . '/phpunit/phpunit/src/Exception.php', - 'PHPUnit_Extensions_GroupTestSuite' => $vendorDir . '/phpunit/phpunit/src/Extensions/GroupTestSuite.php', - 'PHPUnit_Extensions_PhptTestCase' => $vendorDir . '/phpunit/phpunit/src/Extensions/PhptTestCase.php', - 'PHPUnit_Extensions_PhptTestSuite' => $vendorDir . '/phpunit/phpunit/src/Extensions/PhptTestSuite.php', - 'PHPUnit_Extensions_RepeatedTest' => $vendorDir . '/phpunit/phpunit/src/Extensions/RepeatedTest.php', - 'PHPUnit_Extensions_TestDecorator' => $vendorDir . '/phpunit/phpunit/src/Extensions/TestDecorator.php', - 'PHPUnit_Extensions_TicketListener' => $vendorDir . '/phpunit/phpunit/src/Extensions/TicketListener.php', - 'PHPUnit_Framework_Assert' => $vendorDir . '/phpunit/phpunit/src/Framework/Assert.php', - 'PHPUnit_Framework_AssertionFailedError' => $vendorDir . '/phpunit/phpunit/src/Framework/AssertionFailedError.php', - 'PHPUnit_Framework_BaseTestListener' => $vendorDir . '/phpunit/phpunit/src/Framework/BaseTestListener.php', - 'PHPUnit_Framework_CodeCoverageException' => $vendorDir . '/phpunit/phpunit/src/Framework/CodeCoverageException.php', - 'PHPUnit_Framework_Constraint' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint.php', - 'PHPUnit_Framework_Constraint_And' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/And.php', - 'PHPUnit_Framework_Constraint_ArrayHasKey' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/ArrayHasKey.php', - 'PHPUnit_Framework_Constraint_Attribute' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Attribute.php', - 'PHPUnit_Framework_Constraint_Callback' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Callback.php', - 'PHPUnit_Framework_Constraint_ClassHasAttribute' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/ClassHasAttribute.php', - 'PHPUnit_Framework_Constraint_ClassHasStaticAttribute' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/ClassHasStaticAttribute.php', - 'PHPUnit_Framework_Constraint_Composite' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Composite.php', - 'PHPUnit_Framework_Constraint_Count' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Count.php', - 'PHPUnit_Framework_Constraint_Exception' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Exception.php', - 'PHPUnit_Framework_Constraint_ExceptionCode' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/ExceptionCode.php', - 'PHPUnit_Framework_Constraint_ExceptionMessage' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/ExceptionMessage.php', - 'PHPUnit_Framework_Constraint_FileExists' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/FileExists.php', - 'PHPUnit_Framework_Constraint_GreaterThan' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/GreaterThan.php', - 'PHPUnit_Framework_Constraint_IsAnything' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsAnything.php', - 'PHPUnit_Framework_Constraint_IsEmpty' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsEmpty.php', - 'PHPUnit_Framework_Constraint_IsEqual' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsEqual.php', - 'PHPUnit_Framework_Constraint_IsFalse' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsFalse.php', - 'PHPUnit_Framework_Constraint_IsIdentical' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsIdentical.php', - 'PHPUnit_Framework_Constraint_IsInstanceOf' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsInstanceOf.php', - 'PHPUnit_Framework_Constraint_IsJson' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsJson.php', - 'PHPUnit_Framework_Constraint_IsNull' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsNull.php', - 'PHPUnit_Framework_Constraint_IsTrue' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsTrue.php', - 'PHPUnit_Framework_Constraint_IsType' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsType.php', - 'PHPUnit_Framework_Constraint_JsonMatches' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/JsonMatches.php', - 'PHPUnit_Framework_Constraint_JsonMatches_ErrorMessageProvider' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/JsonMatches/ErrorMessageProvider.php', - 'PHPUnit_Framework_Constraint_LessThan' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/LessThan.php', - 'PHPUnit_Framework_Constraint_Not' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Not.php', - 'PHPUnit_Framework_Constraint_ObjectHasAttribute' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/ObjectHasAttribute.php', - 'PHPUnit_Framework_Constraint_Or' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Or.php', - 'PHPUnit_Framework_Constraint_PCREMatch' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/PCREMatch.php', - 'PHPUnit_Framework_Constraint_SameSize' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/SameSize.php', - 'PHPUnit_Framework_Constraint_StringContains' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/StringContains.php', - 'PHPUnit_Framework_Constraint_StringEndsWith' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/StringEndsWith.php', - 'PHPUnit_Framework_Constraint_StringMatches' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/StringMatches.php', - 'PHPUnit_Framework_Constraint_StringStartsWith' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/StringStartsWith.php', - 'PHPUnit_Framework_Constraint_TraversableContains' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/TraversableContains.php', - 'PHPUnit_Framework_Constraint_TraversableContainsOnly' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/TraversableContainsOnly.php', - 'PHPUnit_Framework_Constraint_Xor' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Xor.php', - 'PHPUnit_Framework_Error' => $vendorDir . '/phpunit/phpunit/src/Framework/Error.php', - 'PHPUnit_Framework_Error_Deprecated' => $vendorDir . '/phpunit/phpunit/src/Framework/Error/Deprecated.php', - 'PHPUnit_Framework_Error_Notice' => $vendorDir . '/phpunit/phpunit/src/Framework/Error/Notice.php', - 'PHPUnit_Framework_Error_Warning' => $vendorDir . '/phpunit/phpunit/src/Framework/Error/Warning.php', - 'PHPUnit_Framework_Exception' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception.php', - 'PHPUnit_Framework_ExpectationFailedException' => $vendorDir . '/phpunit/phpunit/src/Framework/ExpectationFailedException.php', - 'PHPUnit_Framework_IncompleteTest' => $vendorDir . '/phpunit/phpunit/src/Framework/IncompleteTest.php', - 'PHPUnit_Framework_IncompleteTestError' => $vendorDir . '/phpunit/phpunit/src/Framework/IncompleteTestError.php', - 'PHPUnit_Framework_InvalidCoversTargetError' => $vendorDir . '/phpunit/phpunit/src/Framework/InvalidCoversTargetError.php', - 'PHPUnit_Framework_InvalidCoversTargetException' => $vendorDir . '/phpunit/phpunit/src/Framework/InvalidCoversTargetException.php', - 'PHPUnit_Framework_MockObject_BadMethodCallException' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Exception/BadMethodCallException.php', - 'PHPUnit_Framework_MockObject_Builder_Identity' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Identity.php', - 'PHPUnit_Framework_MockObject_Builder_InvocationMocker' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/InvocationMocker.php', - 'PHPUnit_Framework_MockObject_Builder_Match' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Match.php', - 'PHPUnit_Framework_MockObject_Builder_MethodNameMatch' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/MethodNameMatch.php', - 'PHPUnit_Framework_MockObject_Builder_Namespace' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Namespace.php', - 'PHPUnit_Framework_MockObject_Builder_ParametersMatch' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/ParametersMatch.php', - 'PHPUnit_Framework_MockObject_Builder_Stub' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Stub.php', - 'PHPUnit_Framework_MockObject_Exception' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Exception/Exception.php', - 'PHPUnit_Framework_MockObject_Generator' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator.php', - 'PHPUnit_Framework_MockObject_Invocation' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invocation.php', - 'PHPUnit_Framework_MockObject_InvocationMocker' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/InvocationMocker.php', - 'PHPUnit_Framework_MockObject_Invocation_Object' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invocation/Object.php', - 'PHPUnit_Framework_MockObject_Invocation_Static' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invocation/Static.php', - 'PHPUnit_Framework_MockObject_Invokable' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invokable.php', - 'PHPUnit_Framework_MockObject_Matcher' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher.php', - 'PHPUnit_Framework_MockObject_Matcher_AnyInvokedCount' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/AnyInvokedCount.php', - 'PHPUnit_Framework_MockObject_Matcher_AnyParameters' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/AnyParameters.php', - 'PHPUnit_Framework_MockObject_Matcher_Invocation' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/Invocation.php', - 'PHPUnit_Framework_MockObject_Matcher_InvokedAtIndex' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtIndex.php', - 'PHPUnit_Framework_MockObject_Matcher_InvokedAtLeastOnce' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtLeastOnce.php', - 'PHPUnit_Framework_MockObject_Matcher_InvokedCount' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedCount.php', - 'PHPUnit_Framework_MockObject_Matcher_InvokedRecorder' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedRecorder.php', - 'PHPUnit_Framework_MockObject_Matcher_MethodName' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/MethodName.php', - 'PHPUnit_Framework_MockObject_Matcher_Parameters' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/Parameters.php', - 'PHPUnit_Framework_MockObject_Matcher_StatelessInvocation' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/StatelessInvocation.php', - 'PHPUnit_Framework_MockObject_MockBuilder' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/MockBuilder.php', - 'PHPUnit_Framework_MockObject_MockObject' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/MockObject.php', - 'PHPUnit_Framework_MockObject_RuntimeException' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Exception/RuntimeException.php', - 'PHPUnit_Framework_MockObject_Stub' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub.php', - 'PHPUnit_Framework_MockObject_Stub_ConsecutiveCalls' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ConsecutiveCalls.php', - 'PHPUnit_Framework_MockObject_Stub_Exception' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/Exception.php', - 'PHPUnit_Framework_MockObject_Stub_MatcherCollection' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/MatcherCollection.php', - 'PHPUnit_Framework_MockObject_Stub_Return' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/Return.php', - 'PHPUnit_Framework_MockObject_Stub_ReturnArgument' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnArgument.php', - 'PHPUnit_Framework_MockObject_Stub_ReturnCallback' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnCallback.php', - 'PHPUnit_Framework_MockObject_Stub_ReturnSelf' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnSelf.php', - 'PHPUnit_Framework_MockObject_Stub_ReturnValueMap' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnValueMap.php', - 'PHPUnit_Framework_MockObject_Verifiable' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Verifiable.php', - 'PHPUnit_Framework_OutputError' => $vendorDir . '/phpunit/phpunit/src/Framework/OutputError.php', - 'PHPUnit_Framework_RiskyTest' => $vendorDir . '/phpunit/phpunit/src/Framework/RiskyTest.php', - 'PHPUnit_Framework_RiskyTestError' => $vendorDir . '/phpunit/phpunit/src/Framework/RiskyTestError.php', - 'PHPUnit_Framework_SelfDescribing' => $vendorDir . '/phpunit/phpunit/src/Framework/SelfDescribing.php', - 'PHPUnit_Framework_SkippedTest' => $vendorDir . '/phpunit/phpunit/src/Framework/SkippedTest.php', - 'PHPUnit_Framework_SkippedTestError' => $vendorDir . '/phpunit/phpunit/src/Framework/SkippedTestError.php', - 'PHPUnit_Framework_SkippedTestSuiteError' => $vendorDir . '/phpunit/phpunit/src/Framework/SkippedTestSuiteError.php', - 'PHPUnit_Framework_SyntheticError' => $vendorDir . '/phpunit/phpunit/src/Framework/SyntheticError.php', - 'PHPUnit_Framework_Test' => $vendorDir . '/phpunit/phpunit/src/Framework/Test.php', - 'PHPUnit_Framework_TestCase' => $vendorDir . '/phpunit/phpunit/src/Framework/TestCase.php', - 'PHPUnit_Framework_TestFailure' => $vendorDir . '/phpunit/phpunit/src/Framework/TestFailure.php', - 'PHPUnit_Framework_TestListener' => $vendorDir . '/phpunit/phpunit/src/Framework/TestListener.php', - 'PHPUnit_Framework_TestResult' => $vendorDir . '/phpunit/phpunit/src/Framework/TestResult.php', - 'PHPUnit_Framework_TestSuite' => $vendorDir . '/phpunit/phpunit/src/Framework/TestSuite.php', - 'PHPUnit_Framework_TestSuite_DataProvider' => $vendorDir . '/phpunit/phpunit/src/Framework/TestSuite/DataProvider.php', - 'PHPUnit_Framework_UnintentionallyCoveredCodeError' => $vendorDir . '/phpunit/phpunit/src/Framework/UnintentionallyCoveredCodeError.php', - 'PHPUnit_Framework_Warning' => $vendorDir . '/phpunit/phpunit/src/Framework/Warning.php', - 'PHPUnit_Runner_BaseTestRunner' => $vendorDir . '/phpunit/phpunit/src/Runner/BaseTestRunner.php', - 'PHPUnit_Runner_Exception' => $vendorDir . '/phpunit/phpunit/src/Runner/Exception.php', - 'PHPUnit_Runner_Filter_Factory' => $vendorDir . '/phpunit/phpunit/src/Runner/Filter/Factory.php', - 'PHPUnit_Runner_Filter_GroupFilterIterator' => $vendorDir . '/phpunit/phpunit/src/Runner/Filter/Group.php', - 'PHPUnit_Runner_Filter_Group_Exclude' => $vendorDir . '/phpunit/phpunit/src/Runner/Filter/Group/Exclude.php', - 'PHPUnit_Runner_Filter_Group_Include' => $vendorDir . '/phpunit/phpunit/src/Runner/Filter/Group/Include.php', - 'PHPUnit_Runner_Filter_Test' => $vendorDir . '/phpunit/phpunit/src/Runner/Filter/Test.php', - 'PHPUnit_Runner_StandardTestSuiteLoader' => $vendorDir . '/phpunit/phpunit/src/Runner/StandardTestSuiteLoader.php', - 'PHPUnit_Runner_TestSuiteLoader' => $vendorDir . '/phpunit/phpunit/src/Runner/TestSuiteLoader.php', - 'PHPUnit_Runner_Version' => $vendorDir . '/phpunit/phpunit/src/Runner/Version.php', - 'PHPUnit_TextUI_Command' => $vendorDir . '/phpunit/phpunit/src/TextUI/Command.php', - 'PHPUnit_TextUI_ResultPrinter' => $vendorDir . '/phpunit/phpunit/src/TextUI/ResultPrinter.php', - 'PHPUnit_TextUI_TestRunner' => $vendorDir . '/phpunit/phpunit/src/TextUI/TestRunner.php', - 'PHPUnit_Util_Blacklist' => $vendorDir . '/phpunit/phpunit/src/Util/Blacklist.php', - 'PHPUnit_Util_Configuration' => $vendorDir . '/phpunit/phpunit/src/Util/Configuration.php', - 'PHPUnit_Util_DeprecatedFeature' => $vendorDir . '/phpunit/phpunit/src/Util/DeprecatedFeature.php', - 'PHPUnit_Util_DeprecatedFeature_Logger' => $vendorDir . '/phpunit/phpunit/src/Util/DeprecatedFeature/Logger.php', - 'PHPUnit_Util_ErrorHandler' => $vendorDir . '/phpunit/phpunit/src/Util/ErrorHandler.php', - 'PHPUnit_Util_Fileloader' => $vendorDir . '/phpunit/phpunit/src/Util/Fileloader.php', - 'PHPUnit_Util_Filesystem' => $vendorDir . '/phpunit/phpunit/src/Util/Filesystem.php', - 'PHPUnit_Util_Filter' => $vendorDir . '/phpunit/phpunit/src/Util/Filter.php', - 'PHPUnit_Util_Getopt' => $vendorDir . '/phpunit/phpunit/src/Util/Getopt.php', - 'PHPUnit_Util_GlobalState' => $vendorDir . '/phpunit/phpunit/src/Util/GlobalState.php', - 'PHPUnit_Util_InvalidArgumentHelper' => $vendorDir . '/phpunit/phpunit/src/Util/InvalidArgumentHelper.php', - 'PHPUnit_Util_Log_JSON' => $vendorDir . '/phpunit/phpunit/src/Util/Log/JSON.php', - 'PHPUnit_Util_Log_JUnit' => $vendorDir . '/phpunit/phpunit/src/Util/Log/JUnit.php', - 'PHPUnit_Util_Log_TAP' => $vendorDir . '/phpunit/phpunit/src/Util/Log/TAP.php', - 'PHPUnit_Util_PHP' => $vendorDir . '/phpunit/phpunit/src/Util/PHP.php', - 'PHPUnit_Util_PHP_Default' => $vendorDir . '/phpunit/phpunit/src/Util/PHP/Default.php', - 'PHPUnit_Util_PHP_Windows' => $vendorDir . '/phpunit/phpunit/src/Util/PHP/Windows.php', - 'PHPUnit_Util_Printer' => $vendorDir . '/phpunit/phpunit/src/Util/Printer.php', - 'PHPUnit_Util_String' => $vendorDir . '/phpunit/phpunit/src/Util/String.php', - 'PHPUnit_Util_Test' => $vendorDir . '/phpunit/phpunit/src/Util/Test.php', - 'PHPUnit_Util_TestDox_NamePrettifier' => $vendorDir . '/phpunit/phpunit/src/Util/TestDox/NamePrettifier.php', - 'PHPUnit_Util_TestDox_ResultPrinter' => $vendorDir . '/phpunit/phpunit/src/Util/TestDox/ResultPrinter.php', - 'PHPUnit_Util_TestDox_ResultPrinter_HTML' => $vendorDir . '/phpunit/phpunit/src/Util/TestDox/ResultPrinter/HTML.php', - 'PHPUnit_Util_TestDox_ResultPrinter_Text' => $vendorDir . '/phpunit/phpunit/src/Util/TestDox/ResultPrinter/Text.php', - 'PHPUnit_Util_TestSuiteIterator' => $vendorDir . '/phpunit/phpunit/src/Util/TestSuiteIterator.php', - 'PHPUnit_Util_Type' => $vendorDir . '/phpunit/phpunit/src/Util/Type.php', - 'PHPUnit_Util_XML' => $vendorDir . '/phpunit/phpunit/src/Util/XML.php', - 'PHP_CodeCoverage' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage.php', - 'PHP_CodeCoverage_Driver' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Driver.php', - 'PHP_CodeCoverage_Driver_HHVM' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Driver/HHVM.php', - 'PHP_CodeCoverage_Driver_Xdebug' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Driver/Xdebug.php', - 'PHP_CodeCoverage_Exception' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Exception.php', - 'PHP_CodeCoverage_Exception_UnintentionallyCoveredCode' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Exception/UnintentionallyCoveredCode.php', - 'PHP_CodeCoverage_Filter' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Filter.php', - 'PHP_CodeCoverage_Report_Clover' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/Clover.php', - 'PHP_CodeCoverage_Report_Crap4j' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/Crap4j.php', - 'PHP_CodeCoverage_Report_Factory' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/Factory.php', - 'PHP_CodeCoverage_Report_HTML' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML.php', - 'PHP_CodeCoverage_Report_HTML_Renderer' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer.php', - 'PHP_CodeCoverage_Report_HTML_Renderer_Dashboard' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Dashboard.php', - 'PHP_CodeCoverage_Report_HTML_Renderer_Directory' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Directory.php', - 'PHP_CodeCoverage_Report_HTML_Renderer_File' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/File.php', - 'PHP_CodeCoverage_Report_Node' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/Node.php', - 'PHP_CodeCoverage_Report_Node_Directory' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/Node/Directory.php', - 'PHP_CodeCoverage_Report_Node_File' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/Node/File.php', - 'PHP_CodeCoverage_Report_Node_Iterator' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/Node/Iterator.php', - 'PHP_CodeCoverage_Report_PHP' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/PHP.php', - 'PHP_CodeCoverage_Report_Text' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/Text.php', - 'PHP_CodeCoverage_Report_XML' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML.php', - 'PHP_CodeCoverage_Report_XML_Directory' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/Directory.php', - 'PHP_CodeCoverage_Report_XML_File' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/File.php', - 'PHP_CodeCoverage_Report_XML_File_Coverage' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/File/Coverage.php', - 'PHP_CodeCoverage_Report_XML_File_Method' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/File/Method.php', - 'PHP_CodeCoverage_Report_XML_File_Report' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/File/Report.php', - 'PHP_CodeCoverage_Report_XML_File_Unit' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/File/Unit.php', - 'PHP_CodeCoverage_Report_XML_Node' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/Node.php', - 'PHP_CodeCoverage_Report_XML_Project' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/Project.php', - 'PHP_CodeCoverage_Report_XML_Tests' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/Tests.php', - 'PHP_CodeCoverage_Report_XML_Totals' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/Totals.php', - 'PHP_CodeCoverage_Util' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Util.php', - 'PHP_CodeCoverage_Util_InvalidArgumentHelper' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Util/InvalidArgumentHelper.php', - 'PHP_Timer' => $vendorDir . '/phpunit/php-timer/PHP/Timer.php', - 'PHP_Token' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_TokenWithScope' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_TokenWithScopeAndVisibility' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_ABSTRACT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_AMPERSAND' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_AND_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_ARRAY' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_ARRAY_CAST' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_AS' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_AT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_BACKTICK' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_BAD_CHARACTER' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_BOOLEAN_AND' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_BOOLEAN_OR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_BOOL_CAST' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_BREAK' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_CALLABLE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_CARET' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_CASE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_CATCH' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_CHARACTER' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_CLASS' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_CLASS_C' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_CLASS_NAME_CONSTANT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_CLONE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_CLOSE_BRACKET' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_CLOSE_CURLY' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_CLOSE_SQUARE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_CLOSE_TAG' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_COLON' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_COMMA' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_COMMENT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_CONCAT_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_CONST' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_CONSTANT_ENCAPSED_STRING' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_CONTINUE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_CURLY_OPEN' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_DEC' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_DECLARE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_DEFAULT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_DIR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_DIV' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_DIV_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_DNUMBER' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_DO' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_DOC_COMMENT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_DOLLAR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_DOLLAR_OPEN_CURLY_BRACES' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_DOT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_DOUBLE_ARROW' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_DOUBLE_CAST' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_DOUBLE_COLON' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_DOUBLE_QUOTES' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_ECHO' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_ELLIPSIS' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_ELSE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_ELSEIF' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_EMPTY' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_ENCAPSED_AND_WHITESPACE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_ENDDECLARE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_ENDFOR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_ENDFOREACH' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_ENDIF' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_ENDSWITCH' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_ENDWHILE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_END_HEREDOC' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_EVAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_EXCLAMATION_MARK' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_EXIT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_EXTENDS' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_FILE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_FINAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_FINALLY' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_FOR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_FOREACH' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_FUNCTION' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_FUNC_C' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_GLOBAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_GOTO' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_GT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_HALT_COMPILER' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_IF' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_IMPLEMENTS' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_INC' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_INCLUDE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_INCLUDE_ONCE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_INLINE_HTML' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_INSTANCEOF' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_INSTEADOF' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_INTERFACE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_INT_CAST' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_ISSET' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_IS_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_IS_GREATER_OR_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_IS_IDENTICAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_IS_NOT_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_IS_NOT_IDENTICAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_IS_SMALLER_OR_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_Includes' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_LINE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_LIST' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_LNUMBER' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_LOGICAL_AND' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_LOGICAL_OR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_LOGICAL_XOR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_LT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_METHOD_C' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_MINUS' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_MINUS_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_MOD_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_MULT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_MUL_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_NAMESPACE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_NEW' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_NS_C' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_NS_SEPARATOR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_NUM_STRING' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_OBJECT_CAST' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_OBJECT_OPERATOR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_OPEN_BRACKET' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_OPEN_CURLY' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_OPEN_SQUARE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_OPEN_TAG' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_OPEN_TAG_WITH_ECHO' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_OR_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_PAAMAYIM_NEKUDOTAYIM' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_PERCENT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_PIPE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_PLUS' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_PLUS_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_POW' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_POW_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_PRINT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_PRIVATE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_PROTECTED' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_PUBLIC' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_QUESTION_MARK' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_REQUIRE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_REQUIRE_ONCE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_RETURN' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_SEMICOLON' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_SL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_SL_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_SR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_SR_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_START_HEREDOC' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_STATIC' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_STRING' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_STRING_CAST' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_STRING_VARNAME' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_SWITCH' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_Stream' => $vendorDir . '/phpunit/php-token-stream/src/Token/Stream.php', - 'PHP_Token_Stream_CachingFactory' => $vendorDir . '/phpunit/php-token-stream/src/Token/Stream/CachingFactory.php', - 'PHP_Token_THROW' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_TILDE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_TRAIT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_TRAIT_C' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_TRY' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_UNSET' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_UNSET_CAST' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_USE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_VAR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_VARIABLE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_WHILE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_WHITESPACE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_XOR_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_YIELD' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'SebastianBergmann\\Comparator\\ArrayComparator' => $vendorDir . '/sebastian/comparator/src/ArrayComparator.php', - 'SebastianBergmann\\Comparator\\Comparator' => $vendorDir . '/sebastian/comparator/src/Comparator.php', - 'SebastianBergmann\\Comparator\\ComparisonFailure' => $vendorDir . '/sebastian/comparator/src/ComparisonFailure.php', - 'SebastianBergmann\\Comparator\\DOMNodeComparator' => $vendorDir . '/sebastian/comparator/src/DOMNodeComparator.php', - 'SebastianBergmann\\Comparator\\DateTimeComparator' => $vendorDir . '/sebastian/comparator/src/DateTimeComparator.php', - 'SebastianBergmann\\Comparator\\DoubleComparator' => $vendorDir . '/sebastian/comparator/src/DoubleComparator.php', - 'SebastianBergmann\\Comparator\\ExceptionComparator' => $vendorDir . '/sebastian/comparator/src/ExceptionComparator.php', - 'SebastianBergmann\\Comparator\\Factory' => $vendorDir . '/sebastian/comparator/src/Factory.php', - 'SebastianBergmann\\Comparator\\MockObjectComparator' => $vendorDir . '/sebastian/comparator/src/MockObjectComparator.php', - 'SebastianBergmann\\Comparator\\NumericComparator' => $vendorDir . '/sebastian/comparator/src/NumericComparator.php', - 'SebastianBergmann\\Comparator\\ObjectComparator' => $vendorDir . '/sebastian/comparator/src/ObjectComparator.php', - 'SebastianBergmann\\Comparator\\ResourceComparator' => $vendorDir . '/sebastian/comparator/src/ResourceComparator.php', - 'SebastianBergmann\\Comparator\\ScalarComparator' => $vendorDir . '/sebastian/comparator/src/ScalarComparator.php', - 'SebastianBergmann\\Comparator\\SplObjectStorageComparator' => $vendorDir . '/sebastian/comparator/src/SplObjectStorageComparator.php', - 'SebastianBergmann\\Comparator\\TypeComparator' => $vendorDir . '/sebastian/comparator/src/TypeComparator.php', - 'SebastianBergmann\\Diff\\Chunk' => $vendorDir . '/sebastian/diff/src/Chunk.php', - 'SebastianBergmann\\Diff\\Diff' => $vendorDir . '/sebastian/diff/src/Diff.php', - 'SebastianBergmann\\Diff\\Differ' => $vendorDir . '/sebastian/diff/src/Differ.php', - 'SebastianBergmann\\Diff\\LCS\\LongestCommonSubsequence' => $vendorDir . '/sebastian/diff/src/LCS/LongestCommonSubsequence.php', - 'SebastianBergmann\\Diff\\LCS\\MemoryEfficientImplementation' => $vendorDir . '/sebastian/diff/src/LCS/MemoryEfficientLongestCommonSubsequenceImplementation.php', - 'SebastianBergmann\\Diff\\LCS\\TimeEfficientImplementation' => $vendorDir . '/sebastian/diff/src/LCS/TimeEfficientLongestCommonSubsequenceImplementation.php', - 'SebastianBergmann\\Diff\\Line' => $vendorDir . '/sebastian/diff/src/Line.php', - 'SebastianBergmann\\Diff\\Parser' => $vendorDir . '/sebastian/diff/src/Parser.php', - 'SebastianBergmann\\Environment\\Console' => $vendorDir . '/sebastian/environment/src/Console.php', - 'SebastianBergmann\\Environment\\Runtime' => $vendorDir . '/sebastian/environment/src/Runtime.php', - 'SebastianBergmann\\Exporter\\Context' => $vendorDir . '/sebastian/exporter/src/Context.php', - 'SebastianBergmann\\Exporter\\Exception' => $vendorDir . '/sebastian/exporter/src/Exception.php', - 'SebastianBergmann\\Exporter\\Exporter' => $vendorDir . '/sebastian/exporter/src/Exporter.php', - 'SebastianBergmann\\Version' => $vendorDir . '/sebastian/version/src/Version.php', - 'SessionHandlerInterface' => $vendorDir . '/symfony/http-foundation/Symfony/Component/HttpFoundation/Resources/stubs/SessionHandlerInterface.php', - 'Text_Template' => $vendorDir . '/phpunit/php-text-template/Text/Template.php', -); diff --git a/core/vendor/composer/autoload_files.php b/core/vendor/composer/autoload_files.php deleted file mode 100644 index de3bf98..0000000 --- a/core/vendor/composer/autoload_files.php +++ /dev/null @@ -1,11 +0,0 @@ - array($vendorDir . '/mikey179/vfsStream/src/main/php'), - 'Zend\\Stdlib\\' => array($vendorDir . '/zendframework/zend-stdlib'), - 'Zend\\Feed\\' => array($vendorDir . '/zendframework/zend-feed'), - 'Zend\\Escaper\\' => array($vendorDir . '/zendframework/zend-escaper'), - 'Twig_' => array($vendorDir . '/twig/twig/lib'), - 'Symfony\\Component\\Yaml\\' => array($vendorDir . '/symfony/yaml'), - 'Symfony\\Component\\Validator\\' => array($vendorDir . '/symfony/validator'), - 'Symfony\\Component\\Translation\\' => array($vendorDir . '/symfony/translation'), - 'Symfony\\Component\\Serializer\\' => array($vendorDir . '/symfony/serializer'), - 'Symfony\\Component\\Routing\\' => array($vendorDir . '/symfony/routing'), - 'Symfony\\Component\\Process\\' => array($vendorDir . '/symfony/process'), - 'Symfony\\Component\\HttpKernel\\' => array($vendorDir . '/symfony/http-kernel'), - 'Symfony\\Component\\HttpFoundation\\' => array($vendorDir . '/symfony/http-foundation'), - 'Symfony\\Component\\EventDispatcher\\' => array($vendorDir . '/symfony/event-dispatcher'), - 'Symfony\\Component\\DependencyInjection\\' => array($vendorDir . '/symfony/dependency-injection'), - 'Symfony\\Component\\Debug\\' => array($vendorDir . '/symfony/debug'), - 'Symfony\\Component\\CssSelector\\' => array($vendorDir . '/symfony/css-selector'), - 'Symfony\\Component\\ClassLoader\\' => array($vendorDir . '/symfony/class-loader'), - 'Stack' => array($vendorDir . '/stack/builder/src'), - 'Psr\\Log\\' => array($vendorDir . '/psr/log'), - 'Gliph' => array($vendorDir . '/sdboyer/gliph/src'), - 'Egulias\\' => array($vendorDir . '/egulias/email-validator/src'), - 'EasyRdf_' => array($vendorDir . '/easyrdf/easyrdf/lib'), - 'Doctrine\\Instantiator\\' => array($vendorDir . '/doctrine/instantiator/src'), - 'Doctrine\\Common\\Lexer\\' => array($vendorDir . '/doctrine/lexer/lib'), - 'Doctrine\\Common\\Inflector\\' => array($vendorDir . '/doctrine/inflector/lib'), - 'Doctrine\\Common\\Collections\\' => array($vendorDir . '/doctrine/collections/lib'), - 'Doctrine\\Common\\Cache\\' => array($vendorDir . '/doctrine/cache/lib'), - 'Doctrine\\Common\\Annotations\\' => array($vendorDir . '/doctrine/annotations/lib'), - 'Doctrine\\Common\\' => array($vendorDir . '/doctrine/common/lib'), -); diff --git a/core/vendor/composer/autoload_psr4.php b/core/vendor/composer/autoload_psr4.php deleted file mode 100644 index 1b053f1..0000000 --- a/core/vendor/composer/autoload_psr4.php +++ /dev/null @@ -1,17 +0,0 @@ - array($vendorDir . '/symfony-cmf/routing'), - 'React\\Promise\\' => array($vendorDir . '/react/promise/src'), - 'GuzzleHttp\\Stream\\' => array($vendorDir . '/guzzlehttp/streams/src'), - 'GuzzleHttp\\Ring\\' => array($vendorDir . '/guzzlehttp/ringphp/src'), - 'GuzzleHttp\\' => array($vendorDir . '/guzzlehttp/guzzle/src'), - 'Drupal\\Driver\\' => array($baseDir . '/drivers/lib/Drupal/Driver'), - 'Drupal\\Core\\' => array($baseDir . '/core/lib/Drupal/Core'), - 'Drupal\\Component\\' => array($baseDir . '/core/lib/Drupal/Component'), -); diff --git a/core/vendor/composer/autoload_real.php b/core/vendor/composer/autoload_real.php deleted file mode 100644 index f41b172..0000000 --- a/core/vendor/composer/autoload_real.php +++ /dev/null @@ -1,59 +0,0 @@ - $path) { - $loader->set($namespace, $path); - } - - $map = require __DIR__ . '/autoload_psr4.php'; - foreach ($map as $namespace => $path) { - $loader->setPsr4($namespace, $path); - } - - $classMap = require __DIR__ . '/autoload_classmap.php'; - if ($classMap) { - $loader->addClassMap($classMap); - } - - $loader->register(true); - - $includeFiles = require __DIR__ . '/autoload_files.php'; - foreach ($includeFiles as $file) { - composerRequireDrupal8($file); - } - - return $loader; - } -} - -function composerRequireDrupal8($file) -{ - require $file; -} diff --git a/core/vendor/composer/include_paths.php b/core/vendor/composer/include_paths.php deleted file mode 100644 index b43900a..0000000 --- a/core/vendor/composer/include_paths.php +++ /dev/null @@ -1,15 +0,0 @@ -=5.3.2" - }, - "time": "2013-01-12 18:59:04", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-0": { - "Doctrine\\Common\\Lexer\\": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com", - "homepage": "http://www.instaclick.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Johannes M. Schmitt", - "email": "schmittjoh@gmail.com", - "homepage": "https://github.com/schmittjoh", - "role": "Developer of wrapped JMSSerializerBundle" - } - ], - "description": "Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.", - "homepage": "http://www.doctrine-project.org", - "keywords": [ - "lexer", - "parser" - ] - }, - { - "name": "doctrine/inflector", - "version": "v1.0", - "version_normalized": "1.0.0.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/inflector.git", - "reference": "v1.0" - }, - "dist": { - "type": "zip", - "url": "https://github.com/doctrine/inflector/archive/v1.0.zip", - "reference": "v1.0", - "shasum": "" - }, - "require": { - "php": ">=5.3.2" - }, - "time": "2013-01-10 21:49:15", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-0": { - "Doctrine\\Common\\Inflector\\": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com", - "homepage": "http://www.jwage.com/" - }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com", - "homepage": "http://www.instaclick.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Johannes M. Schmitt", - "email": "schmittjoh@gmail.com", - "homepage": "https://github.com/schmittjoh", - "role": "Developer of wrapped JMSSerializerBundle" - } - ], - "description": "Common String Manipulations with regard to casing and singular/plural rules.", - "homepage": "http://www.doctrine-project.org", - "keywords": [ - "inflection", - "pluarlize", - "singuarlize", - "string" - ] - }, - { - "name": "doctrine/collections", - "version": "v1.2", - "version_normalized": "1.2.0.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/collections.git", - "reference": "b99c5c46c87126201899afe88ec490a25eedd6a2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/collections/zipball/b99c5c46c87126201899afe88ec490a25eedd6a2", - "reference": "b99c5c46c87126201899afe88ec490a25eedd6a2", - "shasum": "" - }, - "require": { - "php": ">=5.3.2" - }, - "time": "2014-02-03 23:07:43", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-0": { - "Doctrine\\Common\\Collections\\": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com", - "homepage": "http://www.jwage.com/", - "role": "Creator" - }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com", - "homepage": "http://www.instaclick.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com", - "homepage": "https://github.com/schmittjoh", - "role": "Developer of wrapped JMSSerializerBundle" - } - ], - "description": "Collections Abstraction library", - "homepage": "http://www.doctrine-project.org", - "keywords": [ - "array", - "collections", - "iterator" - ] - }, - { - "name": "doctrine/cache", - "version": "v1.3.1", - "version_normalized": "1.3.1.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/cache.git", - "reference": "cf483685798a72c93bf4206e3dd6358ea07d64e7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/cache/zipball/cf483685798a72c93bf4206e3dd6358ea07d64e7", - "reference": "cf483685798a72c93bf4206e3dd6358ea07d64e7", - "shasum": "" - }, - "require": { - "php": ">=5.3.2" - }, - "conflict": { - "doctrine/common": ">2.2,<2.4" - }, - "require-dev": { - "phpunit/phpunit": ">=3.7", - "satooshi/php-coveralls": "~0.6" - }, - "time": "2014-09-17 14:24:04", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-0": { - "Doctrine\\Common\\Cache\\": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "Caching library offering an object-oriented API for many cache backends", - "homepage": "http://www.doctrine-project.org", - "keywords": [ - "cache", - "caching" - ] - }, - { - "name": "doctrine/annotations", - "version": "v1.2.1", - "version_normalized": "1.2.1.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/annotations.git", - "reference": "6a6bec0670bb6e71a263b08bc1b98ea242928633" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/6a6bec0670bb6e71a263b08bc1b98ea242928633", - "reference": "6a6bec0670bb6e71a263b08bc1b98ea242928633", - "shasum": "" - }, - "require": { - "doctrine/lexer": "1.*", - "php": ">=5.3.2" - }, - "require-dev": { - "doctrine/cache": "1.*", - "phpunit/phpunit": "4.*" - }, - "time": "2014-09-25 16:45:30", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-0": { - "Doctrine\\Common\\Annotations\\": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "Docblock Annotations Parser", - "homepage": "http://www.doctrine-project.org", - "keywords": [ - "annotations", - "docblock", - "parser" - ] - }, - { - "name": "doctrine/common", - "version": "dev-master", - "version_normalized": "9999999-dev", - "source": { - "type": "git", - "url": "https://github.com/doctrine/common.git", - "reference": "a45d110f71c323e29f41eb0696fa230e3fa1b1b5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/common/zipball/a45d110f71c323e29f41eb0696fa230e3fa1b1b5", - "reference": "a45d110f71c323e29f41eb0696fa230e3fa1b1b5", - "shasum": "" - }, - "require": { - "doctrine/annotations": "1.*", - "doctrine/cache": "1.*", - "doctrine/collections": "1.*", - "doctrine/inflector": "1.*", - "doctrine/lexer": "1.*", - "php": ">=5.3.2" - }, - "require-dev": { - "phpunit/phpunit": "~3.7" - }, - "time": "2014-01-12 22:00:08", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.5.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-0": { - "Doctrine\\Common\\": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com", - "homepage": "http://www.jwage.com/", - "role": "Creator" - }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com", - "homepage": "http://www.instaclick.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com", - "homepage": "http://jmsyst.com", - "role": "Developer of wrapped JMSSerializerBundle" - } - ], - "description": "Common Library for Doctrine projects", - "homepage": "http://www.doctrine-project.org", - "keywords": [ - "annotations", - "collections", - "eventmanager", - "persistence", - "spl" - ] - }, - { - "name": "easyrdf/easyrdf", - "version": "0.8.0", - "version_normalized": "0.8.0.0", - "source": { - "type": "git", - "url": "https://github.com/njh/easyrdf.git", - "reference": "3e43ab7274004e9f4192e06b9fc147781e1f85c2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/njh/easyrdf/zipball/3e43ab7274004e9f4192e06b9fc147781e1f85c2", - "reference": "3e43ab7274004e9f4192e06b9fc147781e1f85c2", - "shasum": "" - }, - "require": { - "php": ">=5.2.8" - }, - "replace": { - "njh/easyrdf": "self.version" - }, - "require-dev": { - "phpunit/phpunit": ">=3.5.15", - "sami/sami": "dev-master", - "squizlabs/php_codesniffer": ">=1.4.3" - }, - "suggest": { - "ml/json-ld": "dev-master" - }, - "time": "2013-12-30 22:31:37", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-0": { - "EasyRdf_": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Nicholas Humfrey", - "email": "njh@aelius.com", - "homepage": "http://www.aelius.com/njh/", - "role": "Developer" - } - ], - "description": "EasyRdf is a PHP library designed to make it easy to consume and produce RDF.", - "homepage": "http://www.easyrdf.org/", - "keywords": [ - "Linked Data", - "RDF", - "Semantic Web", - "Turtle", - "rdfa", - "sparql" - ] - }, - { - "name": "react/promise", - "version": "v2.1.0", - "version_normalized": "2.1.0.0", - "source": { - "type": "git", - "url": "https://github.com/reactphp/promise.git", - "reference": "937b04f1b0ee8f6d180e75a0830aac778ca4bcd6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/reactphp/promise/zipball/937b04f1b0ee8f6d180e75a0830aac778ca4bcd6", - "reference": "937b04f1b0ee8f6d180e75a0830aac778ca4bcd6", - "shasum": "" - }, - "require": { - "php": ">=5.4.0" - }, - "time": "2014-10-15 20:05:57", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "React\\Promise\\": "src/" - }, - "files": [ - "src/functions.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jan Sorgalla", - "email": "jsorgalla@googlemail.com" - } - ], - "description": "A lightweight implementation of CommonJS Promises/A for PHP" - }, - { - "name": "guzzlehttp/streams", - "version": "3.0.0", - "version_normalized": "3.0.0.0", - "source": { - "type": "git", - "url": "https://github.com/guzzle/streams.git", - "reference": "47aaa48e27dae43d39fc1cea0ccf0d84ac1a2ba5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/streams/zipball/47aaa48e27dae43d39fc1cea0ccf0d84ac1a2ba5", - "reference": "47aaa48e27dae43d39fc1cea0ccf0d84ac1a2ba5", - "shasum": "" - }, - "require": { - "php": ">=5.4.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.0" - }, - "time": "2014-10-12 19:18:40", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "GuzzleHttp\\Stream\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - } - ], - "description": "Provides a simple abstraction over streams of data", - "homepage": "http://guzzlephp.org/", - "keywords": [ - "Guzzle", - "stream" - ] - }, - { - "name": "mikey179/vfsStream", - "version": "v1.4.0", - "version_normalized": "1.4.0.0", - "source": { - "type": "git", - "url": "https://github.com/mikey179/vfsStream.git", - "reference": "61b12172292cf539685507aa65b076c1530e83c1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/mikey179/vfsStream/zipball/61b12172292cf539685507aa65b076c1530e83c1", - "reference": "61b12172292cf539685507aa65b076c1530e83c1", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.2" - }, - "time": "2014-09-14 10:18:53", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-0": { - "org\\bovigo\\vfs\\": "src/main/php" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD" - ], - "homepage": "http://vfs.bovigo.org/" - }, - { - "name": "phpunit/php-token-stream", - "version": "1.3.0", - "version_normalized": "1.3.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "f8d5d08c56de5cfd592b3340424a81733259a876" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/f8d5d08c56de5cfd592b3340424a81733259a876", - "reference": "f8d5d08c56de5cfd592b3340424a81733259a876", - "shasum": "" - }, - "require": { - "ext-tokenizer": "*", - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.2" - }, - "time": "2014-08-31 06:12:13", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3-dev" - } - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Wrapper around PHP's tokenizer extension.", - "homepage": "https://github.com/sebastianbergmann/php-token-stream/", - "keywords": [ - "tokenizer" - ] - }, - { - "name": "sebastian/version", - "version": "1.0.3", - "version_normalized": "1.0.3.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/version.git", - "reference": "b6e1f0cf6b9e1ec409a0d3e2f2a5fb0998e36b43" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/b6e1f0cf6b9e1ec409a0d3e2f2a5fb0998e36b43", - "reference": "b6e1f0cf6b9e1ec409a0d3e2f2a5fb0998e36b43", - "shasum": "" - }, - "time": "2014-03-07 15:35:33", - "type": "library", - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library that helps with managing the version number of Git-hosted PHP projects", - "homepage": "https://github.com/sebastianbergmann/version" - }, - { - "name": "sebastian/exporter", - "version": "1.0.2", - "version_normalized": "1.0.2.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "c7d59948d6e82818e1bdff7cadb6c34710eb7dc0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/c7d59948d6e82818e1bdff7cadb6c34710eb7dc0", - "reference": "c7d59948d6e82818e1bdff7cadb6c34710eb7dc0", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.0" - }, - "time": "2014-09-10 00:51:36", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - } - ], - "description": "Provides the functionality to export PHP variables for visualization", - "homepage": "http://www.github.com/sebastianbergmann/exporter", - "keywords": [ - "export", - "exporter" - ] - }, - { - "name": "sebastian/diff", - "version": "1.2.0", - "version_normalized": "1.2.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "5843509fed39dee4b356a306401e9dd1a931fec7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/5843509fed39dee4b356a306401e9dd1a931fec7", - "reference": "5843509fed39dee4b356a306401e9dd1a931fec7", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.2" - }, - "time": "2014-08-15 10:29:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2-dev" - } - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Diff implementation", - "homepage": "http://www.github.com/sebastianbergmann/diff", - "keywords": [ - "diff" - ] - }, - { - "name": "sebastian/comparator", - "version": "1.0.1", - "version_normalized": "1.0.1.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "e54a01c0da1b87db3c5a3c4c5277ddf331da4aef" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/e54a01c0da1b87db3c5a3c4c5277ddf331da4aef", - "reference": "e54a01c0da1b87db3c5a3c4c5277ddf331da4aef", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "sebastian/diff": "~1.1", - "sebastian/exporter": "~1.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.1" - }, - "time": "2014-05-11 23:00:21", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides the functionality to compare PHP values for equality", - "homepage": "http://www.github.com/sebastianbergmann/comparator", - "keywords": [ - "comparator", - "compare", - "equality" - ] - }, - { - "name": "phpunit/php-text-template", - "version": "1.2.0", - "version_normalized": "1.2.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "206dfefc0ffe9cebf65c413e3d0e809c82fbf00a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/206dfefc0ffe9cebf65c413e3d0e809c82fbf00a", - "reference": "206dfefc0ffe9cebf65c413e3d0e809c82fbf00a", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "time": "2014-01-30 17:20:04", - "type": "library", - "installation-source": "dist", - "autoload": { - "classmap": [ - "Text/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "" - ], - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "Simple template engine.", - "homepage": "https://github.com/sebastianbergmann/php-text-template/", - "keywords": [ - "template" - ] - }, - { - "name": "doctrine/instantiator", - "version": "1.0.4", - "version_normalized": "1.0.4.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/instantiator.git", - "reference": "f976e5de371104877ebc89bd8fecb0019ed9c119" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/f976e5de371104877ebc89bd8fecb0019ed9c119", - "reference": "f976e5de371104877ebc89bd8fecb0019ed9c119", - "shasum": "" - }, - "require": { - "php": ">=5.3,<8.0-DEV" - }, - "require-dev": { - "athletic/athletic": "~0.1.8", - "ext-pdo": "*", - "ext-phar": "*", - "phpunit/phpunit": "~4.0", - "squizlabs/php_codesniffer": "2.0.*@ALPHA" - }, - "time": "2014-10-13 12:58:55", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-0": { - "Doctrine\\Instantiator\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "http://ocramius.github.com/" - } - ], - "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://github.com/doctrine/instantiator", - "keywords": [ - "constructor", - "instantiate" - ] - }, - { - "name": "phpunit/phpunit-mock-objects", - "version": "dev-master", - "version_normalized": "9999999-dev", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "e60bb929c50ae4237aaf680a4f6773f4ee17f0a2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/96c5b81f9842f38fe6c73ad0020306cc4862a9e3", - "reference": "e60bb929c50ae4237aaf680a4f6773f4ee17f0a2", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "~1.0,>=1.0.2", - "php": ">=5.3.3", - "phpunit/php-text-template": "~1.2" - }, - "require-dev": { - "phpunit/phpunit": "4.4.*@dev" - }, - "suggest": { - "ext-soap": "*" - }, - "time": "2014-10-04 10:04:20", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.4.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "Mock Object library for PHPUnit", - "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", - "keywords": [ - "mock", - "xunit" - ] - }, - { - "name": "phpunit/php-timer", - "version": "1.0.5", - "version_normalized": "1.0.5.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "19689d4354b295ee3d8c54b4f42c3efb69cbc17c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/19689d4354b295ee3d8c54b4f42c3efb69cbc17c", - "reference": "19689d4354b295ee3d8c54b4f42c3efb69cbc17c", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "time": "2013-08-02 07:42:54", - "type": "library", - "installation-source": "dist", - "autoload": { - "classmap": [ - "PHP/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "" - ], - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "Utility class for timing", - "homepage": "https://github.com/sebastianbergmann/php-timer/", - "keywords": [ - "timer" - ] - }, - { - "name": "phpunit/php-file-iterator", - "version": "1.3.4", - "version_normalized": "1.3.4.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "acd690379117b042d1c8af1fafd61bde001bf6bb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/acd690379117b042d1c8af1fafd61bde001bf6bb", - "reference": "acd690379117b042d1c8af1fafd61bde001bf6bb", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "time": "2013-10-10 15:34:57", - "type": "library", - "installation-source": "dist", - "autoload": { - "classmap": [ - "File/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "" - ], - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "FilterIterator implementation that filters files based on a list of suffixes.", - "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", - "keywords": [ - "filesystem", - "iterator" - ] - }, - { - "name": "phpunit/php-code-coverage", - "version": "2.0.11", - "version_normalized": "2.0.11.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "53603b3c995f5aab6b59c8e08c3a663d2cc810b7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/53603b3c995f5aab6b59c8e08c3a663d2cc810b7", - "reference": "53603b3c995f5aab6b59c8e08c3a663d2cc810b7", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "phpunit/php-file-iterator": "~1.3", - "phpunit/php-text-template": "~1.2", - "phpunit/php-token-stream": "~1.3", - "sebastian/environment": "~1.0", - "sebastian/version": "~1.0" - }, - "require-dev": { - "ext-xdebug": ">=2.1.4", - "phpunit/phpunit": "~4.1" - }, - "suggest": { - "ext-dom": "*", - "ext-xdebug": ">=2.2.1", - "ext-xmlwriter": "*" - }, - "time": "2014-08-31 06:33:04", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "" - ], - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", - "homepage": "https://github.com/sebastianbergmann/php-code-coverage", - "keywords": [ - "coverage", - "testing", - "xunit" - ] - }, - { - "name": "phpunit/phpunit", - "version": "4.1.4", - "version_normalized": "4.1.4.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "a71c4842c5fb836d8b200624583b859ec34e8a26" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a71c4842c5fb836d8b200624583b859ec34e8a26", - "reference": "a71c4842c5fb836d8b200624583b859ec34e8a26", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-json": "*", - "ext-pcre": "*", - "ext-reflection": "*", - "ext-spl": "*", - "php": ">=5.3.3", - "phpunit/php-code-coverage": "~2.0", - "phpunit/php-file-iterator": "~1.3.1", - "phpunit/php-text-template": "~1.2", - "phpunit/php-timer": "~1.0.2", - "phpunit/phpunit-mock-objects": "~2.1", - "sebastian/comparator": "~1.0", - "sebastian/diff": "~1.1", - "sebastian/environment": "~1.0", - "sebastian/exporter": "~1.0", - "sebastian/version": "~1.0", - "symfony/yaml": "~2.0" - }, - "suggest": { - "phpunit/php-invoker": "~1.1" - }, - "time": "2014-07-18 07:15:58", - "bin": [ - "phpunit" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.1.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "", - "../../symfony/yaml/" - ], - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "The PHP Unit Testing framework.", - "homepage": "http://www.phpunit.de/", - "keywords": [ - "phpunit", - "testing", - "xunit" - ] - }, - { - "name": "sdboyer/gliph", - "version": "0.1.8", - "version_normalized": "0.1.8.0", - "source": { - "type": "git", - "url": "https://github.com/sdboyer/gliph.git", - "reference": "db9e4b77622f91e2d338cc45f83c2cd0e3cf0e1e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sdboyer/gliph/zipball/db9e4b77622f91e2d338cc45f83c2cd0e3cf0e1e", - "reference": "db9e4b77622f91e2d338cc45f83c2cd0e3cf0e1e", - "shasum": "" - }, - "require": { - "php": ">=5.3" - }, - "require-dev": { - "phpunit/phpunit": "3.7.*", - "satooshi/php-coveralls": "0.6.*" - }, - "time": "2014-08-03 14:34:47", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-0": { - "Gliph": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Sam Boyer", - "email": "tech@samboyer.org" - } - ], - "description": "A graph library for PHP.", - "homepage": "http://github.com/sdboyer/gliph", - "keywords": [ - "gliph", - "graph", - "library", - "php", - "spl" - ] - }, - { - "name": "psr/log", - "version": "1.0.0", - "version_normalized": "1.0.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/log", - "reference": "1.0.0" - }, - "dist": { - "type": "zip", - "url": "https://github.com/php-fig/log/archive/1.0.0.zip", - "reference": "1.0.0", - "shasum": "" - }, - "time": "2012-12-21 11:40:51", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-0": { - "Psr\\Log\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for logging libraries", - "keywords": [ - "log", - "psr", - "psr-3" - ] - }, - { - "name": "stack/builder", - "version": "v1.0.2", - "version_normalized": "1.0.2.0", - "source": { - "type": "git", - "url": "https://github.com/stackphp/builder.git", - "reference": "b4af43e7b7f3f7fac919ff475b29f7c5dc7b23b7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/stackphp/builder/zipball/b4af43e7b7f3f7fac919ff475b29f7c5dc7b23b7", - "reference": "b4af43e7b7f3f7fac919ff475b29f7c5dc7b23b7", - "shasum": "" - }, - "require": { - "php": ">=5.3.0", - "symfony/http-foundation": "~2.1", - "symfony/http-kernel": "~2.1" - }, - "require-dev": { - "silex/silex": "~1.0" - }, - "time": "2014-01-28 19:42:24", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-0": { - "Stack": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Igor Wiedler", - "email": "igor@wiedler.ch", - "homepage": "http://wiedler.ch/igor/" - } - ], - "description": "Builder for stack middlewares based on HttpKernelInterface.", - "keywords": [ - "stack" - ] - }, - { - "name": "symfony-cmf/routing", - "version": "1.3.0", - "version_normalized": "1.3.0.0", - "source": { - "type": "git", - "url": "https://github.com/symfony-cmf/Routing.git", - "reference": "8e87981d72c6930a27585dcd3119f3199f6cb2a6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony-cmf/Routing/zipball/8e87981d72c6930a27585dcd3119f3199f6cb2a6", - "reference": "8e87981d72c6930a27585dcd3119f3199f6cb2a6", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "psr/log": "~1.0", - "symfony/http-kernel": "~2.2", - "symfony/routing": "~2.2" - }, - "require-dev": { - "symfony/config": "~2.2", - "symfony/dependency-injection": "~2.0@stable", - "symfony/event-dispatcher": "~2.1" - }, - "suggest": { - "symfony/event-dispatcher": "DynamicRouter can optionally trigger an event at the start of matching. Minimal version ~2.1" - }, - "time": "2014-10-20 20:55:17", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Cmf\\Component\\Routing\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Symfony CMF Community", - "homepage": "https://github.com/symfony-cmf/Routing/contributors" - } - ], - "description": "Extends the Symfony2 routing component for dynamic routes and chaining several routers", - "homepage": "http://cmf.symfony.com", - "keywords": [ - "database", - "routing" - ] - }, - { - "name": "twig/twig", - "version": "v1.16.2", - "version_normalized": "1.16.2.0", - "source": { - "type": "git", - "url": "https://github.com/fabpot/Twig.git", - "reference": "42f758d9fe2146d1f0470604fc05ee43580873fc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/fabpot/Twig/zipball/42f758d9fe2146d1f0470604fc05ee43580873fc", - "reference": "42f758d9fe2146d1f0470604fc05ee43580873fc", - "shasum": "" - }, - "require": { - "php": ">=5.2.4" - }, - "time": "2014-10-17 12:53:44", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.16-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-0": { - "Twig_": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com", - "homepage": "http://fabien.potencier.org", - "role": "Lead Developer" - }, - { - "name": "Armin Ronacher", - "email": "armin.ronacher@active-4.com", - "role": "Project Founder" - }, - { - "name": "Twig Team", - "homepage": "https://github.com/fabpot/Twig/graphs/contributors", - "role": "Contributors" - } - ], - "description": "Twig, the flexible, fast, and secure template language for PHP", - "homepage": "http://twig.sensiolabs.org", - "keywords": [ - "templating" - ] - }, - { - "name": "zendframework/zend-stdlib", - "version": "2.2.6", - "version_normalized": "2.2.6.0", - "target-dir": "Zend/Stdlib", - "source": { - "type": "git", - "url": "https://github.com/zendframework/Component_ZendStdlib.git", - "reference": "e646729f2274f4552b6a92e38d8e458efe08ebc5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/zendframework/Component_ZendStdlib/zipball/e646729f2274f4552b6a92e38d8e458efe08ebc5", - "reference": "e646729f2274f4552b6a92e38d8e458efe08ebc5", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "suggest": { - "zendframework/zend-eventmanager": "To support aggregate hydrator usage", - "zendframework/zend-servicemanager": "To support hydrator plugin manager usage" - }, - "time": "2014-01-04 13:00:28", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.2-dev", - "dev-develop": "2.3-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-0": { - "Zend\\Stdlib\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "keywords": [ - "stdlib", - "zf2" - ] - }, - { - "name": "zendframework/zend-escaper", - "version": "2.2.6", - "version_normalized": "2.2.6.0", - "target-dir": "Zend/Escaper", - "source": { - "type": "git", - "url": "https://github.com/zendframework/Component_ZendEscaper.git", - "reference": "80abc4bc1f48b9fe8ed603aaa9eebd6e6f30fd0f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/zendframework/Component_ZendEscaper/zipball/80abc4bc1f48b9fe8ed603aaa9eebd6e6f30fd0f", - "reference": "80abc4bc1f48b9fe8ed603aaa9eebd6e6f30fd0f", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "time": "2014-01-04 13:00:13", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.2-dev", - "dev-develop": "2.3-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-0": { - "Zend\\Escaper\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "keywords": [ - "escaper", - "zf2" - ] - }, - { - "name": "zendframework/zend-feed", - "version": "2.2.6", - "version_normalized": "2.2.6.0", - "target-dir": "Zend/Feed", - "source": { - "type": "git", - "url": "https://github.com/zendframework/Component_ZendFeed.git", - "reference": "8acb562d99dd0786d25c990530980d2d92b67b35" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/zendframework/Component_ZendFeed/zipball/8acb562d99dd0786d25c990530980d2d92b67b35", - "reference": "8acb562d99dd0786d25c990530980d2d92b67b35", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "zendframework/zend-escaper": "self.version", - "zendframework/zend-stdlib": "self.version" - }, - "suggest": { - "zendframework/zend-http": "Zend\\Http for PubSubHubbub, and optionally for use with Zend\\Feed\\Reader", - "zendframework/zend-servicemanager": "Zend\\ServiceManager component, for default/recommended ExtensionManager implementations", - "zendframework/zend-validator": "Zend\\Validator component" - }, - "time": "2014-01-04 13:00:14", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.2-dev", - "dev-develop": "2.3-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-0": { - "Zend\\Feed\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "provides functionality for consuming RSS and Atom feeds", - "keywords": [ - "feed", - "zf2" - ] - }, - { - "name": "guzzlehttp/guzzle", - "version": "5.0.3", - "version_normalized": "5.0.3.0", - "source": { - "type": "git", - "url": "https://github.com/guzzle/guzzle.git", - "reference": "6c72627de1d66832e4270e36e56acdb0d1d8f282" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/6c72627de1d66832e4270e36e56acdb0d1d8f282", - "reference": "6c72627de1d66832e4270e36e56acdb0d1d8f282", - "shasum": "" - }, - "require": { - "guzzlehttp/ringphp": "~1.0", - "php": ">=5.4.0" - }, - "require-dev": { - "ext-curl": "*", - "phpunit/phpunit": "~4.0", - "psr/log": "~1.0" - }, - "time": "2014-11-04 07:09:15", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.0-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "GuzzleHttp\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - } - ], - "description": "Guzzle is a PHP HTTP client library and framework for building RESTful web service clients", - "homepage": "http://guzzlephp.org/", - "keywords": [ - "client", - "curl", - "framework", - "http", - "http client", - "rest", - "web service" - ] - }, - { - "name": "egulias/email-validator", - "version": "1.2.5", - "version_normalized": "1.2.5.0", - "source": { - "type": "git", - "url": "https://github.com/egulias/EmailValidator.git", - "reference": "518f80a0ff7c1a35780e7702f4262c8c6f2b807f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/518f80a0ff7c1a35780e7702f4262c8c6f2b807f", - "reference": "518f80a0ff7c1a35780e7702f4262c8c6f2b807f", - "shasum": "" - }, - "require": { - "doctrine/lexer": "~1.0", - "php": ">= 5.3.3" - }, - "require-dev": { - "satooshi/php-coveralls": "dev-master" - }, - "time": "2014-11-06 08:59:44", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-0": { - "Egulias\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Eduardo Gulias Davis" - } - ], - "description": "A library for validating emails", - "homepage": "https://github.com/egulias/EmailValidator", - "keywords": [ - "email", - "validation", - "validator" - ] - }, - { - "name": "sebastian/environment", - "version": "1.2.0", - "version_normalized": "1.2.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "0d9bf79554d2a999da194a60416c15cf461eb67d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/0d9bf79554d2a999da194a60416c15cf461eb67d", - "reference": "0d9bf79554d2a999da194a60416c15cf461eb67d", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.3" - }, - "time": "2014-10-22 06:38:05", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides functionality to handle HHVM/PHP environments", - "homepage": "http://www.github.com/sebastianbergmann/environment", - "keywords": [ - "Xdebug", - "environment", - "hhvm" - ] - }, - { - "name": "guzzlehttp/ringphp", - "version": "1.0.3", - "version_normalized": "1.0.3.0", - "source": { - "type": "git", - "url": "https://github.com/guzzle/RingPHP.git", - "reference": "e7c28f96c5ac12ab0e63412cfc15989756fcb964" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/RingPHP/zipball/e7c28f96c5ac12ab0e63412cfc15989756fcb964", - "reference": "e7c28f96c5ac12ab0e63412cfc15989756fcb964", - "shasum": "" - }, - "require": { - "guzzlehttp/streams": "~3.0", - "php": ">=5.4.0", - "react/promise": "~2.0" - }, - "require-dev": { - "ext-curl": "*", - "phpunit/phpunit": "~4.0" - }, - "suggest": { - "ext-curl": "Guzzle will use specific adapters if cURL is present" - }, - "time": "2014-11-04 07:01:14", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "GuzzleHttp\\Ring\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - } - ] - }, - { - "name": "symfony/class-loader", - "version": "v2.6.1", - "version_normalized": "2.6.1.0", - "target-dir": "Symfony/Component/ClassLoader", - "source": { - "type": "git", - "url": "https://github.com/symfony/ClassLoader.git", - "reference": "ba3300e6d79eb51ca9edf77791bbd0497f6030dc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/ClassLoader/zipball/ba3300e6d79eb51ca9edf77791bbd0497f6030dc", - "reference": "ba3300e6d79eb51ca9edf77791bbd0497f6030dc", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "symfony/finder": "~2.0" - }, - "time": "2014-12-02 20:19:20", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.6-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-0": { - "Symfony\\Component\\ClassLoader\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Symfony ClassLoader Component", - "homepage": "http://symfony.com" - }, - { - "name": "symfony/css-selector", - "version": "v2.6.1", - "version_normalized": "2.6.1.0", - "target-dir": "Symfony/Component/CssSelector", - "source": { - "type": "git", - "url": "https://github.com/symfony/CssSelector.git", - "reference": "93eb315b545b60a908271762fb4bfa1f9954b851" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/CssSelector/zipball/93eb315b545b60a908271762fb4bfa1f9954b851", - "reference": "93eb315b545b60a908271762fb4bfa1f9954b851", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "time": "2014-12-02 20:19:20", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.6-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-0": { - "Symfony\\Component\\CssSelector\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, - { - "name": "Jean-François Simon", - "email": "jeanfrancois.simon@sensiolabs.com" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Symfony CssSelector Component", - "homepage": "http://symfony.com" - }, - { - "name": "symfony/dependency-injection", - "version": "v2.6.1", - "version_normalized": "2.6.1.0", - "target-dir": "Symfony/Component/DependencyInjection", - "source": { - "type": "git", - "url": "https://github.com/symfony/DependencyInjection.git", - "reference": "e2693382ef9456a7c7e382f34f813e4b4332941d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/DependencyInjection/zipball/e2693382ef9456a7c7e382f34f813e4b4332941d", - "reference": "e2693382ef9456a7c7e382f34f813e4b4332941d", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "symfony/config": "~2.2", - "symfony/expression-language": "~2.4", - "symfony/yaml": "~2.0" - }, - "suggest": { - "symfony/config": "", - "symfony/proxy-manager-bridge": "Generate service proxies to lazy load them", - "symfony/yaml": "" - }, - "time": "2014-12-03 09:22:11", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.6-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-0": { - "Symfony\\Component\\DependencyInjection\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Symfony DependencyInjection Component", - "homepage": "http://symfony.com" - }, - { - "name": "symfony/debug", - "version": "v2.6.1", - "version_normalized": "2.6.1.0", - "target-dir": "Symfony/Component/Debug", - "source": { - "type": "git", - "url": "https://github.com/symfony/Debug.git", - "reference": "08b529b4c0aa3e746d187fe2a63f08cb955a3566" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/Debug/zipball/08b529b4c0aa3e746d187fe2a63f08cb955a3566", - "reference": "08b529b4c0aa3e746d187fe2a63f08cb955a3566", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "psr/log": "~1.0" - }, - "require-dev": { - "symfony/http-foundation": "~2.1", - "symfony/http-kernel": "~2.1" - }, - "suggest": { - "symfony/http-foundation": "", - "symfony/http-kernel": "" - }, - "time": "2014-12-02 20:19:20", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.6-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-0": { - "Symfony\\Component\\Debug\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Symfony Debug Component", - "homepage": "http://symfony.com" - }, - { - "name": "symfony/http-foundation", - "version": "v2.6.1", - "version_normalized": "2.6.1.0", - "target-dir": "Symfony/Component/HttpFoundation", - "source": { - "type": "git", - "url": "https://github.com/symfony/HttpFoundation.git", - "reference": "0109221f3cf012bf027768ad3e4236dae1af5332" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/HttpFoundation/zipball/0109221f3cf012bf027768ad3e4236dae1af5332", - "reference": "0109221f3cf012bf027768ad3e4236dae1af5332", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "symfony/expression-language": "~2.4" - }, - "time": "2014-12-02 20:19:20", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.6-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-0": { - "Symfony\\Component\\HttpFoundation\\": "" - }, - "classmap": [ - "Symfony/Component/HttpFoundation/Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Symfony HttpFoundation Component", - "homepage": "http://symfony.com" - }, - { - "name": "symfony/event-dispatcher", - "version": "v2.6.1", - "version_normalized": "2.6.1.0", - "target-dir": "Symfony/Component/EventDispatcher", - "source": { - "type": "git", - "url": "https://github.com/symfony/EventDispatcher.git", - "reference": "720fe9bca893df7ad1b4546649473b5afddf0216" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/720fe9bca893df7ad1b4546649473b5afddf0216", - "reference": "720fe9bca893df7ad1b4546649473b5afddf0216", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "psr/log": "~1.0", - "symfony/config": "~2.0", - "symfony/dependency-injection": "~2.6", - "symfony/expression-language": "~2.6", - "symfony/stopwatch": "~2.2" - }, - "suggest": { - "symfony/dependency-injection": "", - "symfony/http-kernel": "" - }, - "time": "2014-12-02 20:19:20", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.6-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-0": { - "Symfony\\Component\\EventDispatcher\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Symfony EventDispatcher Component", - "homepage": "http://symfony.com" - }, - { - "name": "symfony/http-kernel", - "version": "v2.6.1", - "version_normalized": "2.6.1.0", - "target-dir": "Symfony/Component/HttpKernel", - "source": { - "type": "git", - "url": "https://github.com/symfony/HttpKernel.git", - "reference": "6e911d8a9e1a11c4584ad7b03858afa94e627203" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/HttpKernel/zipball/6e911d8a9e1a11c4584ad7b03858afa94e627203", - "reference": "6e911d8a9e1a11c4584ad7b03858afa94e627203", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "psr/log": "~1.0", - "symfony/debug": "~2.6", - "symfony/event-dispatcher": "~2.5", - "symfony/http-foundation": "~2.5" - }, - "require-dev": { - "symfony/browser-kit": "~2.2", - "symfony/class-loader": "~2.1", - "symfony/config": "~2.0", - "symfony/console": "~2.2", - "symfony/dependency-injection": "~2.0", - "symfony/expression-language": "~2.4", - "symfony/finder": "~2.0", - "symfony/process": "~2.0", - "symfony/routing": "~2.2", - "symfony/stopwatch": "~2.2", - "symfony/templating": "~2.2", - "symfony/translation": "~2.0", - "symfony/var-dumper": "~2.6" - }, - "suggest": { - "symfony/browser-kit": "", - "symfony/class-loader": "", - "symfony/config": "", - "symfony/console": "", - "symfony/dependency-injection": "", - "symfony/finder": "", - "symfony/var-dumper": "" - }, - "time": "2014-12-03 16:40:43", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.6-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-0": { - "Symfony\\Component\\HttpKernel\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Symfony HttpKernel Component", - "homepage": "http://symfony.com" - }, - { - "name": "symfony/routing", - "version": "v2.6.1", - "version_normalized": "2.6.1.0", - "target-dir": "Symfony/Component/Routing", - "source": { - "type": "git", - "url": "https://github.com/symfony/Routing.git", - "reference": "b50c10839e1639fb3a89710f9510b63cc8be54c5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/Routing/zipball/b50c10839e1639fb3a89710f9510b63cc8be54c5", - "reference": "b50c10839e1639fb3a89710f9510b63cc8be54c5", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "doctrine/annotations": "~1.0", - "psr/log": "~1.0", - "symfony/config": "~2.2", - "symfony/expression-language": "~2.4", - "symfony/http-foundation": "~2.3", - "symfony/yaml": "~2.0" - }, - "suggest": { - "doctrine/annotations": "For using the annotation loader", - "symfony/config": "For using the all-in-one router or any loader", - "symfony/expression-language": "For using expression matching", - "symfony/yaml": "For using the YAML loader" - }, - "time": "2014-12-02 20:19:20", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.6-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-0": { - "Symfony\\Component\\Routing\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Symfony Routing Component", - "homepage": "http://symfony.com", - "keywords": [ - "router", - "routing", - "uri", - "url" - ] - }, - { - "name": "symfony/serializer", - "version": "v2.6.1", - "version_normalized": "2.6.1.0", - "target-dir": "Symfony/Component/Serializer", - "source": { - "type": "git", - "url": "https://github.com/symfony/Serializer.git", - "reference": "b527ccecd455fc70a805fb25b81e08eb37f3fc5d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/Serializer/zipball/b527ccecd455fc70a805fb25b81e08eb37f3fc5d", - "reference": "b527ccecd455fc70a805fb25b81e08eb37f3fc5d", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "time": "2014-12-02 20:19:20", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.6-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-0": { - "Symfony\\Component\\Serializer\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Symfony Serializer Component", - "homepage": "http://symfony.com" - }, - { - "name": "symfony/translation", - "version": "v2.6.1", - "version_normalized": "2.6.1.0", - "target-dir": "Symfony/Component/Translation", - "source": { - "type": "git", - "url": "https://github.com/symfony/Translation.git", - "reference": "5b8bf84a43317021849813f556f26dc35968156b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/Translation/zipball/5b8bf84a43317021849813f556f26dc35968156b", - "reference": "5b8bf84a43317021849813f556f26dc35968156b", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "psr/log": "~1.0", - "symfony/config": "~2.0", - "symfony/intl": "~2.3", - "symfony/yaml": "~2.2" - }, - "suggest": { - "psr/log": "To use logging capability in translator", - "symfony/config": "", - "symfony/yaml": "" - }, - "time": "2014-12-02 20:19:20", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.6-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-0": { - "Symfony\\Component\\Translation\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Symfony Translation Component", - "homepage": "http://symfony.com" - }, - { - "name": "symfony/validator", - "version": "v2.6.1", - "version_normalized": "2.6.1.0", - "target-dir": "Symfony/Component/Validator", - "source": { - "type": "git", - "url": "https://github.com/symfony/Validator.git", - "reference": "4583e0321f1bcdad14d93e265eaca1001035b5c4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/Validator/zipball/4583e0321f1bcdad14d93e265eaca1001035b5c4", - "reference": "4583e0321f1bcdad14d93e265eaca1001035b5c4", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "symfony/translation": "~2.0" - }, - "require-dev": { - "doctrine/annotations": "~1.0", - "doctrine/cache": "~1.0", - "egulias/email-validator": "~1.0", - "symfony/config": "~2.2", - "symfony/expression-language": "~2.4", - "symfony/http-foundation": "~2.1", - "symfony/intl": "~2.3", - "symfony/property-access": "~2.2", - "symfony/yaml": "~2.0" - }, - "suggest": { - "doctrine/annotations": "For using the annotation mapping. You will also need doctrine/cache.", - "doctrine/cache": "For using the default cached annotation reader and metadata cache.", - "egulias/email-validator": "Strict (RFC compliant) email validation", - "symfony/config": "", - "symfony/expression-language": "For using the 2.4 Expression validator", - "symfony/http-foundation": "", - "symfony/intl": "", - "symfony/property-access": "For using the 2.4 Validator API", - "symfony/yaml": "" - }, - "time": "2014-12-02 20:19:20", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.6-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-0": { - "Symfony\\Component\\Validator\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Symfony Validator Component", - "homepage": "http://symfony.com" - }, - { - "name": "symfony/yaml", - "version": "v2.6.1", - "version_normalized": "2.6.1.0", - "target-dir": "Symfony/Component/Yaml", - "source": { - "type": "git", - "url": "https://github.com/symfony/Yaml.git", - "reference": "3346fc090a3eb6b53d408db2903b241af51dcb20" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/Yaml/zipball/3346fc090a3eb6b53d408db2903b241af51dcb20", - "reference": "3346fc090a3eb6b53d408db2903b241af51dcb20", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "time": "2014-12-02 20:19:20", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.6-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-0": { - "Symfony\\Component\\Yaml\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Symfony Yaml Component", - "homepage": "http://symfony.com" - }, - { - "name": "symfony/process", - "version": "v2.6.1", - "version_normalized": "2.6.1.0", - "target-dir": "Symfony/Component/Process", - "source": { - "type": "git", - "url": "https://github.com/symfony/Process.git", - "reference": "bf0c9bd625f13b0b0bbe39919225cf145dfb935a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/Process/zipball/bf0c9bd625f13b0b0bbe39919225cf145dfb935a", - "reference": "bf0c9bd625f13b0b0bbe39919225cf145dfb935a", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "time": "2014-12-02 20:19:20", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.6-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-0": { - "Symfony\\Component\\Process\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Symfony Process Component", - "homepage": "http://symfony.com" - } -] diff --git a/core/vendor/doctrine/annotations/.gitignore b/core/vendor/doctrine/annotations/.gitignore deleted file mode 100644 index 164c346..0000000 --- a/core/vendor/doctrine/annotations/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -vendor/ -composer.lock -composer.phar diff --git a/core/vendor/doctrine/annotations/.travis.yml b/core/vendor/doctrine/annotations/.travis.yml deleted file mode 100644 index 7f6c0ef..0000000 --- a/core/vendor/doctrine/annotations/.travis.yml +++ /dev/null @@ -1,11 +0,0 @@ -language: php - -php: - - 5.3 - - 5.4 - - 5.5 - - 5.6 - - hhvm - -before_script: - - composer --prefer-source --dev install diff --git a/core/vendor/doctrine/annotations/LICENSE b/core/vendor/doctrine/annotations/LICENSE deleted file mode 100644 index 5e781fc..0000000 --- a/core/vendor/doctrine/annotations/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2006-2013 Doctrine Project - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/core/vendor/doctrine/annotations/README.md b/core/vendor/doctrine/annotations/README.md deleted file mode 100644 index ebb30e0..0000000 --- a/core/vendor/doctrine/annotations/README.md +++ /dev/null @@ -1,19 +0,0 @@ -# Doctrine Annotations - -[![Build Status](https://travis-ci.org/doctrine/annotations.png?branch=master)](https://travis-ci.org/doctrine/annotations) - -Docblock Annotations Parser library (extracted from [Doctrine Common](https://github.com/doctrine/common)). - -## Changelog - -### v1.2.0 - - * HHVM support - * Allowing dangling comma in annotations - * Excluded annotations are no longer autoloaded - * Importing namespaces also in traits - * Added support for `::class` 5.5-style constant, works also in 5.3 and 5.4 - -### v1.1 - - * Add Exception when ZendOptimizer+ or Opcache is configured to drop comments diff --git a/core/vendor/doctrine/annotations/composer.json b/core/vendor/doctrine/annotations/composer.json deleted file mode 100644 index 1c65f6c..0000000 --- a/core/vendor/doctrine/annotations/composer.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "name": "doctrine/annotations", - "type": "library", - "description": "Docblock Annotations Parser", - "keywords": ["annotations", "docblock", "parser"], - "homepage": "http://www.doctrine-project.org", - "license": "MIT", - "authors": [ - {"name": "Guilherme Blanco", "email": "guilhermeblanco@gmail.com"}, - {"name": "Roman Borschel", "email": "roman@code-factory.org"}, - {"name": "Benjamin Eberlei", "email": "kontakt@beberlei.de"}, - {"name": "Jonathan Wage", "email": "jonwage@gmail.com"}, - {"name": "Johannes Schmitt", "email": "schmittjoh@gmail.com"} - ], - "require": { - "php": ">=5.3.2", - "doctrine/lexer": "1.*" - }, - "require-dev": { - "doctrine/cache": "1.*", - "phpunit/phpunit": "4.*" - }, - "autoload": { - "psr-0": { "Doctrine\\Common\\Annotations\\": "lib/" } - }, - "extra": { - "branch-alias": { - "dev-master": "1.3.x-dev" - } - } -} diff --git a/core/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation.php b/core/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation.php deleted file mode 100644 index a79a0f8..0000000 --- a/core/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation.php +++ /dev/null @@ -1,79 +0,0 @@ -. - */ - -namespace Doctrine\Common\Annotations; - -/** - * Annotations class. - * - * @author Benjamin Eberlei - * @author Guilherme Blanco - * @author Jonathan Wage - * @author Roman Borschel - */ -class Annotation -{ - /** - * Value property. Common among all derived classes. - * - * @var string - */ - public $value; - - /** - * Constructor. - * - * @param array $data Key-value for properties to be defined in this class. - */ - public final function __construct(array $data) - { - foreach ($data as $key => $value) { - $this->$key = $value; - } - } - - /** - * Error handler for unknown property accessor in Annotation class. - * - * @param string $name Unknown property name. - * - * @throws \BadMethodCallException - */ - public function __get($name) - { - throw new \BadMethodCallException( - sprintf("Unknown property '%s' on annotation '%s'.", $name, get_class($this)) - ); - } - - /** - * Error handler for unknown property mutator in Annotation class. - * - * @param string $name Unknown property name. - * @param mixed $value Property value. - * - * @throws \BadMethodCallException - */ - public function __set($name, $value) - { - throw new \BadMethodCallException( - sprintf("Unknown property '%s' on annotation '%s'.", $name, get_class($this)) - ); - } -} diff --git a/core/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Attribute.php b/core/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Attribute.php deleted file mode 100644 index dbef6df..0000000 --- a/core/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Attribute.php +++ /dev/null @@ -1,47 +0,0 @@ -. - */ - -namespace Doctrine\Common\Annotations\Annotation; - -/** - * Annotation that can be used to signal to the parser - * to check the attribute type during the parsing process. - * - * @author Fabio B. Silva - * - * @Annotation - */ -final class Attribute -{ - /** - * @var string - */ - public $name; - - /** - * @var string - */ - public $type; - - /** - * @var boolean - */ - public $required = false; -} diff --git a/core/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Attributes.php b/core/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Attributes.php deleted file mode 100644 index 53134e3..0000000 --- a/core/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Attributes.php +++ /dev/null @@ -1,37 +0,0 @@ -. - */ - -namespace Doctrine\Common\Annotations\Annotation; - -/** - * Annotation that can be used to signal to the parser - * to check the types of all declared attributes during the parsing process. - * - * @author Fabio B. Silva - * - * @Annotation - */ -final class Attributes -{ - /** - * @var array - */ - public $value; -} diff --git a/core/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Enum.php b/core/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Enum.php deleted file mode 100644 index e122a75..0000000 --- a/core/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Enum.php +++ /dev/null @@ -1,84 +0,0 @@ -. - */ - -namespace Doctrine\Common\Annotations\Annotation; - -/** - * Annotation that can be used to signal to the parser - * to check the available values during the parsing process. - * - * @since 2.4 - * @author Fabio B. Silva - * - * @Annotation - * @Attributes({ - * @Attribute("value", required = true, type = "array"), - * @Attribute("literal", required = false, type = "array") - * }) - */ -final class Enum -{ - /** - * @var array - */ - public $value; - - /** - * Literal target declaration. - * - * @var array - */ - public $literal; - - /** - * Annotation constructor. - * - * @param array $values - * - * @throws \InvalidArgumentException - */ - public function __construct(array $values) - { - if ( ! isset($values['literal'])) { - $values['literal'] = array(); - } - - foreach ($values['value'] as $var) { - if( ! is_scalar($var)) { - throw new \InvalidArgumentException(sprintf( - '@Enum supports only scalar values "%s" given.', - is_object($var) ? get_class($var) : gettype($var) - )); - } - } - - foreach ($values['literal'] as $key => $var) { - if( ! in_array($key, $values['value'])) { - throw new \InvalidArgumentException(sprintf( - 'Undefined enumerator value "%s" for literal "%s".', - $key , $var - )); - } - } - - $this->value = $values['value']; - $this->literal = $values['literal']; - } -} diff --git a/core/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/IgnoreAnnotation.php b/core/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/IgnoreAnnotation.php deleted file mode 100644 index 175226a..0000000 --- a/core/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/IgnoreAnnotation.php +++ /dev/null @@ -1,54 +0,0 @@ -. - */ - -namespace Doctrine\Common\Annotations\Annotation; - -/** - * Annotation that can be used to signal to the parser to ignore specific - * annotations during the parsing process. - * - * @Annotation - * @author Johannes M. Schmitt - */ -final class IgnoreAnnotation -{ - /** - * @var array - */ - public $names; - - /** - * Constructor. - * - * @param array $values - * - * @throws \RuntimeException - */ - public function __construct(array $values) - { - if (is_string($values['value'])) { - $values['value'] = array($values['value']); - } - if (!is_array($values['value'])) { - throw new \RuntimeException(sprintf('@IgnoreAnnotation expects either a string name, or an array of strings, but got %s.', json_encode($values['value']))); - } - - $this->names = $values['value']; - } -} diff --git a/core/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Required.php b/core/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Required.php deleted file mode 100644 index d67f960..0000000 --- a/core/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Required.php +++ /dev/null @@ -1,33 +0,0 @@ -. - */ - -namespace Doctrine\Common\Annotations\Annotation; - -/** - * Annotation that can be used to signal to the parser - * to check if that attribute is required during the parsing process. - * - * @author Fabio B. Silva - * - * @Annotation - */ -final class Required -{ -} diff --git a/core/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Target.php b/core/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Target.php deleted file mode 100644 index f6c5445..0000000 --- a/core/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Target.php +++ /dev/null @@ -1,107 +0,0 @@ -. - */ - -namespace Doctrine\Common\Annotations\Annotation; - -/** - * Annotation that can be used to signal to the parser - * to check the annotation target during the parsing process. - * - * @author Fabio B. Silva - * - * @Annotation - */ -final class Target -{ - const TARGET_CLASS = 1; - const TARGET_METHOD = 2; - const TARGET_PROPERTY = 4; - const TARGET_ANNOTATION = 8; - const TARGET_ALL = 15; - - /** - * @var array - */ - private static $map = array( - 'ALL' => self::TARGET_ALL, - 'CLASS' => self::TARGET_CLASS, - 'METHOD' => self::TARGET_METHOD, - 'PROPERTY' => self::TARGET_PROPERTY, - 'ANNOTATION' => self::TARGET_ANNOTATION, - ); - - /** - * @var array - */ - public $value; - - /** - * Targets as bitmask. - * - * @var integer - */ - public $targets; - - /** - * Literal target declaration. - * - * @var integer - */ - public $literal; - - /** - * Annotation constructor. - * - * @param array $values - * - * @throws \InvalidArgumentException - */ - public function __construct(array $values) - { - if (!isset($values['value'])){ - $values['value'] = null; - } - if (is_string($values['value'])){ - $values['value'] = array($values['value']); - } - if (!is_array($values['value'])){ - throw new \InvalidArgumentException( - sprintf('@Target expects either a string value, or an array of strings, "%s" given.', - is_object($values['value']) ? get_class($values['value']) : gettype($values['value']) - ) - ); - } - - $bitmask = 0; - foreach ($values['value'] as $literal) { - if(!isset(self::$map[$literal])){ - throw new \InvalidArgumentException( - sprintf('Invalid Target "%s". Available targets: [%s]', - $literal, implode(', ', array_keys(self::$map))) - ); - } - $bitmask |= self::$map[$literal]; - } - - $this->targets = $bitmask; - $this->value = $values['value']; - $this->literal = implode(', ', $this->value); - } -} diff --git a/core/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationException.php b/core/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationException.php deleted file mode 100644 index d06fe66..0000000 --- a/core/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationException.php +++ /dev/null @@ -1,197 +0,0 @@ -. - */ - -namespace Doctrine\Common\Annotations; - -/** - * Description of AnnotationException - * - * @since 2.0 - * @author Benjamin Eberlei - * @author Guilherme Blanco - * @author Jonathan Wage - * @author Roman Borschel - */ -class AnnotationException extends \Exception -{ - /** - * Creates a new AnnotationException describing a Syntax error. - * - * @param string $message Exception message - * - * @return AnnotationException - */ - public static function syntaxError($message) - { - return new self('[Syntax Error] ' . $message); - } - - /** - * Creates a new AnnotationException describing a Semantical error. - * - * @param string $message Exception message - * - * @return AnnotationException - */ - public static function semanticalError($message) - { - return new self('[Semantical Error] ' . $message); - } - - /** - * Creates a new AnnotationException describing an error which occurred during - * the creation of the annotation. - * - * @since 2.2 - * - * @param string $message - * - * @return AnnotationException - */ - public static function creationError($message) - { - return new self('[Creation Error] ' . $message); - } - - /** - * Creates a new AnnotationException describing a type error. - * - * @since 1.1 - * - * @param string $message - * - * @return AnnotationException - */ - public static function typeError($message) - { - return new self('[Type Error] ' . $message); - } - - /** - * Creates a new AnnotationException describing a constant semantical error. - * - * @since 2.3 - * - * @param string $identifier - * @param string $context - * - * @return AnnotationException - */ - public static function semanticalErrorConstants($identifier, $context = null) - { - return self::semanticalError(sprintf( - "Couldn't find constant %s%s.", - $identifier, - $context ? ', ' . $context : '' - )); - } - - /** - * Creates a new AnnotationException describing an type error of an attribute. - * - * @since 2.2 - * - * @param string $attributeName - * @param string $annotationName - * @param string $context - * @param string $expected - * @param mixed $actual - * - * @return AnnotationException - */ - public static function attributeTypeError($attributeName, $annotationName, $context, $expected, $actual) - { - return self::typeError(sprintf( - 'Attribute "%s" of @%s declared on %s expects %s, but got %s.', - $attributeName, - $annotationName, - $context, - $expected, - is_object($actual) ? 'an instance of ' . get_class($actual) : gettype($actual) - )); - } - - /** - * Creates a new AnnotationException describing an required error of an attribute. - * - * @since 2.2 - * - * @param string $attributeName - * @param string $annotationName - * @param string $context - * @param string $expected - * - * @return AnnotationException - */ - public static function requiredError($attributeName, $annotationName, $context, $expected) - { - return self::typeError(sprintf( - 'Attribute "%s" of @%s declared on %s expects %s. This value should not be null.', - $attributeName, - $annotationName, - $context, - $expected - )); - } - - /** - * Creates a new AnnotationException describing a invalid enummerator. - * - * @since 2.4 - * - * @param string $attributeName - * @param string $annotationName - * @param string $context - * @param array $available - * @param mixed $given - * - * @return AnnotationException - */ - public static function enumeratorError($attributeName, $annotationName, $context, $available, $given) - { - return new self(sprintf( - '[Enum Error] Attribute "%s" of @%s declared on %s accept only [%s], but got %s.', - $attributeName, - $annotationName, - $context, - implode(', ', $available), - is_object($given) ? get_class($given) : $given - )); - } - - /** - * @return AnnotationException - */ - public static function optimizerPlusSaveComments() - { - return new self( - "You have to enable opcache.save_comments=1 or zend_optimizerplus.save_comments=1." - ); - } - - /** - * @return AnnotationException - */ - public static function optimizerPlusLoadComments() - { - return new self( - "You have to enable opcache.load_comments=1 or zend_optimizerplus.load_comments=1." - ); - } -} diff --git a/core/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationReader.php b/core/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationReader.php deleted file mode 100644 index d559960..0000000 --- a/core/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationReader.php +++ /dev/null @@ -1,393 +0,0 @@ -. - */ - -namespace Doctrine\Common\Annotations; - -use Doctrine\Common\Annotations\Annotation\IgnoreAnnotation; -use Doctrine\Common\Annotations\Annotation\Target; -use ReflectionClass; -use ReflectionMethod; -use ReflectionProperty; - -/** - * A reader for docblock annotations. - * - * @author Benjamin Eberlei - * @author Guilherme Blanco - * @author Jonathan Wage - * @author Roman Borschel - * @author Johannes M. Schmitt - */ -class AnnotationReader implements Reader -{ - /** - * Global map for imports. - * - * @var array - */ - private static $globalImports = array( - 'ignoreannotation' => 'Doctrine\Common\Annotations\Annotation\IgnoreAnnotation', - ); - - /** - * A list with annotations that are not causing exceptions when not resolved to an annotation class. - * - * The names are case sensitive. - * - * @var array - */ - private static $globalIgnoredNames = array( - // Annotation tags - 'Annotation' => true, 'Attribute' => true, 'Attributes' => true, - /* Can we enable this? 'Enum' => true, */ - 'Required' => true, - 'Target' => true, - // Widely used tags (but not existent in phpdoc) - 'fix' => true , 'fixme' => true, - 'override' => true, - // PHPDocumentor 1 tags - 'abstract'=> true, 'access'=> true, - 'code' => true, - 'deprec'=> true, - 'endcode' => true, 'exception'=> true, - 'final'=> true, - 'ingroup' => true, 'inheritdoc'=> true, 'inheritDoc'=> true, - 'magic' => true, - 'name'=> true, - 'toc' => true, 'tutorial'=> true, - 'private' => true, - 'static'=> true, 'staticvar'=> true, 'staticVar'=> true, - 'throw' => true, - // PHPDocumentor 2 tags. - 'api' => true, 'author'=> true, - 'category'=> true, 'copyright'=> true, - 'deprecated'=> true, - 'example'=> true, - 'filesource'=> true, - 'global'=> true, - 'ignore'=> true, /* Can we enable this? 'index' => true, */ 'internal'=> true, - 'license'=> true, 'link'=> true, - 'method' => true, - 'package'=> true, 'param'=> true, 'property' => true, 'property-read' => true, 'property-write' => true, - 'return'=> true, - 'see'=> true, 'since'=> true, 'source' => true, 'subpackage'=> true, - 'throws'=> true, 'todo'=> true, 'TODO'=> true, - 'usedby'=> true, 'uses' => true, - 'var'=> true, 'version'=> true, - // PHPUnit tags - 'codeCoverageIgnore' => true, 'codeCoverageIgnoreStart' => true, 'codeCoverageIgnoreEnd' => true, - // PHPCheckStyle - 'SuppressWarnings' => true, - // PHPStorm - 'noinspection' => true, - // PEAR - 'package_version' => true, - // PlantUML - 'startuml' => true, 'enduml' => true, - ); - - /** - * Add a new annotation to the globally ignored annotation names with regard to exception handling. - * - * @param string $name - */ - static public function addGlobalIgnoredName($name) - { - self::$globalIgnoredNames[$name] = true; - } - - /** - * Annotations parser. - * - * @var \Doctrine\Common\Annotations\DocParser - */ - private $parser; - - /** - * Annotations parser used to collect parsing metadata. - * - * @var \Doctrine\Common\Annotations\DocParser - */ - private $preParser; - - /** - * PHP parser used to collect imports. - * - * @var \Doctrine\Common\Annotations\PhpParser - */ - private $phpParser; - - /** - * In-memory cache mechanism to store imported annotations per class. - * - * @var array - */ - private $imports = array(); - - /** - * In-memory cache mechanism to store ignored annotations per class. - * - * @var array - */ - private $ignoredAnnotationNames = array(); - - /** - * Constructor. - * - * Initializes a new AnnotationReader. - */ - public function __construct() - { - if (extension_loaded('Zend Optimizer+') && (ini_get('zend_optimizerplus.save_comments') === "0" || ini_get('opcache.save_comments') === "0")) { - throw AnnotationException::optimizerPlusSaveComments(); - } - - if (extension_loaded('Zend OPcache') && ini_get('opcache.save_comments') == 0) { - throw AnnotationException::optimizerPlusSaveComments(); - } - - - if (extension_loaded('Zend Optimizer+') && (ini_get('zend_optimizerplus.load_comments') === "0" || ini_get('opcache.load_comments') === "0")) { - throw AnnotationException::optimizerPlusLoadComments(); - } - - if (extension_loaded('Zend OPcache') && ini_get('opcache.load_comments') == 0) { - throw AnnotationException::optimizerPlusLoadComments(); - } - - AnnotationRegistry::registerFile(__DIR__ . '/Annotation/IgnoreAnnotation.php'); - - $this->parser = new DocParser; - $this->preParser = new DocParser; - - $this->preParser->setImports(self::$globalImports); - $this->preParser->setIgnoreNotImportedAnnotations(true); - - $this->phpParser = new PhpParser; - } - - /** - * {@inheritDoc} - */ - public function getClassAnnotations(ReflectionClass $class) - { - $this->parser->setTarget(Target::TARGET_CLASS); - $this->parser->setImports($this->getClassImports($class)); - $this->parser->setIgnoredAnnotationNames($this->getIgnoredAnnotationNames($class)); - - return $this->parser->parse($class->getDocComment(), 'class ' . $class->getName()); - } - - /** - * {@inheritDoc} - */ - public function getClassAnnotation(ReflectionClass $class, $annotationName) - { - $annotations = $this->getClassAnnotations($class); - - foreach ($annotations as $annotation) { - if ($annotation instanceof $annotationName) { - return $annotation; - } - } - - return null; - } - - /** - * {@inheritDoc} - */ - public function getPropertyAnnotations(ReflectionProperty $property) - { - $class = $property->getDeclaringClass(); - $context = 'property ' . $class->getName() . "::\$" . $property->getName(); - - $this->parser->setTarget(Target::TARGET_PROPERTY); - $this->parser->setImports($this->getPropertyImports($property)); - $this->parser->setIgnoredAnnotationNames($this->getIgnoredAnnotationNames($class)); - - return $this->parser->parse($property->getDocComment(), $context); - } - - /** - * {@inheritDoc} - */ - public function getPropertyAnnotation(ReflectionProperty $property, $annotationName) - { - $annotations = $this->getPropertyAnnotations($property); - - foreach ($annotations as $annotation) { - if ($annotation instanceof $annotationName) { - return $annotation; - } - } - - return null; - } - - /** - * {@inheritDoc} - */ - public function getMethodAnnotations(ReflectionMethod $method) - { - $class = $method->getDeclaringClass(); - $context = 'method ' . $class->getName() . '::' . $method->getName() . '()'; - - $this->parser->setTarget(Target::TARGET_METHOD); - $this->parser->setImports($this->getMethodImports($method)); - $this->parser->setIgnoredAnnotationNames($this->getIgnoredAnnotationNames($class)); - - return $this->parser->parse($method->getDocComment(), $context); - } - - /** - * {@inheritDoc} - */ - public function getMethodAnnotation(ReflectionMethod $method, $annotationName) - { - $annotations = $this->getMethodAnnotations($method); - - foreach ($annotations as $annotation) { - if ($annotation instanceof $annotationName) { - return $annotation; - } - } - - return null; - } - - /** - * Returns the ignored annotations for the given class. - * - * @param \ReflectionClass $class - * - * @return array - */ - private function getIgnoredAnnotationNames(ReflectionClass $class) - { - if (isset($this->ignoredAnnotationNames[$name = $class->getName()])) { - return $this->ignoredAnnotationNames[$name]; - } - - $this->collectParsingMetadata($class); - - return $this->ignoredAnnotationNames[$name]; - } - - /** - * Retrieves imports. - * - * @param \ReflectionClass $class - * - * @return array - */ - private function getClassImports(ReflectionClass $class) - { - if (isset($this->imports[$name = $class->getName()])) { - return $this->imports[$name]; - } - - $this->collectParsingMetadata($class); - - return $this->imports[$name]; - } - - /** - * Retrieves imports for methods. - * - * @param \ReflectionMethod $method - * - * @return array - */ - private function getMethodImports(ReflectionMethod $method) - { - $class = $method->getDeclaringClass(); - $classImports = $this->getClassImports($class); - if (!method_exists($class, 'getTraits')) { - return $classImports; - } - - $traitImports = array(); - - foreach ($class->getTraits() as $trait) { - if ($trait->hasMethod($method->getName()) - && $trait->getFileName() === $method->getFileName() - ) { - $traitImports = array_merge($traitImports, $this->phpParser->parseClass($trait)); - } - } - - return array_merge($classImports, $traitImports); - } - - /** - * Retrieves imports for properties. - * - * @param \ReflectionProperty $property - * - * @return array - */ - private function getPropertyImports(ReflectionProperty $property) - { - $class = $property->getDeclaringClass(); - $classImports = $this->getClassImports($class); - if (!method_exists($class, 'getTraits')) { - return $classImports; - } - - $traitImports = array(); - - foreach ($class->getTraits() as $trait) { - if ($trait->hasProperty($property->getName())) { - $traitImports = array_merge($traitImports, $this->phpParser->parseClass($trait)); - } - } - - return array_merge($classImports, $traitImports); - } - - /** - * Collects parsing metadata for a given class. - * - * @param \ReflectionClass $class - */ - private function collectParsingMetadata(ReflectionClass $class) - { - $ignoredAnnotationNames = self::$globalIgnoredNames; - $annotations = $this->preParser->parse($class->getDocComment(), 'class ' . $class->name); - - foreach ($annotations as $annotation) { - if ($annotation instanceof IgnoreAnnotation) { - foreach ($annotation->names AS $annot) { - $ignoredAnnotationNames[$annot] = true; - } - } - } - - $name = $class->getName(); - - $this->imports[$name] = array_merge( - self::$globalImports, - $this->phpParser->parseClass($class), - array('__NAMESPACE__' => $class->getNamespaceName()) - ); - - $this->ignoredAnnotationNames[$name] = $ignoredAnnotationNames; - } -} diff --git a/core/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationRegistry.php b/core/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationRegistry.php deleted file mode 100644 index 13ceb63..0000000 --- a/core/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationRegistry.php +++ /dev/null @@ -1,151 +0,0 @@ -. - */ - -namespace Doctrine\Common\Annotations; - -/** - * AnnotationRegistry. - */ -final class AnnotationRegistry -{ - /** - * A map of namespaces to use for autoloading purposes based on a PSR-0 convention. - * - * Contains the namespace as key and an array of directories as value. If the value is NULL - * the include path is used for checking for the corresponding file. - * - * This autoloading mechanism does not utilize the PHP autoloading but implements autoloading on its own. - * - * @var array - */ - static private $autoloadNamespaces = array(); - - /** - * A map of autoloader callables. - * - * @var array - */ - static private $loaders = array(); - - /** - * @return void - */ - static public function reset() - { - self::$autoloadNamespaces = array(); - self::$loaders = array(); - } - - /** - * Registers file. - * - * @param string $file - * - * @return void - */ - static public function registerFile($file) - { - require_once $file; - } - - /** - * Adds a namespace with one or many directories to look for files or null for the include path. - * - * Loading of this namespaces will be done with a PSR-0 namespace loading algorithm. - * - * @param string $namespace - * @param string|array|null $dirs - * - * @return void - */ - static public function registerAutoloadNamespace($namespace, $dirs = null) - { - self::$autoloadNamespaces[$namespace] = $dirs; - } - - /** - * Registers multiple namespaces. - * - * Loading of this namespaces will be done with a PSR-0 namespace loading algorithm. - * - * @param array $namespaces - * - * @return void - */ - static public function registerAutoloadNamespaces(array $namespaces) - { - self::$autoloadNamespaces = array_merge(self::$autoloadNamespaces, $namespaces); - } - - /** - * Registers an autoloading callable for annotations, much like spl_autoload_register(). - * - * NOTE: These class loaders HAVE to be silent when a class was not found! - * IMPORTANT: Loaders have to return true if they loaded a class that could contain the searched annotation class. - * - * @param callable $callable - * - * @return void - * - * @throws \InvalidArgumentException - */ - static public function registerLoader($callable) - { - if (!is_callable($callable)) { - throw new \InvalidArgumentException("A callable is expected in AnnotationRegistry::registerLoader()."); - } - self::$loaders[] = $callable; - } - - /** - * Autoloads an annotation class silently. - * - * @param string $class - * - * @return boolean - */ - static public function loadAnnotationClass($class) - { - foreach (self::$autoloadNamespaces AS $namespace => $dirs) { - if (strpos($class, $namespace) === 0) { - $file = str_replace("\\", DIRECTORY_SEPARATOR, $class) . ".php"; - if ($dirs === null) { - if ($path = stream_resolve_include_path($file)) { - require $path; - return true; - } - } else { - foreach((array)$dirs AS $dir) { - if (is_file($dir . DIRECTORY_SEPARATOR . $file)) { - require $dir . DIRECTORY_SEPARATOR . $file; - return true; - } - } - } - } - } - - foreach (self::$loaders AS $loader) { - if (call_user_func($loader, $class) === true) { - return true; - } - } - return false; - } -} diff --git a/core/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/CachedReader.php b/core/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/CachedReader.php deleted file mode 100644 index e6dc593..0000000 --- a/core/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/CachedReader.php +++ /dev/null @@ -1,235 +0,0 @@ -. - */ - -namespace Doctrine\Common\Annotations; - -use Doctrine\Common\Cache\Cache; - -/** - * A cache aware annotation reader. - * - * @author Johannes M. Schmitt - * @author Benjamin Eberlei - */ -final class CachedReader implements Reader -{ - /** - * @var string - */ - private static $CACHE_SALT = '@[Annot]'; - - /** - * @var Reader - */ - private $delegate; - - /** - * @var Cache - */ - private $cache; - - /** - * @var boolean - */ - private $debug; - - /** - * @var array - */ - private $loadedAnnotations = array(); - - /** - * Constructor. - * - * @param Reader $reader - * @param Cache $cache - * @param bool $debug - */ - public function __construct(Reader $reader, Cache $cache, $debug = false) - { - $this->delegate = $reader; - $this->cache = $cache; - $this->debug = (boolean) $debug; - } - - /** - * {@inheritDoc} - */ - public function getClassAnnotations(\ReflectionClass $class) - { - $cacheKey = $class->getName(); - - if (isset($this->loadedAnnotations[$cacheKey])) { - return $this->loadedAnnotations[$cacheKey]; - } - - if (false === ($annots = $this->fetchFromCache($cacheKey, $class))) { - $annots = $this->delegate->getClassAnnotations($class); - $this->saveToCache($cacheKey, $annots); - } - - return $this->loadedAnnotations[$cacheKey] = $annots; - } - - /** - * {@inheritDoc} - */ - public function getClassAnnotation(\ReflectionClass $class, $annotationName) - { - foreach ($this->getClassAnnotations($class) as $annot) { - if ($annot instanceof $annotationName) { - return $annot; - } - } - - return null; - } - - /** - * {@inheritDoc} - */ - public function getPropertyAnnotations(\ReflectionProperty $property) - { - $class = $property->getDeclaringClass(); - $cacheKey = $class->getName().'$'.$property->getName(); - - if (isset($this->loadedAnnotations[$cacheKey])) { - return $this->loadedAnnotations[$cacheKey]; - } - - if (false === ($annots = $this->fetchFromCache($cacheKey, $class))) { - $annots = $this->delegate->getPropertyAnnotations($property); - $this->saveToCache($cacheKey, $annots); - } - - return $this->loadedAnnotations[$cacheKey] = $annots; - } - - /** - * {@inheritDoc} - */ - public function getPropertyAnnotation(\ReflectionProperty $property, $annotationName) - { - foreach ($this->getPropertyAnnotations($property) as $annot) { - if ($annot instanceof $annotationName) { - return $annot; - } - } - - return null; - } - - /** - * {@inheritDoc} - */ - public function getMethodAnnotations(\ReflectionMethod $method) - { - $class = $method->getDeclaringClass(); - $cacheKey = $class->getName().'#'.$method->getName(); - - if (isset($this->loadedAnnotations[$cacheKey])) { - return $this->loadedAnnotations[$cacheKey]; - } - - if (false === ($annots = $this->fetchFromCache($cacheKey, $class))) { - $annots = $this->delegate->getMethodAnnotations($method); - $this->saveToCache($cacheKey, $annots); - } - - return $this->loadedAnnotations[$cacheKey] = $annots; - } - - /** - * {@inheritDoc} - */ - public function getMethodAnnotation(\ReflectionMethod $method, $annotationName) - { - foreach ($this->getMethodAnnotations($method) as $annot) { - if ($annot instanceof $annotationName) { - return $annot; - } - } - - return null; - } - - /** - * Clears loaded annotations. - * - * @return void - */ - public function clearLoadedAnnotations() - { - $this->loadedAnnotations = array(); - } - - /** - * Fetches a value from the cache. - * - * @param string $rawCacheKey The cache key. - * @param \ReflectionClass $class The related class. - * - * @return mixed The cached value or false when the value is not in cache. - */ - private function fetchFromCache($rawCacheKey, \ReflectionClass $class) - { - $cacheKey = $rawCacheKey . self::$CACHE_SALT; - if (($data = $this->cache->fetch($cacheKey)) !== false) { - if (!$this->debug || $this->isCacheFresh($cacheKey, $class)) { - return $data; - } - } - - return false; - } - - /** - * Saves a value to the cache. - * - * @param string $rawCacheKey The cache key. - * @param mixed $value The value. - * - * @return void - */ - private function saveToCache($rawCacheKey, $value) - { - $cacheKey = $rawCacheKey . self::$CACHE_SALT; - $this->cache->save($cacheKey, $value); - if ($this->debug) { - $this->cache->save('[C]'.$cacheKey, time()); - } - } - - /** - * Checks if the cache is fresh. - * - * @param string $cacheKey - * @param \ReflectionClass $class - * - * @return boolean - */ - private function isCacheFresh($cacheKey, \ReflectionClass $class) - { - if (false === $filename = $class->getFilename()) { - return true; - } - - return $this->cache->fetch('[C]'.$cacheKey) >= filemtime($filename); - } -} diff --git a/core/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocLexer.php b/core/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocLexer.php deleted file mode 100644 index 330afd3..0000000 --- a/core/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocLexer.php +++ /dev/null @@ -1,134 +0,0 @@ -. - */ - -namespace Doctrine\Common\Annotations; - -use Doctrine\Common\Lexer\AbstractLexer; - -/** - * Simple lexer for docblock annotations. - * - * @author Benjamin Eberlei - * @author Guilherme Blanco - * @author Jonathan Wage - * @author Roman Borschel - * @author Johannes M. Schmitt - */ -final class DocLexer extends AbstractLexer -{ - const T_NONE = 1; - const T_INTEGER = 2; - const T_STRING = 3; - const T_FLOAT = 4; - - // All tokens that are also identifiers should be >= 100 - const T_IDENTIFIER = 100; - const T_AT = 101; - const T_CLOSE_CURLY_BRACES = 102; - const T_CLOSE_PARENTHESIS = 103; - const T_COMMA = 104; - const T_EQUALS = 105; - const T_FALSE = 106; - const T_NAMESPACE_SEPARATOR = 107; - const T_OPEN_CURLY_BRACES = 108; - const T_OPEN_PARENTHESIS = 109; - const T_TRUE = 110; - const T_NULL = 111; - const T_COLON = 112; - - /** - * @var array - */ - protected $noCase = array( - '@' => self::T_AT, - ',' => self::T_COMMA, - '(' => self::T_OPEN_PARENTHESIS, - ')' => self::T_CLOSE_PARENTHESIS, - '{' => self::T_OPEN_CURLY_BRACES, - '}' => self::T_CLOSE_CURLY_BRACES, - '=' => self::T_EQUALS, - ':' => self::T_COLON, - '\\' => self::T_NAMESPACE_SEPARATOR - ); - - /** - * @var array - */ - protected $withCase = array( - 'true' => self::T_TRUE, - 'false' => self::T_FALSE, - 'null' => self::T_NULL - ); - - /** - * {@inheritdoc} - */ - protected function getCatchablePatterns() - { - return array( - '[a-z_\\\][a-z0-9_\:\\\]*[a-z_][a-z0-9_]*', - '(?:[+-]?[0-9]+(?:[\.][0-9]+)*)(?:[eE][+-]?[0-9]+)?', - '"(?:[^"]|"")*"', - ); - } - - /** - * {@inheritdoc} - */ - protected function getNonCatchablePatterns() - { - return array('\s+', '\*+', '(.)'); - } - - /** - * {@inheritdoc} - */ - protected function getType(&$value) - { - $type = self::T_NONE; - - if ($value[0] === '"') { - $value = str_replace('""', '"', substr($value, 1, strlen($value) - 2)); - - return self::T_STRING; - } - - if (isset($this->noCase[$value])) { - return $this->noCase[$value]; - } - - if ($value[0] === '_' || $value[0] === '\\' || ctype_alpha($value[0])) { - return self::T_IDENTIFIER; - } - - $lowerValue = strtolower($value); - - if (isset($this->withCase[$lowerValue])) { - return $this->withCase[$lowerValue]; - } - - // Checking numeric value - if (is_numeric($value)) { - return (strpos($value, '.') !== false || stripos($value, 'e') !== false) - ? self::T_FLOAT : self::T_INTEGER; - } - - return $type; - } -} diff --git a/core/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php b/core/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php deleted file mode 100644 index db66846..0000000 --- a/core/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php +++ /dev/null @@ -1,1138 +0,0 @@ -. - */ - -namespace Doctrine\Common\Annotations; - -use Doctrine\Common\Annotations\Annotation\Attribute; -use ReflectionClass; -use Doctrine\Common\Annotations\Annotation\Enum; -use Doctrine\Common\Annotations\Annotation\Target; -use Doctrine\Common\Annotations\Annotation\Attributes; - -/** - * A parser for docblock annotations. - * - * It is strongly discouraged to change the default annotation parsing process. - * - * @author Benjamin Eberlei - * @author Guilherme Blanco - * @author Jonathan Wage - * @author Roman Borschel - * @author Johannes M. Schmitt - * @author Fabio B. Silva - */ -final class DocParser -{ - /** - * An array of all valid tokens for a class name. - * - * @var array - */ - private static $classIdentifiers = array( - DocLexer::T_IDENTIFIER, - DocLexer::T_TRUE, - DocLexer::T_FALSE, - DocLexer::T_NULL - ); - - /** - * The lexer. - * - * @var \Doctrine\Common\Annotations\DocLexer - */ - private $lexer; - - /** - * Current target context. - * - * @var string - */ - private $target; - - /** - * Doc parser used to collect annotation target. - * - * @var \Doctrine\Common\Annotations\DocParser - */ - private static $metadataParser; - - /** - * Flag to control if the current annotation is nested or not. - * - * @var boolean - */ - private $isNestedAnnotation = false; - - /** - * Hashmap containing all use-statements that are to be used when parsing - * the given doc block. - * - * @var array - */ - private $imports = array(); - - /** - * This hashmap is used internally to cache results of class_exists() - * look-ups. - * - * @var array - */ - private $classExists = array(); - - /** - * Whether annotations that have not been imported should be ignored. - * - * @var boolean - */ - private $ignoreNotImportedAnnotations = false; - - /** - * An array of default namespaces if operating in simple mode. - * - * @var array - */ - private $namespaces = array(); - - /** - * A list with annotations that are not causing exceptions when not resolved to an annotation class. - * - * The names must be the raw names as used in the class, not the fully qualified - * class names. - * - * @var array - */ - private $ignoredAnnotationNames = array(); - - /** - * @var string - */ - private $context = ''; - - /** - * Hash-map for caching annotation metadata. - * - * @var array - */ - private static $annotationMetadata = array( - 'Doctrine\Common\Annotations\Annotation\Target' => array( - 'is_annotation' => true, - 'has_constructor' => true, - 'properties' => array(), - 'targets_literal' => 'ANNOTATION_CLASS', - 'targets' => Target::TARGET_CLASS, - 'default_property' => 'value', - 'attribute_types' => array( - 'value' => array( - 'required' => false, - 'type' =>'array', - 'array_type'=>'string', - 'value' =>'array' - ) - ), - ), - 'Doctrine\Common\Annotations\Annotation\Attribute' => array( - 'is_annotation' => true, - 'has_constructor' => false, - 'targets_literal' => 'ANNOTATION_ANNOTATION', - 'targets' => Target::TARGET_ANNOTATION, - 'default_property' => 'name', - 'properties' => array( - 'name' => 'name', - 'type' => 'type', - 'required' => 'required' - ), - 'attribute_types' => array( - 'value' => array( - 'required' => true, - 'type' =>'string', - 'value' =>'string' - ), - 'type' => array( - 'required' =>true, - 'type' =>'string', - 'value' =>'string' - ), - 'required' => array( - 'required' =>false, - 'type' =>'boolean', - 'value' =>'boolean' - ) - ), - ), - 'Doctrine\Common\Annotations\Annotation\Attributes' => array( - 'is_annotation' => true, - 'has_constructor' => false, - 'targets_literal' => 'ANNOTATION_CLASS', - 'targets' => Target::TARGET_CLASS, - 'default_property' => 'value', - 'properties' => array( - 'value' => 'value' - ), - 'attribute_types' => array( - 'value' => array( - 'type' =>'array', - 'required' =>true, - 'array_type'=>'Doctrine\Common\Annotations\Annotation\Attribute', - 'value' =>'array' - ) - ), - ), - 'Doctrine\Common\Annotations\Annotation\Enum' => array( - 'is_annotation' => true, - 'has_constructor' => true, - 'targets_literal' => 'ANNOTATION_PROPERTY', - 'targets' => Target::TARGET_PROPERTY, - 'default_property' => 'value', - 'properties' => array( - 'value' => 'value' - ), - 'attribute_types' => array( - 'value' => array( - 'type' => 'array', - 'required' => true, - ), - 'literal' => array( - 'type' => 'array', - 'required' => false, - ), - ), - ), - ); - - /** - * Hash-map for handle types declaration. - * - * @var array - */ - private static $typeMap = array( - 'float' => 'double', - 'bool' => 'boolean', - // allow uppercase Boolean in honor of George Boole - 'Boolean' => 'boolean', - 'int' => 'integer', - ); - - /** - * Constructs a new DocParser. - */ - public function __construct() - { - $this->lexer = new DocLexer; - } - - /** - * Sets the annotation names that are ignored during the parsing process. - * - * The names are supposed to be the raw names as used in the class, not the - * fully qualified class names. - * - * @param array $names - * - * @return void - */ - public function setIgnoredAnnotationNames(array $names) - { - $this->ignoredAnnotationNames = $names; - } - - /** - * Sets ignore on not-imported annotations. - * - * @param boolean $bool - * - * @return void - */ - public function setIgnoreNotImportedAnnotations($bool) - { - $this->ignoreNotImportedAnnotations = (boolean) $bool; - } - - /** - * Sets the default namespaces. - * - * @param array $namespace - * - * @return void - * - * @throws \RuntimeException - */ - public function addNamespace($namespace) - { - if ($this->imports) { - throw new \RuntimeException('You must either use addNamespace(), or setImports(), but not both.'); - } - - $this->namespaces[] = $namespace; - } - - /** - * Sets the imports. - * - * @param array $imports - * - * @return void - * - * @throws \RuntimeException - */ - public function setImports(array $imports) - { - if ($this->namespaces) { - throw new \RuntimeException('You must either use addNamespace(), or setImports(), but not both.'); - } - - $this->imports = $imports; - } - - /** - * Sets current target context as bitmask. - * - * @param integer $target - * - * @return void - */ - public function setTarget($target) - { - $this->target = $target; - } - - /** - * Parses the given docblock string for annotations. - * - * @param string $input The docblock string to parse. - * @param string $context The parsing context. - * - * @return array Array of annotations. If no annotations are found, an empty array is returned. - */ - public function parse($input, $context = '') - { - $pos = $this->findInitialTokenPosition($input); - if ($pos === null) { - return array(); - } - - $this->context = $context; - - $this->lexer->setInput(trim(substr($input, $pos), '* /')); - $this->lexer->moveNext(); - - return $this->Annotations(); - } - - /** - * Finds the first valid annotation - * - * @param string $input The docblock string to parse - * - * @return int|null - */ - private function findInitialTokenPosition($input) - { - $pos = 0; - - // search for first valid annotation - while (($pos = strpos($input, '@', $pos)) !== false) { - // if the @ is preceded by a space or * it is valid - if ($pos === 0 || $input[$pos - 1] === ' ' || $input[$pos - 1] === '*') { - return $pos; - } - - $pos++; - } - - return null; - } - - /** - * Attempts to match the given token with the current lookahead token. - * If they match, updates the lookahead token; otherwise raises a syntax error. - * - * @param integer $token Type of token. - * - * @return boolean True if tokens match; false otherwise. - */ - private function match($token) - { - if ( ! $this->lexer->isNextToken($token) ) { - $this->syntaxError($this->lexer->getLiteral($token)); - } - - return $this->lexer->moveNext(); - } - - /** - * Attempts to match the current lookahead token with any of the given tokens. - * - * If any of them matches, this method updates the lookahead token; otherwise - * a syntax error is raised. - * - * @param array $tokens - * - * @return boolean - */ - private function matchAny(array $tokens) - { - if ( ! $this->lexer->isNextTokenAny($tokens)) { - $this->syntaxError(implode(' or ', array_map(array($this->lexer, 'getLiteral'), $tokens))); - } - - return $this->lexer->moveNext(); - } - - /** - * Generates a new syntax error. - * - * @param string $expected Expected string. - * @param array|null $token Optional token. - * - * @return void - * - * @throws AnnotationException - */ - private function syntaxError($expected, $token = null) - { - if ($token === null) { - $token = $this->lexer->lookahead; - } - - $message = sprintf('Expected %s, got ', $expected); - $message .= ($this->lexer->lookahead === null) - ? 'end of string' - : sprintf("'%s' at position %s", $token['value'], $token['position']); - - if (strlen($this->context)) { - $message .= ' in ' . $this->context; - } - - $message .= '.'; - - throw AnnotationException::syntaxError($message); - } - - /** - * Attempts to check if a class exists or not. This never goes through the PHP autoloading mechanism - * but uses the {@link AnnotationRegistry} to load classes. - * - * @param string $fqcn - * - * @return boolean - */ - private function classExists($fqcn) - { - if (isset($this->classExists[$fqcn])) { - return $this->classExists[$fqcn]; - } - - // first check if the class already exists, maybe loaded through another AnnotationReader - if (class_exists($fqcn, false)) { - return $this->classExists[$fqcn] = true; - } - - // final check, does this class exist? - return $this->classExists[$fqcn] = AnnotationRegistry::loadAnnotationClass($fqcn); - } - - /** - * Collects parsing metadata for a given annotation class - * - * @param string $name The annotation name - * - * @return void - */ - private function collectAnnotationMetadata($name) - { - if (self::$metadataParser === null) { - self::$metadataParser = new self(); - - self::$metadataParser->setIgnoreNotImportedAnnotations(true); - self::$metadataParser->setIgnoredAnnotationNames($this->ignoredAnnotationNames); - self::$metadataParser->setImports(array( - 'enum' => 'Doctrine\Common\Annotations\Annotation\Enum', - 'target' => 'Doctrine\Common\Annotations\Annotation\Target', - 'attribute' => 'Doctrine\Common\Annotations\Annotation\Attribute', - 'attributes' => 'Doctrine\Common\Annotations\Annotation\Attributes' - )); - - AnnotationRegistry::registerFile(__DIR__ . '/Annotation/Enum.php'); - AnnotationRegistry::registerFile(__DIR__ . '/Annotation/Target.php'); - AnnotationRegistry::registerFile(__DIR__ . '/Annotation/Attribute.php'); - AnnotationRegistry::registerFile(__DIR__ . '/Annotation/Attributes.php'); - } - - $class = new \ReflectionClass($name); - $docComment = $class->getDocComment(); - - // Sets default values for annotation metadata - $metadata = array( - 'default_property' => null, - 'has_constructor' => (null !== $constructor = $class->getConstructor()) && $constructor->getNumberOfParameters() > 0, - 'properties' => array(), - 'property_types' => array(), - 'attribute_types' => array(), - 'targets_literal' => null, - 'targets' => Target::TARGET_ALL, - 'is_annotation' => false !== strpos($docComment, '@Annotation'), - ); - - // verify that the class is really meant to be an annotation - if ($metadata['is_annotation']) { - self::$metadataParser->setTarget(Target::TARGET_CLASS); - - foreach (self::$metadataParser->parse($docComment, 'class @' . $name) as $annotation) { - if ($annotation instanceof Target) { - $metadata['targets'] = $annotation->targets; - $metadata['targets_literal'] = $annotation->literal; - - continue; - } - - if ($annotation instanceof Attributes) { - foreach ($annotation->value as $attribute) { - $this->collectAttributeTypeMetadata($metadata, $attribute); - } - } - } - - // if not has a constructor will inject values into public properties - if (false === $metadata['has_constructor']) { - // collect all public properties - foreach ($class->getProperties(\ReflectionProperty::IS_PUBLIC) as $property) { - $metadata['properties'][$property->name] = $property->name; - - if (false === ($propertyComment = $property->getDocComment())) { - continue; - } - - $attribute = new Attribute(); - - $attribute->required = (false !== strpos($propertyComment, '@Required')); - $attribute->name = $property->name; - $attribute->type = (false !== strpos($propertyComment, '@var') && preg_match('/@var\s+([^\s]+)/',$propertyComment, $matches)) - ? $matches[1] - : 'mixed'; - - $this->collectAttributeTypeMetadata($metadata, $attribute); - - // checks if the property has @Enum - if (false !== strpos($propertyComment, '@Enum')) { - $context = 'property ' . $class->name . "::\$" . $property->name; - - self::$metadataParser->setTarget(Target::TARGET_PROPERTY); - - foreach (self::$metadataParser->parse($propertyComment, $context) as $annotation) { - if ( ! $annotation instanceof Enum) { - continue; - } - - $metadata['enum'][$property->name]['value'] = $annotation->value; - $metadata['enum'][$property->name]['literal'] = ( ! empty($annotation->literal)) - ? $annotation->literal - : $annotation->value; - } - } - } - - // choose the first property as default property - $metadata['default_property'] = reset($metadata['properties']); - } - } - - self::$annotationMetadata[$name] = $metadata; - } - - /** - * Collects parsing metadata for a given attribute. - * - * @param array $metadata - * @param Attribute $attribute - * - * @return void - */ - private function collectAttributeTypeMetadata(&$metadata, Attribute $attribute) - { - // handle internal type declaration - $type = isset(self::$typeMap[$attribute->type]) - ? self::$typeMap[$attribute->type] - : $attribute->type; - - // handle the case if the property type is mixed - if ('mixed' === $type) { - return; - } - - // Evaluate type - switch (true) { - // Checks if the property has array - case (false !== $pos = strpos($type, '<')): - $arrayType = substr($type, $pos + 1, -1); - $type = 'array'; - - if (isset(self::$typeMap[$arrayType])) { - $arrayType = self::$typeMap[$arrayType]; - } - - $metadata['attribute_types'][$attribute->name]['array_type'] = $arrayType; - break; - - // Checks if the property has type[] - case (false !== $pos = strrpos($type, '[')): - $arrayType = substr($type, 0, $pos); - $type = 'array'; - - if (isset(self::$typeMap[$arrayType])) { - $arrayType = self::$typeMap[$arrayType]; - } - - $metadata['attribute_types'][$attribute->name]['array_type'] = $arrayType; - break; - } - - $metadata['attribute_types'][$attribute->name]['type'] = $type; - $metadata['attribute_types'][$attribute->name]['value'] = $attribute->type; - $metadata['attribute_types'][$attribute->name]['required'] = $attribute->required; - } - - /** - * Annotations ::= Annotation {[ "*" ]* [Annotation]}* - * - * @return array - */ - private function Annotations() - { - $annotations = array(); - - while (null !== $this->lexer->lookahead) { - if (DocLexer::T_AT !== $this->lexer->lookahead['type']) { - $this->lexer->moveNext(); - continue; - } - - // make sure the @ is preceded by non-catchable pattern - if (null !== $this->lexer->token && $this->lexer->lookahead['position'] === $this->lexer->token['position'] + strlen($this->lexer->token['value'])) { - $this->lexer->moveNext(); - continue; - } - - // make sure the @ is followed by either a namespace separator, or - // an identifier token - if ((null === $peek = $this->lexer->glimpse()) - || (DocLexer::T_NAMESPACE_SEPARATOR !== $peek['type'] && !in_array($peek['type'], self::$classIdentifiers, true)) - || $peek['position'] !== $this->lexer->lookahead['position'] + 1) { - $this->lexer->moveNext(); - continue; - } - - $this->isNestedAnnotation = false; - if (false !== $annot = $this->Annotation()) { - $annotations[] = $annot; - } - } - - return $annotations; - } - - /** - * Annotation ::= "@" AnnotationName MethodCall - * AnnotationName ::= QualifiedName | SimpleName - * QualifiedName ::= NameSpacePart "\" {NameSpacePart "\"}* SimpleName - * NameSpacePart ::= identifier | null | false | true - * SimpleName ::= identifier | null | false | true - * - * @return mixed False if it is not a valid annotation. - * - * @throws AnnotationException - */ - private function Annotation() - { - $this->match(DocLexer::T_AT); - - // check if we have an annotation - $name = $this->Identifier(); - - // only process names which are not fully qualified, yet - // fully qualified names must start with a \ - $originalName = $name; - - if ('\\' !== $name[0]) { - $alias = (false === $pos = strpos($name, '\\'))? $name : substr($name, 0, $pos); - $found = false; - - if ($this->namespaces) { - foreach ($this->namespaces as $namespace) { - if ($this->classExists($namespace.'\\'.$name)) { - $name = $namespace.'\\'.$name; - $found = true; - break; - } - } - } elseif (isset($this->imports[$loweredAlias = strtolower($alias)])) { - $found = true; - $name = (false !== $pos) - ? $this->imports[$loweredAlias] . substr($name, $pos) - : $this->imports[$loweredAlias]; - } elseif ( ! isset($this->ignoredAnnotationNames[$name]) - && isset($this->imports['__NAMESPACE__']) - && $this->classExists($this->imports['__NAMESPACE__'] . '\\' . $name) - ) { - $name = $this->imports['__NAMESPACE__'].'\\'.$name; - $found = true; - } elseif (! isset($this->ignoredAnnotationNames[$name]) && $this->classExists($name)) { - $found = true; - } - - if ( ! $found) { - if ($this->ignoreNotImportedAnnotations || isset($this->ignoredAnnotationNames[$name])) { - return false; - } - - throw AnnotationException::semanticalError(sprintf('The annotation "@%s" in %s was never imported. Did you maybe forget to add a "use" statement for this annotation?', $name, $this->context)); - } - } - - if ( ! $this->classExists($name)) { - throw AnnotationException::semanticalError(sprintf('The annotation "@%s" in %s does not exist, or could not be auto-loaded.', $name, $this->context)); - } - - // at this point, $name contains the fully qualified class name of the - // annotation, and it is also guaranteed that this class exists, and - // that it is loaded - - - // collects the metadata annotation only if there is not yet - if ( ! isset(self::$annotationMetadata[$name])) { - $this->collectAnnotationMetadata($name); - } - - // verify that the class is really meant to be an annotation and not just any ordinary class - if (self::$annotationMetadata[$name]['is_annotation'] === false) { - if (isset($this->ignoredAnnotationNames[$originalName])) { - return false; - } - - throw AnnotationException::semanticalError(sprintf('The class "%s" is not annotated with @Annotation. Are you sure this class can be used as annotation? If so, then you need to add @Annotation to the _class_ doc comment of "%s". If it is indeed no annotation, then you need to add @IgnoreAnnotation("%s") to the _class_ doc comment of %s.', $name, $name, $originalName, $this->context)); - } - - //if target is nested annotation - $target = $this->isNestedAnnotation ? Target::TARGET_ANNOTATION : $this->target; - - // Next will be nested - $this->isNestedAnnotation = true; - - //if annotation does not support current target - if (0 === (self::$annotationMetadata[$name]['targets'] & $target) && $target) { - throw AnnotationException::semanticalError( - sprintf('Annotation @%s is not allowed to be declared on %s. You may only use this annotation on these code elements: %s.', - $originalName, $this->context, self::$annotationMetadata[$name]['targets_literal']) - ); - } - - $values = $this->MethodCall(); - - if (isset(self::$annotationMetadata[$name]['enum'])) { - // checks all declared attributes - foreach (self::$annotationMetadata[$name]['enum'] as $property => $enum) { - // checks if the attribute is a valid enumerator - if (isset($values[$property]) && ! in_array($values[$property], $enum['value'])) { - throw AnnotationException::enumeratorError($property, $name, $this->context, $enum['literal'], $values[$property]); - } - } - } - - // checks all declared attributes - foreach (self::$annotationMetadata[$name]['attribute_types'] as $property => $type) { - if ($property === self::$annotationMetadata[$name]['default_property'] - && !isset($values[$property]) && isset($values['value'])) { - $property = 'value'; - } - - // handle a not given attribute or null value - if (!isset($values[$property])) { - if ($type['required']) { - throw AnnotationException::requiredError($property, $originalName, $this->context, 'a(n) '.$type['value']); - } - - continue; - } - - if ($type['type'] === 'array') { - // handle the case of a single value - if ( ! is_array($values[$property])) { - $values[$property] = array($values[$property]); - } - - // checks if the attribute has array type declaration, such as "array" - if (isset($type['array_type'])) { - foreach ($values[$property] as $item) { - if (gettype($item) !== $type['array_type'] && !$item instanceof $type['array_type']) { - throw AnnotationException::attributeTypeError($property, $originalName, $this->context, 'either a(n) '.$type['array_type'].', or an array of '.$type['array_type'].'s', $item); - } - } - } - } elseif (gettype($values[$property]) !== $type['type'] && !$values[$property] instanceof $type['type']) { - throw AnnotationException::attributeTypeError($property, $originalName, $this->context, 'a(n) '.$type['value'], $values[$property]); - } - } - - // check if the annotation expects values via the constructor, - // or directly injected into public properties - if (self::$annotationMetadata[$name]['has_constructor'] === true) { - return new $name($values); - } - - $instance = new $name(); - - foreach ($values as $property => $value) { - if (!isset(self::$annotationMetadata[$name]['properties'][$property])) { - if ('value' !== $property) { - throw AnnotationException::creationError(sprintf('The annotation @%s declared on %s does not have a property named "%s". Available properties: %s', $originalName, $this->context, $property, implode(', ', self::$annotationMetadata[$name]['properties']))); - } - - // handle the case if the property has no annotations - if ( ! $property = self::$annotationMetadata[$name]['default_property']) { - throw AnnotationException::creationError(sprintf('The annotation @%s declared on %s does not accept any values, but got %s.', $originalName, $this->context, json_encode($values))); - } - } - - $instance->{$property} = $value; - } - - return $instance; - } - - /** - * MethodCall ::= ["(" [Values] ")"] - * - * @return array - */ - private function MethodCall() - { - $values = array(); - - if ( ! $this->lexer->isNextToken(DocLexer::T_OPEN_PARENTHESIS)) { - return $values; - } - - $this->match(DocLexer::T_OPEN_PARENTHESIS); - - if ( ! $this->lexer->isNextToken(DocLexer::T_CLOSE_PARENTHESIS)) { - $values = $this->Values(); - } - - $this->match(DocLexer::T_CLOSE_PARENTHESIS); - - return $values; - } - - /** - * Values ::= Array | Value {"," Value}* [","] - * - * @return array - */ - private function Values() - { - $values = array($this->Value()); - - while ($this->lexer->isNextToken(DocLexer::T_COMMA)) { - $this->match(DocLexer::T_COMMA); - - if ($this->lexer->isNextToken(DocLexer::T_CLOSE_PARENTHESIS)) { - break; - } - - $token = $this->lexer->lookahead; - $value = $this->Value(); - - if ( ! is_object($value) && ! is_array($value)) { - $this->syntaxError('Value', $token); - } - - $values[] = $value; - } - - foreach ($values as $k => $value) { - if (is_object($value) && $value instanceof \stdClass) { - $values[$value->name] = $value->value; - } else if ( ! isset($values['value'])){ - $values['value'] = $value; - } else { - if ( ! is_array($values['value'])) { - $values['value'] = array($values['value']); - } - - $values['value'][] = $value; - } - - unset($values[$k]); - } - - return $values; - } - - /** - * Constant ::= integer | string | float | boolean - * - * @return mixed - * - * @throws AnnotationException - */ - private function Constant() - { - $identifier = $this->Identifier(); - - if ( ! defined($identifier) && false !== strpos($identifier, '::') && '\\' !== $identifier[0]) { - list($className, $const) = explode('::', $identifier); - - $alias = (false === $pos = strpos($className, '\\')) ? $className : substr($className, 0, $pos); - $found = false; - - switch (true) { - case !empty ($this->namespaces): - foreach ($this->namespaces as $ns) { - if (class_exists($ns.'\\'.$className) || interface_exists($ns.'\\'.$className)) { - $className = $ns.'\\'.$className; - $found = true; - break; - } - } - break; - - case isset($this->imports[$loweredAlias = strtolower($alias)]): - $found = true; - $className = (false !== $pos) - ? $this->imports[$loweredAlias] . substr($className, $pos) - : $this->imports[$loweredAlias]; - break; - - default: - if(isset($this->imports['__NAMESPACE__'])) { - $ns = $this->imports['__NAMESPACE__']; - - if (class_exists($ns.'\\'.$className) || interface_exists($ns.'\\'.$className)) { - $className = $ns.'\\'.$className; - $found = true; - } - } - break; - } - - if ($found) { - $identifier = $className . '::' . $const; - } - } - - // checks if identifier ends with ::class, \strlen('::class') === 7 - $classPos = stripos($identifier, '::class'); - if ($classPos === strlen($identifier) - 7) { - return substr($identifier, 0, $classPos); - } - - if (!defined($identifier)) { - throw AnnotationException::semanticalErrorConstants($identifier, $this->context); - } - - return constant($identifier); - } - - /** - * Identifier ::= string - * - * @return string - */ - private function Identifier() - { - // check if we have an annotation - if ( ! $this->lexer->isNextTokenAny(self::$classIdentifiers)) { - $this->syntaxError('namespace separator or identifier'); - } - - $this->lexer->moveNext(); - - $className = $this->lexer->token['value']; - - while ($this->lexer->lookahead['position'] === ($this->lexer->token['position'] + strlen($this->lexer->token['value'])) - && $this->lexer->isNextToken(DocLexer::T_NAMESPACE_SEPARATOR)) { - - $this->match(DocLexer::T_NAMESPACE_SEPARATOR); - $this->matchAny(self::$classIdentifiers); - - $className .= '\\' . $this->lexer->token['value']; - } - - return $className; - } - - /** - * Value ::= PlainValue | FieldAssignment - * - * @return mixed - */ - private function Value() - { - $peek = $this->lexer->glimpse(); - - if (DocLexer::T_EQUALS === $peek['type']) { - return $this->FieldAssignment(); - } - - return $this->PlainValue(); - } - - /** - * PlainValue ::= integer | string | float | boolean | Array | Annotation - * - * @return mixed - */ - private function PlainValue() - { - if ($this->lexer->isNextToken(DocLexer::T_OPEN_CURLY_BRACES)) { - return $this->Arrayx(); - } - - if ($this->lexer->isNextToken(DocLexer::T_AT)) { - return $this->Annotation(); - } - - if ($this->lexer->isNextToken(DocLexer::T_IDENTIFIER)) { - return $this->Constant(); - } - - switch ($this->lexer->lookahead['type']) { - case DocLexer::T_STRING: - $this->match(DocLexer::T_STRING); - return $this->lexer->token['value']; - - case DocLexer::T_INTEGER: - $this->match(DocLexer::T_INTEGER); - return (int)$this->lexer->token['value']; - - case DocLexer::T_FLOAT: - $this->match(DocLexer::T_FLOAT); - return (float)$this->lexer->token['value']; - - case DocLexer::T_TRUE: - $this->match(DocLexer::T_TRUE); - return true; - - case DocLexer::T_FALSE: - $this->match(DocLexer::T_FALSE); - return false; - - case DocLexer::T_NULL: - $this->match(DocLexer::T_NULL); - return null; - - default: - $this->syntaxError('PlainValue'); - } - } - - /** - * FieldAssignment ::= FieldName "=" PlainValue - * FieldName ::= identifier - * - * @return array - */ - private function FieldAssignment() - { - $this->match(DocLexer::T_IDENTIFIER); - $fieldName = $this->lexer->token['value']; - - $this->match(DocLexer::T_EQUALS); - - $item = new \stdClass(); - $item->name = $fieldName; - $item->value = $this->PlainValue(); - - return $item; - } - - /** - * Array ::= "{" ArrayEntry {"," ArrayEntry}* [","] "}" - * - * @return array - */ - private function Arrayx() - { - $array = $values = array(); - - $this->match(DocLexer::T_OPEN_CURLY_BRACES); - - // If the array is empty, stop parsing and return. - if ($this->lexer->isNextToken(DocLexer::T_CLOSE_CURLY_BRACES)) { - $this->match(DocLexer::T_CLOSE_CURLY_BRACES); - - return $array; - } - - $values[] = $this->ArrayEntry(); - - while ($this->lexer->isNextToken(DocLexer::T_COMMA)) { - $this->match(DocLexer::T_COMMA); - - // optional trailing comma - if ($this->lexer->isNextToken(DocLexer::T_CLOSE_CURLY_BRACES)) { - break; - } - - $values[] = $this->ArrayEntry(); - } - - $this->match(DocLexer::T_CLOSE_CURLY_BRACES); - - foreach ($values as $value) { - list ($key, $val) = $value; - - if ($key !== null) { - $array[$key] = $val; - } else { - $array[] = $val; - } - } - - return $array; - } - - /** - * ArrayEntry ::= Value | KeyValuePair - * KeyValuePair ::= Key ("=" | ":") PlainValue | Constant - * Key ::= string | integer | Constant - * - * @return array - */ - private function ArrayEntry() - { - $peek = $this->lexer->glimpse(); - - if (DocLexer::T_EQUALS === $peek['type'] - || DocLexer::T_COLON === $peek['type']) { - - if ($this->lexer->isNextToken(DocLexer::T_IDENTIFIER)) { - $key = $this->Constant(); - } else { - $this->matchAny(array(DocLexer::T_INTEGER, DocLexer::T_STRING)); - $key = $this->lexer->token['value']; - } - - $this->matchAny(array(DocLexer::T_EQUALS, DocLexer::T_COLON)); - - return array($key, $this->PlainValue()); - } - - return array(null, $this->Value()); - } -} diff --git a/core/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/FileCacheReader.php b/core/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/FileCacheReader.php deleted file mode 100644 index e9b29af..0000000 --- a/core/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/FileCacheReader.php +++ /dev/null @@ -1,252 +0,0 @@ -. - */ - -namespace Doctrine\Common\Annotations; - -/** - * File cache reader for annotations. - * - * @author Johannes M. Schmitt - * @author Benjamin Eberlei - */ -class FileCacheReader implements Reader -{ - /** - * @var Reader - */ - private $reader; - - /** - * @var string - */ - private $dir; - - /** - * @var bool - */ - private $debug; - - /** - * @var array - */ - private $loadedAnnotations = array(); - - /** - * @var array - */ - private $classNameHashes = array(); - - /** - * Constructor. - * - * @param Reader $reader - * @param string $cacheDir - * @param boolean $debug - * - * @throws \InvalidArgumentException - */ - public function __construct(Reader $reader, $cacheDir, $debug = false) - { - $this->reader = $reader; - if (!is_dir($cacheDir) && !@mkdir($cacheDir, 0777, true)) { - throw new \InvalidArgumentException(sprintf('The directory "%s" does not exist and could not be created.', $cacheDir)); - } - - $this->dir = rtrim($cacheDir, '\\/'); - $this->debug = $debug; - } - - /** - * {@inheritDoc} - */ - public function getClassAnnotations(\ReflectionClass $class) - { - if ( ! isset($this->classNameHashes[$class->name])) { - $this->classNameHashes[$class->name] = sha1($class->name); - } - $key = $this->classNameHashes[$class->name]; - - if (isset($this->loadedAnnotations[$key])) { - return $this->loadedAnnotations[$key]; - } - - $path = $this->dir.'/'.strtr($key, '\\', '-').'.cache.php'; - if (!is_file($path)) { - $annot = $this->reader->getClassAnnotations($class); - $this->saveCacheFile($path, $annot); - return $this->loadedAnnotations[$key] = $annot; - } - - if ($this->debug - && (false !== $filename = $class->getFilename()) - && filemtime($path) < filemtime($filename)) { - @unlink($path); - - $annot = $this->reader->getClassAnnotations($class); - $this->saveCacheFile($path, $annot); - return $this->loadedAnnotations[$key] = $annot; - } - - return $this->loadedAnnotations[$key] = include $path; - } - - /** - * {@inheritDoc} - */ - public function getPropertyAnnotations(\ReflectionProperty $property) - { - $class = $property->getDeclaringClass(); - if ( ! isset($this->classNameHashes[$class->name])) { - $this->classNameHashes[$class->name] = sha1($class->name); - } - $key = $this->classNameHashes[$class->name].'$'.$property->getName(); - - if (isset($this->loadedAnnotations[$key])) { - return $this->loadedAnnotations[$key]; - } - - $path = $this->dir.'/'.strtr($key, '\\', '-').'.cache.php'; - if (!is_file($path)) { - $annot = $this->reader->getPropertyAnnotations($property); - $this->saveCacheFile($path, $annot); - return $this->loadedAnnotations[$key] = $annot; - } - - if ($this->debug - && (false !== $filename = $class->getFilename()) - && filemtime($path) < filemtime($filename)) { - @unlink($path); - - $annot = $this->reader->getPropertyAnnotations($property); - $this->saveCacheFile($path, $annot); - return $this->loadedAnnotations[$key] = $annot; - } - - return $this->loadedAnnotations[$key] = include $path; - } - - /** - * {@inheritDoc} - */ - public function getMethodAnnotations(\ReflectionMethod $method) - { - $class = $method->getDeclaringClass(); - if ( ! isset($this->classNameHashes[$class->name])) { - $this->classNameHashes[$class->name] = sha1($class->name); - } - $key = $this->classNameHashes[$class->name].'#'.$method->getName(); - - if (isset($this->loadedAnnotations[$key])) { - return $this->loadedAnnotations[$key]; - } - - $path = $this->dir.'/'.strtr($key, '\\', '-').'.cache.php'; - if (!is_file($path)) { - $annot = $this->reader->getMethodAnnotations($method); - $this->saveCacheFile($path, $annot); - return $this->loadedAnnotations[$key] = $annot; - } - - if ($this->debug - && (false !== $filename = $class->getFilename()) - && filemtime($path) < filemtime($filename)) { - @unlink($path); - - $annot = $this->reader->getMethodAnnotations($method); - $this->saveCacheFile($path, $annot); - return $this->loadedAnnotations[$key] = $annot; - } - - return $this->loadedAnnotations[$key] = include $path; - } - - /** - * Saves the cache file. - * - * @param string $path - * @param mixed $data - * - * @return void - */ - private function saveCacheFile($path, $data) - { - if (!is_writable($this->dir)) { - throw new \InvalidArgumentException(sprintf('The directory "%s" is not writable. Both, the webserver and the console user need access. You can manage access rights for multiple users with "chmod +a". If your system does not support this, check out the acl package.', $this->dir)); - } - file_put_contents($path, 'getClassAnnotations($class); - - foreach ($annotations as $annotation) { - if ($annotation instanceof $annotationName) { - return $annotation; - } - } - - return null; - } - - /** - * {@inheritDoc} - */ - public function getMethodAnnotation(\ReflectionMethod $method, $annotationName) - { - $annotations = $this->getMethodAnnotations($method); - - foreach ($annotations as $annotation) { - if ($annotation instanceof $annotationName) { - return $annotation; - } - } - - return null; - } - - /** - * {@inheritDoc} - */ - public function getPropertyAnnotation(\ReflectionProperty $property, $annotationName) - { - $annotations = $this->getPropertyAnnotations($property); - - foreach ($annotations as $annotation) { - if ($annotation instanceof $annotationName) { - return $annotation; - } - } - - return null; - } - - /** - * Clears loaded annotations. - * - * @return void - */ - public function clearLoadedAnnotations() - { - $this->loadedAnnotations = array(); - } -} diff --git a/core/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/IndexedReader.php b/core/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/IndexedReader.php deleted file mode 100644 index bf7fbdc..0000000 --- a/core/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/IndexedReader.php +++ /dev/null @@ -1,119 +0,0 @@ -. - */ - -namespace Doctrine\Common\Annotations; - -/** - * Allows the reader to be used in-place of Doctrine's reader. - * - * @author Johannes M. Schmitt - */ -class IndexedReader implements Reader -{ - /** - * @var Reader - */ - private $delegate; - - /** - * Constructor. - * - * @param Reader $reader - */ - public function __construct(Reader $reader) - { - $this->delegate = $reader; - } - - /** - * {@inheritDoc} - */ - public function getClassAnnotations(\ReflectionClass $class) - { - $annotations = array(); - foreach ($this->delegate->getClassAnnotations($class) as $annot) { - $annotations[get_class($annot)] = $annot; - } - - return $annotations; - } - - /** - * {@inheritDoc} - */ - public function getClassAnnotation(\ReflectionClass $class, $annotation) - { - return $this->delegate->getClassAnnotation($class, $annotation); - } - - /** - * {@inheritDoc} - */ - public function getMethodAnnotations(\ReflectionMethod $method) - { - $annotations = array(); - foreach ($this->delegate->getMethodAnnotations($method) as $annot) { - $annotations[get_class($annot)] = $annot; - } - - return $annotations; - } - - /** - * {@inheritDoc} - */ - public function getMethodAnnotation(\ReflectionMethod $method, $annotation) - { - return $this->delegate->getMethodAnnotation($method, $annotation); - } - - /** - * {@inheritDoc} - */ - public function getPropertyAnnotations(\ReflectionProperty $property) - { - $annotations = array(); - foreach ($this->delegate->getPropertyAnnotations($property) as $annot) { - $annotations[get_class($annot)] = $annot; - } - - return $annotations; - } - - /** - * {@inheritDoc} - */ - public function getPropertyAnnotation(\ReflectionProperty $property, $annotation) - { - return $this->delegate->getPropertyAnnotation($property, $annotation); - } - - /** - * Proxies all methods to the delegate. - * - * @param string $method - * @param array $args - * - * @return mixed - */ - public function __call($method, $args) - { - return call_user_func_array(array($this->delegate, $method), $args); - } -} diff --git a/core/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/PhpParser.php b/core/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/PhpParser.php deleted file mode 100644 index 21ee7cc..0000000 --- a/core/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/PhpParser.php +++ /dev/null @@ -1,91 +0,0 @@ -. - */ - -namespace Doctrine\Common\Annotations; - -use SplFileObject; - -/** - * Parses a file for namespaces/use/class declarations. - * - * @author Fabien Potencier - * @author Christian Kaps - */ -final class PhpParser -{ - /** - * Parses a class. - * - * @param \ReflectionClass $class A ReflectionClass object. - * - * @return array A list with use statements in the form (Alias => FQN). - */ - public function parseClass(\ReflectionClass $class) - { - if (method_exists($class, 'getUseStatements')) { - return $class->getUseStatements(); - } - - if (false === $filename = $class->getFilename()) { - return array(); - } - - $content = $this->getFileContent($filename, $class->getStartLine()); - - if (null === $content) { - return array(); - } - - $namespace = preg_quote($class->getNamespaceName()); - $content = preg_replace('/^.*?(\bnamespace\s+' . $namespace . '\s*[;{].*)$/s', '\\1', $content); - $tokenizer = new TokenParser('parseUseStatements($class->getNamespaceName()); - - return $statements; - } - - /** - * Gets the content of the file right up to the given line number. - * - * @param string $filename The name of the file to load. - * @param integer $lineNumber The number of lines to read from file. - * - * @return string The content of the file. - */ - private function getFileContent($filename, $lineNumber) - { - if ( ! is_file($filename)) { - return null; - } - - $content = ''; - $lineCnt = 0; - $file = new SplFileObject($filename); - while (!$file->eof()) { - if ($lineCnt++ == $lineNumber) { - break; - } - - $content .= $file->fgets(); - } - - return $content; - } -} diff --git a/core/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Reader.php b/core/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Reader.php deleted file mode 100644 index 4774f87..0000000 --- a/core/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Reader.php +++ /dev/null @@ -1,89 +0,0 @@ -. - */ - -namespace Doctrine\Common\Annotations; - -/** - * Interface for annotation readers. - * - * @author Johannes M. Schmitt - */ -interface Reader -{ - /** - * Gets the annotations applied to a class. - * - * @param \ReflectionClass $class The ReflectionClass of the class from which - * the class annotations should be read. - * - * @return array An array of Annotations. - */ - function getClassAnnotations(\ReflectionClass $class); - - /** - * Gets a class annotation. - * - * @param \ReflectionClass $class The ReflectionClass of the class from which - * the class annotations should be read. - * @param string $annotationName The name of the annotation. - * - * @return object|null The Annotation or NULL, if the requested annotation does not exist. - */ - function getClassAnnotation(\ReflectionClass $class, $annotationName); - - /** - * Gets the annotations applied to a method. - * - * @param \ReflectionMethod $method The ReflectionMethod of the method from which - * the annotations should be read. - * - * @return array An array of Annotations. - */ - function getMethodAnnotations(\ReflectionMethod $method); - - /** - * Gets a method annotation. - * - * @param \ReflectionMethod $method The ReflectionMethod to read the annotations from. - * @param string $annotationName The name of the annotation. - * - * @return object|null The Annotation or NULL, if the requested annotation does not exist. - */ - function getMethodAnnotation(\ReflectionMethod $method, $annotationName); - - /** - * Gets the annotations applied to a property. - * - * @param \ReflectionProperty $property The ReflectionProperty of the property - * from which the annotations should be read. - * - * @return array An array of Annotations. - */ - function getPropertyAnnotations(\ReflectionProperty $property); - - /** - * Gets a property annotation. - * - * @param \ReflectionProperty $property The ReflectionProperty to read the annotations from. - * @param string $annotationName The name of the annotation. - * - * @return object|null The Annotation or NULL, if the requested annotation does not exist. - */ - function getPropertyAnnotation(\ReflectionProperty $property, $annotationName); -} diff --git a/core/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/SimpleAnnotationReader.php b/core/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/SimpleAnnotationReader.php deleted file mode 100644 index d4757ee..0000000 --- a/core/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/SimpleAnnotationReader.php +++ /dev/null @@ -1,127 +0,0 @@ -. - */ - -namespace Doctrine\Common\Annotations; - -/** - * Simple Annotation Reader. - * - * This annotation reader is intended to be used in projects where you have - * full-control over all annotations that are available. - * - * @since 2.2 - * @author Johannes M. Schmitt - * @author Fabio B. Silva - */ -class SimpleAnnotationReader implements Reader -{ - /** - * @var DocParser - */ - private $parser; - - /** - * Constructor. - * - * Initializes a new SimpleAnnotationReader. - */ - public function __construct() - { - $this->parser = new DocParser(); - $this->parser->setIgnoreNotImportedAnnotations(true); - } - - /** - * Adds a namespace in which we will look for annotations. - * - * @param string $namespace - * - * @return void - */ - public function addNamespace($namespace) - { - $this->parser->addNamespace($namespace); - } - - /** - * {@inheritDoc} - */ - public function getClassAnnotations(\ReflectionClass $class) - { - return $this->parser->parse($class->getDocComment(), 'class '.$class->getName()); - } - - /** - * {@inheritDoc} - */ - public function getMethodAnnotations(\ReflectionMethod $method) - { - return $this->parser->parse($method->getDocComment(), 'method '.$method->getDeclaringClass()->name.'::'.$method->getName().'()'); - } - - /** - * {@inheritDoc} - */ - public function getPropertyAnnotations(\ReflectionProperty $property) - { - return $this->parser->parse($property->getDocComment(), 'property '.$property->getDeclaringClass()->name.'::$'.$property->getName()); - } - - /** - * {@inheritDoc} - */ - public function getClassAnnotation(\ReflectionClass $class, $annotationName) - { - foreach ($this->getClassAnnotations($class) as $annot) { - if ($annot instanceof $annotationName) { - return $annot; - } - } - - return null; - } - - /** - * {@inheritDoc} - */ - public function getMethodAnnotation(\ReflectionMethod $method, $annotationName) - { - foreach ($this->getMethodAnnotations($method) as $annot) { - if ($annot instanceof $annotationName) { - return $annot; - } - } - - return null; - } - - /** - * {@inheritDoc} - */ - public function getPropertyAnnotation(\ReflectionProperty $property, $annotationName) - { - foreach ($this->getPropertyAnnotations($property) as $annot) { - if ($annot instanceof $annotationName) { - return $annot; - } - } - - return null; - } -} diff --git a/core/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/TokenParser.php b/core/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/TokenParser.php deleted file mode 100644 index 9bdccce..0000000 --- a/core/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/TokenParser.php +++ /dev/null @@ -1,187 +0,0 @@ -. - */ - -namespace Doctrine\Common\Annotations; - -/** - * Parses a file for namespaces/use/class declarations. - * - * @author Fabien Potencier - * @author Christian Kaps - */ -class TokenParser -{ - /** - * The token list. - * - * @var array - */ - private $tokens; - - /** - * The number of tokens. - * - * @var int - */ - private $numTokens; - - /** - * The current array pointer. - * - * @var int - */ - private $pointer = 0; - - /** - * @param string $contents - */ - public function __construct($contents) - { - $this->tokens = token_get_all($contents); - - // The PHP parser sets internal compiler globals for certain things. Annoyingly, the last docblock comment it - // saw gets stored in doc_comment. When it comes to compile the next thing to be include()d this stored - // doc_comment becomes owned by the first thing the compiler sees in the file that it considers might have a - // docblock. If the first thing in the file is a class without a doc block this would cause calls to - // getDocBlock() on said class to return our long lost doc_comment. Argh. - // To workaround, cause the parser to parse an empty docblock. Sure getDocBlock() will return this, but at least - // it's harmless to us. - token_get_all("numTokens = count($this->tokens); - } - - /** - * Gets the next non whitespace and non comment token. - * - * @param boolean $docCommentIsComment If TRUE then a doc comment is considered a comment and skipped. - * If FALSE then only whitespace and normal comments are skipped. - * - * @return array|null The token if exists, null otherwise. - */ - public function next($docCommentIsComment = TRUE) - { - for ($i = $this->pointer; $i < $this->numTokens; $i++) { - $this->pointer++; - if ($this->tokens[$i][0] === T_WHITESPACE || - $this->tokens[$i][0] === T_COMMENT || - ($docCommentIsComment && $this->tokens[$i][0] === T_DOC_COMMENT)) { - - continue; - } - - return $this->tokens[$i]; - } - - return null; - } - - /** - * Parses a single use statement. - * - * @return array A list with all found class names for a use statement. - */ - public function parseUseStatement() - { - $class = ''; - $alias = ''; - $statements = array(); - $explicitAlias = false; - while (($token = $this->next())) { - $isNameToken = $token[0] === T_STRING || $token[0] === T_NS_SEPARATOR; - if (!$explicitAlias && $isNameToken) { - $class .= $token[1]; - $alias = $token[1]; - } else if ($explicitAlias && $isNameToken) { - $alias .= $token[1]; - } else if ($token[0] === T_AS) { - $explicitAlias = true; - $alias = ''; - } else if ($token === ',') { - $statements[strtolower($alias)] = $class; - $class = ''; - $alias = ''; - $explicitAlias = false; - } else if ($token === ';') { - $statements[strtolower($alias)] = $class; - break; - } else { - break; - } - } - - return $statements; - } - - /** - * Gets all use statements. - * - * @param string $namespaceName The namespace name of the reflected class. - * - * @return array A list with all found use statements. - */ - public function parseUseStatements($namespaceName) - { - $statements = array(); - while (($token = $this->next())) { - if ($token[0] === T_USE) { - $statements = array_merge($statements, $this->parseUseStatement()); - continue; - } - if ($token[0] !== T_NAMESPACE || $this->parseNamespace() != $namespaceName) { - continue; - } - - // Get fresh array for new namespace. This is to prevent the parser to collect the use statements - // for a previous namespace with the same name. This is the case if a namespace is defined twice - // or if a namespace with the same name is commented out. - $statements = array(); - } - - return $statements; - } - - /** - * Gets the namespace. - * - * @return string The found namespace. - */ - public function parseNamespace() - { - $name = ''; - while (($token = $this->next()) && ($token[0] === T_STRING || $token[0] === T_NS_SEPARATOR)) { - $name .= $token[1]; - } - - return $name; - } - - /** - * Gets the class name. - * - * @return string The found class name. - */ - public function parseClass() - { - // Namespaces and class names are tokenized the same: T_STRINGs - // separated by T_NS_SEPARATOR so we can use one function to provide - // both. - return $this->parseNamespace(); - } -} diff --git a/core/vendor/doctrine/annotations/phpunit.xml.dist b/core/vendor/doctrine/annotations/phpunit.xml.dist deleted file mode 100644 index 6ab0c8c..0000000 --- a/core/vendor/doctrine/annotations/phpunit.xml.dist +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - ./tests/Doctrine/ - - - - - - ./lib/Doctrine/ - - - - - - performance - - - diff --git a/core/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/AbstractReaderTest.php b/core/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/AbstractReaderTest.php deleted file mode 100644 index dd324bd..0000000 --- a/core/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/AbstractReaderTest.php +++ /dev/null @@ -1,645 +0,0 @@ -getReflectionClass(); - $reader = $this->getReader(); - - $this->assertEquals(1, count($reader->getClassAnnotations($class))); - $this->assertInstanceOf($annotName = 'Doctrine\Tests\Common\Annotations\DummyAnnotation', $annot = $reader->getClassAnnotation($class, $annotName)); - $this->assertEquals("hello", $annot->dummyValue); - - $field1Prop = $class->getProperty('field1'); - $propAnnots = $reader->getPropertyAnnotations($field1Prop); - $this->assertEquals(1, count($propAnnots)); - $this->assertInstanceOf($annotName, $annot = $reader->getPropertyAnnotation($field1Prop, $annotName)); - $this->assertEquals("fieldHello", $annot->dummyValue); - - $getField1Method = $class->getMethod('getField1'); - $methodAnnots = $reader->getMethodAnnotations($getField1Method); - $this->assertEquals(1, count($methodAnnots)); - $this->assertInstanceOf($annotName, $annot = $reader->getMethodAnnotation($getField1Method, $annotName)); - $this->assertEquals(array(1, 2, "three"), $annot->value); - - $field2Prop = $class->getProperty('field2'); - $propAnnots = $reader->getPropertyAnnotations($field2Prop); - $this->assertEquals(1, count($propAnnots)); - $this->assertInstanceOf($annotName = 'Doctrine\Tests\Common\Annotations\DummyJoinTable', $joinTableAnnot = $reader->getPropertyAnnotation($field2Prop, $annotName)); - $this->assertEquals(1, count($joinTableAnnot->joinColumns)); - $this->assertEquals(1, count($joinTableAnnot->inverseJoinColumns)); - $this->assertTrue($joinTableAnnot->joinColumns[0] instanceof DummyJoinColumn); - $this->assertTrue($joinTableAnnot->inverseJoinColumns[0] instanceof DummyJoinColumn); - $this->assertEquals('col1', $joinTableAnnot->joinColumns[0]->name); - $this->assertEquals('col2', $joinTableAnnot->joinColumns[0]->referencedColumnName); - $this->assertEquals('col3', $joinTableAnnot->inverseJoinColumns[0]->name); - $this->assertEquals('col4', $joinTableAnnot->inverseJoinColumns[0]->referencedColumnName); - - $dummyAnnot = $reader->getMethodAnnotation($class->getMethod('getField1'), 'Doctrine\Tests\Common\Annotations\DummyAnnotation'); - $this->assertEquals('', $dummyAnnot->dummyValue); - $this->assertEquals(array(1, 2, 'three'), $dummyAnnot->value); - - $dummyAnnot = $reader->getPropertyAnnotation($class->getProperty('field1'), 'Doctrine\Tests\Common\Annotations\DummyAnnotation'); - $this->assertEquals('fieldHello', $dummyAnnot->dummyValue); - - $classAnnot = $reader->getClassAnnotation($class, 'Doctrine\Tests\Common\Annotations\DummyAnnotation'); - $this->assertEquals('hello', $classAnnot->dummyValue); - } - - public function testAnnotationsWithValidTargets() - { - $reader = $this->getReader(); - $class = new ReflectionClass('Doctrine\Tests\Common\Annotations\Fixtures\ClassWithValidAnnotationTarget'); - - $this->assertEquals(1,count($reader->getClassAnnotations($class))); - $this->assertEquals(1,count($reader->getPropertyAnnotations($class->getProperty('foo')))); - $this->assertEquals(1,count($reader->getMethodAnnotations($class->getMethod('someFunction')))); - $this->assertEquals(1,count($reader->getPropertyAnnotations($class->getProperty('nested')))); - } - - public function testAnnotationsWithVarType() - { - $reader = $this->getReader(); - $class = new ReflectionClass('Doctrine\Tests\Common\Annotations\Fixtures\ClassWithAnnotationWithVarType'); - - $this->assertEquals(1,count($fooAnnot = $reader->getPropertyAnnotations($class->getProperty('foo')))); - $this->assertEquals(1,count($barAnnot = $reader->getMethodAnnotations($class->getMethod('bar')))); - - $this->assertInternalType('string', $fooAnnot[0]->string); - $this->assertInstanceOf('Doctrine\Tests\Common\Annotations\Fixtures\AnnotationTargetAll', $barAnnot[0]->annotation); - } - - public function testAtInDescription() - { - $reader = $this->getReader(); - $class = new ReflectionClass('Doctrine\Tests\Common\Annotations\Fixtures\ClassWithAtInDescriptionAndAnnotation'); - - $this->assertEquals(1, count($fooAnnot = $reader->getPropertyAnnotations($class->getProperty('foo')))); - $this->assertEquals(1, count($barAnnot = $reader->getPropertyAnnotations($class->getProperty('bar')))); - - $this->assertInstanceOf('Doctrine\Tests\Common\Annotations\Fixtures\AnnotationTargetPropertyMethod', $fooAnnot[0]); - $this->assertInstanceOf('Doctrine\Tests\Common\Annotations\Fixtures\AnnotationTargetPropertyMethod', $barAnnot[0]); - } - - public function testClassWithWithDanglingComma() - { - $reader = $this->getReader(); - $annots = $reader->getClassAnnotations(new \ReflectionClass('Doctrine\Tests\Common\Annotations\DummyClassWithDanglingComma')); - - $this->assertCount(1, $annots); - } - - /** - * @expectedException \Doctrine\Common\Annotations\AnnotationException - * @expectedExceptionMessage [Semantical Error] Annotation @AnnotationTargetPropertyMethod is not allowed to be declared on class Doctrine\Tests\Common\Annotations\Fixtures\ClassWithInvalidAnnotationTargetAtClass. You may only use this annotation on these code elements: METHOD, PROPERTY - */ - public function testClassWithInvalidAnnotationTargetAtClassDocBlock() - { - $reader = $this->getReader(); - $reader->getClassAnnotations(new \ReflectionClass('Doctrine\Tests\Common\Annotations\Fixtures\ClassWithInvalidAnnotationTargetAtClass')); - } - - public function testClassWithWithInclude() - { - $reader = $this->getReader(); - $annots = $reader->getClassAnnotations(new \ReflectionClass('Doctrine\Tests\Common\Annotations\Fixtures\ClassWithRequire')); - $this->assertCount(1, $annots); - } - - /** - * @expectedException \Doctrine\Common\Annotations\AnnotationException - * @expectedExceptionMessage [Semantical Error] Annotation @AnnotationTargetClass is not allowed to be declared on property Doctrine\Tests\Common\Annotations\Fixtures\ClassWithInvalidAnnotationTargetAtProperty::$foo. You may only use this annotation on these code elements: CLASS - */ - public function testClassWithInvalidAnnotationTargetAtPropertyDocBlock() - { - $reader = $this->getReader(); - $reader->getPropertyAnnotations(new \ReflectionProperty('Doctrine\Tests\Common\Annotations\Fixtures\ClassWithInvalidAnnotationTargetAtProperty', 'foo')); - } - - /** - * @expectedException \Doctrine\Common\Annotations\AnnotationException - * @expectedExceptionMessage [Semantical Error] Annotation @AnnotationTargetAnnotation is not allowed to be declared on property Doctrine\Tests\Common\Annotations\Fixtures\ClassWithInvalidAnnotationTargetAtProperty::$bar. You may only use this annotation on these code elements: ANNOTATION - */ - public function testClassWithInvalidNestedAnnotationTargetAtPropertyDocBlock() - { - $reader = $this->getReader(); - $reader->getPropertyAnnotations(new \ReflectionProperty('Doctrine\Tests\Common\Annotations\Fixtures\ClassWithInvalidAnnotationTargetAtProperty', 'bar')); - } - - /** - * @expectedException \Doctrine\Common\Annotations\AnnotationException - * @expectedExceptionMessage [Semantical Error] Annotation @AnnotationTargetClass is not allowed to be declared on method Doctrine\Tests\Common\Annotations\Fixtures\ClassWithInvalidAnnotationTargetAtMethod::functionName(). You may only use this annotation on these code elements: CLASS - */ - public function testClassWithInvalidAnnotationTargetAtMethodDocBlock() - { - $reader = $this->getReader(); - $reader->getMethodAnnotations(new \ReflectionMethod('Doctrine\Tests\Common\Annotations\Fixtures\ClassWithInvalidAnnotationTargetAtMethod', 'functionName')); - } - - /** - * @expectedException \Doctrine\Common\Annotations\AnnotationException - * @expectedExceptionMessage Expected namespace separator or identifier, got ')' at position 24 in class @Doctrine\Tests\Common\Annotations\Fixtures\AnnotationWithTargetSyntaxError. - */ - public function testClassWithAnnotationWithTargetSyntaxErrorAtClassDocBlock() - { - $reader = $this->getReader(); - $reader->getClassAnnotations(new \ReflectionClass('Doctrine\Tests\Common\Annotations\Fixtures\ClassWithAnnotationWithTargetSyntaxError')); - } - - /** - * @expectedException \Doctrine\Common\Annotations\AnnotationException - * @expectedExceptionMessage Expected namespace separator or identifier, got ')' at position 24 in class @Doctrine\Tests\Common\Annotations\Fixtures\AnnotationWithTargetSyntaxError. - */ - public function testClassWithAnnotationWithTargetSyntaxErrorAtPropertyDocBlock() - { - $reader = $this->getReader(); - $reader->getPropertyAnnotations(new \ReflectionProperty('Doctrine\Tests\Common\Annotations\Fixtures\ClassWithAnnotationWithTargetSyntaxError','foo')); - } - - /** - * @expectedException \Doctrine\Common\Annotations\AnnotationException - * @expectedExceptionMessage Expected namespace separator or identifier, got ')' at position 24 in class @Doctrine\Tests\Common\Annotations\Fixtures\AnnotationWithTargetSyntaxError. - */ - public function testClassWithAnnotationWithTargetSyntaxErrorAtMethodDocBlock() - { - $reader = $this->getReader(); - $reader->getMethodAnnotations(new \ReflectionMethod('Doctrine\Tests\Common\Annotations\Fixtures\ClassWithAnnotationWithTargetSyntaxError','bar')); - } - - /** - * @expectedException \Doctrine\Common\Annotations\AnnotationException - * @expectedExceptionMessage [Type Error] Attribute "string" of @AnnotationWithVarType declared on property Doctrine\Tests\Common\Annotations\Fixtures\ClassWithAnnotationWithVarType::$invalidProperty expects a(n) string, but got integer. - */ - public function testClassWithPropertyInvalidVarTypeError() - { - $reader = $this->getReader(); - $class = new ReflectionClass('Doctrine\Tests\Common\Annotations\Fixtures\ClassWithAnnotationWithVarType'); - - $reader->getPropertyAnnotations($class->getProperty('invalidProperty')); - } - - /** - * @expectedException \Doctrine\Common\Annotations\AnnotationException - * @expectedExceptionMessage [Type Error] Attribute "annotation" of @AnnotationWithVarType declared on method Doctrine\Tests\Common\Annotations\Fixtures\ClassWithAnnotationWithVarType::invalidMethod() expects a(n) Doctrine\Tests\Common\Annotations\Fixtures\AnnotationTargetAll, but got an instance of Doctrine\Tests\Common\Annotations\Fixtures\AnnotationTargetAnnotation. - */ - public function testClassWithMethodInvalidVarTypeError() - { - $reader = $this->getReader(); - $class = new ReflectionClass('Doctrine\Tests\Common\Annotations\Fixtures\ClassWithAnnotationWithVarType'); - - $reader->getMethodAnnotations($class->getMethod('invalidMethod')); - } - - /** - * @expectedException \Doctrine\Common\Annotations\AnnotationException - * @expectedExceptionMessage Expected namespace separator or identifier, got ')' at position 18 in class Doctrine\Tests\Common\Annotations\DummyClassSyntaxError. - */ - public function testClassSyntaxErrorContext() - { - $reader = $this->getReader(); - $reader->getClassAnnotations(new \ReflectionClass('Doctrine\Tests\Common\Annotations\DummyClassSyntaxError')); - } - - /** - * @expectedException \Doctrine\Common\Annotations\AnnotationException - * @expectedExceptionMessage Expected namespace separator or identifier, got ')' at position 18 in method Doctrine\Tests\Common\Annotations\DummyClassMethodSyntaxError::foo(). - */ - public function testMethodSyntaxErrorContext() - { - $reader = $this->getReader(); - $reader->getMethodAnnotations(new \ReflectionMethod('Doctrine\Tests\Common\Annotations\DummyClassMethodSyntaxError', 'foo')); - } - - /** - * @expectedException \Doctrine\Common\Annotations\AnnotationException - * @expectedExceptionMessage Expected namespace separator or identifier, got ')' at position 18 in property Doctrine\Tests\Common\Annotations\DummyClassPropertySyntaxError::$foo. - */ - public function testPropertySyntaxErrorContext() - { - $reader = $this->getReader(); - $reader->getPropertyAnnotations(new \ReflectionProperty('Doctrine\Tests\Common\Annotations\DummyClassPropertySyntaxError', 'foo')); - } - - /** - * @group regression - */ - public function testMultipleAnnotationsOnSameLine() - { - $reader = $this->getReader(); - $annots = $reader->getPropertyAnnotations(new \ReflectionProperty('Doctrine\Tests\Common\Annotations\DummyClass2', 'id')); - $this->assertEquals(3, count($annots)); - } - - public function testNonAnnotationProblem() - { - $reader = $this->getReader(); - - $this->assertNotNull($annot = $reader->getPropertyAnnotation(new \ReflectionProperty('Doctrine\Tests\Common\Annotations\DummyClassNonAnnotationProblem', 'foo'), $name = 'Doctrine\Tests\Common\Annotations\DummyAnnotation')); - $this->assertInstanceOf($name, $annot); - } - - public function testIncludeIgnoreAnnotation() - { - $reader = $this->getReader(); - - $reader->getPropertyAnnotations(new \ReflectionProperty('Doctrine\Tests\Common\Annotations\Fixtures\ClassWithIgnoreAnnotation', 'foo')); - $this->assertFalse(class_exists('Doctrine\Tests\Common\Annotations\Fixtures\IgnoreAnnotationClass', false)); - } - - public function testImportWithConcreteAnnotation() - { - $reader = $this->getReader(); - $property = new \ReflectionProperty('Doctrine\Tests\Common\Annotations\TestImportWithConcreteAnnotation', 'field'); - $annotations = $reader->getPropertyAnnotations($property); - $this->assertEquals(1, count($annotations)); - $this->assertNotNull($reader->getPropertyAnnotation($property, 'Doctrine\Tests\Common\Annotations\DummyAnnotation')); - } - - public function testImportWithInheritance() - { - $reader = $this->getReader(); - - $class = new TestParentClass(); - $ref = new \ReflectionClass($class); - - $childAnnotations = $reader->getPropertyAnnotations($ref->getProperty('child')); - $this->assertEquals(1, count($childAnnotations)); - $this->assertInstanceOf('Doctrine\Tests\Common\Annotations\Foo\Name', reset($childAnnotations)); - - $parentAnnotations = $reader->getPropertyAnnotations($ref->getProperty('parent')); - $this->assertEquals(1, count($parentAnnotations)); - $this->assertInstanceOf('Doctrine\Tests\Common\Annotations\Bar\Name', reset($parentAnnotations)); - } - - /** - * @expectedException \Doctrine\Common\Annotations\AnnotationException - * @expectedExceptionMessage The annotation "@NameFoo" in property Doctrine\Tests\Common\Annotations\TestAnnotationNotImportedClass::$field was never imported. - */ - public function testImportDetectsNotImportedAnnotation() - { - $reader = $this->getReader(); - $reader->getPropertyAnnotations(new \ReflectionProperty('Doctrine\Tests\Common\Annotations\TestAnnotationNotImportedClass', 'field')); - } - - /** - * @expectedException \Doctrine\Common\Annotations\AnnotationException - * @expectedExceptionMessage The annotation "@Foo\Bar\Name" in property Doctrine\Tests\Common\Annotations\TestNonExistentAnnotationClass::$field was never imported. - */ - public function testImportDetectsNonExistentAnnotation() - { - $reader = $this->getReader(); - $reader->getPropertyAnnotations(new \ReflectionProperty('Doctrine\Tests\Common\Annotations\TestNonExistentAnnotationClass', 'field')); - } - - public function testTopLevelAnnotation() - { - $reader = $this->getReader(); - $annotations = $reader->getPropertyAnnotations(new \ReflectionProperty('Doctrine\Tests\Common\Annotations\TestTopLevelAnnotationClass', 'field')); - - $this->assertEquals(1, count($annotations)); - $this->assertInstanceOf('\TopLevelAnnotation', reset($annotations)); - } - - public function testIgnoresAnnotationsNotPrefixedWithWhitespace() - { - $reader = $this->getReader(); - - $annotation = $reader->getClassAnnotation(new \ReflectionClass(new TestIgnoresNonAnnotationsClass()), 'Doctrine\Tests\Common\Annotations\Name'); - $this->assertInstanceOf('Doctrine\Tests\Common\Annotations\Name', $annotation); - } - - private static $testResetsPhpParserAfterUseRun = false; - - /** - * When getUseStatements isn't available on ReflectionClass the PhpParser has to use token_get_all(). If that - * happens various PHP compiler globals get set, and these can have seriously bad effects on the next file to be - * parsed. - * Notably the doc_comment compiler global can end up containing a docblock comment. The next file to be parsed - * on an include() will have this docblock comment attached to the first thing in the file that the compiler - * considers to own comments. If this is a class then any later calls to getDocComment() for that class will have - * undesirable effects. *sigh* - */ - public function testResetsPhpParserAfterUse() - { - // If someone has already included our main test fixture this test is invalid. It's important that our require - // causes this file to be parsed and compiled at a certain point. - $this->assertFalse(!self::$testResetsPhpParserAfterUseRun && class_exists('Doctrine_Tests_Common_Annotations_Fixtures_ClassNoNamespaceNoComment'), 'Test invalid if class has already been compiled'); - self::$testResetsPhpParserAfterUseRun = true; - - $reader = $this->getReader(); - - // First make sure the annotation cache knows about the annotations we want to use. - // If we don't do this then loading of annotations into the cache will cause the parser to get out of the bad - // state we want to test. - $class = new ReflectionClass('Doctrine\Tests\Common\Annotations\Fixtures\ClassWithValidAnnotationTarget'); - $reader->getClassAnnotations($class); - - // Now import an incredibly dull class which makes use of the same class level annotation that the previous class does. - $class = new ReflectionClass('Doctrine\Tests\Common\Annotations\Fixtures\ClassWithClassAnnotationOnly'); - $annotations = $reader->getClassAnnotations($class); - - // This include needs to be here since we need the PHP compiler to run over it as the next thing the PHP - // parser sees since PhpParser called token_get_all() on the intro to ClassWithClassAnnotationOnly. - // Our test class cannot be in a namespace (some versions of PHP reset the doc_comment compiler global when - // you hit a namespace declaration), so cannot be autoloaded. - require_once __DIR__ . '/Fixtures/ClassNoNamespaceNoComment.php'; - - // So, hopefully, if all has gone OK, our class with class annotations should actually have them. - // If this fails then something is quite badly wrong elsewhere. - // Note that if this happens before the require it can cause other PHP files to be included, resetting the - // compiler global state, and invalidating this test case. - $this->assertNotEmpty($annotations); - - $annotations = $reader->getClassAnnotations(new \ReflectionClass(new \Doctrine_Tests_Common_Annotations_Fixtures_ClassNoNamespaceNoComment())); - // And if our workaround for this bug is OK, our class with no doc comment should not have any class annotations. - $this->assertEmpty($annotations); - } - - /** - * @expectedException \Doctrine\Common\Annotations\AnnotationException - * @expectedExceptionMessage The class "Doctrine\Tests\Common\Annotations\Fixtures\NoAnnotation" is not annotated with @Annotation. Are you sure this class can be used as annotation? If so, then you need to add @Annotation to the _class_ doc comment of "Doctrine\Tests\Common\Annotations\Fixtures\NoAnnotation". If it is indeed no annotation, then you need to add @IgnoreAnnotation("NoAnnotation") to the _class_ doc comment of class Doctrine\Tests\Common\Annotations\Fixtures\InvalidAnnotationUsageClass. - */ - public function testErrorWhenInvalidAnnotationIsUsed() - { - $reader = $this->getReader(); - $ref = new \ReflectionClass('Doctrine\Tests\Common\Annotations\Fixtures\InvalidAnnotationUsageClass'); - $reader->getClassAnnotations($ref); - } - - public function testInvalidAnnotationUsageButIgnoredClass() - { - $reader = $this->getReader(); - $ref = new \ReflectionClass('Doctrine\Tests\Common\Annotations\Fixtures\InvalidAnnotationUsageButIgnoredClass'); - $annots = $reader->getClassAnnotations($ref); - - $this->assertEquals(2, count($annots)); - } - - /** - * @group DDC-1660 - * @group regression - */ - public function testInvalidAnnotationButIgnored() - { - $reader = $this->getReader(); - $class = new \ReflectionClass('Doctrine\Tests\Common\Annotations\Fixtures\ClassDDC1660'); - - $this->assertTrue(class_exists('Doctrine\Tests\Common\Annotations\Fixtures\Annotation\Version')); - $this->assertCount(0, $reader->getClassAnnotations($class)); - $this->assertCount(0, $reader->getMethodAnnotations($class->getMethod('bar'))); - $this->assertCount(0, $reader->getPropertyAnnotations($class->getProperty('foo'))); - } - - public function testAnnotationEnumeratorException() - { - $reader = $this->getReader(); - $class = new \ReflectionClass('Doctrine\Tests\Common\Annotations\Fixtures\ClassWithAnnotationEnum'); - - $this->assertCount(1, $bar = $reader->getMethodAnnotations($class->getMethod('bar'))); - $this->assertCount(1, $foo = $reader->getPropertyAnnotations($class->getProperty('foo'))); - - $this->assertInstanceOf('Doctrine\Tests\Common\Annotations\Fixtures\AnnotationEnum', $bar[0]); - $this->assertInstanceOf('Doctrine\Tests\Common\Annotations\Fixtures\AnnotationEnum', $foo[0]); - - try { - $reader->getPropertyAnnotations($class->getProperty('invalidProperty')); - $this->fail(); - } catch (\Doctrine\Common\Annotations\AnnotationException $exc) { - $this->assertEquals('[Enum Error] Attribute "value" of @Doctrine\Tests\Common\Annotations\Fixtures\AnnotationEnum declared on property Doctrine\Tests\Common\Annotations\Fixtures\ClassWithAnnotationEnum::$invalidProperty accept only [ONE, TWO, THREE], but got FOUR.', $exc->getMessage()); - } - - try { - $reader->getMethodAnnotations($class->getMethod('invalidMethod')); - $this->fail(); - } catch (\Doctrine\Common\Annotations\AnnotationException $exc) { - $this->assertEquals('[Enum Error] Attribute "value" of @Doctrine\Tests\Common\Annotations\Fixtures\AnnotationEnum declared on method Doctrine\Tests\Common\Annotations\Fixtures\ClassWithAnnotationEnum::invalidMethod() accept only [ONE, TWO, THREE], but got 5.', $exc->getMessage()); - } - } - - /** - * @group DCOM-106 - */ - public function testIgnoreFixMeAndUpperCaseToDo() - { - $reader = $this->getReader(); - $ref = new \ReflectionClass('Doctrine\Tests\Common\Annotations\DCOM106'); - $reader->getClassAnnotations($ref); - } - - /** - * @return AnnotationReader - */ - abstract protected function getReader(); -} - -/** - * @parseAnnotation("var") - * @author Johannes M. Schmitt - * - */ -class TestParseAnnotationClass -{ - /** - * @var - */ - private $field; -} - -/** - * @Name - * @author Johannes M. Schmitt - */ -class TestIgnoresNonAnnotationsClass -{ -} - -class TestTopLevelAnnotationClass -{ - /** - * @\TopLevelAnnotation - */ - private $field; -} - -class TestNonExistentAnnotationClass -{ - /** - * @Foo\Bar\Name - */ - private $field; -} - -class TestAnnotationNotImportedClass -{ - /** - * @NameFoo - */ - private $field; -} - -class TestChildClass -{ - /** - * @\Doctrine\Tests\Common\Annotations\Foo\Name(name = "foo") - */ - protected $child; -} - -class TestParentClass extends TestChildClass -{ - /** - * @\Doctrine\Tests\Common\Annotations\Bar\Name(name = "bar") - */ - private $parent; -} - -class TestImportWithConcreteAnnotation -{ - /** - * @DummyAnnotation(dummyValue = "bar") - */ - private $field; -} - -/** - * @ignoreAnnotation("var") - */ -class DummyClass2 { - /** - * @DummyId @DummyColumn(type="integer") @DummyGeneratedValue - * @var integer - */ - private $id; -} - -/** @Annotation */ -class DummyId extends Annotation {} -/** @Annotation */ -class DummyColumn extends Annotation { - public $type; -} -/** @Annotation */ -class DummyGeneratedValue extends Annotation {} -/** @Annotation */ -class DummyAnnotation extends Annotation { - public $dummyValue; -} - -/** - * @api - * @Annotation - */ -class DummyAnnotationWithIgnoredAnnotation extends Annotation { - public $dummyValue; -} - -/** @Annotation */ -class DummyJoinColumn extends Annotation { - public $name; - public $referencedColumnName; -} -/** @Annotation */ -class DummyJoinTable extends Annotation { - public $name; - public $joinColumns; - public $inverseJoinColumns; -} - -/** - * @DummyAnnotation(dummyValue = "bar",) - */ -class DummyClassWithDanglingComma -{ -} - -/** - * @DummyAnnotation(@) - */ -class DummyClassSyntaxError -{ - -} - -class DummyClassMethodSyntaxError -{ - /** - * @DummyAnnotation(@) - */ - public function foo() - { - - } -} - -class DummyClassPropertySyntaxError -{ - /** - * @DummyAnnotation(@) - */ - public $foo; -} - -/** - * @ignoreAnnotation({"since", "var"}) - */ -class DummyClassNonAnnotationProblem -{ - /** - * @DummyAnnotation - * - * @var \Test - * @since 0.1 - */ - public $foo; -} - - -/** -* @DummyAnnotation Foo bar -*/ -class DummyClassWithEmail -{ - -} - - -/** - * @fixme public - * @TODO - */ -class DCOM106 -{ - -} - -namespace Doctrine\Tests\Common\Annotations\Foo; - -/** @Annotation */ -class Name extends \Doctrine\Common\Annotations\Annotation -{ - public $name; -} - -namespace Doctrine\Tests\Common\Annotations\Bar; - -/** @Annotation */ -class Name extends \Doctrine\Common\Annotations\Annotation -{ - public $name; -} diff --git a/core/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/Annotation/TargetTest.php b/core/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/Annotation/TargetTest.php deleted file mode 100644 index 7627f76..0000000 --- a/core/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/Annotation/TargetTest.php +++ /dev/null @@ -1,47 +0,0 @@ -. - */ - -namespace Doctrine\Tests\Common\Annotations\Annotation; - -use Doctrine\Common\Annotations\Annotation\Target; - -/** - * Tests for {@see \Doctrine\Common\Annotations\Annotation\Target} - * - * @covers \Doctrine\Common\Annotations\Annotation\Target - */ -class TargetTest extends \PHPUnit_Framework_TestCase -{ - /** - * @group DDC-3006 - */ - public function testValidMixedTargets() - { - $target = new Target(array("value" => array("ALL"))); - $this->assertEquals(Target::TARGET_ALL, $target->targets); - - $target = new Target(array("value" => array("METHOD", "METHOD"))); - $this->assertEquals(Target::TARGET_METHOD, $target->targets); - $this->assertNotEquals(Target::TARGET_PROPERTY, $target->targets); - - $target = new Target(array("value" => array("PROPERTY", "METHOD"))); - $this->assertEquals(Target::TARGET_METHOD | Target::TARGET_PROPERTY, $target->targets); - } -} - diff --git a/core/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/AnnotationReaderTest.php b/core/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/AnnotationReaderTest.php deleted file mode 100644 index d6dd056..0000000 --- a/core/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/AnnotationReaderTest.php +++ /dev/null @@ -1,59 +0,0 @@ -markTestSkipped('This test requires PHP 5.4 or later.'); - } - - $reader = $this->getReader(); - $ref = new \ReflectionClass('Doctrine\Tests\Common\Annotations\Fixtures\ClassUsesTrait'); - - $annotations = $reader->getMethodAnnotations($ref->getMethod('someMethod')); - $this->assertInstanceOf('Doctrine\Tests\Common\Annotations\Bar\Autoload', $annotations[0]); - - $annotations = $reader->getMethodAnnotations($ref->getMethod('traitMethod')); - $this->assertInstanceOf('Doctrine\Tests\Common\Annotations\Fixtures\Annotation\Autoload', $annotations[0]); - } - - public function testMethodAnnotationFromOverwrittenTrait() - { - if (PHP_VERSION_ID < 50400) { - $this->markTestSkipped('This test requires PHP 5.4 or later.'); - } - - $reader = $this->getReader(); - $ref = new \ReflectionClass('Doctrine\Tests\Common\Annotations\Fixtures\ClassOverwritesTrait'); - - $annotations = $reader->getMethodAnnotations($ref->getMethod('traitMethod')); - $this->assertInstanceOf('Doctrine\Tests\Common\Annotations\Bar2\Autoload', $annotations[0]); - } - - public function testPropertyAnnotationFromTrait() - { - if (PHP_VERSION_ID < 50400) { - $this->markTestSkipped('This test requires PHP 5.4 or later.'); - } - - $reader = $this->getReader(); - $ref = new \ReflectionClass('Doctrine\Tests\Common\Annotations\Fixtures\ClassUsesTrait'); - - $annotations = $reader->getPropertyAnnotations($ref->getProperty('aProperty')); - $this->assertInstanceOf('Doctrine\Tests\Common\Annotations\Bar\Autoload', $annotations[0]); - - $annotations = $reader->getPropertyAnnotations($ref->getProperty('traitProperty')); - $this->assertInstanceOf('Doctrine\Tests\Common\Annotations\Fixtures\Annotation\Autoload', $annotations[0]); - } - -} \ No newline at end of file diff --git a/core/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/CachedReaderTest.php b/core/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/CachedReaderTest.php deleted file mode 100644 index 5dd89f7..0000000 --- a/core/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/CachedReaderTest.php +++ /dev/null @@ -1,56 +0,0 @@ -getMock('Doctrine\Common\Cache\Cache'); - $cache - ->expects($this->at(0)) - ->method('fetch') - ->with($this->equalTo($cacheKey)) - ->will($this->returnValue(array())) - ; - $cache - ->expects($this->at(1)) - ->method('fetch') - ->with($this->equalTo('[C]'.$cacheKey)) - ->will($this->returnValue(time() - 10)) - ; - $cache - ->expects($this->at(2)) - ->method('save') - ->with($this->equalTo($cacheKey)) - ; - $cache - ->expects($this->at(3)) - ->method('save') - ->with($this->equalTo('[C]'.$cacheKey)) - ; - - $reader = new CachedReader(new AnnotationReader(), $cache, true); - $route = new Route(); - $route->pattern = '/someprefix'; - $this->assertEquals(array($route), $reader->getClassAnnotations(new \ReflectionClass($name))); - } - - protected function getReader() - { - $this->cache = new ArrayCache(); - return new CachedReader(new AnnotationReader(), $this->cache); - } -} \ No newline at end of file diff --git a/core/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/DocLexerTest.php b/core/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/DocLexerTest.php deleted file mode 100644 index 844619d..0000000 --- a/core/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/DocLexerTest.php +++ /dev/null @@ -1,157 +0,0 @@ -setInput("@Name"); - $this->assertNull($lexer->token); - $this->assertNull($lexer->lookahead); - - $this->assertTrue($lexer->moveNext()); - $this->assertNull($lexer->token); - $this->assertEquals('@', $lexer->lookahead['value']); - - $this->assertTrue($lexer->moveNext()); - $this->assertEquals('@', $lexer->token['value']); - $this->assertEquals('Name', $lexer->lookahead['value']); - - $this->assertFalse($lexer->moveNext()); - } - - public function testScannerTokenizesDocBlockWhitConstants() - { - $lexer = new DocLexer(); - $docblock = '@AnnotationWithConstants(PHP_EOL, ClassWithConstants::SOME_VALUE, ClassWithConstants::CONSTANT_, ClassWithConstants::CONST_ANT3, \Doctrine\Tests\Common\Annotations\Fixtures\IntefaceWithConstants::SOME_VALUE)'; - - $tokens = array ( - array( - 'value' => '@', - 'position' => 0, - 'type' => DocLexer::T_AT, - ), - array( - 'value' => 'AnnotationWithConstants', - 'position' => 1, - 'type' => DocLexer::T_IDENTIFIER, - ), - array( - 'value' => '(', - 'position' => 24, - 'type' => DocLexer::T_OPEN_PARENTHESIS, - ), - array( - 'value' => 'PHP_EOL', - 'position' => 25, - 'type' => DocLexer::T_IDENTIFIER, - ), - array( - 'value' => ',', - 'position' => 32, - 'type' => DocLexer::T_COMMA, - ), - array( - 'value' => 'ClassWithConstants::SOME_VALUE', - 'position' => 34, - 'type' => DocLexer::T_IDENTIFIER, - ), - array( - 'value' => ',', - 'position' => 64, - 'type' => DocLexer::T_COMMA, - ), - array( - 'value' => 'ClassWithConstants::CONSTANT_', - 'position' => 66, - 'type' => DocLexer::T_IDENTIFIER, - ), - array( - 'value' => ',', - 'position' => 95, - 'type' => DocLexer::T_COMMA, - ), - array( - 'value' => 'ClassWithConstants::CONST_ANT3', - 'position' => 97, - 'type' => DocLexer::T_IDENTIFIER, - ), - array( - 'value' => ',', - 'position' => 127, - 'type' => DocLexer::T_COMMA, - ), - array( - 'value' => '\\Doctrine\\Tests\\Common\\Annotations\\Fixtures\\IntefaceWithConstants::SOME_VALUE', - 'position' => 129, - 'type' => DocLexer::T_IDENTIFIER, - ), - array( - 'value' => ')', - 'position' => 206, - 'type' => DocLexer::T_CLOSE_PARENTHESIS, - ) - - ); - - $lexer->setInput($docblock); - - foreach ($tokens as $expected) { - $lexer->moveNext(); - $lookahead = $lexer->lookahead; - $this->assertEquals($expected['value'], $lookahead['value']); - $this->assertEquals($expected['type'], $lookahead['type']); - $this->assertEquals($expected['position'], $lookahead['position']); - } - - $this->assertFalse($lexer->moveNext()); - } - - - public function testScannerTokenizesDocBlockWhitInvalidIdentifier() - { - $lexer = new DocLexer(); - $docblock = '@Foo\3.42'; - - $tokens = array ( - array( - 'value' => '@', - 'position' => 0, - 'type' => DocLexer::T_AT, - ), - array( - 'value' => 'Foo', - 'position' => 1, - 'type' => DocLexer::T_IDENTIFIER, - ), - array( - 'value' => '\\', - 'position' => 4, - 'type' => DocLexer::T_NAMESPACE_SEPARATOR, - ), - array( - 'value' => 3.42, - 'position' => 5, - 'type' => DocLexer::T_FLOAT, - ) - ); - - $lexer->setInput($docblock); - - foreach ($tokens as $expected) { - $lexer->moveNext(); - $lookahead = $lexer->lookahead; - $this->assertEquals($expected['value'], $lookahead['value']); - $this->assertEquals($expected['type'], $lookahead['type']); - $this->assertEquals($expected['position'], $lookahead['position']); - } - - $this->assertFalse($lexer->moveNext()); - } - -} \ No newline at end of file diff --git a/core/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/DocParserTest.php b/core/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/DocParserTest.php deleted file mode 100644 index 7d670a9..0000000 --- a/core/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/DocParserTest.php +++ /dev/null @@ -1,1359 +0,0 @@ -createTestParser(); - - // Nested arrays with nested annotations - $result = $parser->parse('@Name(foo={1,2, {"key"=@Name}})'); - $annot = $result[0]; - - $this->assertTrue($annot instanceof Name); - $this->assertNull($annot->value); - $this->assertEquals(3, count($annot->foo)); - $this->assertEquals(1, $annot->foo[0]); - $this->assertEquals(2, $annot->foo[1]); - $this->assertTrue(is_array($annot->foo[2])); - - $nestedArray = $annot->foo[2]; - $this->assertTrue(isset($nestedArray['key'])); - $this->assertTrue($nestedArray['key'] instanceof Name); - } - - public function testBasicAnnotations() - { - $parser = $this->createTestParser(); - - // Marker annotation - $result = $parser->parse("@Name"); - $annot = $result[0]; - $this->assertTrue($annot instanceof Name); - $this->assertNull($annot->value); - $this->assertNull($annot->foo); - - // Associative arrays - $result = $parser->parse('@Name(foo={"key1" = "value1"})'); - $annot = $result[0]; - $this->assertNull($annot->value); - $this->assertTrue(is_array($annot->foo)); - $this->assertTrue(isset($annot->foo['key1'])); - - // Numerical arrays - $result = $parser->parse('@Name({2="foo", 4="bar"})'); - $annot = $result[0]; - $this->assertTrue(is_array($annot->value)); - $this->assertEquals('foo', $annot->value[2]); - $this->assertEquals('bar', $annot->value[4]); - $this->assertFalse(isset($annot->value[0])); - $this->assertFalse(isset($annot->value[1])); - $this->assertFalse(isset($annot->value[3])); - - // Multiple values - $result = $parser->parse('@Name(@Name, @Name)'); - $annot = $result[0]; - - $this->assertTrue($annot instanceof Name); - $this->assertTrue(is_array($annot->value)); - $this->assertTrue($annot->value[0] instanceof Name); - $this->assertTrue($annot->value[1] instanceof Name); - - // Multiple types as values - $result = $parser->parse('@Name(foo="Bar", @Name, {"key1"="value1", "key2"="value2"})'); - $annot = $result[0]; - - $this->assertTrue($annot instanceof Name); - $this->assertTrue(is_array($annot->value)); - $this->assertTrue($annot->value[0] instanceof Name); - $this->assertTrue(is_array($annot->value[1])); - $this->assertEquals('value1', $annot->value[1]['key1']); - $this->assertEquals('value2', $annot->value[1]['key2']); - - // Complete docblock - $docblock = <<parse($docblock); - $this->assertEquals(1, count($result)); - $annot = $result[0]; - $this->assertTrue($annot instanceof Name); - $this->assertEquals("bar", $annot->foo); - $this->assertNull($annot->value); - } - - public function testDefaultValueAnnotations() - { - $parser = $this->createTestParser(); - - // Array as first value - $result = $parser->parse('@Name({"key1"="value1"})'); - $annot = $result[0]; - - $this->assertTrue($annot instanceof Name); - $this->assertTrue(is_array($annot->value)); - $this->assertEquals('value1', $annot->value['key1']); - - // Array as first value and additional values - $result = $parser->parse('@Name({"key1"="value1"}, foo="bar")'); - $annot = $result[0]; - - $this->assertTrue($annot instanceof Name); - $this->assertTrue(is_array($annot->value)); - $this->assertEquals('value1', $annot->value['key1']); - $this->assertEquals('bar', $annot->foo); - } - - public function testNamespacedAnnotations() - { - $parser = new DocParser; - $parser->setIgnoreNotImportedAnnotations(true); - - $docblock = << - * @Doctrine\Tests\Common\Annotations\Name(foo="bar") - * @ignore - */ -DOCBLOCK; - - $result = $parser->parse($docblock); - $this->assertEquals(1, count($result)); - $annot = $result[0]; - $this->assertTrue($annot instanceof Name); - $this->assertEquals("bar", $annot->foo); - } - - /** - * @group debug - */ - public function testTypicalMethodDocBlock() - { - $parser = $this->createTestParser(); - - $docblock = <<parse($docblock); - $this->assertEquals(2, count($result)); - $this->assertTrue(isset($result[0])); - $this->assertTrue(isset($result[1])); - $annot = $result[0]; - $this->assertTrue($annot instanceof Name); - $this->assertEquals("bar", $annot->foo); - $marker = $result[1]; - $this->assertTrue($marker instanceof Marker); - } - - - public function testAnnotationWithoutConstructor() - { - $parser = $this->createTestParser(); - - - $docblock = <<parse($docblock); - $this->assertEquals(count($result), 1); - $annot = $result[0]; - - $this->assertNotNull($annot); - $this->assertTrue($annot instanceof SomeAnnotationClassNameWithoutConstructor); - - $this->assertNull($annot->name); - $this->assertNotNull($annot->data); - $this->assertEquals($annot->data, "Some data"); - - - - -$docblock = <<parse($docblock); - $this->assertEquals(count($result), 1); - $annot = $result[0]; - - $this->assertNotNull($annot); - $this->assertTrue($annot instanceof SomeAnnotationClassNameWithoutConstructor); - - $this->assertEquals($annot->name, "Some Name"); - $this->assertEquals($annot->data, "Some data"); - - - - -$docblock = <<parse($docblock); - $this->assertEquals(count($result), 1); - $annot = $result[0]; - - $this->assertEquals($annot->data, "Some data"); - $this->assertNull($annot->name); - - - $docblock = <<parse($docblock); - $this->assertEquals(count($result), 1); - $annot = $result[0]; - - $this->assertEquals($annot->name, "Some name"); - $this->assertNull($annot->data); - - $docblock = <<parse($docblock); - $this->assertEquals(count($result), 1); - $annot = $result[0]; - - $this->assertEquals($annot->data, "Some data"); - $this->assertNull($annot->name); - - - - $docblock = <<parse($docblock); - $this->assertEquals(count($result), 1); - $annot = $result[0]; - - $this->assertEquals($annot->name, "Some name"); - $this->assertEquals($annot->data, "Some data"); - - - $docblock = <<parse($docblock); - $this->assertEquals(count($result), 1); - $annot = $result[0]; - - $this->assertEquals($annot->name, "Some name"); - $this->assertEquals($annot->data, "Some data"); - - $docblock = <<parse($docblock); - $this->assertEquals(count($result), 1); - $this->assertTrue($result[0] instanceof SomeAnnotationClassNameWithoutConstructorAndProperties); - } - - public function testAnnotationTarget() - { - - $parser = new DocParser; - $parser->setImports(array( - '__NAMESPACE__' => 'Doctrine\Tests\Common\Annotations\Fixtures', - )); - $class = new \ReflectionClass('Doctrine\Tests\Common\Annotations\Fixtures\ClassWithValidAnnotationTarget'); - - - $context = 'class ' . $class->getName(); - $docComment = $class->getDocComment(); - - $parser->setTarget(Target::TARGET_CLASS); - $this->assertNotNull($parser->parse($docComment,$context)); - - - $property = $class->getProperty('foo'); - $docComment = $property->getDocComment(); - $context = 'property ' . $class->getName() . "::\$" . $property->getName(); - - $parser->setTarget(Target::TARGET_PROPERTY); - $this->assertNotNull($parser->parse($docComment,$context)); - - - - $method = $class->getMethod('someFunction'); - $docComment = $property->getDocComment(); - $context = 'method ' . $class->getName() . '::' . $method->getName() . '()'; - - $parser->setTarget(Target::TARGET_METHOD); - $this->assertNotNull($parser->parse($docComment,$context)); - - - try { - $class = new \ReflectionClass('Doctrine\Tests\Common\Annotations\Fixtures\ClassWithInvalidAnnotationTargetAtClass'); - $context = 'class ' . $class->getName(); - $docComment = $class->getDocComment(); - - $parser->setTarget(Target::TARGET_CLASS); - $parser->parse($docComment, $context); - - $this->fail(); - } catch (\Doctrine\Common\Annotations\AnnotationException $exc) { - $this->assertNotNull($exc->getMessage()); - } - - - try { - - $class = new \ReflectionClass('Doctrine\Tests\Common\Annotations\Fixtures\ClassWithInvalidAnnotationTargetAtMethod'); - $method = $class->getMethod('functionName'); - $docComment = $method->getDocComment(); - $context = 'method ' . $class->getName() . '::' . $method->getName() . '()'; - - $parser->setTarget(Target::TARGET_METHOD); - $parser->parse($docComment, $context); - - $this->fail(); - } catch (\Doctrine\Common\Annotations\AnnotationException $exc) { - $this->assertNotNull($exc->getMessage()); - } - - - try { - $class = new \ReflectionClass('Doctrine\Tests\Common\Annotations\Fixtures\ClassWithInvalidAnnotationTargetAtProperty'); - $property = $class->getProperty('foo'); - $docComment = $property->getDocComment(); - $context = 'property ' . $class->getName() . "::\$" . $property->getName(); - - $parser->setTarget(Target::TARGET_PROPERTY); - $parser->parse($docComment, $context); - - $this->fail(); - } catch (\Doctrine\Common\Annotations\AnnotationException $exc) { - $this->assertNotNull($exc->getMessage()); - } - - } - - public function getAnnotationVarTypeProviderValid() - { - //({attribute name}, {attribute value}) - return array( - // mixed type - array('mixed', '"String Value"'), - array('mixed', 'true'), - array('mixed', 'false'), - array('mixed', '1'), - array('mixed', '1.2'), - array('mixed', '@Doctrine\Tests\Common\Annotations\Fixtures\AnnotationTargetAll'), - - // boolean type - array('boolean', 'true'), - array('boolean', 'false'), - - // alias for internal type boolean - array('bool', 'true'), - array('bool', 'false'), - - // integer type - array('integer', '0'), - array('integer', '1'), - array('integer', '123456789'), - array('integer', '9223372036854775807'), - - // alias for internal type double - array('float', '0.1'), - array('float', '1.2'), - array('float', '123.456'), - - // string type - array('string', '"String Value"'), - array('string', '"true"'), - array('string', '"123"'), - - // array type - array('array', '{@AnnotationExtendsAnnotationTargetAll}'), - array('array', '{@AnnotationExtendsAnnotationTargetAll,@AnnotationExtendsAnnotationTargetAll}'), - - array('arrayOfIntegers', '1'), - array('arrayOfIntegers', '{1}'), - array('arrayOfIntegers', '{1,2,3,4}'), - array('arrayOfAnnotations', '@AnnotationExtendsAnnotationTargetAll'), - array('arrayOfAnnotations', '{@Doctrine\Tests\Common\Annotations\Fixtures\AnnotationTargetAll}'), - array('arrayOfAnnotations', '{@AnnotationExtendsAnnotationTargetAll, @Doctrine\Tests\Common\Annotations\Fixtures\AnnotationTargetAll}'), - - // annotation instance - array('annotation', '@Doctrine\Tests\Common\Annotations\Fixtures\AnnotationTargetAll'), - array('annotation', '@AnnotationExtendsAnnotationTargetAll'), - ); - } - - public function getAnnotationVarTypeProviderInvalid() - { - //({attribute name}, {type declared type}, {attribute value} , {given type or class}) - return array( - // boolean type - array('boolean','boolean','1','integer'), - array('boolean','boolean','1.2','double'), - array('boolean','boolean','"str"','string'), - array('boolean','boolean','{1,2,3}','array'), - array('boolean','boolean','@Name', 'an instance of Doctrine\Tests\Common\Annotations\Name'), - - // alias for internal type boolean - array('bool','bool', '1','integer'), - array('bool','bool', '1.2','double'), - array('bool','bool', '"str"','string'), - array('bool','bool', '{"str"}','array'), - - // integer type - array('integer','integer', 'true','boolean'), - array('integer','integer', 'false','boolean'), - array('integer','integer', '1.2','double'), - array('integer','integer', '"str"','string'), - array('integer','integer', '{"str"}','array'), - array('integer','integer', '{1,2,3,4}','array'), - - // alias for internal type double - array('float','float', 'true','boolean'), - array('float','float', 'false','boolean'), - array('float','float', '123','integer'), - array('float','float', '"str"','string'), - array('float','float', '{"str"}','array'), - array('float','float', '{12.34}','array'), - array('float','float', '{1,2,3}','array'), - - // string type - array('string','string', 'true','boolean'), - array('string','string', 'false','boolean'), - array('string','string', '12','integer'), - array('string','string', '1.2','double'), - array('string','string', '{"str"}','array'), - array('string','string', '{1,2,3,4}','array'), - - // annotation instance - array('annotation','Doctrine\Tests\Common\Annotations\Fixtures\AnnotationTargetAll', 'true','boolean'), - array('annotation','Doctrine\Tests\Common\Annotations\Fixtures\AnnotationTargetAll', 'false','boolean'), - array('annotation','Doctrine\Tests\Common\Annotations\Fixtures\AnnotationTargetAll', '12','integer'), - array('annotation','Doctrine\Tests\Common\Annotations\Fixtures\AnnotationTargetAll', '1.2','double'), - array('annotation','Doctrine\Tests\Common\Annotations\Fixtures\AnnotationTargetAll', '{"str"}','array'), - array('annotation','Doctrine\Tests\Common\Annotations\Fixtures\AnnotationTargetAll', '{1,2,3,4}','array'), - array('annotation','Doctrine\Tests\Common\Annotations\Fixtures\AnnotationTargetAll', '@Name','an instance of Doctrine\Tests\Common\Annotations\Name'), - ); - } - - public function getAnnotationVarTypeArrayProviderInvalid() - { - //({attribute name}, {type declared type}, {attribute value} , {given type or class}) - return array( - array('arrayOfIntegers', 'integer', 'true', 'boolean'), - array('arrayOfIntegers', 'integer', 'false', 'boolean'), - array('arrayOfIntegers', 'integer', '{true,true}', 'boolean'), - array('arrayOfIntegers', 'integer', '{1,true}', 'boolean'), - array('arrayOfIntegers', 'integer', '{1,2,1.2}', 'double'), - array('arrayOfIntegers', 'integer', '{1,2,"str"}', 'string'), - - array('arrayOfStrings', 'string', 'true', 'boolean'), - array('arrayOfStrings', 'string', 'false', 'boolean'), - array('arrayOfStrings', 'string', '{true,true}', 'boolean'), - array('arrayOfStrings', 'string', '{"foo",true}', 'boolean'), - array('arrayOfStrings', 'string', '{"foo","bar",1.2}', 'double'), - array('arrayOfStrings', 'string', '1', 'integer'), - - array('arrayOfAnnotations', 'Doctrine\Tests\Common\Annotations\Fixtures\AnnotationTargetAll', 'true', 'boolean'), - array('arrayOfAnnotations', 'Doctrine\Tests\Common\Annotations\Fixtures\AnnotationTargetAll', 'false', 'boolean'), - array('arrayOfAnnotations', 'Doctrine\Tests\Common\Annotations\Fixtures\AnnotationTargetAll', '{@Doctrine\Tests\Common\Annotations\Fixtures\AnnotationTargetAll,true}', 'boolean'), - array('arrayOfAnnotations', 'Doctrine\Tests\Common\Annotations\Fixtures\AnnotationTargetAll', '{@Doctrine\Tests\Common\Annotations\Fixtures\AnnotationTargetAll,true}', 'boolean'), - array('arrayOfAnnotations', 'Doctrine\Tests\Common\Annotations\Fixtures\AnnotationTargetAll', '{@Doctrine\Tests\Common\Annotations\Fixtures\AnnotationTargetAll,1.2}', 'double'), - array('arrayOfAnnotations', 'Doctrine\Tests\Common\Annotations\Fixtures\AnnotationTargetAll', '{@Doctrine\Tests\Common\Annotations\Fixtures\AnnotationTargetAll,@AnnotationExtendsAnnotationTargetAll,"str"}', 'string'), - ); - } - - /** - * @dataProvider getAnnotationVarTypeProviderValid - */ - public function testAnnotationWithVarType($attribute, $value) - { - $parser = $this->createTestParser(); - $context = 'property SomeClassName::$invalidProperty.'; - $docblock = sprintf('@Doctrine\Tests\Common\Annotations\Fixtures\AnnotationWithVarType(%s = %s)',$attribute, $value); - $parser->setTarget(Target::TARGET_PROPERTY); - - $result = $parser->parse($docblock, $context); - - $this->assertTrue(sizeof($result) === 1); - $this->assertInstanceOf('Doctrine\Tests\Common\Annotations\Fixtures\AnnotationWithVarType', $result[0]); - $this->assertNotNull($result[0]->$attribute); - } - - /** - * @dataProvider getAnnotationVarTypeProviderInvalid - */ - public function testAnnotationWithVarTypeError($attribute,$type,$value,$given) - { - $parser = $this->createTestParser(); - $context = 'property SomeClassName::invalidProperty.'; - $docblock = sprintf('@Doctrine\Tests\Common\Annotations\Fixtures\AnnotationWithVarType(%s = %s)',$attribute, $value); - $parser->setTarget(Target::TARGET_PROPERTY); - - try { - $parser->parse($docblock, $context); - $this->fail(); - } catch (\Doctrine\Common\Annotations\AnnotationException $exc) { - $this->assertContains("[Type Error] Attribute \"$attribute\" of @Doctrine\Tests\Common\Annotations\Fixtures\AnnotationWithVarType declared on property SomeClassName::invalidProperty. expects a(n) $type, but got $given.", $exc->getMessage()); - } - } - - - /** - * @dataProvider getAnnotationVarTypeArrayProviderInvalid - */ - public function testAnnotationWithVarTypeArrayError($attribute,$type,$value,$given) - { - $parser = $this->createTestParser(); - $context = 'property SomeClassName::invalidProperty.'; - $docblock = sprintf('@Doctrine\Tests\Common\Annotations\Fixtures\AnnotationWithVarType(%s = %s)',$attribute, $value); - $parser->setTarget(Target::TARGET_PROPERTY); - - try { - $parser->parse($docblock, $context); - $this->fail(); - } catch (\Doctrine\Common\Annotations\AnnotationException $exc) { - $this->assertContains("[Type Error] Attribute \"$attribute\" of @Doctrine\Tests\Common\Annotations\Fixtures\AnnotationWithVarType declared on property SomeClassName::invalidProperty. expects either a(n) $type, or an array of {$type}s, but got $given.", $exc->getMessage()); - } - } - - /** - * @dataProvider getAnnotationVarTypeProviderValid - */ - public function testAnnotationWithAttributes($attribute, $value) - { - $parser = $this->createTestParser(); - $context = 'property SomeClassName::$invalidProperty.'; - $docblock = sprintf('@Doctrine\Tests\Common\Annotations\Fixtures\AnnotationWithAttributes(%s = %s)',$attribute, $value); - $parser->setTarget(Target::TARGET_PROPERTY); - - $result = $parser->parse($docblock, $context); - - $this->assertTrue(sizeof($result) === 1); - $this->assertInstanceOf('Doctrine\Tests\Common\Annotations\Fixtures\AnnotationWithAttributes', $result[0]); - $getter = "get".ucfirst($attribute); - $this->assertNotNull($result[0]->$getter()); - } - - /** - * @dataProvider getAnnotationVarTypeProviderInvalid - */ - public function testAnnotationWithAttributesError($attribute,$type,$value,$given) - { - $parser = $this->createTestParser(); - $context = 'property SomeClassName::invalidProperty.'; - $docblock = sprintf('@Doctrine\Tests\Common\Annotations\Fixtures\AnnotationWithAttributes(%s = %s)',$attribute, $value); - $parser->setTarget(Target::TARGET_PROPERTY); - - try { - $parser->parse($docblock, $context); - $this->fail(); - } catch (\Doctrine\Common\Annotations\AnnotationException $exc) { - $this->assertContains("[Type Error] Attribute \"$attribute\" of @Doctrine\Tests\Common\Annotations\Fixtures\AnnotationWithAttributes declared on property SomeClassName::invalidProperty. expects a(n) $type, but got $given.", $exc->getMessage()); - } - } - - - /** - * @dataProvider getAnnotationVarTypeArrayProviderInvalid - */ - public function testAnnotationWithAttributesWithVarTypeArrayError($attribute,$type,$value,$given) - { - $parser = $this->createTestParser(); - $context = 'property SomeClassName::invalidProperty.'; - $docblock = sprintf('@Doctrine\Tests\Common\Annotations\Fixtures\AnnotationWithAttributes(%s = %s)',$attribute, $value); - $parser->setTarget(Target::TARGET_PROPERTY); - - try { - $parser->parse($docblock, $context); - $this->fail(); - } catch (\Doctrine\Common\Annotations\AnnotationException $exc) { - $this->assertContains("[Type Error] Attribute \"$attribute\" of @Doctrine\Tests\Common\Annotations\Fixtures\AnnotationWithAttributes declared on property SomeClassName::invalidProperty. expects either a(n) $type, or an array of {$type}s, but got $given.", $exc->getMessage()); - } - } - - public function testAnnotationWithRequiredAttributes() - { - $parser = $this->createTestParser(); - $context = 'property SomeClassName::invalidProperty.'; - $parser->setTarget(Target::TARGET_PROPERTY); - - - $docblock = '@Doctrine\Tests\Common\Annotations\Fixtures\AnnotationWithRequiredAttributes("Some Value", annot = @Doctrine\Tests\Common\Annotations\Fixtures\AnnotationTargetAnnotation)'; - $result = $parser->parse($docblock); - - $this->assertTrue(sizeof($result) === 1); - $this->assertInstanceOf('Doctrine\Tests\Common\Annotations\Fixtures\AnnotationWithRequiredAttributes', $result[0]); - $this->assertEquals("Some Value",$result[0]->getValue()); - $this->assertInstanceOf('Doctrine\Tests\Common\Annotations\Fixtures\AnnotationTargetAnnotation', $result[0]->getAnnot()); - - - $docblock = '@Doctrine\Tests\Common\Annotations\Fixtures\AnnotationWithRequiredAttributes("Some Value")'; - try { - $result = $parser->parse($docblock,$context); - $this->fail(); - } catch (\Doctrine\Common\Annotations\AnnotationException $exc) { - $this->assertContains('Attribute "annot" of @Doctrine\Tests\Common\Annotations\Fixtures\AnnotationWithRequiredAttributes declared on property SomeClassName::invalidProperty. expects a(n) Doctrine\Tests\Common\Annotations\Fixtures\AnnotationTargetAnnotation. This value should not be null.', $exc->getMessage()); - } - - $docblock = '@Doctrine\Tests\Common\Annotations\Fixtures\AnnotationWithRequiredAttributes(annot = @Doctrine\Tests\Common\Annotations\Fixtures\AnnotationTargetAnnotation)'; - try { - $result = $parser->parse($docblock,$context); - $this->fail(); - } catch (\Doctrine\Common\Annotations\AnnotationException $exc) { - $this->assertContains('Attribute "value" of @Doctrine\Tests\Common\Annotations\Fixtures\AnnotationWithRequiredAttributes declared on property SomeClassName::invalidProperty. expects a(n) string. This value should not be null.', $exc->getMessage()); - } - - } - - public function testAnnotationWithRequiredAttributesWithoutContructor() - { - $parser = $this->createTestParser(); - $context = 'property SomeClassName::invalidProperty.'; - $parser->setTarget(Target::TARGET_PROPERTY); - - - $docblock = '@Doctrine\Tests\Common\Annotations\Fixtures\AnnotationWithRequiredAttributesWithoutContructor("Some Value", annot = @Doctrine\Tests\Common\Annotations\Fixtures\AnnotationTargetAnnotation)'; - $result = $parser->parse($docblock); - - $this->assertTrue(sizeof($result) === 1); - $this->assertInstanceOf('Doctrine\Tests\Common\Annotations\Fixtures\AnnotationWithRequiredAttributesWithoutContructor', $result[0]); - $this->assertEquals("Some Value", $result[0]->value); - $this->assertInstanceOf('Doctrine\Tests\Common\Annotations\Fixtures\AnnotationTargetAnnotation', $result[0]->annot); - - - $docblock = '@Doctrine\Tests\Common\Annotations\Fixtures\AnnotationWithRequiredAttributesWithoutContructor("Some Value")'; - try { - $result = $parser->parse($docblock,$context); - $this->fail(); - } catch (\Doctrine\Common\Annotations\AnnotationException $exc) { - $this->assertContains('Attribute "annot" of @Doctrine\Tests\Common\Annotations\Fixtures\AnnotationWithRequiredAttributesWithoutContructor declared on property SomeClassName::invalidProperty. expects a(n) Doctrine\Tests\Common\Annotations\Fixtures\AnnotationTargetAnnotation. This value should not be null.', $exc->getMessage()); - } - - $docblock = '@Doctrine\Tests\Common\Annotations\Fixtures\AnnotationWithRequiredAttributesWithoutContructor(annot = @Doctrine\Tests\Common\Annotations\Fixtures\AnnotationTargetAnnotation)'; - try { - $result = $parser->parse($docblock,$context); - $this->fail(); - } catch (\Doctrine\Common\Annotations\AnnotationException $exc) { - $this->assertContains('Attribute "value" of @Doctrine\Tests\Common\Annotations\Fixtures\AnnotationWithRequiredAttributesWithoutContructor declared on property SomeClassName::invalidProperty. expects a(n) string. This value should not be null.', $exc->getMessage()); - } - - } - - /** - * @expectedException \Doctrine\Common\Annotations\AnnotationException - * @expectedExceptionMessage Attribute "value" of @Doctrine\Tests\Common\Annotations\Fixtures\AnnotationEnum declared on property SomeClassName::invalidProperty. accept only [ONE, TWO, THREE], but got FOUR. - */ - public function testAnnotationEnumeratorException() - { - $parser = $this->createTestParser(); - $context = 'property SomeClassName::invalidProperty.'; - $docblock = '@Doctrine\Tests\Common\Annotations\Fixtures\AnnotationEnum("FOUR")'; - - $parser->setIgnoreNotImportedAnnotations(false); - $parser->setTarget(Target::TARGET_PROPERTY); - $parser->parse($docblock, $context); - } - - /** - * @expectedException \Doctrine\Common\Annotations\AnnotationException - * @expectedExceptionMessage Attribute "value" of @Doctrine\Tests\Common\Annotations\Fixtures\AnnotationEnumLiteral declared on property SomeClassName::invalidProperty. accept only [AnnotationEnumLiteral::ONE, AnnotationEnumLiteral::TWO, AnnotationEnumLiteral::THREE], but got 4. - */ - public function testAnnotationEnumeratorLiteralException() - { - $parser = $this->createTestParser(); - $context = 'property SomeClassName::invalidProperty.'; - $docblock = '@Doctrine\Tests\Common\Annotations\Fixtures\AnnotationEnumLiteral(4)'; - - $parser->setIgnoreNotImportedAnnotations(false); - $parser->setTarget(Target::TARGET_PROPERTY); - $parser->parse($docblock, $context); - } - - /** - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage @Enum supports only scalar values "array" given. - */ - public function testAnnotationEnumInvalidTypeDeclarationException() - { - $parser = $this->createTestParser(); - $docblock = '@Doctrine\Tests\Common\Annotations\Fixtures\AnnotationEnumInvalid("foo")'; - - $parser->setIgnoreNotImportedAnnotations(false); - $parser->parse($docblock); - } - - /** - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage Undefined enumerator value "3" for literal "AnnotationEnumLiteral::THREE". - */ - public function testAnnotationEnumInvalidLiteralDeclarationException() - { - $parser = $this->createTestParser(); - $docblock = '@Doctrine\Tests\Common\Annotations\Fixtures\AnnotationEnumLiteralInvalid("foo")'; - - $parser->setIgnoreNotImportedAnnotations(false); - $parser->parse($docblock); - } - - public function getConstantsProvider() - { - $provider[] = array( - '@AnnotationWithConstants(PHP_EOL)', - PHP_EOL - ); - $provider[] = array( - '@AnnotationWithConstants(AnnotationWithConstants::INTEGER)', - AnnotationWithConstants::INTEGER - ); - $provider[] = array( - '@Doctrine\Tests\Common\Annotations\Fixtures\AnnotationWithConstants(AnnotationWithConstants::STRING)', - AnnotationWithConstants::STRING - ); - $provider[] = array( - '@AnnotationWithConstants(Doctrine\Tests\Common\Annotations\Fixtures\AnnotationWithConstants::FLOAT)', - AnnotationWithConstants::FLOAT - ); - $provider[] = array( - '@AnnotationWithConstants(ClassWithConstants::SOME_VALUE)', - ClassWithConstants::SOME_VALUE - ); - $provider[] = array( - '@AnnotationWithConstants(ClassWithConstants::OTHER_KEY_)', - ClassWithConstants::OTHER_KEY_ - ); - $provider[] = array( - '@AnnotationWithConstants(ClassWithConstants::OTHER_KEY_2)', - ClassWithConstants::OTHER_KEY_2 - ); - $provider[] = array( - '@AnnotationWithConstants(Doctrine\Tests\Common\Annotations\Fixtures\ClassWithConstants::SOME_VALUE)', - ClassWithConstants::SOME_VALUE - ); - $provider[] = array( - '@AnnotationWithConstants(IntefaceWithConstants::SOME_VALUE)', - IntefaceWithConstants::SOME_VALUE - ); - $provider[] = array( - '@AnnotationWithConstants(\Doctrine\Tests\Common\Annotations\Fixtures\IntefaceWithConstants::SOME_VALUE)', - IntefaceWithConstants::SOME_VALUE - ); - $provider[] = array( - '@AnnotationWithConstants({AnnotationWithConstants::STRING, AnnotationWithConstants::INTEGER, AnnotationWithConstants::FLOAT})', - array(AnnotationWithConstants::STRING, AnnotationWithConstants::INTEGER, AnnotationWithConstants::FLOAT) - ); - $provider[] = array( - '@AnnotationWithConstants({ - AnnotationWithConstants::STRING = AnnotationWithConstants::INTEGER - })', - array(AnnotationWithConstants::STRING => AnnotationWithConstants::INTEGER) - ); - $provider[] = array( - '@AnnotationWithConstants({ - Doctrine\Tests\Common\Annotations\Fixtures\IntefaceWithConstants::SOME_KEY = AnnotationWithConstants::INTEGER - })', - array(IntefaceWithConstants::SOME_KEY => AnnotationWithConstants::INTEGER) - ); - $provider[] = array( - '@AnnotationWithConstants({ - \Doctrine\Tests\Common\Annotations\Fixtures\IntefaceWithConstants::SOME_KEY = AnnotationWithConstants::INTEGER - })', - array(IntefaceWithConstants::SOME_KEY => AnnotationWithConstants::INTEGER) - ); - $provider[] = array( - '@AnnotationWithConstants({ - AnnotationWithConstants::STRING = AnnotationWithConstants::INTEGER, - ClassWithConstants::SOME_KEY = ClassWithConstants::SOME_VALUE, - Doctrine\Tests\Common\Annotations\Fixtures\ClassWithConstants::SOME_KEY = IntefaceWithConstants::SOME_VALUE - })', - array( - AnnotationWithConstants::STRING => AnnotationWithConstants::INTEGER, - ClassWithConstants::SOME_KEY => ClassWithConstants::SOME_VALUE, - ClassWithConstants::SOME_KEY => IntefaceWithConstants::SOME_VALUE - ) - ); - $provider[] = array( - '@AnnotationWithConstants(AnnotationWithConstants::class)', - 'Doctrine\Tests\Common\Annotations\Fixtures\AnnotationWithConstants' - ); - $provider[] = array( - '@AnnotationWithConstants({AnnotationWithConstants::class = AnnotationWithConstants::class})', - array('Doctrine\Tests\Common\Annotations\Fixtures\AnnotationWithConstants' => 'Doctrine\Tests\Common\Annotations\Fixtures\AnnotationWithConstants') - ); - $provider[] = array( - '@AnnotationWithConstants(Doctrine\Tests\Common\Annotations\Fixtures\AnnotationWithConstants::class)', - 'Doctrine\Tests\Common\Annotations\Fixtures\AnnotationWithConstants' - ); - $provider[] = array( - '@Doctrine\Tests\Common\Annotations\Fixtures\AnnotationWithConstants(Doctrine\Tests\Common\Annotations\Fixtures\AnnotationWithConstants::class)', - 'Doctrine\Tests\Common\Annotations\Fixtures\AnnotationWithConstants' - ); - return $provider; - } - - /** - * @dataProvider getConstantsProvider - */ - public function testSupportClassConstants($docblock, $expected) - { - $parser = $this->createTestParser(); - $parser->setImports(array( - 'classwithconstants' => 'Doctrine\Tests\Common\Annotations\Fixtures\ClassWithConstants', - 'intefacewithconstants' => 'Doctrine\Tests\Common\Annotations\Fixtures\IntefaceWithConstants', - 'annotationwithconstants' => 'Doctrine\Tests\Common\Annotations\Fixtures\AnnotationWithConstants' - )); - - $result = $parser->parse($docblock); - $this->assertInstanceOf('\Doctrine\Tests\Common\Annotations\Fixtures\AnnotationWithConstants', $annotation = $result[0]); - $this->assertEquals($expected, $annotation->value); - } - - /** - * @expectedException \Doctrine\Common\Annotations\AnnotationException - * @expectedExceptionMessage The annotation @SomeAnnotationClassNameWithoutConstructorAndProperties declared on does not accept any values, but got {"value":"Foo"}. - */ - public function testWithoutConstructorWhenIsNotDefaultValue() - { - $parser = $this->createTestParser(); - $docblock = <<setTarget(Target::TARGET_CLASS); - $parser->parse($docblock); - } - - /** - * @expectedException \Doctrine\Common\Annotations\AnnotationException - * @expectedExceptionMessage The annotation @SomeAnnotationClassNameWithoutConstructorAndProperties declared on does not accept any values, but got {"value":"Foo"}. - */ - public function testWithoutConstructorWhenHasNoProperties() - { - $parser = $this->createTestParser(); - $docblock = <<setTarget(Target::TARGET_CLASS); - $parser->parse($docblock); - } - - /** - * @expectedException \Doctrine\Common\Annotations\AnnotationException - * @expectedExceptionMessage Expected namespace separator or identifier, got ')' at position 24 in class @Doctrine\Tests\Common\Annotations\Fixtures\AnnotationWithTargetSyntaxError. - */ - public function testAnnotationTargetSyntaxError() - { - $parser = $this->createTestParser(); - $context = 'class ' . 'SomeClassName'; - $docblock = <<setTarget(Target::TARGET_CLASS); - $parser->parse($docblock,$context); - } - - /** - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage Invalid Target "Foo". Available targets: [ALL, CLASS, METHOD, PROPERTY, ANNOTATION] - */ - public function testAnnotationWithInvalidTargetDeclarationError() - { - $parser = $this->createTestParser(); - $context = 'class ' . 'SomeClassName'; - $docblock = <<setTarget(Target::TARGET_CLASS); - $parser->parse($docblock,$context); - } - - /** - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage @Target expects either a string value, or an array of strings, "NULL" given. - */ - public function testAnnotationWithTargetEmptyError() - { - $parser = $this->createTestParser(); - $context = 'class ' . 'SomeClassName'; - $docblock = <<setTarget(Target::TARGET_CLASS); - $parser->parse($docblock,$context); - } - - /** - * @group DDC-575 - */ - public function testRegressionDDC575() - { - $parser = $this->createTestParser(); - - $docblock = <<parse($docblock); - - $this->assertInstanceOf("Doctrine\Tests\Common\Annotations\Name", $result[0]); - - $docblock = <<parse($docblock); - - $this->assertInstanceOf("Doctrine\Tests\Common\Annotations\Name", $result[0]); - } - - /** - * @group DDC-77 - */ - public function testAnnotationWithoutClassIsIgnoredWithoutWarning() - { - $parser = new DocParser(); - $parser->setIgnoreNotImportedAnnotations(true); - $result = $parser->parse("@param"); - - $this->assertEquals(0, count($result)); - } - - /** - * @group DCOM-168 - */ - public function testNotAnAnnotationClassIsIgnoredWithoutWarning() - { - $parser = new DocParser(); - $parser->setIgnoreNotImportedAnnotations(true); - $parser->setIgnoredAnnotationNames(array('PHPUnit_Framework_TestCase' => true)); - $result = $parser->parse('@PHPUnit_Framework_TestCase'); - - $this->assertEquals(0, count($result)); - } - - /** - * @expectedException \Doctrine\Common\Annotations\AnnotationException - * @expectedExceptionMessage Expected PlainValue, got ''' at position 10. - */ - public function testAnnotationDontAcceptSingleQuotes() - { - $parser = $this->createTestParser(); - $parser->parse("@Name(foo='bar')"); - } - - /** - * @group DCOM-41 - */ - public function testAnnotationDoesntThrowExceptionWhenAtSignIsNotFollowedByIdentifier() - { - $parser = new DocParser(); - $result = $parser->parse("'@'"); - - $this->assertEquals(0, count($result)); - } - - /** - * @group DCOM-41 - * @expectedException \Doctrine\Common\Annotations\AnnotationException - */ - public function testAnnotationThrowsExceptionWhenAtSignIsNotFollowedByIdentifierInNestedAnnotation() - { - $parser = new DocParser(); - $parser->parse("@Doctrine\Tests\Common\Annotations\Name(@')"); - } - - /** - * @group DCOM-56 - */ - public function testAutoloadAnnotation() - { - $this->assertFalse(class_exists('Doctrine\Tests\Common\Annotations\Fixture\Annotation\Autoload', false), 'Pre-condition: Doctrine\Tests\Common\Annotations\Fixture\Annotation\Autoload not allowed to be loaded.'); - - $parser = new DocParser(); - - AnnotationRegistry::registerAutoloadNamespace('Doctrine\Tests\Common\Annotations\Fixtures\Annotation', __DIR__ . '/../../../../'); - - $parser->setImports(array( - 'autoload' => 'Doctrine\Tests\Common\Annotations\Fixtures\Annotation\Autoload', - )); - $annotations = $parser->parse('@Autoload'); - - $this->assertEquals(1, count($annotations)); - $this->assertInstanceOf('Doctrine\Tests\Common\Annotations\Fixtures\Annotation\Autoload', $annotations[0]); - } - - public function createTestParser() - { - $parser = new DocParser(); - $parser->setIgnoreNotImportedAnnotations(true); - $parser->setImports(array( - 'name' => 'Doctrine\Tests\Common\Annotations\Name', - '__NAMESPACE__' => 'Doctrine\Tests\Common\Annotations', - )); - - return $parser; - } - - /** - * @group DDC-78 - * @expectedException \Doctrine\Common\Annotations\AnnotationException - * @expectedExceptionMessage Expected PlainValue, got ''' at position 10 in class \Doctrine\Tests\Common\Annotations\Name - */ - public function testSyntaxErrorWithContextDescription() - { - $parser = $this->createTestParser(); - $parser->parse("@Name(foo='bar')", "class \Doctrine\Tests\Common\Annotations\Name"); - } - - /** - * @group DDC-183 - */ - public function testSyntaxErrorWithUnknownCharacters() - { - $docblock = <<setInput(trim($docblock, '/ *')); - //var_dump($lexer); - - try { - $parser = $this->createTestParser(); - $parser->parse($docblock); - } catch (\Exception $e) { - $this->fail($e->getMessage()); - } - } - - /** - * @group DCOM-14 - */ - public function testIgnorePHPDocThrowTag() - { - $docblock = <<createTestParser(); - $parser->parse($docblock); - } catch (\Exception $e) { - $this->fail($e->getMessage()); - } - } - - /** - * @group DCOM-38 - */ - public function testCastInt() - { - $parser = $this->createTestParser(); - - $result = $parser->parse("@Name(foo=1234)"); - $annot = $result[0]; - $this->assertInternalType('int', $annot->foo); - } - - /** - * @group DCOM-38 - */ - public function testCastNegativeInt() - { - $parser = $this->createTestParser(); - - $result = $parser->parse("@Name(foo=-1234)"); - $annot = $result[0]; - $this->assertInternalType('int', $annot->foo); - } - - /** - * @group DCOM-38 - */ - public function testCastFloat() - { - $parser = $this->createTestParser(); - - $result = $parser->parse("@Name(foo=1234.345)"); - $annot = $result[0]; - $this->assertInternalType('float', $annot->foo); - } - - /** - * @group DCOM-38 - */ - public function testCastNegativeFloat() - { - $parser = $this->createTestParser(); - - $result = $parser->parse("@Name(foo=-1234.345)"); - $annot = $result[0]; - $this->assertInternalType('float', $annot->foo); - - $result = $parser->parse("@Marker(-1234.345)"); - $annot = $result[0]; - $this->assertInternalType('float', $annot->value); - } - - public function testReservedKeywordsInAnnotations() - { - $parser = $this->createTestParser(); - - $result = $parser->parse('@Doctrine\Tests\Common\Annotations\True'); - $this->assertTrue($result[0] instanceof True); - $result = $parser->parse('@Doctrine\Tests\Common\Annotations\False'); - $this->assertTrue($result[0] instanceof False); - $result = $parser->parse('@Doctrine\Tests\Common\Annotations\Null'); - $this->assertTrue($result[0] instanceof Null); - - $result = $parser->parse('@True'); - $this->assertTrue($result[0] instanceof True); - $result = $parser->parse('@False'); - $this->assertTrue($result[0] instanceof False); - $result = $parser->parse('@Null'); - $this->assertTrue($result[0] instanceof Null); - } - - /** - * @expectedException \Doctrine\Common\Annotations\AnnotationException - * @expectedExceptionMessage [Creation Error] The annotation @SomeAnnotationClassNameWithoutConstructor declared on some class does not have a property named "invalidaProperty". Available properties: data, name - */ - public function testSetValuesExeption() - { - $docblock = <<createTestParser()->parse($docblock, 'some class'); - } - - /** - * @expectedException \Doctrine\Common\Annotations\AnnotationException - * @expectedExceptionMessage [Syntax Error] Expected Doctrine\Common\Annotations\DocLexer::T_IDENTIFIER or Doctrine\Common\Annotations\DocLexer::T_TRUE or Doctrine\Common\Annotations\DocLexer::T_FALSE or Doctrine\Common\Annotations\DocLexer::T_NULL, got '3.42' at position 5. - */ - public function testInvalidIdentifierInAnnotation() - { - $parser = $this->createTestParser(); - $parser->parse('@Foo\3.42'); - } - - public function testTrailingCommaIsAllowed() - { - $parser = $this->createTestParser(); - - $annots = $parser->parse('@Name({ - "Foo", - "Bar", - })'); - $this->assertEquals(1, count($annots)); - $this->assertEquals(array('Foo', 'Bar'), $annots[0]->value); - } - - public function testDefaultAnnotationValueIsNotOverwritten() - { - $parser = $this->createTestParser(); - - $annots = $parser->parse('@Doctrine\Tests\Common\Annotations\Fixtures\Annotation\AnnotWithDefaultValue'); - $this->assertEquals(1, count($annots)); - $this->assertEquals('bar', $annots[0]->foo); - } - - public function testArrayWithColon() - { - $parser = $this->createTestParser(); - - $annots = $parser->parse('@Name({"foo": "bar"})'); - $this->assertEquals(1, count($annots)); - $this->assertEquals(array('foo' => 'bar'), $annots[0]->value); - } - - /** - * @expectedException \Doctrine\Common\Annotations\AnnotationException - * @expectedExceptionMessage [Semantical Error] Couldn't find constant foo. - */ - public function testInvalidContantName() - { - $parser = $this->createTestParser(); - $parser->parse('@Name(foo: "bar")'); - } - - /** - * Tests parsing empty arrays. - */ - public function testEmptyArray() - { - $parser = $this->createTestParser(); - - $annots = $parser->parse('@Name({"foo": {}})'); - $this->assertEquals(1, count($annots)); - $this->assertEquals(array('foo' => array()), $annots[0]->value); - } - - public function testKeyHasNumber() - { - $parser = $this->createTestParser(); - $annots = $parser->parse('@SettingsAnnotation(foo="test", bar2="test")'); - - $this->assertEquals(1, count($annots)); - $this->assertEquals(array('foo' => 'test', 'bar2' => 'test'), $annots[0]->settings); - } -} - -/** @Annotation */ -class SettingsAnnotation -{ - public $settings; - - public function __construct($settings) - { - $this->settings = $settings; - } -} - -/** @Annotation */ -class SomeAnnotationClassNameWithoutConstructor -{ - public $data; - public $name; -} - -/** @Annotation */ -class SomeAnnotationWithConstructorWithoutParams -{ - function __construct() - { - $this->data = "Some data"; - } - public $data; - public $name; -} - -/** @Annotation */ -class SomeAnnotationClassNameWithoutConstructorAndProperties{} - -/** - * @Annotation - * @Target("Foo") - */ -class AnnotationWithInvalidTargetDeclaration{} - -/** - * @Annotation - * @Target - */ -class AnnotationWithTargetEmpty{} - -/** @Annotation */ -class AnnotationExtendsAnnotationTargetAll extends \Doctrine\Tests\Common\Annotations\Fixtures\AnnotationTargetAll -{ -} - -/** @Annotation */ -class Name extends \Doctrine\Common\Annotations\Annotation { - public $foo; -} - -/** @Annotation */ -class Marker { - public $value; -} - -/** @Annotation */ -class True {} - -/** @Annotation */ -class False {} - -/** @Annotation */ -class Null {} - -namespace Doctrine\Tests\Common\Annotations\FooBar; - -/** @Annotation */ -class Name extends \Doctrine\Common\Annotations\Annotation { -} diff --git a/core/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/DummyClass.php b/core/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/DummyClass.php deleted file mode 100644 index 17223f6..0000000 --- a/core/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/DummyClass.php +++ /dev/null @@ -1,48 +0,0 @@ -cacheDir = sys_get_temp_dir() . "/annotations_". uniqid(); - @mkdir($this->cacheDir); - return new FileCacheReader(new AnnotationReader(), $this->cacheDir); - } - - public function tearDown() - { - foreach (glob($this->cacheDir.'/*.php') AS $file) { - unlink($file); - } - rmdir($this->cacheDir); - } - - /** - * @group DCOM-81 - */ - public function testAttemptToCreateAnnotationCacheDir() - { - $this->cacheDir = sys_get_temp_dir() . "/not_existed_dir_". uniqid(); - - $this->assertFalse(is_dir($this->cacheDir)); - - new FileCacheReader(new AnnotationReader(), $this->cacheDir); - - $this->assertTrue(is_dir($this->cacheDir)); - } -} \ No newline at end of file diff --git a/core/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/Fixtures/Annotation/AnnotWithDefaultValue.php b/core/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/Fixtures/Annotation/AnnotWithDefaultValue.php deleted file mode 100644 index 44108e1..0000000 --- a/core/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/Fixtures/Annotation/AnnotWithDefaultValue.php +++ /dev/null @@ -1,10 +0,0 @@ -roles = $values['value']; - } -} \ No newline at end of file diff --git a/core/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/Fixtures/Annotation/Template.php b/core/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/Fixtures/Annotation/Template.php deleted file mode 100644 index b507e60..0000000 --- a/core/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/Fixtures/Annotation/Template.php +++ /dev/null @@ -1,14 +0,0 @@ -name = isset($values['value']) ? $values['value'] : null; - } -} \ No newline at end of file diff --git a/core/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/Fixtures/Annotation/Version.php b/core/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/Fixtures/Annotation/Version.php deleted file mode 100644 index 09ef031..0000000 --- a/core/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/Fixtures/Annotation/Version.php +++ /dev/null @@ -1,11 +0,0 @@ -"), - @Attribute("arrayOfStrings", type = "string[]"), - @Attribute("annotation", type = "Doctrine\Tests\Common\Annotations\Fixtures\AnnotationTargetAll"), - @Attribute("arrayOfAnnotations", type = "array"), - }) - */ -final class AnnotationWithAttributes -{ - - public final function __construct(array $data) - { - foreach ($data as $key => $value) { - $this->$key = $value; - } - } - - private $mixed; - private $boolean; - private $bool; - private $float; - private $string; - private $integer; - private $array; - private $annotation; - private $arrayOfIntegers; - private $arrayOfStrings; - private $arrayOfAnnotations; - - /** - * @return mixed - */ - public function getMixed() - { - return $this->mixed; - } - - /** - * @return boolean - */ - public function getBoolean() - { - return $this->boolean; - } - - /** - * @return bool - */ - public function getBool() - { - return $this->bool; - } - - /** - * @return float - */ - public function getFloat() - { - return $this->float; - } - - /** - * @return string - */ - public function getString() - { - return $this->string; - } - - public function getInteger() - { - return $this->integer; - } - - /** - * @return array - */ - public function getArray() - { - return $this->array; - } - - /** - * @return Doctrine\Tests\Common\Annotations\Fixtures\AnnotationTargetAll - */ - public function getAnnotation() - { - return $this->annotation; - } - - /** - * @return string[] - */ - public function getArrayOfStrings() - { - return $this->arrayOfIntegers; - } - - /** - * @return array - */ - public function getArrayOfIntegers() - { - return $this->arrayOfIntegers; - } - - /** - * @return array - */ - public function getArrayOfAnnotations() - { - return $this->arrayOfAnnotations; - } - -} \ No newline at end of file diff --git a/core/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/Fixtures/AnnotationWithConstants.php b/core/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/Fixtures/AnnotationWithConstants.php deleted file mode 100644 index 9c94558..0000000 --- a/core/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/Fixtures/AnnotationWithConstants.php +++ /dev/null @@ -1,20 +0,0 @@ - $value) { - $this->$key = $value; - } - } - - /** - * @var string - */ - private $value; - - /** - * - * @var Doctrine\Tests\Common\Annotations\Fixtures\AnnotationTargetAnnotation - */ - private $annot; - - /** - * @return string - */ - public function getValue() - { - return $this->value; - } - - /** - * @return Doctrine\Tests\Common\Annotations\Fixtures\AnnotationTargetAnnotation - */ - public function getAnnot() - { - return $this->annot; - } - -} \ No newline at end of file diff --git a/core/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/Fixtures/AnnotationWithRequiredAttributesWithoutContructor.php b/core/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/Fixtures/AnnotationWithRequiredAttributesWithoutContructor.php deleted file mode 100644 index bf458ee..0000000 --- a/core/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/Fixtures/AnnotationWithRequiredAttributesWithoutContructor.php +++ /dev/null @@ -1,24 +0,0 @@ - - */ - public $arrayOfIntegers; - - /** - * @var string[] - */ - public $arrayOfStrings; - - /** - * @var array - */ - public $arrayOfAnnotations; - -} \ No newline at end of file diff --git a/core/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/Fixtures/Api.php b/core/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/Fixtures/Api.php deleted file mode 100644 index 534ad14..0000000 --- a/core/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/Fixtures/Api.php +++ /dev/null @@ -1,10 +0,0 @@ -events->filter(function ($item) use ($year, $month, $day) { - $leftDate = new \DateTime($year.'-'.$month.'-'.$day.' 00:00'); - $rigthDate = new \DateTime($year.'-'.$month.'-'.$day.' +1 day 00:00'); - return ( ( $leftDate <= $item->getDateStart() ) && ( $item->getDateStart() < $rigthDate ) ); - - } - ); - return $extractEvents; - } - -} \ No newline at end of file diff --git a/core/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/Fixtures/ClassWithConstants.php b/core/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/Fixtures/ClassWithConstants.php deleted file mode 100644 index 719d68f..0000000 --- a/core/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/Fixtures/ClassWithConstants.php +++ /dev/null @@ -1,11 +0,0 @@ - - */ -class Controller -{ - /** - * @Route("/", name="_demo") - * @Template() - */ - public function indexAction() - { - return array(); - } - - /** - * @Route("/hello/{name}", name="_demo_hello") - * @Template() - */ - public function helloAction($name) - { - return array('name' => $name); - } - - /** - * @Route("/contact", name="_demo_contact") - * @Template() - */ - public function contactAction() - { - $form = ContactForm::create($this->get('form.context'), 'contact'); - - $form->bind($this->container->get('request'), $form); - if ($form->isValid()) { - $form->send($this->get('mailer')); - - $this->get('session')->setFlash('notice', 'Message sent!'); - - return new RedirectResponse($this->generateUrl('_demo')); - } - - return array('form' => $form); - } - - /** - * Creates the ACL for the passed object identity - * - * @param ObjectIdentityInterface $oid - * @return void - */ - private function createObjectIdentity(ObjectIdentityInterface $oid) - { - $classId = $this->createOrRetrieveClassId($oid->getType()); - - $this->connection->executeQuery($this->getInsertObjectIdentitySql($oid->getIdentifier(), $classId, true)); - } - - /** - * Returns the primary key for the passed class type. - * - * If the type does not yet exist in the database, it will be created. - * - * @param string $classType - * @return integer - */ - private function createOrRetrieveClassId($classType) - { - if (false !== $id = $this->connection->executeQuery($this->getSelectClassIdSql($classType))->fetchColumn()) { - return $id; - } - - $this->connection->executeQuery($this->getInsertClassSql($classType)); - - return $this->connection->executeQuery($this->getSelectClassIdSql($classType))->fetchColumn(); - } - - /** - * Returns the primary key for the passed security identity. - * - * If the security identity does not yet exist in the database, it will be - * created. - * - * @param SecurityIdentityInterface $sid - * @return integer - */ - private function createOrRetrieveSecurityIdentityId(SecurityIdentityInterface $sid) - { - if (false !== $id = $this->connection->executeQuery($this->getSelectSecurityIdentityIdSql($sid))->fetchColumn()) { - return $id; - } - - $this->connection->executeQuery($this->getInsertSecurityIdentitySql($sid)); - - return $this->connection->executeQuery($this->getSelectSecurityIdentityIdSql($sid))->fetchColumn(); - } - - /** - * Deletes all ACEs for the given object identity primary key. - * - * @param integer $oidPK - * @return void - */ - private function deleteAccessControlEntries($oidPK) - { - $this->connection->executeQuery($this->getDeleteAccessControlEntriesSql($oidPK)); - } - - /** - * Deletes the object identity from the database. - * - * @param integer $pk - * @return void - */ - private function deleteObjectIdentity($pk) - { - $this->connection->executeQuery($this->getDeleteObjectIdentitySql($pk)); - } - - /** - * Deletes all entries from the relations table from the database. - * - * @param integer $pk - * @return void - */ - private function deleteObjectIdentityRelations($pk) - { - $this->connection->executeQuery($this->getDeleteObjectIdentityRelationsSql($pk)); - } - - /** - * This regenerates the ancestor table which is used for fast read access. - * - * @param AclInterface $acl - * @return void - */ - private function regenerateAncestorRelations(AclInterface $acl) - { - $pk = $acl->getId(); - $this->connection->executeQuery($this->getDeleteObjectIdentityRelationsSql($pk)); - $this->connection->executeQuery($this->getInsertObjectIdentityRelationSql($pk, $pk)); - - $parentAcl = $acl->getParentAcl(); - while (null !== $parentAcl) { - $this->connection->executeQuery($this->getInsertObjectIdentityRelationSql($pk, $parentAcl->getId())); - - $parentAcl = $parentAcl->getParentAcl(); - } - } - - /** - * This processes changes on an ACE related property (classFieldAces, or objectFieldAces). - * - * @param string $name - * @param array $changes - * @return void - */ - private function updateFieldAceProperty($name, array $changes) - { - $sids = new \SplObjectStorage(); - $classIds = new \SplObjectStorage(); - $currentIds = array(); - foreach ($changes[1] as $field => $new) { - for ($i=0,$c=count($new); $i<$c; $i++) { - $ace = $new[$i]; - - if (null === $ace->getId()) { - if ($sids->contains($ace->getSecurityIdentity())) { - $sid = $sids->offsetGet($ace->getSecurityIdentity()); - } else { - $sid = $this->createOrRetrieveSecurityIdentityId($ace->getSecurityIdentity()); - } - - $oid = $ace->getAcl()->getObjectIdentity(); - if ($classIds->contains($oid)) { - $classId = $classIds->offsetGet($oid); - } else { - $classId = $this->createOrRetrieveClassId($oid->getType()); - } - - $objectIdentityId = $name === 'classFieldAces' ? null : $ace->getAcl()->getId(); - - $this->connection->executeQuery($this->getInsertAccessControlEntrySql($classId, $objectIdentityId, $field, $i, $sid, $ace->getStrategy(), $ace->getMask(), $ace->isGranting(), $ace->isAuditSuccess(), $ace->isAuditFailure())); - $aceId = $this->connection->executeQuery($this->getSelectAccessControlEntryIdSql($classId, $objectIdentityId, $field, $i))->fetchColumn(); - $this->loadedAces[$aceId] = $ace; - - $aceIdProperty = new \ReflectionProperty('Symfony\Component\Security\Acl\Domain\Entry', 'id'); - $aceIdProperty->setAccessible(true); - $aceIdProperty->setValue($ace, intval($aceId)); - } else { - $currentIds[$ace->getId()] = true; - } - } - } - - foreach ($changes[0] as $old) { - for ($i=0,$c=count($old); $i<$c; $i++) { - $ace = $old[$i]; - - if (!isset($currentIds[$ace->getId()])) { - $this->connection->executeQuery($this->getDeleteAccessControlEntrySql($ace->getId())); - unset($this->loadedAces[$ace->getId()]); - } - } - } - } - - /** - * This processes changes on an ACE related property (classAces, or objectAces). - * - * @param string $name - * @param array $changes - * @return void - */ - private function updateAceProperty($name, array $changes) - { - list($old, $new) = $changes; - - $sids = new \SplObjectStorage(); - $classIds = new \SplObjectStorage(); - $currentIds = array(); - for ($i=0,$c=count($new); $i<$c; $i++) { - $ace = $new[$i]; - - if (null === $ace->getId()) { - if ($sids->contains($ace->getSecurityIdentity())) { - $sid = $sids->offsetGet($ace->getSecurityIdentity()); - } else { - $sid = $this->createOrRetrieveSecurityIdentityId($ace->getSecurityIdentity()); - } - - $oid = $ace->getAcl()->getObjectIdentity(); - if ($classIds->contains($oid)) { - $classId = $classIds->offsetGet($oid); - } else { - $classId = $this->createOrRetrieveClassId($oid->getType()); - } - - $objectIdentityId = $name === 'classAces' ? null : $ace->getAcl()->getId(); - - $this->connection->executeQuery($this->getInsertAccessControlEntrySql($classId, $objectIdentityId, null, $i, $sid, $ace->getStrategy(), $ace->getMask(), $ace->isGranting(), $ace->isAuditSuccess(), $ace->isAuditFailure())); - $aceId = $this->connection->executeQuery($this->getSelectAccessControlEntryIdSql($classId, $objectIdentityId, null, $i))->fetchColumn(); - $this->loadedAces[$aceId] = $ace; - - $aceIdProperty = new \ReflectionProperty($ace, 'id'); - $aceIdProperty->setAccessible(true); - $aceIdProperty->setValue($ace, intval($aceId)); - } else { - $currentIds[$ace->getId()] = true; - } - } - - for ($i=0,$c=count($old); $i<$c; $i++) { - $ace = $old[$i]; - - if (!isset($currentIds[$ace->getId()])) { - $this->connection->executeQuery($this->getDeleteAccessControlEntrySql($ace->getId())); - unset($this->loadedAces[$ace->getId()]); - } - } - } - - /** - * Persists the changes which were made to ACEs to the database. - * - * @param \SplObjectStorage $aces - * @return void - */ - private function updateAces(\SplObjectStorage $aces) - { - foreach ($aces as $ace) { - $propertyChanges = $aces->offsetGet($ace); - $sets = array(); - - if (isset($propertyChanges['mask'])) { - $sets[] = sprintf('mask = %d', $propertyChanges['mask'][1]); - } - if (isset($propertyChanges['strategy'])) { - $sets[] = sprintf('granting_strategy = %s', $this->connection->quote($propertyChanges['strategy'])); - } - if (isset($propertyChanges['aceOrder'])) { - $sets[] = sprintf('ace_order = %d', $propertyChanges['aceOrder'][1]); - } - if (isset($propertyChanges['auditSuccess'])) { - $sets[] = sprintf('audit_success = %s', $this->connection->getDatabasePlatform()->convertBooleans($propertyChanges['auditSuccess'][1])); - } - if (isset($propertyChanges['auditFailure'])) { - $sets[] = sprintf('audit_failure = %s', $this->connection->getDatabasePlatform()->convertBooleans($propertyChanges['auditFailure'][1])); - } - - $this->connection->executeQuery($this->getUpdateAccessControlEntrySql($ace->getId(), $sets)); - } - } -} \ No newline at end of file diff --git a/core/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/Fixtures/DifferentNamespacesPerFileWithClassAsFirst.php b/core/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/Fixtures/DifferentNamespacesPerFileWithClassAsFirst.php deleted file mode 100644 index bda2cc2..0000000 --- a/core/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/Fixtures/DifferentNamespacesPerFileWithClassAsFirst.php +++ /dev/null @@ -1,15 +0,0 @@ -test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test2() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test3() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test4() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test5() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test6() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test7() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test8() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - - } - - public function test9() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test10() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test11() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test12() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test13() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test14() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test15() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test16() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test17() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - - } - - public function test18() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test19() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test20() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test21() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test22() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test23() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test24() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test25() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test26() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test27() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - - } - - public function test28() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test29() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test30() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test31() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test32() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test33() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test34() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test35() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test36() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test37() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - - } - - public function test38() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test39() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } -} diff --git a/core/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/Fixtures/NoAnnotation.php b/core/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/Fixtures/NoAnnotation.php deleted file mode 100644 index 1dae104..0000000 --- a/core/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/Fixtures/NoAnnotation.php +++ /dev/null @@ -1,5 +0,0 @@ -test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test2() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test3() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test4() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test5() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test6() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test7() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test8() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - - } - - public function test9() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test10() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test11() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test12() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test13() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test14() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test15() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test16() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test17() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - - } - - public function test18() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test19() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test20() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test21() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test22() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test23() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test24() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test25() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test26() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test27() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - - } - - public function test28() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test29() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test30() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test31() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test32() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test33() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test34() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test35() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test36() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test37() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - - } - - public function test38() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test39() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } -} diff --git a/core/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/Fixtures/TestInterface.php b/core/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/Fixtures/TestInterface.php deleted file mode 100644 index 58c5e6a..0000000 --- a/core/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/Fixtures/TestInterface.php +++ /dev/null @@ -1,13 +0,0 @@ -getMethod(); - - $time = microtime(true); - for ($i=0,$c=500; $i<$c; $i++) { - $reader->getMethodAnnotations($method); - } - $time = microtime(true) - $time; - - $this->printResults('cached reader (in-memory)', $time, $c); - } - - /** - * @group performance - */ - public function testCachedReadPerformanceWithFileCache() - { - $method = $this->getMethod(); - - // prime cache - $reader = new FileCacheReader(new AnnotationReader(), sys_get_temp_dir()); - $reader->getMethodAnnotations($method); - - $time = microtime(true); - for ($i=0,$c=500; $i<$c; $i++) { - $reader = new FileCacheReader(new AnnotationReader(), sys_get_temp_dir()); - $reader->getMethodAnnotations($method); - clearstatcache(); - } - $time = microtime(true) - $time; - - $this->printResults('cached reader (file)', $time, $c); - } - - /** - * @group performance - */ - public function testReadPerformance() - { - $method = $this->getMethod(); - - $time = microtime(true); - for ($i=0,$c=150; $i<$c; $i++) { - $reader = new AnnotationReader(); - $reader->getMethodAnnotations($method); - } - $time = microtime(true) - $time; - - $this->printResults('reader', $time, $c); - } - - /** - * @group performance - */ - public function testDocParsePerformance() - { - $imports = array( - 'ignorephpdoc' => 'Annotations\Annotation\IgnorePhpDoc', - 'ignoreannotation' => 'Annotations\Annotation\IgnoreAnnotation', - 'route' => 'Doctrine\Tests\Common\Annotations\Fixtures\Annotation\Route', - 'template' => 'Doctrine\Tests\Common\Annotations\Fixtures\Annotation\Template', - '__NAMESPACE__' => 'Doctrine\Tests\Common\Annotations\Fixtures', - ); - $ignored = array( - 'access', 'author', 'copyright', 'deprecated', 'example', 'ignore', - 'internal', 'link', 'see', 'since', 'tutorial', 'version', 'package', - 'subpackage', 'name', 'global', 'param', 'return', 'staticvar', - 'static', 'var', 'throws', 'inheritdoc', - ); - - $method = $this->getMethod(); - $methodComment = $method->getDocComment(); - $classComment = $method->getDeclaringClass()->getDocComment(); - - $time = microtime(true); - for ($i=0,$c=200; $i<$c; $i++) { - $parser = new DocParser(); - $parser->setImports($imports); - $parser->setIgnoredAnnotationNames($ignored); - $parser->setIgnoreNotImportedAnnotations(true); - - $parser->parse($methodComment); - $parser->parse($classComment); - } - $time = microtime(true) - $time; - - $this->printResults('doc-parser', $time, $c); - } - - /** - * @group performance - */ - public function testDocLexerPerformance() - { - $method = $this->getMethod(); - $methodComment = $method->getDocComment(); - $classComment = $method->getDeclaringClass()->getDocComment(); - - $time = microtime(true); - for ($i=0,$c=500; $i<$c; $i++) { - $lexer = new DocLexer(); - $lexer->setInput($methodComment); - $lexer->setInput($classComment); - } - $time = microtime(true) - $time; - - $this->printResults('doc-lexer', $time, $c); - } - - /** - * @group performance - */ - public function testPhpParserPerformanceWithShortCut() - { - $class = new \ReflectionClass('Doctrine\Tests\Common\Annotations\Fixtures\NamespacedSingleClassLOC1000'); - - $time = microtime(true); - for ($i=0,$c=500; $i<$c; $i++) { - $parser = new PhpParser(); - $parser->parseClass($class); - } - $time = microtime(true) - $time; - - $this->printResults('doc-parser-with-short-cut', $time, $c); - } - - /** - * @group performance - */ - public function testPhpParserPerformanceWithoutShortCut() - { - $class = new \ReflectionClass('SingleClassLOC1000'); - - $time = microtime(true); - for ($i=0,$c=500; $i<$c; $i++) { - $parser = new PhpParser(); - $parser->parseClass($class); - } - $time = microtime(true) - $time; - - $this->printResults('doc-parser-without-short-cut', $time, $c); - } - - private function getMethod() - { - return new \ReflectionMethod('Doctrine\Tests\Common\Annotations\Fixtures\Controller', 'helloAction'); - } - - private function printResults($test, $time, $iterations) - { - if (0 == $iterations) { - throw new \InvalidArgumentException('$iterations cannot be zero.'); - } - - $title = $test." results:\n"; - $iterationsText = sprintf("Iterations: %d\n", $iterations); - $totalTime = sprintf("Total Time: %.3f s\n", $time); - $iterationTime = sprintf("Time per iteration: %.3f ms\n", $time/$iterations * 1000); - - $max = max(strlen($title), strlen($iterationTime)) - 1; - - echo "\n".str_repeat('-', $max)."\n"; - echo $title; - echo str_repeat('=', $max)."\n"; - echo $iterationsText; - echo $totalTime; - echo $iterationTime; - echo str_repeat('-', $max)."\n"; - } -} \ No newline at end of file diff --git a/core/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/PhpParserTest.php b/core/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/PhpParserTest.php deleted file mode 100644 index dc01f8b..0000000 --- a/core/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/PhpParserTest.php +++ /dev/null @@ -1,207 +0,0 @@ -assertEquals(array( - 'route' => __NAMESPACE__ . '\Fixtures\Annotation\Route', - 'secure' => __NAMESPACE__ . '\Fixtures\Annotation\Secure', - ), $parser->parseClass($class)); - } - - public function testParseClassWithMultipleImportsInUseStatement() - { - $class = new ReflectionClass(__NAMESPACE__ . '\Fixtures\MultipleImportsInUseStatement'); - $parser = new PhpParser(); - - $this->assertEquals(array( - 'route' => __NAMESPACE__ . '\Fixtures\Annotation\Route', - 'secure' => __NAMESPACE__ . '\Fixtures\Annotation\Secure', - ), $parser->parseClass($class)); - } - - public function testParseClassWhenNotUserDefined() - { - $parser = new PhpParser(); - $this->assertEquals(array(), $parser->parseClass(new \ReflectionClass('\stdClass'))); - } - - public function testClassFileDoesNotExist() - { - $class = $this->getMockBuilder('\ReflectionClass') - ->disableOriginalConstructor() - ->getMock(); - $class->expects($this->once()) - ->method('getFilename') - ->will($this->returnValue('/valid/class/Fake.php(35) : eval()d code')); - - $parser = new PhpParser(); - $this->assertEquals(array(), $parser->parseClass($class)); - } - - public function testParseClassWhenClassIsNotNamespaced() - { - $parser = new PhpParser(); - $class = new ReflectionClass('\AnnotationsTestsFixturesNonNamespacedClass'); - - $this->assertEquals(array( - 'route' => __NAMESPACE__ . '\Fixtures\Annotation\Route', - 'template' => __NAMESPACE__ . '\Fixtures\Annotation\Template', - ), $parser->parseClass($class)); - } - - public function testParseClassWhenClassIsInterface() - { - $parser = new PhpParser(); - $class = new ReflectionClass(__NAMESPACE__ . '\Fixtures\TestInterface'); - - $this->assertEquals(array( - 'secure' => __NAMESPACE__ . '\Fixtures\Annotation\Secure', - ), $parser->parseClass($class)); - } - - public function testClassWithFullyQualifiedUseStatements() - { - $parser = new PhpParser(); - $class = new ReflectionClass(__NAMESPACE__ . '\Fixtures\ClassWithFullyQualifiedUseStatements'); - - $this->assertEquals(array( - 'secure' => '\\' . __NAMESPACE__ . '\Fixtures\Annotation\Secure', - 'route' => '\\' . __NAMESPACE__ . '\Fixtures\Annotation\Route', - 'template' => '\\' . __NAMESPACE__ . '\Fixtures\Annotation\Template', - ), $parser->parseClass($class)); - } - - public function testNamespaceAndClassCommentedOut() - { - $parser = new PhpParser(); - $class = new ReflectionClass(__NAMESPACE__ . '\Fixtures\NamespaceAndClassCommentedOut'); - - $this->assertEquals(array( - 'route' => __NAMESPACE__ . '\Fixtures\Annotation\Route', - 'template' => __NAMESPACE__ . '\Fixtures\Annotation\Template', - ), $parser->parseClass($class)); - } - - public function testEqualNamespacesPerFileWithClassAsFirst() - { - $parser = new PhpParser(); - $class = new ReflectionClass(__NAMESPACE__ . '\Fixtures\EqualNamespacesPerFileWithClassAsFirst'); - - $this->assertEquals(array( - 'secure' => __NAMESPACE__ . '\Fixtures\Annotation\Secure', - 'route' => __NAMESPACE__ . '\Fixtures\Annotation\Route', - ), $parser->parseClass($class)); - } - - public function testEqualNamespacesPerFileWithClassAsLast() - { - $parser = new PhpParser(); - $class = new ReflectionClass(__NAMESPACE__ . '\Fixtures\EqualNamespacesPerFileWithClassAsLast'); - - $this->assertEquals(array( - 'route' => __NAMESPACE__ . '\Fixtures\Annotation\Route', - 'template' => __NAMESPACE__ . '\Fixtures\Annotation\Template', - ), $parser->parseClass($class)); - } - - public function testDifferentNamespacesPerFileWithClassAsFirst() - { - $parser = new PhpParser(); - $class = new ReflectionClass(__NAMESPACE__ . '\Fixtures\DifferentNamespacesPerFileWithClassAsFirst'); - - $this->assertEquals(array( - 'secure' => __NAMESPACE__ . '\Fixtures\Annotation\Secure', - ), $parser->parseClass($class)); - } - - public function testDifferentNamespacesPerFileWithClassAsLast() - { - $parser = new PhpParser(); - $class = new ReflectionClass(__NAMESPACE__ . '\Fixtures\DifferentNamespacesPerFileWithClassAsLast'); - - $this->assertEquals(array( - 'template' => __NAMESPACE__ . '\Fixtures\Annotation\Template', - ), $parser->parseClass($class)); - } - - public function testGlobalNamespacesPerFileWithClassAsFirst() - { - $parser = new PhpParser(); - $class = new \ReflectionClass('\GlobalNamespacesPerFileWithClassAsFirst'); - - $this->assertEquals(array( - 'secure' => __NAMESPACE__ . '\Fixtures\Annotation\Secure', - 'route' => __NAMESPACE__ . '\Fixtures\Annotation\Route', - ), $parser->parseClass($class)); - } - - public function testGlobalNamespacesPerFileWithClassAsLast() - { - $parser = new PhpParser(); - $class = new ReflectionClass('\GlobalNamespacesPerFileWithClassAsLast'); - - $this->assertEquals(array( - 'route' => __NAMESPACE__ . '\Fixtures\Annotation\Route', - 'template' => __NAMESPACE__ . '\Fixtures\Annotation\Template', - ), $parser->parseClass($class)); - } - - public function testNamespaceWithClosureDeclaration() - { - $parser = new PhpParser(); - $class = new ReflectionClass(__NAMESPACE__ . '\Fixtures\NamespaceWithClosureDeclaration'); - - $this->assertEquals(array( - 'secure' => __NAMESPACE__ . '\Fixtures\Annotation\Secure', - 'route' => __NAMESPACE__ . '\Fixtures\Annotation\Route', - 'template' => __NAMESPACE__ . '\Fixtures\Annotation\Template', - ), $parser->parseClass($class)); - } - - public function testIfPointerResetsOnMultipleParsingTries() - { - $parser = new PhpParser(); - $class = new ReflectionClass(__NAMESPACE__ . '\Fixtures\NamespaceWithClosureDeclaration'); - - $this->assertEquals(array( - 'secure' => __NAMESPACE__ . '\Fixtures\Annotation\Secure', - 'route' => __NAMESPACE__ . '\Fixtures\Annotation\Route', - 'template' => __NAMESPACE__ . '\Fixtures\Annotation\Template', - ), $parser->parseClass($class)); - - $this->assertEquals(array( - 'secure' => __NAMESPACE__ . '\Fixtures\Annotation\Secure', - 'route' => __NAMESPACE__ . '\Fixtures\Annotation\Route', - 'template' => __NAMESPACE__ . '\Fixtures\Annotation\Template', - ), $parser->parseClass($class)); - } - - /** - * @group DCOM-97 - * @group regression - */ - public function testClassWithClosure() - { - $parser = new PhpParser(); - $class = new ReflectionClass(__NAMESPACE__ . '\Fixtures\ClassWithClosure'); - - $this->assertEquals(array( - 'annotationtargetall' => __NAMESPACE__ . '\Fixtures\AnnotationTargetAll', - 'annotationtargetannotation' => __NAMESPACE__ . '\Fixtures\AnnotationTargetAnnotation', - ), $parser->parseClass($class)); - } -} \ No newline at end of file diff --git a/core/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/SimpleAnnotationReaderTest.php b/core/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/SimpleAnnotationReaderTest.php deleted file mode 100644 index 51b932a..0000000 --- a/core/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/SimpleAnnotationReaderTest.php +++ /dev/null @@ -1,102 +0,0 @@ -markTestSkipped('The simplified annotation reader would always autoload annotations'); - } - - /** - * @group DDC-1660 - * @group regression - * - * Contrary to the behavior of the default annotation reader, @version is not ignored - */ - public function testInvalidAnnotationButIgnored() - { - $reader = $this->getReader(); - $class = new \ReflectionClass('Doctrine\Tests\Common\Annotations\Fixtures\ClassDDC1660'); - - $this->assertTrue(class_exists('Doctrine\Tests\Common\Annotations\Fixtures\Annotation\Version')); - $this->assertCount(1, $reader->getClassAnnotations($class)); - $this->assertCount(1, $reader->getMethodAnnotations($class->getMethod('bar'))); - $this->assertCount(1, $reader->getPropertyAnnotations($class->getProperty('foo'))); - } - - protected function getReader() - { - $reader = new SimpleAnnotationReader(); - $reader->addNamespace(__NAMESPACE__); - $reader->addNamespace(__NAMESPACE__ . '\Fixtures'); - $reader->addNamespace(__NAMESPACE__ . '\Fixtures\Annotation'); - - return $reader; - } -} \ No newline at end of file diff --git a/core/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/Ticket/DCOM55Test.php b/core/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/Ticket/DCOM55Test.php deleted file mode 100644 index a6159d5..0000000 --- a/core/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/Ticket/DCOM55Test.php +++ /dev/null @@ -1,66 +0,0 @@ -getClassAnnotations($class); - } - - public function testAnnotation() - { - $class = new \ReflectionClass(__NAMESPACE__ . '\\DCOM55Consumer'); - $reader = new AnnotationReader(); - $annots = $reader->getClassAnnotations($class); - - $this->assertEquals(1, count($annots)); - $this->assertInstanceOf(__NAMESPACE__.'\\DCOM55Annotation', $annots[0]); - } - - public function testParseAnnotationDocblocks() - { - $class = new \ReflectionClass(__NAMESPACE__ . '\\DCOM55Annotation'); - $reader = new AnnotationReader(); - $annots = $reader->getClassAnnotations($class); - - $this->assertEquals(0, count($annots)); - } -} - -/** - * @Controller - */ -class Dummy -{ - -} - -/** - * @Annotation - */ -class DCOM55Annotation -{ - -} - -/** - * @DCOM55Annotation - */ -class DCOM55Consumer -{ - -} \ No newline at end of file diff --git a/core/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/Ticket/DCOM58Entity.php b/core/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/Ticket/DCOM58Entity.php deleted file mode 100644 index 708bcc9..0000000 --- a/core/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/Ticket/DCOM58Entity.php +++ /dev/null @@ -1,8 +0,0 @@ -getClassAnnotations(new \ReflectionClass(__NAMESPACE__."\MappedClass")); - - foreach ($result as $annot) { - $classAnnotations[get_class($annot)] = $annot; - } - - $this->assertTrue(!isset($classAnnotations['']), 'Class "xxx" is not a valid entity or mapped super class.'); - } - - public function testIssueGlobalNamespace() - { - $docblock = "@Entity"; - $parser = new DocParser(); - $parser->setImports(array( - "__NAMESPACE__" =>"Doctrine\Tests\Common\Annotations\Ticket\Doctrine\ORM\Mapping" - )); - - $annots = $parser->parse($docblock); - - $this->assertEquals(1, count($annots)); - $this->assertInstanceOf("Doctrine\Tests\Common\Annotations\Ticket\Doctrine\ORM\Mapping\Entity", $annots[0]); - } - - public function testIssueNamespaces() - { - $docblock = "@Entity"; - $parser = new DocParser(); - $parser->addNamespace("Doctrine\Tests\Common\Annotations\Ticket\Doctrine\ORM"); - - $annots = $parser->parse($docblock); - - $this->assertEquals(1, count($annots)); - $this->assertInstanceOf("Doctrine\Tests\Common\Annotations\Ticket\Doctrine\ORM\Entity", $annots[0]); - } - - public function testIssueMultipleNamespaces() - { - $docblock = "@Entity"; - $parser = new DocParser(); - $parser->addNamespace("Doctrine\Tests\Common\Annotations\Ticket\Doctrine\ORM\Mapping"); - $parser->addNamespace("Doctrine\Tests\Common\Annotations\Ticket\Doctrine\ORM"); - - $annots = $parser->parse($docblock); - - $this->assertEquals(1, count($annots)); - $this->assertInstanceOf("Doctrine\Tests\Common\Annotations\Ticket\Doctrine\ORM\Mapping\Entity", $annots[0]); - } - - public function testIssueWithNamespacesOrImports() - { - $docblock = "@Entity"; - $parser = new DocParser(); - $annots = $parser->parse($docblock); - - $this->assertEquals(1, count($annots)); - $this->assertInstanceOf("Entity", $annots[0]); - $this->assertEquals(1, count($annots)); - } - - - public function testIssueSimpleAnnotationReader() - { - $reader = new SimpleAnnotationReader(); - $reader->addNamespace('Doctrine\Tests\Common\Annotations\Ticket\Doctrine\ORM\Mapping'); - $annots = $reader->getClassAnnotations(new \ReflectionClass(__NAMESPACE__."\MappedClass")); - - $this->assertEquals(1, count($annots)); - $this->assertInstanceOf("Doctrine\Tests\Common\Annotations\Ticket\Doctrine\ORM\Mapping\Entity", $annots[0]); - } - -} - -/** - * @Entity - */ -class MappedClass -{ - -} - - -namespace Doctrine\Tests\Common\Annotations\Ticket\Doctrine\ORM\Mapping; -/** -* @Annotation -*/ -class Entity -{ - -} - -namespace Doctrine\Tests\Common\Annotations\Ticket\Doctrine\ORM; -/** -* @Annotation -*/ -class Entity -{ - -} diff --git a/core/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/TopLevelAnnotation.php b/core/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/TopLevelAnnotation.php deleted file mode 100644 index ff3ca37..0000000 --- a/core/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/TopLevelAnnotation.php +++ /dev/null @@ -1,8 +0,0 @@ -> ./tests/travis/php.ini ;fi" - - composer self-update - - composer --prefer-source --dev install - - sh -c "if [ $TRAVIS_PHP_VERSION != 'hhvm' ]; then phpenv config-add ./tests/travis/php.ini; fi" - -script: - - ./vendor/bin/phpunit -c ./tests/travis/phpunit.travis.xml -v - -after_script: - - php vendor/bin/coveralls -v - -matrix: - allow_failures: - - php: hhvm diff --git a/core/vendor/doctrine/cache/LICENSE b/core/vendor/doctrine/cache/LICENSE deleted file mode 100644 index 4a91f0b..0000000 --- a/core/vendor/doctrine/cache/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2006-2012 Doctrine Project - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/core/vendor/doctrine/cache/README.md b/core/vendor/doctrine/cache/README.md deleted file mode 100644 index 94f80a3..0000000 --- a/core/vendor/doctrine/cache/README.md +++ /dev/null @@ -1,14 +0,0 @@ -# Doctrine Cache - -Master: [![Build Status](https://secure.travis-ci.org/doctrine/cache.png?branch=master)](http://travis-ci.org/doctrine/cache) [![Coverage Status](https://coveralls.io/repos/doctrine/cache/badge.png?branch=master)](https://coveralls.io/r/doctrine/cache?branch=master) - -[![Latest Stable Version](https://poser.pugx.org/doctrine/cache/v/stable.png)](https://packagist.org/packages/doctrine/cache) [![Total Downloads](https://poser.pugx.org/doctrine/cache/downloads.png)](https://packagist.org/packages/doctrine/cache) - -Cache component extracted from the Doctrine Common project. - -## Changelog - -### v1.2 - -* Added support for MongoDB as Cache Provider -* Fix namespace version reset diff --git a/core/vendor/doctrine/cache/build.properties b/core/vendor/doctrine/cache/build.properties deleted file mode 100644 index 2d98c36..0000000 --- a/core/vendor/doctrine/cache/build.properties +++ /dev/null @@ -1,3 +0,0 @@ -# Version class and file -project.version_class = Doctrine\\Common\\Cache\\Version -project.version_file = lib/Doctrine/Common/Cache/Version.php diff --git a/core/vendor/doctrine/cache/build.xml b/core/vendor/doctrine/cache/build.xml deleted file mode 100644 index a7c52e3..0000000 --- a/core/vendor/doctrine/cache/build.xml +++ /dev/null @@ -1,110 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/core/vendor/doctrine/cache/composer.json b/core/vendor/doctrine/cache/composer.json deleted file mode 100644 index 25b9de8..0000000 --- a/core/vendor/doctrine/cache/composer.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name": "doctrine/cache", - "type": "library", - "description": "Caching library offering an object-oriented API for many cache backends", - "keywords": ["cache", "caching"], - "homepage": "http://www.doctrine-project.org", - "license": "MIT", - "authors": [ - {"name": "Guilherme Blanco", "email": "guilhermeblanco@gmail.com"}, - {"name": "Roman Borschel", "email": "roman@code-factory.org"}, - {"name": "Benjamin Eberlei", "email": "kontakt@beberlei.de"}, - {"name": "Jonathan Wage", "email": "jonwage@gmail.com"}, - {"name": "Johannes Schmitt", "email": "schmittjoh@gmail.com"} - ], - "require": { - "php": ">=5.3.2" - }, - "require-dev": { - "phpunit/phpunit": ">=3.7", - "satooshi/php-coveralls": "~0.6" - }, - "conflict": { - "doctrine/common": ">2.2,<2.4" - }, - "autoload": { - "psr-0": { "Doctrine\\Common\\Cache\\": "lib/" } - }, - "extra": { - "branch-alias": { - "dev-master": "1.4.x-dev" - } - } -} diff --git a/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ApcCache.php b/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ApcCache.php deleted file mode 100644 index 1f19db6..0000000 --- a/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ApcCache.php +++ /dev/null @@ -1,98 +0,0 @@ -. - */ - -namespace Doctrine\Common\Cache; - -/** - * APC cache provider. - * - * @link www.doctrine-project.org - * @since 2.0 - * @author Benjamin Eberlei - * @author Guilherme Blanco - * @author Jonathan Wage - * @author Roman Borschel - * @author David Abdemoulaie - */ -class ApcCache extends CacheProvider -{ - /** - * {@inheritdoc} - */ - protected function doFetch($id) - { - return apc_fetch($id); - } - - /** - * {@inheritdoc} - */ - protected function doContains($id) - { - return apc_exists($id); - } - - /** - * {@inheritdoc} - */ - protected function doSave($id, $data, $lifeTime = 0) - { - return (bool) apc_store($id, $data, (int) $lifeTime); - } - - /** - * {@inheritdoc} - */ - protected function doDelete($id) - { - return apc_delete($id); - } - - /** - * {@inheritdoc} - */ - protected function doFlush() - { - return apc_clear_cache() && apc_clear_cache('user'); - } - - /** - * {@inheritdoc} - */ - protected function doGetStats() - { - $info = apc_cache_info(); - $sma = apc_sma_info(); - - // @TODO - Temporary fix @see https://github.com/krakjoe/apcu/pull/42 - if (PHP_VERSION_ID >= 50500) { - $info['num_hits'] = isset($info['num_hits']) ? $info['num_hits'] : $info['nhits']; - $info['num_misses'] = isset($info['num_misses']) ? $info['num_misses'] : $info['nmisses']; - $info['start_time'] = isset($info['start_time']) ? $info['start_time'] : $info['stime']; - } - - return array( - Cache::STATS_HITS => $info['num_hits'], - Cache::STATS_MISSES => $info['num_misses'], - Cache::STATS_UPTIME => $info['start_time'], - Cache::STATS_MEMORY_USAGE => $info['mem_size'], - Cache::STATS_MEMORY_AVAILABLE => $sma['avail_mem'], - ); - } -} diff --git a/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ArrayCache.php b/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ArrayCache.php deleted file mode 100644 index e824377..0000000 --- a/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ArrayCache.php +++ /dev/null @@ -1,93 +0,0 @@ -. - */ - -namespace Doctrine\Common\Cache; - -/** - * Array cache driver. - * - * @link www.doctrine-project.org - * @since 2.0 - * @author Benjamin Eberlei - * @author Guilherme Blanco - * @author Jonathan Wage - * @author Roman Borschel - * @author David Abdemoulaie - */ -class ArrayCache extends CacheProvider -{ - /** - * @var array $data - */ - private $data = array(); - - /** - * {@inheritdoc} - */ - protected function doFetch($id) - { - return $this->doContains($id) ? $this->data[$id] : false; - } - - /** - * {@inheritdoc} - */ - protected function doContains($id) - { - return isset($this->data[$id]) || array_key_exists($id, $this->data); - } - - /** - * {@inheritdoc} - */ - protected function doSave($id, $data, $lifeTime = 0) - { - $this->data[$id] = $data; - - return true; - } - - /** - * {@inheritdoc} - */ - protected function doDelete($id) - { - unset($this->data[$id]); - - return true; - } - - /** - * {@inheritdoc} - */ - protected function doFlush() - { - $this->data = array(); - - return true; - } - - /** - * {@inheritdoc} - */ - protected function doGetStats() - { - return null; - } -} diff --git a/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/Cache.php b/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/Cache.php deleted file mode 100644 index 0785f26..0000000 --- a/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/Cache.php +++ /dev/null @@ -1,111 +0,0 @@ -. - */ - -namespace Doctrine\Common\Cache; - -/** - * Interface for cache drivers. - * - * @link www.doctrine-project.org - * @since 2.0 - * @author Benjamin Eberlei - * @author Guilherme Blanco - * @author Jonathan Wage - * @author Roman Borschel - * @author Fabio B. Silva - */ -interface Cache -{ - const STATS_HITS = 'hits'; - const STATS_MISSES = 'misses'; - const STATS_UPTIME = 'uptime'; - const STATS_MEMORY_USAGE = 'memory_usage'; - const STATS_MEMORY_AVAILABLE = 'memory_available'; - /** - * Only for backward compatibility (may be removed in next major release) - * - * @deprecated - */ - const STATS_MEMORY_AVAILIABLE = 'memory_available'; - - /** - * Fetches an entry from the cache. - * - * @param string $id The id of the cache entry to fetch. - * - * @return mixed The cached data or FALSE, if no cache entry exists for the given id. - */ - function fetch($id); - - /** - * Tests if an entry exists in the cache. - * - * @param string $id The cache id of the entry to check for. - * - * @return boolean TRUE if a cache entry exists for the given cache id, FALSE otherwise. - */ - function contains($id); - - /** - * Puts data into the cache. - * - * @param string $id The cache id. - * @param mixed $data The cache entry/data. - * @param int $lifeTime The cache lifetime. - * If != 0, sets a specific lifetime for this cache entry (0 => infinite lifeTime). - * - * @return boolean TRUE if the entry was successfully stored in the cache, FALSE otherwise. - */ - function save($id, $data, $lifeTime = 0); - - /** - * Deletes a cache entry. - * - * @param string $id The cache id. - * - * @return boolean TRUE if the cache entry was successfully deleted, FALSE otherwise. - */ - function delete($id); - - /** - * Retrieves cached information from the data store. - * - * The server's statistics array has the following values: - * - * - hits - * Number of keys that have been requested and found present. - * - * - misses - * Number of items that have been requested and not found. - * - * - uptime - * Time that the server is running. - * - * - memory_usage - * Memory used by this server to store items. - * - * - memory_available - * Memory allowed to use for storage. - * - * @since 2.2 - * - * @return array|null An associative array with server's statistics if available, NULL otherwise. - */ - function getStats(); -} diff --git a/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/CacheProvider.php b/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/CacheProvider.php deleted file mode 100644 index f896bc7..0000000 --- a/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/CacheProvider.php +++ /dev/null @@ -1,241 +0,0 @@ -. - */ - -namespace Doctrine\Common\Cache; - -/** - * Base class for cache provider implementations. - * - * @since 2.2 - * @author Benjamin Eberlei - * @author Guilherme Blanco - * @author Jonathan Wage - * @author Roman Borschel - * @author Fabio B. Silva - */ -abstract class CacheProvider implements Cache -{ - const DOCTRINE_NAMESPACE_CACHEKEY = 'DoctrineNamespaceCacheKey[%s]'; - - /** - * The namespace to prefix all cache ids with. - * - * @var string - */ - private $namespace = ''; - - /** - * The namespace version. - * - * @var integer|null - */ - private $namespaceVersion; - - /** - * Sets the namespace to prefix all cache ids with. - * - * @param string $namespace - * - * @return void - */ - public function setNamespace($namespace) - { - $this->namespace = (string) $namespace; - $this->namespaceVersion = null; - } - - /** - * Retrieves the namespace that prefixes all cache ids. - * - * @return string - */ - public function getNamespace() - { - return $this->namespace; - } - - /** - * {@inheritdoc} - */ - public function fetch($id) - { - return $this->doFetch($this->getNamespacedId($id)); - } - - /** - * {@inheritdoc} - */ - public function contains($id) - { - return $this->doContains($this->getNamespacedId($id)); - } - - /** - * {@inheritdoc} - */ - public function save($id, $data, $lifeTime = 0) - { - return $this->doSave($this->getNamespacedId($id), $data, $lifeTime); - } - - /** - * {@inheritdoc} - */ - public function delete($id) - { - return $this->doDelete($this->getNamespacedId($id)); - } - - /** - * {@inheritdoc} - */ - public function getStats() - { - return $this->doGetStats(); - } - - /** - * Flushes all cache entries. - * - * @return boolean TRUE if the cache entries were successfully flushed, FALSE otherwise. - */ - public function flushAll() - { - return $this->doFlush(); - } - - /** - * Deletes all cache entries. - * - * @return boolean TRUE if the cache entries were successfully deleted, FALSE otherwise. - */ - public function deleteAll() - { - $namespaceCacheKey = $this->getNamespaceCacheKey(); - $namespaceVersion = $this->getNamespaceVersion() + 1; - - $this->namespaceVersion = $namespaceVersion; - - return $this->doSave($namespaceCacheKey, $namespaceVersion); - } - - /** - * Prefixes the passed id with the configured namespace value. - * - * @param string $id The id to namespace. - * - * @return string The namespaced id. - */ - private function getNamespacedId($id) - { - $namespaceVersion = $this->getNamespaceVersion(); - - return sprintf('%s[%s][%s]', $this->namespace, $id, $namespaceVersion); - } - - /** - * Returns the namespace cache key. - * - * @return string - */ - private function getNamespaceCacheKey() - { - return sprintf(self::DOCTRINE_NAMESPACE_CACHEKEY, $this->namespace); - } - - /** - * Returns the namespace version. - * - * @return integer - */ - private function getNamespaceVersion() - { - if (null !== $this->namespaceVersion) { - return $this->namespaceVersion; - } - - $namespaceCacheKey = $this->getNamespaceCacheKey(); - $namespaceVersion = $this->doFetch($namespaceCacheKey); - - if (false === $namespaceVersion) { - $namespaceVersion = 1; - - $this->doSave($namespaceCacheKey, $namespaceVersion); - } - - $this->namespaceVersion = $namespaceVersion; - - return $this->namespaceVersion; - } - - /** - * Fetches an entry from the cache. - * - * @param string $id The id of the cache entry to fetch. - * - * @return string|boolean The cached data or FALSE, if no cache entry exists for the given id. - */ - abstract protected function doFetch($id); - - /** - * Tests if an entry exists in the cache. - * - * @param string $id The cache id of the entry to check for. - * - * @return boolean TRUE if a cache entry exists for the given cache id, FALSE otherwise. - */ - abstract protected function doContains($id); - - /** - * Puts data into the cache. - * - * @param string $id The cache id. - * @param string $data The cache entry/data. - * @param int $lifeTime The lifetime. If != 0, sets a specific lifetime for this - * cache entry (0 => infinite lifeTime). - * - * @return boolean TRUE if the entry was successfully stored in the cache, FALSE otherwise. - */ - abstract protected function doSave($id, $data, $lifeTime = 0); - - /** - * Deletes a cache entry. - * - * @param string $id The cache id. - * - * @return boolean TRUE if the cache entry was successfully deleted, FALSE otherwise. - */ - abstract protected function doDelete($id); - - /** - * Flushes all cache entries. - * - * @return boolean TRUE if the cache entry was successfully deleted, FALSE otherwise. - */ - abstract protected function doFlush(); - - /** - * Retrieves cached information from the data store. - * - * @since 2.2 - * - * @return array|null An associative array with server's statistics if available, NULL otherwise. - */ - abstract protected function doGetStats(); -} diff --git a/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/CouchbaseCache.php b/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/CouchbaseCache.php deleted file mode 100644 index c21691d..0000000 --- a/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/CouchbaseCache.php +++ /dev/null @@ -1,121 +0,0 @@ -. - */ - -namespace Doctrine\Common\Cache; - -use \Couchbase; - -/** - * Couchbase cache provider. - * - * @link www.doctrine-project.org - * @since 2.4 - * @author Michael Nitschinger - */ -class CouchbaseCache extends CacheProvider -{ - /** - * @var Couchbase|null - */ - private $couchbase; - - /** - * Sets the Couchbase instance to use. - * - * @param Couchbase $couchbase - * - * @return void - */ - public function setCouchbase(Couchbase $couchbase) - { - $this->couchbase = $couchbase; - } - - /** - * Gets the Couchbase instance used by the cache. - * - * @return Couchbase|null - */ - public function getCouchbase() - { - return $this->couchbase; - } - - /** - * {@inheritdoc} - */ - protected function doFetch($id) - { - return $this->couchbase->get($id) ?: false; - } - - /** - * {@inheritdoc} - */ - protected function doContains($id) - { - return (null !== $this->couchbase->get($id)); - } - - /** - * {@inheritdoc} - */ - protected function doSave($id, $data, $lifeTime = 0) - { - if ($lifeTime > 30 * 24 * 3600) { - $lifeTime = time() + $lifeTime; - } - return $this->couchbase->set($id, $data, (int) $lifeTime); - } - - /** - * {@inheritdoc} - */ - protected function doDelete($id) - { - return $this->couchbase->delete($id); - } - - /** - * {@inheritdoc} - */ - protected function doFlush() - { - return $this->couchbase->flush(); - } - - /** - * {@inheritdoc} - */ - protected function doGetStats() - { - $stats = $this->couchbase->getStats(); - $servers = $this->couchbase->getServers(); - $server = explode(":", $servers[0]); - $key = $server[0] . ":" . "11210"; - $stats = $stats[$key]; - return array( - Cache::STATS_HITS => $stats['get_hits'], - Cache::STATS_MISSES => $stats['get_misses'], - Cache::STATS_UPTIME => $stats['uptime'], - Cache::STATS_MEMORY_USAGE => $stats['bytes'], - Cache::STATS_MEMORY_AVAILABLE => $stats['limit_maxbytes'], - ); - } -} diff --git a/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/FileCache.php b/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/FileCache.php deleted file mode 100644 index d91d0bc..0000000 --- a/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/FileCache.php +++ /dev/null @@ -1,158 +0,0 @@ -. - */ - -namespace Doctrine\Common\Cache; - -/** - * Base file cache driver. - * - * @since 2.3 - * @author Fabio B. Silva - */ -abstract class FileCache extends CacheProvider -{ - /** - * The cache directory. - * - * @var string - */ - protected $directory; - - /** - * The cache file extension. - * - * @var string|null - */ - protected $extension; - - /** - * Constructor. - * - * @param string $directory The cache directory. - * @param string|null $extension The cache file extension. - * - * @throws \InvalidArgumentException - */ - public function __construct($directory, $extension = null) - { - if ( ! is_dir($directory) && ! @mkdir($directory, 0777, true)) { - throw new \InvalidArgumentException(sprintf( - 'The directory "%s" does not exist and could not be created.', - $directory - )); - } - - if ( ! is_writable($directory)) { - throw new \InvalidArgumentException(sprintf( - 'The directory "%s" is not writable.', - $directory - )); - } - - $this->directory = realpath($directory); - $this->extension = $extension ?: $this->extension; - } - - /** - * Gets the cache directory. - * - * @return string - */ - public function getDirectory() - { - return $this->directory; - } - - /** - * Gets the cache file extension. - * - * @return string|null - */ - public function getExtension() - { - return $this->extension; - } - - /** - * @param string $id - * - * @return string - */ - protected function getFilename($id) - { - $hash = hash('sha256', $id); - $path = implode(str_split($hash, 16), DIRECTORY_SEPARATOR); - $path = $this->directory . DIRECTORY_SEPARATOR . $path; - $id = preg_replace('@[\\\/:"*?<>|]+@', '', $id); - - return $path . DIRECTORY_SEPARATOR . $id . $this->extension; - } - - /** - * {@inheritdoc} - */ - protected function doDelete($id) - { - return @unlink($this->getFilename($id)); - } - - /** - * {@inheritdoc} - */ - protected function doFlush() - { - foreach ($this->getIterator() as $name => $file) { - @unlink($name); - } - - return true; - } - - /** - * {@inheritdoc} - */ - protected function doGetStats() - { - $usage = 0; - foreach ($this->getIterator() as $file) { - $usage += $file->getSize(); - } - - $free = disk_free_space($this->directory); - - return array( - Cache::STATS_HITS => null, - Cache::STATS_MISSES => null, - Cache::STATS_UPTIME => null, - Cache::STATS_MEMORY_USAGE => $usage, - Cache::STATS_MEMORY_AVAILABLE => $free, - ); - } - - /** - * @return \Iterator - */ - private function getIterator() - { - $pattern = '/^.+\\' . $this->extension . '$/i'; - $iterator = new \RecursiveDirectoryIterator($this->directory); - $iterator = new \RecursiveIteratorIterator($iterator); - return new \RegexIterator($iterator, $pattern); - } -} diff --git a/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/FilesystemCache.php b/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/FilesystemCache.php deleted file mode 100644 index 07eda8e..0000000 --- a/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/FilesystemCache.php +++ /dev/null @@ -1,125 +0,0 @@ -. - */ - -namespace Doctrine\Common\Cache; - -/** - * Filesystem cache driver. - * - * @since 2.3 - * @author Fabio B. Silva - */ -class FilesystemCache extends FileCache -{ - const EXTENSION = '.doctrinecache.data'; - - /** - * {@inheritdoc} - */ - protected $extension = self::EXTENSION; - - /** - * {@inheritdoc} - */ - protected function doFetch($id) - { - $data = ''; - $lifetime = -1; - $filename = $this->getFilename($id); - - if ( ! is_file($filename)) { - return false; - } - - $resource = fopen($filename, "r"); - - if (false !== ($line = fgets($resource))) { - $lifetime = (integer) $line; - } - - if ($lifetime !== 0 && $lifetime < time()) { - fclose($resource); - - return false; - } - - while (false !== ($line = fgets($resource))) { - $data .= $line; - } - - fclose($resource); - - return unserialize($data); - } - - /** - * {@inheritdoc} - */ - protected function doContains($id) - { - $lifetime = -1; - $filename = $this->getFilename($id); - - if ( ! is_file($filename)) { - return false; - } - - $resource = fopen($filename, "r"); - - if (false !== ($line = fgets($resource))) { - $lifetime = (integer) $line; - } - - fclose($resource); - - return $lifetime === 0 || $lifetime > time(); - } - - /** - * {@inheritdoc} - */ - protected function doSave($id, $data, $lifeTime = 0) - { - if ($lifeTime > 0) { - $lifeTime = time() + $lifeTime; - } - - $data = serialize($data); - $filename = $this->getFilename($id); - $filepath = pathinfo($filename, PATHINFO_DIRNAME); - - if ( ! is_dir($filepath)) { - if (false === @mkdir($filepath, 0777, true) && !is_dir($filepath)) { - return false; - } - } elseif ( ! is_writable($filepath)) { - return false; - } - - $tmpFile = tempnam($filepath, basename($filename)); - - if ((file_put_contents($tmpFile, $lifeTime . PHP_EOL . $data) !== false) && @rename($tmpFile, $filename)) { - @chmod($filename, 0666 & ~umask()); - - return true; - } - - return false; - } -} diff --git a/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/MemcacheCache.php b/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/MemcacheCache.php deleted file mode 100644 index f839a65..0000000 --- a/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/MemcacheCache.php +++ /dev/null @@ -1,121 +0,0 @@ -. - */ - -namespace Doctrine\Common\Cache; - -use \Memcache; - -/** - * Memcache cache provider. - * - * @link www.doctrine-project.org - * @since 2.0 - * @author Benjamin Eberlei - * @author Guilherme Blanco - * @author Jonathan Wage - * @author Roman Borschel - * @author David Abdemoulaie - */ -class MemcacheCache extends CacheProvider -{ - /** - * @var Memcache|null - */ - private $memcache; - - /** - * Sets the memcache instance to use. - * - * @param Memcache $memcache - * - * @return void - */ - public function setMemcache(Memcache $memcache) - { - $this->memcache = $memcache; - } - - /** - * Gets the memcache instance used by the cache. - * - * @return Memcache|null - */ - public function getMemcache() - { - return $this->memcache; - } - - /** - * {@inheritdoc} - */ - protected function doFetch($id) - { - return $this->memcache->get($id); - } - - /** - * {@inheritdoc} - */ - protected function doContains($id) - { - return (bool) $this->memcache->get($id); - } - - /** - * {@inheritdoc} - */ - protected function doSave($id, $data, $lifeTime = 0) - { - if ($lifeTime > 30 * 24 * 3600) { - $lifeTime = time() + $lifeTime; - } - return $this->memcache->set($id, $data, 0, (int) $lifeTime); - } - - /** - * {@inheritdoc} - */ - protected function doDelete($id) - { - return $this->memcache->delete($id); - } - - /** - * {@inheritdoc} - */ - protected function doFlush() - { - return $this->memcache->flush(); - } - - /** - * {@inheritdoc} - */ - protected function doGetStats() - { - $stats = $this->memcache->getStats(); - return array( - Cache::STATS_HITS => $stats['get_hits'], - Cache::STATS_MISSES => $stats['get_misses'], - Cache::STATS_UPTIME => $stats['uptime'], - Cache::STATS_MEMORY_USAGE => $stats['bytes'], - Cache::STATS_MEMORY_AVAILABLE => $stats['limit_maxbytes'], - ); - } -} diff --git a/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/MemcachedCache.php b/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/MemcachedCache.php deleted file mode 100644 index f7e5500..0000000 --- a/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/MemcachedCache.php +++ /dev/null @@ -1,124 +0,0 @@ -. - */ - -namespace Doctrine\Common\Cache; - -use \Memcached; - -/** - * Memcached cache provider. - * - * @link www.doctrine-project.org - * @since 2.2 - * @author Benjamin Eberlei - * @author Guilherme Blanco - * @author Jonathan Wage - * @author Roman Borschel - * @author David Abdemoulaie - */ -class MemcachedCache extends CacheProvider -{ - /** - * @var Memcached|null - */ - private $memcached; - - /** - * Sets the memcache instance to use. - * - * @param Memcached $memcached - * - * @return void - */ - public function setMemcached(Memcached $memcached) - { - $this->memcached = $memcached; - } - - /** - * Gets the memcached instance used by the cache. - * - * @return Memcached|null - */ - public function getMemcached() - { - return $this->memcached; - } - - /** - * {@inheritdoc} - */ - protected function doFetch($id) - { - return $this->memcached->get($id); - } - - /** - * {@inheritdoc} - */ - protected function doContains($id) - { - return (false !== $this->memcached->get($id)); - } - - /** - * {@inheritdoc} - */ - protected function doSave($id, $data, $lifeTime = 0) - { - if ($lifeTime > 30 * 24 * 3600) { - $lifeTime = time() + $lifeTime; - } - return $this->memcached->set($id, $data, (int) $lifeTime); - } - - /** - * {@inheritdoc} - */ - protected function doDelete($id) - { - return $this->memcached->delete($id); - } - - /** - * {@inheritdoc} - */ - protected function doFlush() - { - return $this->memcached->flush(); - } - - /** - * {@inheritdoc} - */ - protected function doGetStats() - { - $stats = $this->memcached->getStats(); - $servers = $this->memcached->getServerList(); - $key = $servers[0]['host'] . ':' . $servers[0]['port']; - $stats = $stats[$key]; - return array( - Cache::STATS_HITS => $stats['get_hits'], - Cache::STATS_MISSES => $stats['get_misses'], - Cache::STATS_UPTIME => $stats['uptime'], - Cache::STATS_MEMORY_USAGE => $stats['bytes'], - Cache::STATS_MEMORY_AVAILABLE => $stats['limit_maxbytes'], - ); - } -} diff --git a/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/MongoDBCache.php b/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/MongoDBCache.php deleted file mode 100644 index 0c7ac0a..0000000 --- a/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/MongoDBCache.php +++ /dev/null @@ -1,191 +0,0 @@ -. - */ - -namespace Doctrine\Common\Cache; - -use MongoBinData; -use MongoCollection; -use MongoDate; - -/** - * MongoDB cache provider. - * - * @since 1.1 - * @author Jeremy Mikola - */ -class MongoDBCache extends CacheProvider -{ - /** - * The data field will store the serialized PHP value. - */ - const DATA_FIELD = 'd'; - - /** - * The expiration field will store a MongoDate value indicating when the - * cache entry should expire. - * - * With MongoDB 2.2+, entries can be automatically deleted by MongoDB by - * indexing this field wit the "expireAfterSeconds" option equal to zero. - * This will direct MongoDB to regularly query for and delete any entries - * whose date is older than the current time. Entries without a date value - * in this field will be ignored. - * - * The cache provider will also check dates on its own, in case expired - * entries are fetched before MongoDB's TTLMonitor pass can expire them. - * - * @see http://docs.mongodb.org/manual/tutorial/expire-data/ - */ - const EXPIRATION_FIELD = 'e'; - - /** - * @var MongoCollection - */ - private $collection; - - /** - * Constructor. - * - * This provider will default to the write concern and read preference - * options set on the MongoCollection instance (or inherited from MongoDB or - * MongoClient). Using an unacknowledged write concern (< 1) may make the - * return values of delete() and save() unreliable. Reading from secondaries - * may make contain() and fetch() unreliable. - * - * @see http://www.php.net/manual/en/mongo.readpreferences.php - * @see http://www.php.net/manual/en/mongo.writeconcerns.php - * @param MongoCollection $collection - */ - public function __construct(MongoCollection $collection) - { - $this->collection = $collection; - } - - /** - * {@inheritdoc} - */ - protected function doFetch($id) - { - $document = $this->collection->findOne(array('_id' => $id), array(self::DATA_FIELD, self::EXPIRATION_FIELD)); - - if ($document === null) { - return false; - } - - if ($this->isExpired($document)) { - $this->doDelete($id); - return false; - } - - return unserialize($document[self::DATA_FIELD]->bin); - } - - /** - * {@inheritdoc} - */ - protected function doContains($id) - { - $document = $this->collection->findOne(array('_id' => $id), array(self::EXPIRATION_FIELD)); - - if ($document === null) { - return false; - } - - if ($this->isExpired($document)) { - $this->doDelete($id); - return false; - } - - return true; - } - - /** - * {@inheritdoc} - */ - protected function doSave($id, $data, $lifeTime = 0) - { - $result = $this->collection->update( - array('_id' => $id), - array('$set' => array( - self::EXPIRATION_FIELD => ($lifeTime > 0 ? new MongoDate(time() + $lifeTime) : null), - self::DATA_FIELD => new MongoBinData(serialize($data), MongoBinData::BYTE_ARRAY), - )), - array('upsert' => true, 'multiple' => false) - ); - - return isset($result['ok']) ? $result['ok'] == 1 : true; - } - - /** - * {@inheritdoc} - */ - protected function doDelete($id) - { - $result = $this->collection->remove(array('_id' => $id)); - - return isset($result['n']) ? $result['n'] == 1 : true; - } - - /** - * {@inheritdoc} - */ - protected function doFlush() - { - // Use remove() in lieu of drop() to maintain any collection indexes - $result = $this->collection->remove(); - - return isset($result['ok']) ? $result['ok'] == 1 : true; - } - - /** - * {@inheritdoc} - */ - protected function doGetStats() - { - $serverStatus = $this->collection->db->command(array( - 'serverStatus' => 1, - 'locks' => 0, - 'metrics' => 0, - 'recordStats' => 0, - 'repl' => 0, - )); - - $collStats = $this->collection->db->command(array('collStats' => 1)); - - return array( - Cache::STATS_HITS => null, - Cache::STATS_MISSES => null, - Cache::STATS_UPTIME => (isset($serverStatus['uptime']) ? (integer) $serverStatus['uptime'] : null), - Cache::STATS_MEMORY_USAGE => (isset($collStats['size']) ? (integer) $collStats['size'] : null), - Cache::STATS_MEMORY_AVAILABLE => null, - ); - } - - /** - * Check if the document is expired. - * - * @param array $document - * @return boolean - */ - private function isExpired(array $document) - { - return isset($document[self::EXPIRATION_FIELD]) && - $document[self::EXPIRATION_FIELD] instanceof MongoDate && - $document[self::EXPIRATION_FIELD]->sec < time(); - } -} diff --git a/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/PhpFileCache.php b/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/PhpFileCache.php deleted file mode 100644 index f017d83..0000000 --- a/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/PhpFileCache.php +++ /dev/null @@ -1,107 +0,0 @@ -. - */ - -namespace Doctrine\Common\Cache; - -/** - * Php file cache driver. - * - * @since 2.3 - * @author Fabio B. Silva - */ -class PhpFileCache extends FileCache -{ - const EXTENSION = '.doctrinecache.php'; - - /** - * {@inheritdoc} - */ - protected $extension = self::EXTENSION; - - /** - * {@inheritdoc} - */ - protected function doFetch($id) - { - $filename = $this->getFilename($id); - - if ( ! is_file($filename)) { - return false; - } - - $value = include $filename; - - if ($value['lifetime'] !== 0 && $value['lifetime'] < time()) { - return false; - } - - return $value['data']; - } - - /** - * {@inheritdoc} - */ - protected function doContains($id) - { - $filename = $this->getFilename($id); - - if ( ! is_file($filename)) { - return false; - } - - $value = include $filename; - - return $value['lifetime'] === 0 || $value['lifetime'] > time(); - } - - /** - * {@inheritdoc} - */ - protected function doSave($id, $data, $lifeTime = 0) - { - if ($lifeTime > 0) { - $lifeTime = time() + $lifeTime; - } - - if (is_object($data) && ! method_exists($data, '__set_state')) { - throw new \InvalidArgumentException( - "Invalid argument given, PhpFileCache only allows objects that implement __set_state() " . - "and fully support var_export(). You can use the FilesystemCache to save arbitrary object " . - "graphs using serialize()/deserialize()." - ); - } - - $filename = $this->getFilename($id); - $filepath = pathinfo($filename, PATHINFO_DIRNAME); - - if ( ! is_dir($filepath)) { - mkdir($filepath, 0777, true); - } - - $value = array( - 'lifetime' => $lifeTime, - 'data' => $data - ); - - $value = var_export($value, true); - $code = sprintf('. - */ - -namespace Doctrine\Common\Cache; - -use Redis; - -/** - * Redis cache provider. - * - * @link www.doctrine-project.org - * @since 2.2 - * @author Osman Ungur - */ -class RedisCache extends CacheProvider -{ - /** - * @var Redis|null - */ - private $redis; - - /** - * Sets the redis instance to use. - * - * @param Redis $redis - * - * @return void - */ - public function setRedis(Redis $redis) - { - $redis->setOption(Redis::OPT_SERIALIZER, $this->getSerializerValue()); - $this->redis = $redis; - } - - /** - * Gets the redis instance used by the cache. - * - * @return Redis|null - */ - public function getRedis() - { - return $this->redis; - } - - /** - * {@inheritdoc} - */ - protected function doFetch($id) - { - return $this->redis->get($id); - } - - /** - * {@inheritdoc} - */ - protected function doContains($id) - { - return $this->redis->exists($id); - } - - /** - * {@inheritdoc} - */ - protected function doSave($id, $data, $lifeTime = 0) - { - if ($lifeTime > 0) { - return $this->redis->setex($id, $lifeTime, $data); - } - - return $this->redis->set($id, $data); - } - - /** - * {@inheritdoc} - */ - protected function doDelete($id) - { - return $this->redis->delete($id) > 0; - } - - /** - * {@inheritdoc} - */ - protected function doFlush() - { - return $this->redis->flushDB(); - } - - /** - * {@inheritdoc} - */ - protected function doGetStats() - { - $info = $this->redis->info(); - return array( - Cache::STATS_HITS => false, - Cache::STATS_MISSES => false, - Cache::STATS_UPTIME => $info['uptime_in_seconds'], - Cache::STATS_MEMORY_USAGE => $info['used_memory'], - Cache::STATS_MEMORY_AVAILABLE => false - ); - } - - /** - * Returns the serializer constant to use. If Redis is compiled with - * igbinary support, that is used. Otherwise the default PHP serializer is - * used. - * - * @return integer One of the Redis::SERIALIZER_* constants - */ - protected function getSerializerValue() - { - return defined('Redis::SERIALIZER_IGBINARY') ? Redis::SERIALIZER_IGBINARY : Redis::SERIALIZER_PHP; - } -} diff --git a/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/RiakCache.php b/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/RiakCache.php deleted file mode 100644 index 8bb6b4b..0000000 --- a/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/RiakCache.php +++ /dev/null @@ -1,250 +0,0 @@ -. - */ - -namespace Doctrine\Common\Cache; - -use Riak\Bucket; -use Riak\Connection; -use Riak\Input; -use Riak\Exception; -use Riak\Object; - -/** - * Riak cache provider. - * - * @link www.doctrine-project.org - * @since 1.1 - * @author Guilherme Blanco - */ -class RiakCache extends CacheProvider -{ - const EXPIRES_HEADER = 'X-Riak-Meta-Expires'; - - /** - * @var \Riak\Bucket - */ - private $bucket; - - /** - * Sets the riak bucket instance to use. - * - * @param \Riak\Bucket $bucket - */ - public function __construct(Bucket $bucket) - { - $this->bucket = $bucket; - } - - /** - * {@inheritdoc} - */ - protected function doFetch($id) - { - try { - $response = $this->bucket->get($id); - - // No objects found - if ( ! $response->hasObject()) { - return false; - } - - // Check for attempted siblings - $object = ($response->hasSiblings()) - ? $this->resolveConflict($id, $response->getVClock(), $response->getObjectList()) - : $response->getFirstObject(); - - // Check for expired object - if ($this->isExpired($object)) { - $this->bucket->delete($object); - - return false; - } - - return unserialize($object->getContent()); - } catch (Exception\RiakException $e) { - // Covers: - // - Riak\ConnectionException - // - Riak\CommunicationException - // - Riak\UnexpectedResponseException - // - Riak\NotFoundException - } - - return false; - } - - /** - * {@inheritdoc} - */ - protected function doContains($id) - { - try { - // We only need the HEAD, not the entire object - $input = new Input\GetInput(); - - $input->setReturnHead(true); - - $response = $this->bucket->get($id, $input); - - // No objects found - if ( ! $response->hasObject()) { - return false; - } - - $object = $response->getFirstObject(); - - // Check for expired object - if ($this->isExpired($object)) { - $this->bucket->delete($object); - - return false; - } - - return true; - } catch (Exception\RiakException $e) { - // Do nothing - } - - return false; - } - - /** - * {@inheritdoc} - */ - protected function doSave($id, $data, $lifeTime = 0) - { - try { - $object = new Object($id); - - $object->setContent(serialize($data)); - - if ($lifeTime > 0) { - $object->addMetadata(self::EXPIRES_HEADER, (string) (time() + $lifeTime)); - } - - $this->bucket->put($object); - - return true; - } catch (Exception\RiakException $e) { - // Do nothing - } - - return false; - } - - /** - * {@inheritdoc} - */ - protected function doDelete($id) - { - try { - $this->bucket->delete($id); - - return true; - } catch (Exception\BadArgumentsException $e) { - // Key did not exist on cluster already - } catch (Exception\RiakException $e) { - // Covers: - // - Riak\Exception\ConnectionException - // - Riak\Exception\CommunicationException - // - Riak\Exception\UnexpectedResponseException - } - - return false; - } - - /** - * {@inheritdoc} - */ - protected function doFlush() - { - try { - $keyList = $this->bucket->getKeyList(); - - foreach ($keyList as $key) { - $this->bucket->delete($key); - } - - return true; - } catch (Exception\RiakException $e) { - // Do nothing - } - - return false; - } - - /** - * {@inheritdoc} - */ - protected function doGetStats() - { - // Only exposed through HTTP stats API, not Protocol Buffers API - return null; - } - - /** - * Check if a given Riak Object have expired. - * - * @param \Riak\Object $object - * - * @return boolean - */ - private function isExpired(Object $object) - { - $metadataMap = $object->getMetadataMap(); - - return isset($metadataMap[self::EXPIRES_HEADER]) - && $metadataMap[self::EXPIRES_HEADER] < time(); - } - - /** - * On-read conflict resolution. Applied approach here is last write wins. - * Specific needs may override this method to apply alternate conflict resolutions. - * - * {@internal Riak does not attempt to resolve a write conflict, and store - * it as sibling of conflicted one. By following this approach, it is up to - * the next read to resolve the conflict. When this happens, your fetched - * object will have a list of siblings (read as a list of objects). - * In our specific case, we do not care about the intermediate ones since - * they are all the same read from storage, and we do apply a last sibling - * (last write) wins logic. - * If by any means our resolution generates another conflict, it'll up to - * next read to properly solve it.} - * - * @param string $id - * @param string $vClock - * @param array $objectList - * - * @return \Riak\Object - */ - protected function resolveConflict($id, $vClock, array $objectList) - { - // Our approach here is last-write wins - $winner = $objectList[count($objectList)]; - - $putInput = new Input\PutInput(); - $putInput->setVClock($vClock); - - $mergedObject = new Object($id); - $mergedObject->setContent($winner->getContent()); - - $this->bucket->put($mergedObject, $putInput); - - return $mergedObject; - } -} diff --git a/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/Version.php b/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/Version.php deleted file mode 100644 index d742fa0..0000000 --- a/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/Version.php +++ /dev/null @@ -1,25 +0,0 @@ -. - */ - -namespace Doctrine\Common\Cache; - -class Version -{ - const VERSION = '1.4.0-DEV'; -} diff --git a/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/WinCacheCache.php b/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/WinCacheCache.php deleted file mode 100644 index ae32772..0000000 --- a/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/WinCacheCache.php +++ /dev/null @@ -1,91 +0,0 @@ -. - */ - -namespace Doctrine\Common\Cache; - -/** - * WinCache cache provider. - * - * @link www.doctrine-project.org - * @since 2.2 - * @author Benjamin Eberlei - * @author Guilherme Blanco - * @author Jonathan Wage - * @author Roman Borschel - * @author David Abdemoulaie - */ -class WinCacheCache extends CacheProvider -{ - /** - * {@inheritdoc} - */ - protected function doFetch($id) - { - return wincache_ucache_get($id); - } - - /** - * {@inheritdoc} - */ - protected function doContains($id) - { - return wincache_ucache_exists($id); - } - - /** - * {@inheritdoc} - */ - protected function doSave($id, $data, $lifeTime = 0) - { - return (bool) wincache_ucache_set($id, $data, (int) $lifeTime); - } - - /** - * {@inheritdoc} - */ - protected function doDelete($id) - { - return wincache_ucache_delete($id); - } - - /** - * {@inheritdoc} - */ - protected function doFlush() - { - return wincache_ucache_clear(); - } - - /** - * {@inheritdoc} - */ - protected function doGetStats() - { - $info = wincache_ucache_info(); - $meminfo = wincache_ucache_meminfo(); - - return array( - Cache::STATS_HITS => $info['total_hit_count'], - Cache::STATS_MISSES => $info['total_miss_count'], - Cache::STATS_UPTIME => $info['total_cache_uptime'], - Cache::STATS_MEMORY_USAGE => $meminfo['memory_total'], - Cache::STATS_MEMORY_AVAILABLE => $meminfo['memory_free'], - ); - } -} diff --git a/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/XcacheCache.php b/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/XcacheCache.php deleted file mode 100644 index 833b02a..0000000 --- a/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/XcacheCache.php +++ /dev/null @@ -1,109 +0,0 @@ -. - */ - -namespace Doctrine\Common\Cache; - -/** - * Xcache cache driver. - * - * @link www.doctrine-project.org - * @since 2.0 - * @author Benjamin Eberlei - * @author Guilherme Blanco - * @author Jonathan Wage - * @author Roman Borschel - * @author David Abdemoulaie - */ -class XcacheCache extends CacheProvider -{ - /** - * {@inheritdoc} - */ - protected function doFetch($id) - { - return $this->doContains($id) ? unserialize(xcache_get($id)) : false; - } - - /** - * {@inheritdoc} - */ - protected function doContains($id) - { - return xcache_isset($id); - } - - /** - * {@inheritdoc} - */ - protected function doSave($id, $data, $lifeTime = 0) - { - return xcache_set($id, serialize($data), (int) $lifeTime); - } - - /** - * {@inheritdoc} - */ - protected function doDelete($id) - { - return xcache_unset($id); - } - - /** - * {@inheritdoc} - */ - protected function doFlush() - { - $this->checkAuthorization(); - - xcache_clear_cache(XC_TYPE_VAR, 0); - - return true; - } - - /** - * Checks that xcache.admin.enable_auth is Off. - * - * @return void - * - * @throws \BadMethodCallException When xcache.admin.enable_auth is On. - */ - protected function checkAuthorization() - { - if (ini_get('xcache.admin.enable_auth')) { - throw new \BadMethodCallException('To use all features of \Doctrine\Common\Cache\XcacheCache, you must set "xcache.admin.enable_auth" to "Off" in your php.ini.'); - } - } - - /** - * {@inheritdoc} - */ - protected function doGetStats() - { - $this->checkAuthorization(); - - $info = xcache_info(XC_TYPE_VAR, 0); - return array( - Cache::STATS_HITS => $info['hits'], - Cache::STATS_MISSES => $info['misses'], - Cache::STATS_UPTIME => null, - Cache::STATS_MEMORY_USAGE => $info['size'], - Cache::STATS_MEMORY_AVAILABLE => $info['avail'], - ); - } -} diff --git a/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ZendDataCache.php b/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ZendDataCache.php deleted file mode 100644 index 6e35ac8..0000000 --- a/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ZendDataCache.php +++ /dev/null @@ -1,83 +0,0 @@ -. - */ - -namespace Doctrine\Common\Cache; - -/** - * Zend Data Cache cache driver. - * - * @link www.doctrine-project.org - * @since 2.0 - * @author Ralph Schindler - * @author Guilherme Blanco - */ -class ZendDataCache extends CacheProvider -{ - /** - * {@inheritdoc} - */ - protected function doFetch($id) - { - return zend_shm_cache_fetch($id); - } - - /** - * {@inheritdoc} - */ - protected function doContains($id) - { - return (false !== zend_shm_cache_fetch($id)); - } - - /** - * {@inheritdoc} - */ - protected function doSave($id, $data, $lifeTime = 0) - { - return zend_shm_cache_store($id, $data, $lifeTime); - } - - /** - * {@inheritdoc} - */ - protected function doDelete($id) - { - return zend_shm_cache_delete($id); - } - - /** - * {@inheritdoc} - */ - protected function doFlush() - { - $namespace = $this->getNamespace(); - if (empty($namespace)) { - return zend_shm_cache_clear(); - } - return zend_shm_cache_clear($namespace); - } - - /** - * {@inheritdoc} - */ - protected function doGetStats() - { - return null; - } -} diff --git a/core/vendor/doctrine/cache/phpunit.xml.dist b/core/vendor/doctrine/cache/phpunit.xml.dist deleted file mode 100644 index 34d7f4c..0000000 --- a/core/vendor/doctrine/cache/phpunit.xml.dist +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - ./tests/Doctrine/ - - - - - - ./lib/Doctrine/ - - - diff --git a/core/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/ApcCacheTest.php b/core/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/ApcCacheTest.php deleted file mode 100644 index df81262..0000000 --- a/core/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/ApcCacheTest.php +++ /dev/null @@ -1,20 +0,0 @@ -markTestSkipped('The ' . __CLASS__ .' requires the use of APC'); - } - } - - protected function _getCacheDriver() - { - return new ApcCache(); - } -} \ No newline at end of file diff --git a/core/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/ArrayCacheTest.php b/core/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/ArrayCacheTest.php deleted file mode 100644 index a6c3097..0000000 --- a/core/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/ArrayCacheTest.php +++ /dev/null @@ -1,26 +0,0 @@ -_getCacheDriver(); - $stats = $cache->getStats(); - - $this->assertNull($stats); - } - - protected function isSharedStorage() - { - return false; - } -} \ No newline at end of file diff --git a/core/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/BaseFileCacheTest.php b/core/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/BaseFileCacheTest.php deleted file mode 100644 index eaedd99..0000000 --- a/core/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/BaseFileCacheTest.php +++ /dev/null @@ -1,40 +0,0 @@ -directory = sys_get_temp_dir() . '/doctrine_cache_'. uniqid(); - } while (file_exists($this->directory)); - } - - public function tearDown() - { - if ( ! is_dir($this->directory)) { - return; - } - - $iterator = new RecursiveDirectoryIterator($this->directory); - - foreach (new RecursiveIteratorIterator($iterator, RecursiveIteratorIterator::CHILD_FIRST) as $file) { - if ($file->isFile()) { - @unlink($file->getRealPath()); - } elseif ($file->isDir()) { - @rmdir($file->getRealPath()); - } - } - } - - protected function isSharedStorage() - { - return false; - } -} diff --git a/core/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/CacheTest.php b/core/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/CacheTest.php deleted file mode 100644 index 59ca4dc..0000000 --- a/core/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/CacheTest.php +++ /dev/null @@ -1,242 +0,0 @@ -_getCacheDriver(); - - // Test saving a value, checking if it exists, and fetching it back - $this->assertTrue($cache->save('key', 'value')); - $this->assertTrue($cache->contains('key')); - $this->assertEquals('value', $cache->fetch('key')); - - // Test updating the value of a cache entry - $this->assertTrue($cache->save('key', 'value-changed')); - $this->assertTrue($cache->contains('key')); - $this->assertEquals('value-changed', $cache->fetch('key')); - - // Test deleting a value - $this->assertTrue($cache->delete('key')); - $this->assertFalse($cache->contains('key')); - } - - public function provideCrudValues() - { - return array( - 'array' => array(array('one', 2, 3.0)), - 'string' => array('value'), - 'integer' => array(1), - 'float' => array(1.5), - 'object' => array(new ArrayObject()), - 'null' => array(null), - ); - } - - public function testDeleteAll() - { - $cache = $this->_getCacheDriver(); - - $this->assertTrue($cache->save('key1', 1)); - $this->assertTrue($cache->save('key2', 2)); - $this->assertTrue($cache->deleteAll()); - $this->assertFalse($cache->contains('key1')); - $this->assertFalse($cache->contains('key2')); - } - - public function testDeleteAllAndNamespaceVersioningBetweenCaches() - { - if ( ! $this->isSharedStorage()) { - $this->markTestSkipped('The ' . __CLASS__ .' does not use shared storage'); - } - - $cache1 = $this->_getCacheDriver(); - $cache2 = $this->_getCacheDriver(); - - $this->assertTrue($cache1->save('key1', 1)); - $this->assertTrue($cache2->save('key2', 2)); - - /* Both providers are initialized with the same namespace version, so - * they can see entries set by each other. - */ - $this->assertTrue($cache1->contains('key1')); - $this->assertTrue($cache1->contains('key2')); - $this->assertTrue($cache2->contains('key1')); - $this->assertTrue($cache2->contains('key2')); - - /* Deleting all entries through one provider will only increment the - * namespace version on that object (and in the cache itself, which new - * instances will use to initialize). The second provider will retain - * its original version and still see stale data. - */ - $this->assertTrue($cache1->deleteAll()); - $this->assertFalse($cache1->contains('key1')); - $this->assertFalse($cache1->contains('key2')); - $this->assertTrue($cache2->contains('key1')); - $this->assertTrue($cache2->contains('key2')); - - /* A new cache provider should not see the deleted entries, since its - * namespace version will be initialized. - */ - $cache3 = $this->_getCacheDriver(); - $this->assertFalse($cache3->contains('key1')); - $this->assertFalse($cache3->contains('key2')); - } - - public function testFlushAll() - { - $cache = $this->_getCacheDriver(); - - $this->assertTrue($cache->save('key1', 1)); - $this->assertTrue($cache->save('key2', 2)); - $this->assertTrue($cache->flushAll()); - $this->assertFalse($cache->contains('key1')); - $this->assertFalse($cache->contains('key2')); - } - - public function testFlushAllAndNamespaceVersioningBetweenCaches() - { - if ( ! $this->isSharedStorage()) { - $this->markTestSkipped('The ' . __CLASS__ .' does not use shared storage'); - } - - $cache1 = $this->_getCacheDriver(); - $cache2 = $this->_getCacheDriver(); - - /* Deleting all elements from the first provider should increment its - * namespace version before saving the first entry. - */ - $cache1->deleteAll(); - $this->assertTrue($cache1->save('key1', 1)); - - /* The second provider will be initialized with the same namespace - * version upon its first save operation. - */ - $this->assertTrue($cache2->save('key2', 2)); - - /* Both providers have the same namespace version and can see entires - * set by each other. - */ - $this->assertTrue($cache1->contains('key1')); - $this->assertTrue($cache1->contains('key2')); - $this->assertTrue($cache2->contains('key1')); - $this->assertTrue($cache2->contains('key2')); - - /* Flushing all entries through one cache will remove all entries from - * the cache but leave their namespace version as-is. - */ - $this->assertTrue($cache1->flushAll()); - $this->assertFalse($cache1->contains('key1')); - $this->assertFalse($cache1->contains('key2')); - $this->assertFalse($cache2->contains('key1')); - $this->assertFalse($cache2->contains('key2')); - - /* Inserting a new entry will use the same, incremented namespace - * version, and it will be visible to both providers. - */ - $this->assertTrue($cache1->save('key1', 1)); - $this->assertTrue($cache1->contains('key1')); - $this->assertTrue($cache2->contains('key1')); - - /* A new cache provider will be initialized with the original namespace - * version and not share any visibility with the first two providers. - */ - $cache3 = $this->_getCacheDriver(); - $this->assertFalse($cache3->contains('key1')); - $this->assertFalse($cache3->contains('key2')); - $this->assertTrue($cache3->save('key3', 3)); - $this->assertTrue($cache3->contains('key3')); - } - - public function testNamespace() - { - $cache = $this->_getCacheDriver(); - - $cache->setNamespace('ns1_'); - - $this->assertTrue($cache->save('key1', 1)); - $this->assertTrue($cache->contains('key1')); - - $cache->setNamespace('ns2_'); - - $this->assertFalse($cache->contains('key1')); - } - - public function testDeleteAllNamespace() - { - $cache = $this->_getCacheDriver(); - - $cache->setNamespace('ns1'); - $this->assertFalse($cache->contains('key1')); - $cache->save('key1', 'test'); - $this->assertTrue($cache->contains('key1')); - - $cache->setNamespace('ns2'); - $this->assertFalse($cache->contains('key1')); - $cache->save('key1', 'test'); - $this->assertTrue($cache->contains('key1')); - - $cache->setNamespace('ns1'); - $this->assertTrue($cache->contains('key1')); - $cache->deleteAll(); - $this->assertFalse($cache->contains('key1')); - - $cache->setNamespace('ns2'); - $this->assertTrue($cache->contains('key1')); - $cache->deleteAll(); - $this->assertFalse($cache->contains('key1')); - } - - /** - * @group DCOM-43 - */ - public function testGetStats() - { - $cache = $this->_getCacheDriver(); - $stats = $cache->getStats(); - - $this->assertArrayHasKey(Cache::STATS_HITS, $stats); - $this->assertArrayHasKey(Cache::STATS_MISSES, $stats); - $this->assertArrayHasKey(Cache::STATS_UPTIME, $stats); - $this->assertArrayHasKey(Cache::STATS_MEMORY_USAGE, $stats); - $this->assertArrayHasKey(Cache::STATS_MEMORY_AVAILABLE, $stats); - } - - public function testFetchMissShouldReturnFalse() - { - $cache = $this->_getCacheDriver(); - - /* Ensure that caches return boolean false instead of null on a fetch - * miss to be compatible with ORM integration. - */ - $result = $cache->fetch('nonexistent_key'); - - $this->assertFalse($result); - $this->assertNotNull($result); - } - - /** - * Return whether multiple cache providers share the same storage. - * - * This is used for skipping certain tests for shared storage behavior. - * - * @return boolean - */ - protected function isSharedStorage() - { - return true; - } - - /** - * @return \Doctrine\Common\Cache\CacheProvider - */ - abstract protected function _getCacheDriver(); -} diff --git a/core/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/CouchbaseCacheTest.php b/core/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/CouchbaseCacheTest.php deleted file mode 100644 index 40d5a69..0000000 --- a/core/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/CouchbaseCacheTest.php +++ /dev/null @@ -1,47 +0,0 @@ -couchbase = new Couchbase('127.0.0.1', 'Administrator', 'password', 'default'); - } catch(Exception $ex) { - $this->markTestSkipped('Could not instantiate the Couchbase cache because of: ' . $ex); - } - } else { - $this->markTestSkipped('The ' . __CLASS__ .' requires the use of the couchbase extension'); - } - } - - public function testNoExpire() - { - $cache = $this->_getCacheDriver(); - $cache->save('noexpire', 'value', 0); - sleep(1); - $this->assertTrue($cache->contains('noexpire'), 'Couchbase provider should support no-expire'); - } - - public function testLongLifetime() - { - $cache = $this->_getCacheDriver(); - $cache->save('key', 'value', 30 * 24 * 3600 + 1); - - $this->assertTrue($cache->contains('key'), 'Couchbase provider should support TTL > 30 days'); - } - - protected function _getCacheDriver() - { - $driver = new CouchbaseCache(); - $driver->setCouchbase($this->couchbase); - return $driver; - } -} \ No newline at end of file diff --git a/core/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/FileCacheTest.php b/core/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/FileCacheTest.php deleted file mode 100644 index 6f9df81..0000000 --- a/core/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/FileCacheTest.php +++ /dev/null @@ -1,107 +0,0 @@ -driver = $this->getMock( - 'Doctrine\Common\Cache\FileCache', - array('doFetch', 'doContains', 'doSave'), - array(), '', false - ); - } - - public function getProviderFileName() - { - return array( - //The characters :\/<>"*?| are not valid in Windows filenames. - array('key:1', 'key1'), - array('key\2', 'key2'), - array('key/3', 'key3'), - array('key<4', 'key4'), - array('key>5', 'key5'), - array('key"6', 'key6'), - array('key*7', 'key7'), - array('key?8', 'key8'), - array('key|9', 'key9'), - array('key[0]','key[0]'), - ); - } - - /** - * @dataProvider getProviderFileName - */ - public function testInvalidFilename($key, $expected) - { - $cache = $this->driver; - $method = new \ReflectionMethod($cache, 'getFilename'); - - $method->setAccessible(true); - - $value = $method->invoke($cache, $key); - $actual = pathinfo($value, PATHINFO_FILENAME); - - $this->assertEquals($expected, $actual); - } - - public function testFilenameCollision() - { - $data['key:0'] = 'key0'; - $data['key\0'] = 'key0'; - $data['key/0'] = 'key0'; - $data['key<0'] = 'key0'; - $data['key>0'] = 'key0'; - $data['key"0'] = 'key0'; - $data['key*0'] = 'key0'; - $data['key?0'] = 'key0'; - $data['key|0'] = 'key0'; - - $paths = array(); - $cache = $this->driver; - $method = new \ReflectionMethod($cache, 'getFilename'); - - $method->setAccessible(true); - - foreach ($data as $key => $expected) { - $path = $method->invoke($cache, $key); - $actual = pathinfo($path, PATHINFO_FILENAME); - - $this->assertNotContains($path, $paths); - $this->assertEquals($expected, $actual); - - $paths[] = $path; - } - } - - public function testFilenameShouldCreateThePathWithFourSubDirectories() - { - $cache = $this->driver; - $method = new \ReflectionMethod($cache, 'getFilename'); - $key = 'item-key'; - $expectedDir[] = '84e0e2e893febb73'; - $expectedDir[] = '7a0fee0c89d53f4b'; - $expectedDir[] = 'b7fcb44c57cdf3d3'; - $expectedDir[] = '2ce7363f5d597760'; - $expectedDir = implode(DIRECTORY_SEPARATOR, $expectedDir); - - $method->setAccessible(true); - - $path = $method->invoke($cache, $key); - $filename = pathinfo($path, PATHINFO_FILENAME); - $dirname = pathinfo($path, PATHINFO_DIRNAME); - - $this->assertEquals('item-key', $filename); - $this->assertEquals(DIRECTORY_SEPARATOR . $expectedDir, $dirname); - $this->assertEquals(DIRECTORY_SEPARATOR . $expectedDir . DIRECTORY_SEPARATOR . $key, $path); - } -} \ No newline at end of file diff --git a/core/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/FilesystemCacheTest.php b/core/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/FilesystemCacheTest.php deleted file mode 100644 index e3b74cd..0000000 --- a/core/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/FilesystemCacheTest.php +++ /dev/null @@ -1,75 +0,0 @@ -_getCacheDriver(); - - // Test save - $cache->save('test_key', 'testing this out', 10); - - // Test contains to test that save() worked - $this->assertTrue($cache->contains('test_key')); - - // Test fetch - $this->assertEquals('testing this out', $cache->fetch('test_key')); - - // access private methods - $getFilename = new \ReflectionMethod($cache, 'getFilename'); - $getNamespacedId = new \ReflectionMethod($cache, 'getNamespacedId'); - - $getFilename->setAccessible(true); - $getNamespacedId->setAccessible(true); - - $id = $getNamespacedId->invoke($cache, 'test_key'); - $filename = $getFilename->invoke($cache, $id); - - $data = ''; - $lifetime = 0; - $resource = fopen($filename, "r"); - - if (false !== ($line = fgets($resource))) { - $lifetime = (integer) $line; - } - - while (false !== ($line = fgets($resource))) { - $data .= $line; - } - - $this->assertNotEquals(0, $lifetime, "previous lifetime could not be loaded"); - - // update lifetime - $lifetime = $lifetime - 20; - file_put_contents($filename, $lifetime . PHP_EOL . $data); - - // test expired data - $this->assertFalse($cache->contains('test_key')); - $this->assertFalse($cache->fetch('test_key')); - } - - public function testGetStats() - { - $cache = $this->_getCacheDriver(); - $stats = $cache->getStats(); - - $this->assertNull($stats[Cache::STATS_HITS]); - $this->assertNull($stats[Cache::STATS_MISSES]); - $this->assertNull($stats[Cache::STATS_UPTIME]); - $this->assertEquals(0, $stats[Cache::STATS_MEMORY_USAGE]); - $this->assertGreaterThan(0, $stats[Cache::STATS_MEMORY_AVAILABLE]); - } - - protected function _getCacheDriver() - { - return new FilesystemCache($this->directory); - } -} diff --git a/core/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/MemcacheCacheTest.php b/core/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/MemcacheCacheTest.php deleted file mode 100644 index b0da1b9..0000000 --- a/core/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/MemcacheCacheTest.php +++ /dev/null @@ -1,54 +0,0 @@ -markTestSkipped('The ' . __CLASS__ .' requires the use of memcache'); - } - - $this->memcache = new Memcache(); - - if (@$this->memcache->connect('localhost', 11211) === false) { - unset($this->memcache); - $this->markTestSkipped('The ' . __CLASS__ .' cannot connect to memcache'); - } - } - - public function tearDown() - { - if ($this->memcache instanceof Memcache) { - $this->memcache->flush(); - } - } - - public function testNoExpire() - { - $cache = $this->_getCacheDriver(); - $cache->save('noexpire', 'value', 0); - sleep(1); - $this->assertTrue($cache->contains('noexpire'), 'Memcache provider should support no-expire'); - } - - public function testLongLifetime() - { - $cache = $this->_getCacheDriver(); - $cache->save('key', 'value', 30 * 24 * 3600 + 1); - $this->assertTrue($cache->contains('key'), 'Memcache provider should support TTL > 30 days'); - } - - protected function _getCacheDriver() - { - $driver = new MemcacheCache(); - $driver->setMemcache($this->memcache); - return $driver; - } -} diff --git a/core/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/MemcachedCacheTest.php b/core/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/MemcachedCacheTest.php deleted file mode 100644 index 071329f..0000000 --- a/core/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/MemcachedCacheTest.php +++ /dev/null @@ -1,56 +0,0 @@ -markTestSkipped('The ' . __CLASS__ .' requires the use of memcached'); - } - - $this->memcached = new Memcached(); - $this->memcached->setOption(Memcached::OPT_COMPRESSION, false); - $this->memcached->addServer('127.0.0.1', 11211); - - if (@fsockopen('127.0.0.1', 11211) === false) { - unset($this->memcached); - $this->markTestSkipped('The ' . __CLASS__ .' cannot connect to memcache'); - } - } - - public function tearDown() - { - if ($this->memcached instanceof Memcached) { - $this->memcached->flush(); - } - } - - public function testNoExpire() - { - $cache = $this->_getCacheDriver(); - $cache->save('noexpire', 'value', 0); - sleep(1); - $this->assertTrue($cache->contains('noexpire'), 'Memcache provider should support no-expire'); - } - - public function testLongLifetime() - { - $cache = $this->_getCacheDriver(); - $cache->save('key', 'value', 30 * 24 * 3600 + 1); - $this->assertTrue($cache->contains('key'), 'Memcache provider should support TTL > 30 days'); - } - - protected function _getCacheDriver() - { - $driver = new MemcachedCache(); - $driver->setMemcached($this->memcached); - return $driver; - } -} diff --git a/core/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/MongoDBCacheTest.php b/core/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/MongoDBCacheTest.php deleted file mode 100644 index 8c2f6e0..0000000 --- a/core/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/MongoDBCacheTest.php +++ /dev/null @@ -1,61 +0,0 @@ -=')) { - $this->markTestSkipped('The ' . __CLASS__ .' requires the use of mongo >= 1.3.0'); - } - - $mongo = new MongoClient(); - $this->collection = $mongo->selectCollection('doctrine_common_cache', 'test'); - } - - public function tearDown() - { - if ($this->collection instanceof MongoCollection) { - $this->collection->drop(); - } - } - - public function testSaveWithNonUtf8String() - { - // Invalid 2-octet sequence - $data = "\xc3\x28"; - - $cache = $this->_getCacheDriver(); - - $this->assertTrue($cache->save('key', $data)); - $this->assertEquals($data, $cache->fetch('key')); - } - - public function testGetStats() - { - $cache = $this->_getCacheDriver(); - $stats = $cache->getStats(); - - $this->assertNull($stats[Cache::STATS_HITS]); - $this->assertNull($stats[Cache::STATS_MISSES]); - $this->assertGreaterThan(0, $stats[Cache::STATS_UPTIME]); - $this->assertEquals(0, $stats[Cache::STATS_MEMORY_USAGE]); - $this->assertNull($stats[Cache::STATS_MEMORY_AVAILABLE]); - } - - protected function _getCacheDriver() - { - return new MongoDBCache($this->collection); - } -} diff --git a/core/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/PhpFileCacheTest.php b/core/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/PhpFileCacheTest.php deleted file mode 100644 index f49ce25..0000000 --- a/core/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/PhpFileCacheTest.php +++ /dev/null @@ -1,118 +0,0 @@ -_getCacheDriver(); - - // Test save - $cache->save('test_key', 'testing this out', 10); - - // Test contains to test that save() worked - $this->assertTrue($cache->contains('test_key')); - - // Test fetch - $this->assertEquals('testing this out', $cache->fetch('test_key')); - - // access private methods - $getFilename = new \ReflectionMethod($cache, 'getFilename'); - $getNamespacedId = new \ReflectionMethod($cache, 'getNamespacedId'); - - $getFilename->setAccessible(true); - $getNamespacedId->setAccessible(true); - - $id = $getNamespacedId->invoke($cache, 'test_key'); - $path = $getFilename->invoke($cache, $id); - $value = include $path; - - // update lifetime - $value['lifetime'] = $value['lifetime'] - 20; - file_put_contents($path, 'assertFalse($cache->contains('test_key')); - $this->assertFalse($cache->fetch('test_key')); - } - - public function testImplementsSetState() - { - $cache = $this->_getCacheDriver(); - - // Test save - $cache->save('test_set_state', new SetStateClass(array(1,2,3))); - - //Test __set_state call - $this->assertCount(0, SetStateClass::$values); - - // Test fetch - $value = $cache->fetch('test_set_state'); - $this->assertInstanceOf('Doctrine\Tests\Common\Cache\SetStateClass', $value); - $this->assertEquals(array(1,2,3), $value->getValue()); - - //Test __set_state call - $this->assertCount(1, SetStateClass::$values); - - // Test contains - $this->assertTrue($cache->contains('test_set_state')); - } - - public function testNotImplementsSetState() - { - $cache = $this->_getCacheDriver(); - - $this->setExpectedException('InvalidArgumentException'); - $cache->save('test_not_set_state', new NotSetStateClass(array(1,2,3))); - } - - public function testGetStats() - { - $cache = $this->_getCacheDriver(); - $stats = $cache->getStats(); - - $this->assertNull($stats[Cache::STATS_HITS]); - $this->assertNull($stats[Cache::STATS_MISSES]); - $this->assertNull($stats[Cache::STATS_UPTIME]); - $this->assertEquals(0, $stats[Cache::STATS_MEMORY_USAGE]); - $this->assertGreaterThan(0, $stats[Cache::STATS_MEMORY_AVAILABLE]); - } - - protected function _getCacheDriver() - { - return new PhpFileCache($this->directory); - } -} - -class NotSetStateClass -{ - private $value; - - public function __construct($value) - { - $this->value = $value; - } - - public function getValue() - { - return $this->value; - } -} - -class SetStateClass extends NotSetStateClass -{ - public static $values = array(); - - public static function __set_state($data) - { - self::$values = $data; - return new self($data['value']); - } -} diff --git a/core/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/RedisCacheTest.php b/core/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/RedisCacheTest.php deleted file mode 100644 index 45bbc75..0000000 --- a/core/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/RedisCacheTest.php +++ /dev/null @@ -1,30 +0,0 @@ -_redis = new \Redis(); - $ok = @$this->_redis->connect('127.0.0.1'); - if (!$ok) { - $this->markTestSkipped('The ' . __CLASS__ .' requires the use of redis'); - } - } else { - $this->markTestSkipped('The ' . __CLASS__ .' requires the use of redis'); - } - } - - protected function _getCacheDriver() - { - $driver = new RedisCache(); - $driver->setRedis($this->_redis); - return $driver; - } -} diff --git a/core/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/RiakCacheTest.php b/core/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/RiakCacheTest.php deleted file mode 100644 index dce8cc0..0000000 --- a/core/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/RiakCacheTest.php +++ /dev/null @@ -1,64 +0,0 @@ -markTestSkipped('The ' . __CLASS__ .' requires the use of Riak'); - } - - try { - $this->connection = new Connection('127.0.0.1', 8087); - $this->bucket = new Bucket($this->connection, 'test'); - } catch (Exception\RiakException $e) { - $this->markTestSkipped('The ' . __CLASS__ .' requires the use of Riak'); - } - } - - /** - * {@inheritdoc} - */ - public function testGetStats() - { - $cache = $this->_getCacheDriver(); - $stats = $cache->getStats(); - - $this->assertNull($stats); - } - - /** - * Retrieve RiakCache instance. - * - * @return \Doctrine\Common\Cache\RiakCache - */ - protected function _getCacheDriver() - { - return new RiakCache($this->bucket); - } -} diff --git a/core/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/WinCacheCacheTest.php b/core/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/WinCacheCacheTest.php deleted file mode 100644 index cb363df..0000000 --- a/core/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/WinCacheCacheTest.php +++ /dev/null @@ -1,20 +0,0 @@ -markTestSkipped('The ' . __CLASS__ .' requires the use of Wincache'); - } - } - - protected function _getCacheDriver() - { - return new WincacheCache(); - } -} \ No newline at end of file diff --git a/core/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/XcacheCacheTest.php b/core/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/XcacheCacheTest.php deleted file mode 100644 index 6259848..0000000 --- a/core/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/XcacheCacheTest.php +++ /dev/null @@ -1,20 +0,0 @@ -markTestSkipped('The ' . __CLASS__ .' requires the use of xcache'); - } - } - - protected function _getCacheDriver() - { - return new XcacheCache(); - } -} \ No newline at end of file diff --git a/core/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/ZendDataCacheTest.php b/core/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/ZendDataCacheTest.php deleted file mode 100644 index cd66e15..0000000 --- a/core/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/ZendDataCacheTest.php +++ /dev/null @@ -1,28 +0,0 @@ -markTestSkipped('The ' . __CLASS__ .' requires the use of Zend Data Cache which only works in apache2handler SAPI'); - } - } - - public function testGetStats() - { - $cache = $this->_getCacheDriver(); - $stats = $cache->getStats(); - - $this->assertNull($stats); - } - - protected function _getCacheDriver() - { - return new ZendDataCache(); - } -} \ No newline at end of file diff --git a/core/vendor/doctrine/cache/tests/Doctrine/Tests/DoctrineTestCase.php b/core/vendor/doctrine/cache/tests/Doctrine/Tests/DoctrineTestCase.php deleted file mode 100644 index e8323d2..0000000 --- a/core/vendor/doctrine/cache/tests/Doctrine/Tests/DoctrineTestCase.php +++ /dev/null @@ -1,10 +0,0 @@ -add('Doctrine\\Tests\\', __DIR__ . '/../../'); -unset($classLoader); diff --git a/core/vendor/doctrine/cache/tests/travis/php.ini b/core/vendor/doctrine/cache/tests/travis/php.ini deleted file mode 100644 index ef5d9a1..0000000 --- a/core/vendor/doctrine/cache/tests/travis/php.ini +++ /dev/null @@ -1,6 +0,0 @@ -extension="mongo.so" -extension="memcache.so" -extension="memcached.so" - -apc.enabled=1 -apc.enable_cli=1 diff --git a/core/vendor/doctrine/cache/tests/travis/phpunit.travis.xml b/core/vendor/doctrine/cache/tests/travis/phpunit.travis.xml deleted file mode 100644 index a01faa5..0000000 --- a/core/vendor/doctrine/cache/tests/travis/phpunit.travis.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - ../Doctrine/ - - - - - - ../../lib/Doctrine/ - - - - - - performance - - - diff --git a/core/vendor/doctrine/collections/.gitignore b/core/vendor/doctrine/collections/.gitignore deleted file mode 100644 index 48b8bf9..0000000 --- a/core/vendor/doctrine/collections/.gitignore +++ /dev/null @@ -1 +0,0 @@ -vendor/ diff --git a/core/vendor/doctrine/collections/.travis.yml b/core/vendor/doctrine/collections/.travis.yml deleted file mode 100644 index 470c987..0000000 --- a/core/vendor/doctrine/collections/.travis.yml +++ /dev/null @@ -1,10 +0,0 @@ -language: php - -php: - - 5.3 - - 5.4 - - 5.5 - - hhvm - -before_script: - - composer --prefer-source --dev install diff --git a/core/vendor/doctrine/collections/LICENSE b/core/vendor/doctrine/collections/LICENSE deleted file mode 100644 index 5e781fc..0000000 --- a/core/vendor/doctrine/collections/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2006-2013 Doctrine Project - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/core/vendor/doctrine/collections/README.md b/core/vendor/doctrine/collections/README.md deleted file mode 100644 index 627d45b..0000000 --- a/core/vendor/doctrine/collections/README.md +++ /dev/null @@ -1,17 +0,0 @@ -# Doctrine Collections - -Collections Abstraction library - -## Changelog - -### v1.2 - -* Add a new ``AbstractLazyCollection`` - -### v1.1 - -* Deprecated ``Comparison::IS``, because it's only there for SQL semantics. - These are fixed in the ORM instead. -* Add ``Comparison::CONTAINS`` to perform partial string matches: - - $criteria->andWhere($criteria->expr()->contains('property', 'Foo')); diff --git a/core/vendor/doctrine/collections/composer.json b/core/vendor/doctrine/collections/composer.json deleted file mode 100644 index dd30961..0000000 --- a/core/vendor/doctrine/collections/composer.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "name": "doctrine/collections", - "type": "library", - "description": "Collections Abstraction library", - "keywords": ["collections", "array", "iterator"], - "homepage": "http://www.doctrine-project.org", - "license": "MIT", - "authors": [ - {"name": "Guilherme Blanco", "email": "guilhermeblanco@gmail.com"}, - {"name": "Roman Borschel", "email": "roman@code-factory.org"}, - {"name": "Benjamin Eberlei", "email": "kontakt@beberlei.de"}, - {"name": "Jonathan Wage", "email": "jonwage@gmail.com"}, - {"name": "Johannes Schmitt", "email": "schmittjoh@gmail.com"} - ], - "require": { - "php": ">=5.3.2" - }, - "autoload": { - "psr-0": { "Doctrine\\Common\\Collections\\": "lib/" } - }, - "extra": { - "branch-alias": { - "dev-master": "1.2.x-dev" - } - } -} diff --git a/core/vendor/doctrine/collections/lib/Doctrine/Common/Collections/AbstractLazyCollection.php b/core/vendor/doctrine/collections/lib/Doctrine/Common/Collections/AbstractLazyCollection.php deleted file mode 100644 index 0052a29..0000000 --- a/core/vendor/doctrine/collections/lib/Doctrine/Common/Collections/AbstractLazyCollection.php +++ /dev/null @@ -1,343 +0,0 @@ -. - */ - -namespace Doctrine\Common\Collections; - -use Closure; - -/** - * Lazy collection that is backed by a concrete collection - * - * @author Michaël Gallego - * @since 1.2 - */ -abstract class AbstractLazyCollection implements Collection -{ - /** - * The backed collection to use - * - * @var Collection - */ - protected $collection; - - /** - * @var bool - */ - private $initialized = false; - - /** - * {@inheritDoc} - */ - public function count() - { - $this->initialize(); - return $this->collection->count(); - } - - /** - * {@inheritDoc} - */ - public function add($element) - { - $this->initialize(); - return $this->collection->add($element); - } - - /** - * {@inheritDoc} - */ - public function clear() - { - $this->initialize(); - $this->collection->clear(); - } - - /** - * {@inheritDoc} - */ - public function contains($element) - { - $this->initialize(); - return $this->collection->contains($element); - } - - /** - * {@inheritDoc} - */ - public function isEmpty() - { - $this->initialize(); - return $this->collection->isEmpty(); - } - - /** - * {@inheritDoc} - */ - public function remove($key) - { - $this->initialize(); - return $this->collection->remove($key); - } - - /** - * {@inheritDoc} - */ - public function removeElement($element) - { - $this->initialize(); - return $this->collection->removeElement($element); - } - - /** - * {@inheritDoc} - */ - public function containsKey($key) - { - $this->initialize(); - return $this->collection->containsKey($key); - } - - /** - * {@inheritDoc} - */ - public function get($key) - { - $this->initialize(); - return $this->collection->get($key); - } - - /** - * {@inheritDoc} - */ - public function getKeys() - { - $this->initialize(); - return $this->collection->getKeys(); - } - - /** - * {@inheritDoc} - */ - public function getValues() - { - $this->initialize(); - return $this->collection->getValues(); - } - - /** - * {@inheritDoc} - */ - public function set($key, $value) - { - $this->initialize(); - $this->collection->set($key, $value); - } - - /** - * {@inheritDoc} - */ - public function toArray() - { - $this->initialize(); - return $this->collection->toArray(); - } - - /** - * {@inheritDoc} - */ - public function first() - { - $this->initialize(); - return $this->collection->first(); - } - - /** - * {@inheritDoc} - */ - public function last() - { - $this->initialize(); - return $this->collection->last(); - } - - /** - * {@inheritDoc} - */ - public function key() - { - $this->initialize(); - return $this->collection->key(); - } - - /** - * {@inheritDoc} - */ - public function current() - { - $this->initialize(); - return $this->collection->current(); - } - - /** - * {@inheritDoc} - */ - public function next() - { - $this->initialize(); - return $this->collection->next(); - } - - /** - * {@inheritDoc} - */ - public function exists(Closure $p) - { - $this->initialize(); - return $this->collection->exists($p); - } - - /** - * {@inheritDoc} - */ - public function filter(Closure $p) - { - $this->initialize(); - return $this->collection->filter($p); - } - - /** - * {@inheritDoc} - */ - public function forAll(Closure $p) - { - $this->initialize(); - return $this->collection->forAll($p); - } - - /** - * {@inheritDoc} - */ - public function map(Closure $func) - { - $this->initialize(); - return $this->collection->map($func); - } - - /** - * {@inheritDoc} - */ - public function partition(Closure $p) - { - $this->initialize(); - return $this->collection->partition($p); - } - - /** - * {@inheritDoc} - */ - public function indexOf($element) - { - $this->initialize(); - return $this->collection->indexOf($element); - } - - /** - * {@inheritDoc} - */ - public function slice($offset, $length = null) - { - $this->initialize(); - return $this->collection->slice($offset, $length); - } - - /** - * {@inheritDoc} - */ - public function getIterator() - { - $this->initialize(); - return $this->collection->getIterator(); - } - - /** - * {@inheritDoc} - */ - public function offsetExists($offset) - { - $this->initialize(); - return $this->collection->offsetExists($offset); - } - - /** - * {@inheritDoc} - */ - public function offsetGet($offset) - { - $this->initialize(); - return $this->collection->offsetGet($offset); - } - - /** - * {@inheritDoc} - */ - public function offsetSet($offset, $value) - { - $this->initialize(); - $this->collection->offsetSet($offset, $value); - } - - /** - * {@inheritDoc} - */ - public function offsetUnset($offset) - { - $this->initialize(); - $this->collection->offsetUnset($offset); - } - - /** - * Is the lazy collection already initialized? - * - * @return bool - */ - public function isInitialized() - { - return $this->initialized; - } - - /** - * Initialize the collection - * - * @return void - */ - protected function initialize() - { - if (!$this->initialized) { - $this->doInitialize(); - $this->initialized = true; - } - } - - /** - * Do the initialization logic - * - * @return void - */ - abstract protected function doInitialize(); -} diff --git a/core/vendor/doctrine/collections/lib/Doctrine/Common/Collections/ArrayCollection.php b/core/vendor/doctrine/collections/lib/Doctrine/Common/Collections/ArrayCollection.php deleted file mode 100644 index 9c2c8e1..0000000 --- a/core/vendor/doctrine/collections/lib/Doctrine/Common/Collections/ArrayCollection.php +++ /dev/null @@ -1,385 +0,0 @@ -. - */ - -namespace Doctrine\Common\Collections; - -use Closure, ArrayIterator; -use Doctrine\Common\Collections\Expr\ClosureExpressionVisitor; - -/** - * An ArrayCollection is a Collection implementation that wraps a regular PHP array. - * - * @since 2.0 - * @author Guilherme Blanco - * @author Jonathan Wage - * @author Roman Borschel - */ -class ArrayCollection implements Collection, Selectable -{ - /** - * An array containing the entries of this collection. - * - * @var array - */ - private $_elements; - - /** - * Initializes a new ArrayCollection. - * - * @param array $elements - */ - public function __construct(array $elements = array()) - { - $this->_elements = $elements; - } - - /** - * {@inheritDoc} - */ - public function toArray() - { - return $this->_elements; - } - - /** - * {@inheritDoc} - */ - public function first() - { - return reset($this->_elements); - } - - /** - * {@inheritDoc} - */ - public function last() - { - return end($this->_elements); - } - - /** - * {@inheritDoc} - */ - public function key() - { - return key($this->_elements); - } - - /** - * {@inheritDoc} - */ - public function next() - { - return next($this->_elements); - } - - /** - * {@inheritDoc} - */ - public function current() - { - return current($this->_elements); - } - - /** - * {@inheritDoc} - */ - public function remove($key) - { - if (isset($this->_elements[$key]) || array_key_exists($key, $this->_elements)) { - $removed = $this->_elements[$key]; - unset($this->_elements[$key]); - - return $removed; - } - - return null; - } - - /** - * {@inheritDoc} - */ - public function removeElement($element) - { - $key = array_search($element, $this->_elements, true); - - if ($key !== false) { - unset($this->_elements[$key]); - - return true; - } - - return false; - } - - /** - * Required by interface ArrayAccess. - * - * {@inheritDoc} - */ - public function offsetExists($offset) - { - return $this->containsKey($offset); - } - - /** - * Required by interface ArrayAccess. - * - * {@inheritDoc} - */ - public function offsetGet($offset) - { - return $this->get($offset); - } - - /** - * Required by interface ArrayAccess. - * - * {@inheritDoc} - */ - public function offsetSet($offset, $value) - { - if ( ! isset($offset)) { - return $this->add($value); - } - return $this->set($offset, $value); - } - - /** - * Required by interface ArrayAccess. - * - * {@inheritDoc} - */ - public function offsetUnset($offset) - { - return $this->remove($offset); - } - - /** - * {@inheritDoc} - */ - public function containsKey($key) - { - return isset($this->_elements[$key]) || array_key_exists($key, $this->_elements); - } - - /** - * {@inheritDoc} - */ - public function contains($element) - { - return in_array($element, $this->_elements, true); - } - - /** - * {@inheritDoc} - */ - public function exists(Closure $p) - { - foreach ($this->_elements as $key => $element) { - if ($p($key, $element)) { - return true; - } - } - return false; - } - - /** - * {@inheritDoc} - */ - public function indexOf($element) - { - return array_search($element, $this->_elements, true); - } - - /** - * {@inheritDoc} - */ - public function get($key) - { - if (isset($this->_elements[$key])) { - return $this->_elements[$key]; - } - return null; - } - - /** - * {@inheritDoc} - */ - public function getKeys() - { - return array_keys($this->_elements); - } - - /** - * {@inheritDoc} - */ - public function getValues() - { - return array_values($this->_elements); - } - - /** - * {@inheritDoc} - */ - public function count() - { - return count($this->_elements); - } - - /** - * {@inheritDoc} - */ - public function set($key, $value) - { - $this->_elements[$key] = $value; - } - - /** - * {@inheritDoc} - */ - public function add($value) - { - $this->_elements[] = $value; - return true; - } - - /** - * {@inheritDoc} - */ - public function isEmpty() - { - return ! $this->_elements; - } - - /** - * Required by interface IteratorAggregate. - * - * {@inheritDoc} - */ - public function getIterator() - { - return new ArrayIterator($this->_elements); - } - - /** - * {@inheritDoc} - */ - public function map(Closure $func) - { - return new static(array_map($func, $this->_elements)); - } - - /** - * {@inheritDoc} - */ - public function filter(Closure $p) - { - return new static(array_filter($this->_elements, $p)); - } - - /** - * {@inheritDoc} - */ - public function forAll(Closure $p) - { - foreach ($this->_elements as $key => $element) { - if ( ! $p($key, $element)) { - return false; - } - } - - return true; - } - - /** - * {@inheritDoc} - */ - public function partition(Closure $p) - { - $coll1 = $coll2 = array(); - foreach ($this->_elements as $key => $element) { - if ($p($key, $element)) { - $coll1[$key] = $element; - } else { - $coll2[$key] = $element; - } - } - return array(new static($coll1), new static($coll2)); - } - - /** - * Returns a string representation of this object. - * - * @return string - */ - public function __toString() - { - return __CLASS__ . '@' . spl_object_hash($this); - } - - /** - * {@inheritDoc} - */ - public function clear() - { - $this->_elements = array(); - } - - /** - * {@inheritDoc} - */ - public function slice($offset, $length = null) - { - return array_slice($this->_elements, $offset, $length, true); - } - - /** - * {@inheritDoc} - */ - public function matching(Criteria $criteria) - { - $expr = $criteria->getWhereExpression(); - $filtered = $this->_elements; - - if ($expr) { - $visitor = new ClosureExpressionVisitor(); - $filter = $visitor->dispatch($expr); - $filtered = array_filter($filtered, $filter); - } - - if ($orderings = $criteria->getOrderings()) { - $next = null; - foreach (array_reverse($orderings) as $field => $ordering) { - $next = ClosureExpressionVisitor::sortByField($field, $ordering == 'DESC' ? -1 : 1, $next); - } - - usort($filtered, $next); - } - - $offset = $criteria->getFirstResult(); - $length = $criteria->getMaxResults(); - - if ($offset || $length) { - $filtered = array_slice($filtered, (int)$offset, $length); - } - - return new static($filtered); - } -} diff --git a/core/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Collection.php b/core/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Collection.php deleted file mode 100644 index a0808b3..0000000 --- a/core/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Collection.php +++ /dev/null @@ -1,260 +0,0 @@ -. - */ - -namespace Doctrine\Common\Collections; - -use Closure, Countable, IteratorAggregate, ArrayAccess; - -/** - * The missing (SPL) Collection/Array/OrderedMap interface. - * - * A Collection resembles the nature of a regular PHP array. That is, - * it is essentially an ordered map that can also be used - * like a list. - * - * A Collection has an internal iterator just like a PHP array. In addition, - * a Collection can be iterated with external iterators, which is preferrable. - * To use an external iterator simply use the foreach language construct to - * iterate over the collection (which calls {@link getIterator()} internally) or - * explicitly retrieve an iterator though {@link getIterator()} which can then be - * used to iterate over the collection. - * You can not rely on the internal iterator of the collection being at a certain - * position unless you explicitly positioned it before. Prefer iteration with - * external iterators. - * - * @since 2.0 - * @author Guilherme Blanco - * @author Jonathan Wage - * @author Roman Borschel - */ -interface Collection extends Countable, IteratorAggregate, ArrayAccess -{ - /** - * Adds an element at the end of the collection. - * - * @param mixed $element The element to add. - * - * @return boolean Always TRUE. - */ - function add($element); - - /** - * Clears the collection, removing all elements. - * - * @return void - */ - function clear(); - - /** - * Checks whether an element is contained in the collection. - * This is an O(n) operation, where n is the size of the collection. - * - * @param mixed $element The element to search for. - * - * @return boolean TRUE if the collection contains the element, FALSE otherwise. - */ - function contains($element); - - /** - * Checks whether the collection is empty (contains no elements). - * - * @return boolean TRUE if the collection is empty, FALSE otherwise. - */ - function isEmpty(); - - /** - * Removes the element at the specified index from the collection. - * - * @param string|integer $key The kex/index of the element to remove. - * - * @return mixed The removed element or NULL, if the collection did not contain the element. - */ - function remove($key); - - /** - * Removes the specified element from the collection, if it is found. - * - * @param mixed $element The element to remove. - * - * @return boolean TRUE if this collection contained the specified element, FALSE otherwise. - */ - function removeElement($element); - - /** - * Checks whether the collection contains an element with the specified key/index. - * - * @param string|integer $key The key/index to check for. - * - * @return boolean TRUE if the collection contains an element with the specified key/index, - * FALSE otherwise. - */ - function containsKey($key); - - /** - * Gets the element at the specified key/index. - * - * @param string|integer $key The key/index of the element to retrieve. - * - * @return mixed - */ - function get($key); - - /** - * Gets all keys/indices of the collection. - * - * @return array The keys/indices of the collection, in the order of the corresponding - * elements in the collection. - */ - function getKeys(); - - /** - * Gets all values of the collection. - * - * @return array The values of all elements in the collection, in the order they - * appear in the collection. - */ - function getValues(); - - /** - * Sets an element in the collection at the specified key/index. - * - * @param string|integer $key The key/index of the element to set. - * @param mixed $value The element to set. - * - * @return void - */ - function set($key, $value); - - /** - * Gets a native PHP array representation of the collection. - * - * @return array - */ - function toArray(); - - /** - * Sets the internal iterator to the first element in the collection and returns this element. - * - * @return mixed - */ - function first(); - - /** - * Sets the internal iterator to the last element in the collection and returns this element. - * - * @return mixed - */ - function last(); - - /** - * Gets the key/index of the element at the current iterator position. - * - * @return int|string - */ - function key(); - - /** - * Gets the element of the collection at the current iterator position. - * - * @return mixed - */ - function current(); - - /** - * Moves the internal iterator position to the next element and returns this element. - * - * @return mixed - */ - function next(); - - /** - * Tests for the existence of an element that satisfies the given predicate. - * - * @param Closure $p The predicate. - * - * @return boolean TRUE if the predicate is TRUE for at least one element, FALSE otherwise. - */ - function exists(Closure $p); - - /** - * Returns all the elements of this collection that satisfy the predicate p. - * The order of the elements is preserved. - * - * @param Closure $p The predicate used for filtering. - * - * @return Collection A collection with the results of the filter operation. - */ - function filter(Closure $p); - - /** - * Tests whether the given predicate p holds for all elements of this collection. - * - * @param Closure $p The predicate. - * - * @return boolean TRUE, if the predicate yields TRUE for all elements, FALSE otherwise. - */ - function forAll(Closure $p); - - /** - * Applies the given function to each element in the collection and returns - * a new collection with the elements returned by the function. - * - * @param Closure $func - * - * @return Collection - */ - function map(Closure $func); - - /** - * Partitions this collection in two collections according to a predicate. - * Keys are preserved in the resulting collections. - * - * @param Closure $p The predicate on which to partition. - * - * @return array An array with two elements. The first element contains the collection - * of elements where the predicate returned TRUE, the second element - * contains the collection of elements where the predicate returned FALSE. - */ - function partition(Closure $p); - - /** - * Gets the index/key of a given element. The comparison of two elements is strict, - * that means not only the value but also the type must match. - * For objects this means reference equality. - * - * @param mixed $element The element to search for. - * - * @return int|string|bool The key/index of the element or FALSE if the element was not found. - */ - function indexOf($element); - - /** - * Extracts a slice of $length elements starting at position $offset from the Collection. - * - * If $length is null it returns all elements from $offset to the end of the Collection. - * Keys have to be preserved by this method. Calling this method will only return the - * selected slice and NOT change the elements contained in the collection slice is called on. - * - * @param int $offset The offset to start from. - * @param int|null $length The maximum number of elements to return, or null for no limit. - * - * @return array - */ - function slice($offset, $length = null); -} diff --git a/core/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Criteria.php b/core/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Criteria.php deleted file mode 100644 index 42929bd..0000000 --- a/core/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Criteria.php +++ /dev/null @@ -1,245 +0,0 @@ -. - */ - -namespace Doctrine\Common\Collections; - -use Doctrine\Common\Collections\Expr\Expression; -use Doctrine\Common\Collections\Expr\CompositeExpression; - -/** - * Criteria for filtering Selectable collections. - * - * @author Benjamin Eberlei - * @since 2.3 - */ -class Criteria -{ - /** - * @var string - */ - const ASC = 'ASC'; - - /** - * @var string - */ - const DESC = 'DESC'; - - /** - * @var \Doctrine\Common\Collections\ExpressionBuilder|null - */ - private static $expressionBuilder; - - /** - * @var \Doctrine\Common\Collections\Expr\Expression|null - */ - private $expression; - - /** - * @var array|null - */ - private $orderings; - - /** - * @var int|null - */ - private $firstResult; - - /** - * @var int|null - */ - private $maxResults; - - /** - * Creates an instance of the class. - * - * @return Criteria - */ - public static function create() - { - return new static(); - } - - /** - * Returns the expression builder. - * - * @return \Doctrine\Common\Collections\ExpressionBuilder - */ - public static function expr() - { - if (self::$expressionBuilder === null) { - self::$expressionBuilder = new ExpressionBuilder(); - } - return self::$expressionBuilder; - } - - /** - * Construct a new Criteria. - * - * @param Expression $expression - * @param array|null $orderings - * @param int|null $firstResult - * @param int|null $maxResults - */ - public function __construct(Expression $expression = null, array $orderings = null, $firstResult = null, $maxResults = null) - { - $this->expression = $expression; - $this->orderings = $orderings; - $this->firstResult = $firstResult; - $this->maxResults = $maxResults; - } - - /** - * Sets the where expression to evaluate when this Criteria is searched for. - * - * @param Expression $expression - * - * @return Criteria - */ - public function where(Expression $expression) - { - $this->expression = $expression; - return $this; - } - - /** - * Appends the where expression to evaluate when this Criteria is searched for - * using an AND with previous expression. - * - * @param Expression $expression - * - * @return Criteria - */ - public function andWhere(Expression $expression) - { - if ($this->expression === null) { - return $this->where($expression); - } - - $this->expression = new CompositeExpression(CompositeExpression::TYPE_AND, array( - $this->expression, $expression - )); - - return $this; - } - - /** - * Appends the where expression to evaluate when this Criteria is searched for - * using an OR with previous expression. - * - * @param Expression $expression - * - * @return Criteria - */ - public function orWhere(Expression $expression) - { - if ($this->expression === null) { - return $this->where($expression); - } - - $this->expression = new CompositeExpression(CompositeExpression::TYPE_OR, array( - $this->expression, $expression - )); - - return $this; - } - - /** - * Gets the expression attached to this Criteria. - * - * @return Expression|null - */ - public function getWhereExpression() - { - return $this->expression; - } - - /** - * Gets the current orderings of this Criteria. - * - * @return array - */ - public function getOrderings() - { - return $this->orderings; - } - - /** - * Sets the ordering of the result of this Criteria. - * - * Keys are field and values are the order, being either ASC or DESC. - * - * @see Criteria::ASC - * @see Criteria::DESC - * - * @param array $orderings - * - * @return Criteria - */ - public function orderBy(array $orderings) - { - $this->orderings = $orderings; - return $this; - } - - /** - * Gets the current first result option of this Criteria. - * - * @return int|null - */ - public function getFirstResult() - { - return $this->firstResult; - } - - /** - * Set the number of first result that this Criteria should return. - * - * @param int|null $firstResult The value to set. - * - * @return Criteria - */ - public function setFirstResult($firstResult) - { - $this->firstResult = $firstResult; - return $this; - } - - /** - * Gets maxResults. - * - * @return int|null - */ - public function getMaxResults() - { - return $this->maxResults; - } - - /** - * Sets maxResults. - * - * @param int|null $maxResults The value to set. - * - * @return Criteria - */ - public function setMaxResults($maxResults) - { - $this->maxResults = $maxResults; - return $this; - } -} diff --git a/core/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Expr/ClosureExpressionVisitor.php b/core/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Expr/ClosureExpressionVisitor.php deleted file mode 100644 index 5099458..0000000 --- a/core/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Expr/ClosureExpressionVisitor.php +++ /dev/null @@ -1,227 +0,0 @@ -. - */ - -namespace Doctrine\Common\Collections\Expr; - -/** - * Walks an expression graph and turns it into a PHP closure. - * - * This closure can be used with {@Collection#filter()} and is used internally - * by {@ArrayCollection#select()}. - * - * @author Benjamin Eberlei - * @since 2.3 - */ -class ClosureExpressionVisitor extends ExpressionVisitor -{ - /** - * Accesses the field of a given object. This field has to be public - * directly or indirectly (through an accessor get*, is*, or a magic - * method, __get, __call). - * - * @param object $object - * @param string $field - * - * @return mixed - */ - public static function getObjectFieldValue($object, $field) - { - if (is_array($object)) { - return $object[$field]; - } - - $accessors = array('get', 'is'); - - foreach ($accessors as $accessor) { - $accessor .= $field; - - if ( ! method_exists($object, $accessor)) { - continue; - } - - return $object->$accessor(); - } - - // __call should be triggered for get. - $accessor = $accessors[0] . $field; - - if (method_exists($object, '__call')) { - return $object->$accessor(); - } - - if ($object instanceof \ArrayAccess) { - return $object[$field]; - } - - return $object->$field; - } - - /** - * Helper for sorting arrays of objects based on multiple fields + orientations. - * - * @param string $name - * @param int $orientation - * @param \Closure $next - * - * @return \Closure - */ - public static function sortByField($name, $orientation = 1, \Closure $next = null) - { - if (!$next) { - $next = function() { - return 0; - }; - } - - return function ($a, $b) use ($name, $next, $orientation) { - $aValue = ClosureExpressionVisitor::getObjectFieldValue($a, $name); - $bValue = ClosureExpressionVisitor::getObjectFieldValue($b, $name); - - if ($aValue === $bValue) { - return $next($a, $b); - } - - return (($aValue > $bValue) ? 1 : -1) * $orientation; - }; - } - - /** - * {@inheritDoc} - */ - public function walkComparison(Comparison $comparison) - { - $field = $comparison->getField(); - $value = $comparison->getValue()->getValue(); // shortcut for walkValue() - - switch ($comparison->getOperator()) { - case Comparison::EQ: - return function ($object) use ($field, $value) { - return ClosureExpressionVisitor::getObjectFieldValue($object, $field) === $value; - }; - - case Comparison::NEQ: - return function ($object) use ($field, $value) { - return ClosureExpressionVisitor::getObjectFieldValue($object, $field) !== $value; - }; - - case Comparison::LT: - return function ($object) use ($field, $value) { - return ClosureExpressionVisitor::getObjectFieldValue($object, $field) < $value; - }; - - case Comparison::LTE: - return function ($object) use ($field, $value) { - return ClosureExpressionVisitor::getObjectFieldValue($object, $field) <= $value; - }; - - case Comparison::GT: - return function ($object) use ($field, $value) { - return ClosureExpressionVisitor::getObjectFieldValue($object, $field) > $value; - }; - - case Comparison::GTE: - return function ($object) use ($field, $value) { - return ClosureExpressionVisitor::getObjectFieldValue($object, $field) >= $value; - }; - - case Comparison::IN: - return function ($object) use ($field, $value) { - return in_array(ClosureExpressionVisitor::getObjectFieldValue($object, $field), $value); - }; - - case Comparison::NIN: - return function ($object) use ($field, $value) { - return ! in_array(ClosureExpressionVisitor::getObjectFieldValue($object, $field), $value); - }; - - case Comparison::CONTAINS: - return function ($object) use ($field, $value) { - return false !== strpos(ClosureExpressionVisitor::getObjectFieldValue($object, $field), $value); - }; - - default: - throw new \RuntimeException("Unknown comparison operator: " . $comparison->getOperator()); - } - } - - /** - * {@inheritDoc} - */ - public function walkValue(Value $value) - { - return $value->getValue(); - } - - /** - * {@inheritDoc} - */ - public function walkCompositeExpression(CompositeExpression $expr) - { - $expressionList = array(); - - foreach ($expr->getExpressionList() as $child) { - $expressionList[] = $this->dispatch($child); - } - - switch($expr->getType()) { - case CompositeExpression::TYPE_AND: - return $this->andExpressions($expressionList); - - case CompositeExpression::TYPE_OR: - return $this->orExpressions($expressionList); - - default: - throw new \RuntimeException("Unknown composite " . $expr->getType()); - } - } - - /** - * @param array $expressions - * - * @return callable - */ - private function andExpressions($expressions) - { - return function ($object) use ($expressions) { - foreach ($expressions as $expression) { - if ( ! $expression($object)) { - return false; - } - } - return true; - }; - } - - /** - * @param array $expressions - * - * @return callable - */ - private function orExpressions($expressions) - { - return function ($object) use ($expressions) { - foreach ($expressions as $expression) { - if ($expression($object)) { - return true; - } - } - return false; - }; - } -} diff --git a/core/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Expr/Comparison.php b/core/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Expr/Comparison.php deleted file mode 100644 index d54ecf2..0000000 --- a/core/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Expr/Comparison.php +++ /dev/null @@ -1,103 +0,0 @@ -. - */ - -namespace Doctrine\Common\Collections\Expr; - -/** - * Comparison of a field with a value by the given operator. - * - * @author Benjamin Eberlei - * @since 2.3 - */ -class Comparison implements Expression -{ - const EQ = '='; - const NEQ = '<>'; - const LT = '<'; - const LTE = '<='; - const GT = '>'; - const GTE = '>='; - const IS = '='; // no difference with EQ - const IN = 'IN'; - const NIN = 'NIN'; - const CONTAINS = 'CONTAINS'; - - /** - * @var string - */ - private $field; - - /** - * @var string - */ - private $op; - - /** - * @var Value - */ - private $value; - - /** - * @param string $field - * @param string $operator - * @param mixed $value - */ - public function __construct($field, $operator, $value) - { - if ( ! ($value instanceof Value)) { - $value = new Value($value); - } - - $this->field = $field; - $this->op = $operator; - $this->value = $value; - } - - /** - * @return string - */ - public function getField() - { - return $this->field; - } - - /** - * @return Value - */ - public function getValue() - { - return $this->value; - } - - /** - * @return string - */ - public function getOperator() - { - return $this->op; - } - - /** - * {@inheritDoc} - */ - public function visit(ExpressionVisitor $visitor) - { - return $visitor->walkComparison($this); - } -} diff --git a/core/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Expr/CompositeExpression.php b/core/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Expr/CompositeExpression.php deleted file mode 100644 index 3613c02..0000000 --- a/core/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Expr/CompositeExpression.php +++ /dev/null @@ -1,90 +0,0 @@ -. - */ - -namespace Doctrine\Common\Collections\Expr; - -/** - * Expression of Expressions combined by AND or OR operation. - * - * @author Benjamin Eberlei - * @since 2.3 - */ -class CompositeExpression implements Expression -{ - const TYPE_AND = 'AND'; - const TYPE_OR = 'OR'; - - /** - * @var string - */ - private $type; - - /** - * @var Expression[] - */ - private $expressions = array(); - - /** - * @param string $type - * @param array $expressions - * - * @throws \RuntimeException - */ - public function __construct($type, array $expressions) - { - $this->type = $type; - - foreach ($expressions as $expr) { - if ($expr instanceof Value) { - throw new \RuntimeException("Values are not supported expressions as children of and/or expressions."); - } - if ( ! ($expr instanceof Expression)) { - throw new \RuntimeException("No expression given to CompositeExpression."); - } - - $this->expressions[] = $expr; - } - } - - /** - * Returns the list of expressions nested in this composite. - * - * @return Expression[] - */ - public function getExpressionList() - { - return $this->expressions; - } - - /** - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * {@inheritDoc} - */ - public function visit(ExpressionVisitor $visitor) - { - return $visitor->walkCompositeExpression($this); - } -} diff --git a/core/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Expr/Expression.php b/core/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Expr/Expression.php deleted file mode 100644 index 68db767..0000000 --- a/core/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Expr/Expression.php +++ /dev/null @@ -1,35 +0,0 @@ -. - */ - -namespace Doctrine\Common\Collections\Expr; - -/** - * Expression for the {@link Selectable} interface. - * - * @author Benjamin Eberlei - */ -interface Expression -{ - /** - * @param ExpressionVisitor $visitor - * - * @return mixed - */ - public function visit(ExpressionVisitor $visitor); -} diff --git a/core/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Expr/ExpressionVisitor.php b/core/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Expr/ExpressionVisitor.php deleted file mode 100644 index 080afdc..0000000 --- a/core/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Expr/ExpressionVisitor.php +++ /dev/null @@ -1,82 +0,0 @@ -. - */ - -namespace Doctrine\Common\Collections\Expr; - -/** - * An Expression visitor walks a graph of expressions and turns them into a - * query for the underlying implementation. - * - * @author Benjamin Eberlei - */ -abstract class ExpressionVisitor -{ - /** - * Converts a comparison expression into the target query language output. - * - * @param Comparison $comparison - * - * @return mixed - */ - abstract public function walkComparison(Comparison $comparison); - - /** - * Converts a value expression into the target query language part. - * - * @param Value $value - * - * @return mixed - */ - abstract public function walkValue(Value $value); - - /** - * Converts a composite expression into the target query language output. - * - * @param CompositeExpression $expr - * - * @return mixed - */ - abstract public function walkCompositeExpression(CompositeExpression $expr); - - /** - * Dispatches walking an expression to the appropriate handler. - * - * @param Expression $expr - * - * @return mixed - * - * @throws \RuntimeException - */ - public function dispatch(Expression $expr) - { - switch (true) { - case ($expr instanceof Comparison): - return $this->walkComparison($expr); - - case ($expr instanceof Value): - return $this->walkValue($expr); - - case ($expr instanceof CompositeExpression): - return $this->walkCompositeExpression($expr); - - default: - throw new \RuntimeException("Unknown Expression " . get_class($expr)); - } - } -} diff --git a/core/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Expr/Value.php b/core/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Expr/Value.php deleted file mode 100644 index 7f6e831..0000000 --- a/core/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Expr/Value.php +++ /dev/null @@ -1,52 +0,0 @@ -. - */ - -namespace Doctrine\Common\Collections\Expr; - -class Value implements Expression -{ - /** - * @var mixed - */ - private $value; - - /** - * @param mixed $value - */ - public function __construct($value) - { - $this->value = $value; - } - - /** - * @return mixed - */ - public function getValue() - { - return $this->value; - } - - /** - * {@inheritDoc} - */ - public function visit(ExpressionVisitor $visitor) - { - return $visitor->walkValue($this); - } -} diff --git a/core/vendor/doctrine/collections/lib/Doctrine/Common/Collections/ExpressionBuilder.php b/core/vendor/doctrine/collections/lib/Doctrine/Common/Collections/ExpressionBuilder.php deleted file mode 100644 index 6539e3c..0000000 --- a/core/vendor/doctrine/collections/lib/Doctrine/Common/Collections/ExpressionBuilder.php +++ /dev/null @@ -1,166 +0,0 @@ -. - */ - -namespace Doctrine\Common\Collections; - -use Doctrine\Common\Collections\Expr\Comparison; -use Doctrine\Common\Collections\Expr\CompositeExpression; -use Doctrine\Common\Collections\Expr\Value; - -/** - * Builder for Expressions in the {@link Selectable} interface. - * - * Important Notice for interoperable code: You have to use scalar - * values only for comparisons, otherwise the behavior of the comparision - * may be different between implementations (Array vs ORM vs ODM). - * - * @author Benjamin Eberlei - * @since 2.3 - */ -class ExpressionBuilder -{ - /** - * @param mixed $x - * - * @return CompositeExpression - */ - public function andX($x = null) - { - return new CompositeExpression(CompositeExpression::TYPE_AND, func_get_args()); - } - - /** - * @param mixed $x - * - * @return CompositeExpression - */ - public function orX($x = null) - { - return new CompositeExpression(CompositeExpression::TYPE_OR, func_get_args()); - } - - /** - * @param string $field - * @param mixed $value - * - * @return Comparison - */ - public function eq($field, $value) - { - return new Comparison($field, Comparison::EQ, new Value($value)); - } - - /** - * @param string $field - * @param mixed $value - * - * @return Comparison - */ - public function gt($field, $value) - { - return new Comparison($field, Comparison::GT, new Value($value)); - } - - /** - * @param string $field - * @param mixed $value - * - * @return Comparison - */ - public function lt($field, $value) - { - return new Comparison($field, Comparison::LT, new Value($value)); - } - - /** - * @param string $field - * @param mixed $value - * - * @return Comparison - */ - public function gte($field, $value) - { - return new Comparison($field, Comparison::GTE, new Value($value)); - } - - /** - * @param string $field - * @param mixed $value - * - * @return Comparison - */ - public function lte($field, $value) - { - return new Comparison($field, Comparison::LTE, new Value($value)); - } - - /** - * @param string $field - * @param mixed $value - * - * @return Comparison - */ - public function neq($field, $value) - { - return new Comparison($field, Comparison::NEQ, new Value($value)); - } - - /** - * @param string $field - * - * @return Comparison - */ - public function isNull($field) - { - return new Comparison($field, Comparison::EQ, new Value(null)); - } - - /** - * @param string $field - * @param mixed $values - * - * @return Comparison - */ - public function in($field, array $values) - { - return new Comparison($field, Comparison::IN, new Value($values)); - } - - /** - * @param string $field - * @param mixed $values - * - * @return Comparison - */ - public function notIn($field, array $values) - { - return new Comparison($field, Comparison::NIN, new Value($values)); - } - - /** - * @param string $field - * @param mixed $value - * - * @return Comparison - */ - public function contains($field, $value) - { - return new Comparison($field, Comparison::CONTAINS, new Value($value)); - } -} diff --git a/core/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Selectable.php b/core/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Selectable.php deleted file mode 100644 index 401d46e..0000000 --- a/core/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Selectable.php +++ /dev/null @@ -1,48 +0,0 @@ -. - */ - -namespace Doctrine\Common\Collections; - -/** - * Interface for collections that allow efficient filtering with an expression API. - * - * Goal of this interface is a backend independent method to fetch elements - * from a collections. {@link Expression} is crafted in a way that you can - * implement queries from both in-memory and database-backed collections. - * - * For database backed collections this allows very efficient access by - * utilizing the query APIs, for example SQL in the ORM. Applications using - * this API can implement efficient database access without having to ask the - * EntityManager or Repositories. - * - * @author Benjamin Eberlei - * @since 2.3 - */ -interface Selectable -{ - /** - * Selects all elements from a selectable that match the expression and - * returns a new collection containing these elements. - * - * @param Criteria $criteria - * - * @return Collection - */ - function matching(Criteria $criteria); -} diff --git a/core/vendor/doctrine/collections/phpunit.xml.dist b/core/vendor/doctrine/collections/phpunit.xml.dist deleted file mode 100644 index 36968e9..0000000 --- a/core/vendor/doctrine/collections/phpunit.xml.dist +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - ./tests/Doctrine/ - - - - - - ./lib/Doctrine/ - - - - - - performance - - - diff --git a/core/vendor/doctrine/collections/tests/Doctrine/Tests/Common/Collections/AbstractLazyCollectionTest.php b/core/vendor/doctrine/collections/tests/Doctrine/Tests/Common/Collections/AbstractLazyCollectionTest.php deleted file mode 100644 index 4de82cc..0000000 --- a/core/vendor/doctrine/collections/tests/Doctrine/Tests/Common/Collections/AbstractLazyCollectionTest.php +++ /dev/null @@ -1,20 +0,0 @@ -assertFalse($collection->isInitialized()); - $this->assertCount(3, $collection); - - $collection->add('bar'); - $this->assertTrue($collection->isInitialized()); - $this->assertCount(4, $collection); - } -} diff --git a/core/vendor/doctrine/collections/tests/Doctrine/Tests/Common/Collections/ClosureExpressionVisitorTest.php b/core/vendor/doctrine/collections/tests/Doctrine/Tests/Common/Collections/ClosureExpressionVisitorTest.php deleted file mode 100644 index b640043..0000000 --- a/core/vendor/doctrine/collections/tests/Doctrine/Tests/Common/Collections/ClosureExpressionVisitorTest.php +++ /dev/null @@ -1,243 +0,0 @@ -. - */ - -namespace Doctrine\Tests\Common\Collections; - -use Doctrine\Common\Collections\Expr\ClosureExpressionVisitor; -use Doctrine\Common\Collections\ExpressionBuilder; - -/** - * @group DDC-1637 - */ -class ClosureExpressionVisitorTest extends \PHPUnit_Framework_TestCase -{ - private $visitor; - private $builder; - - public function setUp() - { - $this->visitor = new ClosureExpressionVisitor(); - $this->builder = new ExpressionBuilder(); - } - - public function testGetObjectFieldValueIsAccessor() - { - $object = new TestObject(1, 2, true); - - $this->assertTrue($this->visitor->getObjectFieldValue($object, 'baz')); - } - - public function testGetObjectFieldValueMagicCallMethod() - { - $object = new TestObject(1, 2, true, 3); - - $this->assertEquals(3, $this->visitor->getObjectFieldValue($object, 'qux')); - } - - public function testWalkEqualsComparison() - { - $closure = $this->visitor->walkComparison($this->builder->eq("foo", 1)); - - $this->assertTrue($closure(new TestObject(1))); - $this->assertFalse($closure(new TestObject(2))); - } - - public function testWalkNotEqualsComparison() - { - $closure = $this->visitor->walkComparison($this->builder->neq("foo", 1)); - - $this->assertFalse($closure(new TestObject(1))); - $this->assertTrue($closure(new TestObject(2))); - } - - public function testWalkLessThanComparison() - { - $closure = $this->visitor->walkComparison($this->builder->lt("foo", 1)); - - $this->assertFalse($closure(new TestObject(1))); - $this->assertTrue($closure(new TestObject(0))); - } - - public function testWalkLessThanEqualsComparison() - { - $closure = $this->visitor->walkComparison($this->builder->lte("foo", 1)); - - $this->assertFalse($closure(new TestObject(2))); - $this->assertTrue($closure(new TestObject(1))); - $this->assertTrue($closure(new TestObject(0))); - } - - public function testWalkGreaterThanEqualsComparison() - { - $closure = $this->visitor->walkComparison($this->builder->gte("foo", 1)); - - $this->assertTrue($closure(new TestObject(2))); - $this->assertTrue($closure(new TestObject(1))); - $this->assertFalse($closure(new TestObject(0))); - } - - public function testWalkGreaterThanComparison() - { - $closure = $this->visitor->walkComparison($this->builder->gt("foo", 1)); - - $this->assertTrue($closure(new TestObject(2))); - $this->assertFalse($closure(new TestObject(1))); - $this->assertFalse($closure(new TestObject(0))); - } - - public function testWalkInComparison() - { - $closure = $this->visitor->walkComparison($this->builder->in("foo", array(1, 2, 3))); - - $this->assertTrue($closure(new TestObject(2))); - $this->assertTrue($closure(new TestObject(1))); - $this->assertFalse($closure(new TestObject(0))); - } - - public function testWalkNotInComparison() - { - $closure = $this->visitor->walkComparison($this->builder->notIn("foo", array(1, 2, 3))); - - $this->assertFalse($closure(new TestObject(1))); - $this->assertFalse($closure(new TestObject(2))); - $this->assertTrue($closure(new TestObject(0))); - $this->assertTrue($closure(new TestObject(4))); - } - - public function testWalkContainsComparison() - { - $closure = $this->visitor->walkComparison($this->builder->contains('foo', 'hello')); - - $this->assertTrue($closure(new TestObject('hello world'))); - $this->assertFalse($closure(new TestObject('world'))); - } - - public function testWalkAndCompositeExpression() - { - $closure = $this->visitor->walkCompositeExpression( - $this->builder->andX( - $this->builder->eq("foo", 1), - $this->builder->eq("bar", 1) - ) - ); - - $this->assertTrue($closure(new TestObject(1, 1))); - $this->assertFalse($closure(new TestObject(1, 0))); - $this->assertFalse($closure(new TestObject(0, 1))); - $this->assertFalse($closure(new TestObject(0, 0))); - } - - public function testWalkOrCompositeExpression() - { - $closure = $this->visitor->walkCompositeExpression( - $this->builder->orX( - $this->builder->eq("foo", 1), - $this->builder->eq("bar", 1) - ) - ); - - $this->assertTrue($closure(new TestObject(1, 1))); - $this->assertTrue($closure(new TestObject(1, 0))); - $this->assertTrue($closure(new TestObject(0, 1))); - $this->assertFalse($closure(new TestObject(0, 0))); - } - - public function testSortByFieldAscending() - { - $objects = array(new TestObject("b"), new TestObject("a"), new TestObject("c")); - $sort = ClosureExpressionVisitor::sortByField("foo"); - - usort($objects, $sort); - - $this->assertEquals("a", $objects[0]->getFoo()); - $this->assertEquals("b", $objects[1]->getFoo()); - $this->assertEquals("c", $objects[2]->getFoo()); - } - - public function testSortByFieldDescending() - { - $objects = array(new TestObject("b"), new TestObject("a"), new TestObject("c")); - $sort = ClosureExpressionVisitor::sortByField("foo", -1); - - usort($objects, $sort); - - $this->assertEquals("c", $objects[0]->getFoo()); - $this->assertEquals("b", $objects[1]->getFoo()); - $this->assertEquals("a", $objects[2]->getFoo()); - } - - public function testSortDelegate() - { - $objects = array(new TestObject("a", "c"), new TestObject("a", "b"), new TestObject("a", "a")); - $sort = ClosureExpressionVisitor::sortByField("bar", 1); - $sort = ClosureExpressionVisitor::sortByField("foo", 1, $sort); - - usort($objects, $sort); - - $this->assertEquals("a", $objects[0]->getBar()); - $this->assertEquals("b", $objects[1]->getBar()); - $this->assertEquals("c", $objects[2]->getBar()); - } - - public function testArrayComparison() - { - $closure = $this->visitor->walkComparison($this->builder->eq("foo", 42)); - - $this->assertTrue($closure(array('foo' => 42))); - } -} - -class TestObject -{ - private $foo; - private $bar; - private $baz; - private $qux; - - public function __construct($foo = null, $bar = null, $baz = null, $qux = null) - { - $this->foo = $foo; - $this->bar = $bar; - $this->baz = $baz; - $this->qux = $qux; - } - - public function __call($name, $arguments) - { - if ('getqux' === $name) { - return $this->qux; - } - } - - public function getFoo() - { - return $this->foo; - } - - public function getBar() - { - return $this->bar; - } - - public function isBaz() - { - return $this->baz; - } -} - diff --git a/core/vendor/doctrine/collections/tests/Doctrine/Tests/Common/Collections/CollectionTest.php b/core/vendor/doctrine/collections/tests/Doctrine/Tests/Common/Collections/CollectionTest.php deleted file mode 100644 index d98246c..0000000 --- a/core/vendor/doctrine/collections/tests/Doctrine/Tests/Common/Collections/CollectionTest.php +++ /dev/null @@ -1,264 +0,0 @@ -_coll = new \Doctrine\Common\Collections\ArrayCollection; - } - - public function testIssetAndUnset() - { - $this->assertFalse(isset($this->_coll[0])); - $this->_coll->add('testing'); - $this->assertTrue(isset($this->_coll[0])); - unset($this->_coll[0]); - $this->assertFalse(isset($this->_coll[0])); - } - - public function testToString() - { - $this->_coll->add('testing'); - $this->assertTrue(is_string((string) $this->_coll)); - } - - public function testRemovingNonExistentEntryReturnsNull() - { - $this->assertEquals(null, $this->_coll->remove('testing_does_not_exist')); - } - - public function testExists() - { - $this->_coll->add("one"); - $this->_coll->add("two"); - $exists = $this->_coll->exists(function($k, $e) { return $e == "one"; }); - $this->assertTrue($exists); - $exists = $this->_coll->exists(function($k, $e) { return $e == "other"; }); - $this->assertFalse($exists); - } - - public function testMap() - { - $this->_coll->add(1); - $this->_coll->add(2); - $res = $this->_coll->map(function($e) { return $e * 2; }); - $this->assertEquals(array(2, 4), $res->toArray()); - } - - public function testFilter() - { - $this->_coll->add(1); - $this->_coll->add("foo"); - $this->_coll->add(3); - $res = $this->_coll->filter(function($e) { return is_numeric($e); }); - $this->assertEquals(array(0 => 1, 2 => 3), $res->toArray()); - } - - public function testFirstAndLast() - { - $this->_coll->add('one'); - $this->_coll->add('two'); - - $this->assertEquals($this->_coll->first(), 'one'); - $this->assertEquals($this->_coll->last(), 'two'); - } - - public function testArrayAccess() - { - $this->_coll[] = 'one'; - $this->_coll[] = 'two'; - - $this->assertEquals($this->_coll[0], 'one'); - $this->assertEquals($this->_coll[1], 'two'); - - unset($this->_coll[0]); - $this->assertEquals($this->_coll->count(), 1); - } - - public function testContainsKey() - { - $this->_coll[5] = 'five'; - $this->assertTrue($this->_coll->containsKey(5)); - } - - public function testContains() - { - $this->_coll[0] = 'test'; - $this->assertTrue($this->_coll->contains('test')); - } - - public function testSearch() - { - $this->_coll[0] = 'test'; - $this->assertEquals(0, $this->_coll->indexOf('test')); - } - - public function testGet() - { - $this->_coll[0] = 'test'; - $this->assertEquals('test', $this->_coll->get(0)); - } - - public function testGetKeys() - { - $this->_coll[] = 'one'; - $this->_coll[] = 'two'; - $this->assertEquals(array(0, 1), $this->_coll->getKeys()); - } - - public function testGetValues() - { - $this->_coll[] = 'one'; - $this->_coll[] = 'two'; - $this->assertEquals(array('one', 'two'), $this->_coll->getValues()); - } - - public function testCount() - { - $this->_coll[] = 'one'; - $this->_coll[] = 'two'; - $this->assertEquals($this->_coll->count(), 2); - $this->assertEquals(count($this->_coll), 2); - } - - public function testForAll() - { - $this->_coll[] = 'one'; - $this->_coll[] = 'two'; - $this->assertEquals($this->_coll->forAll(function($k, $e) { return is_string($e); }), true); - $this->assertEquals($this->_coll->forAll(function($k, $e) { return is_array($e); }), false); - } - - public function testPartition() - { - $this->_coll[] = true; - $this->_coll[] = false; - $partition = $this->_coll->partition(function($k, $e) { return $e == true; }); - $this->assertEquals($partition[0][0], true); - $this->assertEquals($partition[1][0], false); - } - - public function testClear() - { - $this->_coll[] = 'one'; - $this->_coll[] = 'two'; - $this->_coll->clear(); - $this->assertEquals($this->_coll->isEmpty(), true); - } - - public function testRemove() - { - $this->_coll[] = 'one'; - $this->_coll[] = 'two'; - $el = $this->_coll->remove(0); - - $this->assertEquals('one', $el); - $this->assertEquals($this->_coll->contains('one'), false); - $this->assertNull($this->_coll->remove(0)); - } - - public function testRemoveElement() - { - $this->_coll[] = 'one'; - $this->_coll[] = 'two'; - - $this->assertTrue($this->_coll->removeElement('two')); - $this->assertFalse($this->_coll->contains('two')); - $this->assertFalse($this->_coll->removeElement('two')); - } - - public function testSlice() - { - $this->_coll[] = 'one'; - $this->_coll[] = 'two'; - $this->_coll[] = 'three'; - - $slice = $this->_coll->slice(0, 1); - $this->assertInternalType('array', $slice); - $this->assertEquals(array('one'), $slice); - - $slice = $this->_coll->slice(1); - $this->assertEquals(array(1 => 'two', 2 => 'three'), $slice); - - $slice = $this->_coll->slice(1, 1); - $this->assertEquals(array(1 => 'two'), $slice); - } - - public function fillMatchingFixture() - { - $std1 = new \stdClass(); - $std1->foo = "bar"; - $this->_coll[] = $std1; - - $std2 = new \stdClass(); - $std2->foo = "baz"; - $this->_coll[] = $std2; - } - - /** - * @group DDC-1637 - */ - public function testMatching() - { - $this->fillMatchingFixture(); - - $col = $this->_coll->matching(new Criteria(Criteria::expr()->eq("foo", "bar"))); - $this->assertInstanceOf('Doctrine\Common\Collections\Collection', $col); - $this->assertNotSame($col, $this->_coll); - $this->assertEquals(1, count($col)); - } - - /** - * @group DDC-1637 - */ - public function testMatchingOrdering() - { - $this->fillMatchingFixture(); - - $col = $this->_coll->matching(new Criteria(null, array('foo' => 'DESC'))); - - $this->assertInstanceOf('Doctrine\Common\Collections\Collection', $col); - $this->assertNotSame($col, $this->_coll); - $this->assertEquals(2, count($col)); - $this->assertEquals('baz', $col[0]->foo); - $this->assertEquals('bar', $col[1]->foo); - } - - /** - * @group DDC-1637 - */ - public function testMatchingSlice() - { - $this->fillMatchingFixture(); - - $col = $this->_coll->matching(new Criteria(null, null, 1, 1)); - - $this->assertInstanceOf('Doctrine\Common\Collections\Collection', $col); - $this->assertNotSame($col, $this->_coll); - $this->assertEquals(1, count($col)); - $this->assertEquals('baz', $col[0]->foo); - } - - public function testCanRemoveNullValuesByKey() - { - $this->_coll->add(null); - $this->_coll->remove(0); - $this->assertTrue($this->_coll->isEmpty()); - } - - public function testCanVerifyExistingKeysWithNullValues() - { - $this->_coll->set('key', null); - $this->assertTrue($this->_coll->containsKey('key')); - } -} diff --git a/core/vendor/doctrine/collections/tests/Doctrine/Tests/Common/Collections/CriteriaTest.php b/core/vendor/doctrine/collections/tests/Doctrine/Tests/Common/Collections/CriteriaTest.php deleted file mode 100644 index 03fb6ca..0000000 --- a/core/vendor/doctrine/collections/tests/Doctrine/Tests/Common/Collections/CriteriaTest.php +++ /dev/null @@ -1,82 +0,0 @@ -assertInstanceOf("Doctrine\Common\Collections\Criteria", $criteria); - } - - public function testConstructor() - { - $expr = new Comparison("field", "=", "value"); - $criteria = new Criteria($expr, array("foo" => "ASC"), 10, 20); - - $this->assertSame($expr, $criteria->getWhereExpression()); - $this->assertEquals(array("foo" => "ASC"), $criteria->getOrderings()); - $this->assertEquals(10, $criteria->getFirstResult()); - $this->assertEquals(20, $criteria->getMaxResults()); - } - - public function testWhere() - { - $expr = new Comparison("field", "=", "value"); - $criteria = new Criteria(); - - $criteria->where($expr); - - $this->assertSame($expr, $criteria->getWhereExpression()); - } - - public function testAndWhere() - { - $expr = new Comparison("field", "=", "value"); - $criteria = new Criteria(); - - $criteria->where($expr); - $expr = $criteria->getWhereExpression(); - $criteria->andWhere($expr); - - $where = $criteria->getWhereExpression(); - $this->assertInstanceOf('Doctrine\Common\Collections\Expr\CompositeExpression', $where); - - $this->assertEquals(CompositeExpression::TYPE_AND, $where->getType()); - $this->assertSame(array($expr, $expr), $where->getExpressionList()); - } - - public function testOrWhere() - { - $expr = new Comparison("field", "=", "value"); - $criteria = new Criteria(); - - $criteria->where($expr); - $expr = $criteria->getWhereExpression(); - $criteria->orWhere($expr); - - $where = $criteria->getWhereExpression(); - $this->assertInstanceOf('Doctrine\Common\Collections\Expr\CompositeExpression', $where); - - $this->assertEquals(CompositeExpression::TYPE_OR, $where->getType()); - $this->assertSame(array($expr, $expr), $where->getExpressionList()); - } - - public function testOrderings() - { - $criteria = Criteria::create() - ->orderBy(array("foo" => "ASC")); - - $this->assertEquals(array("foo" => "ASC"), $criteria->getOrderings()); - } - - public function testExpr() - { - $this->assertInstanceOf('Doctrine\Common\Collections\ExpressionBuilder', Criteria::expr()); - } -} diff --git a/core/vendor/doctrine/collections/tests/Doctrine/Tests/Common/Collections/ExpressionBuilderTest.php b/core/vendor/doctrine/collections/tests/Doctrine/Tests/Common/Collections/ExpressionBuilderTest.php deleted file mode 100644 index 06d4155..0000000 --- a/core/vendor/doctrine/collections/tests/Doctrine/Tests/Common/Collections/ExpressionBuilderTest.php +++ /dev/null @@ -1,122 +0,0 @@ -builder = new ExpressionBuilder(); - } - - public function testAndX() - { - $expr = $this->builder->andX($this->builder->eq("a", "b")); - - $this->assertInstanceOf("Doctrine\Common\Collections\Expr\CompositeExpression", $expr); - $this->assertEquals(CompositeExpression::TYPE_AND, $expr->getType()); - } - - public function testOrX() - { - $expr = $this->builder->orX($this->builder->eq("a", "b")); - - $this->assertInstanceOf("Doctrine\Common\Collections\Expr\CompositeExpression", $expr); - $this->assertEquals(CompositeExpression::TYPE_OR, $expr->getType()); - } - - public function testInvalidAndXArgument() - { - $this->setExpectedException("RuntimeException"); - $this->builder->andX("foo"); - } - - public function testEq() - { - $expr = $this->builder->eq("a", "b"); - - $this->assertInstanceOf("Doctrine\Common\Collections\Expr\Comparison", $expr); - $this->assertEquals(Comparison::EQ, $expr->getOperator()); - } - - public function testNeq() - { - $expr = $this->builder->neq("a", "b"); - - $this->assertInstanceOf("Doctrine\Common\Collections\Expr\Comparison", $expr); - $this->assertEquals(Comparison::NEQ, $expr->getOperator()); - } - - public function testLt() - { - $expr = $this->builder->lt("a", "b"); - - $this->assertInstanceOf("Doctrine\Common\Collections\Expr\Comparison", $expr); - $this->assertEquals(Comparison::LT, $expr->getOperator()); - } - - public function testGt() - { - $expr = $this->builder->gt("a", "b"); - - $this->assertInstanceOf("Doctrine\Common\Collections\Expr\Comparison", $expr); - $this->assertEquals(Comparison::GT, $expr->getOperator()); - } - - public function testGte() - { - $expr = $this->builder->gte("a", "b"); - - $this->assertInstanceOf("Doctrine\Common\Collections\Expr\Comparison", $expr); - $this->assertEquals(Comparison::GTE, $expr->getOperator()); - } - - public function testLte() - { - $expr = $this->builder->lte("a", "b"); - - $this->assertInstanceOf("Doctrine\Common\Collections\Expr\Comparison", $expr); - $this->assertEquals(Comparison::LTE, $expr->getOperator()); - } - - public function testIn() - { - $expr = $this->builder->in("a", array("b")); - - $this->assertInstanceOf("Doctrine\Common\Collections\Expr\Comparison", $expr); - $this->assertEquals(Comparison::IN, $expr->getOperator()); - } - - public function testNotIn() - { - $expr = $this->builder->notIn("a", array("b")); - - $this->assertInstanceOf("Doctrine\Common\Collections\Expr\Comparison", $expr); - $this->assertEquals(Comparison::NIN, $expr->getOperator()); - } - - public function testIsNull() - { - $expr = $this->builder->isNull("a"); - - $this->assertInstanceOf("Doctrine\Common\Collections\Expr\Comparison", $expr); - $this->assertEquals(Comparison::EQ, $expr->getOperator()); - } - - public function testContains() - { - $expr = $this->builder->contains("a", "b"); - - $this->assertInstanceOf("Doctrine\Common\Collections\Expr\Comparison", $expr); - $this->assertEquals(Comparison::CONTAINS, $expr->getOperator()); - } -} - diff --git a/core/vendor/doctrine/collections/tests/Doctrine/Tests/DoctrineTestCase.php b/core/vendor/doctrine/collections/tests/Doctrine/Tests/DoctrineTestCase.php deleted file mode 100644 index e8323d2..0000000 --- a/core/vendor/doctrine/collections/tests/Doctrine/Tests/DoctrineTestCase.php +++ /dev/null @@ -1,10 +0,0 @@ -collection = new ArrayCollection(array('a', 'b', 'c')); - } -} diff --git a/core/vendor/doctrine/collections/tests/Doctrine/Tests/TestInit.php b/core/vendor/doctrine/collections/tests/Doctrine/Tests/TestInit.php deleted file mode 100644 index 973b5fe..0000000 --- a/core/vendor/doctrine/collections/tests/Doctrine/Tests/TestInit.php +++ /dev/null @@ -1,21 +0,0 @@ -setDefaultAnnotationNamespace('Doctrine\ORM\Mapping\\'); - // new code necessary starting here - $reader->setIgnoreNotImportedAnnotations(true); - $reader->setEnableParsePhpImports(false); - $reader = new \Doctrine\Common\Annotations\CachedReader( - new \Doctrine\Common\Annotations\IndexedReader($reader), new ArrayCache() - ); - -## Annotation Base class or @Annotation - -Beginning after 2.1-RC2 you have to either extend ``Doctrine\Common\Annotations\Annotation`` or add @Annotation to your annotations class-level docblock, otherwise the class will simply be ignored. - -## Removed methods on AnnotationReader - -* AnnotationReader::setAutoloadAnnotations() -* AnnotationReader::getAutoloadAnnotations() -* AnnotationReader::isAutoloadAnnotations() - -## AnnotationRegistry - -Autoloading through the PHP autoloader is removed from the 2.1 AnnotationReader. Instead you have to use the global AnnotationRegistry for loading purposes: - - \Doctrine\Common\Annotations\AnnotationRegistry::registerFile($fileWithAnnotations); - \Doctrine\Common\Annotations\AnnotationRegistry::registerAutoloadNamespace($namespace, $dirs = null); - \Doctrine\Common\Annotations\AnnotationRegistry::registerAutoloadNamespaces($namespaces); - \Doctrine\Common\Annotations\AnnotationRegistry::registerLoader($callable); - -The $callable for registering a loader accepts a class as first and only parameter and must try to silently autoload it. On success true has to be returned. -The registerAutoloadNamespace function registers a PSR-0 compatible silent autoloader for all classes with the given namespace in the given directories. -If null is passed as directory the include path will be used. - diff --git a/core/vendor/doctrine/common/UPGRADE_TO_2_2 b/core/vendor/doctrine/common/UPGRADE_TO_2_2 deleted file mode 100644 index 1d93a13..0000000 --- a/core/vendor/doctrine/common/UPGRADE_TO_2_2 +++ /dev/null @@ -1,61 +0,0 @@ -This document details all the possible changes that you should investigate when -updating your project from Doctrine Common 2.1 to 2.2: - -## Annotation Changes - -- AnnotationReader::setIgnoreNotImportedAnnotations has been removed, you need to - add ignore annotation names which are supposed to be ignored via - AnnotationReader::addGlobalIgnoredName - -- AnnotationReader::setAutoloadAnnotations was deprecated by the AnnotationRegistry - in 2.1 and has been removed in 2.2 - -- AnnotationReader::setEnableParsePhpImports was added to ease transition to the new - annotation mechanism in 2.1 and is removed in 2.2 - -- AnnotationReader::isParsePhpImportsEnabled is removed (see above) - -- AnnotationReader::setDefaultAnnotationNamespace was deprecated in favor of explicit - configuration in 2.1 and will be removed in 2.2 (for isolated projects where you - have full-control over _all_ available annotations, we offer a dedicated reader - class ``SimpleAnnotationReader``) - -- AnnotationReader::setAnnotationCreationFunction was deprecated in 2.1 and will be - removed in 2.2. We only offer two creation mechanisms which cannot be changed - anymore to allow the same reader instance to work with all annotations regardless - of which library they are coming from. - -- AnnotationReader::setAnnotationNamespaceAlias was deprecated in 2.1 and will be - removed in 2.2 (see setDefaultAnnotationNamespace) - -- If you use a class as annotation which has not the @Annotation marker in it's - class block, we will now throw an exception instead of silently ignoring it. You - can however still achieve the previous behavior using the @IgnoreAnnotation, or - AnnotationReader::addGlobalIgnoredName (the exception message will contain detailed - instructions when you run into this problem). - -## Cache Changes - -- Renamed old AbstractCache to CacheProvider - -- Dropped the support to the following functions of all cache providers: - - - CacheProvider::deleteByWildcard - - - CacheProvider::deleteByRegEx - - - CacheProvider::deleteByPrefix - - - CacheProvider::deleteBySuffix - -- CacheProvider::deleteAll will not remove ALL entries, it will only mark them as invalid - -- CacheProvider::flushAll will remove ALL entries, namespaced or not - -- Added support to MemcachedCache - -- Added support to WincacheCache - -## ClassLoader Changes - -- ClassLoader::fileExistsInIncludePath() no longer exists. Use the native stream_resolve_include_path() PHP function \ No newline at end of file diff --git a/core/vendor/doctrine/common/build.properties b/core/vendor/doctrine/common/build.properties deleted file mode 100644 index ef51d20..0000000 --- a/core/vendor/doctrine/common/build.properties +++ /dev/null @@ -1,3 +0,0 @@ -# Version class and file -project.version_class = Doctrine\\Common\\Version -project.version_file = lib/Doctrine/Common/Version.php diff --git a/core/vendor/doctrine/common/build.xml b/core/vendor/doctrine/common/build.xml deleted file mode 100644 index 429b768..0000000 --- a/core/vendor/doctrine/common/build.xml +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/core/vendor/doctrine/common/composer.json b/core/vendor/doctrine/common/composer.json deleted file mode 100644 index 4f4f215..0000000 --- a/core/vendor/doctrine/common/composer.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "doctrine/common", - "type": "library", - "description": "Common Library for Doctrine projects", - "keywords": ["collections", "spl", "eventmanager", "annotations", "persistence"], - "homepage": "http://www.doctrine-project.org", - "license": "MIT", - "authors": [ - {"name": "Guilherme Blanco", "email": "guilhermeblanco@gmail.com"}, - {"name": "Roman Borschel", "email": "roman@code-factory.org"}, - {"name": "Benjamin Eberlei", "email": "kontakt@beberlei.de"}, - {"name": "Jonathan Wage", "email": "jonwage@gmail.com"}, - {"name": "Johannes Schmitt", "email": "schmittjoh@gmail.com"} - ], - "require": { - "php": ">=5.3.2", - "doctrine/inflector": "1.*", - "doctrine/cache": "1.*", - "doctrine/collections": "1.*", - "doctrine/lexer": "1.*", - "doctrine/annotations": "1.*" - }, - "minimum-stability": "dev", - "require-dev": { - "phpunit/phpunit": "~3.7" - }, - "autoload": { - "psr-0": { "Doctrine\\Common\\": "lib/" } - }, - "extra": { - "branch-alias": { - "dev-master": "2.5.x-dev" - } - }, - "archive": { - "exclude": ["!vendor", "tests", "*phpunit.xml", ".travis.yml", "build.xml", "build.properties", "composer.phar"] - } -} diff --git a/core/vendor/doctrine/common/lib/Doctrine/Common/ClassLoader.php b/core/vendor/doctrine/common/lib/Doctrine/Common/ClassLoader.php deleted file mode 100644 index 632805e..0000000 --- a/core/vendor/doctrine/common/lib/Doctrine/Common/ClassLoader.php +++ /dev/null @@ -1,288 +0,0 @@ -. - */ - -namespace Doctrine\Common; - -/** - * A ClassLoader is an autoloader for class files that can be - * installed on the SPL autoload stack. It is a class loader that either loads only classes - * of a specific namespace or all namespaces and it is suitable for working together - * with other autoloaders in the SPL autoload stack. - * - * If no include path is configured through the constructor or {@link setIncludePath}, a ClassLoader - * relies on the PHP include_path. - * - * @author Roman Borschel - * @since 2.0 - */ -class ClassLoader -{ - /** - * PHP file extension. - * - * @var string - */ - protected $fileExtension = '.php'; - - /** - * Current namespace. - * - * @var string|null - */ - protected $namespace; - - /** - * Current include path. - * - * @var string|null - */ - protected $includePath; - - /** - * PHP namespace separator. - * - * @var string - */ - protected $namespaceSeparator = '\\'; - - /** - * Creates a new ClassLoader that loads classes of the - * specified namespace from the specified include path. - * - * If no include path is given, the ClassLoader relies on the PHP include_path. - * If neither a namespace nor an include path is given, the ClassLoader will - * be responsible for loading all classes, thereby relying on the PHP include_path. - * - * @param string|null $ns The namespace of the classes to load. - * @param string|null $includePath The base include path to use. - */ - public function __construct($ns = null, $includePath = null) - { - $this->namespace = $ns; - $this->includePath = $includePath; - } - - /** - * Sets the namespace separator used by classes in the namespace of this ClassLoader. - * - * @param string $sep The separator to use. - * - * @return void - */ - public function setNamespaceSeparator($sep) - { - $this->namespaceSeparator = $sep; - } - - /** - * Gets the namespace separator used by classes in the namespace of this ClassLoader. - * - * @return string - */ - public function getNamespaceSeparator() - { - return $this->namespaceSeparator; - } - - /** - * Sets the base include path for all class files in the namespace of this ClassLoader. - * - * @param string|null $includePath - * - * @return void - */ - public function setIncludePath($includePath) - { - $this->includePath = $includePath; - } - - /** - * Gets the base include path for all class files in the namespace of this ClassLoader. - * - * @return string|null - */ - public function getIncludePath() - { - return $this->includePath; - } - - /** - * Sets the file extension of class files in the namespace of this ClassLoader. - * - * @param string $fileExtension - * - * @return void - */ - public function setFileExtension($fileExtension) - { - $this->fileExtension = $fileExtension; - } - - /** - * Gets the file extension of class files in the namespace of this ClassLoader. - * - * @return string - */ - public function getFileExtension() - { - return $this->fileExtension; - } - - /** - * Registers this ClassLoader on the SPL autoload stack. - * - * @return void - */ - public function register() - { - spl_autoload_register(array($this, 'loadClass')); - } - - /** - * Removes this ClassLoader from the SPL autoload stack. - * - * @return void - */ - public function unregister() - { - spl_autoload_unregister(array($this, 'loadClass')); - } - - /** - * Loads the given class or interface. - * - * @param string $className The name of the class to load. - * - * @return boolean TRUE if the class has been successfully loaded, FALSE otherwise. - */ - public function loadClass($className) - { - if ($this->namespace !== null && strpos($className, $this->namespace.$this->namespaceSeparator) !== 0) { - return false; - } - - require ($this->includePath !== null ? $this->includePath . DIRECTORY_SEPARATOR : '') - . str_replace($this->namespaceSeparator, DIRECTORY_SEPARATOR, $className) - . $this->fileExtension; - - return true; - } - - /** - * Asks this ClassLoader whether it can potentially load the class (file) with - * the given name. - * - * @param string $className The fully-qualified name of the class. - * - * @return boolean TRUE if this ClassLoader can load the class, FALSE otherwise. - */ - public function canLoadClass($className) - { - if ($this->namespace !== null && strpos($className, $this->namespace.$this->namespaceSeparator) !== 0) { - return false; - } - - $file = str_replace($this->namespaceSeparator, DIRECTORY_SEPARATOR, $className) . $this->fileExtension; - - if ($this->includePath !== null) { - return is_file($this->includePath . DIRECTORY_SEPARATOR . $file); - } - - return (false !== stream_resolve_include_path($file)); - } - - /** - * Checks whether a class with a given name exists. A class "exists" if it is either - * already defined in the current request or if there is an autoloader on the SPL - * autoload stack that is a) responsible for the class in question and b) is able to - * load a class file in which the class definition resides. - * - * If the class is not already defined, each autoloader in the SPL autoload stack - * is asked whether it is able to tell if the class exists. If the autoloader is - * a ClassLoader, {@link canLoadClass} is used, otherwise the autoload - * function of the autoloader is invoked and expected to return a value that - * evaluates to TRUE if the class (file) exists. As soon as one autoloader reports - * that the class exists, TRUE is returned. - * - * Note that, depending on what kinds of autoloaders are installed on the SPL - * autoload stack, the class (file) might already be loaded as a result of checking - * for its existence. This is not the case with a ClassLoader, who separates - * these responsibilities. - * - * @param string $className The fully-qualified name of the class. - * - * @return boolean TRUE if the class exists as per the definition given above, FALSE otherwise. - */ - public static function classExists($className) - { - if (class_exists($className, false) || interface_exists($className, false)) { - return true; - } - - foreach (spl_autoload_functions() as $loader) { - if (is_array($loader)) { // array(???, ???) - if (is_object($loader[0])) { - if ($loader[0] instanceof ClassLoader) { // array($obj, 'methodName') - if ($loader[0]->canLoadClass($className)) { - return true; - } - } else if ($loader[0]->{$loader[1]}($className)) { - return true; - } - } else if ($loader[0]::$loader[1]($className)) { // array('ClassName', 'methodName') - return true; - } - } else if ($loader instanceof \Closure) { // function($className) {..} - if ($loader($className)) { - return true; - } - } else if (is_string($loader) && $loader($className)) { // "MyClass::loadClass" - return true; - } - - if (class_exists($className, false) || interface_exists($className, false)) { - return true; - } - } - - return false; - } - - /** - * Gets the ClassLoader from the SPL autoload stack that is responsible - * for (and is able to load) the class with the given name. - * - * @param string $className The name of the class. - * - * @return ClassLoader The ClassLoader for the class or NULL if no such ClassLoader exists. - */ - public static function getClassLoader($className) - { - foreach (spl_autoload_functions() as $loader) { - if (is_array($loader) - && $loader[0] instanceof ClassLoader - && $loader[0]->canLoadClass($className) - ) { - return $loader[0]; - } - } - - return null; - } -} diff --git a/core/vendor/doctrine/common/lib/Doctrine/Common/CommonException.php b/core/vendor/doctrine/common/lib/Doctrine/Common/CommonException.php deleted file mode 100644 index 2a1a08e..0000000 --- a/core/vendor/doctrine/common/lib/Doctrine/Common/CommonException.php +++ /dev/null @@ -1,29 +0,0 @@ -. - */ - -namespace Doctrine\Common; - -/** - * Base exception class for package Doctrine\Common. - * - * @author heinrich - */ -class CommonException extends \Exception -{ -} diff --git a/core/vendor/doctrine/common/lib/Doctrine/Common/Comparable.php b/core/vendor/doctrine/common/lib/Doctrine/Common/Comparable.php deleted file mode 100644 index 8cd02c9..0000000 --- a/core/vendor/doctrine/common/lib/Doctrine/Common/Comparable.php +++ /dev/null @@ -1,46 +0,0 @@ -. - */ - -namespace Doctrine\Common; - -/** - * Comparable interface that allows to compare two value objects to each other for similarity. - * - * @link www.doctrine-project.org - * @since 2.2 - * @author Benjamin Eberlei - * @author Guilherme Blanco - */ -interface Comparable -{ - /** - * Compares the current object to the passed $other. - * - * Returns 0 if they are semantically equal, 1 if the other object - * is less than the current one, or -1 if its more than the current one. - * - * This method should not check for identity using ===, only for semantical equality for example - * when two different DateTime instances point to the exact same Date + TZ. - * - * @param mixed $other - * - * @return int - */ - public function compareTo($other); -} diff --git a/core/vendor/doctrine/common/lib/Doctrine/Common/EventArgs.php b/core/vendor/doctrine/common/lib/Doctrine/Common/EventArgs.php deleted file mode 100644 index 75506e6..0000000 --- a/core/vendor/doctrine/common/lib/Doctrine/Common/EventArgs.php +++ /dev/null @@ -1,67 +0,0 @@ -. - */ - -namespace Doctrine\Common; - -/** - * EventArgs is the base class for classes containing event data. - * - * This class contains no event data. It is used by events that do not pass state - * information to an event handler when an event is raised. The single empty EventArgs - * instance can be obtained through {@link getEmptyInstance}. - * - * @link www.doctrine-project.org - * @since 2.0 - * @author Guilherme Blanco - * @author Jonathan Wage - * @author Roman Borschel - */ -class EventArgs -{ - /** - * Single instance of EventArgs. - * - * @var EventArgs - */ - private static $_emptyEventArgsInstance; - - /** - * Gets the single, empty and immutable EventArgs instance. - * - * This instance will be used when events are dispatched without any parameter, - * like this: EventManager::dispatchEvent('eventname'); - * - * The benefit from this is that only one empty instance is instantiated and shared - * (otherwise there would be instances for every dispatched in the abovementioned form). - * - * @see EventManager::dispatchEvent - * - * @link http://msdn.microsoft.com/en-us/library/system.eventargs.aspx - * - * @return EventArgs - */ - public static function getEmptyInstance() - { - if ( ! self::$_emptyEventArgsInstance) { - self::$_emptyEventArgsInstance = new EventArgs; - } - - return self::$_emptyEventArgsInstance; - } -} diff --git a/core/vendor/doctrine/common/lib/Doctrine/Common/EventManager.php b/core/vendor/doctrine/common/lib/Doctrine/Common/EventManager.php deleted file mode 100644 index 69eb17e..0000000 --- a/core/vendor/doctrine/common/lib/Doctrine/Common/EventManager.php +++ /dev/null @@ -1,154 +0,0 @@ -. - */ - -namespace Doctrine\Common; - -/** - * The EventManager is the central point of Doctrine's event listener system. - * Listeners are registered on the manager and events are dispatched through the - * manager. - * - * @link www.doctrine-project.org - * @since 2.0 - * @author Guilherme Blanco - * @author Jonathan Wage - * @author Roman Borschel - */ -class EventManager -{ - /** - * Map of registered listeners. - * => - * - * @var array - */ - private $_listeners = array(); - - /** - * Dispatches an event to all registered listeners. - * - * @param string $eventName The name of the event to dispatch. The name of the event is - * the name of the method that is invoked on listeners. - * @param EventArgs|null $eventArgs The event arguments to pass to the event handlers/listeners. - * If not supplied, the single empty EventArgs instance is used. - * - * @return boolean - */ - public function dispatchEvent($eventName, EventArgs $eventArgs = null) - { - if (isset($this->_listeners[$eventName])) { - $eventArgs = $eventArgs === null ? EventArgs::getEmptyInstance() : $eventArgs; - - foreach ($this->_listeners[$eventName] as $listener) { - $listener->$eventName($eventArgs); - } - } - } - - /** - * Gets the listeners of a specific event or all listeners. - * - * @param string|null $event The name of the event. - * - * @return array The event listeners for the specified event, or all event listeners. - */ - public function getListeners($event = null) - { - return $event ? $this->_listeners[$event] : $this->_listeners; - } - - /** - * Checks whether an event has any registered listeners. - * - * @param string $event - * - * @return boolean TRUE if the specified event has any listeners, FALSE otherwise. - */ - public function hasListeners($event) - { - return isset($this->_listeners[$event]) && $this->_listeners[$event]; - } - - /** - * Adds an event listener that listens on the specified events. - * - * @param string|array $events The event(s) to listen on. - * @param object $listener The listener object. - * - * @return void - */ - public function addEventListener($events, $listener) - { - // Picks the hash code related to that listener - $hash = spl_object_hash($listener); - - foreach ((array) $events as $event) { - // Overrides listener if a previous one was associated already - // Prevents duplicate listeners on same event (same instance only) - $this->_listeners[$event][$hash] = $listener; - } - } - - /** - * Removes an event listener from the specified events. - * - * @param string|array $events - * @param object $listener - * - * @return void - */ - public function removeEventListener($events, $listener) - { - // Picks the hash code related to that listener - $hash = spl_object_hash($listener); - - foreach ((array) $events as $event) { - // Check if actually have this listener associated - if (isset($this->_listeners[$event][$hash])) { - unset($this->_listeners[$event][$hash]); - } - } - } - - /** - * Adds an EventSubscriber. The subscriber is asked for all the events it is - * interested in and added as a listener for these events. - * - * @param \Doctrine\Common\EventSubscriber $subscriber The subscriber. - * - * @return void - */ - public function addEventSubscriber(EventSubscriber $subscriber) - { - $this->addEventListener($subscriber->getSubscribedEvents(), $subscriber); - } - - /** - * Removes an EventSubscriber. The subscriber is asked for all the events it is - * interested in and removed as a listener for these events. - * - * @param \Doctrine\Common\EventSubscriber $subscriber The subscriber. - * - * @return void - */ - public function removeEventSubscriber(EventSubscriber $subscriber) - { - $this->removeEventListener($subscriber->getSubscribedEvents(), $subscriber); - } -} diff --git a/core/vendor/doctrine/common/lib/Doctrine/Common/EventSubscriber.php b/core/vendor/doctrine/common/lib/Doctrine/Common/EventSubscriber.php deleted file mode 100644 index 55d0f7d..0000000 --- a/core/vendor/doctrine/common/lib/Doctrine/Common/EventSubscriber.php +++ /dev/null @@ -1,42 +0,0 @@ -. - */ - -namespace Doctrine\Common; - -/** - * An EventSubscriber knows himself what events he is interested in. - * If an EventSubscriber is added to an EventManager, the manager invokes - * {@link getSubscribedEvents} and registers the subscriber as a listener for all - * returned events. - * - * @link www.doctrine-project.org - * @since 2.0 - * @author Guilherme Blanco - * @author Jonathan Wage - * @author Roman Borschel - */ -interface EventSubscriber -{ - /** - * Returns an array of events this subscriber wants to listen to. - * - * @return array - */ - public function getSubscribedEvents(); -} diff --git a/core/vendor/doctrine/common/lib/Doctrine/Common/Lexer.php b/core/vendor/doctrine/common/lib/Doctrine/Common/Lexer.php deleted file mode 100644 index 0aa07f8..0000000 --- a/core/vendor/doctrine/common/lib/Doctrine/Common/Lexer.php +++ /dev/null @@ -1,37 +0,0 @@ -. - */ - -namespace Doctrine\Common; - -use Doctrine\Common\Lexer\AbstractLexer; - -/** - * Base class for writing simple lexers, i.e. for creating small DSLs. - * - * Lexer moved into its own Component Doctrine\Common\Lexer. This class - * only stays for being BC. - * - * @since 2.0 - * @author Guilherme Blanco - * @author Jonathan Wage - * @author Roman Borschel - */ -abstract class Lexer extends AbstractLexer -{ -} diff --git a/core/vendor/doctrine/common/lib/Doctrine/Common/NotifyPropertyChanged.php b/core/vendor/doctrine/common/lib/Doctrine/Common/NotifyPropertyChanged.php deleted file mode 100644 index e25e999..0000000 --- a/core/vendor/doctrine/common/lib/Doctrine/Common/NotifyPropertyChanged.php +++ /dev/null @@ -1,42 +0,0 @@ -. - */ - -namespace Doctrine\Common; - -/** - * Contract for classes that provide the service of notifying listeners of - * changes to their properties. - * - * @link www.doctrine-project.org - * @since 2.0 - * @author Guilherme Blanco - * @author Jonathan Wage - * @author Roman Borschel - */ -interface NotifyPropertyChanged -{ - /** - * Adds a listener that wants to be notified about property changes. - * - * @param PropertyChangedListener $listener - * - * @return void - */ - public function addPropertyChangedListener(PropertyChangedListener $listener); -} diff --git a/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/AbstractManagerRegistry.php b/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/AbstractManagerRegistry.php deleted file mode 100644 index 15b5aa3..0000000 --- a/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/AbstractManagerRegistry.php +++ /dev/null @@ -1,259 +0,0 @@ -. - */ - -namespace Doctrine\Common\Persistence; - -use Doctrine\Common\Persistence\ManagerRegistry; - -/** - * Abstract implementation of the ManagerRegistry contract. - * - * @link www.doctrine-project.org - * @since 2.2 - * @author Fabien Potencier - * @author Benjamin Eberlei - * @author Lukas Kahwe Smith - */ -abstract class AbstractManagerRegistry implements ManagerRegistry -{ - /** - * @var string - */ - private $name; - - /** - * @var array - */ - private $connections; - - /** - * @var array - */ - private $managers; - - /** - * @var string - */ - private $defaultConnection; - - /** - * @var string - */ - private $defaultManager; - - /** - * @var string - */ - private $proxyInterfaceName; - - /** - * Constructor. - * - * @param string $name - * @param array $connections - * @param array $managers - * @param string $defaultConnection - * @param string $defaultManager - * @param string $proxyInterfaceName - */ - public function __construct($name, array $connections, array $managers, $defaultConnection, $defaultManager, $proxyInterfaceName) - { - $this->name = $name; - $this->connections = $connections; - $this->managers = $managers; - $this->defaultConnection = $defaultConnection; - $this->defaultManager = $defaultManager; - $this->proxyInterfaceName = $proxyInterfaceName; - } - - /** - * Fetches/creates the given services. - * - * A service in this context is connection or a manager instance. - * - * @param string $name The name of the service. - * - * @return object The instance of the given service. - */ - abstract protected function getService($name); - - /** - * Resets the given services. - * - * A service in this context is connection or a manager instance. - * - * @param string $name The name of the service. - * - * @return void - */ - abstract protected function resetService($name); - - /** - * Gets the name of the registry. - * - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * {@inheritdoc} - */ - public function getConnection($name = null) - { - if (null === $name) { - $name = $this->defaultConnection; - } - - if (!isset($this->connections[$name])) { - throw new \InvalidArgumentException(sprintf('Doctrine %s Connection named "%s" does not exist.', $this->name, $name)); - } - - return $this->getService($this->connections[$name]); - } - - /** - * {@inheritdoc} - */ - public function getConnectionNames() - { - return $this->connections; - } - - /** - * {@inheritdoc} - */ - public function getConnections() - { - $connections = array(); - foreach ($this->connections as $name => $id) { - $connections[$name] = $this->getService($id); - } - - return $connections; - } - - /** - * {@inheritdoc} - */ - public function getDefaultConnectionName() - { - return $this->defaultConnection; - } - - /** - * {@inheritdoc} - */ - public function getDefaultManagerName() - { - return $this->defaultManager; - } - - /** - * {@inheritdoc} - * - * @throws \InvalidArgumentException - */ - public function getManager($name = null) - { - if (null === $name) { - $name = $this->defaultManager; - } - - if (!isset($this->managers[$name])) { - throw new \InvalidArgumentException(sprintf('Doctrine %s Manager named "%s" does not exist.', $this->name, $name)); - } - - return $this->getService($this->managers[$name]); - } - - /** - * {@inheritdoc} - */ - public function getManagerForClass($class) - { - // Check for namespace alias - if (strpos($class, ':') !== false) { - list($namespaceAlias, $simpleClassName) = explode(':', $class); - $class = $this->getAliasNamespace($namespaceAlias) . '\\' . $simpleClassName; - } - - $proxyClass = new \ReflectionClass($class); - if ($proxyClass->implementsInterface($this->proxyInterfaceName)) { - $class = $proxyClass->getParentClass()->getName(); - } - - foreach ($this->managers as $id) { - $manager = $this->getService($id); - - if (!$manager->getMetadataFactory()->isTransient($class)) { - return $manager; - } - } - } - - /** - * {@inheritdoc} - */ - public function getManagerNames() - { - return $this->managers; - } - - /** - * {@inheritdoc} - */ - public function getManagers() - { - $dms = array(); - foreach ($this->managers as $name => $id) { - $dms[$name] = $this->getService($id); - } - - return $dms; - } - - /** - * {@inheritdoc} - */ - public function getRepository($persistentObjectName, $persistentManagerName = null) - { - return $this->getManager($persistentManagerName)->getRepository($persistentObjectName); - } - - /** - * {@inheritdoc} - */ - public function resetManager($name = null) - { - if (null === $name) { - $name = $this->defaultManager; - } - - if (!isset($this->managers[$name])) { - throw new \InvalidArgumentException(sprintf('Doctrine %s Manager named "%s" does not exist.', $this->name, $name)); - } - - // force the creation of a new document manager - // if the current one is closed - $this->resetService($this->managers[$name]); - } -} diff --git a/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/ConnectionRegistry.php b/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/ConnectionRegistry.php deleted file mode 100644 index 7c25e98..0000000 --- a/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/ConnectionRegistry.php +++ /dev/null @@ -1,62 +0,0 @@ -. - */ - -namespace Doctrine\Common\Persistence; - -/** - * Contract covering connection for a Doctrine persistence layer ManagerRegistry class to implement. - * - * @link www.doctrine-project.org - * @since 2.2 - * @author Fabien Potencier - * @author Benjamin Eberlei - * @author Lukas Kahwe Smith - */ -interface ConnectionRegistry -{ - /** - * Gets the default connection name. - * - * @return string The default connection name. - */ - public function getDefaultConnectionName(); - - /** - * Gets the named connection. - * - * @param string $name The connection name (null for the default one). - * - * @return object - */ - public function getConnection($name = null); - - /** - * Gets an array of all registered connections. - * - * @return array An array of Connection instances. - */ - public function getConnections(); - - /** - * Gets all connection names. - * - * @return array An array of connection names. - */ - public function getConnectionNames(); -} diff --git a/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Event/LifecycleEventArgs.php b/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Event/LifecycleEventArgs.php deleted file mode 100644 index 52f41c0..0000000 --- a/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Event/LifecycleEventArgs.php +++ /dev/null @@ -1,89 +0,0 @@ -. - */ - -namespace Doctrine\Common\Persistence\Event; - -use Doctrine\Common\EventArgs; -use Doctrine\Common\Persistence\ObjectManager; - -/** - * Lifecycle Events are triggered by the UnitOfWork during lifecycle transitions - * of entities. - * - * @link www.doctrine-project.org - * @since 2.2 - * @author Roman Borschel - * @author Benjamin Eberlei - */ -class LifecycleEventArgs extends EventArgs -{ - /** - * @var ObjectManager - */ - private $objectManager; - - /** - * @var object - */ - private $object; - - /** - * Constructor. - * - * @param object $object - * @param ObjectManager $objectManager - */ - public function __construct($object, ObjectManager $objectManager) - { - $this->object = $object; - $this->objectManager = $objectManager; - } - - /** - * Retrieves the associated entity. - * - * @deprecated - * - * @return object - */ - public function getEntity() - { - return $this->object; - } - - /** - * Retrieves the associated object. - * - * @return object - */ - public function getObject() - { - return $this->object; - } - - /** - * Retrieves the associated ObjectManager. - * - * @return ObjectManager - */ - public function getObjectManager() - { - return $this->objectManager; - } -} diff --git a/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Event/LoadClassMetadataEventArgs.php b/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Event/LoadClassMetadataEventArgs.php deleted file mode 100644 index 07770bb..0000000 --- a/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Event/LoadClassMetadataEventArgs.php +++ /dev/null @@ -1,75 +0,0 @@ -. - */ - -namespace Doctrine\Common\Persistence\Event; - -use Doctrine\Common\EventArgs; -use Doctrine\Common\Persistence\ObjectManager; -use Doctrine\Common\Persistence\Mapping\ClassMetadata; - -/** - * Class that holds event arguments for a loadMetadata event. - * - * @author Jonathan H. Wage - * @since 2.2 - */ -class LoadClassMetadataEventArgs extends EventArgs -{ - /** - * @var ClassMetadata - */ - private $classMetadata; - - /** - * @var ObjectManager - */ - private $objectManager; - - /** - * Constructor. - * - * @param ClassMetadata $classMetadata - * @param ObjectManager $objectManager - */ - public function __construct(ClassMetadata $classMetadata, ObjectManager $objectManager) - { - $this->classMetadata = $classMetadata; - $this->objectManager = $objectManager; - } - - /** - * Retrieves the associated ClassMetadata. - * - * @return ClassMetadata - */ - public function getClassMetadata() - { - return $this->classMetadata; - } - - /** - * Retrieves the associated ObjectManager. - * - * @return ObjectManager - */ - public function getObjectManager() - { - return $this->objectManager; - } -} diff --git a/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Event/ManagerEventArgs.php b/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Event/ManagerEventArgs.php deleted file mode 100644 index 5527d4d..0000000 --- a/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Event/ManagerEventArgs.php +++ /dev/null @@ -1,59 +0,0 @@ -. - */ - -namespace Doctrine\Common\Persistence\Event; - -use Doctrine\Common\EventArgs; -use Doctrine\Common\Persistence\ObjectManager; - -/** - * Provides event arguments for the preFlush event. - * - * @link www.doctrine-project.org - * @since 2.2 - * @author Roman Borschel - * @author Benjamin Eberlei - */ -class ManagerEventArgs extends EventArgs -{ - /** - * @var ObjectManager - */ - private $objectManager; - - /** - * Constructor. - * - * @param ObjectManager $objectManager - */ - public function __construct(ObjectManager $objectManager) - { - $this->objectManager = $objectManager; - } - - /** - * Retrieves the associated ObjectManager. - * - * @return ObjectManager - */ - public function getObjectManager() - { - return $this->objectManager; - } -} diff --git a/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Event/OnClearEventArgs.php b/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Event/OnClearEventArgs.php deleted file mode 100644 index b78bad9..0000000 --- a/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Event/OnClearEventArgs.php +++ /dev/null @@ -1,86 +0,0 @@ -. - */ - -namespace Doctrine\Common\Persistence\Event; - -use Doctrine\Common\EventArgs; -use Doctrine\Common\Persistence\ObjectManager; - -/** - * Provides event arguments for the onClear event. - * - * @link www.doctrine-project.org - * @since 2.2 - * @author Roman Borschel - * @author Benjamin Eberlei - */ -class OnClearEventArgs extends EventArgs -{ - /** - * @var \Doctrine\Common\Persistence\ObjectManager - */ - private $objectManager; - - /** - * @var string|null - */ - private $entityClass; - - /** - * Constructor. - * - * @param ObjectManager $objectManager The object manager. - * @param string|null $entityClass The optional entity class. - */ - public function __construct($objectManager, $entityClass = null) - { - $this->objectManager = $objectManager; - $this->entityClass = $entityClass; - } - - /** - * Retrieves the associated ObjectManager. - * - * @return \Doctrine\Common\Persistence\ObjectManager - */ - public function getObjectManager() - { - return $this->objectManager; - } - - /** - * Returns the name of the entity class that is cleared, or null if all are cleared. - * - * @return string|null - */ - public function getEntityClass() - { - return $this->entityClass; - } - - /** - * Returns whether this event clears all entities. - * - * @return bool - */ - public function clearsAllEntities() - { - return ($this->entityClass === null); - } -} diff --git a/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Event/PreUpdateEventArgs.php b/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Event/PreUpdateEventArgs.php deleted file mode 100644 index d34de84..0000000 --- a/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Event/PreUpdateEventArgs.php +++ /dev/null @@ -1,138 +0,0 @@ -. - */ - -namespace Doctrine\Common\Persistence\Event; - -use Doctrine\Common\EventArgs; -use Doctrine\Common\Persistence\ObjectManager; - -/** - * Class that holds event arguments for a preUpdate event. - * - * @author Guilherme Blanco - * @author Roman Borschel - * @author Benjamin Eberlei - * @since 2.2 - */ -class PreUpdateEventArgs extends LifecycleEventArgs -{ - /** - * @var array - */ - private $entityChangeSet; - - /** - * Constructor. - * - * @param object $entity - * @param ObjectManager $objectManager - * @param array $changeSet - */ - public function __construct($entity, ObjectManager $objectManager, array &$changeSet) - { - parent::__construct($entity, $objectManager); - - $this->entityChangeSet = &$changeSet; - } - - /** - * Retrieves the entity changeset. - * - * @return array - */ - public function getEntityChangeSet() - { - return $this->entityChangeSet; - } - - /** - * Checks if field has a changeset. - * - * @param string $field - * - * @return boolean - */ - public function hasChangedField($field) - { - return isset($this->entityChangeSet[$field]); - } - - /** - * Gets the old value of the changeset of the changed field. - * - * @param string $field - * - * @return mixed - */ - public function getOldValue($field) - { - $this->assertValidField($field); - - return $this->entityChangeSet[$field][0]; - } - - /** - * Gets the new value of the changeset of the changed field. - * - * @param string $field - * - * @return mixed - */ - public function getNewValue($field) - { - $this->assertValidField($field); - - return $this->entityChangeSet[$field][1]; - } - - /** - * Sets the new value of this field. - * - * @param string $field - * @param mixed $value - * - * @return void - */ - public function setNewValue($field, $value) - { - $this->assertValidField($field); - - $this->entityChangeSet[$field][1] = $value; - } - - /** - * Asserts the field exists in changeset. - * - * @param string $field - * - * @return void - * - * @throws \InvalidArgumentException - */ - private function assertValidField($field) - { - if ( ! isset($this->entityChangeSet[$field])) { - throw new \InvalidArgumentException(sprintf( - 'Field "%s" is not a valid field of the entity "%s" in PreUpdateEventArgs.', - $field, - get_class($this->getEntity()) - )); - } - } -} diff --git a/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/ManagerRegistry.php b/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/ManagerRegistry.php deleted file mode 100644 index fce854b..0000000 --- a/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/ManagerRegistry.php +++ /dev/null @@ -1,111 +0,0 @@ -. - */ - -namespace Doctrine\Common\Persistence; - -/** - * Contract covering object managers for a Doctrine persistence layer ManagerRegistry class to implement. - * - * @link www.doctrine-project.org - * @since 2.2 - * @author Fabien Potencier - * @author Benjamin Eberlei - * @author Lukas Kahwe Smith - */ -interface ManagerRegistry extends ConnectionRegistry -{ - /** - * Gets the default object manager name. - * - * @return string The default object manager name. - */ - public function getDefaultManagerName(); - - /** - * Gets a named object manager. - * - * @param string $name The object manager name (null for the default one). - * - * @return \Doctrine\Common\Persistence\ObjectManager - */ - public function getManager($name = null); - - /** - * Gets an array of all registered object managers. - * - * @return \Doctrine\Common\Persistence\ObjectManager[] An array of ObjectManager instances - */ - public function getManagers(); - - /** - * Resets a named object manager. - * - * This method is useful when an object manager has been closed - * because of a rollbacked transaction AND when you think that - * it makes sense to get a new one to replace the closed one. - * - * Be warned that you will get a brand new object manager as - * the existing one is not useable anymore. This means that any - * other object with a dependency on this object manager will - * hold an obsolete reference. You can inject the registry instead - * to avoid this problem. - * - * @param string|null $name The object manager name (null for the default one). - * - * @return \Doctrine\Common\Persistence\ObjectManager - */ - public function resetManager($name = null); - - /** - * Resolves a registered namespace alias to the full namespace. - * - * This method looks for the alias in all registered object managers. - * - * @param string $alias The alias. - * - * @return string The full namespace. - */ - public function getAliasNamespace($alias); - - /** - * Gets all connection names. - * - * @return array An array of connection names. - */ - public function getManagerNames(); - - /** - * Gets the ObjectRepository for an persistent object. - * - * @param string $persistentObject The name of the persistent object. - * @param string $persistentManagerName The object manager name (null for the default one). - * - * @return \Doctrine\Common\Persistence\ObjectRepository - */ - public function getRepository($persistentObject, $persistentManagerName = null); - - /** - * Gets the object manager associated with a given class. - * - * @param string $class A persistent object class name. - * - * @return \Doctrine\Common\Persistence\ObjectManager|null - */ - public function getManagerForClass($class); -} diff --git a/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/AbstractClassMetadataFactory.php b/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/AbstractClassMetadataFactory.php deleted file mode 100644 index 01ad58f..0000000 --- a/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/AbstractClassMetadataFactory.php +++ /dev/null @@ -1,401 +0,0 @@ -. - */ - -namespace Doctrine\Common\Persistence\Mapping; - -use Doctrine\Common\Cache\Cache; -use Doctrine\Common\Util\ClassUtils; - -/** - * The ClassMetadataFactory is used to create ClassMetadata objects that contain all the - * metadata mapping informations of a class which describes how a class should be mapped - * to a relational database. - * - * This class was abstracted from the ORM ClassMetadataFactory. - * - * @since 2.2 - * @author Benjamin Eberlei - * @author Guilherme Blanco - * @author Jonathan Wage - * @author Roman Borschel - */ -abstract class AbstractClassMetadataFactory implements ClassMetadataFactory -{ - /** - * Salt used by specific Object Manager implementation. - * - * @var string - */ - protected $cacheSalt = '$CLASSMETADATA'; - - /** - * @var \Doctrine\Common\Cache\Cache|null - */ - private $cacheDriver; - - /** - * @var array - */ - private $loadedMetadata = array(); - - /** - * @var bool - */ - protected $initialized = false; - - /** - * @var ReflectionService|null - */ - private $reflectionService = null; - - /** - * Sets the cache driver used by the factory to cache ClassMetadata instances. - * - * @param \Doctrine\Common\Cache\Cache $cacheDriver - * - * @return void - */ - public function setCacheDriver(Cache $cacheDriver = null) - { - $this->cacheDriver = $cacheDriver; - } - - /** - * Gets the cache driver used by the factory to cache ClassMetadata instances. - * - * @return \Doctrine\Common\Cache\Cache|null - */ - public function getCacheDriver() - { - return $this->cacheDriver; - } - - /** - * Returns an array of all the loaded metadata currently in memory. - * - * @return array - */ - public function getLoadedMetadata() - { - return $this->loadedMetadata; - } - - /** - * Forces the factory to load the metadata of all classes known to the underlying - * mapping driver. - * - * @return array The ClassMetadata instances of all mapped classes. - */ - public function getAllMetadata() - { - if ( ! $this->initialized) { - $this->initialize(); - } - - $driver = $this->getDriver(); - $metadata = array(); - foreach ($driver->getAllClassNames() as $className) { - $metadata[] = $this->getMetadataFor($className); - } - - return $metadata; - } - - /** - * Lazy initialization of this stuff, especially the metadata driver, - * since these are not needed at all when a metadata cache is active. - * - * @return void - */ - abstract protected function initialize(); - - /** - * Gets the fully qualified class-name from the namespace alias. - * - * @param string $namespaceAlias - * @param string $simpleClassName - * - * @return string - */ - abstract protected function getFqcnFromAlias($namespaceAlias, $simpleClassName); - - /** - * Returns the mapping driver implementation. - * - * @return \Doctrine\Common\Persistence\Mapping\Driver\MappingDriver - */ - abstract protected function getDriver(); - - /** - * Wakes up reflection after ClassMetadata gets unserialized from cache. - * - * @param ClassMetadata $class - * @param ReflectionService $reflService - * - * @return void - */ - abstract protected function wakeupReflection(ClassMetadata $class, ReflectionService $reflService); - - /** - * Initializes Reflection after ClassMetadata was constructed. - * - * @param ClassMetadata $class - * @param ReflectionService $reflService - * - * @return void - */ - abstract protected function initializeReflection(ClassMetadata $class, ReflectionService $reflService); - - /** - * Checks whether the class metadata is an entity. - * - * This method should return false for mapped superclasses or embedded classes. - * - * @param ClassMetadata $class - * - * @return boolean - */ - abstract protected function isEntity(ClassMetadata $class); - - /** - * Gets the class metadata descriptor for a class. - * - * @param string $className The name of the class. - * - * @return \Doctrine\Common\Persistence\Mapping\ClassMetadata - */ - public function getMetadataFor($className) - { - if (isset($this->loadedMetadata[$className])) { - return $this->loadedMetadata[$className]; - } - - $realClassName = $className; - - // Check for namespace alias - if (strpos($className, ':') !== false) { - list($namespaceAlias, $simpleClassName) = explode(':', $className); - $realClassName = $this->getFqcnFromAlias($namespaceAlias, $simpleClassName); - } else { - $realClassName = ClassUtils::getRealClass($realClassName); - } - - if (isset($this->loadedMetadata[$realClassName])) { - // We do not have the alias name in the map, include it - $this->loadedMetadata[$className] = $this->loadedMetadata[$realClassName]; - - return $this->loadedMetadata[$realClassName]; - } - - if ($this->cacheDriver) { - if (($cached = $this->cacheDriver->fetch($realClassName . $this->cacheSalt)) !== false) { - $this->loadedMetadata[$realClassName] = $cached; - $this->wakeupReflection($cached, $this->getReflectionService()); - } else { - foreach ($this->loadMetadata($realClassName) as $loadedClassName) { - $this->cacheDriver->save( - $loadedClassName . $this->cacheSalt, $this->loadedMetadata[$loadedClassName], null - ); - } - } - } else { - $this->loadMetadata($realClassName); - } - - if ($className != $realClassName) { - // We do not have the alias name in the map, include it - $this->loadedMetadata[$className] = $this->loadedMetadata[$realClassName]; - } - - return $this->loadedMetadata[$className]; - } - - /** - * Checks whether the factory has the metadata for a class loaded already. - * - * @param string $className - * - * @return boolean TRUE if the metadata of the class in question is already loaded, FALSE otherwise. - */ - public function hasMetadataFor($className) - { - return isset($this->loadedMetadata[$className]); - } - - /** - * Sets the metadata descriptor for a specific class. - * - * NOTE: This is only useful in very special cases, like when generating proxy classes. - * - * @param string $className - * @param ClassMetadata $class - * - * @return void - */ - public function setMetadataFor($className, $class) - { - $this->loadedMetadata[$className] = $class; - } - - /** - * Gets an array of parent classes for the given entity class. - * - * @param string $name - * - * @return array - */ - protected function getParentClasses($name) - { - // Collect parent classes, ignoring transient (not-mapped) classes. - $parentClasses = array(); - foreach (array_reverse($this->getReflectionService()->getParentClasses($name)) as $parentClass) { - if ( ! $this->getDriver()->isTransient($parentClass)) { - $parentClasses[] = $parentClass; - } - } - return $parentClasses; - } - - /** - * Loads the metadata of the class in question and all it's ancestors whose metadata - * is still not loaded. - * - * Important: The class $name does not necesarily exist at this point here. - * Scenarios in a code-generation setup might have access to XML/YAML - * Mapping files without the actual PHP code existing here. That is why the - * {@see Doctrine\Common\Persistence\Mapping\ReflectionService} interface - * should be used for reflection. - * - * @param string $name The name of the class for which the metadata should get loaded. - * - * @return array - */ - protected function loadMetadata($name) - { - if ( ! $this->initialized) { - $this->initialize(); - } - - $loaded = array(); - - $parentClasses = $this->getParentClasses($name); - $parentClasses[] = $name; - - // Move down the hierarchy of parent classes, starting from the topmost class - $parent = null; - $rootEntityFound = false; - $visited = array(); - $reflService = $this->getReflectionService(); - foreach ($parentClasses as $className) { - if (isset($this->loadedMetadata[$className])) { - $parent = $this->loadedMetadata[$className]; - if ($this->isEntity($parent)) { - $rootEntityFound = true; - array_unshift($visited, $className); - } - continue; - } - - $class = $this->newClassMetadataInstance($className); - $this->initializeReflection($class, $reflService); - - $this->doLoadMetadata($class, $parent, $rootEntityFound, $visited); - - $this->loadedMetadata[$className] = $class; - - $parent = $class; - - if ($this->isEntity($class)) { - $rootEntityFound = true; - array_unshift($visited, $className); - } - - $this->wakeupReflection($class, $reflService); - - $loaded[] = $className; - } - - return $loaded; - } - - /** - * Actually loads the metadata from the underlying metadata. - * - * @param ClassMetadata $class - * @param ClassMetadata|null $parent - * @param bool $rootEntityFound - * @param array $nonSuperclassParents All parent class names - * that are not marked as mapped superclasses. - * - * @return void - */ - abstract protected function doLoadMetadata($class, $parent, $rootEntityFound, array $nonSuperclassParents); - - /** - * Creates a new ClassMetadata instance for the given class name. - * - * @param string $className - * - * @return ClassMetadata - */ - abstract protected function newClassMetadataInstance($className); - - /** - * {@inheritDoc} - */ - public function isTransient($class) - { - if ( ! $this->initialized) { - $this->initialize(); - } - - // Check for namespace alias - if (strpos($class, ':') !== false) { - list($namespaceAlias, $simpleClassName) = explode(':', $class); - $class = $this->getFqcnFromAlias($namespaceAlias, $simpleClassName); - } - - return $this->getDriver()->isTransient($class); - } - - /** - * Sets the reflectionService. - * - * @param ReflectionService $reflectionService - * - * @return void - */ - public function setReflectionService(ReflectionService $reflectionService) - { - $this->reflectionService = $reflectionService; - } - - /** - * Gets the reflection service associated with this metadata factory. - * - * @return ReflectionService - */ - public function getReflectionService() - { - if ($this->reflectionService === null) { - $this->reflectionService = new RuntimeReflectionService(); - } - return $this->reflectionService; - } -} diff --git a/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/ClassMetadata.php b/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/ClassMetadata.php deleted file mode 100644 index b8445f1..0000000 --- a/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/ClassMetadata.php +++ /dev/null @@ -1,174 +0,0 @@ -. - */ - -namespace Doctrine\Common\Persistence\Mapping; - -/** - * Contract for a Doctrine persistence layer ClassMetadata class to implement. - * - * @link www.doctrine-project.org - * @since 2.1 - * @author Benjamin Eberlei - * @author Jonathan Wage - */ -interface ClassMetadata -{ - /** - * Gets the fully-qualified class name of this persistent class. - * - * @return string - */ - public function getName(); - - /** - * Gets the mapped identifier field name. - * - * The returned structure is an array of the identifier field names. - * - * @return array - */ - public function getIdentifier(); - - /** - * Gets the ReflectionClass instance for this mapped class. - * - * @return \ReflectionClass - */ - public function getReflectionClass(); - - /** - * Checks if the given field name is a mapped identifier for this class. - * - * @param string $fieldName - * - * @return boolean - */ - public function isIdentifier($fieldName); - - /** - * Checks if the given field is a mapped property for this class. - * - * @param string $fieldName - * - * @return boolean - */ - public function hasField($fieldName); - - /** - * Checks if the given field is a mapped association for this class. - * - * @param string $fieldName - * - * @return boolean - */ - public function hasAssociation($fieldName); - - /** - * Checks if the given field is a mapped single valued association for this class. - * - * @param string $fieldName - * - * @return boolean - */ - public function isSingleValuedAssociation($fieldName); - - /** - * Checks if the given field is a mapped collection valued association for this class. - * - * @param string $fieldName - * - * @return boolean - */ - public function isCollectionValuedAssociation($fieldName); - - /** - * A numerically indexed list of field names of this persistent class. - * - * This array includes identifier fields if present on this class. - * - * @return array - */ - public function getFieldNames(); - - /** - * Returns an array of identifier field names numerically indexed. - * - * @return array - */ - public function getIdentifierFieldNames(); - - /** - * Returns a numerically indexed list of association names of this persistent class. - * - * This array includes identifier associations if present on this class. - * - * @return array - */ - public function getAssociationNames(); - - /** - * Returns a type name of this field. - * - * This type names can be implementation specific but should at least include the php types: - * integer, string, boolean, float/double, datetime. - * - * @param string $fieldName - * - * @return string - */ - public function getTypeOfField($fieldName); - - /** - * Returns the target class name of the given association. - * - * @param string $assocName - * - * @return string - */ - public function getAssociationTargetClass($assocName); - - /** - * Checks if the association is the inverse side of a bidirectional association. - * - * @param string $assocName - * - * @return boolean - */ - public function isAssociationInverseSide($assocName); - - /** - * Returns the target field of the owning side of the association. - * - * @param string $assocName - * - * @return string - */ - public function getAssociationMappedByTargetField($assocName); - - /** - * Returns the identifier of this object as an array with field name as key. - * - * Has to return an empty array if no identifier isset. - * - * @param object $object - * - * @return array - */ - public function getIdentifierValues($object); -} diff --git a/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/ClassMetadataFactory.php b/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/ClassMetadataFactory.php deleted file mode 100644 index 3d82881..0000000 --- a/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/ClassMetadataFactory.php +++ /dev/null @@ -1,76 +0,0 @@ -. - */ - -namespace Doctrine\Common\Persistence\Mapping; - -/** - * Contract for a Doctrine persistence layer ClassMetadata class to implement. - * - * @link www.doctrine-project.org - * @since 2.1 - * @author Benjamin Eberlei - * @author Jonathan Wage - */ -interface ClassMetadataFactory -{ - /** - * Forces the factory to load the metadata of all classes known to the underlying - * mapping driver. - * - * @return array The ClassMetadata instances of all mapped classes. - */ - public function getAllMetadata(); - - /** - * Gets the class metadata descriptor for a class. - * - * @param string $className The name of the class. - * - * @return ClassMetadata - */ - public function getMetadataFor($className); - - /** - * Checks whether the factory has the metadata for a class loaded already. - * - * @param string $className - * - * @return boolean TRUE if the metadata of the class in question is already loaded, FALSE otherwise. - */ - public function hasMetadataFor($className); - - /** - * Sets the metadata descriptor for a specific class. - * - * @param string $className - * - * @param ClassMetadata $class - */ - public function setMetadataFor($className, $class); - - /** - * Returns whether the class with the specified name should have its metadata loaded. - * This is only the case if it is either mapped directly or as a MappedSuperclass. - * - * @param string $className - * - * @return boolean - */ - public function isTransient($className); -} diff --git a/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/AnnotationDriver.php b/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/AnnotationDriver.php deleted file mode 100644 index 1737243..0000000 --- a/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/AnnotationDriver.php +++ /dev/null @@ -1,217 +0,0 @@ -. - */ - -namespace Doctrine\Common\Persistence\Mapping\Driver; - -use Doctrine\Common\Annotations\AnnotationReader; -use Doctrine\Common\Annotations\AnnotationRegistry; -use Doctrine\Common\Persistence\Mapping\MappingException; - -/** - * The AnnotationDriver reads the mapping metadata from docblock annotations. - * - * @since 2.2 - * @author Benjamin Eberlei - * @author Guilherme Blanco - * @author Jonathan H. Wage - * @author Roman Borschel - */ -abstract class AnnotationDriver implements MappingDriver -{ - /** - * The AnnotationReader. - * - * @var AnnotationReader - */ - protected $reader; - - /** - * The paths where to look for mapping files. - * - * @var array - */ - protected $paths = array(); - - /** - * The file extension of mapping documents. - * - * @var string - */ - protected $fileExtension = '.php'; - - /** - * Cache for AnnotationDriver#getAllClassNames(). - * - * @var array|null - */ - protected $classNames; - - /** - * Name of the entity annotations as keys. - * - * @var array - */ - protected $entityAnnotationClasses = array(); - - /** - * Initializes a new AnnotationDriver that uses the given AnnotationReader for reading - * docblock annotations. - * - * @param AnnotationReader $reader The AnnotationReader to use, duck-typed. - * @param string|array|null $paths One or multiple paths where mapping classes can be found. - */ - public function __construct($reader, $paths = null) - { - $this->reader = $reader; - if ($paths) { - $this->addPaths((array) $paths); - } - } - - /** - * Appends lookup paths to metadata driver. - * - * @param array $paths - * - * @return void - */ - public function addPaths(array $paths) - { - $this->paths = array_unique(array_merge($this->paths, $paths)); - } - - /** - * Retrieves the defined metadata lookup paths. - * - * @return array - */ - public function getPaths() - { - return $this->paths; - } - - /** - * Retrieves the current annotation reader. - * - * @return AnnotationReader - */ - public function getReader() - { - return $this->reader; - } - - /** - * Gets the file extension used to look for mapping files under. - * - * @return string - */ - public function getFileExtension() - { - return $this->fileExtension; - } - - /** - * Sets the file extension used to look for mapping files under. - * - * @param string $fileExtension The file extension to set. - * - * @return void - */ - public function setFileExtension($fileExtension) - { - $this->fileExtension = $fileExtension; - } - - /** - * Returns whether the class with the specified name is transient. Only non-transient - * classes, that is entities and mapped superclasses, should have their metadata loaded. - * - * A class is non-transient if it is annotated with an annotation - * from the {@see AnnotationDriver::entityAnnotationClasses}. - * - * @param string $className - * - * @return boolean - */ - public function isTransient($className) - { - $classAnnotations = $this->reader->getClassAnnotations(new \ReflectionClass($className)); - - foreach ($classAnnotations as $annot) { - if (isset($this->entityAnnotationClasses[get_class($annot)])) { - return false; - } - } - return true; - } - - /** - * {@inheritDoc} - */ - public function getAllClassNames() - { - if ($this->classNames !== null) { - return $this->classNames; - } - - if (!$this->paths) { - throw MappingException::pathRequired(); - } - - $classes = array(); - $includedFiles = array(); - - foreach ($this->paths as $path) { - if ( ! is_dir($path)) { - throw MappingException::fileMappingDriversRequireConfiguredDirectoryPath($path); - } - - $iterator = new \RegexIterator( - new \RecursiveIteratorIterator( - new \RecursiveDirectoryIterator($path, \FilesystemIterator::SKIP_DOTS), - \RecursiveIteratorIterator::LEAVES_ONLY - ), - '/^.+' . preg_quote($this->fileExtension) . '$/i', - \RecursiveRegexIterator::GET_MATCH - ); - - foreach ($iterator as $file) { - $sourceFile = realpath($file[0]); - - require_once $sourceFile; - - $includedFiles[] = $sourceFile; - } - } - - $declared = get_declared_classes(); - - foreach ($declared as $className) { - $rc = new \ReflectionClass($className); - $sourceFile = $rc->getFileName(); - if (in_array($sourceFile, $includedFiles) && ! $this->isTransient($className)) { - $classes[] = $className; - } - } - - $this->classNames = $classes; - - return $classes; - } -} diff --git a/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/DefaultFileLocator.php b/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/DefaultFileLocator.php deleted file mode 100644 index 6a9e276..0000000 --- a/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/DefaultFileLocator.php +++ /dev/null @@ -1,173 +0,0 @@ -. - */ - -namespace Doctrine\Common\Persistence\Mapping\Driver; - -use Doctrine\Common\Persistence\Mapping\MappingException; - -/** - * Locates the file that contains the metadata information for a given class name. - * - * This behavior is independent of the actual content of the file. It just detects - * the file which is responsible for the given class name. - * - * @author Benjamin Eberlei - * @author Johannes M. Schmitt - */ -class DefaultFileLocator implements FileLocator -{ - /** - * The paths where to look for mapping files. - * - * @var array - */ - protected $paths = array(); - - /** - * The file extension of mapping documents. - * - * @var string|null - */ - protected $fileExtension; - - /** - * Initializes a new FileDriver that looks in the given path(s) for mapping - * documents and operates in the specified operating mode. - * - * @param string|array $paths One or multiple paths where mapping documents can be found. - * @param string|null $fileExtension The file extension of mapping documents. - */ - public function __construct($paths, $fileExtension = null) - { - $this->addPaths((array) $paths); - $this->fileExtension = $fileExtension; - } - - /** - * Appends lookup paths to metadata driver. - * - * @param array $paths - * - * @return void - */ - public function addPaths(array $paths) - { - $this->paths = array_unique(array_merge($this->paths, $paths)); - } - - /** - * Retrieves the defined metadata lookup paths. - * - * @return array - */ - public function getPaths() - { - return $this->paths; - } - - /** - * Gets the file extension used to look for mapping files under. - * - * @return string|null - */ - public function getFileExtension() - { - return $this->fileExtension; - } - - /** - * Sets the file extension used to look for mapping files under. - * - * @param string|null $fileExtension The file extension to set. - * - * @return void - */ - public function setFileExtension($fileExtension) - { - $this->fileExtension = $fileExtension; - } - - /** - * {@inheritDoc} - */ - public function findMappingFile($className) - { - $fileName = str_replace('\\', '.', $className) . $this->fileExtension; - - // Check whether file exists - foreach ($this->paths as $path) { - if (is_file($path . DIRECTORY_SEPARATOR . $fileName)) { - return $path . DIRECTORY_SEPARATOR . $fileName; - } - } - - throw MappingException::mappingFileNotFound($className, $fileName); - } - - /** - * {@inheritDoc} - */ - public function getAllClassNames($globalBasename) - { - $classes = array(); - - if ($this->paths) { - foreach ($this->paths as $path) { - if ( ! is_dir($path)) { - throw MappingException::fileMappingDriversRequireConfiguredDirectoryPath($path); - } - - $iterator = new \RecursiveIteratorIterator( - new \RecursiveDirectoryIterator($path), - \RecursiveIteratorIterator::LEAVES_ONLY - ); - - foreach ($iterator as $file) { - $fileName = $file->getBasename($this->fileExtension); - - if ($fileName == $file->getBasename() || $fileName == $globalBasename) { - continue; - } - - // NOTE: All files found here means classes are not transient! - $classes[] = str_replace('.', '\\', $fileName); - } - } - } - - return $classes; - } - - /** - * {@inheritDoc} - */ - public function fileExists($className) - { - $fileName = str_replace('\\', '.', $className) . $this->fileExtension; - - // Check whether file exists - foreach ((array) $this->paths as $path) { - if (is_file($path . DIRECTORY_SEPARATOR . $fileName)) { - return true; - } - } - - return false; - } -} diff --git a/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/FileDriver.php b/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/FileDriver.php deleted file mode 100644 index ccc64fa..0000000 --- a/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/FileDriver.php +++ /dev/null @@ -1,211 +0,0 @@ -. - */ - -namespace Doctrine\Common\Persistence\Mapping\Driver; - -use Doctrine\Common\Persistence\Mapping\MappingException; - -/** - * Base driver for file-based metadata drivers. - * - * A file driver operates in a mode where it loads the mapping files of individual - * classes on demand. This requires the user to adhere to the convention of 1 mapping - * file per class and the file names of the mapping files must correspond to the full - * class name, including namespace, with the namespace delimiters '\', replaced by dots '.'. - * - * @link www.doctrine-project.org - * @since 2.2 - * @author Benjamin Eberlei - * @author Guilherme Blanco - * @author Jonathan H. Wage - * @author Roman Borschel - */ -abstract class FileDriver implements MappingDriver -{ - /** - * @var FileLocator - */ - protected $locator; - - /** - * @var array|null - */ - protected $classCache; - - /** - * @var string|null - */ - protected $globalBasename; - - /** - * Initializes a new FileDriver that looks in the given path(s) for mapping - * documents and operates in the specified operating mode. - * - * @param string|array|FileLocator $locator A FileLocator or one/multiple paths - * where mapping documents can be found. - * @param string|null $fileExtension - */ - public function __construct($locator, $fileExtension = null) - { - if ($locator instanceof FileLocator) { - $this->locator = $locator; - } else { - $this->locator = new DefaultFileLocator((array)$locator, $fileExtension); - } - } - - /** - * Sets the global basename. - * - * @param string $file - * - * @return void - */ - public function setGlobalBasename($file) - { - $this->globalBasename = $file; - } - - /** - * Retrieves the global basename. - * - * @return string|null - */ - public function getGlobalBasename() - { - return $this->globalBasename; - } - - /** - * Gets the element of schema meta data for the class from the mapping file. - * This will lazily load the mapping file if it is not loaded yet. - * - * @param string $className - * - * @return array The element of schema meta data. - * - * @throws MappingException - */ - public function getElement($className) - { - if ($this->classCache === null) { - $this->initialize(); - } - - if (isset($this->classCache[$className])) { - return $this->classCache[$className]; - } - - $result = $this->loadMappingFile($this->locator->findMappingFile($className)); - if (!isset($result[$className])) { - throw MappingException::invalidMappingFile($className, str_replace('\\', '.', $className) . $this->locator->getFileExtension()); - } - - return $result[$className]; - } - - /** - * {@inheritDoc} - */ - public function isTransient($className) - { - if ($this->classCache === null) { - $this->initialize(); - } - - if (isset($this->classCache[$className])) { - return false; - } - - return !$this->locator->fileExists($className); - } - - /** - * {@inheritDoc} - */ - public function getAllClassNames() - { - if ($this->classCache === null) { - $this->initialize(); - } - - $classNames = (array)$this->locator->getAllClassNames($this->globalBasename); - if ($this->classCache) { - $classNames = array_merge(array_keys($this->classCache), $classNames); - } - return $classNames; - } - - /** - * Loads a mapping file with the given name and returns a map - * from class/entity names to their corresponding file driver elements. - * - * @param string $file The mapping file to load. - * - * @return array - */ - abstract protected function loadMappingFile($file); - - /** - * Initializes the class cache from all the global files. - * - * Using this feature adds a substantial performance hit to file drivers as - * more metadata has to be loaded into memory than might actually be - * necessary. This may not be relevant to scenarios where caching of - * metadata is in place, however hits very hard in scenarios where no - * caching is used. - * - * @return void - */ - protected function initialize() - { - $this->classCache = array(); - if (null !== $this->globalBasename) { - foreach ($this->locator->getPaths() as $path) { - $file = $path.'/'.$this->globalBasename.$this->locator->getFileExtension(); - if (is_file($file)) { - $this->classCache = array_merge( - $this->classCache, - $this->loadMappingFile($file) - ); - } - } - } - } - - /** - * Retrieves the locator used to discover mapping files by className. - * - * @return FileLocator - */ - public function getLocator() - { - return $this->locator; - } - - /** - * Sets the locator used to discover mapping files by className. - * - * @param FileLocator $locator - */ - public function setLocator(FileLocator $locator) - { - $this->locator = $locator; - } -} diff --git a/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/FileLocator.php b/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/FileLocator.php deleted file mode 100644 index f622856..0000000 --- a/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/FileLocator.php +++ /dev/null @@ -1,73 +0,0 @@ -. - */ - -namespace Doctrine\Common\Persistence\Mapping\Driver; - -/** - * Locates the file that contains the metadata information for a given class name. - * - * This behavior is independent of the actual content of the file. It just detects - * the file which is responsible for the given class name. - * - * @author Benjamin Eberlei - * @author Johannes M. Schmitt - */ -interface FileLocator -{ - /** - * Locates mapping file for the given class name. - * - * @param string $className - * - * @return string - */ - public function findMappingFile($className); - - /** - * Gets all class names that are found with this file locator. - * - * @param string $globalBasename Passed to allow excluding the basename. - * - * @return array - */ - public function getAllClassNames($globalBasename); - - /** - * Checks if a file can be found for this class name. - * - * @param string $className - * - * @return bool - */ - public function fileExists($className); - - /** - * Gets all the paths that this file locator looks for mapping files. - * - * @return array - */ - public function getPaths(); - - /** - * Gets the file extension that mapping files are suffixed with. - * - * @return string - */ - public function getFileExtension(); -} diff --git a/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/MappingDriver.php b/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/MappingDriver.php deleted file mode 100644 index b5d7ec0..0000000 --- a/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/MappingDriver.php +++ /dev/null @@ -1,58 +0,0 @@ -. - */ - -namespace Doctrine\Common\Persistence\Mapping\Driver; - -use Doctrine\Common\Persistence\Mapping\ClassMetadata; - -/** - * Contract for metadata drivers. - * - * @since 2.2 - * @author Jonathan H. Wage - */ -interface MappingDriver -{ - /** - * Loads the metadata for the specified class into the provided container. - * - * @param string $className - * @param ClassMetadata $metadata - * - * @return void - */ - public function loadMetadataForClass($className, ClassMetadata $metadata); - - /** - * Gets the names of all mapped classes known to this driver. - * - * @return array The names of all mapped classes known to this driver. - */ - public function getAllClassNames(); - - /** - * Returns whether the class with the specified name should have its metadata loaded. - * This is only the case if it is either mapped as an Entity or a MappedSuperclass. - * - * @param string $className - * - * @return boolean - */ - public function isTransient($className); -} diff --git a/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/MappingDriverChain.php b/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/MappingDriverChain.php deleted file mode 100644 index 5fa9a7a..0000000 --- a/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/MappingDriverChain.php +++ /dev/null @@ -1,166 +0,0 @@ -. - */ - -namespace Doctrine\Common\Persistence\Mapping\Driver; - -use Doctrine\Common\Persistence\Mapping\Driver\MappingDriver; -use Doctrine\Common\Persistence\Mapping\ClassMetadata; -use Doctrine\Common\Persistence\Mapping\MappingException; - -/** - * The DriverChain allows you to add multiple other mapping drivers for - * certain namespaces. - * - * @since 2.2 - * @author Benjamin Eberlei - * @author Guilherme Blanco - * @author Jonathan H. Wage - * @author Roman Borschel - */ -class MappingDriverChain implements MappingDriver -{ - /** - * The default driver. - * - * @var MappingDriver|null - */ - private $defaultDriver = null; - - /** - * @var array - */ - private $drivers = array(); - - /** - * Gets the default driver. - * - * @return MappingDriver|null - */ - public function getDefaultDriver() - { - return $this->defaultDriver; - } - - /** - * Set the default driver. - * - * @param MappingDriver $driver - * - * @return void - */ - public function setDefaultDriver(MappingDriver $driver) - { - $this->defaultDriver = $driver; - } - - /** - * Adds a nested driver. - * - * @param MappingDriver $nestedDriver - * @param string $namespace - * - * @return void - */ - public function addDriver(MappingDriver $nestedDriver, $namespace) - { - $this->drivers[$namespace] = $nestedDriver; - } - - /** - * Gets the array of nested drivers. - * - * @return array $drivers - */ - public function getDrivers() - { - return $this->drivers; - } - - /** - * {@inheritDoc} - */ - public function loadMetadataForClass($className, ClassMetadata $metadata) - { - /* @var $driver MappingDriver */ - foreach ($this->drivers as $namespace => $driver) { - if (strpos($className, $namespace) === 0) { - $driver->loadMetadataForClass($className, $metadata); - return; - } - } - - if (null !== $this->defaultDriver) { - $this->defaultDriver->loadMetadataForClass($className, $metadata); - return; - } - - throw MappingException::classNotFoundInNamespaces($className, array_keys($this->drivers)); - } - - /** - * {@inheritDoc} - */ - public function getAllClassNames() - { - $classNames = array(); - $driverClasses = array(); - - /* @var $driver MappingDriver */ - foreach ($this->drivers AS $namespace => $driver) { - $oid = spl_object_hash($driver); - - if (!isset($driverClasses[$oid])) { - $driverClasses[$oid] = $driver->getAllClassNames(); - } - - foreach ($driverClasses[$oid] AS $className) { - if (strpos($className, $namespace) === 0) { - $classNames[$className] = true; - } - } - } - - if (null !== $this->defaultDriver) { - foreach ($this->defaultDriver->getAllClassNames() as $className) { - $classNames[$className] = true; - } - } - - return array_keys($classNames); - } - - /** - * {@inheritDoc} - */ - public function isTransient($className) - { - /* @var $driver MappingDriver */ - foreach ($this->drivers AS $namespace => $driver) { - if (strpos($className, $namespace) === 0) { - return $driver->isTransient($className); - } - } - - if ($this->defaultDriver !== null) { - return $this->defaultDriver->isTransient($className); - } - - return true; - } -} diff --git a/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/PHPDriver.php b/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/PHPDriver.php deleted file mode 100644 index 31651f3..0000000 --- a/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/PHPDriver.php +++ /dev/null @@ -1,70 +0,0 @@ -. - */ - -namespace Doctrine\Common\Persistence\Mapping\Driver; - -use Doctrine\Common\Persistence\Mapping\ClassMetadata; - -/** - * The PHPDriver includes php files which just populate ClassMetadataInfo - * instances with plain PHP code. - * - * @link www.doctrine-project.org - * @since 2.0 - * @author Benjamin Eberlei - * @author Guilherme Blanco - * @author Jonathan H. Wage - * @author Roman Borschel - */ -class PHPDriver extends FileDriver -{ - /** - * {@inheritDoc} - */ - protected $metadata; - - /** - * {@inheritDoc} - */ - public function __construct($locator, $fileExtension = null) - { - $fileExtension = ".php"; - parent::__construct($locator, $fileExtension); - } - - /** - * {@inheritDoc} - */ - public function loadMetadataForClass($className, ClassMetadata $metadata) - { - $this->metadata = $metadata; - $this->loadMappingFile($this->locator->findMappingFile($className)); - } - - /** - * {@inheritDoc} - */ - protected function loadMappingFile($file) - { - $metadata = $this->metadata; - include $file; - - return array($metadata->getName() => $metadata); - } -} diff --git a/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/StaticPHPDriver.php b/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/StaticPHPDriver.php deleted file mode 100644 index df8f477..0000000 --- a/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/StaticPHPDriver.php +++ /dev/null @@ -1,142 +0,0 @@ -. - */ - -namespace Doctrine\Common\Persistence\Mapping\Driver; - -use Doctrine\Common\Persistence\Mapping\ClassMetadata; -use Doctrine\Common\Persistence\Mapping\MappingException; - -/** - * The StaticPHPDriver calls a static loadMetadata() method on your entity - * classes where you can manually populate the ClassMetadata instance. - * - * @link www.doctrine-project.org - * @since 2.2 - * @author Benjamin Eberlei - * @author Guilherme Blanco - * @author Jonathan H. Wage - * @author Roman Borschel - */ -class StaticPHPDriver implements MappingDriver -{ - /** - * Paths of entity directories. - * - * @var array - */ - private $paths = array(); - - /** - * Map of all class names. - * - * @var array - */ - private $classNames; - - /** - * Constructor. - * - * @param array|string $paths - */ - public function __construct($paths) - { - $this->addPaths((array) $paths); - } - - /** - * Adds paths. - * - * @param array $paths - * - * @return void - */ - public function addPaths(array $paths) - { - $this->paths = array_unique(array_merge($this->paths, $paths)); - } - - /** - * {@inheritdoc} - */ - public function loadMetadataForClass($className, ClassMetadata $metadata) - { - $className::loadMetadata($metadata); - } - - /** - * {@inheritDoc} - * @todo Same code exists in AnnotationDriver, should we re-use it somehow or not worry about it? - */ - public function getAllClassNames() - { - if ($this->classNames !== null) { - return $this->classNames; - } - - if (!$this->paths) { - throw MappingException::pathRequired(); - } - - $classes = array(); - $includedFiles = array(); - - foreach ($this->paths as $path) { - if (!is_dir($path)) { - throw MappingException::fileMappingDriversRequireConfiguredDirectoryPath($path); - } - - $iterator = new \RecursiveIteratorIterator( - new \RecursiveDirectoryIterator($path), - \RecursiveIteratorIterator::LEAVES_ONLY - ); - - foreach ($iterator as $file) { - if ($file->getBasename('.php') == $file->getBasename()) { - continue; - } - - $sourceFile = realpath($file->getPathName()); - require_once $sourceFile; - $includedFiles[] = $sourceFile; - } - } - - $declared = get_declared_classes(); - - foreach ($declared as $className) { - $rc = new \ReflectionClass($className); - $sourceFile = $rc->getFileName(); - if (in_array($sourceFile, $includedFiles) && !$this->isTransient($className)) { - $classes[] = $className; - } - } - - $this->classNames = $classes; - - return $classes; - } - - /** - * {@inheritdoc} - */ - public function isTransient($className) - { - return ! method_exists($className, 'loadMetadata'); - } -} diff --git a/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/SymfonyFileLocator.php b/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/SymfonyFileLocator.php deleted file mode 100644 index dd4d741..0000000 --- a/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/SymfonyFileLocator.php +++ /dev/null @@ -1,217 +0,0 @@ -. - */ - -namespace Doctrine\Common\Persistence\Mapping\Driver; - -use Doctrine\Common\Persistence\Mapping\MappingException; - -/** - * The Symfony File Locator makes a simplifying assumptions compared - * to the DefaultFileLocator. By assuming paths only contain entities of a certain - * namespace the mapping files consists of the short classname only. - * - * @author Fabien Potencier - * @author Benjamin Eberlei - * @license MIT - */ -class SymfonyFileLocator implements FileLocator -{ - /** - * The paths where to look for mapping files. - * - * @var array - */ - protected $paths = array(); - - /** - * A map of mapping directory path to namespace prefix used to expand class shortnames. - * - * @var array - */ - protected $prefixes = array(); - - /** - * File extension that is searched for. - * - * @var string|null - */ - protected $fileExtension; - - /** - * Constructor. - * - * @param array $prefixes - * @param string|null $fileExtension - */ - public function __construct(array $prefixes, $fileExtension = null) - { - $this->addNamespacePrefixes($prefixes); - $this->fileExtension = $fileExtension; - } - - /** - * Adds Namespace Prefixes. - * - * @param array $prefixes - * - * @return void - */ - public function addNamespacePrefixes(array $prefixes) - { - $this->prefixes = array_merge($this->prefixes, $prefixes); - $this->paths = array_merge($this->paths, array_keys($prefixes)); - } - - /** - * Gets Namespace Prefixes. - * - * @return array - */ - public function getNamespacePrefixes() - { - return $this->prefixes; - } - - /** - * {@inheritDoc} - */ - public function getPaths() - { - return $this->paths; - } - - /** - * {@inheritDoc} - */ - public function getFileExtension() - { - return $this->fileExtension; - } - - /** - * Sets the file extension used to look for mapping files under. - * - * @param string $fileExtension The file extension to set. - * - * @return void - */ - public function setFileExtension($fileExtension) - { - $this->fileExtension = $fileExtension; - } - - /** - * {@inheritDoc} - */ - public function fileExists($className) - { - $defaultFileName = str_replace('\\', '.', $className).$this->fileExtension; - foreach ($this->paths as $path) { - if (!isset($this->prefixes[$path])) { - // global namespace class - if (is_file($path.DIRECTORY_SEPARATOR.$defaultFileName)) { - return true; - } - - continue; - } - - $prefix = $this->prefixes[$path]; - - if (0 !== strpos($className, $prefix.'\\')) { - continue; - } - - $filename = $path.'/'.strtr(substr($className, strlen($prefix)+1), '\\', '.').$this->fileExtension; - return is_file($filename); - } - - return false; - } - - /** - * {@inheritDoc} - */ - public function getAllClassNames($globalBasename = null) - { - $classes = array(); - - if ($this->paths) { - foreach ((array) $this->paths as $path) { - if (!is_dir($path)) { - throw MappingException::fileMappingDriversRequireConfiguredDirectoryPath($path); - } - - $iterator = new \RecursiveIteratorIterator( - new \RecursiveDirectoryIterator($path), - \RecursiveIteratorIterator::LEAVES_ONLY - ); - - foreach ($iterator as $file) { - $fileName = $file->getBasename($this->fileExtension); - - if ($fileName == $file->getBasename() || $fileName == $globalBasename) { - continue; - } - - // NOTE: All files found here means classes are not transient! - if (isset($this->prefixes[$path])) { - $classes[] = $this->prefixes[$path].'\\'.str_replace('.', '\\', $fileName); - } else { - $classes[] = str_replace('.', '\\', $fileName); - } - } - } - } - - return $classes; - } - - /** - * {@inheritDoc} - */ - public function findMappingFile($className) - { - $defaultFileName = str_replace('\\', '.', $className).$this->fileExtension; - foreach ($this->paths as $path) { - if (!isset($this->prefixes[$path])) { - if (is_file($path.DIRECTORY_SEPARATOR.$defaultFileName)) { - return $path.DIRECTORY_SEPARATOR.$defaultFileName; - } - - continue; - } - - $prefix = $this->prefixes[$path]; - - if (0 !== strpos($className, $prefix.'\\')) { - continue; - } - - $filename = $path.'/'.strtr(substr($className, strlen($prefix)+1), '\\', '.').$this->fileExtension; - if (is_file($filename)) { - return $filename; - } - - throw MappingException::mappingFileNotFound($className, $filename); - } - - throw MappingException::mappingFileNotFound($className, substr($className, strrpos($className, '\\') + 1).$this->fileExtension); - } -} diff --git a/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/MappingException.php b/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/MappingException.php deleted file mode 100644 index c8c32b2..0000000 --- a/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/MappingException.php +++ /dev/null @@ -1,98 +0,0 @@ -. - */ - -namespace Doctrine\Common\Persistence\Mapping; - -/** - * A MappingException indicates that something is wrong with the mapping setup. - * - * @since 2.2 - */ -class MappingException extends \Exception -{ - /** - * @param string $className - * @param array $namespaces - * - * @return MappingException - */ - public static function classNotFoundInNamespaces($className, $namespaces) - { - return new self("The class '" . $className . "' was not found in the ". - "chain configured namespaces " . implode(", ", $namespaces)); - } - - /** - * @return MappingException - */ - public static function pathRequired() - { - return new self("Specifying the paths to your entities is required ". - "in the AnnotationDriver to retrieve all class names."); - } - - /** - * @param string|null $path - * - * @return MappingException - */ - public static function fileMappingDriversRequireConfiguredDirectoryPath($path = null) - { - if ( ! empty($path)) { - $path = '[' . $path . ']'; - } - - return new self( - 'File mapping drivers must have a valid directory path, ' . - 'however the given path ' . $path . ' seems to be incorrect!' - ); - } - - /** - * @param string $entityName - * @param string $fileName - * - * @return MappingException - */ - public static function mappingFileNotFound($entityName, $fileName) - { - return new self("No mapping file found named '$fileName' for class '$entityName'."); - } - - /** - * @param string $entityName - * @param string $fileName - * - * @return MappingException - */ - public static function invalidMappingFile($entityName, $fileName) - { - return new self("Invalid mapping file '$fileName' for class '$entityName'."); - } - - /** - * @param string $className - * - * @return \Doctrine\Common\Persistence\Mapping\MappingException - */ - public static function nonExistingClass($className) - { - return new self("Class '$className' does not exist"); - } -} diff --git a/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/ReflectionService.php b/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/ReflectionService.php deleted file mode 100644 index 0088ed5..0000000 --- a/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/ReflectionService.php +++ /dev/null @@ -1,87 +0,0 @@ -. - */ - -namespace Doctrine\Common\Persistence\Mapping; - -/** - * Very simple reflection service abstraction. - * - * This is required inside metadata layers that may require either - * static or runtime reflection. - * - * @author Benjamin Eberlei - */ -interface ReflectionService -{ - /** - * Returns an array of the parent classes (not interfaces) for the given class. - * - * @param string $class - * - * @throws \Doctrine\Common\Persistence\Mapping\MappingException - * - * @return array - */ - public function getParentClasses($class); - - /** - * Returns the shortname of a class. - * - * @param string $class - * - * @return string - */ - public function getClassShortName($class); - - /** - * @param string $class - * - * @return string - */ - public function getClassNamespace($class); - - /** - * Returns a reflection class instance or null. - * - * @param string $class - * - * @return \ReflectionClass|null - */ - public function getClass($class); - - /** - * Returns an accessible property (setAccessible(true)) or null. - * - * @param string $class - * @param string $property - * - * @return \ReflectionProperty|null - */ - public function getAccessibleProperty($class, $property); - - /** - * Checks if the class have a public method with the given name. - * - * @param mixed $class - * @param mixed $method - * - * @return bool - */ - public function hasPublicMethod($class, $method); -} diff --git a/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/RuntimeReflectionService.php b/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/RuntimeReflectionService.php deleted file mode 100644 index c5a37a8..0000000 --- a/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/RuntimeReflectionService.php +++ /dev/null @@ -1,97 +0,0 @@ -. - */ - -namespace Doctrine\Common\Persistence\Mapping; - -use ReflectionClass; -use ReflectionProperty; -use Doctrine\Common\Reflection\RuntimePublicReflectionProperty; -use Doctrine\Common\Persistence\Mapping\MappingException; - -/** - * PHP Runtime Reflection Service. - * - * @author Benjamin Eberlei - */ -class RuntimeReflectionService implements ReflectionService -{ - /** - * {@inheritDoc} - */ - public function getParentClasses($class) - { - if ( ! class_exists($class)) { - throw MappingException::nonExistingClass($class); - } - - return class_parents($class); - } - - /** - * {@inheritDoc} - */ - public function getClassShortName($class) - { - $reflectionClass = new ReflectionClass($class); - - return $reflectionClass->getShortName(); - } - - /** - * {@inheritDoc} - */ - public function getClassNamespace($class) - { - $reflectionClass = new ReflectionClass($class); - - return $reflectionClass->getNamespaceName(); - } - - /** - * {@inheritDoc} - */ - public function getClass($class) - { - return new ReflectionClass($class); - } - - /** - * {@inheritDoc} - */ - public function getAccessibleProperty($class, $property) - { - $reflectionProperty = new ReflectionProperty($class, $property); - - if ($reflectionProperty->isPublic()) { - $reflectionProperty = new RuntimePublicReflectionProperty($class, $property); - } - - $reflectionProperty->setAccessible(true); - - return $reflectionProperty; - } - - /** - * {@inheritDoc} - */ - public function hasPublicMethod($class, $method) - { - return method_exists($class, $method) && is_callable(array($class, $method)); - } -} diff --git a/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/StaticReflectionService.php b/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/StaticReflectionService.php deleted file mode 100644 index f903097..0000000 --- a/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/StaticReflectionService.php +++ /dev/null @@ -1,83 +0,0 @@ -. - */ - -namespace Doctrine\Common\Persistence\Mapping; - -/** - * PHP Runtime Reflection Service. - * - * @author Benjamin Eberlei - */ -class StaticReflectionService implements ReflectionService -{ - /** - * {@inheritDoc} - */ - public function getParentClasses($class) - { - return array(); - } - - /** - * {@inheritDoc} - */ - public function getClassShortName($className) - { - if (strpos($className, '\\') !== false) { - $className = substr($className, strrpos($className, "\\")+1); - } - return $className; - } - - /** - * {@inheritDoc} - */ - public function getClassNamespace($className) - { - $namespace = ''; - if (strpos($className, '\\') !== false) { - $namespace = strrev(substr( strrev($className), strpos(strrev($className), '\\')+1 )); - } - return $namespace; - } - - /** - * {@inheritDoc} - */ - public function getClass($class) - { - return null; - } - - /** - * {@inheritDoc} - */ - public function getAccessibleProperty($class, $property) - { - return null; - } - - /** - * {@inheritDoc} - */ - public function hasPublicMethod($class, $method) - { - return method_exists($class, $method) && is_callable(array($class, $method)); - } -} diff --git a/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/ObjectManager.php b/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/ObjectManager.php deleted file mode 100644 index 02208c9..0000000 --- a/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/ObjectManager.php +++ /dev/null @@ -1,169 +0,0 @@ -. - */ - -namespace Doctrine\Common\Persistence; - -/** - * Contract for a Doctrine persistence layer ObjectManager class to implement. - * - * @link www.doctrine-project.org - * @since 2.1 - * @author Benjamin Eberlei - * @author Jonathan Wage - */ -interface ObjectManager -{ - /** - * Finds an object by its identifier. - * - * This is just a convenient shortcut for getRepository($className)->find($id). - * - * @param string $className The class name of the object to find. - * @param mixed $id The identity of the object to find. - * - * @return object The found object. - */ - public function find($className, $id); - - /** - * Tells the ObjectManager to make an instance managed and persistent. - * - * The object will be entered into the database as a result of the flush operation. - * - * NOTE: The persist operation always considers objects that are not yet known to - * this ObjectManager as NEW. Do not pass detached objects to the persist operation. - * - * @param object $object The instance to make managed and persistent. - * - * @return void - */ - public function persist($object); - - /** - * Removes an object instance. - * - * A removed object will be removed from the database as a result of the flush operation. - * - * @param object $object The object instance to remove. - * - * @return void - */ - public function remove($object); - - /** - * Merges the state of a detached object into the persistence context - * of this ObjectManager and returns the managed copy of the object. - * The object passed to merge will not become associated/managed with this ObjectManager. - * - * @param object $object - * - * @return object - */ - public function merge($object); - - /** - * Clears the ObjectManager. All objects that are currently managed - * by this ObjectManager become detached. - * - * @param string|null $objectName if given, only objects of this type will get detached. - * - * @return void - */ - public function clear($objectName = null); - - /** - * Detaches an object from the ObjectManager, causing a managed object to - * become detached. Unflushed changes made to the object if any - * (including removal of the object), will not be synchronized to the database. - * Objects which previously referenced the detached object will continue to - * reference it. - * - * @param object $object The object to detach. - * - * @return void - */ - public function detach($object); - - /** - * Refreshes the persistent state of an object from the database, - * overriding any local changes that have not yet been persisted. - * - * @param object $object The object to refresh. - * - * @return void - */ - public function refresh($object); - - /** - * Flushes all changes to objects that have been queued up to now to the database. - * This effectively synchronizes the in-memory state of managed objects with the - * database. - * - * @return void - */ - public function flush(); - - /** - * Gets the repository for a class. - * - * @param string $className - * - * @return \Doctrine\Common\Persistence\ObjectRepository - */ - public function getRepository($className); - - /** - * Returns the ClassMetadata descriptor for a class. - * - * The class name must be the fully-qualified class name without a leading backslash - * (as it is returned by get_class($obj)). - * - * @param string $className - * - * @return \Doctrine\Common\Persistence\Mapping\ClassMetadata - */ - public function getClassMetadata($className); - - /** - * Gets the metadata factory used to gather the metadata of classes. - * - * @return \Doctrine\Common\Persistence\Mapping\ClassMetadataFactory - */ - public function getMetadataFactory(); - - /** - * Helper method to initialize a lazy loading proxy or persistent collection. - * - * This method is a no-op for other objects. - * - * @param object $obj - * - * @return void - */ - public function initializeObject($obj); - - /** - * Checks if the object is part of the current UnitOfWork and therefore managed. - * - * @param object $object - * - * @return bool - */ - public function contains($object); -} diff --git a/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/ObjectManagerAware.php b/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/ObjectManagerAware.php deleted file mode 100644 index 9bc248a..0000000 --- a/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/ObjectManagerAware.php +++ /dev/null @@ -1,51 +0,0 @@ -. - */ - -namespace Doctrine\Common\Persistence; - -use Doctrine\Common\Persistence\Mapping\ClassMetadata; - -/** - * Makes a Persistent Objects aware of its own object-manager. - * - * Using this interface the managing object manager and class metadata instances - * are injected into the persistent object after construction. This allows - * you to implement ActiveRecord functionality on top of the persistence-ignorance - * that Doctrine propagates. - * - * Word of Warning: This is a very powerful hook to change how you can work with your domain models. - * Using this hook will break the Single Responsibility Principle inside your Domain Objects - * and increase the coupling of database and objects. - * - * Every ObjectManager has to implement this functionality itself. - * - * @author Benjamin Eberlei - */ -interface ObjectManagerAware -{ - /** - * Injects responsible ObjectManager and the ClassMetadata into this persistent object. - * - * @param ObjectManager $objectManager - * @param ClassMetadata $classMetadata - * - * @return void - */ - public function injectObjectManager(ObjectManager $objectManager, ClassMetadata $classMetadata); -} diff --git a/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/ObjectManagerDecorator.php b/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/ObjectManagerDecorator.php deleted file mode 100644 index 8946475..0000000 --- a/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/ObjectManagerDecorator.php +++ /dev/null @@ -1,140 +0,0 @@ -. - */ - -namespace Doctrine\Common\Persistence; - -/** - * Base class to simplify ObjectManager decorators - * - * @license http://opensource.org/licenses/MIT MIT - * @link www.doctrine-project.org - * @since 2.4 - * @author Lars Strojny - */ -abstract class ObjectManagerDecorator implements ObjectManager -{ - /** - * @var ObjectManager - */ - protected $wrapped; - - /** - * {@inheritdoc} - */ - public function find($className, $id) - { - return $this->wrapped->find($className, $id); - } - - /** - * {@inheritdoc} - */ - public function persist($object) - { - return $this->wrapped->persist($object); - } - - /** - * {@inheritdoc} - */ - public function remove($object) - { - return $this->wrapped->remove($object); - } - - /** - * {@inheritdoc} - */ - public function merge($object) - { - return $this->wrapped->merge($object); - } - - /** - * {@inheritdoc} - */ - public function clear($objectName = null) - { - return $this->wrapped->clear($objectName); - } - - /** - * {@inheritdoc} - */ - public function detach($object) - { - return $this->wrapped->detach($object); - } - - /** - * {@inheritdoc} - */ - public function refresh($object) - { - return $this->wrapped->refresh($object); - } - - /** - * {@inheritdoc} - */ - public function flush() - { - return $this->wrapped->flush(); - } - - /** - * {@inheritdoc} - */ - public function getRepository($className) - { - return $this->wrapped->getRepository($className); - } - - /** - * {@inheritdoc} - */ - public function getClassMetadata($className) - { - return $this->wrapped->getClassMetadata($className); - } - - /** - * {@inheritdoc} - */ - public function getMetadataFactory() - { - return $this->wrapped->getMetadataFactory(); - } - - /** - * {@inheritdoc} - */ - public function initializeObject($obj) - { - return $this->wrapped->initializeObject($obj); - } - - /** - * {@inheritdoc} - */ - public function contains($object) - { - return $this->wrapped->contains($object); - } -} diff --git a/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/ObjectRepository.php b/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/ObjectRepository.php deleted file mode 100644 index f607219..0000000 --- a/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/ObjectRepository.php +++ /dev/null @@ -1,81 +0,0 @@ -. - */ - -namespace Doctrine\Common\Persistence; - -/** - * Contract for a Doctrine persistence layer ObjectRepository class to implement. - * - * @link www.doctrine-project.org - * @since 2.1 - * @author Benjamin Eberlei - * @author Jonathan Wage - */ -interface ObjectRepository -{ - /** - * Finds an object by its primary key / identifier. - * - * @param mixed $id The identifier. - * - * @return object The object. - */ - public function find($id); - - /** - * Finds all objects in the repository. - * - * @return array The objects. - */ - public function findAll(); - - /** - * Finds objects by a set of criteria. - * - * Optionally sorting and limiting details can be passed. An implementation may throw - * an UnexpectedValueException if certain values of the sorting or limiting details are - * not supported. - * - * @param array $criteria - * @param array|null $orderBy - * @param int|null $limit - * @param int|null $offset - * - * @return array The objects. - * - * @throws \UnexpectedValueException - */ - public function findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null); - - /** - * Finds a single object by a set of criteria. - * - * @param array $criteria The criteria. - * - * @return object The object. - */ - public function findOneBy(array $criteria); - - /** - * Returns the class name of the object managed by the repository. - * - * @return string - */ - public function getClassName(); -} diff --git a/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/PersistentObject.php b/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/PersistentObject.php deleted file mode 100644 index 08c6942..0000000 --- a/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/PersistentObject.php +++ /dev/null @@ -1,254 +0,0 @@ -. - */ - -namespace Doctrine\Common\Persistence; - -use Doctrine\Common\Persistence\Mapping\ClassMetadata; -use Doctrine\Common\Collections\ArrayCollection; -use Doctrine\Common\Collections\Collection; - -/** - * PersistentObject base class that implements getter/setter methods for all mapped fields and associations - * by overriding __call. - * - * This class is a forward compatible implementation of the PersistentObject trait. - * - * Limitations: - * - * 1. All persistent objects have to be associated with a single ObjectManager, multiple - * ObjectManagers are not supported. You can set the ObjectManager with `PersistentObject#setObjectManager()`. - * 2. Setters and getters only work if a ClassMetadata instance was injected into the PersistentObject. - * This is either done on `postLoad` of an object or by accessing the global object manager. - * 3. There are no hooks for setters/getters. Just implement the method yourself instead of relying on __call(). - * 4. Slower than handcoded implementations: An average of 7 method calls per access to a field and 11 for an association. - * 5. Only the inverse side associations get autoset on the owning side as well. Setting objects on the owning side - * will not set the inverse side associations. - * - * @example - * - * PersistentObject::setObjectManager($em); - * - * class Foo extends PersistentObject - * { - * private $id; - * } - * - * $foo = new Foo(); - * $foo->getId(); // method exists through __call - * - * @author Benjamin Eberlei - */ -abstract class PersistentObject implements ObjectManagerAware -{ - /** - * @var ObjectManager|null - */ - private static $objectManager = null; - - /** - * @var ClassMetadata|null - */ - private $cm = null; - - /** - * Sets the object manager responsible for all persistent object base classes. - * - * @param ObjectManager|null $objectManager - * - * @return void - */ - static public function setObjectManager(ObjectManager $objectManager = null) - { - self::$objectManager = $objectManager; - } - - /** - * @return ObjectManager|null - */ - static public function getObjectManager() - { - return self::$objectManager; - } - - /** - * Injects the Doctrine Object Manager. - * - * @param ObjectManager $objectManager - * @param ClassMetadata $classMetadata - * - * @return void - * - * @throws \RuntimeException - */ - public function injectObjectManager(ObjectManager $objectManager, ClassMetadata $classMetadata) - { - if ($objectManager !== self::$objectManager) { - throw new \RuntimeException("Trying to use PersistentObject with different ObjectManager instances. " . - "Was PersistentObject::setObjectManager() called?"); - } - - $this->cm = $classMetadata; - } - - /** - * Sets a persistent fields value. - * - * @param string $field - * @param array $args - * - * @return void - * - * @throws \BadMethodCallException When no persistent field exists by that name. - * @throws \InvalidArgumentException When the wrong target object type is passed to an association. - */ - private function set($field, $args) - { - $this->initializeDoctrine(); - - if ($this->cm->hasField($field) && !$this->cm->isIdentifier($field)) { - $this->$field = $args[0]; - } else if ($this->cm->hasAssociation($field) && $this->cm->isSingleValuedAssociation($field)) { - $targetClass = $this->cm->getAssociationTargetClass($field); - if (!($args[0] instanceof $targetClass) && $args[0] !== null) { - throw new \InvalidArgumentException("Expected persistent object of type '".$targetClass."'"); - } - $this->$field = $args[0]; - $this->completeOwningSide($field, $targetClass, $args[0]); - } else { - throw new \BadMethodCallException("no field with name '".$field."' exists on '".$this->cm->getName()."'"); - } - } - - /** - * Gets a persistent field value. - * - * @param string $field - * - * @return mixed - * - * @throws \BadMethodCallException When no persistent field exists by that name. - */ - private function get($field) - { - $this->initializeDoctrine(); - - if ( $this->cm->hasField($field) || $this->cm->hasAssociation($field) ) { - return $this->$field; - } else { - throw new \BadMethodCallException("no field with name '".$field."' exists on '".$this->cm->getName()."'"); - } - } - - /** - * If this is an inverse side association, completes the owning side. - * - * @param string $field - * @param ClassMetadata $targetClass - * @param object $targetObject - * - * @return void - */ - private function completeOwningSide($field, $targetClass, $targetObject) - { - // add this object on the owning side as well, for obvious infinite recursion - // reasons this is only done when called on the inverse side. - if ($this->cm->isAssociationInverseSide($field)) { - $mappedByField = $this->cm->getAssociationMappedByTargetField($field); - $targetMetadata = self::$objectManager->getClassMetadata($targetClass); - - $setter = ($targetMetadata->isCollectionValuedAssociation($mappedByField) ? "add" : "set").$mappedByField; - $targetObject->$setter($this); - } - } - - /** - * Adds an object to a collection. - * - * @param string $field - * @param array $args - * - * @return void - * - * @throws \BadMethodCallException - * @throws \InvalidArgumentException - */ - private function add($field, $args) - { - $this->initializeDoctrine(); - - if ($this->cm->hasAssociation($field) && $this->cm->isCollectionValuedAssociation($field)) { - $targetClass = $this->cm->getAssociationTargetClass($field); - if (!($args[0] instanceof $targetClass)) { - throw new \InvalidArgumentException("Expected persistent object of type '".$targetClass."'"); - } - if (!($this->$field instanceof Collection)) { - $this->$field = new ArrayCollection($this->$field ?: array()); - } - $this->$field->add($args[0]); - $this->completeOwningSide($field, $targetClass, $args[0]); - } else { - throw new \BadMethodCallException("There is no method add".$field."() on ".$this->cm->getName()); - } - } - - /** - * Initializes Doctrine Metadata for this class. - * - * @return void - * - * @throws \RuntimeException - */ - private function initializeDoctrine() - { - if ($this->cm !== null) { - return; - } - - if (!self::$objectManager) { - throw new \RuntimeException("No runtime object manager set. Call PersistentObject#setObjectManager()."); - } - - $this->cm = self::$objectManager->getClassMetadata(get_class($this)); - } - - /** - * Magic methods. - * - * @param string $method - * @param array $args - * - * @return mixed - * - * @throws \BadMethodCallException - */ - public function __call($method, $args) - { - $command = substr($method, 0, 3); - $field = lcfirst(substr($method, 3)); - if ($command == "set") { - $this->set($field, $args); - } else if ($command == "get") { - return $this->get($field); - } else if ($command == "add") { - $this->add($field, $args); - } else { - throw new \BadMethodCallException("There is no method ".$method." on ".$this->cm->getName()); - } - } -} diff --git a/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Proxy.php b/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Proxy.php deleted file mode 100644 index 3369eb9..0000000 --- a/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Proxy.php +++ /dev/null @@ -1,59 +0,0 @@ -. - */ - -namespace Doctrine\Common\Persistence; - -/** - * Interface for proxy classes. - * - * @author Roman Borschel - * @since 2.2 - */ -interface Proxy -{ - /** - * Marker for Proxy class names. - * - * @var string - */ - const MARKER = '__CG__'; - - /** - * Length of the proxy marker. - * - * @var integer - */ - const MARKER_LENGTH = 6; - - /** - * Initializes this proxy if its not yet initialized. - * - * Acts as a no-op if already initialized. - * - * @return void - */ - public function __load(); - - /** - * Returns whether this proxy is initialized or not. - * - * @return bool - */ - public function __isInitialized(); -} diff --git a/core/vendor/doctrine/common/lib/Doctrine/Common/PropertyChangedListener.php b/core/vendor/doctrine/common/lib/Doctrine/Common/PropertyChangedListener.php deleted file mode 100644 index 1a59cd4..0000000 --- a/core/vendor/doctrine/common/lib/Doctrine/Common/PropertyChangedListener.php +++ /dev/null @@ -1,45 +0,0 @@ -. - */ - -namespace Doctrine\Common; - -/** - * Contract for classes that are potential listeners of a NotifyPropertyChanged - * implementor. - * - * @link www.doctrine-project.org - * @since 2.0 - * @author Guilherme Blanco - * @author Jonathan Wage - * @author Roman Borschel - */ -interface PropertyChangedListener -{ - /** - * Notifies the listener of a property change. - * - * @param object $sender The object on which the property changed. - * @param string $propertyName The name of the property that changed. - * @param mixed $oldValue The old value of the property that changed. - * @param mixed $newValue The new value of the property that changed. - * - * @return void - */ - function propertyChanged($sender, $propertyName, $oldValue, $newValue); -} diff --git a/core/vendor/doctrine/common/lib/Doctrine/Common/Proxy/AbstractProxyFactory.php b/core/vendor/doctrine/common/lib/Doctrine/Common/Proxy/AbstractProxyFactory.php deleted file mode 100644 index dd1ae1b..0000000 --- a/core/vendor/doctrine/common/lib/Doctrine/Common/Proxy/AbstractProxyFactory.php +++ /dev/null @@ -1,244 +0,0 @@ -. - */ - -namespace Doctrine\Common\Proxy; - -use Doctrine\Common\Persistence\Mapping\ClassMetadataFactory; -use Doctrine\Common\Proxy\Exception\InvalidArgumentException; -use Doctrine\Common\Proxy\Exception\OutOfBoundsException; -use Doctrine\Common\Util\ClassUtils; -use Doctrine\Common\Persistence\Mapping\ClassMetadata; - -/** - * Abstract factory for proxy objects. - * - * @author Benjamin Eberlei - */ -abstract class AbstractProxyFactory -{ - /** - * Never autogenerate a proxy and rely that it was generated by some - * process before deployment. - * - * @var integer - */ - const AUTOGENERATE_NEVER = 0; - - /** - * Always generates a new proxy in every request. - * - * This is only sane during development. - * - * @var integer - */ - const AUTOGENERATE_ALWAYS = 1; - - /** - * Autogenerate the proxy class when the proxy file does not exist. - * - * This strategy causes a file exists call whenever any proxy is used the - * first time in a request. - * - * @var integer - */ - const AUTOGENERATE_FILE_NOT_EXISTS = 2; - - /** - * Generate the proxy classes using eval(). - * - * This strategy is only sane for development, and even then it gives me - * the creeps a little. - * - * @var integer - */ - const AUTOGENERATE_EVAL = 3; - - /** - * @var \Doctrine\Common\Persistence\Mapping\ClassMetadataFactory - */ - private $metadataFactory; - - /** - * @var \Doctrine\Common\Proxy\ProxyGenerator the proxy generator responsible for creating the proxy classes/files. - */ - private $proxyGenerator; - - /** - * @var bool Whether to automatically (re)generate proxy classes. - */ - private $autoGenerate; - - /** - * @var \Doctrine\Common\Proxy\ProxyDefinition[] - */ - private $definitions = array(); - - /** - * @param \Doctrine\Common\Proxy\ProxyGenerator $proxyGenerator - * @param \Doctrine\Common\Persistence\Mapping\ClassMetadataFactory $metadataFactory - * @param bool|int $autoGenerate - */ - public function __construct(ProxyGenerator $proxyGenerator, ClassMetadataFactory $metadataFactory, $autoGenerate) - { - $this->proxyGenerator = $proxyGenerator; - $this->metadataFactory = $metadataFactory; - $this->autoGenerate = (int)$autoGenerate; - } - - /** - * Gets a reference proxy instance for the entity of the given type and identified by - * the given identifier. - * - * @param string $className - * @param array $identifier - * - * @return \Doctrine\Common\Proxy\Proxy - * - * @throws \Doctrine\Common\Proxy\Exception\OutOfBoundsException - */ - public function getProxy($className, array $identifier) - { - $definition = isset($this->definitions[$className]) - ? $this->definitions[$className] - : $this->getProxyDefinition($className); - $fqcn = $definition->proxyClassName; - $proxy = new $fqcn($definition->initializer, $definition->cloner); - - foreach ($definition->identifierFields as $idField) { - if (! isset($identifier[$idField])) { - throw OutOfBoundsException::missingPrimaryKeyValue($className, $idField); - } - - $definition->reflectionFields[$idField]->setValue($proxy, $identifier[$idField]); - } - - return $proxy; - } - - /** - * Generates proxy classes for all given classes. - * - * @param \Doctrine\Common\Persistence\Mapping\ClassMetadata[] $classes The classes (ClassMetadata instances) - * for which to generate proxies. - * @param string $proxyDir The target directory of the proxy classes. If not specified, the - * directory configured on the Configuration of the EntityManager used - * by this factory is used. - * @return int Number of generated proxies. - */ - public function generateProxyClasses(array $classes, $proxyDir = null) - { - $generated = 0; - - foreach ($classes as $class) { - if ($this->skipClass($class)) { - continue; - } - - $proxyFileName = $this->proxyGenerator->getProxyFileName($class->getName(), $proxyDir); - - $this->proxyGenerator->generateProxyClass($class, $proxyFileName); - - $generated += 1; - } - - return $generated; - } - - /** - * Reset initialization/cloning logic for an un-initialized proxy - * - * @param \Doctrine\Common\Proxy\Proxy $proxy - * - * @return \Doctrine\Common\Proxy\Proxy - * - * @throws \Doctrine\Common\Proxy\Exception\InvalidArgumentException - */ - public function resetUninitializedProxy(Proxy $proxy) - { - if ($proxy->__isInitialized()) { - throw InvalidArgumentException::unitializedProxyExpected($proxy); - } - - $className = ClassUtils::getClass($proxy); - $definition = isset($this->definitions[$className]) - ? $this->definitions[$className] - : $this->getProxyDefinition($className); - - $proxy->__setInitializer($definition->initializer); - $proxy->__setCloner($definition->cloner); - - return $proxy; - } - - /** - * Get a proxy definition for the given class name. - * - * @return ProxyDefinition - */ - private function getProxyDefinition($className) - { - $classMetadata = $this->metadataFactory->getMetadataFor($className); - $className = $classMetadata->getName(); // aliases and case sensitivity - - $this->definitions[$className] = $this->createProxyDefinition($className); - $proxyClassName = $this->definitions[$className]->proxyClassName; - - if ( ! class_exists($proxyClassName, false)) { - $fileName = $this->proxyGenerator->getProxyFileName($className); - - switch ($this->autoGenerate) { - case self::AUTOGENERATE_NEVER: - require $fileName; - break; - - case self::AUTOGENERATE_FILE_NOT_EXISTS: - if ( ! file_exists($fileName)) { - $this->proxyGenerator->generateProxyClass($classMetadata, $fileName); - } - require $fileName; - break; - - case self::AUTOGENERATE_ALWAYS: - $this->proxyGenerator->generateProxyClass($classMetadata, $fileName); - require $fileName; - break; - - case self::AUTOGENERATE_EVAL: - $this->proxyGenerator->generateProxyClass($classMetadata, false); - break; - } - } - - return $this->definitions[$className]; - } - - /** - * Determine if this class should be skipped during proxy generation. - * - * @param \Doctrine\Common\Persistence\Mapping\ClassMetadata $metadata - * @return bool - */ - abstract protected function skipClass(ClassMetadata $metadata); - - /** - * @return ProxyDefinition - */ - abstract protected function createProxyDefinition($className); -} - diff --git a/core/vendor/doctrine/common/lib/Doctrine/Common/Proxy/Autoloader.php b/core/vendor/doctrine/common/lib/Doctrine/Common/Proxy/Autoloader.php deleted file mode 100644 index 0aa930b..0000000 --- a/core/vendor/doctrine/common/lib/Doctrine/Common/Proxy/Autoloader.php +++ /dev/null @@ -1,92 +0,0 @@ -. - */ - -namespace Doctrine\Common\Proxy; - -use Doctrine\Common\Proxy\Exception\InvalidArgumentException; - -/** - * Special Autoloader for Proxy classes, which are not PSR-0 compliant. - * - * @author Benjamin Eberlei - */ -class Autoloader -{ - /** - * Resolves proxy class name to a filename based on the following pattern. - * - * 1. Remove Proxy namespace from class name. - * 2. Remove namespace separators from remaining class name. - * 3. Return PHP filename from proxy-dir with the result from 2. - * - * @param string $proxyDir - * @param string $proxyNamespace - * @param string $className - * - * @return string - * - * @throws InvalidArgumentException - */ - public static function resolveFile($proxyDir, $proxyNamespace, $className) - { - if (0 !== strpos($className, $proxyNamespace)) { - throw InvalidArgumentException::notProxyClass($className, $proxyNamespace); - } - - $className = str_replace('\\', '', substr($className, strlen($proxyNamespace) + 1)); - - return $proxyDir . DIRECTORY_SEPARATOR . $className . '.php'; - } - - /** - * Registers and returns autoloader callback for the given proxy dir and namespace. - * - * @param string $proxyDir - * @param string $proxyNamespace - * @param callable|null $notFoundCallback Invoked when the proxy file is not found. - * - * @return \Closure - * - * @throws InvalidArgumentException - */ - public static function register($proxyDir, $proxyNamespace, $notFoundCallback = null) - { - $proxyNamespace = ltrim($proxyNamespace, '\\'); - - if ( ! (null === $notFoundCallback || is_callable($notFoundCallback))) { - throw InvalidArgumentException::invalidClassNotFoundCallback($notFoundCallback); - } - - $autoloader = function ($className) use ($proxyDir, $proxyNamespace, $notFoundCallback) { - if (0 === strpos($className, $proxyNamespace)) { - $file = Autoloader::resolveFile($proxyDir, $proxyNamespace, $className); - - if ($notFoundCallback && ! file_exists($file)) { - call_user_func($notFoundCallback, $proxyDir, $proxyNamespace, $className); - } - - require $file; - } - }; - - spl_autoload_register($autoloader); - - return $autoloader; - } -} diff --git a/core/vendor/doctrine/common/lib/Doctrine/Common/Proxy/Exception/InvalidArgumentException.php b/core/vendor/doctrine/common/lib/Doctrine/Common/Proxy/Exception/InvalidArgumentException.php deleted file mode 100644 index 24a2194..0000000 --- a/core/vendor/doctrine/common/lib/Doctrine/Common/Proxy/Exception/InvalidArgumentException.php +++ /dev/null @@ -1,90 +0,0 @@ -. - */ - -namespace Doctrine\Common\Proxy\Exception; - -use Doctrine\Common\Persistence\Proxy; -use InvalidArgumentException as BaseInvalidArgumentException; - -/** - * Proxy Invalid Argument Exception. - * - * @link www.doctrine-project.org - * @since 2.4 - * @author Marco Pivetta - */ -class InvalidArgumentException extends BaseInvalidArgumentException implements ProxyException -{ - /** - * @return self - */ - public static function proxyDirectoryRequired() - { - return new self('You must configure a proxy directory. See docs for details'); - } - - /** - * @param string $className - * @param string $proxyNamespace - * - * @return self - */ - public static function notProxyClass($className, $proxyNamespace) - { - return new self(sprintf('The class "%s" is not part of the proxy namespace "%s"', $className, $proxyNamespace)); - } - - /** - * @param string $name - * - * @return self - */ - public static function invalidPlaceholder($name) - { - return new self(sprintf('Provided placeholder for "%s" must be either a string or a valid callable', $name)); - } - - /** - * @return self - */ - public static function proxyNamespaceRequired() - { - return new self('You must configure a proxy namespace'); - } - - /** - * @return self - */ - public static function unitializedProxyExpected(Proxy $proxy) - { - return new self(sprintf('Provided proxy of type "%s" must not be initialized.', get_class($proxy))); - } - - /** - * @param mixed $callback - * - * @return self - */ - public static function invalidClassNotFoundCallback($callback) - { - $type = is_object($callback) ? get_class($callback) : gettype($callback); - - return new self(sprintf('Invalid \$notFoundCallback given: must be a callable, "%s" given', $type)); - } -} diff --git a/core/vendor/doctrine/common/lib/Doctrine/Common/Proxy/Exception/OutOfBoundsException.php b/core/vendor/doctrine/common/lib/Doctrine/Common/Proxy/Exception/OutOfBoundsException.php deleted file mode 100644 index 348cfcb..0000000 --- a/core/vendor/doctrine/common/lib/Doctrine/Common/Proxy/Exception/OutOfBoundsException.php +++ /dev/null @@ -1,43 +0,0 @@ -. - */ - -namespace Doctrine\Common\Proxy\Exception; - -use Doctrine\Common\Persistence\Proxy; -use OutOfBoundsException as BaseOutOfBoundsException; - -/** - * Proxy Invalid Argument Exception. - * - * @link www.doctrine-project.org - * @author Fredrik Wendel - */ -class OutOfBoundsException extends BaseOutOfBoundsException implements ProxyException -{ - /** - * @param string $className - * @param string $idField - * - * @return self - */ - public static function missingPrimaryKeyValue($className, $idField) - { - return new self(sprintf("Missing value for primary key %s on %s", $idField, $className)); - } -} diff --git a/core/vendor/doctrine/common/lib/Doctrine/Common/Proxy/Exception/ProxyException.php b/core/vendor/doctrine/common/lib/Doctrine/Common/Proxy/Exception/ProxyException.php deleted file mode 100644 index 0d1ff14..0000000 --- a/core/vendor/doctrine/common/lib/Doctrine/Common/Proxy/Exception/ProxyException.php +++ /dev/null @@ -1,31 +0,0 @@ -. - */ - -namespace Doctrine\Common\Proxy\Exception; - -/** - * Base exception interface for proxy exceptions. - * - * @link www.doctrine-project.org - * @since 2.4 - * @author Marco Pivetta - */ -interface ProxyException -{ -} diff --git a/core/vendor/doctrine/common/lib/Doctrine/Common/Proxy/Exception/UnexpectedValueException.php b/core/vendor/doctrine/common/lib/Doctrine/Common/Proxy/Exception/UnexpectedValueException.php deleted file mode 100644 index 2b8e638..0000000 --- a/core/vendor/doctrine/common/lib/Doctrine/Common/Proxy/Exception/UnexpectedValueException.php +++ /dev/null @@ -1,62 +0,0 @@ -. - */ - -namespace Doctrine\Common\Proxy\Exception; - -use UnexpectedValueException as BaseUnexpectedValueException; - -/** - * Proxy Unexpected Value Exception. - * - * @link www.doctrine-project.org - * @since 2.4 - * @author Marco Pivetta - */ -class UnexpectedValueException extends BaseUnexpectedValueException implements ProxyException -{ - /** - * @return self - */ - public static function proxyDirectoryNotWritable($proxyDirectory) - { - return new self(sprintf('Your proxy directory "%s" must be writable', $proxyDirectory)); - } - - /** - * @param string $className - * @param string $methodName - * @param string $parameterName - * @param \Exception $previous - * - * @return self - */ - public static function invalidParameterTypeHint($className, $methodName, $parameterName, \Exception $previous) - { - return new self( - sprintf( - 'The type hint of parameter "%s" in method "%s" in class "%s" is invalid.', - $parameterName, - $methodName, - $className - ), - 0, - $previous - ); - } -} diff --git a/core/vendor/doctrine/common/lib/Doctrine/Common/Proxy/Proxy.php b/core/vendor/doctrine/common/lib/Doctrine/Common/Proxy/Proxy.php deleted file mode 100644 index 8368430..0000000 --- a/core/vendor/doctrine/common/lib/Doctrine/Common/Proxy/Proxy.php +++ /dev/null @@ -1,90 +0,0 @@ -. - */ - -namespace Doctrine\Common\Proxy; - -use Doctrine\Common\Persistence\Proxy as BaseProxy; -use Closure; - -/** - * Interface for proxy classes. - * - * @author Roman Borschel - * @author Marco Pivetta - * @since 2.4 - */ -interface Proxy extends BaseProxy -{ - /** - * Marks the proxy as initialized or not. - * - * @param boolean $initialized - * - * @return void - */ - public function __setInitialized($initialized); - - /** - * Sets the initializer callback to be used when initializing the proxy. That - * initializer should accept 3 parameters: $proxy, $method and $params. Those - * are respectively the proxy object that is being initialized, the method name - * that triggered initialization and the parameters passed to that method. - * - * @param Closure|null $initializer - * - * @return void - */ - public function __setInitializer(Closure $initializer = null); - - /** - * Retrieves the initializer callback used to initialize the proxy. - * - * @see __setInitializer - * - * @return Closure|null - */ - public function __getInitializer(); - - /** - * Sets the callback to be used when cloning the proxy. That initializer should accept - * a single parameter, which is the cloned proxy instance itself. - * - * @param Closure|null $cloner - * - * @return void - */ - public function __setCloner(Closure $cloner = null); - - /** - * Retrieves the callback to be used when cloning the proxy. - * - * @see __setCloner - * - * @return Closure|null - */ - public function __getCloner(); - - /** - * Retrieves the list of lazy loaded properties for a given proxy - * - * @return array Keys are the property names, and values are the default values - * for those properties. - */ - public function __getLazyProperties(); -} diff --git a/core/vendor/doctrine/common/lib/Doctrine/Common/Proxy/ProxyDefinition.php b/core/vendor/doctrine/common/lib/Doctrine/Common/Proxy/ProxyDefinition.php deleted file mode 100644 index 48b149a..0000000 --- a/core/vendor/doctrine/common/lib/Doctrine/Common/Proxy/ProxyDefinition.php +++ /dev/null @@ -1,70 +0,0 @@ -. - */ - -namespace Doctrine\Common\Proxy; - -/** - * Definition structure how to create a proxy. - * - * @author Benjamin Eberlei - */ -class ProxyDefinition -{ - /** - * @var string - */ - public $proxyClassName; - - /** - * @var array - */ - public $identifierFields; - - /** - * @var \ReflectionProperty[] - */ - public $reflectionFields; - - /** - * @var callable - */ - public $initializer; - - /** - * @var callable - */ - public $cloner; - - /** - * @param string $proxyClassName - * @param array $identifierFields - * @param array $reflectionFields - * @param callable $initializer - * @param callable $cloner - */ - public function __construct($proxyClassName, array $identifierFields, array $reflectionFields, $initializer, $cloner) - { - $this->proxyClassName = $proxyClassName; - $this->identifierFields = $identifierFields; - $this->reflectionFields = $reflectionFields; - $this->initializer = $initializer; - $this->cloner = $cloner; - } -} - diff --git a/core/vendor/doctrine/common/lib/Doctrine/Common/Proxy/ProxyGenerator.php b/core/vendor/doctrine/common/lib/Doctrine/Common/Proxy/ProxyGenerator.php deleted file mode 100644 index 4c5a239..0000000 --- a/core/vendor/doctrine/common/lib/Doctrine/Common/Proxy/ProxyGenerator.php +++ /dev/null @@ -1,932 +0,0 @@ -. - */ - -namespace Doctrine\Common\Proxy; - -use Doctrine\Common\Persistence\Mapping\ClassMetadata; -use Doctrine\Common\Util\ClassUtils; -use Doctrine\Common\Proxy\Exception\InvalidArgumentException; -use Doctrine\Common\Proxy\Exception\UnexpectedValueException; - -/** - * This factory is used to generate proxy classes. - * It builds proxies from given parameters, a template and class metadata. - * - * @author Marco Pivetta - * @since 2.4 - */ -class ProxyGenerator -{ - /** - * Used to match very simple id methods that don't need - * to be decorated since the identifier is known. - */ - const PATTERN_MATCH_ID_METHOD = '((public\s)?(function\s{1,}%s\s?\(\)\s{1,})\s{0,}{\s{0,}return\s{0,}\$this->%s;\s{0,}})i'; - - /** - * The namespace that contains all proxy classes. - * - * @var string - */ - private $proxyNamespace; - - /** - * The directory that contains all proxy classes. - * - * @var string - */ - private $proxyDirectory; - - /** - * Map of callables used to fill in placeholders set in the template. - * - * @var string[]|callable[] - */ - protected $placeholders = array( - 'baseProxyInterface' => 'Doctrine\Common\Proxy\Proxy', - 'additionalProperties' => '', - ); - - /** - * Template used as a blueprint to generate proxies. - * - * @var string - */ - protected $proxyClassTemplate = '; - -/** - * DO NOT EDIT THIS FILE - IT WAS CREATED BY DOCTRINE\'S PROXY GENERATOR - */ -class extends \ implements \ -{ - /** - * @var \Closure the callback responsible for loading properties in the proxy object. This callback is called with - * three parameters, being respectively the proxy object to be initialized, the method that triggered the - * initialization process and an array of ordered parameters that were passed to that method. - * - * @see \Doctrine\Common\Persistence\Proxy::__setInitializer - */ - public $__initializer__; - - /** - * @var \Closure the callback responsible of loading properties that need to be copied in the cloned object - * - * @see \Doctrine\Common\Persistence\Proxy::__setCloner - */ - public $__cloner__; - - /** - * @var boolean flag indicating if this object was already initialized - * - * @see \Doctrine\Common\Persistence\Proxy::__isInitialized - */ - public $__isInitialized__ = false; - - /** - * @var array properties to be lazy loaded, with keys being the property - * names and values being their default values - * - * @see \Doctrine\Common\Persistence\Proxy::__getLazyProperties - */ - public static $lazyPropertiesDefaults = array(); - - - - - - - - - - - - - - - - - - /** - * Forces initialization of the proxy - */ - public function __load() - { - $this->__initializer__ && $this->__initializer__->__invoke($this, \'__load\', array()); - } - - /** - * {@inheritDoc} - * @internal generated method: use only when explicitly handling proxy specific loading logic - */ - public function __isInitialized() - { - return $this->__isInitialized__; - } - - /** - * {@inheritDoc} - * @internal generated method: use only when explicitly handling proxy specific loading logic - */ - public function __setInitialized($initialized) - { - $this->__isInitialized__ = $initialized; - } - - /** - * {@inheritDoc} - * @internal generated method: use only when explicitly handling proxy specific loading logic - */ - public function __setInitializer(\Closure $initializer = null) - { - $this->__initializer__ = $initializer; - } - - /** - * {@inheritDoc} - * @internal generated method: use only when explicitly handling proxy specific loading logic - */ - public function __getInitializer() - { - return $this->__initializer__; - } - - /** - * {@inheritDoc} - * @internal generated method: use only when explicitly handling proxy specific loading logic - */ - public function __setCloner(\Closure $cloner = null) - { - $this->__cloner__ = $cloner; - } - - /** - * {@inheritDoc} - * @internal generated method: use only when explicitly handling proxy specific cloning logic - */ - public function __getCloner() - { - return $this->__cloner__; - } - - /** - * {@inheritDoc} - * @internal generated method: use only when explicitly handling proxy specific loading logic - * @static - */ - public function __getLazyProperties() - { - return self::$lazyPropertiesDefaults; - } - - -} -'; - - /** - * Initializes a new instance of the ProxyFactory class that is - * connected to the given EntityManager. - * - * @param string $proxyDirectory The directory to use for the proxy classes. It must exist. - * @param string $proxyNamespace The namespace to use for the proxy classes. - * - * @throws InvalidArgumentException - */ - public function __construct($proxyDirectory, $proxyNamespace) - { - if ( ! $proxyDirectory) { - throw InvalidArgumentException::proxyDirectoryRequired(); - } - - if ( ! $proxyNamespace) { - throw InvalidArgumentException::proxyNamespaceRequired(); - } - - $this->proxyDirectory = $proxyDirectory; - $this->proxyNamespace = $proxyNamespace; - } - - /** - * Sets a placeholder to be replaced in the template. - * - * @param string $name - * @param string|callable $placeholder - * - * @throws InvalidArgumentException - */ - public function setPlaceholder($name, $placeholder) - { - if ( ! is_string($placeholder) && ! is_callable($placeholder)) { - throw InvalidArgumentException::invalidPlaceholder($name); - } - - $this->placeholders[$name] = $placeholder; - } - - /** - * Sets the base template used to create proxy classes. - * - * @param string $proxyClassTemplate - */ - public function setProxyClassTemplate($proxyClassTemplate) - { - $this->proxyClassTemplate = (string) $proxyClassTemplate; - } - - /** - * Generates a proxy class file. - * - * @param \Doctrine\Common\Persistence\Mapping\ClassMetadata $class Metadata for the original class. - * @param string|bool $fileName Filename (full path) for the generated class. If none is given, eval() is used. - * - * @throws UnexpectedValueException - */ - public function generateProxyClass(ClassMetadata $class, $fileName = false) - { - preg_match_all('(<([a-zA-Z]+)>)', $this->proxyClassTemplate, $placeholderMatches); - - $placeholderMatches = array_combine($placeholderMatches[0], $placeholderMatches[1]); - $placeholders = array(); - - foreach ($placeholderMatches as $placeholder => $name) { - $placeholders[$placeholder] = isset($this->placeholders[$name]) - ? $this->placeholders[$name] - : array($this, 'generate' . $name); - } - - foreach ($placeholders as & $placeholder) { - if (is_callable($placeholder)) { - $placeholder = call_user_func($placeholder, $class); - } - } - - $proxyCode = strtr($this->proxyClassTemplate, $placeholders); - - if ( ! $fileName) { - $proxyClassName = $this->generateNamespace($class) . '\\' . $this->generateProxyShortClassName($class); - - if ( ! class_exists($proxyClassName)) { - eval(substr($proxyCode, 5)); - } - - return; - } - - $parentDirectory = dirname($fileName); - - if ( ! is_dir($parentDirectory) && (false === @mkdir($parentDirectory, 0775, true))) { - throw UnexpectedValueException::proxyDirectoryNotWritable($this->proxyDirectory); - } - - if ( ! is_writable($parentDirectory)) { - throw UnexpectedValueException::proxyDirectoryNotWritable($this->proxyDirectory); - } - - $tmpFileName = $fileName . '.' . uniqid('', true); - - file_put_contents($tmpFileName, $proxyCode); - rename($tmpFileName, $fileName); - } - - /** - * Generates the proxy short class name to be used in the template. - * - * @param \Doctrine\Common\Persistence\Mapping\ClassMetadata $class - * - * @return string - */ - private function generateProxyShortClassName(ClassMetadata $class) - { - $proxyClassName = ClassUtils::generateProxyClassName($class->getName(), $this->proxyNamespace); - $parts = explode('\\', strrev($proxyClassName), 2); - - return strrev($parts[0]); - } - - /** - * Generates the proxy namespace. - * - * @param \Doctrine\Common\Persistence\Mapping\ClassMetadata $class - * - * @return string - */ - private function generateNamespace(ClassMetadata $class) - { - $proxyClassName = ClassUtils::generateProxyClassName($class->getName(), $this->proxyNamespace); - $parts = explode('\\', strrev($proxyClassName), 2); - - return strrev($parts[1]); - } - - /** - * Generates the original class name. - * - * @param \Doctrine\Common\Persistence\Mapping\ClassMetadata $class - * - * @return string - */ - private function generateClassName(ClassMetadata $class) - { - return ltrim($class->getName(), '\\'); - } - - /** - * Generates the array representation of lazy loaded public properties and their default values. - * - * @param \Doctrine\Common\Persistence\Mapping\ClassMetadata $class - * - * @return string - */ - private function generateLazyPropertiesDefaults(ClassMetadata $class) - { - $lazyPublicProperties = $this->getLazyLoadedPublicProperties($class); - $values = array(); - - foreach ($lazyPublicProperties as $key => $value) { - $values[] = var_export($key, true) . ' => ' . var_export($value, true); - } - - return implode(', ', $values); - } - - /** - * Generates the constructor code (un-setting public lazy loaded properties, setting identifier field values). - * - * @param \Doctrine\Common\Persistence\Mapping\ClassMetadata $class - * - * @return string - */ - private function generateConstructorImpl(ClassMetadata $class) - { - $constructorImpl = <<<'EOT' - /** - * @param \Closure $initializer - * @param \Closure $cloner - */ - public function __construct($initializer = null, $cloner = null) - { - -EOT; - $toUnset = array(); - - foreach ($this->getLazyLoadedPublicProperties($class) as $lazyPublicProperty => $unused) { - $toUnset[] = '$this->' . $lazyPublicProperty; - } - - $constructorImpl .= (empty($toUnset) ? '' : ' unset(' . implode(', ', $toUnset) . ");\n") - . <<<'EOT' - - $this->__initializer__ = $initializer; - $this->__cloner__ = $cloner; - } -EOT; - - return $constructorImpl; - } - - /** - * Generates the magic getter invoked when lazy loaded public properties are requested. - * - * @param \Doctrine\Common\Persistence\Mapping\ClassMetadata $class - * - * @return string - */ - private function generateMagicGet(ClassMetadata $class) - { - $lazyPublicProperties = array_keys($this->getLazyLoadedPublicProperties($class)); - $reflectionClass = $class->getReflectionClass(); - $hasParentGet = false; - $returnReference = ''; - $inheritDoc = ''; - - if ($reflectionClass->hasMethod('__get')) { - $hasParentGet = true; - $inheritDoc = '{@inheritDoc}'; - - if ($reflectionClass->getMethod('__get')->returnsReference()) { - $returnReference = '& '; - } - } - - if (empty($lazyPublicProperties) && ! $hasParentGet) { - return ''; - } - - $magicGet = <<__getLazyProperties())) { - $this->__initializer__ && $this->__initializer__->__invoke($this, '__get', array($name)); - - return $this->$name; - } - - -EOT; - } - - if ($hasParentGet) { - $magicGet .= <<<'EOT' - $this->__initializer__ && $this->__initializer__->__invoke($this, '__get', array($name)); - - return parent::__get($name); - -EOT; - } else { - $magicGet .= <<<'EOT' - trigger_error(sprintf('Undefined property: %s::$%s', __CLASS__, $name), E_USER_NOTICE); - -EOT; - } - - $magicGet .= " }"; - - return $magicGet; - } - - /** - * Generates the magic setter (currently unused). - * - * @param \Doctrine\Common\Persistence\Mapping\ClassMetadata $class - * - * @return string - */ - private function generateMagicSet(ClassMetadata $class) - { - $lazyPublicProperties = $this->getLazyLoadedPublicProperties($class); - $hasParentSet = $class->getReflectionClass()->hasMethod('__set'); - - if (empty($lazyPublicProperties) && ! $hasParentSet) { - return ''; - } - - $inheritDoc = $hasParentSet ? '{@inheritDoc}' : ''; - $magicSet = <<__getLazyProperties())) { - $this->__initializer__ && $this->__initializer__->__invoke($this, '__set', array($name, $value)); - - $this->$name = $value; - - return; - } - - -EOT; - } - - if ($hasParentSet) { - $magicSet .= <<<'EOT' - $this->__initializer__ && $this->__initializer__->__invoke($this, '__set', array($name, $value)); - - return parent::__set($name, $value); -EOT; - } else { - $magicSet .= " \$this->\$name = \$value;"; - } - - $magicSet .= "\n }"; - - return $magicSet; - } - - /** - * Generates the magic issetter invoked when lazy loaded public properties are checked against isset(). - * - * @param \Doctrine\Common\Persistence\Mapping\ClassMetadata $class - * - * @return string - */ - private function generateMagicIsset(ClassMetadata $class) - { - $lazyPublicProperties = array_keys($this->getLazyLoadedPublicProperties($class)); - $hasParentIsset = $class->getReflectionClass()->hasMethod('__isset'); - - if (empty($lazyPublicProperties) && ! $hasParentIsset) { - return ''; - } - - $inheritDoc = $hasParentIsset ? '{@inheritDoc}' : ''; - $magicIsset = <<__getLazyProperties())) { - $this->__initializer__ && $this->__initializer__->__invoke($this, '__isset', array($name)); - - return isset($this->$name); - } - - -EOT; - } - - if ($hasParentIsset) { - $magicIsset .= <<<'EOT' - $this->__initializer__ && $this->__initializer__->__invoke($this, '__isset', array($name)); - - return parent::__isset($name); - -EOT; - } else { - $magicIsset .= " return false;"; - } - - return $magicIsset . "\n }"; - } - - /** - * Generates implementation for the `__sleep` method of proxies. - * - * @param \Doctrine\Common\Persistence\Mapping\ClassMetadata $class - * - * @return string - */ - private function generateSleepImpl(ClassMetadata $class) - { - $hasParentSleep = $class->getReflectionClass()->hasMethod('__sleep'); - $inheritDoc = $hasParentSleep ? '{@inheritDoc}' : ''; - $sleepImpl = <<__isInitialized__) { - $properties = array_diff($properties, array_keys($this->__getLazyProperties())); - } - - return $properties; - } -EOT; - } - - $allProperties = array('__isInitialized__'); - - /* @var $prop \ReflectionProperty */ - foreach ($class->getReflectionClass()->getProperties() as $prop) { - if ($prop->isStatic()) { - continue; - } - - $allProperties[] = $prop->isPrivate() - ? "\0" . $prop->getDeclaringClass()->getName() . "\0" . $prop->getName() - : $prop->getName(); - } - - $lazyPublicProperties = array_keys($this->getLazyLoadedPublicProperties($class)); - $protectedProperties = array_diff($allProperties, $lazyPublicProperties); - - foreach ($allProperties as &$property) { - $property = var_export($property, true); - } - - foreach ($protectedProperties as &$property) { - $property = var_export($property, true); - } - - $allProperties = implode(', ', $allProperties); - $protectedProperties = implode(', ', $protectedProperties); - - return $sleepImpl . <<__isInitialized__) { - return array($allProperties); - } - - return array($protectedProperties); - } -EOT; - } - - /** - * Generates implementation for the `__wakeup` method of proxies. - * - * @param \Doctrine\Common\Persistence\Mapping\ClassMetadata $class - * - * @return string - */ - private function generateWakeupImpl(ClassMetadata $class) - { - $unsetPublicProperties = array(); - $hasWakeup = $class->getReflectionClass()->hasMethod('__wakeup'); - - foreach (array_keys($this->getLazyLoadedPublicProperties($class)) as $lazyPublicProperty) { - $unsetPublicProperties[] = '$this->' . $lazyPublicProperty; - } - - $shortName = $this->generateProxyShortClassName($class); - $inheritDoc = $hasWakeup ? '{@inheritDoc}' : ''; - $wakeupImpl = <<__isInitialized__) { - \$this->__initializer__ = function ($shortName \$proxy) { - \$proxy->__setInitializer(null); - \$proxy->__setCloner(null); - - \$existingProperties = get_object_vars(\$proxy); - - foreach (\$proxy->__getLazyProperties() as \$property => \$defaultValue) { - if ( ! array_key_exists(\$property, \$existingProperties)) { - \$proxy->\$property = \$defaultValue; - } - } - }; - -EOT; - - if ( ! empty($unsetPublicProperties)) { - $wakeupImpl .= "\n unset(" . implode(', ', $unsetPublicProperties) . ");"; - } - - $wakeupImpl .= "\n }"; - - if ($hasWakeup) { - $wakeupImpl .= "\n parent::__wakeup();"; - } - - $wakeupImpl .= "\n }"; - - return $wakeupImpl; - } - - /** - * Generates implementation for the `__clone` method of proxies. - * - * @param \Doctrine\Common\Persistence\Mapping\ClassMetadata $class - * - * @return string - */ - private function generateCloneImpl(ClassMetadata $class) - { - $hasParentClone = $class->getReflectionClass()->hasMethod('__clone'); - $inheritDoc = $hasParentClone ? '{@inheritDoc}' : ''; - $callParentClone = $hasParentClone ? "\n parent::__clone();\n" : ''; - - return <<__cloner__ && \$this->__cloner__->__invoke(\$this, '__clone', array()); -$callParentClone } -EOT; - } - - /** - * Generates decorated methods by picking those available in the parent class. - * - * @param \Doctrine\Common\Persistence\Mapping\ClassMetadata $class - * - * @return string - */ - private function generateMethods(ClassMetadata $class) - { - $methods = ''; - $methodNames = array(); - $reflectionMethods = $class->getReflectionClass()->getMethods(\ReflectionMethod::IS_PUBLIC); - $skippedMethods = array( - '__sleep' => true, - '__clone' => true, - '__wakeup' => true, - '__get' => true, - '__set' => true, - '__isset' => true, - ); - - foreach ($reflectionMethods as $method) { - $name = $method->getName(); - - if ( - $method->isConstructor() || - isset($skippedMethods[strtolower($name)]) || - isset($methodNames[$name]) || - $method->isFinal() || - $method->isStatic() || - ( ! $method->isPublic()) - ) { - continue; - } - - $methodNames[$name] = true; - $methods .= "\n /**\n" - . " * {@inheritDoc}\n" - . " */\n" - . ' public function '; - - if ($method->returnsReference()) { - $methods .= '&'; - } - - $methods .= $name . '('; - - $firstParam = true; - $parameterString = ''; - $argumentString = ''; - $parameters = array(); - - foreach ($method->getParameters() as $param) { - if ($firstParam) { - $firstParam = false; - } else { - $parameterString .= ', '; - $argumentString .= ', '; - } - - try { - $paramClass = $param->getClass(); - } catch (\ReflectionException $previous) { - throw UnexpectedValueException::invalidParameterTypeHint( - $class->getName(), - $method->getName(), - $param->getName(), - $previous - ); - } - - // We need to pick the type hint class too - if (null !== $paramClass) { - $parameterString .= '\\' . $paramClass->getName() . ' '; - } elseif ($param->isArray()) { - $parameterString .= 'array '; - } elseif (method_exists($param, 'isCallable') && $param->isCallable()) { - $parameterString .= 'callable '; - } - - if ($param->isPassedByReference()) { - $parameterString .= '&'; - } - - $parameters[] = '$' . $param->getName(); - $parameterString .= '$' . $param->getName(); - $argumentString .= '$' . $param->getName(); - - if ($param->isDefaultValueAvailable()) { - $parameterString .= ' = ' . var_export($param->getDefaultValue(), true); - } - } - - $methods .= $parameterString . ')'; - $methods .= "\n" . ' {' . "\n"; - - if ($this->isShortIdentifierGetter($method, $class)) { - $identifier = lcfirst(substr($name, 3)); - $fieldType = $class->getTypeOfField($identifier); - $cast = in_array($fieldType, array('integer', 'smallint')) ? '(int) ' : ''; - - $methods .= ' if ($this->__isInitialized__ === false) {' . "\n"; - $methods .= ' return ' . $cast . ' parent::' . $method->getName() . "();\n"; - $methods .= ' }' . "\n\n"; - } - - $methods .= "\n \$this->__initializer__ " - . "&& \$this->__initializer__->__invoke(\$this, " . var_export($name, true) - . ", array(" . implode(', ', $parameters) . "));" - . "\n\n return parent::" . $name . '(' . $argumentString . ');' - . "\n" . ' }' . "\n"; - } - - return $methods; - } - - /** - * Generates the Proxy file name. - * - * @param string $className - * @param string $baseDirectory Optional base directory for proxy file name generation. - * If not specified, the directory configured on the Configuration of the - * EntityManager will be used by this factory. - * - * @return string - */ - public function getProxyFileName($className, $baseDirectory = null) - { - $baseDirectory = $baseDirectory ?: $this->proxyDirectory; - - return rtrim($baseDirectory, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . Proxy::MARKER - . str_replace('\\', '', $className) . '.php'; - } - - /** - * Checks if the method is a short identifier getter. - * - * What does this mean? For proxy objects the identifier is already known, - * however accessing the getter for this identifier usually triggers the - * lazy loading, leading to a query that may not be necessary if only the - * ID is interesting for the userland code (for example in views that - * generate links to the entity, but do not display anything else). - * - * @param \ReflectionMethod $method - * @param \Doctrine\Common\Persistence\Mapping\ClassMetadata $class - * - * @return boolean - */ - private function isShortIdentifierGetter($method, ClassMetadata $class) - { - $identifier = lcfirst(substr($method->getName(), 3)); - $startLine = $method->getStartLine(); - $endLine = $method->getEndLine(); - $cheapCheck = ( - $method->getNumberOfParameters() == 0 - && substr($method->getName(), 0, 3) == 'get' - && in_array($identifier, $class->getIdentifier(), true) - && $class->hasField($identifier) - && (($endLine - $startLine) <= 4) - ); - - if ($cheapCheck) { - $code = file($method->getDeclaringClass()->getFileName()); - $code = trim(implode(' ', array_slice($code, $startLine - 1, $endLine - $startLine + 1))); - - $pattern = sprintf(self::PATTERN_MATCH_ID_METHOD, $method->getName(), $identifier); - - if (preg_match($pattern, $code)) { - return true; - } - } - - return false; - } - - /** - * Generates the list of public properties to be lazy loaded, with their default values. - * - * @param \Doctrine\Common\Persistence\Mapping\ClassMetadata $class - * - * @return mixed[] - */ - private function getLazyLoadedPublicProperties(ClassMetadata $class) - { - $defaultProperties = $class->getReflectionClass()->getDefaultProperties(); - $properties = array(); - - foreach ($class->getReflectionClass()->getProperties(\ReflectionProperty::IS_PUBLIC) as $property) { - $name = $property->getName(); - - if (($class->hasField($name) || $class->hasAssociation($name)) && ! $class->isIdentifier($name)) { - $properties[$name] = $defaultProperties[$name]; - } - } - - return $properties; - } -} - diff --git a/core/vendor/doctrine/common/lib/Doctrine/Common/Reflection/ClassFinderInterface.php b/core/vendor/doctrine/common/lib/Doctrine/Common/Reflection/ClassFinderInterface.php deleted file mode 100644 index 639fd69..0000000 --- a/core/vendor/doctrine/common/lib/Doctrine/Common/Reflection/ClassFinderInterface.php +++ /dev/null @@ -1,37 +0,0 @@ -. - */ - -namespace Doctrine\Common\Reflection; - -/** - * Finds a class in a PSR-0 structure. - * - * @author Karoly Negyesi - */ -interface ClassFinderInterface -{ - /** - * Finds a class. - * - * @param string $class The name of the class. - * - * @return string|null The name of the class or NULL if not found. - */ - public function findFile($class); -} diff --git a/core/vendor/doctrine/common/lib/Doctrine/Common/Reflection/Psr0FindFile.php b/core/vendor/doctrine/common/lib/Doctrine/Common/Reflection/Psr0FindFile.php deleted file mode 100644 index 418bb0f..0000000 --- a/core/vendor/doctrine/common/lib/Doctrine/Common/Reflection/Psr0FindFile.php +++ /dev/null @@ -1,79 +0,0 @@ -. - */ - -namespace Doctrine\Common\Reflection; - -/** - * Finds a class in a PSR-0 structure. - * - * @author Karoly Negyesi - */ -class Psr0FindFile implements ClassFinderInterface -{ - /** - * The PSR-0 prefixes. - * - * @var array - */ - protected $prefixes; - - /** - * @param array $prefixes An array of prefixes. Each key is a PHP namespace and each value is - * a list of directories. - */ - public function __construct($prefixes) - { - $this->prefixes = $prefixes; - } - - /** - * {@inheritDoc} - */ - public function findFile($class) - { - $lastNsPos = strrpos($class, '\\'); - if ('\\' == $class[0]) { - $class = substr($class, 1); - } - - if (false !== $lastNsPos) { - // namespaced class name - $classPath = str_replace('\\', DIRECTORY_SEPARATOR, substr($class, 0, $lastNsPos)) . DIRECTORY_SEPARATOR; - $className = substr($class, $lastNsPos + 1); - } else { - // PEAR-like class name - $classPath = null; - $className = $class; - } - - $classPath .= str_replace('_', DIRECTORY_SEPARATOR, $className) . '.php'; - - foreach ($this->prefixes as $prefix => $dirs) { - if (0 === strpos($class, $prefix)) { - foreach ($dirs as $dir) { - if (is_file($dir . DIRECTORY_SEPARATOR . $classPath)) { - return $dir . DIRECTORY_SEPARATOR . $classPath; - } - } - } - } - - return null; - } -} diff --git a/core/vendor/doctrine/common/lib/Doctrine/Common/Reflection/ReflectionProviderInterface.php b/core/vendor/doctrine/common/lib/Doctrine/Common/Reflection/ReflectionProviderInterface.php deleted file mode 100644 index 3d970ee..0000000 --- a/core/vendor/doctrine/common/lib/Doctrine/Common/Reflection/ReflectionProviderInterface.php +++ /dev/null @@ -1,48 +0,0 @@ -. - */ - -namespace Doctrine\Common\Reflection; - -interface ReflectionProviderInterface -{ - /** - * Gets the ReflectionClass equivalent for this class. - * - * @return \ReflectionClass - */ - public function getReflectionClass(); - - /** - * Gets the ReflectionMethod equivalent for this class. - * - * @param string $name - * - * @return \ReflectionMethod - */ - public function getReflectionMethod($name); - - /** - * Gets the ReflectionProperty equivalent for this class. - * - * @param string $name - * - * @return \ReflectionProperty - */ - public function getReflectionProperty($name); -} diff --git a/core/vendor/doctrine/common/lib/Doctrine/Common/Reflection/RuntimePublicReflectionProperty.php b/core/vendor/doctrine/common/lib/Doctrine/Common/Reflection/RuntimePublicReflectionProperty.php deleted file mode 100644 index f155c45..0000000 --- a/core/vendor/doctrine/common/lib/Doctrine/Common/Reflection/RuntimePublicReflectionProperty.php +++ /dev/null @@ -1,76 +0,0 @@ -. - */ - -namespace Doctrine\Common\Reflection; - -use ReflectionProperty; -use Doctrine\Common\Proxy\Proxy; - -/** - * PHP Runtime Reflection Public Property - special overrides for public properties. - * - * @author Marco Pivetta - * @since 2.4 - */ -class RuntimePublicReflectionProperty extends ReflectionProperty -{ - /** - * {@inheritDoc} - * - * Checks is the value actually exist before fetching it. - * This is to avoid calling `__get` on the provided $object if it - * is a {@see \Doctrine\Common\Proxy\Proxy}. - */ - public function getValue($object = null) - { - $name = $this->getName(); - - if ($object instanceof Proxy && ! $object->__isInitialized()) { - $originalInitializer = $object->__getInitializer(); - $object->__setInitializer(null); - $val = isset($object->$name) ? $object->$name : null; - $object->__setInitializer($originalInitializer); - - return $val; - } - - return isset($object->$name) ? parent::getValue($object) : null; - } - - /** - * {@inheritDoc} - * - * Avoids triggering lazy loading via `__set` if the provided object - * is a {@see \Doctrine\Common\Proxy\Proxy}. - * @link https://bugs.php.net/bug.php?id=63463 - */ - public function setValue($object, $value = null) - { - if ( ! ($object instanceof Proxy && ! $object->__isInitialized())) { - parent::setValue($object, $value); - - return; - } - - $originalInitializer = $object->__getInitializer(); - $object->__setInitializer(null); - parent::setValue($object, $value); - $object->__setInitializer($originalInitializer); - } -} diff --git a/core/vendor/doctrine/common/lib/Doctrine/Common/Reflection/StaticReflectionClass.php b/core/vendor/doctrine/common/lib/Doctrine/Common/Reflection/StaticReflectionClass.php deleted file mode 100644 index b65979a..0000000 --- a/core/vendor/doctrine/common/lib/Doctrine/Common/Reflection/StaticReflectionClass.php +++ /dev/null @@ -1,433 +0,0 @@ -. - */ - -namespace Doctrine\Common\Reflection; - -use ReflectionClass; -use ReflectionException; - -class StaticReflectionClass extends ReflectionClass -{ - /** - * The static reflection parser object. - * - * @var StaticReflectionParser - */ - private $staticReflectionParser; - - /** - * @param StaticReflectionParser $staticReflectionParser - */ - public function __construct(StaticReflectionParser $staticReflectionParser) - { - $this->staticReflectionParser = $staticReflectionParser; - } - - /** - * {@inheritDoc} - */ - public function getName() - { - return $this->staticReflectionParser->getClassName(); - } - - /** - * {@inheritDoc} - */ - public function getDocComment() - { - return $this->staticReflectionParser->getDocComment(); - } - - /** - * {@inheritDoc} - */ - public function getNamespaceName() - { - return $this->staticReflectionParser->getNamespaceName(); - } - - /** - * @return array - */ - public function getUseStatements() - { - return $this->staticReflectionParser->getUseStatements(); - } - - /** - * {@inheritDoc} - */ - public function getMethod($name) - { - return $this->staticReflectionParser->getReflectionMethod($name); - } - - /** - * {@inheritDoc} - */ - public function getProperty($name) - { - return $this->staticReflectionParser->getReflectionProperty($name); - } - - /** - * {@inheritDoc} - */ - public static function export($argument, $return = false) - { - throw new ReflectionException('Method not implemented'); - } - - /** - * {@inheritDoc} - */ - public function getConstant($name) - { - throw new ReflectionException('Method not implemented'); - } - - /** - * {@inheritDoc} - */ - public function getConstants() - { - throw new ReflectionException('Method not implemented'); - } - - /** - * {@inheritDoc} - */ - public function getConstructor() - { - throw new ReflectionException('Method not implemented'); - } - - /** - * {@inheritDoc} - */ - public function getDefaultProperties() - { - throw new ReflectionException('Method not implemented'); - } - - /** - * {@inheritDoc} - */ - public function getEndLine() - { - throw new ReflectionException('Method not implemented'); - } - - /** - * {@inheritDoc} - */ - public function getExtension() - { - throw new ReflectionException('Method not implemented'); - } - - /** - * {@inheritDoc} - */ - public function getExtensionName() - { - throw new ReflectionException('Method not implemented'); - } - - /** - * {@inheritDoc} - */ - public function getFileName() - { - throw new ReflectionException('Method not implemented'); - } - - /** - * {@inheritDoc} - */ - public function getInterfaceNames() - { - throw new ReflectionException('Method not implemented'); - } - - /** - * {@inheritDoc} - */ - public function getInterfaces() - { - throw new ReflectionException('Method not implemented'); - } - - /** - * {@inheritDoc} - */ - public function getMethods($filter = null) - { - throw new ReflectionException('Method not implemented'); - } - - /** - * {@inheritDoc} - */ - public function getModifiers() - { - throw new ReflectionException('Method not implemented'); - } - - /** - * {@inheritDoc} - */ - public function getParentClass() - { - throw new ReflectionException('Method not implemented'); - } - - /** - * {@inheritDoc} - */ - public function getProperties($filter = null) - { - throw new ReflectionException('Method not implemented'); - } - - /** - * {@inheritDoc} - */ - public function getShortName() - { - throw new ReflectionException('Method not implemented'); - } - - /** - * {@inheritDoc} - */ - public function getStartLine() - { - throw new ReflectionException('Method not implemented'); - } - - /** - * {@inheritDoc} - */ - public function getStaticProperties() - { - throw new ReflectionException('Method not implemented'); - } - - /** - * {@inheritDoc} - */ - public function getStaticPropertyValue($name, $default = '') - { - throw new ReflectionException('Method not implemented'); - } - - /** - * {@inheritDoc} - */ - public function getTraitAliases() - { - throw new ReflectionException('Method not implemented'); - } - - /** - * {@inheritDoc} - */ - public function getTraitNames() - { - throw new ReflectionException('Method not implemented'); - } - - /** - * {@inheritDoc} - */ - public function getTraits() - { - throw new ReflectionException('Method not implemented'); - } - - /** - * {@inheritDoc} - */ - public function hasConstant($name) - { - throw new ReflectionException('Method not implemented'); - } - - /** - * {@inheritDoc} - */ - public function hasMethod($name) - { - throw new ReflectionException('Method not implemented'); - } - - /** - * {@inheritDoc} - */ - public function hasProperty($name) - { - throw new ReflectionException('Method not implemented'); - } - - /** - * {@inheritDoc} - */ - public function implementsInterface($interface) - { - throw new ReflectionException('Method not implemented'); - } - - /** - * {@inheritDoc} - */ - public function inNamespace() - { - throw new ReflectionException('Method not implemented'); - } - - /** - * {@inheritDoc} - */ - public function isAbstract() - { - throw new ReflectionException('Method not implemented'); - } - - /** - * {@inheritDoc} - */ - public function isCloneable() - { - throw new ReflectionException('Method not implemented'); - } - - /** - * {@inheritDoc} - */ - public function isFinal() - { - throw new ReflectionException('Method not implemented'); - } - - /** - * {@inheritDoc} - */ - public function isInstance($object) - { - throw new ReflectionException('Method not implemented'); - } - - /** - * {@inheritDoc} - */ - public function isInstantiable() - { - throw new ReflectionException('Method not implemented'); - } - - /** - * {@inheritDoc} - */ - public function isInterface() - { - throw new ReflectionException('Method not implemented'); - } - - /** - * {@inheritDoc} - */ - public function isInternal() - { - throw new ReflectionException('Method not implemented'); - } - - /** - * {@inheritDoc} - */ - public function isIterateable() - { - throw new ReflectionException('Method not implemented'); - } - - /** - * {@inheritDoc} - */ - public function isSubclassOf($class) - { - throw new ReflectionException('Method not implemented'); - } - - /** - * {@inheritDoc} - */ - public function isTrait() - { - throw new ReflectionException('Method not implemented'); - } - - /** - * {@inheritDoc} - */ - public function isUserDefined() - { - throw new ReflectionException('Method not implemented'); - } - - /** - * {@inheritDoc} - */ - public function newInstance($args) - { - throw new ReflectionException('Method not implemented'); - } - - /** - * {@inheritDoc} - */ - public function newInstanceArgs(array $args = array()) - { - throw new ReflectionException('Method not implemented'); - } - - /** - * {@inheritDoc} - */ - public function newInstanceWithoutConstructor() - { - throw new ReflectionException('Method not implemented'); - } - - /** - * {@inheritDoc} - */ - public function setStaticPropertyValue($name, $value) - { - throw new ReflectionException('Method not implemented'); - } - - /** - * {@inheritDoc} - */ - public function __toString() - { - throw new ReflectionException('Method not implemented'); - } -} diff --git a/core/vendor/doctrine/common/lib/Doctrine/Common/Reflection/StaticReflectionMethod.php b/core/vendor/doctrine/common/lib/Doctrine/Common/Reflection/StaticReflectionMethod.php deleted file mode 100644 index 311e1304..0000000 --- a/core/vendor/doctrine/common/lib/Doctrine/Common/Reflection/StaticReflectionMethod.php +++ /dev/null @@ -1,362 +0,0 @@ -. - */ - -namespace Doctrine\Common\Reflection; - -use ReflectionMethod; -use ReflectionException; - -class StaticReflectionMethod extends ReflectionMethod -{ - /** - * The PSR-0 parser object. - * - * @var StaticReflectionParser - */ - protected $staticReflectionParser; - - /** - * The name of the method. - * - * @var string - */ - protected $methodName; - - /** - * @param StaticReflectionParser $staticReflectionParser - * @param string $methodName - */ - public function __construct(StaticReflectionParser $staticReflectionParser, $methodName) - { - $this->staticReflectionParser = $staticReflectionParser; - $this->methodName = $methodName; - } - - /** - * {@inheritDoc} - */ - public function getName() - { - return $this->methodName; - } - - /** - * @return StaticReflectionParser - */ - protected function getStaticReflectionParser() - { - return $this->staticReflectionParser->getStaticReflectionParserForDeclaringClass('method', $this->methodName); - } - - /** - * {@inheritDoc} - */ - public function getDeclaringClass() - { - return $this->getStaticReflectionParser()->getReflectionClass(); - } - - /** - * {@inheritDoc} - */ - public function getNamespaceName() - { - return $this->getStaticReflectionParser()->getNamespaceName(); - } - - /** - * {@inheritDoc} - */ - public function getDocComment() - { - return $this->getStaticReflectionParser()->getDocComment('method', $this->methodName); - } - - /** - * @return array - */ - public function getUseStatements() - { - return $this->getStaticReflectionParser()->getUseStatements(); - } - - /** - * {@inheritDoc} - */ - public static function export($class, $name, $return = false) - { - throw new ReflectionException('Method not implemented'); - } - - /** - * {@inheritDoc} - */ - public function getClosure($object) - { - throw new ReflectionException('Method not implemented'); - } - - /** - * {@inheritDoc} - */ - public function getModifiers() - { - throw new ReflectionException('Method not implemented'); - } - - /** - * {@inheritDoc} - */ - public function getPrototype() - { - throw new ReflectionException('Method not implemented'); - } - - /** - * {@inheritDoc} - */ - public function invoke($object, $parameter = null) - { - throw new ReflectionException('Method not implemented'); - } - - /** - * {@inheritDoc} - */ - public function invokeArgs($object, array $args) - { - throw new ReflectionException('Method not implemented'); - } - - /** - * {@inheritDoc} - */ - public function isAbstract() - { - throw new ReflectionException('Method not implemented'); - } - - /** - * {@inheritDoc} - */ - public function isConstructor() - { - throw new ReflectionException('Method not implemented'); - } - - /** - * {@inheritDoc} - */ - public function isDestructor() - { - throw new ReflectionException('Method not implemented'); - } - - /** - * {@inheritDoc} - */ - public function isFinal() - { - throw new ReflectionException('Method not implemented'); - } - - /** - * {@inheritDoc} - */ - public function isPrivate() - { - throw new ReflectionException('Method not implemented'); - } - - /** - * {@inheritDoc} - */ - public function isProtected() - { - throw new ReflectionException('Method not implemented'); - } - - /** - * {@inheritDoc} - */ - public function isPublic() - { - throw new ReflectionException('Method not implemented'); - } - - /** - * {@inheritDoc} - */ - public function isStatic() - { - throw new ReflectionException('Method not implemented'); - } - - /** - * {@inheritDoc} - */ - public function setAccessible($accessible) - { - throw new ReflectionException('Method not implemented'); - } - - /** - * {@inheritDoc} - */ - public function __toString() - { - throw new ReflectionException('Method not implemented'); - } - - /** - * {@inheritDoc} - */ - public function getClosureThis() - { - throw new ReflectionException('Method not implemented'); - } - - /** - * {@inheritDoc} - */ - public function getEndLine() - { - throw new ReflectionException('Method not implemented'); - } - - /** - * {@inheritDoc} - */ - public function getExtension() - { - throw new ReflectionException('Method not implemented'); - } - - /** - * {@inheritDoc} - */ - public function getExtensionName() - { - throw new ReflectionException('Method not implemented'); - } - - /** - * {@inheritDoc} - */ - public function getFileName() - { - throw new ReflectionException('Method not implemented'); - } - - /** - * {@inheritDoc} - */ - public function getNumberOfParameters() - { - throw new ReflectionException('Method not implemented'); - } - - /** - * {@inheritDoc} - */ - public function getNumberOfRequiredParameters() - { - throw new ReflectionException('Method not implemented'); - } - - /** - * {@inheritDoc} - */ - public function getParameters() - { - throw new ReflectionException('Method not implemented'); - } - - /** - * {@inheritDoc} - */ - public function getShortName() - { - throw new ReflectionException('Method not implemented'); - } - - /** - * {@inheritDoc} - */ - public function getStartLine() - { - throw new ReflectionException('Method not implemented'); - } - - /** - * {@inheritDoc} - */ - public function getStaticVariables() - { - throw new ReflectionException('Method not implemented'); - } - - /** - * {@inheritDoc} - */ - public function inNamespace() - { - throw new ReflectionException('Method not implemented'); - } - - /** - * {@inheritDoc} - */ - public function isClosure() - { - throw new ReflectionException('Method not implemented'); - } - - /** - * {@inheritDoc} - */ - public function isDeprecated() - { - throw new ReflectionException('Method not implemented'); - } - - /** - * {@inheritDoc} - */ - public function isInternal() - { - throw new ReflectionException('Method not implemented'); - } - - /** - * {@inheritDoc} - */ - public function isUserDefined() - { - throw new ReflectionException('Method not implemented'); - } - - /** - * {@inheritDoc} - */ - public function returnsReference() - { - throw new ReflectionException('Method not implemented'); - } -} diff --git a/core/vendor/doctrine/common/lib/Doctrine/Common/Reflection/StaticReflectionParser.php b/core/vendor/doctrine/common/lib/Doctrine/Common/Reflection/StaticReflectionParser.php deleted file mode 100644 index aac1f90..0000000 --- a/core/vendor/doctrine/common/lib/Doctrine/Common/Reflection/StaticReflectionParser.php +++ /dev/null @@ -1,307 +0,0 @@ -. - */ - -namespace Doctrine\Common\Reflection; - -use ReflectionException; -use Doctrine\Common\Annotations\TokenParser; - -/** - * Parses a file for namespaces/use/class declarations. - * - * @author Karoly Negyesi - */ -class StaticReflectionParser implements ReflectionProviderInterface -{ - /** - * The fully qualified class name. - * - * @var string - */ - protected $className; - - /** - * The short class name. - * - * @var string - */ - protected $shortClassName; - - /** - * Whether the caller only wants class annotations. - * - * @var boolean. - */ - protected $classAnnotationOptimize; - - /** - * Whether the parser has run. - * - * @var boolean - */ - protected $parsed = false; - - /** - * The namespace of the class. - * - * @var string - */ - protected $namespace = ''; - - /** - * The use statements of the class. - * - * @var array - */ - protected $useStatements = array(); - - /** - * The docComment of the class. - * - * @var string - */ - protected $docComment = array( - 'class' => '', - 'property' => array(), - 'method' => array() - ); - - /** - * The name of the class this class extends, if any. - * - * @var string - */ - protected $parentClassName = ''; - - /** - * The parent PSR-0 Parser. - * - * @var \Doctrine\Common\Reflection\StaticReflectionParser - */ - protected $parentStaticReflectionParser; - - /** - * Parses a class residing in a PSR-0 hierarchy. - * - * @param string $className The full, namespaced class name. - * @param ClassFinderInterface $finder A ClassFinder object which finds the class. - * @param boolean $classAnnotationOptimize Only retrieve the class docComment. - * Presumes there is only one statement per line. - */ - public function __construct($className, $finder, $classAnnotationOptimize = false) - { - $this->className = ltrim($className, '\\'); - $lastNsPos = strrpos($this->className, '\\'); - - if ($lastNsPos !== false) { - $this->namespace = substr($this->className, 0, $lastNsPos); - $this->shortClassName = substr($this->className, $lastNsPos + 1); - } else { - $this->shortClassName = $this->className; - } - - $this->finder = $finder; - $this->classAnnotationOptimize = $classAnnotationOptimize; - } - - /** - * @return void - */ - protected function parse() - { - if ($this->parsed || !$fileName = $this->finder->findFile($this->className)) { - return; - } - $this->parsed = true; - $contents = file_get_contents($fileName); - if ($this->classAnnotationOptimize) { - if (preg_match("/\A.*^\s*((abstract|final)\s+)?class\s+{$this->shortClassName}\s+/sm", $contents, $matches)) { - $contents = $matches[0]; - } - } - $tokenParser = new TokenParser($contents); - $docComment = ''; - while ($token = $tokenParser->next(false)) { - if (is_array($token)) { - switch ($token[0]) { - case T_USE: - $this->useStatements = array_merge($this->useStatements, $tokenParser->parseUseStatement()); - break; - case T_DOC_COMMENT: - $docComment = $token[1]; - break; - case T_CLASS: - $this->docComment['class'] = $docComment; - $docComment = ''; - break; - case T_VAR: - case T_PRIVATE: - case T_PROTECTED: - case T_PUBLIC: - $token = $tokenParser->next(); - if ($token[0] === T_VARIABLE) { - $propertyName = substr($token[1], 1); - $this->docComment['property'][$propertyName] = $docComment; - continue 2; - } - if ($token[0] !== T_FUNCTION) { - // For example, it can be T_FINAL. - continue 2; - } - // No break. - case T_FUNCTION: - // The next string after function is the name, but - // there can be & before the function name so find the - // string. - while (($token = $tokenParser->next()) && $token[0] !== T_STRING); - $methodName = $token[1]; - $this->docComment['method'][$methodName] = $docComment; - $docComment = ''; - break; - case T_EXTENDS: - $this->parentClassName = $tokenParser->parseClass(); - $nsPos = strpos($this->parentClassName, '\\'); - $fullySpecified = false; - if ($nsPos === 0) { - $fullySpecified = true; - } else { - if ($nsPos) { - $prefix = strtolower(substr($this->parentClassName, 0, $nsPos)); - $postfix = substr($this->parentClassName, $nsPos); - } else { - $prefix = strtolower($this->parentClassName); - $postfix = ''; - } - foreach ($this->useStatements as $alias => $use) { - if ($alias == $prefix) { - $this->parentClassName = '\\' . $use . $postfix; - $fullySpecified = true; - } - } - } - if (!$fullySpecified) { - $this->parentClassName = '\\' . $this->namespace . '\\' . $this->parentClassName; - } - break; - } - } - } - } - - /** - * @return StaticReflectionParser - */ - protected function getParentStaticReflectionParser() - { - if (empty($this->parentStaticReflectionParser)) { - $this->parentStaticReflectionParser = new static($this->parentClassName, $this->finder); - } - - return $this->parentStaticReflectionParser; - } - - /** - * @return string - */ - public function getClassName() - { - return $this->className; - } - - /** - * @return string - */ - public function getNamespaceName() - { - return $this->namespace; - } - - /** - * {@inheritDoc} - */ - public function getReflectionClass() - { - return new StaticReflectionClass($this); - } - - /** - * {@inheritDoc} - */ - public function getReflectionMethod($methodName) - { - return new StaticReflectionMethod($this, $methodName); - } - - /** - * {@inheritDoc} - */ - public function getReflectionProperty($propertyName) - { - return new StaticReflectionProperty($this, $propertyName); - } - - /** - * Gets the use statements from this file. - * - * @return array - */ - public function getUseStatements() - { - $this->parse(); - - return $this->useStatements; - } - - /** - * Gets the doc comment. - * - * @param string $type The type: 'class', 'property' or 'method'. - * @param string $name The name of the property or method, not needed for 'class'. - * - * @return string The doc comment, empty string if none. - */ - public function getDocComment($type = 'class', $name = '') - { - $this->parse(); - - return $name ? $this->docComment[$type][$name] : $this->docComment[$type]; - } - - /** - * Gets the PSR-0 parser for the declaring class. - * - * @param string $type The type: 'property' or 'method'. - * @param string $name The name of the property or method. - * - * @return StaticReflectionParser A static reflection parser for the declaring class. - * - * @throws ReflectionException - */ - public function getStaticReflectionParserForDeclaringClass($type, $name) - { - $this->parse(); - if (isset($this->docComment[$type][$name])) { - return $this; - } - if (!empty($this->parentClassName)) { - return $this->getParentStaticReflectionParser()->getStaticReflectionParserForDeclaringClass($type, $name); - } - throw new ReflectionException('Invalid ' . $type . ' "' . $name . '"'); - } -} diff --git a/core/vendor/doctrine/common/lib/Doctrine/Common/Reflection/StaticReflectionProperty.php b/core/vendor/doctrine/common/lib/Doctrine/Common/Reflection/StaticReflectionProperty.php deleted file mode 100644 index 1664822..0000000 --- a/core/vendor/doctrine/common/lib/Doctrine/Common/Reflection/StaticReflectionProperty.php +++ /dev/null @@ -1,178 +0,0 @@ -. - */ - -namespace Doctrine\Common\Reflection; - -use ReflectionProperty; -use ReflectionException; - -class StaticReflectionProperty extends ReflectionProperty -{ - /** - * The PSR-0 parser object. - * - * @var StaticReflectionParser - */ - protected $staticReflectionParser; - - /** - * The name of the property. - * - * @var string|null - */ - protected $propertyName; - - /** - * @param StaticReflectionParser $staticReflectionParser - * @param string|null $propertyName - */ - public function __construct(StaticReflectionParser $staticReflectionParser, $propertyName) - { - $this->staticReflectionParser = $staticReflectionParser; - $this->propertyName = $propertyName; - } - - /** - * {@inheritDoc} - */ - public function getName() - { - return $this->propertyName; - } - - /** - * @return StaticReflectionParser - */ - protected function getStaticReflectionParser() - { - return $this->staticReflectionParser->getStaticReflectionParserForDeclaringClass('property', $this->propertyName); - } - - /** - * {@inheritDoc} - */ - public function getDeclaringClass() - { - return $this->getStaticReflectionParser()->getReflectionClass(); - } - - /** - * {@inheritDoc} - */ - public function getDocComment() - { - return $this->getStaticReflectionParser()->getDocComment('property', $this->propertyName); - } - - /** - * @return array - */ - public function getUseStatements() - { - return $this->getStaticReflectionParser()->getUseStatements(); - } - - /** - * {@inheritDoc} - */ - public static function export ($class, $name, $return = false) - { - throw new ReflectionException('Method not implemented'); - } - - /** - * {@inheritDoc} - */ - public function getModifiers() - { - throw new ReflectionException('Method not implemented'); - } - - /** - * {@inheritDoc} - */ - public function getValue($object = null) - { - throw new ReflectionException('Method not implemented'); - } - - /** - * {@inheritDoc} - */ - public function isDefault() - { - throw new ReflectionException('Method not implemented'); - } - - /** - * {@inheritDoc} - */ - public function isPrivate() - { - throw new ReflectionException('Method not implemented'); - } - - /** - * {@inheritDoc} - */ - public function isProtected() - { - throw new ReflectionException('Method not implemented'); - } - - /** - * {@inheritDoc} - */ - public function isPublic() - { - throw new ReflectionException('Method not implemented'); - } - - /** - * {@inheritDoc} - */ - public function isStatic() - { - throw new ReflectionException('Method not implemented'); - } - - /** - * {@inheritDoc} - */ - public function setAccessible ($accessible) - { - throw new ReflectionException('Method not implemented'); - } - - /** - * {@inheritDoc} - */ - public function setValue ($object, $value = null) - { - throw new ReflectionException('Method not implemented'); - } - - /** - * {@inheritDoc} - */ - public function __toString() - { - throw new ReflectionException('Method not implemented'); - } -} diff --git a/core/vendor/doctrine/common/lib/Doctrine/Common/Util/ClassUtils.php b/core/vendor/doctrine/common/lib/Doctrine/Common/Util/ClassUtils.php deleted file mode 100644 index 49dc7bb..0000000 --- a/core/vendor/doctrine/common/lib/Doctrine/Common/Util/ClassUtils.php +++ /dev/null @@ -1,109 +0,0 @@ -. - */ - -namespace Doctrine\Common\Util; - -use Doctrine\Common\Persistence\Proxy; - -/** - * Class and reflection related functionality for objects that - * might or not be proxy objects at the moment. - * - * @author Benjamin Eberlei - * @author Johannes Schmitt - */ -class ClassUtils -{ - /** - * Gets the real class name of a class name that could be a proxy. - * - * @param string $class - * - * @return string - */ - public static function getRealClass($class) - { - if (false === $pos = strrpos($class, '\\'.Proxy::MARKER.'\\')) { - return $class; - } - - return substr($class, $pos + Proxy::MARKER_LENGTH + 2); - } - - /** - * Gets the real class name of an object (even if its a proxy). - * - * @param object $object - * - * @return string - */ - public static function getClass($object) - { - return self::getRealClass(get_class($object)); - } - - /** - * Gets the real parent class name of a class or object. - * - * @param string $className - * - * @return string - */ - public static function getParentClass($className) - { - return get_parent_class( self::getRealClass( $className ) ); - } - - /** - * Creates a new reflection class. - * - * @param string $class - * - * @return \ReflectionClass - */ - public static function newReflectionClass($class) - { - return new \ReflectionClass( self::getRealClass( $class ) ); - } - - /** - * Creates a new reflection object. - * - * @param object $object - * - * @return \ReflectionObject - */ - public static function newReflectionObject($object) - { - return self::newReflectionClass( self::getClass( $object ) ); - } - - /** - * Given a class name and a proxy namespace returns the proxy name. - * - * @param string $className - * @param string $proxyNamespace - * - * @return string - */ - public static function generateProxyClassName($className, $proxyNamespace) - { - return rtrim($proxyNamespace, '\\') . '\\'.Proxy::MARKER.'\\' . ltrim($className, '\\'); - } -} diff --git a/core/vendor/doctrine/common/lib/Doctrine/Common/Util/Debug.php b/core/vendor/doctrine/common/lib/Doctrine/Common/Util/Debug.php deleted file mode 100644 index 0959ce5..0000000 --- a/core/vendor/doctrine/common/lib/Doctrine/Common/Util/Debug.php +++ /dev/null @@ -1,157 +0,0 @@ -. - */ - -namespace Doctrine\Common\Util; - -use Doctrine\Common\Persistence\Proxy; - -/** - * Static class containing most used debug methods. - * - * @link www.doctrine-project.org - * @since 2.0 - * @author Guilherme Blanco - * @author Jonathan Wage - * @author Roman Borschel - * @author Giorgio Sironi - */ -final class Debug -{ - /** - * Private constructor (prevents instantiation). - */ - private function __construct() - { - } - - /** - * Prints a dump of the public, protected and private properties of $var. - * - * @link http://xdebug.org/ - * - * @param mixed $var The variable to dump. - * @param integer $maxDepth The maximum nesting level for object properties. - * @param boolean $stripTags Whether output should strip HTML tags. - * @param boolean $echo Send the dumped value to the output buffer - * - * @return string - */ - public static function dump($var, $maxDepth = 2, $stripTags = true, $echo = true) - { - $html = ini_get('html_errors'); - - if ($html !== true) { - ini_set('html_errors', true); - } - - if (extension_loaded('xdebug')) { - ini_set('xdebug.var_display_max_depth', $maxDepth); - } - - $var = self::export($var, $maxDepth++); - - ob_start(); - var_dump($var); - - $dump = ob_get_contents(); - - ob_end_clean(); - - $dumpText = ($stripTags ? strip_tags(html_entity_decode($dump)) : $dump); - - ini_set('html_errors', $html); - - if ($echo) { - echo $dumpText; - } - - return $dumpText; - } - - /** - * @param mixed $var - * @param int $maxDepth - * - * @return mixed - */ - public static function export($var, $maxDepth) - { - $return = null; - $isObj = is_object($var); - - if ($isObj && in_array('Doctrine\Common\Collections\Collection', class_implements($var))) { - $var = $var->toArray(); - } - - if ($maxDepth) { - if (is_array($var)) { - $return = array(); - - foreach ($var as $k => $v) { - $return[$k] = self::export($v, $maxDepth - 1); - } - } else if ($isObj) { - $return = new \stdclass(); - if ($var instanceof \DateTime) { - $return->__CLASS__ = "DateTime"; - $return->date = $var->format('c'); - $return->timezone = $var->getTimeZone()->getName(); - } else { - $reflClass = ClassUtils::newReflectionObject($var); - $return->__CLASS__ = ClassUtils::getClass($var); - - if ($var instanceof Proxy) { - $return->__IS_PROXY__ = true; - $return->__PROXY_INITIALIZED__ = $var->__isInitialized(); - } - - if ($var instanceof \ArrayObject || $var instanceof \ArrayIterator) { - $return->__STORAGE__ = self::export($var->getArrayCopy(), $maxDepth - 1); - } - - foreach ($reflClass->getProperties() as $reflProperty) { - $name = $reflProperty->getName(); - - $reflProperty->setAccessible(true); - $return->$name = self::export($reflProperty->getValue($var), $maxDepth - 1); - } - } - } else { - $return = $var; - } - } else { - $return = is_object($var) ? get_class($var) - : (is_array($var) ? 'Array(' . count($var) . ')' : $var); - } - - return $return; - } - - /** - * Returns a string representation of an object. - * - * @param object $obj - * - * @return string - */ - public static function toString($obj) - { - return method_exists($obj, '__toString') ? (string) $obj : get_class($obj) . '@' . spl_object_hash($obj); - } -} diff --git a/core/vendor/doctrine/common/lib/Doctrine/Common/Util/Inflector.php b/core/vendor/doctrine/common/lib/Doctrine/Common/Util/Inflector.php deleted file mode 100644 index 082dc78..0000000 --- a/core/vendor/doctrine/common/lib/Doctrine/Common/Util/Inflector.php +++ /dev/null @@ -1,31 +0,0 @@ -. - */ - -namespace Doctrine\Common\Util; - -use Doctrine\Common\Inflector\Inflector as BaseInflector; - -/** - * Doctrine inflector has static methods for inflecting text. - * - * Kept for backwards compatibility reasons, was moved to its own component. - */ -class Inflector extends BaseInflector -{ -} diff --git a/core/vendor/doctrine/common/lib/Doctrine/Common/Version.php b/core/vendor/doctrine/common/lib/Doctrine/Common/Version.php deleted file mode 100644 index bc9e2bd..0000000 --- a/core/vendor/doctrine/common/lib/Doctrine/Common/Version.php +++ /dev/null @@ -1,53 +0,0 @@ -. - */ - -namespace Doctrine\Common; - -/** - * Class to store and retrieve the version of Doctrine. - * - * @link www.doctrine-project.org - * @since 2.0 - * @author Benjamin Eberlei - * @author Guilherme Blanco - * @author Jonathan Wage - * @author Roman Borschel - */ -class Version -{ - /** - * Current Doctrine Version. - */ - const VERSION = '2.5.0-DEV'; - - /** - * Compares a Doctrine version with the current one. - * - * @param string $version Doctrine version to compare. - * - * @return int -1 if older, 0 if it is the same, 1 if version passed as argument is newer. - */ - public static function compare($version) - { - $currentVersion = str_replace(' ', '', strtolower(self::VERSION)); - $version = str_replace(' ', '', $version); - - return version_compare($version, $currentVersion); - } -} diff --git a/core/vendor/doctrine/common/phpunit.xml.dist b/core/vendor/doctrine/common/phpunit.xml.dist deleted file mode 100644 index b9d3b34..0000000 --- a/core/vendor/doctrine/common/phpunit.xml.dist +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - ./tests/Doctrine/ - - - - - - ./lib/Doctrine/ - - - - - - performance - - - diff --git a/core/vendor/doctrine/common/tests/.gitignore b/core/vendor/doctrine/common/tests/.gitignore deleted file mode 100644 index 7210405..0000000 --- a/core/vendor/doctrine/common/tests/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -Doctrine/Tests/Proxies/ -Doctrine/Tests/ORM/Proxy/generated/ -Doctrine/Tests/ORM/Tools/Export/export diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/ClassLoaderTest.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/ClassLoaderTest.php deleted file mode 100644 index 1eb2216..0000000 --- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/ClassLoaderTest.php +++ /dev/null @@ -1,64 +0,0 @@ -setIncludePath(__DIR__); - $classLoader->setFileExtension('.class.php'); - $classLoader->setNamespaceSeparator('_'); - - $this->assertTrue($classLoader->canLoadClass('ClassLoaderTest_ClassA')); - $this->assertTrue($classLoader->canLoadClass('ClassLoaderTest_ClassB')); - $this->assertTrue($classLoader->canLoadClass('ClassLoaderTest_ClassC')); - $this->assertFalse($classLoader->canLoadClass('OtherClass')); - $this->assertEquals($classLoader->loadClass('ClassLoaderTest_ClassA'), true); - $this->assertEquals($classLoader->loadClass('ClassLoaderTest_ClassB'), true); - $this->assertEquals($classLoader->loadClass('ClassLoaderTest_ClassC'), true); - } - - public function testClassExists() - { - $this->assertFalse(ClassLoader::classExists('ClassLoaderTest\ClassD')); - $badLoader = function($className) { - require __DIR__ . '/ClassLoaderTest/ClassD.php'; - return true; - }; - spl_autoload_register($badLoader); - $this->assertTrue(ClassLoader::classExists('ClassLoaderTest\ClassD')); - spl_autoload_unregister($badLoader); - } - - public function testGetClassLoader() - { - $cl = new ClassLoader('ClassLoaderTest', __DIR__); - $cl->register(); - $this->assertTrue(ClassLoader::getClassLoader('ClassLoaderTest\ClassD') instanceof \Doctrine\Common\ClassLoader); - $this->assertNull(ClassLoader::getClassLoader('This\Class\Does\Not\Exist')); - $cl->unregister(); - } - - public function testClassExistsWithSilentAutoloader() - { - $test = $this; - $silentLoader = function ($className) use ($test) { - $test->assertSame('ClassLoaderTest\ClassE', $className); - require __DIR__ . '/ClassLoaderTest/ClassE.php'; - }; - $additionalLoader = function () use ($test) { - $test->fail('Should not call this loader, class was already loaded'); - }; - - $this->assertFalse(ClassLoader::classExists('ClassLoaderTest\ClassE')); - spl_autoload_register($silentLoader); - spl_autoload_register($additionalLoader); - $this->assertTrue(ClassLoader::classExists('ClassLoaderTest\ClassE')); - spl_autoload_unregister($additionalLoader); - spl_autoload_unregister($silentLoader); - } -} diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/ClassLoaderTest/ClassA.class.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/ClassLoaderTest/ClassA.class.php deleted file mode 100644 index 8554654..0000000 --- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/ClassLoaderTest/ClassA.class.php +++ /dev/null @@ -1,6 +0,0 @@ -_eventManager = new EventManager; - $this->_preFooInvoked = false; - $this->_postFooInvoked = false; - } - - public function testInitialState() - { - $this->assertEquals(array(), $this->_eventManager->getListeners()); - $this->assertFalse($this->_eventManager->hasListeners(self::preFoo)); - $this->assertFalse($this->_eventManager->hasListeners(self::postFoo)); - } - - public function testAddEventListener() - { - $this->_eventManager->addEventListener(array('preFoo', 'postFoo'), $this); - $this->assertTrue($this->_eventManager->hasListeners(self::preFoo)); - $this->assertTrue($this->_eventManager->hasListeners(self::postFoo)); - $this->assertEquals(1, count($this->_eventManager->getListeners(self::preFoo))); - $this->assertEquals(1, count($this->_eventManager->getListeners(self::postFoo))); - $this->assertEquals(2, count($this->_eventManager->getListeners())); - } - - public function testDispatchEvent() - { - $this->_eventManager->addEventListener(array('preFoo', 'postFoo'), $this); - $this->_eventManager->dispatchEvent(self::preFoo); - $this->assertTrue($this->_preFooInvoked); - $this->assertFalse($this->_postFooInvoked); - } - - public function testRemoveEventListener() - { - $this->_eventManager->addEventListener(array('preBar'), $this); - $this->assertTrue($this->_eventManager->hasListeners(self::preBar)); - $this->_eventManager->removeEventListener(array('preBar'), $this); - $this->assertFalse($this->_eventManager->hasListeners(self::preBar)); - } - - public function testAddEventSubscriber() - { - $eventSubscriber = new TestEventSubscriber(); - $this->_eventManager->addEventSubscriber($eventSubscriber); - $this->assertTrue($this->_eventManager->hasListeners(self::preFoo)); - $this->assertTrue($this->_eventManager->hasListeners(self::postFoo)); - } - - /* Listener methods */ - - public function preFoo(EventArgs $e) - { - $this->_preFooInvoked = true; - } - - public function postFoo(EventArgs $e) - { - $this->_postFooInvoked = true; - } -} - -class TestEventSubscriber implements \Doctrine\Common\EventSubscriber -{ - public function getSubscribedEvents() - { - return array('preFoo', 'postFoo'); - } -} \ No newline at end of file diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Persistence/Mapping/ChainDriverTest.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Persistence/Mapping/ChainDriverTest.php deleted file mode 100644 index f9edd10..0000000 --- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Persistence/Mapping/ChainDriverTest.php +++ /dev/null @@ -1,152 +0,0 @@ -getMock('Doctrine\Common\Persistence\Mapping\ClassMetadata'); - - $chain = new MappingDriverChain(); - - $driver1 = $this->getMock('Doctrine\Common\Persistence\Mapping\Driver\MappingDriver'); - $driver1->expects($this->never()) - ->method('loadMetadataForClass'); - $driver1->expectS($this->never()) - ->method('isTransient'); - - $driver2 = $this->getMock('Doctrine\Common\Persistence\Mapping\Driver\MappingDriver'); - $driver2->expects($this->at(0)) - ->method('loadMetadataForClass') - ->with($this->equalTo($className), $this->equalTo($classMetadata)); - $driver2->expects($this->at(1)) - ->method('isTransient') - ->with($this->equalTo($className)) - ->will($this->returnValue( true )); - - $chain->addDriver($driver1, 'Doctrine\Tests\Models\Company'); - $chain->addDriver($driver2, 'Doctrine\Tests\Common\Persistence\Mapping'); - - $chain->loadMetadataForClass($className, $classMetadata); - - $this->assertTrue( $chain->isTransient($className) ); - } - - public function testLoadMetadata_NoDelegatorFound_ThrowsMappingException() - { - $className = 'Doctrine\Tests\Common\Persistence\Mapping\DriverChainEntity'; - $classMetadata = $this->getMock('Doctrine\Common\Persistence\Mapping\ClassMetadata'); - - $chain = new MappingDriverChain(); - - $this->setExpectedException('Doctrine\Common\Persistence\Mapping\MappingException'); - $chain->loadMetadataForClass($className, $classMetadata); - } - - public function testGatherAllClassNames() - { - $className = 'Doctrine\Tests\Common\Persistence\Mapping\DriverChainEntity'; - $classMetadata = $this->getMock('Doctrine\Common\Persistence\ClassMetadata'); - - $chain = new MappingDriverChain(); - - $driver1 = $this->getMock('Doctrine\Common\Persistence\Mapping\Driver\MappingDriver'); - $driver1->expects($this->once()) - ->method('getAllClassNames') - ->will($this->returnValue(array('Doctrine\Tests\Models\Company\Foo'))); - - $driver2 = $this->getMock('Doctrine\Common\Persistence\Mapping\Driver\MappingDriver'); - $driver2->expects($this->once()) - ->method('getAllClassNames') - ->will($this->returnValue(array('Doctrine\Tests\ORM\Mapping\Bar', 'Doctrine\Tests\ORM\Mapping\Baz', 'FooBarBaz'))); - - $chain->addDriver($driver1, 'Doctrine\Tests\Models\Company'); - $chain->addDriver($driver2, 'Doctrine\Tests\ORM\Mapping'); - - $this->assertEquals(array( - 'Doctrine\Tests\Models\Company\Foo', - 'Doctrine\Tests\ORM\Mapping\Bar', - 'Doctrine\Tests\ORM\Mapping\Baz' - ), $chain->getAllClassNames()); - } - - /** - * @group DDC-706 - */ - public function testIsTransient() - { - $driver1 = $this->getMock('Doctrine\Common\Persistence\Mapping\Driver\MappingDriver'); - $chain = new MappingDriverChain(); - $chain->addDriver($driver1, 'Doctrine\Tests\Models\CMS'); - - $this->assertTrue($chain->isTransient('stdClass'), "stdClass isTransient"); - } - - /** - * @group DDC-1412 - */ - public function testDefaultDriver() - { - $companyDriver = $this->getMock('Doctrine\Common\Persistence\Mapping\Driver\MappingDriver'); - $defaultDriver = $this->getMock('Doctrine\Common\Persistence\Mapping\Driver\MappingDriver'); - $entityClassName = 'Doctrine\Tests\ORM\Mapping\DriverChainEntity'; - $managerClassName = 'Doctrine\Tests\Models\Company\CompanyManager'; - $chain = new MappingDriverChain(); - - $companyDriver->expects($this->never()) - ->method('loadMetadataForClass'); - $companyDriver->expects($this->once()) - ->method('isTransient') - ->with($this->equalTo($managerClassName)) - ->will($this->returnValue(false)); - - $defaultDriver->expects($this->never()) - ->method('loadMetadataForClass'); - $defaultDriver->expects($this->once()) - ->method('isTransient') - ->with($this->equalTo($entityClassName)) - ->will($this->returnValue(true)); - - $this->assertNull($chain->getDefaultDriver()); - - $chain->setDefaultDriver($defaultDriver); - $chain->addDriver($companyDriver, 'Doctrine\Tests\Models\Company'); - - $this->assertSame($defaultDriver, $chain->getDefaultDriver()); - - $this->assertTrue($chain->isTransient($entityClassName)); - $this->assertFalse($chain->isTransient($managerClassName)); - } - - public function testDefaultDriverGetAllClassNames() - { - $companyDriver = $this->getMock('Doctrine\Common\Persistence\Mapping\Driver\MappingDriver'); - $defaultDriver = $this->getMock('Doctrine\Common\Persistence\Mapping\Driver\MappingDriver'); - $chain = new MappingDriverChain(); - - $companyDriver->expects($this->once()) - ->method('getAllClassNames') - ->will($this->returnValue(array('Doctrine\Tests\Models\Company\Foo'))); - - $defaultDriver->expects($this->once()) - ->method('getAllClassNames') - ->will($this->returnValue(array('Other\Class'))); - - $chain->setDefaultDriver($defaultDriver); - $chain->addDriver($companyDriver, 'Doctrine\Tests\Models\Company'); - - $classNames = $chain->getAllClassNames(); - - $this->assertEquals(array('Doctrine\Tests\Models\Company\Foo', 'Other\Class'), $classNames); - } -} - -class DriverChainEntity -{ - -} diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Persistence/Mapping/ClassMetadataFactoryTest.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Persistence/Mapping/ClassMetadataFactoryTest.php deleted file mode 100644 index c5a457f..0000000 --- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Persistence/Mapping/ClassMetadataFactoryTest.php +++ /dev/null @@ -1,145 +0,0 @@ -getMock('Doctrine\Common\Persistence\Mapping\Driver\MappingDriver'); - $metadata = $this->getMock('Doctrine\Common\Persistence\Mapping\ClassMetadata'); - $this->cmf = new TestClassMetadataFactory($driver, $metadata); - } - - public function testGetCacheDriver() - { - $this->assertNull($this->cmf->getCacheDriver()); - $cache = new ArrayCache(); - $this->cmf->setCacheDriver($cache); - $this->assertSame($cache, $this->cmf->getCacheDriver()); - } - - public function testGetMetadataFor() - { - $metadata = $this->cmf->getMetadataFor('stdClass'); - - $this->assertInstanceOf('Doctrine\Common\Persistence\Mapping\ClassMetadata', $metadata); - $this->assertTrue($this->cmf->hasMetadataFor('stdClass')); - } - - public function testGetMetadataForAbsentClass() - { - $this->setExpectedException('Doctrine\Common\Persistence\Mapping\MappingException'); - $this->cmf->getMetadataFor(__NAMESPACE__ . '\AbsentClass'); - } - - public function testGetParentMetadata() - { - $metadata = $this->cmf->getMetadataFor(__NAMESPACE__ . '\ChildEntity'); - - $this->assertInstanceOf('Doctrine\Common\Persistence\Mapping\ClassMetadata', $metadata); - $this->assertTrue($this->cmf->hasMetadataFor(__NAMESPACE__ . '\ChildEntity')); - $this->assertTrue($this->cmf->hasMetadataFor(__NAMESPACE__ . '\RootEntity')); - } - - public function testGetCachedMetadata() - { - $metadata = $this->getMock('Doctrine\Common\Persistence\Mapping\ClassMetadata'); - $cache = new ArrayCache(); - $cache->save(__NAMESPACE__. '\ChildEntity$CLASSMETADATA', $metadata); - - $this->cmf->setCacheDriver($cache); - - $loadedMetadata = $this->cmf->getMetadataFor(__NAMESPACE__ . '\ChildEntity'); - $this->assertSame($loadedMetadata, $metadata); - } - - public function testCacheGetMetadataFor() - { - $cache = new ArrayCache(); - $this->cmf->setCacheDriver($cache); - - $loadedMetadata = $this->cmf->getMetadataFor(__NAMESPACE__ . '\ChildEntity'); - - $this->assertSame($loadedMetadata, $cache->fetch(__NAMESPACE__. '\ChildEntity$CLASSMETADATA')); - } - - public function testGetAliasedMetadata() - { - $loadedMetadata = $this->cmf->getMetadataFor('prefix:ChildEntity'); - - $this->assertTrue($this->cmf->hasMetadataFor(__NAMESPACE__ . '\ChildEntity')); - $this->assertTrue($this->cmf->hasMetadataFor('prefix:ChildEntity')); - } -} - -class TestClassMetadataFactory extends AbstractClassMetadataFactory -{ - public $driver; - public $metadata; - - public function __construct($driver, $metadata) - { - $this->driver = $driver; - $this->metadata = $metadata; - } - - protected function doLoadMetadata($class, $parent, $rootEntityFound, array $nonSuperclassParents) - { - - } - - protected function getFqcnFromAlias($namespaceAlias, $simpleClassName) - { - return __NAMESPACE__ . '\\' . $simpleClassName; - } - - protected function initialize() - { - - } - - protected function newClassMetadataInstance($className) - { - return $this->metadata; - } - - protected function getDriver() - { - return $this->driver; - } - protected function wakeupReflection(ClassMetadata $class, ReflectionService $reflService) - { - } - - protected function initializeReflection(ClassMetadata $class, ReflectionService $reflService) - { - } - - protected function isEntity(ClassMetadata $class) - { - return true; - } -} - -class RootEntity -{ - -} - -class ChildEntity extends RootEntity -{ - -} diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Persistence/Mapping/DefaultFileLocatorTest.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Persistence/Mapping/DefaultFileLocatorTest.php deleted file mode 100644 index 37072de..0000000 --- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Persistence/Mapping/DefaultFileLocatorTest.php +++ /dev/null @@ -1,90 +0,0 @@ -assertEquals(array($path), $locator->getPaths()); - - $locator = new DefaultFileLocator($path); - $this->assertEquals(array($path), $locator->getPaths()); - } - - public function testGetFileExtension() - { - $locator = new DefaultFileLocator(array(), ".yml"); - $this->assertEquals(".yml", $locator->getFileExtension()); - $locator->setFileExtension(".xml"); - $this->assertEquals(".xml", $locator->getFileExtension()); - } - - public function testUniquePaths() - { - $path = __DIR__ . "/_files"; - - $locator = new DefaultFileLocator(array($path, $path)); - $this->assertEquals(array($path), $locator->getPaths()); - } - - public function testFindMappingFile() - { - $path = __DIR__ . "/_files"; - - $locator = new DefaultFileLocator(array($path), ".yml"); - - $this->assertEquals(__DIR__ . '/_files' . DIRECTORY_SEPARATOR . 'stdClass.yml', $locator->findMappingFile('stdClass')); - } - - public function testFindMappingFileNotFound() - { - $path = __DIR__ . "/_files"; - - $locator = new DefaultFileLocator(array($path), ".yml"); - - $this->setExpectedException( - 'Doctrine\Common\Persistence\Mapping\MappingException', - "No mapping file found named 'stdClass2.yml' for class 'stdClass2'" - ); - $locator->findMappingFile('stdClass2'); - } - - public function testGetAllClassNames() - { - $path = __DIR__ . "/_files"; - - $locator = new DefaultFileLocator(array($path), ".yml"); - $classes = $locator->getAllClassNames(null); - sort($classes); - - $this->assertEquals(array('global', 'stdClass'), $classes); - $this->assertEquals(array('stdClass'), $locator->getAllClassNames("global")); - } - - public function testGetAllClassNamesNonMatchingFileExtension() - { - $path = __DIR__ . "/_files"; - - $locator = new DefaultFileLocator(array($path), ".xml"); - $this->assertEquals(array(), $locator->getAllClassNames("global")); - } - - public function testFileExists() - { - $path = __DIR__ . "/_files"; - - $locator = new DefaultFileLocator(array($path), ".yml"); - - $this->assertTrue($locator->fileExists("stdClass")); - $this->assertFalse($locator->fileExists("stdClass2")); - $this->assertTrue($locator->fileExists("global")); - $this->assertFalse($locator->fileExists("global2")); - } -} diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Persistence/Mapping/FileDriverTest.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Persistence/Mapping/FileDriverTest.php deleted file mode 100644 index 020c242..0000000 --- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Persistence/Mapping/FileDriverTest.php +++ /dev/null @@ -1,142 +0,0 @@ -assertNull($driver->getGlobalBasename()); - - $driver->setGlobalBasename("global"); - $this->assertEquals("global", $driver->getGlobalBasename()); - } - - public function testGetElementFromGlobalFile() - { - $driver = new TestFileDriver($this->newLocator()); - $driver->setGlobalBasename("global"); - - $element = $driver->getElement('stdGlobal'); - - $this->assertEquals('stdGlobal', $element); - } - - public function testGetElementFromFile() - { - $locator = $this->newLocator(); - $locator->expects($this->once()) - ->method('findMappingFile') - ->with($this->equalTo('stdClass')) - ->will($this->returnValue(__DIR__ . '/_files/stdClass.yml')); - - $driver = new TestFileDriver($locator); - - $this->assertEquals('stdClass', $driver->getElement('stdClass')); - } - - public function testGetAllClassNamesGlobalBasename() - { - $driver = new TestFileDriver($this->newLocator()); - $driver->setGlobalBasename("global"); - - $classNames = $driver->getAllClassNames(); - - $this->assertEquals(array('stdGlobal', 'stdGlobal2'), $classNames); - } - - public function testGetAllClassNamesFromMappingFile() - { - $locator = $this->newLocator(); - $locator->expects($this->any()) - ->method('getAllClassNames') - ->with($this->equalTo(null)) - ->will($this->returnValue(array('stdClass'))); - $driver = new TestFileDriver($locator); - - $classNames = $driver->getAllClassNames(); - - $this->assertEquals(array('stdClass'), $classNames); - } - - public function testGetAllClassNamesBothSources() - { - $locator = $this->newLocator(); - $locator->expects($this->any()) - ->method('getAllClassNames') - ->with($this->equalTo('global')) - ->will($this->returnValue(array('stdClass'))); - $driver = new TestFileDriver($locator); - $driver->setGlobalBasename("global"); - - $classNames = $driver->getAllClassNames(); - - $this->assertEquals(array('stdGlobal', 'stdGlobal2', 'stdClass'), $classNames); - } - - public function testIsNotTransient() - { - $locator = $this->newLocator(); - $locator->expects($this->once()) - ->method('fileExists') - ->with($this->equalTo('stdClass')) - ->will($this->returnValue( true )); - - $driver = new TestFileDriver($locator); - $driver->setGlobalBasename("global"); - - $this->assertFalse($driver->isTransient('stdClass')); - $this->assertFalse($driver->isTransient('stdGlobal')); - $this->assertFalse($driver->isTransient('stdGlobal2')); - } - - public function testIsTransient() - { - $locator = $this->newLocator(); - $locator->expects($this->once()) - ->method('fileExists') - ->with($this->equalTo('stdClass2')) - ->will($this->returnValue( false )); - - $driver = new TestFileDriver($locator); - - $this->assertTrue($driver->isTransient('stdClass2')); - } - - public function testNonLocatorFallback() - { - $driver = new TestFileDriver(__DIR__ . '/_files', '.yml'); - $this->assertTrue($driver->isTransient('stdClass2')); - $this->assertFalse($driver->isTransient('stdClass')); - } - - private function newLocator() - { - $locator = $this->getMock('Doctrine\Common\Persistence\Mapping\Driver\FileLocator'); - $locator->expects($this->any())->method('getFileExtension')->will($this->returnValue('.yml')); - $locator->expects($this->any())->method('getPaths')->will($this->returnValue(array(__DIR__ . "/_files"))); - return $locator; - } -} - -class TestFileDriver extends FileDriver -{ - protected function loadMappingFile($file) - { - if (strpos($file, "global.yml") !== false) { - return array('stdGlobal' => 'stdGlobal', 'stdGlobal2' => 'stdGlobal2'); - } - return array('stdClass' => 'stdClass'); - } - - public function loadMetadataForClass($className, ClassMetadata $metadata) - { - - } -} \ No newline at end of file diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Persistence/Mapping/PHPDriverTest.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Persistence/Mapping/PHPDriverTest.php deleted file mode 100644 index 8fc4d80..0000000 --- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Persistence/Mapping/PHPDriverTest.php +++ /dev/null @@ -1,18 +0,0 @@ -getMock('Doctrine\Common\Persistence\Mapping\ClassMetadata'); - $metadata->expects($this->once())->method('getFieldNames'); - - $driver = new PHPDriver(array(__DIR__ . "/_files")); - $driver->loadMetadataForClass('TestEntity', $metadata); - } -} \ No newline at end of file diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Persistence/Mapping/RuntimeReflectionServiceTest.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Persistence/Mapping/RuntimeReflectionServiceTest.php deleted file mode 100644 index 767ccd6..0000000 --- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Persistence/Mapping/RuntimeReflectionServiceTest.php +++ /dev/null @@ -1,84 +0,0 @@ -. - */ - -namespace Doctrine\Tests\Common\Persistence\Mapping; - -use Doctrine\Common\Persistence\Mapping\RuntimeReflectionService; - -/** - * @group DCOM-93 - */ -class RuntimeReflectionServiceTest extends \PHPUnit_Framework_TestCase -{ - /** - * @var RuntimeReflectionService - */ - private $reflectionService; - - public $unusedPublicProperty; - - public function setUp() - { - $this->reflectionService = new RuntimeReflectionService(); - } - - public function testShortname() - { - $this->assertEquals("RuntimeReflectionServiceTest", $this->reflectionService->getClassShortName(__CLASS__)); - } - - public function testClassNamespaceName() - { - $this->assertEquals("Doctrine\Tests\Common\Persistence\Mapping", $this->reflectionService->getClassNamespace(__CLASS__)); - } - - public function testGetParentClasses() - { - $classes = $this->reflectionService->getParentClasses(__CLASS__); - $this->assertTrue(count($classes) >= 1, "The test class ".__CLASS__." should have at least one parent."); - } - - public function testGetParentClassesForAbsentClass() - { - $this->setExpectedException('Doctrine\Common\Persistence\Mapping\MappingException'); - $this->reflectionService->getParentClasses(__NAMESPACE__ . '\AbsentClass'); - } - - public function testGetReflectionClass() - { - $class = $this->reflectionService->getClass(__CLASS__); - $this->assertInstanceOf("ReflectionClass", $class); - } - - public function testGetMethods() - { - $this->assertTrue($this->reflectionService->hasPublicMethod(__CLASS__, "testGetMethods")); - $this->assertFalse($this->reflectionService->hasPublicMethod(__CLASS__, "testGetMethods2")); - } - - public function testGetAccessibleProperty() - { - $reflProp = $this->reflectionService->getAccessibleProperty(__CLASS__, "reflectionService"); - $this->assertInstanceOf("ReflectionProperty", $reflProp); - - $reflProp = $this->reflectionService->getAccessibleProperty(__CLASS__, "unusedPublicProperty"); - $this->assertInstanceOf("Doctrine\Common\Reflection\RuntimePublicReflectionProperty", $reflProp); - } -} - diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Persistence/Mapping/StaticPHPDriverTest.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Persistence/Mapping/StaticPHPDriverTest.php deleted file mode 100644 index 9f1c568..0000000 --- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Persistence/Mapping/StaticPHPDriverTest.php +++ /dev/null @@ -1,35 +0,0 @@ -getMock('Doctrine\Common\Persistence\Mapping\ClassMetadata'); - $metadata->expects($this->once())->method('getFieldNames'); - - $driver = new StaticPHPDriver(array(__DIR__)); - $driver->loadMetadataForClass(__NAMESPACE__ . '\\TestEntity', $metadata); - } - - public function testGetAllClassNames() - { - $driver = new StaticPHPDriver(array(__DIR__)); - $classNames = $driver->getAllClassNames(); - - $this->assertContains( - 'Doctrine\Tests\Common\Persistence\Mapping\TestEntity', $classNames); - } -} - -class TestEntity -{ - static public function loadMetadata($metadata) - { - $metadata->getFieldNames(); - } -} \ No newline at end of file diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Persistence/Mapping/StaticReflectionServiceTest.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Persistence/Mapping/StaticReflectionServiceTest.php deleted file mode 100644 index 1dd7a7a..0000000 --- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Persistence/Mapping/StaticReflectionServiceTest.php +++ /dev/null @@ -1,70 +0,0 @@ -. - */ - -namespace Doctrine\Tests\Common\Persistence\Mapping; - -use Doctrine\Common\Persistence\Mapping\StaticReflectionService; - -/** - * @group DCOM-93 - */ -class StaticReflectionServiceTest extends \PHPUnit_Framework_TestCase -{ - private $reflectionService; - - public function setUp() - { - $this->reflectionService = new StaticReflectionService(); - } - - public function testShortname() - { - $this->assertEquals("StaticReflectionServiceTest", $this->reflectionService->getClassShortName(__CLASS__)); - } - - public function testClassNamespaceName() - { - $this->assertEquals("Doctrine\Tests\Common\Persistence\Mapping", $this->reflectionService->getClassNamespace(__CLASS__)); - } - - public function testGetParentClasses() - { - $classes = $this->reflectionService->getParentClasses(__CLASS__); - $this->assertTrue(count($classes) == 0, "The test class ".__CLASS__." should have no parents according to static reflection."); - } - - public function testGetReflectionClass() - { - $class = $this->reflectionService->getClass(__CLASS__); - $this->assertNull($class); - } - - public function testGetMethods() - { - $this->assertTrue($this->reflectionService->hasPublicMethod(__CLASS__, "testGetMethods")); - $this->assertFalse($this->reflectionService->hasPublicMethod(__CLASS__, "testGetMethods2")); - } - - public function testGetAccessibleProperty() - { - $reflProp = $this->reflectionService->getAccessibleProperty(__CLASS__, "reflectionService"); - $this->assertNull($reflProp); - } -} - diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Persistence/Mapping/SymfonyFileLocatorTest.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Persistence/Mapping/SymfonyFileLocatorTest.php deleted file mode 100644 index b51162e..0000000 --- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Persistence/Mapping/SymfonyFileLocatorTest.php +++ /dev/null @@ -1,88 +0,0 @@ - $prefix)); - $this->assertEquals(array($path), $locator->getPaths()); - - $locator = new SymfonyFileLocator(array($path => $prefix)); - $this->assertEquals(array($path), $locator->getPaths()); - } - - public function testGetPrefixes() - { - $path = __DIR__ . "/_files"; - $prefix = "Foo"; - - $locator = new SymfonyFileLocator(array($path => $prefix)); - $this->assertEquals(array($path => $prefix), $locator->getNamespacePrefixes()); - } - - public function testGetFileExtension() - { - $locator = new SymfonyFileLocator(array(), ".yml"); - $this->assertEquals(".yml", $locator->getFileExtension()); - $locator->setFileExtension(".xml"); - $this->assertEquals(".xml", $locator->getFileExtension()); - } - - public function testFileExists() - { - $path = __DIR__ . "/_files"; - $prefix = "Foo"; - - $locator = new SymfonyFileLocator(array($path => $prefix), ".yml"); - - $this->assertTrue($locator->fileExists("Foo\stdClass")); - $this->assertTrue($locator->fileExists("Foo\global")); - $this->assertFalse($locator->fileExists("Foo\stdClass2")); - $this->assertFalse($locator->fileExists("Foo\global2")); - } - - public function testGetAllClassNames() - { - $path = __DIR__ . "/_files"; - $prefix = "Foo"; - - $locator = new SymfonyFileLocator(array($path => $prefix), ".yml"); - $classes = $locator->getAllClassNames(null); - sort($classes); - - $this->assertEquals(array("Foo\\global", "Foo\\stdClass"), $classes); - $this->assertEquals(array("Foo\\stdClass"), $locator->getAllClassNames("global")); - } - - public function testFindMappingFile() - { - $path = __DIR__ . "/_files"; - $prefix = "Foo"; - - $locator = new SymfonyFileLocator(array($path => $prefix), ".yml"); - - $this->assertEquals(__DIR__ . "/_files/stdClass.yml", $locator->findMappingFile("Foo\\stdClass")); - } - - public function testFindMappingFileNotFound() - { - $path = __DIR__ . "/_files"; - $prefix = "Foo"; - - $locator = new SymfonyFileLocator(array($path => $prefix), ".yml"); - - $this->setExpectedException( - "Doctrine\Common\Persistence\Mapping\MappingException", - "No mapping file found named '".__DIR__."/_files/stdClass2.yml' for class 'Foo\stdClass2'." - ); - $locator->findMappingFile("Foo\\stdClass2"); - } -} diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Persistence/Mapping/_files/TestEntity.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Persistence/Mapping/_files/TestEntity.php deleted file mode 100644 index d0e9976..0000000 --- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Persistence/Mapping/_files/TestEntity.php +++ /dev/null @@ -1,3 +0,0 @@ -getFieldNames(); \ No newline at end of file diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Persistence/Mapping/_files/global.yml b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Persistence/Mapping/_files/global.yml deleted file mode 100644 index 30d74d2..0000000 --- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Persistence/Mapping/_files/global.yml +++ /dev/null @@ -1 +0,0 @@ -test \ No newline at end of file diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Persistence/Mapping/_files/stdClass.yml b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Persistence/Mapping/_files/stdClass.yml deleted file mode 100644 index 30d74d2..0000000 --- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Persistence/Mapping/_files/stdClass.yml +++ /dev/null @@ -1 +0,0 @@ -test \ No newline at end of file diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Persistence/ObjectManagerDecoratorTest.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Persistence/ObjectManagerDecoratorTest.php deleted file mode 100644 index 768b4d3..0000000 --- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Persistence/ObjectManagerDecoratorTest.php +++ /dev/null @@ -1,60 +0,0 @@ -wrapped = $wrapped; - } -} - -class ObjectManagerDecoratorTest extends \PHPUnit_Framework_TestCase -{ - private $wrapped; - private $decorated; - - public function setUp() - { - $this->wrapped = $this->getMock('Doctrine\Common\Persistence\ObjectManager'); - $this->decorated = new NullObjectManagerDecorator($this->wrapped); - } - - public function getMethodParameters() - { - $class = new \ReflectionClass('Doctrine\Common\Persistence\ObjectManager'); - - $methods = array(); - foreach ($class->getMethods() as $method) { - if ($method->getNumberOfRequiredParameters() === 0) { - $methods[] = array($method->getName(), array()); - } elseif ($method->getNumberOfRequiredParameters() > 0) { - $methods[] = array($method->getName(), array_fill(0, $method->getNumberOfRequiredParameters(), 'req') ?: array()); - } - if ($method->getNumberOfParameters() != $method->getNumberOfRequiredParameters()) { - $methods[] = array($method->getName(), array_fill(0, $method->getNumberOfParameters(), 'all') ?: array()); - } - } - - return $methods; - } - - /** - * @dataProvider getMethodParameters - */ - public function testAllMethodCallsAreDelegatedToTheWrappedInstance($method, array $parameters) - { - $stub = $this->wrapped - ->expects($this->once()) - ->method($method) - ->will($this->returnValue('INNER VALUE FROM ' . $method)); - - call_user_func_array(array($stub, 'with'), $parameters); - - $this->assertSame('INNER VALUE FROM ' . $method, call_user_func_array(array($this->decorated, $method), $parameters)); - } -} \ No newline at end of file diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Persistence/PersistentObjectTest.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Persistence/PersistentObjectTest.php deleted file mode 100644 index 180d0f0..0000000 --- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Persistence/PersistentObjectTest.php +++ /dev/null @@ -1,247 +0,0 @@ -cm = new TestObjectMetadata; - $this->om = $this->getMock('Doctrine\Common\Persistence\ObjectManager'); - $this->om->expects($this->any())->method('getClassMetadata') - ->will($this->returnValue($this->cm)); - $this->object = new TestObject; - PersistentObject::setObjectManager($this->om); - $this->object->injectObjectManager($this->om, $this->cm); - } - - public function testGetObjectManager() - { - $this->assertSame($this->om, PersistentObject::getObjectManager()); - } - - public function testNonMatchingObjectManager() - { - $this->setExpectedException('RuntimeException'); - $om = $this->getMock('Doctrine\Common\Persistence\ObjectManager'); - $this->object->injectObjectManager($om, $this->cm); - } - - public function testGetField() - { - $this->assertEquals('beberlei', $this->object->getName()); - } - - public function testSetField() - { - $this->object->setName("test"); - $this->assertEquals("test", $this->object->getName()); - } - - public function testGetIdentifier() - { - $this->assertEquals(1, $this->object->getId()); - } - - public function testSetIdentifier() - { - $this->setExpectedException('BadMethodCallException'); - $this->object->setId(2); - } - - public function testSetUnknownField() - { - $this->setExpectedException('BadMethodCallException'); - $this->object->setUnknown("test"); - } - - public function testGetUnknownField() - { - $this->setExpectedException('BadMethodCallException'); - $this->object->getUnknown(); - } - - public function testGetToOneAssociation() - { - $this->assertNull($this->object->getParent()); - } - - public function testSetToOneAssociation() - { - $parent = new TestObject(); - $this->object->setParent($parent); - $this->assertSame($parent, $this->object->getParent($parent)); - } - - public function testSetInvalidToOneAssociation() - { - $parent = new \stdClass(); - - $this->setExpectedException('InvalidArgumentException'); - $this->object->setParent($parent); - } - - public function testSetToOneAssociationNull() - { - $parent = new TestObject(); - $this->object->setParent($parent); - $this->object->setParent(null); - $this->assertNull($this->object->getParent()); - } - - public function testAddToManyAssociation() - { - $child = new TestObject(); - $this->object->addChildren($child); - - $this->assertSame($this->object, $child->getParent()); - $this->assertEquals(1, count($this->object->getChildren())); - - $child = new TestObject(); - $this->object->addChildren($child); - - $this->assertEquals(2, count($this->object->getChildren())); - } - - public function testAddInvalidToManyAssociation() - { - $this->setExpectedException('InvalidArgumentException'); - $this->object->addChildren(new \stdClass()); - } - - public function testNoObjectManagerSet() - { - PersistentObject::setObjectManager(null); - $child = new TestObject(); - - $this->setExpectedException('RuntimeException'); - $child->setName("test"); - } - - public function testInvalidMethod() - { - $this->setExpectedException('BadMethodCallException'); - $this->object->asdf(); - } - - public function testAddInvalidCollection() - { - $this->setExpectedException('BadMethodCallException'); - $this->object->addAsdf(new \stdClass()); - } -} - -class TestObject extends PersistentObject -{ - protected $id = 1; - protected $name = 'beberlei'; - protected $parent; - protected $children; -} - -class TestObjectMetadata implements ClassMetadata -{ - - public function getAssociationMappedByTargetField($assocName) - { - $assoc = array('children' => 'parent'); - return $assoc[$assocName]; - } - - public function getAssociationNames() - { - return array('parent', 'children'); - } - - public function getAssociationTargetClass($assocName) - { - return __NAMESPACE__ . '\TestObject'; - } - - public function getFieldNames() - { - return array('id', 'name'); - } - - public function getIdentifier() - { - return array('id'); - } - - public function getName() - { - return __NAMESPACE__ . '\TestObject'; - } - - public function getReflectionClass() - { - return new \ReflectionClass($this->getName()); - } - - public function getTypeOfField($fieldName) - { - $types = array('id' => 'integer', 'name' => 'string'); - return $types[$fieldName]; - } - - public function hasAssociation($fieldName) - { - return in_array($fieldName, array('parent', 'children')); - } - - public function hasField($fieldName) - { - return in_array($fieldName, array('id', 'name')); - } - - public function isAssociationInverseSide($assocName) - { - return ($assocName === 'children'); - } - - public function isCollectionValuedAssociation($fieldName) - { - return ($fieldName === 'children'); - } - - public function isIdentifier($fieldName) - { - return $fieldName === 'id'; - } - - public function isSingleValuedAssociation($fieldName) - { - return $fieldName === 'parent'; - } - - public function getIdentifierValues($entity) - { - - } - - public function getIdentifierFieldNames() - { - - } - - public function initializeReflection(ReflectionService $reflService) - { - - } - - public function wakeupReflection(ReflectionService $reflService) - { - - } -} diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Proxy/AbstractProxyFactoryTest.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Proxy/AbstractProxyFactoryTest.php deleted file mode 100644 index 6ae9316..0000000 --- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Proxy/AbstractProxyFactoryTest.php +++ /dev/null @@ -1,146 +0,0 @@ -getMock('Doctrine\Common\Persistence\Mapping\ClassMetadata'); - $proxyGenerator = $this->getMock('Doctrine\Common\Proxy\ProxyGenerator', array(), array(), '', false); - - $proxyGenerator - ->expects($this->once()) - ->method('getProxyFileName'); - $proxyGenerator - ->expects($this->once()) - ->method('generateProxyClass'); - - $metadataFactory = $this->getMock('Doctrine\Common\Persistence\Mapping\ClassMetadataFactory'); - $proxyFactory = $this->getMockForAbstractClass( - 'Doctrine\Common\Proxy\AbstractProxyFactory', - array($proxyGenerator, $metadataFactory, true) - ); - - $proxyFactory - ->expects($this->any()) - ->method('skipClass') - ->will($this->returnValue(false)); - - $generated = $proxyFactory->generateProxyClasses(array($metadata), sys_get_temp_dir()); - - $this->assertEquals(1, $generated, 'One proxy was generated'); - } - - public function testGetProxy() - { - $metadata = $this->getMock('Doctrine\Common\Persistence\Mapping\ClassMetadata'); - $proxy = $this->getMock('Doctrine\Common\Proxy\Proxy'); - $definition = new ProxyDefinition(get_class($proxy), array(), array(), null, null); - $proxyGenerator = $this->getMock('Doctrine\Common\Proxy\ProxyGenerator', array(), array(), '', false); - $metadataFactory = $this->getMock('Doctrine\Common\Persistence\Mapping\ClassMetadataFactory'); - - $metadataFactory - ->expects($this->once()) - ->method('getMetadataFor') - ->will($this->returnValue($metadata)); - - $proxyFactory = $this->getMockForAbstractClass( - 'Doctrine\Common\Proxy\AbstractProxyFactory', - array($proxyGenerator, $metadataFactory, true) - ); - - $proxyFactory - ->expects($this->any()) - ->method('createProxyDefinition') - ->will($this->returnValue($definition)); - - $generatedProxy = $proxyFactory->getProxy('Class', array('id' => 1)); - - $this->assertInstanceOf(get_class($proxy), $generatedProxy); - } - - public function testResetUnitializedProxy() - { - $metadata = $this->getMock('Doctrine\Common\Persistence\Mapping\ClassMetadata'); - $proxy = $this->getMock('Doctrine\Common\Proxy\Proxy'); - $definition = new ProxyDefinition(get_class($proxy), array(), array(), null, null); - $proxyGenerator = $this->getMock('Doctrine\Common\Proxy\ProxyGenerator', array(), array(), '', false); - $metadataFactory = $this->getMock('Doctrine\Common\Persistence\Mapping\ClassMetadataFactory'); - - $metadataFactory - ->expects($this->once()) - ->method('getMetadataFor') - ->will($this->returnValue($metadata)); - - $proxyFactory = $this->getMockForAbstractClass( - 'Doctrine\Common\Proxy\AbstractProxyFactory', - array($proxyGenerator, $metadataFactory, true) - ); - - $proxyFactory - ->expects($this->any()) - ->method('createProxyDefinition') - ->will($this->returnValue($definition)); - - $proxy - ->expects($this->once()) - ->method('__isInitialized') - ->will($this->returnValue(false)); - $proxy - ->expects($this->once()) - ->method('__setInitializer'); - $proxy - ->expects($this->once()) - ->method('__setCloner'); - - $proxyFactory->resetUninitializedProxy($proxy); - } - - public function testDisallowsResettingInitializedProxy() - { - $proxyFactory = $this->getMockForAbstractClass('Doctrine\Common\Proxy\AbstractProxyFactory', array(), '', false); - $proxy = $this->getMock('Doctrine\Common\Proxy\Proxy'); - - $proxy - ->expects($this->any()) - ->method('__isInitialized') - ->will($this->returnValue(true)); - - $this->setExpectedException('Doctrine\Common\Proxy\Exception\InvalidArgumentException'); - - $proxyFactory->resetUninitializedProxy($proxy); - } - - public function testMissingPrimaryKeyValue() - { - $metadata = $this->getMock('Doctrine\Common\Persistence\Mapping\ClassMetadata'); - $proxy = $this->getMock('Doctrine\Common\Proxy\Proxy'); - $definition = new ProxyDefinition(get_class($proxy), array('missingKey'), array(), null, null); - $proxyGenerator = $this->getMock('Doctrine\Common\Proxy\ProxyGenerator', array(), array(), '', false); - $metadataFactory = $this->getMock('Doctrine\Common\Persistence\Mapping\ClassMetadataFactory'); - - $metadataFactory - ->expects($this->once()) - ->method('getMetadataFor') - ->will($this->returnValue($metadata)); - - $proxyFactory = $this->getMockForAbstractClass( - 'Doctrine\Common\Proxy\AbstractProxyFactory', - array($proxyGenerator, $metadataFactory, true) - ); - - $proxyFactory - ->expects($this->any()) - ->method('createProxyDefinition') - ->will($this->returnValue($definition)); - - $this->setExpectedException('\OutOfBoundsException'); - - $generatedProxy = $proxyFactory->getProxy('Class', array()); - } -} - diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Proxy/AutoloaderTest.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Proxy/AutoloaderTest.php deleted file mode 100644 index be713fc..0000000 --- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Proxy/AutoloaderTest.php +++ /dev/null @@ -1,72 +0,0 @@ -. - */ - -namespace Doctrine\Tests\Common\Proxy; - -use PHPUnit_Framework_TestCase; -use Doctrine\Common\Proxy\Autoloader; - -/** - * @group DDC-1698 - */ -class AutoloaderTest extends PHPUnit_Framework_TestCase -{ - public static function dataResolveFile() - { - return array( - array('/tmp', 'MyProxy', 'MyProxy\__CG__\RealClass', '/tmp' . DIRECTORY_SEPARATOR . '__CG__RealClass.php'), - array('/tmp', 'MyProxy\Subdir', 'MyProxy\Subdir\__CG__\RealClass', '/tmp' . DIRECTORY_SEPARATOR . '__CG__RealClass.php'), - array('/tmp', 'MyProxy', 'MyProxy\__CG__\Other\RealClass', '/tmp' . DIRECTORY_SEPARATOR . '__CG__OtherRealClass.php'), - ); - } - - /** - * @dataProvider dataResolveFile - */ - public function testResolveFile($proxyDir, $proxyNamespace, $className, $expectedProxyFile) - { - $actualProxyFile = Autoloader::resolveFile($proxyDir, $proxyNamespace, $className); - $this->assertEquals($expectedProxyFile, $actualProxyFile); - } - - public function testAutoload() - { - if (file_exists(sys_get_temp_dir() ."/AutoloaderTestClass.php")) { - unlink(sys_get_temp_dir() ."/AutoloaderTestClass.php"); - } - - $autoloader = Autoloader::register(sys_get_temp_dir(), 'ProxyAutoloaderTest', function($proxyDir, $proxyNamespace, $className) { - file_put_contents(sys_get_temp_dir() . "/AutoloaderTestClass.php", "assertTrue(class_exists('ProxyAutoloaderTest\AutoloaderTestClass', true)); - unlink(sys_get_temp_dir() ."/AutoloaderTestClass.php"); - } - - public function testRegisterWithInvalidCallback() - { - $this->setExpectedException( - 'Doctrine\Common\Proxy\Exception\InvalidArgumentException', - 'Invalid \$notFoundCallback given: must be a callable, "stdClass" given' - ); - - Autoloader::register('', '', new \stdClass()); - } -} - diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Proxy/CallableTypeHintClass.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Proxy/CallableTypeHintClass.php deleted file mode 100644 index f5fccb0..0000000 --- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Proxy/CallableTypeHintClass.php +++ /dev/null @@ -1,16 +0,0 @@ -. - */ - -namespace Doctrine\Tests\Common\Proxy; - -/** - * Test asset representing a lazy loadable object - * - * @author Marco Pivetta - * @since 2.4 - */ -class LazyLoadableObject -{ - /** - * @var string - */ - public $publicIdentifierField; - - /** - * @var string - */ - protected $protectedIdentifierField; - - /** - * @var string - */ - public $publicTransientField = 'publicTransientFieldValue'; - - /** - * @var string - */ - protected $protectedTransientField = 'protectedTransientFieldValue'; - - /** - * @var string - */ - public $publicPersistentField = 'publicPersistentFieldValue'; - - /** - * @var string - */ - protected $protectedPersistentField = 'protectedPersistentFieldValue'; - - /** - * @var string - */ - public $publicAssociation = 'publicAssociationValue'; - - /** - * @var string - */ - protected $protectedAssociation = 'protectedAssociationValue'; - - /** - * @return string - */ - public function getProtectedIdentifierField() - { - return $this->protectedIdentifierField; - } - - /** - * @return string - */ - public function testInitializationTriggeringMethod() - { - return 'testInitializationTriggeringMethod'; - } - - /** - * @return string - */ - public function getProtectedAssociation() - { - return $this->protectedAssociation; - } - - /** - * @param \stdClass $param - */ - public function publicTypeHintedMethod(\stdClass $param) - { - } - - /** - * - */ - public function &byRefMethod() - { - } - - /** - * @param mixed $thisIsNotByRef - * @param &mixed $thisIsByRef - */ - public function byRefParamMethod($thisIsNotByRef, &$thisIsByRef) - { - } -} diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Proxy/LazyLoadableObjectClassMetadata.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Proxy/LazyLoadableObjectClassMetadata.php deleted file mode 100644 index 167386e..0000000 --- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Proxy/LazyLoadableObjectClassMetadata.php +++ /dev/null @@ -1,195 +0,0 @@ -. - */ - -namespace Doctrine\Tests\Common\Proxy; - -use ReflectionClass; -use Doctrine\Common\Persistence\Mapping\ClassMetadata; - -/** - * Class metadata test asset for @see LazyLoadableObject - * - * @author Marco Pivetta - * @since 2.4 - */ -class LazyLoadableObjectClassMetadata implements ClassMetadata -{ - /** - * @var ReflectionClass - */ - protected $reflectionClass; - - /** - * @var array - */ - protected $identifier = array( - 'publicIdentifierField' => true, - 'protectedIdentifierField' => true, - ); - - /** - * @var array - */ - protected $fields = array( - 'publicIdentifierField' => true, - 'protectedIdentifierField' => true, - 'publicPersistentField' => true, - 'protectedPersistentField' => true, - ); - - /** - * @var array - */ - protected $associations = array( - 'publicAssociation' => true, - 'protectedAssociation' => true, - ); - - /** - * {@inheritDoc} - */ - public function getName() - { - return $this->getReflectionClass()->getName(); - } - - /** - * {@inheritDoc} - */ - public function getIdentifier() - { - return array_keys($this->identifier); - } - - /** - * {@inheritDoc} - */ - public function getReflectionClass() - { - if (null === $this->reflectionClass) { - $this->reflectionClass = new \ReflectionClass(__NAMESPACE__ . '\LazyLoadableObject'); - } - - return $this->reflectionClass; - } - - /** - * {@inheritDoc} - */ - public function isIdentifier($fieldName) - { - return isset($this->identifier[$fieldName]); - } - - /** - * {@inheritDoc} - */ - public function hasField($fieldName) - { - return isset($this->fields[$fieldName]); - } - - /** - * {@inheritDoc} - */ - public function hasAssociation($fieldName) - { - return isset($this->associations[$fieldName]); - } - - /** - * {@inheritDoc} - */ - public function isSingleValuedAssociation($fieldName) - { - throw new \BadMethodCallException('not implemented'); - } - - /** - * {@inheritDoc} - */ - public function isCollectionValuedAssociation($fieldName) - { - throw new \BadMethodCallException('not implemented'); - } - - /** - * {@inheritDoc} - */ - public function getFieldNames() - { - return array_keys($this->fields); - } - - /** - * {@inheritDoc} - */ - public function getIdentifierFieldNames() - { - return $this->getIdentifier(); - } - - /** - * {@inheritDoc} - */ - public function getAssociationNames() - { - return array_keys($this->associations); - } - - /** - * {@inheritDoc} - */ - public function getTypeOfField($fieldName) - { - return 'string'; - } - - /** - * {@inheritDoc} - */ - public function getAssociationTargetClass($assocName) - { - throw new \BadMethodCallException('not implemented'); - } - - /** - * {@inheritDoc} - */ - public function isAssociationInverseSide($assocName) - { - throw new \BadMethodCallException('not implemented'); - } - - /** - * {@inheritDoc} - */ - public function getAssociationMappedByTargetField($assocName) - { - throw new \BadMethodCallException('not implemented'); - } - - /** - * {@inheritDoc} - */ - public function getIdentifierValues($object) - { - throw new \BadMethodCallException('not implemented'); - } -} diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Proxy/MagicCloneClass.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Proxy/MagicCloneClass.php deleted file mode 100644 index 33b983d..0000000 --- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Proxy/MagicCloneClass.php +++ /dev/null @@ -1,37 +0,0 @@ -clonedValue = 'newClonedValue'; - } -} diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Proxy/MagicGetByRefClass.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Proxy/MagicGetByRefClass.php deleted file mode 100644 index 6adf1f5..0000000 --- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Proxy/MagicGetByRefClass.php +++ /dev/null @@ -1,51 +0,0 @@ -. - */ - -namespace Doctrine\Tests\Common\Proxy; - -use InvalidArgumentException; - -/** - * Test asset class - * - * @since 2.4 - */ -class MagicGetByRefClass -{ - /** - * @var mixed - */ - public $valueField; - - /** - * @param string $name - * - * @return mixed - * - * @throws \InvalidArgumentException - */ - public function & __get($name) - { - if ($name === 'value') { - return $this->valueField; - } - - throw new InvalidArgumentException(); - } -} diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Proxy/MagicGetClass.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Proxy/MagicGetClass.php deleted file mode 100644 index 0cab36a..0000000 --- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Proxy/MagicGetClass.php +++ /dev/null @@ -1,38 +0,0 @@ -testAttribute = $value; - } - - if ($name === 'publicField' || $name === 'id') { - throw new \BadMethodCallException('Should never be called for "publicField" or "id"'); - } - - $this->testAttribute = $value; - } -} diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Proxy/MagicSleepClass.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Proxy/MagicSleepClass.php deleted file mode 100644 index 3934a05..0000000 --- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Proxy/MagicSleepClass.php +++ /dev/null @@ -1,37 +0,0 @@ -wakeupValue = 'newWakeupValue'; - } -} diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Proxy/ProxyClassGeneratorTest.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Proxy/ProxyClassGeneratorTest.php deleted file mode 100644 index 45d45e5..0000000 --- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Proxy/ProxyClassGeneratorTest.php +++ /dev/null @@ -1,228 +0,0 @@ -. - */ - - -namespace Doctrine\Tests\Common\Proxy; - -use Doctrine\Common\Proxy\ProxyGenerator; -use ReflectionClass; -use ReflectionMethod; -use PHPUnit_Framework_TestCase; - -/** - * Test the proxy generator. Its work is generating on-the-fly subclasses of a given model, which implement the Proxy - * pattern. - * - * @author Giorgio Sironi - * @author Marco Pivetta - */ -class ProxyClassGeneratorTest extends PHPUnit_Framework_TestCase -{ - /** - * @var string - */ - protected $proxyClass = 'Doctrine\Tests\Common\ProxyProxy\__CG__\Doctrine\Tests\Common\Proxy\LazyLoadableObject'; - - /** - * @var LazyLoadableObjectClassMetadata - */ - protected $metadata; - - /** - * @var ProxyGenerator - */ - protected $proxyGenerator; - - /** - * {@inheritDoc} - */ - protected function setUp() - { - $this->metadata = new LazyLoadableObjectClassMetadata(); - $this->proxyGenerator = new ProxyGenerator(__DIR__ . '/generated', __NAMESPACE__ . 'Proxy', true); - - if (class_exists($this->proxyClass, false)) { - return; - } - - $this->generateAndRequire($this->proxyGenerator, $this->metadata); - } - - public function testReferenceProxyRespectsMethodsParametersTypeHinting() - { - $method = new ReflectionMethod($this->proxyClass, 'publicTypeHintedMethod'); - $params = $method->getParameters(); - - $this->assertEquals(1, count($params)); - $this->assertEquals('stdClass', $params[0]->getClass()->getName()); - } - - public function testProxyRespectsMethodsWhichReturnValuesByReference() - { - $method = new ReflectionMethod($this->proxyClass, 'byRefMethod'); - - $this->assertTrue($method->returnsReference()); - } - - public function testProxyRespectsByRefMethodParameters() - { - $method = new ReflectionMethod($this->proxyClass, 'byRefParamMethod'); - $parameters = $method->getParameters(); - $this->assertSame('thisIsNotByRef', $parameters[0]->getName()); - $this->assertFalse($parameters[0]->isPassedByReference()); - $this->assertSame('thisIsByRef', $parameters[1]->getName()); - $this->assertTrue($parameters[1]->isPassedByReference()); - } - - public function testCreatesAssociationProxyAsSubclassOfTheOriginalOne() - { - $this->assertTrue(is_subclass_of($this->proxyClass, $this->metadata->getName())); - } - - public function testNonNamespacedProxyGeneration() - { - $classCode = file_get_contents($this->proxyGenerator->getProxyFileName($this->metadata->getName())); - - $this->assertNotContains("class LazyLoadableObject extends \\\\" . $this->metadata->getName(), $classCode); - $this->assertContains("class LazyLoadableObject extends \\" . $this->metadata->getName(), $classCode); - } - - public function testClassWithSleepProxyGeneration() - { - if (!class_exists('Doctrine\Tests\Common\ProxyProxy\__CG__\SleepClass', false)) { - $className = 'Doctrine\Tests\Common\Proxy\SleepClass'; - $metadata = $this->createClassMetadata($className, array('id')); - $proxyGenerator = new ProxyGenerator(__DIR__ . '/generated', __NAMESPACE__ . 'Proxy', true); - - $this->generateAndRequire($proxyGenerator, $metadata); - } - - $classCode = file_get_contents(__DIR__ . '/generated/__CG__DoctrineTestsCommonProxySleepClass.php'); - $this->assertEquals(1, substr_count($classCode, 'function __sleep')); - $this->assertEquals(1, substr_count($classCode, 'parent::__sleep()')); - } - - /** - * Check that the proxy doesn't serialize static properties (in __sleep() method) - * @group DCOM-212 - */ - public function testClassWithStaticPropertyProxyGeneration() - { - if (!class_exists('Doctrine\Tests\Common\ProxyProxy\__CG__\StaticPropertyClass', false)) { - $className = 'Doctrine\Tests\Common\Proxy\StaticPropertyClass'; - $metadata = $this->createClassMetadata($className, array()); - $proxyGenerator = new ProxyGenerator(__DIR__ . '/generated', __NAMESPACE__ . 'Proxy', true); - - $this->generateAndRequire($proxyGenerator, $metadata); - } - - $classCode = file_get_contents(__DIR__ . '/generated/__CG__DoctrineTestsCommonProxyStaticPropertyClass.php'); - $this->assertEquals(1, substr_count($classCode, 'function __sleep')); - $this->assertNotContains('protectedStaticProperty', $classCode); - } - - private function generateAndRequire($proxyGenerator, $metadata) - { - $proxyGenerator->generateProxyClass($metadata, $proxyGenerator->getProxyFileName($metadata->getName())); - - require_once $proxyGenerator->getProxyFileName($metadata->getName()); - } - - public function testClassWithCallableTypeHintOnProxiedMethod() - { - if (PHP_VERSION_ID < 50400) { - $this->markTestSkipped('`callable` is only supported in PHP >=5.4.0'); - } - - if (!class_exists('Doctrine\Tests\Common\ProxyProxy\__CG__\CallableTypeHintClass', false)) { - $className = 'Doctrine\Tests\Common\Proxy\CallableTypeHintClass'; - $metadata = $this->createClassMetadata($className, array('id')); - - $proxyGenerator = new ProxyGenerator(__DIR__ . '/generated', __NAMESPACE__ . 'Proxy', true); - $this->generateAndRequire($proxyGenerator, $metadata); - } - - $classCode = file_get_contents(__DIR__ . '/generated/__CG__DoctrineTestsCommonProxyCallableTypeHintClass.php'); - - $this->assertEquals(1, substr_count($classCode, 'call(callable $foo)')); - } - - public function testClassWithInvalidTypeHintOnProxiedMethod() - { - $className = 'Doctrine\Tests\Common\Proxy\InvalidTypeHintClass'; - $metadata = $this->createClassMetadata($className, array('id')); - $proxyGenerator = new ProxyGenerator(__DIR__ . '/generated', __NAMESPACE__ . 'Proxy', true); - - $this->setExpectedException( - 'Doctrine\Common\Proxy\Exception\UnexpectedValueException', - 'The type hint of parameter "foo" in method "invalidTypeHintMethod"' - .' in class "' . $className . '" is invalid.' - ); - $proxyGenerator->generateProxyClass($metadata); - } - - public function testNoConfigDirThrowsException() - { - $this->setExpectedException('Doctrine\Common\Proxy\Exception\InvalidArgumentException'); - new ProxyGenerator(null, null); - } - - public function testNoNamespaceThrowsException() - { - $this->setExpectedException('Doctrine\Common\Proxy\Exception\InvalidArgumentException'); - new ProxyGenerator(__DIR__ . '/generated', null); - } - - public function testInvalidPlaceholderThrowsException() - { - $this->setExpectedException('Doctrine\Common\Proxy\Exception\InvalidArgumentException'); - $generator = new ProxyGenerator(__DIR__ . '/generated', 'SomeNamespace'); - $generator->setPlaceholder('', array()); - } - - public function testUseEvalIfNoFilenameIsGiven() - { - $proxyGenerator = new ProxyGenerator(__DIR__ . '/generated', __NAMESPACE__ . 'Proxy', true); - - $className = __NAMESPACE__ . '\\EvalBase'; - - $metadata = $this->createClassMetadata($className, array('id')); - - $proxyGenerator->generateProxyClass($metadata); - - $reflClass = new ReflectionClass('Doctrine\Tests\Common\ProxyProxy\__CG__\Doctrine\Tests\Common\Proxy\EvalBase'); - - $this->assertContains("eval()'d code", $reflClass->getFileName()); - } - - private function createClassMetadata($className, array $ids) - { - $metadata = $this->getMock('Doctrine\Common\Persistence\Mapping\ClassMetadata'); - $reflClass = new ReflectionClass($className); - $metadata->expects($this->any())->method('getReflectionClass')->will($this->returnValue($reflClass)); - $metadata->expects($this->any())->method('getIdentifierFieldNames')->will($this->returnValue($ids)); - $metadata->expects($this->any())->method('getName')->will($this->returnValue($className)); - - return $metadata; - } -} - -class EvalBase -{ -} diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Proxy/ProxyLogicTest.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Proxy/ProxyLogicTest.php deleted file mode 100644 index 9a5173c..0000000 --- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Proxy/ProxyLogicTest.php +++ /dev/null @@ -1,696 +0,0 @@ -. - */ - -namespace Doctrine\Tests\Common\Proxy; - -use Doctrine\Common\Proxy\ProxyGenerator; -use Doctrine\Common\Proxy\Proxy; -use Doctrine\Common\Proxy\Exception\UnexpectedValueException; -use Doctrine\Common\Persistence\Mapping\ClassMetadata; -use PHPUnit_Framework_TestCase; - -/** - * Test the generated proxies behavior. These tests make assumptions about the structure of LazyLoadableObject - * - * @author Marco Pivetta - */ -class ProxyLogicTest extends PHPUnit_Framework_TestCase -{ - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $proxyLoader; - - /** - * @var ClassMetadata - */ - protected $lazyLoadableObjectMetadata; - - /** - * @var LazyLoadableObject|Proxy - */ - protected $lazyObject; - - protected $identifier = array( - 'publicIdentifierField' => 'publicIdentifierFieldValue', - 'protectedIdentifierField' => 'protectedIdentifierFieldValue', - ); - - /** - * @var \PHPUnit_Framework_MockObject_MockObject|Callable - */ - protected $initializerCallbackMock; - - /** - * {@inheritDoc} - */ - public function setUp() - { - $this->proxyLoader = $loader = $this->getMock('stdClass', array('load'), array(), '', false); - $this->initializerCallbackMock = $this->getMock('stdClass', array('__invoke')); - $identifier = $this->identifier; - $this->lazyLoadableObjectMetadata = $metadata = new LazyLoadableObjectClassMetadata(); - - // emulating what should happen in a proxy factory - $cloner = function (LazyLoadableObject $proxy) use ($loader, $identifier, $metadata) { - /* @var $proxy LazyLoadableObject|Proxy */ - if ($proxy->__isInitialized()) { - return; - } - - $proxy->__setInitialized(true); - $proxy->__setInitializer(null); - $original = $loader->load($identifier); - - if (null === $original) { - throw new UnexpectedValueException(); - } - - foreach ($metadata->getReflectionClass()->getProperties() as $reflProperty) { - $propertyName = $reflProperty->getName(); - - if ($metadata->hasField($propertyName) || $metadata->hasAssociation($propertyName)) { - $reflProperty->setAccessible(true); - $reflProperty->setValue($proxy, $reflProperty->getValue($original)); - } - } - }; - - $proxyClassName = 'Doctrine\Tests\Common\ProxyProxy\__CG__\Doctrine\Tests\Common\Proxy\LazyLoadableObject'; - - // creating the proxy class - if (!class_exists($proxyClassName, false)) { - $proxyGenerator = new ProxyGenerator(__DIR__ . '/generated', __NAMESPACE__ . 'Proxy', true); - $proxyGenerator->generateProxyClass($metadata); - require_once $proxyGenerator->getProxyFileName($metadata->getName()); - } - - $this->lazyObject = new $proxyClassName($this->getClosure($this->initializerCallbackMock), $cloner); - - // setting identifiers in the proxy via reflection - foreach ($metadata->getIdentifierFieldNames() as $idField) { - $prop = $metadata->getReflectionClass()->getProperty($idField); - $prop->setAccessible(true); - $prop->setValue($this->lazyObject, $identifier[$idField]); - } - - $this->assertFalse($this->lazyObject->__isInitialized()); - } - - public function testFetchingPublicIdentifierDoesNotCauseLazyLoading() - { - $this->configureInitializerMock(0); - - $this->assertSame('publicIdentifierFieldValue', $this->lazyObject->publicIdentifierField); - } - - public function testFetchingIdentifiersViaPublicGetterDoesNotCauseLazyLoading() - { - $this->configureInitializerMock(0); - - $this->assertSame('protectedIdentifierFieldValue', $this->lazyObject->getProtectedIdentifierField()); - } - - public function testCallingMethodCausesLazyLoading() - { - $this->configureInitializerMock( - 1, - array($this->lazyObject, 'testInitializationTriggeringMethod', array()), - function (Proxy $proxy) { - $proxy->__setInitializer(null); - } - ); - - $this->lazyObject->testInitializationTriggeringMethod(); - $this->lazyObject->testInitializationTriggeringMethod(); - } - - public function testFetchingPublicFieldsCausesLazyLoading() - { - $test = $this; - $this->configureInitializerMock( - 1, - array($this->lazyObject, '__get', array('publicPersistentField')), - function () use ($test) { - $test->setProxyValue('publicPersistentField', 'loadedValue'); - } - ); - - $this->assertSame('loadedValue', $this->lazyObject->publicPersistentField); - $this->assertSame('loadedValue', $this->lazyObject->publicPersistentField); - } - - public function testFetchingPublicAssociationCausesLazyLoading() - { - $test = $this; - $this->configureInitializerMock( - 1, - array($this->lazyObject, '__get', array('publicAssociation')), - function () use ($test) { - $test->setProxyValue('publicAssociation', 'loadedAssociation'); - } - ); - - $this->assertSame('loadedAssociation', $this->lazyObject->publicAssociation); - $this->assertSame('loadedAssociation', $this->lazyObject->publicAssociation); - } - - public function testFetchingProtectedAssociationViaPublicGetterCausesLazyLoading() - { - $this->configureInitializerMock( - 1, - array($this->lazyObject, 'getProtectedAssociation', array()), - function (Proxy $proxy) { - $proxy->__setInitializer(null); - } - ); - - $this->assertSame('protectedAssociationValue', $this->lazyObject->getProtectedAssociation()); - $this->assertSame('protectedAssociationValue', $this->lazyObject->getProtectedAssociation()); - } - - public function testLazyLoadingTriggeredOnlyAtFirstPublicPropertyRead() - { - $test = $this; - $this->configureInitializerMock( - 1, - array($this->lazyObject, '__get', array('publicPersistentField')), - function () use ($test) { - $test->setProxyValue('publicPersistentField', 'loadedValue'); - $test->setProxyValue('publicAssociation', 'publicAssociationValue'); - } - ); - - $this->assertSame('loadedValue', $this->lazyObject->publicPersistentField); - $this->assertSame('publicAssociationValue', $this->lazyObject->publicAssociation); - } - - public function testNoticeWhenReadingNonExistentPublicProperties() - { - $this->configureInitializerMock(0); - - $class = get_class($this->lazyObject); - $this->setExpectedException( - 'PHPUnit_Framework_Error_Notice', - 'Undefined property: ' . $class . '::$non_existing_property' - ); - - $this->lazyObject->non_existing_property; - } - - public function testFalseWhenCheckingNonExistentProperty() - { - $this->configureInitializerMock(0); - - $this->assertFalse(isset($this->lazyObject->non_existing_property)); - } - - public function testNoErrorWhenSettingNonExistentProperty() - { - $this->configureInitializerMock(0); - - $this->lazyObject->non_existing_property = 'now has a value'; - $this->assertSame('now has a value', $this->lazyObject->non_existing_property); - } - - public function testCloningCallsClonerWithClonedObject() - { - $lazyObject = $this->lazyObject; - $test = $this; - $cb = $this->getMock('stdClass', array('cb')); - $cb - ->expects($this->once()) - ->method('cb') - ->will($this->returnCallback(function (LazyLoadableObject $proxy) use ($lazyObject, $test) { - /* @var $proxy LazyLoadableObject|Proxy */ - $test->assertNotSame($proxy, $lazyObject); - $proxy->__setInitializer(null); - $proxy->publicAssociation = 'clonedAssociation'; - })); - - $this->lazyObject->__setCloner($this->getClosure(array($cb, 'cb'))); - - $cloned = clone $this->lazyObject; - $this->assertSame('clonedAssociation', $cloned->publicAssociation); - $this->assertNotSame($cloned, $lazyObject, 'a clone of the lazy object is retrieved'); - } - - public function testFetchingTransientPropertiesWillNotTriggerLazyLoading() - { - $this->configureInitializerMock(0); - - $this->assertSame( - 'publicTransientFieldValue', - $this->lazyObject->publicTransientField, - 'fetching public transient field won\'t trigger lazy loading' - ); - $property = $this - ->lazyLoadableObjectMetadata - ->getReflectionClass() - ->getProperty('protectedTransientField'); - $property->setAccessible(true); - $this->assertSame( - 'protectedTransientFieldValue', - $property->getValue($this->lazyObject), - 'fetching protected transient field via reflection won\'t trigger lazy loading' - ); - } - - /** - * Provided to guarantee backwards compatibility - */ - public function testLoadProxyMethod() - { - $this->configureInitializerMock(2, array($this->lazyObject, '__load', array())); - - $this->lazyObject->__load(); - $this->lazyObject->__load(); - } - - public function testLoadingWithPersisterWillBeTriggeredOnlyOnce() - { - $this - ->proxyLoader - ->expects($this->once()) - ->method('load') - ->with( - array( - 'publicIdentifierField' => 'publicIdentifierFieldValue', - 'protectedIdentifierField' => 'protectedIdentifierFieldValue', - ), - $this->lazyObject - ) - ->will($this->returnCallback(function ($id, LazyLoadableObject $lazyObject) { - // setting a value to verify that the persister can actually set something in the object - $lazyObject->publicAssociation = $id['publicIdentifierField'] . '-test'; - return true; - })); - $this->lazyObject->__setInitializer($this->getSuggestedInitializerImplementation()); - - $this->lazyObject->__load(); - $this->lazyObject->__load(); - $this->assertSame('publicIdentifierFieldValue-test', $this->lazyObject->publicAssociation); - } - - public function testFailedLoadingWillThrowException() - { - $this->proxyLoader->expects($this->any())->method('load')->will($this->returnValue(null)); - $this->setExpectedException('UnexpectedValueException'); - $this->lazyObject->__setInitializer($this->getSuggestedInitializerImplementation()); - - $this->lazyObject->__load(); - } - - public function testCloningWithPersister() - { - $this->lazyObject->publicTransientField = 'should-not-change'; - $this - ->proxyLoader - ->expects($this->exactly(2)) - ->method('load') - ->with(array( - 'publicIdentifierField' => 'publicIdentifierFieldValue', - 'protectedIdentifierField' => 'protectedIdentifierFieldValue', - )) - ->will($this->returnCallback(function () { - $blueprint = new LazyLoadableObject(); - $blueprint->publicPersistentField = 'checked-persistent-field'; - $blueprint->publicAssociation = 'checked-association-field'; - $blueprint->publicTransientField = 'checked-transient-field'; - - return $blueprint; - })); - - $firstClone = clone $this->lazyObject; - $this->assertSame( - 'checked-persistent-field', - $firstClone->publicPersistentField, - 'Persistent fields are cloned correctly' - ); - $this->assertSame( - 'checked-association-field', - $firstClone->publicAssociation, - 'Associations are cloned correctly' - ); - $this->assertSame( - 'should-not-change', - $firstClone->publicTransientField, - 'Transient fields are not overwritten' - ); - - $secondClone = clone $this->lazyObject; - $this->assertSame( - 'checked-persistent-field', - $secondClone->publicPersistentField, - 'Persistent fields are cloned correctly' - ); - $this->assertSame( - 'checked-association-field', - $secondClone->publicAssociation, - 'Associations are cloned correctly' - ); - $this->assertSame( - 'should-not-change', - $secondClone->publicTransientField, - 'Transient fields are not overwritten' - ); - - // those should not trigger lazy loading - $firstClone->__load(); - $secondClone->__load(); - } - - public function testNotInitializedProxyUnserialization() - { - $this->configureInitializerMock(); - - $serialized = serialize($this->lazyObject); - /* @var $unserialized LazyLoadableObject|Proxy */ - $unserialized = unserialize($serialized); - $reflClass = $this->lazyLoadableObjectMetadata->getReflectionClass(); - - $this->assertFalse($unserialized->__isInitialized(), 'serialization didn\'t cause intialization'); - - // Checking identifiers - $this->assertSame('publicIdentifierFieldValue', $unserialized->publicIdentifierField, 'identifiers are kept'); - $protectedIdentifierField = $reflClass->getProperty('protectedIdentifierField'); - $protectedIdentifierField->setAccessible(true); - $this->assertSame( - 'protectedIdentifierFieldValue', - $protectedIdentifierField->getValue($unserialized), - 'identifiers are kept' - ); - - // Checking transient fields - $this->assertSame( - 'publicTransientFieldValue', - $unserialized->publicTransientField, - 'transient fields are kept' - ); - $protectedTransientField = $reflClass->getProperty('protectedTransientField'); - $protectedTransientField->setAccessible(true); - $this->assertSame( - 'protectedTransientFieldValue', - $protectedTransientField->getValue($unserialized), - 'transient fields are kept' - ); - - // Checking persistent fields - $this->assertSame( - 'publicPersistentFieldValue', - $unserialized->publicPersistentField, - 'persistent fields are kept' - ); - $protectedPersistentField = $reflClass->getProperty('protectedPersistentField'); - $protectedPersistentField->setAccessible(true); - $this->assertSame( - 'protectedPersistentFieldValue', - $protectedPersistentField->getValue($unserialized), - 'persistent fields are kept' - ); - - // Checking associations - $this->assertSame('publicAssociationValue', $unserialized->publicAssociation, 'associations are kept'); - $protectedAssociationField = $reflClass->getProperty('protectedAssociation'); - $protectedAssociationField->setAccessible(true); - $this->assertSame( - 'protectedAssociationValue', - $protectedAssociationField->getValue($unserialized), - 'associations are kept' - ); - } - - public function testInitializedProxyUnserialization() - { - // persister will retrieve the lazy object itself, so that we don't have to re-define all field values - $this->proxyLoader->expects($this->once())->method('load')->will($this->returnValue($this->lazyObject)); - $this->lazyObject->__setInitializer($this->getSuggestedInitializerImplementation()); - $this->lazyObject->__load(); - - $serialized = serialize($this->lazyObject); - $reflClass = $this->lazyLoadableObjectMetadata->getReflectionClass(); - /* @var $unserialized LazyLoadableObject|Proxy */ - $unserialized = unserialize($serialized); - - $this->assertTrue($unserialized->__isInitialized(), 'serialization didn\'t cause intialization'); - - // Checking transient fields - $this->assertSame( - 'publicTransientFieldValue', - $unserialized->publicTransientField, - 'transient fields are kept' - ); - $protectedTransientField = $reflClass->getProperty('protectedTransientField'); - $protectedTransientField->setAccessible(true); - $this->assertSame( - 'protectedTransientFieldValue', - $protectedTransientField->getValue($unserialized), - 'transient fields are kept' - ); - - // Checking persistent fields - $this->assertSame( - 'publicPersistentFieldValue', - $unserialized->publicPersistentField, - 'persistent fields are kept' - ); - $protectedPersistentField = $reflClass->getProperty('protectedPersistentField'); - $protectedPersistentField->setAccessible(true); - $this->assertSame( - 'protectedPersistentFieldValue', - $protectedPersistentField->getValue($unserialized), - 'persistent fields are kept' - ); - - // Checking identifiers - $this->assertSame( - 'publicIdentifierFieldValue', - $unserialized->publicIdentifierField, - 'identifiers are kept' - ); - $protectedIdentifierField = $reflClass->getProperty('protectedIdentifierField'); - $protectedIdentifierField->setAccessible(true); - $this->assertSame( - 'protectedIdentifierFieldValue', - $protectedIdentifierField->getValue($unserialized), - 'identifiers are kept' - ); - - // Checking associations - $this->assertSame('publicAssociationValue', $unserialized->publicAssociation, 'associations are kept'); - $protectedAssociationField = $reflClass->getProperty('protectedAssociation'); - $protectedAssociationField->setAccessible(true); - $this->assertSame( - 'protectedAssociationValue', - $protectedAssociationField->getValue($unserialized), - 'associations are kept' - ); - } - - public function testInitializationRestoresDefaultPublicLazyLoadedFieldValues() - { - // setting noop persister - $this->proxyLoader->expects($this->once())->method('load')->will($this->returnValue($this->lazyObject)); - $this->lazyObject->__setInitializer($this->getSuggestedInitializerImplementation()); - - $this->assertSame( - 'publicPersistentFieldValue', - $this->lazyObject->publicPersistentField, - 'Persistent field is restored to default value' - ); - $this->assertSame( - 'publicAssociationValue', - $this->lazyObject->publicAssociation, - 'Association is restored to default value' - ); - } - - public function testSettingPublicFieldsCausesLazyLoading() - { - $test = $this; - $this->configureInitializerMock( - 1, - array($this->lazyObject, '__set', array('publicPersistentField', 'newPublicPersistentFieldValue')), - function () use ($test) { - $test->setProxyValue('publicPersistentField', 'overrideValue'); - $test->setProxyValue('publicAssociation', 'newAssociationValue'); - } - ); - - $this->lazyObject->publicPersistentField = 'newPublicPersistentFieldValue'; - $this->assertSame('newPublicPersistentFieldValue', $this->lazyObject->publicPersistentField); - $this->assertSame('newAssociationValue', $this->lazyObject->publicAssociation); - } - - public function testSettingPublicAssociationCausesLazyLoading() - { - $test = $this; - $this->configureInitializerMock( - 1, - array($this->lazyObject, '__set', array('publicAssociation', 'newPublicAssociationValue')), - function () use ($test) { - $test->setProxyValue('publicPersistentField', 'newPublicPersistentFieldValue'); - $test->setProxyValue('publicAssociation', 'overrideValue'); - } - ); - - $this->lazyObject->publicAssociation = 'newPublicAssociationValue'; - $this->assertSame('newPublicAssociationValue', $this->lazyObject->publicAssociation); - $this->assertSame('newPublicPersistentFieldValue', $this->lazyObject->publicPersistentField); - } - - public function testCheckingPublicFieldsCausesLazyLoading() - { - $test = $this; - $this->configureInitializerMock( - 1, - array($this->lazyObject, '__isset', array('publicPersistentField')), - function () use ($test) { - $test->setProxyValue('publicPersistentField', null); - $test->setProxyValue('publicAssociation', 'setPublicAssociation'); - } - ); - - $this->assertFalse(isset($this->lazyObject->publicPersistentField)); - $this->assertNull($this->lazyObject->publicPersistentField); - $this->assertTrue(isset($this->lazyObject->publicAssociation)); - $this->assertSame('setPublicAssociation', $this->lazyObject->publicAssociation); - } - - public function testCheckingPublicAssociationCausesLazyLoading() - { - $test = $this; - $this->configureInitializerMock( - 1, - array($this->lazyObject, '__isset', array('publicAssociation')), - function () use ($test) { - $test->setProxyValue('publicPersistentField', 'newPersistentFieldValue'); - $test->setProxyValue('publicAssociation', 'setPublicAssociation'); - } - ); - - $this->assertTrue(isset($this->lazyObject->publicAssociation)); - $this->assertSame('setPublicAssociation', $this->lazyObject->publicAssociation); - $this->assertTrue(isset($this->lazyObject->publicPersistentField)); - $this->assertSame('newPersistentFieldValue', $this->lazyObject->publicPersistentField); - } - - /** - * Converts a given callable into a closure - * - * @param callable $callable - * @return \Closure - */ - public function getClosure($callable) { - return function () use ($callable) { - call_user_func_array($callable, func_get_args()); - }; - } - - /** - * Configures the current initializer callback mock with provided matcher params - * - * @param int $expectedCallCount the number of invocations to be expected. If a value< 0 is provided, `any` is used - * @param array $callParamsMatch an ordered array of parameters to be expected - * @param callable $callbackClosure a return callback closure - * - * @return \PHPUnit_Framework_MockObject_MockObject| - */ - protected function configureInitializerMock( - $expectedCallCount = 0, - array $callParamsMatch = null, - \Closure $callbackClosure = null - ) { - if (!$expectedCallCount) { - $invocationCountMatcher = $this->exactly((int) $expectedCallCount); - } else { - $invocationCountMatcher = $expectedCallCount < 0 ? $this->any() : $this->exactly($expectedCallCount); - } - - $invocationMocker = $this->initializerCallbackMock->expects($invocationCountMatcher)->method('__invoke'); - - if (null !== $callParamsMatch) { - call_user_func_array(array($invocationMocker, 'with'), $callParamsMatch); - } - - if ($callbackClosure) { - $invocationMocker->will($this->returnCallback($callbackClosure)); - } - } - - /** - * Sets a value in the current proxy object without triggering lazy loading through `__set` - * - * @link https://bugs.php.net/bug.php?id=63463 - * - * @param string $property - * @param mixed $value - */ - public function setProxyValue($property, $value) - { - $reflectionProperty = new \ReflectionProperty($this->lazyObject, $property); - $initializer = $this->lazyObject->__getInitializer(); - - // disabling initializer since setting `publicPersistentField` triggers `__set`/`__get` - $this->lazyObject->__setInitializer(null); - $reflectionProperty->setValue($this->lazyObject, $value); - $this->lazyObject->__setInitializer($initializer); - } - - /** - * Retrieves the suggested implementation of an initializer that proxy factories in O*M - * are currently following, and that should be used to initialize the current proxy object - * - * @return \Closure - */ - protected function getSuggestedInitializerImplementation() - { - $loader = $this->proxyLoader; - $identifier = $this->identifier; - - return function (LazyLoadableObject $proxy) use ($loader, $identifier) { - /* @var $proxy LazyLoadableObject|Proxy */ - $proxy->__setInitializer(null); - $proxy->__setCloner(null); - - - if ($proxy->__isInitialized()) { - return; - } - - $properties = $proxy->__getLazyProperties(); - - foreach ($properties as $propertyName => $property) { - if (!isset($proxy->$propertyName)) { - $proxy->$propertyName = $properties[$propertyName]; - } - } - - $proxy->__setInitialized(true); - - if (method_exists($proxy, '__wakeup')) { - $proxy->__wakeup(); - } - - if (null === $loader->load($identifier, $proxy)) { - throw new \UnexpectedValueException('Couldn\'t load'); - } - }; - } -} \ No newline at end of file diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Proxy/ProxyMagicMethodsTest.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Proxy/ProxyMagicMethodsTest.php deleted file mode 100644 index 1ed9d92..0000000 --- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Proxy/ProxyMagicMethodsTest.php +++ /dev/null @@ -1,327 +0,0 @@ -. - */ - -namespace Doctrine\Tests\Common\Proxy; - -use Doctrine\Common\Proxy\ProxyGenerator; -use Doctrine\Common\Proxy\Proxy; -use Doctrine\Common\Proxy\Exception\UnexpectedValueException; -use PHPUnit_Framework_TestCase; -use ReflectionClass; - -/** - * Test for behavior of proxies with inherited magic methods - * - * @author Marco Pivetta - */ -class ProxyMagicMethodsTest extends PHPUnit_Framework_TestCase -{ - /** - * @var \Doctrine\Common\Proxy\ProxyGenerator - */ - protected $proxyGenerator; - - /** - * @var LazyLoadableObject|Proxy - */ - protected $lazyObject; - - protected $identifier = array( - 'publicIdentifierField' => 'publicIdentifierFieldValue', - 'protectedIdentifierField' => 'protectedIdentifierFieldValue', - ); - - /** - * @var \PHPUnit_Framework_MockObject_MockObject|Callable - */ - protected $initializerCallbackMock; - - /** - * {@inheritDoc} - */ - public function setUp() - { - $this->proxyGenerator = new ProxyGenerator(__DIR__ . '/generated', __NAMESPACE__ . '\\MagicMethodProxy'); - } - - public static function tearDownAfterClass() - { - - } - - public function testInheritedMagicGet() - { - $proxyClassName = $this->generateProxyClass(__NAMESPACE__ . '\\MagicGetClass'); - $proxy = new $proxyClassName( - function (Proxy $proxy, $method, $params) use (&$counter) { - if ( ! in_array($params[0], array('publicField', 'test', 'notDefined'))) { - throw new \InvalidArgumentException('Unexpected access to field "' . $params[0] . '"'); - } - - $initializer = $proxy->__getInitializer(); - - $proxy->__setInitializer(null); - - $proxy->publicField = 'modifiedPublicField'; - $counter += 1; - - $proxy->__setInitializer($initializer); - - } - ); - - $this->assertSame('id', $proxy->id); - $this->assertSame('modifiedPublicField', $proxy->publicField); - $this->assertSame('test', $proxy->test); - $this->assertSame('not defined', $proxy->notDefined); - - $this->assertSame(3, $counter); - } - - /** - * @group DCOM-194 - */ - public function testInheritedMagicGetByRef() - { - $proxyClassName = $this->generateProxyClass(__NAMESPACE__ . '\\MagicGetByRefClass'); - /* @var $proxy \Doctrine\Tests\Common\Proxy\MagicGetByRefClass */ - $proxy = new $proxyClassName(); - $proxy->valueField = 123; - $value = & $proxy->__get('value'); - - $this->assertSame(123, $value); - - $value = 456; - - $this->assertSame(456, $proxy->__get('value'), 'Value was fetched by reference'); - - $this->setExpectedException('InvalidArgumentException'); - - $undefined = $proxy->nonExisting; - } - - public function testInheritedMagicSet() - { - $proxyClassName = $this->generateProxyClass(__NAMESPACE__ . '\\MagicSetClass'); - $proxy = new $proxyClassName( - function (Proxy $proxy, $method, $params) use (&$counter) { - if ( ! in_array($params[0], array('publicField', 'test', 'notDefined'))) { - throw new \InvalidArgumentException('Unexpected access to field "' . $params[0] . '"'); - } - - $counter += 1; - } - ); - - $this->assertSame('id', $proxy->id); - - $proxy->publicField = 'publicFieldValue'; - - $this->assertSame('publicFieldValue', $proxy->publicField); - - $proxy->test = 'testValue'; - - $this->assertSame('testValue', $proxy->testAttribute); - - $proxy->notDefined = 'not defined'; - - $this->assertSame('not defined', $proxy->testAttribute); - $this->assertSame(3, $counter); - } - - public function testInheritedMagicSleep() - { - $proxyClassName = $this->generateProxyClass(__NAMESPACE__ . '\\MagicSleepClass'); - $proxy = new $proxyClassName(); - - $this->assertSame('defaultValue', $proxy->serializedField); - $this->assertSame('defaultValue', $proxy->nonSerializedField); - - $proxy->serializedField = 'changedValue'; - $proxy->nonSerializedField = 'changedValue'; - - $unserialized = unserialize(serialize($proxy)); - - $this->assertSame('changedValue', $unserialized->serializedField); - $this->assertSame('defaultValue', $unserialized->nonSerializedField, 'Field was not returned by "__sleep"'); - } - - public function testInheritedMagicWakeup() - { - $proxyClassName = $this->generateProxyClass(__NAMESPACE__ . '\\MagicWakeupClass'); - $proxy = new $proxyClassName(); - - $this->assertSame('defaultValue', $proxy->wakeupValue); - - $proxy->wakeupValue = 'changedValue'; - $unserialized = unserialize(serialize($proxy)); - - $this->assertSame('newWakeupValue', $unserialized->wakeupValue, '"__wakeup" was called'); - - $unserialized->__setInitializer(function (Proxy $proxy) { - $proxy->__setInitializer(null); - - $proxy->publicField = 'newPublicFieldValue'; - }); - - $this->assertSame('newPublicFieldValue', $unserialized->publicField, 'Proxy can still be initialized'); - } - - public function testInheritedMagicIsset() - { - $proxyClassName = $this->generateProxyClass(__NAMESPACE__ . '\\MagicIssetClass'); - $proxy = new $proxyClassName(function (Proxy $proxy, $method, $params) use (&$counter) { - if (in_array($params[0], array('publicField', 'test', 'nonExisting'))) { - $initializer = $proxy->__getInitializer(); - - $proxy->__setInitializer(null); - - $proxy->publicField = 'modifiedPublicField'; - $counter += 1; - - $proxy->__setInitializer($initializer); - - return; - } - - throw new \InvalidArgumentException( - sprintf('Should not be initialized when checking isset("%s")', $params[0]) - ); - }); - - $this->assertTrue(isset($proxy->id)); - $this->assertTrue(isset($proxy->publicField)); - $this->assertTrue(isset($proxy->test)); - $this->assertFalse(isset($proxy->nonExisting)); - - $this->assertSame(3, $counter); - } - - public function testInheritedMagicClone() - { - $proxyClassName = $this->generateProxyClass(__NAMESPACE__ . '\\MagicCloneClass'); - $proxy = new $proxyClassName( - null, - function ($proxy) { - $proxy->cloned = true; - } - ); - - $cloned = clone $proxy; - - $this->assertSame('newClonedValue', $cloned->clonedValue); - $this->assertFalse($proxy->cloned); - $this->assertTrue($cloned->cloned); - } - - /** - * @group DCOM-175 - */ - public function testClonesPrivateProperties() - { - $proxyClassName = $this->generateProxyClass(__NAMESPACE__ . '\\SerializedClass'); - /* @var $proxy SerializedClass */ - $proxy = new $proxyClassName(); - - $proxy->setFoo(1); - $proxy->setBar(2); - $proxy->setBaz(3); - - $unserialized = unserialize(serialize($proxy)); - - $this->assertSame(1, $unserialized->getFoo()); - $this->assertSame(2, $unserialized->getBar()); - $this->assertSame(3, $unserialized->getBaz()); - } - - /** - * @param $className - * - * @return string - */ - private function generateProxyClass($className) - { - $proxyClassName = 'Doctrine\\Tests\\Common\\Proxy\\MagicMethodProxy\\__CG__\\' . $className; - - if (class_exists($proxyClassName, false)) { - return $proxyClassName; - } - - $metadata = $this->getMock('Doctrine\\Common\\Persistence\\Mapping\\ClassMetadata'); - - $metadata - ->expects($this->any()) - ->method('getName') - ->will($this->returnValue($className)); - - $metadata - ->expects($this->any()) - ->method('getIdentifier') - ->will($this->returnValue(array('id'))); - - $metadata - ->expects($this->any()) - ->method('getReflectionClass') - ->will($this->returnValue(new ReflectionClass($className))); - - $metadata - ->expects($this->any()) - ->method('isIdentifier') - ->will($this->returnCallback(function ($fieldName) { - return 'id' === $fieldName; - })); - - $metadata - ->expects($this->any()) - ->method('hasField') - ->will($this->returnCallback(function ($fieldName) { - return in_array($fieldName, array('id', 'publicField')); - })); - - $metadata - ->expects($this->any()) - ->method('hasAssociation') - ->will($this->returnValue(false)); - - $metadata - ->expects($this->any()) - ->method('getFieldNames') - ->will($this->returnValue(array('id', 'publicField'))); - - $metadata - ->expects($this->any()) - ->method('getIdentifierFieldNames') - ->will($this->returnValue(array('id'))); - - $metadata - ->expects($this->any()) - ->method('getAssociationNames') - ->will($this->returnValue(array())); - - $metadata - ->expects($this->any()) - ->method('getTypeOfField') - ->will($this->returnValue('string')); - - $this->proxyGenerator->generateProxyClass($metadata, $this->proxyGenerator->getProxyFileName($className)); - require_once $this->proxyGenerator->getProxyFileName($className); - - return $proxyClassName; - } -} diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Proxy/SerializedClass.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Proxy/SerializedClass.php deleted file mode 100644 index a36c3bb..0000000 --- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Proxy/SerializedClass.php +++ /dev/null @@ -1,72 +0,0 @@ -foo = $foo; - } - - /** - * @return mixed|string - */ - public function getFoo() - { - return $this->foo; - } - - /** - * @param $bar - */ - public function setBar($bar) - { - $this->bar = $bar; - } - - /** - * @return mixed|string - */ - public function getBar() - { - return $this->bar; - } - - /** - * @param $baz - */ - public function setBaz($baz) - { - $this->baz = $baz; - } - - /** - * @return mixed|string - */ - public function getBaz() - { - return $this->baz; - } -} diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Proxy/SleepClass.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Proxy/SleepClass.php deleted file mode 100644 index 3c6ffcd..0000000 --- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Proxy/SleepClass.php +++ /dev/null @@ -1,19 +0,0 @@ -getMock('stdClass', array('callGet')); - $getCheckMock->expects($this->never())->method('callGet'); - $initializer = function () use ($getCheckMock) { - call_user_func($getCheckMock); - }; - - $mockProxy = new RuntimePublicReflectionPropertyTestProxyMock(); - $mockProxy->__setInitializer($initializer); - - $reflProperty = new RuntimePublicReflectionProperty( - __NAMESPACE__ . '\RuntimePublicReflectionPropertyTestProxyMock', - 'checkedProperty' - ); - - $this->assertSame('testValue', $reflProperty->getValue($mockProxy)); - unset($mockProxy->checkedProperty); - $this->assertNull($reflProperty->getValue($mockProxy)); - } - - public function testSetValueOnProxyPublicProperty() - { - $setCheckMock = $this->getMock('stdClass', array('neverCallSet')); - $setCheckMock->expects($this->never())->method('neverCallSet'); - $initializer = function () use ($setCheckMock) { - call_user_func(array($setCheckMock, 'neverCallSet')); - }; - - $mockProxy = new RuntimePublicReflectionPropertyTestProxyMock(); - $mockProxy->__setInitializer($initializer); - - $reflProperty = new RuntimePublicReflectionProperty( - __NAMESPACE__ . '\RuntimePublicReflectionPropertyTestProxyMock', - 'checkedProperty' - ); - - $reflProperty->setValue($mockProxy, 'newValue'); - $this->assertSame('newValue', $mockProxy->checkedProperty); - - unset($mockProxy->checkedProperty); - $reflProperty->setValue($mockProxy, 'otherNewValue'); - $this->assertSame('otherNewValue', $mockProxy->checkedProperty); - - $setCheckMock = $this->getMock('stdClass', array('callSet')); - $setCheckMock->expects($this->once())->method('callSet'); - $initializer = function () use ($setCheckMock) { - call_user_func(array($setCheckMock, 'callSet')); - }; - - $mockProxy->__setInitializer($initializer); - $mockProxy->__setInitialized(true); - - unset($mockProxy->checkedProperty); - $reflProperty->setValue($mockProxy, 'againNewValue'); - $this->assertSame('againNewValue', $mockProxy->checkedProperty); - } -} - -/** - * Mock that simulates proxy public property lazy loading - */ -class RuntimePublicReflectionPropertyTestProxyMock implements Proxy -{ - /** - * @var \Closure|null - */ - private $initializer = null; - - /** - * @var \Closure|null - */ - private $initialized = false; - - /** - * @var string - */ - public $checkedProperty = 'testValue'; - - /** - * {@inheritDoc} - */ - public function __getInitializer() - { - return $this->initializer; - } - - /** - * {@inheritDoc} - */ - public function __setInitializer(\Closure $initializer = null) - { - $this->initializer = $initializer; - } - - /** - * {@inheritDoc} - */ - public function __getLazyProperties() - { - } - - /** - * {@inheritDoc} - */ - public function __load() - { - } - - /** - * {@inheritDoc} - */ - public function __isInitialized() - { - return $this->initialized; - } - - /** - * {@inheritDoc} - */ - public function __setInitialized($initialized) - { - $this->initialized = (bool) $initialized; - } - - /** - * @param string $name - */ - public function __get($name) - { - if ($this->initializer) { - $cb = $this->initializer; - $cb(); - } - - return $this->checkedProperty; - } - - /** - * @param string $name - * @param mixed $value - */ - public function __set($name, $value) - { - if ($this->initializer) { - $cb = $this->initializer; - $cb(); - } - - // triggers notices if `$name` is used: see https://bugs.php.net/bug.php?id=63463 - $this->checkedProperty = $value; - } - - /** - * @param string $name - * - * @return integer - */ - public function __isset($name) - { - if ($this->initializer) { - $cb = $this->initializer; - $cb(); - } - - return isset($this->checkedProperty); - } - - /** - * {@inheritDoc} - */ - public function __setCloner(\Closure $cloner = null) - { - } - - /** - * {@inheritDoc} - */ - public function __getCloner() - { - } -} \ No newline at end of file diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Reflection/SameNamespaceParent.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Reflection/SameNamespaceParent.php deleted file mode 100644 index 844d4a5..0000000 --- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Reflection/SameNamespaceParent.php +++ /dev/null @@ -1,7 +0,0 @@ -setExpectedException('ReflectionException'); - } - - $testsRoot = substr(__DIR__, 0, -strlen(__NAMESPACE__) - 1); - $paths = array( - 'Doctrine\\Tests' => array($testsRoot), - ); - $staticReflectionParser = new StaticReflectionParser($parsedClassName, new Psr0FindFile($paths), $classAnnotationOptimize); - $declaringClassName = $staticReflectionParser->getStaticReflectionParserForDeclaringClass('property', 'test')->getClassName(); - $this->assertEquals($expectedClassName, $declaringClassName); - - } - - /** - * @return array - */ - public function parentClassData() - { - $data = array(); - $noParentClassName = 'Doctrine\\Tests\\Common\\Reflection\\NoParent'; - $dummyParentClassName = 'Doctrine\\Tests\\Common\\Reflection\\Dummies\\NoParent'; - foreach (array(false, true) as $classAnnotationOptimize) { - $data[] = array( - $classAnnotationOptimize, $noParentClassName, $noParentClassName, - ); - $data[] = array( - $classAnnotationOptimize, 'Doctrine\\Tests\\Common\\Reflection\\FullyClassifiedParent', $noParentClassName, - ); - $data[] = array( - $classAnnotationOptimize, 'Doctrine\\Tests\\Common\\Reflection\\SameNamespaceParent', $noParentClassName, - ); - $data[] = array( - $classAnnotationOptimize, 'Doctrine\\Tests\\Common\\Reflection\\DeeperNamespaceParent', $dummyParentClassName, - ); - $data[] = array( - $classAnnotationOptimize, 'Doctrine\\Tests\\Common\\Reflection\\UseParent', $dummyParentClassName, - ); - } - return $data; - } - - /** - * @dataProvider classAnnotationOptimize - */ - public function testClassAnnotationOptimizedParsing($classAnnotationOptimize) { - $testsRoot = substr(__DIR__, 0, -strlen(__NAMESPACE__) - 1); - $paths = array( - 'Doctrine\\Tests' => array($testsRoot), - ); - $staticReflectionParser = new StaticReflectionParser('Doctrine\\Tests\\Common\\Reflection\\ExampleAnnotationClass', new Psr0FindFile($paths), $classAnnotationOptimize); - $expectedDocComment = '/** - * @Annotation( - * key = "value" - * ) - */'; - $this->assertEquals($expectedDocComment, $staticReflectionParser->getDocComment('class')); - } - - /** - * @return array - */ - public function classAnnotationOptimize() - { - return array( - array(false), - array(true) - ); - } -} diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Reflection/UseParent.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Reflection/UseParent.php deleted file mode 100644 index dd512d4..0000000 --- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Reflection/UseParent.php +++ /dev/null @@ -1,9 +0,0 @@ -assertEquals($expectedClassName, ClassUtils::getRealClass($className)); - } - - /** - * @dataProvider dataGetClass - */ - public function testGetClass( $className, $expectedClassName ) - { - $object = new $className(); - $this->assertEquals($expectedClassName, ClassUtils::getClass($object)); - } - - public function testGetParentClass() - { - $parentClass = ClassUtils::getParentClass( 'MyProject\Proxies\__CG__\OtherProject\Proxies\__CG__\Doctrine\Tests\Common\Util\ChildObject' ); - $this->assertEquals('stdClass', $parentClass); - } - - public function testGenerateProxyClassName() - { - $this->assertEquals( 'Proxies\__CG__\stdClass', ClassUtils::generateProxyClassName( 'stdClass', 'Proxies' ) ); - } - - /** - * @dataProvider dataGetClass - */ - public function testNewReflectionClass( $className, $expectedClassName ) - { - $reflClass = ClassUtils::newReflectionClass( $className ); - $this->assertEquals( $expectedClassName, $reflClass->getName() ); - } - - /** - * @dataProvider dataGetClass - */ - public function testNewReflectionObject( $className, $expectedClassName ) - { - $object = new $className; - $reflClass = ClassUtils::newReflectionObject( $object ); - $this->assertEquals( $expectedClassName, $reflClass->getName() ); - } - } - - class ChildObject extends \stdClass - { - } -} - -namespace MyProject\Proxies\__CG__ -{ - class stdClass extends \stdClass - { - } -} - -namespace MyProject\Proxies\__CG__\Doctrine\Tests\Common\Util -{ - class ChildObject extends \Doctrine\Tests\Common\Util\ChildObject - { - } -} - -namespace MyProject\Proxies\__CG__\OtherProject\Proxies\__CG__ -{ - class stdClass extends \MyProject\Proxies\__CG__\stdClass - { - } -} - -namespace MyProject\Proxies\__CG__\OtherProject\Proxies\__CG__\Doctrine\Tests\Common\Util -{ - class ChildObject extends \MyProject\Proxies\__CG__\Doctrine\Tests\Common\Util\ChildObject - { - } -} diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Util/DebugTest.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Util/DebugTest.php deleted file mode 100644 index 66e8337..0000000 --- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Util/DebugTest.php +++ /dev/null @@ -1,65 +0,0 @@ -foo = "bar"; - $obj->bar = 1234; - - $var = Debug::export($obj, 2); - $this->assertEquals( "stdClass", $var->__CLASS__ ); - } - - public function testExportDateTime() - { - $obj = new \DateTime( "2010-10-10 10:10:10" ); - - $var = Debug::export( $obj, 2 ); - $this->assertEquals( "DateTime", $var->__CLASS__ ); - } - - public function testExportArrayTraversable() - { - $obj = new \ArrayObject(array('foobar')); - - $var = Debug::export($obj, 2); - $this->assertContains('foobar', $var->__STORAGE__); - - $it = new \ArrayIterator(array('foobar')); - - $var = Debug::export($it, 5); - $this->assertContains('foobar', $var->__STORAGE__); - } - - public function testReturnsOutput() - { - ob_start(); - - $dump = Debug::dump('foo'); - $outputValue = ob_get_contents(); - - ob_end_clean(); - - $this->assertSame($outputValue, $dump); - } - - public function testDisablesOutput() - { - ob_start(); - - $dump = Debug::dump('foo', 2, true, false); - $outputValue = ob_get_contents(); - - ob_end_clean(); - - $this->assertEmpty($outputValue); - $this->assertNotSame($outputValue, $dump); - } -} diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/DoctrineTestCase.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/DoctrineTestCase.php deleted file mode 100644 index e8323d2..0000000 --- a/core/vendor/doctrine/common/tests/Doctrine/Tests/DoctrineTestCase.php +++ /dev/null @@ -1,10 +0,0 @@ - - */ -class NativePhpunitTask extends Task -{ - private $test; - private $testfile; - private $testdirectory; - private $configuration = null; - private $coverageClover = null; - private $junitlogfile = null; - private $haltonfailure = true; - private $haltonerror = true; - - public function setTestdirectory($directory) { - $this->testdirectory = $directory; - } - - public function setTest($test) { - $this->test = $test; - } - - public function setTestfile($testfile) { - $this->testfile = $testfile; - } - - public function setJunitlogfile($junitlogfile) { - if (strlen($junitlogfile) == 0) { - $junitlogfile = NULL; - } - - $this->junitlogfile = $junitlogfile; - } - - public function setConfiguration($configuration) { - if (strlen($configuration) == 0) { - $configuration = NULL; - } - - $this->configuration = $configuration; - } - - public function setCoverageClover($coverageClover) { - if (strlen($coverageClover) == 0) { - $coverageClover = NULL; - } - - $this->coverageClover = $coverageClover; - } - - public function setHaltonfailure($haltonfailures) { - $this->haltonfailure = $haltonfailures; - } - - public function setHaltonerror($haltonerrors) { - $this->haltonerror = $haltonerrors; - } - - public function init() - { - require_once "PHPUnit/Runner/Version.php"; - $version = PHPUnit_Runner_Version::id(); - - if (version_compare($version, '3.4.0') < 0) { - throw new BuildException("NativePHPUnitTask requires PHPUnit version >= 3.2.0", $this->getLocation()); - } - - require_once 'PHPUnit/Util/Filter.php'; - - // point PHPUnit_MAIN_METHOD define to non-existing method - if (!defined('PHPUnit_MAIN_METHOD')) { - define('PHPUnit_MAIN_METHOD', 'PHPUnitTask::undefined'); - } - } - - public function main() - { - if (!is_dir(realpath($this->testdirectory))) { - throw new BuildException("NativePHPUnitTask requires a Test Directory path given, '".$this->testdirectory."' given."); - } - set_include_path(realpath($this->testdirectory) . PATH_SEPARATOR . get_include_path()); - - $printer = new NativePhpunitPrinter(); - - $arguments = array( - 'configuration' => $this->configuration, - 'coverageClover' => $this->coverageClover, - 'junitLogfile' => $this->junitlogfile, - 'printer' => $printer, - ); - - $runner = new PHPUnit_TextUI_TestRunner(); - $suite = $runner->getTest($this->test, $this->testfile, true); - - try { - $result = $runner->doRun($suite, $arguments); - /* @var $result PHPUnit_Framework_TestResult */ - - if ( ($this->haltonfailure && $result->failureCount() > 0) || ($this->haltonerror && $result->errorCount() > 0) ) { - throw new BuildException("PHPUnit: ".$result->failureCount()." Failures and ".$result->errorCount()." Errors, ". - "last failure message: ".$printer->getMessages()); - } - - $this->log("PHPUnit Success: ".count($result->passed())." tests passed, no ". - "failures (".$result->skippedCount()." skipped, ".$result->notImplementedCount()." not implemented)"); - - // Hudson for example doesn't like the backslash in class names - if (is_file($this->coverageClover)) { - $this->log("Generated Clover Coverage XML to: ".$this->coverageClover); - $content = file_get_contents($this->coverageClover); - $content = str_replace("\\", ".", $content); - file_put_contents($this->coverageClover, $content); - unset($content); - } - - } catch(\Exception $e) { - throw new BuildException("NativePhpunitTask failed: ".$e->getMessage()); - } - } -} - -class NativePhpunitPrinter extends PHPUnit_Util_Printer implements PHPUnit_Framework_TestListener -{ - private $_messages = array(); - - public function write($buffer) - { - // do nothing - } - - public function getMessages() - { - return $this->_messages; - } - - /** - * An error occurred. - * - * @param PHPUnit_Framework_Test $test - * @param Exception $e - * @param float $time - */ - public function addError(PHPUnit_Framework_Test $test, Exception $e, $time) - { - $this->_messages[] = "Test ERROR: ".$test->getName().": ".$e->getMessage(); - } - - /** - * A failure occurred. - * - * @param PHPUnit_Framework_Test $test - * @param PHPUnit_Framework_AssertionFailedError $e - * @param float $time - */ - public function addFailure(PHPUnit_Framework_Test $test, PHPUnit_Framework_AssertionFailedError $e, $time) - { - $this->_messages[] = "Test FAILED: ".$test->getName().": ".$e->getMessage(); - } - - /** - * Incomplete test. - * - * @param PHPUnit_Framework_Test $test - * @param Exception $e - * @param float $time - */ - public function addIncompleteTest(PHPUnit_Framework_Test $test, Exception $e, $time) - { - - } - - /** - * Skipped test. - * - * @param PHPUnit_Framework_Test $test - * @param Exception $e - * @param float $time - * @since Method available since Release 3.0.0 - */ - public function addSkippedTest(PHPUnit_Framework_Test $test, Exception $e, $time) - { - - } - - /** - * A test suite started. - * - * @param PHPUnit_Framework_TestSuite $suite - * @since Method available since Release 2.2.0 - */ - public function startTestSuite(PHPUnit_Framework_TestSuite $suite) - { - - } - - /** - * A test suite ended. - * - * @param PHPUnit_Framework_TestSuite $suite - * @since Method available since Release 2.2.0 - */ - public function endTestSuite(PHPUnit_Framework_TestSuite $suite) - { - - } - - /** - * A test started. - * - * @param PHPUnit_Framework_Test $test - */ - public function startTest(PHPUnit_Framework_Test $test) - { - - } - - /** - * A test ended. - * - * @param PHPUnit_Framework_Test $test - * @param float $time - */ - public function endTest(PHPUnit_Framework_Test $test, $time) - { - - } -} diff --git a/core/vendor/doctrine/common/tests/README.markdown b/core/vendor/doctrine/common/tests/README.markdown deleted file mode 100644 index e6f1703..0000000 --- a/core/vendor/doctrine/common/tests/README.markdown +++ /dev/null @@ -1,27 +0,0 @@ -# Running the Doctrine 2 Testsuite - -## Running tests - -Execute PHPUnit in the root folder of your doctrine-common clone. - - phpunit - -## Testing Lock-Support - -The Lock support in Doctrine 2 is tested using Gearman, which allows to run concurrent tasks in parallel. -Install Gearman with PHP as follows: - -1. Go to http://www.gearman.org and download the latest Gearman Server -2. Compile it and then call ldconfig -3. Start it up "gearmand -vvvv" -4. Install pecl/gearman by calling "gearman-beta" - -You can then go into tests/ and start up two workers: - - php Doctrine/Tests/ORM/Functional/Locking/LockAgentWorker.php - -Then run the locking test-suite: - - phpunit --configuration Doctrine/Tests/ORM/Functional/Locking/GearmanLockTest.php - -This can run considerable time, because it is using sleep() to test for the timing ranges of locks. \ No newline at end of file diff --git a/core/vendor/doctrine/inflector/README.md b/core/vendor/doctrine/inflector/README.md deleted file mode 100644 index f2d18d0..0000000 --- a/core/vendor/doctrine/inflector/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Doctrine Inflector - -Doctrine Inflector is a small library that can perform string manipulations -with regard to upper-/lowercase and singular/plural forms of words. diff --git a/core/vendor/doctrine/inflector/composer.json b/core/vendor/doctrine/inflector/composer.json deleted file mode 100644 index 3d3c3f9..0000000 --- a/core/vendor/doctrine/inflector/composer.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "name": "doctrine/inflector", - "type": "library", - "description": "Common String Manipulations with regard to casing and singular/plural rules.", - "keywords": ["string", "inflection", "singuarlize", "pluarlize"], - "homepage": "http://www.doctrine-project.org", - "license": "MIT", - "authors": [ - {"name": "Guilherme Blanco", "email": "guilhermeblanco@gmail.com"}, - {"name": "Roman Borschel", "email": "roman@code-factory.org"}, - {"name": "Benjamin Eberlei", "email": "kontakt@beberlei.de"}, - {"name": "Jonathan Wage", "email": "jonwage@gmail.com"}, - {"name": "Johannes Schmitt", "email": "schmittjoh@gmail.com"} - ], - "require": { - "php": ">=5.3.2" - }, - "autoload": { - "psr-0": { "Doctrine\\Common\\Inflector\\": "lib/" } - } -} diff --git a/core/vendor/doctrine/inflector/lib/Doctrine/Common/Inflector/Inflector.php b/core/vendor/doctrine/inflector/lib/Doctrine/Common/Inflector/Inflector.php deleted file mode 100644 index f4e38e7..0000000 --- a/core/vendor/doctrine/inflector/lib/Doctrine/Common/Inflector/Inflector.php +++ /dev/null @@ -1,385 +0,0 @@ -. - */ - -namespace Doctrine\Common\Inflector; - -/** - * Doctrine inflector has static methods for inflecting text - * - * The methods in these classes are from several different sources collected - * across several different php projects and several different authors. The - * original author names and emails are not known. - * - * Plurialize & Singularize implementation are borrowed from CakePHP with some modifications. - * - * @link www.doctrine-project.org - * @since 1.0 - * @author Konsta Vesterinen - * @author Jonathan H. Wage - */ -class Inflector -{ - /** - * Plural inflector rules - * - * @var array - */ - private static $plural = array( - 'rules' => array( - '/(s)tatus$/i' => '\1\2tatuses', - '/(quiz)$/i' => '\1zes', - '/^(ox)$/i' => '\1\2en', - '/([m|l])ouse$/i' => '\1ice', - '/(matr|vert|ind)(ix|ex)$/i' => '\1ices', - '/(x|ch|ss|sh)$/i' => '\1es', - '/([^aeiouy]|qu)y$/i' => '\1ies', - '/(hive)$/i' => '\1s', - '/(?:([^f])fe|([lr])f)$/i' => '\1\2ves', - '/sis$/i' => 'ses', - '/([ti])um$/i' => '\1a', - '/(p)erson$/i' => '\1eople', - '/(m)an$/i' => '\1en', - '/(c)hild$/i' => '\1hildren', - '/(buffal|tomat)o$/i' => '\1\2oes', - '/(alumn|bacill|cact|foc|fung|nucle|radi|stimul|syllab|termin|vir)us$/i' => '\1i', - '/us$/i' => 'uses', - '/(alias)$/i' => '\1es', - '/(ax|cris|test)is$/i' => '\1es', - '/s$/' => 's', - '/^$/' => '', - '/$/' => 's', - ), - 'uninflected' => array( - '.*[nrlm]ese', '.*deer', '.*fish', '.*measles', '.*ois', '.*pox', '.*sheep', 'people', 'cookie' - ), - 'irregular' => array( - 'atlas' => 'atlases', - 'beef' => 'beefs', - 'brother' => 'brothers', - 'cafe' => 'cafes', - 'child' => 'children', - 'cookie' => 'cookies', - 'corpus' => 'corpuses', - 'cow' => 'cows', - 'ganglion' => 'ganglions', - 'genie' => 'genies', - 'genus' => 'genera', - 'graffito' => 'graffiti', - 'hoof' => 'hoofs', - 'loaf' => 'loaves', - 'man' => 'men', - 'money' => 'monies', - 'mongoose' => 'mongooses', - 'move' => 'moves', - 'mythos' => 'mythoi', - 'niche' => 'niches', - 'numen' => 'numina', - 'occiput' => 'occiputs', - 'octopus' => 'octopuses', - 'opus' => 'opuses', - 'ox' => 'oxen', - 'penis' => 'penises', - 'person' => 'people', - 'sex' => 'sexes', - 'soliloquy' => 'soliloquies', - 'testis' => 'testes', - 'trilby' => 'trilbys', - 'turf' => 'turfs' - ) - ); - - /** - * Singular inflector rules - * - * @var array - */ - private static $singular = array( - 'rules' => array( - '/(s)tatuses$/i' => '\1\2tatus', - '/^(.*)(menu)s$/i' => '\1\2', - '/(quiz)zes$/i' => '\\1', - '/(matr)ices$/i' => '\1ix', - '/(vert|ind)ices$/i' => '\1ex', - '/^(ox)en/i' => '\1', - '/(alias)(es)*$/i' => '\1', - '/(alumn|bacill|cact|foc|fung|nucle|radi|stimul|syllab|termin|viri?)i$/i' => '\1us', - '/([ftw]ax)es/i' => '\1', - '/(cris|ax|test)es$/i' => '\1is', - '/(shoe|slave)s$/i' => '\1', - '/(o)es$/i' => '\1', - '/ouses$/' => 'ouse', - '/([^a])uses$/' => '\1us', - '/([m|l])ice$/i' => '\1ouse', - '/(x|ch|ss|sh)es$/i' => '\1', - '/(m)ovies$/i' => '\1\2ovie', - '/(s)eries$/i' => '\1\2eries', - '/([^aeiouy]|qu)ies$/i' => '\1y', - '/([lr])ves$/i' => '\1f', - '/(tive)s$/i' => '\1', - '/(hive)s$/i' => '\1', - '/(drive)s$/i' => '\1', - '/([^fo])ves$/i' => '\1fe', - '/(^analy)ses$/i' => '\1sis', - '/(analy|diagno|^ba|(p)arenthe|(p)rogno|(s)ynop|(t)he)ses$/i' => '\1\2sis', - '/([ti])a$/i' => '\1um', - '/(p)eople$/i' => '\1\2erson', - '/(m)en$/i' => '\1an', - '/(c)hildren$/i' => '\1\2hild', - '/(n)ews$/i' => '\1\2ews', - '/eaus$/' => 'eau', - '/^(.*us)$/' => '\\1', - '/s$/i' => '' - ), - 'uninflected' => array( - '.*[nrlm]ese', '.*deer', '.*fish', '.*measles', '.*ois', '.*pox', '.*sheep', '.*ss' - ), - 'irregular' => array( - 'foes' => 'foe', - 'waves' => 'wave', - 'curves' => 'curve' - ) - ); - - /** - * Words that should not be inflected - * - * @var array - */ - private static $uninflected = array( - 'Amoyese', 'bison', 'Borghese', 'bream', 'breeches', 'britches', 'buffalo', 'cantus', - 'carp', 'chassis', 'clippers', 'cod', 'coitus', 'Congoese', 'contretemps', 'corps', - 'debris', 'diabetes', 'djinn', 'eland', 'elk', 'equipment', 'Faroese', 'flounder', - 'Foochowese', 'gallows', 'Genevese', 'Genoese', 'Gilbertese', 'graffiti', - 'headquarters', 'herpes', 'hijinks', 'Hottentotese', 'information', 'innings', - 'jackanapes', 'Kiplingese', 'Kongoese', 'Lucchese', 'mackerel', 'Maltese', '.*?media', - 'mews', 'moose', 'mumps', 'Nankingese', 'news', 'nexus', 'Niasese', - 'Pekingese', 'Piedmontese', 'pincers', 'Pistoiese', 'pliers', 'Portuguese', - 'proceedings', 'rabies', 'rice', 'rhinoceros', 'salmon', 'Sarawakese', 'scissors', - 'sea[- ]bass', 'series', 'Shavese', 'shears', 'siemens', 'species', 'swine', 'testes', - 'trousers', 'trout', 'tuna', 'Vermontese', 'Wenchowese', 'whiting', 'wildebeest', - 'Yengeese' - ); - - /** - * Method cache array. - * - * @var array - */ - private static $cache = array(); - - /** - * The initial state of Inflector so reset() works. - * - * @var array - */ - private static $initialState = array(); - - /** - * Convert word in to the format for a Doctrine table name. Converts 'ModelName' to 'model_name' - * - * @param string $word Word to tableize - * @return string $word Tableized word - */ - public static function tableize($word) - { - return strtolower(preg_replace('~(?<=\\w)([A-Z])~', '_$1', $word)); - } - - /** - * Convert a word in to the format for a Doctrine class name. Converts 'table_name' to 'TableName' - * - * @param string $word Word to classify - * @return string $word Classified word - */ - public static function classify($word) - { - return str_replace(" ", "", ucwords(strtr($word, "_-", " "))); - } - - /** - * Camelize a word. This uses the classify() method and turns the first character to lowercase - * - * @param string $word - * @return string $word - */ - public static function camelize($word) - { - return lcfirst(self::classify($word)); - } - - /** - * Clears Inflectors inflected value caches. And resets the inflection - * rules to the initial values. - * - * @return void - */ - public static function reset() - { - if (empty(self::$initialState)) { - self::$initialState = get_class_vars('Inflector'); - return; - } - foreach (self::$initialState as $key => $val) { - if ($key != 'initialState') { - self::${$key} = $val; - } - } - } - - /** - * Adds custom inflection $rules, of either 'plural' or 'singular' $type. - * - * ### Usage: - * - * {{{ - * Inflector::rules('plural', array('/^(inflect)or$/i' => '\1ables')); - * Inflector::rules('plural', array( - * 'rules' => array('/^(inflect)ors$/i' => '\1ables'), - * 'uninflected' => array('dontinflectme'), - * 'irregular' => array('red' => 'redlings') - * )); - * }}} - * - * @param string $type The type of inflection, either 'plural' or 'singular' - * @param array $rules Array of rules to be added. - * @param boolean $reset If true, will unset default inflections for all - * new rules that are being defined in $rules. - * @return void - */ - public static function rules($type, $rules, $reset = false) - { - foreach ($rules as $rule => $pattern) { - if (is_array($pattern)) { - if ($reset) { - self::${$type}[$rule] = $pattern; - } else { - if ($rule === 'uninflected') { - self::${$type}[$rule] = array_merge($pattern, self::${$type}[$rule]); - } else { - self::${$type}[$rule] = $pattern + self::${$type}[$rule]; - } - } - unset($rules[$rule], self::${$type}['cache' . ucfirst($rule)]); - if (isset(self::${$type}['merged'][$rule])) { - unset(self::${$type}['merged'][$rule]); - } - if ($type === 'plural') { - self::$cache['pluralize'] = self::$cache['tableize'] = array(); - } elseif ($type === 'singular') { - self::$cache['singularize'] = array(); - } - } - } - self::${$type}['rules'] = $rules + self::${$type}['rules']; - } - - /** - * Return $word in plural form. - * - * @param string $word Word in singular - * @return string Word in plural - */ - public static function pluralize($word) - { - if (isset(self::$cache['pluralize'][$word])) { - return self::$cache['pluralize'][$word]; - } - - if (!isset(self::$plural['merged']['irregular'])) { - self::$plural['merged']['irregular'] = self::$plural['irregular']; - } - - if (!isset(self::$plural['merged']['uninflected'])) { - self::$plural['merged']['uninflected'] = array_merge(self::$plural['uninflected'], self::$uninflected); - } - - if (!isset(self::$plural['cacheUninflected']) || !isset(self::$plural['cacheIrregular'])) { - self::$plural['cacheUninflected'] = '(?:' . implode('|', self::$plural['merged']['uninflected']) . ')'; - self::$plural['cacheIrregular'] = '(?:' . implode('|', array_keys(self::$plural['merged']['irregular'])) . ')'; - } - - if (preg_match('/(.*)\\b(' . self::$plural['cacheIrregular'] . ')$/i', $word, $regs)) { - self::$cache['pluralize'][$word] = $regs[1] . substr($word, 0, 1) . substr(self::$plural['merged']['irregular'][strtolower($regs[2])], 1); - return self::$cache['pluralize'][$word]; - } - - if (preg_match('/^(' . self::$plural['cacheUninflected'] . ')$/i', $word, $regs)) { - self::$cache['pluralize'][$word] = $word; - return $word; - } - - foreach (self::$plural['rules'] as $rule => $replacement) { - if (preg_match($rule, $word)) { - self::$cache['pluralize'][$word] = preg_replace($rule, $replacement, $word); - return self::$cache['pluralize'][$word]; - } - } - } - - /** - * Return $word in singular form. - * - * @param string $word Word in plural - * @return string Word in singular - */ - public static function singularize($word) - { - if (isset(self::$cache['singularize'][$word])) { - return self::$cache['singularize'][$word]; - } - - if (!isset(self::$singular['merged']['uninflected'])) { - self::$singular['merged']['uninflected'] = array_merge( - self::$singular['uninflected'], - self::$uninflected - ); - } - - if (!isset(self::$singular['merged']['irregular'])) { - self::$singular['merged']['irregular'] = array_merge( - self::$singular['irregular'], - array_flip(self::$plural['irregular']) - ); - } - - if (!isset(self::$singular['cacheUninflected']) || !isset(self::$singular['cacheIrregular'])) { - self::$singular['cacheUninflected'] = '(?:' . join('|', self::$singular['merged']['uninflected']) . ')'; - self::$singular['cacheIrregular'] = '(?:' . join('|', array_keys(self::$singular['merged']['irregular'])) . ')'; - } - - if (preg_match('/(.*)\\b(' . self::$singular['cacheIrregular'] . ')$/i', $word, $regs)) { - self::$cache['singularize'][$word] = $regs[1] . substr($word, 0, 1) . substr(self::$singular['merged']['irregular'][strtolower($regs[2])], 1); - return self::$cache['singularize'][$word]; - } - - if (preg_match('/^(' . self::$singular['cacheUninflected'] . ')$/i', $word, $regs)) { - self::$cache['singularize'][$word] = $word; - return $word; - } - - foreach (self::$singular['rules'] as $rule => $replacement) { - if (preg_match($rule, $word)) { - self::$cache['singularize'][$word] = preg_replace($rule, $replacement, $word); - return self::$cache['singularize'][$word]; - } - } - self::$cache['singularize'][$word] = $word; - return $word; - } -} diff --git a/core/vendor/doctrine/inflector/phpunit.xml.dist b/core/vendor/doctrine/inflector/phpunit.xml.dist deleted file mode 100644 index ef07faa..0000000 --- a/core/vendor/doctrine/inflector/phpunit.xml.dist +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - ./tests/Doctrine/ - - - - - - ./lib/Doctrine/ - - - - - - performance - - - diff --git a/core/vendor/doctrine/inflector/tests/Doctrine/Tests/Common/Inflector/InflectorTest.php b/core/vendor/doctrine/inflector/tests/Doctrine/Tests/Common/Inflector/InflectorTest.php deleted file mode 100644 index 487c2cd..0000000 --- a/core/vendor/doctrine/inflector/tests/Doctrine/Tests/Common/Inflector/InflectorTest.php +++ /dev/null @@ -1,185 +0,0 @@ -assertEquals($singular, Inflector::singularize($plural), "'$plural' should be singularized to '$singular'"); - } - - /** - * testInflectingPlurals method - * - * @dataProvider dataSampleWords - * @return void - */ - public function testInflectingPlurals($singular, $plural) { - $this->assertEquals($plural, Inflector::pluralize($singular), "'$singular' should be pluralized to '$plural'"); - } - - /** - * testCustomPluralRule method - * - * @return void - */ - public function testCustomPluralRule() { - Inflector::reset(); - Inflector::rules('plural', array('/^(custom)$/i' => '\1izables')); - $this->assertEquals(Inflector::pluralize('custom'), 'customizables'); - - Inflector::rules('plural', array('uninflected' => array('uninflectable'))); - $this->assertEquals(Inflector::pluralize('uninflectable'), 'uninflectable'); - - Inflector::rules('plural', array( - 'rules' => array('/^(alert)$/i' => '\1ables'), - 'uninflected' => array('noflect', 'abtuse'), - 'irregular' => array('amaze' => 'amazable', 'phone' => 'phonezes') - )); - $this->assertEquals(Inflector::pluralize('noflect'), 'noflect'); - $this->assertEquals(Inflector::pluralize('abtuse'), 'abtuse'); - $this->assertEquals(Inflector::pluralize('alert'), 'alertables'); - $this->assertEquals(Inflector::pluralize('amaze'), 'amazable'); - $this->assertEquals(Inflector::pluralize('phone'), 'phonezes'); - } - - /** - * testCustomSingularRule method - * - * @return void - */ - public function testCustomSingularRule() { - Inflector::reset(); - Inflector::rules('singular', array('/(eple)r$/i' => '\1', '/(jente)r$/i' => '\1')); - - $this->assertEquals(Inflector::singularize('epler'), 'eple'); - $this->assertEquals(Inflector::singularize('jenter'), 'jente'); - - Inflector::rules('singular', array( - 'rules' => array('/^(bil)er$/i' => '\1', '/^(inflec|contribu)tors$/i' => '\1ta'), - 'uninflected' => array('singulars'), - 'irregular' => array('spins' => 'spinor') - )); - - $this->assertEquals(Inflector::singularize('inflectors'), 'inflecta'); - $this->assertEquals(Inflector::singularize('contributors'), 'contributa'); - $this->assertEquals(Inflector::singularize('spins'), 'spinor'); - $this->assertEquals(Inflector::singularize('singulars'), 'singulars'); - } - - /** - * test that setting new rules clears the inflector caches. - * - * @return void - */ - public function testRulesClearsCaches() { - Inflector::reset(); - $this->assertEquals(Inflector::singularize('Bananas'), 'Banana'); - $this->assertEquals(Inflector::pluralize('Banana'), 'Bananas'); - - Inflector::rules('singular', array( - 'rules' => array('/(.*)nas$/i' => '\1zzz') - )); - $this->assertEquals('Banazzz', Inflector::singularize('Bananas'), 'Was inflected with old rules.'); - - Inflector::rules('plural', array( - 'rules' => array('/(.*)na$/i' => '\1zzz'), - 'irregular' => array('corpus' => 'corpora') - )); - $this->assertEquals(Inflector::pluralize('Banana'), 'Banazzz', 'Was inflected with old rules.'); - $this->assertEquals(Inflector::pluralize('corpus'), 'corpora', 'Was inflected with old irregular form.'); - } - - /** - * Test resetting inflection rules. - * - * @return void - */ - public function testCustomRuleWithReset() { - Inflector::reset(); - $uninflected = array('atlas', 'lapis', 'onibus', 'pires', 'virus', '.*x'); - $pluralIrregular = array('as' => 'ases'); - - Inflector::rules('singular', array( - 'rules' => array('/^(.*)(a|e|o|u)is$/i' => '\1\2l'), - 'uninflected' => $uninflected, - ), true); - - Inflector::rules('plural', array( - 'rules' => array( - '/^(.*)(a|e|o|u)l$/i' => '\1\2is', - ), - 'uninflected' => $uninflected, - 'irregular' => $pluralIrregular - ), true); - - $this->assertEquals(Inflector::pluralize('Alcool'), 'Alcoois'); - $this->assertEquals(Inflector::pluralize('Atlas'), 'Atlas'); - $this->assertEquals(Inflector::singularize('Alcoois'), 'Alcool'); - $this->assertEquals(Inflector::singularize('Atlas'), 'Atlas'); - } -} - diff --git a/core/vendor/doctrine/inflector/tests/Doctrine/Tests/DoctrineTestCase.php b/core/vendor/doctrine/inflector/tests/Doctrine/Tests/DoctrineTestCase.php deleted file mode 100644 index e8323d2..0000000 --- a/core/vendor/doctrine/inflector/tests/Doctrine/Tests/DoctrineTestCase.php +++ /dev/null @@ -1,10 +0,0 @@ - composer-installer.php - hhvm composer-installer.php - hhvm -v ResourceLimit.SocketDefaultTimeout=30 -v Http.SlowQueryThreshold=30000 composer.phar update --prefer-source -elif [ "$TRAVIS_PHP_VERSION" = '5.3.3' ] ; then - composer self-update - composer update --prefer-source --no-dev - composer dump-autoload -else - composer self-update - composer update --prefer-source -fi diff --git a/core/vendor/doctrine/instantiator/.travis.yml b/core/vendor/doctrine/instantiator/.travis.yml deleted file mode 100644 index 0f686a9..0000000 --- a/core/vendor/doctrine/instantiator/.travis.yml +++ /dev/null @@ -1,26 +0,0 @@ -language: php - -php: - - 5.3.3 - - 5.3 - - 5.4 - - 5.5 - - 5.6 - - hhvm - - hhvm-nightly - -before_script: - - ./.travis.install.sh - -script: - - sh -c "if [ '$TRAVIS_PHP_VERSION' = '5.3.3' ]; then phpunit; fi" - - sh -c "if [ '$TRAVIS_PHP_VERSION' != '5.3.3' ]; then ./vendor/bin/phpunit; fi" - - sh -c "if [ '$TRAVIS_PHP_VERSION' != '5.3.3' ]; then ./vendor/bin/phpcs --standard=PSR2 ./src/ ./tests/; fi" - - sh -c "if [[ '$TRAVIS_PHP_VERSION' != '5.3.3' && '$TRAVIS_PHP_VERSION' != '5.4.29' && '$TRAVIS_PHP_VERSION' != '5.5.13' ]]; then php -n ./vendor/bin/athletic -p ./tests/DoctrineTest/InstantiatorPerformance/ -f GroupedFormatter; fi" - -after_script: - - sh -c "if [ '$TRAVIS_PHP_VERSION' != '5.3.3' ]; then wget https://scrutinizer-ci.com/ocular.phar; php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi" - -matrix: - allow_failures: - - php: hhvm-nightly diff --git a/core/vendor/doctrine/instantiator/CONTRIBUTING.md b/core/vendor/doctrine/instantiator/CONTRIBUTING.md deleted file mode 100644 index 75b84b2..0000000 --- a/core/vendor/doctrine/instantiator/CONTRIBUTING.md +++ /dev/null @@ -1,35 +0,0 @@ -# Contributing - - * Coding standard for the project is [PSR-2](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md) - * The project will follow strict [object calisthenics](http://www.slideshare.net/guilhermeblanco/object-calisthenics-applied-to-php) - * Any contribution must provide tests for additional introduced conditions - * Any un-confirmed issue needs a failing test case before being accepted - * Pull requests must be sent from a new hotfix/feature branch, not from `master`. - -## Installation - -To install the project and run the tests, you need to clone it first: - -```sh -$ git clone git://github.com/doctrine/instantiator.git -``` - -You will then need to run a composer installation: - -```sh -$ cd Instantiator -$ curl -s https://getcomposer.org/installer | php -$ php composer.phar update -``` - -## Testing - -The PHPUnit version to be used is the one installed as a dev- dependency via composer: - -```sh -$ ./vendor/bin/phpunit -``` - -Accepted coverage for new contributions is 80%. Any contribution not satisfying this requirement -won't be merged. - diff --git a/core/vendor/doctrine/instantiator/LICENSE b/core/vendor/doctrine/instantiator/LICENSE deleted file mode 100644 index 4d983d1..0000000 --- a/core/vendor/doctrine/instantiator/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2014 Doctrine Project - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/core/vendor/doctrine/instantiator/README.md b/core/vendor/doctrine/instantiator/README.md deleted file mode 100644 index 393ec7c..0000000 --- a/core/vendor/doctrine/instantiator/README.md +++ /dev/null @@ -1,40 +0,0 @@ -# Instantiator - -This library provides a way of avoiding usage of constructors when instantiating PHP classes. - -[![Build Status](https://travis-ci.org/doctrine/instantiator.svg?branch=master)](https://travis-ci.org/doctrine/instantiator) -[![Code Coverage](https://scrutinizer-ci.com/g/doctrine/instantiator/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/doctrine/instantiator/?branch=master) -[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/doctrine/instantiator/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/doctrine/instantiator/?branch=master) -[![Dependency Status](https://www.versioneye.com/package/php--doctrine--instantiator/badge.svg)](https://www.versioneye.com/package/php--doctrine--instantiator) -[![HHVM Status](http://hhvm.h4cc.de/badge/doctrine/instantiator.png)](http://hhvm.h4cc.de/package/doctrine/instantiator) - -[![Latest Stable Version](https://poser.pugx.org/doctrine/instantiator/v/stable.png)](https://packagist.org/packages/doctrine/instantiator) -[![Latest Unstable Version](https://poser.pugx.org/doctrine/instantiator/v/unstable.png)](https://packagist.org/packages/doctrine/instantiator) - -## Installation - -The suggested installation method is via [composer](https://getcomposer.org/): - -```sh -php composer.phar require "doctrine/instantiator:~1.0.3" -``` - -## Usage - -The instantiator is able to create new instances of any class without using the constructor or any API of the class -itself: - -```php -$instantiator = new \Doctrine\Instantiator\Instantiator(); - -$instance = $instantiator->instantiate('My\\ClassName\\Here'); -``` - -## Contributing - -Please read the [CONTRIBUTING.md](CONTRIBUTING.md) contents if you wish to help out! - -## Credits - -This library was migrated from [ocramius/instantiator](https://github.com/Ocramius/Instantiator), which -has been donated to the doctrine organization, and which is now deprecated in favour of this package. diff --git a/core/vendor/doctrine/instantiator/composer.json b/core/vendor/doctrine/instantiator/composer.json deleted file mode 100644 index 89d59f6..0000000 --- a/core/vendor/doctrine/instantiator/composer.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "name": "doctrine/instantiator", - "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "type": "library", - "license": "MIT", - "homepage": "https://github.com/doctrine/instantiator", - "keywords": [ - "instantiate", - "constructor" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "http://ocramius.github.com/" - } - ], - "require": { - "php": ">=5.3,<8.0-DEV" - }, - "require-dev": { - "ext-phar": "*", - "ext-pdo": "*", - "phpunit/phpunit": "~4.0", - "squizlabs/php_codesniffer": "2.0.*@ALPHA", - "athletic/athletic": "~0.1.8" - }, - "autoload": { - "psr-0": { - "Doctrine\\Instantiator\\": "src" - } - }, - "autoload-dev": { - "psr-0": { - "DoctrineTest\\InstantiatorPerformance\\": "tests", - "DoctrineTest\\InstantiatorTest\\": "tests", - "DoctrineTest\\InstantiatorTestAsset\\": "tests" - } - }, - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - } -} diff --git a/core/vendor/doctrine/instantiator/phpmd.xml.dist b/core/vendor/doctrine/instantiator/phpmd.xml.dist deleted file mode 100644 index 8254105..0000000 --- a/core/vendor/doctrine/instantiator/phpmd.xml.dist +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/core/vendor/doctrine/instantiator/phpunit.xml.dist b/core/vendor/doctrine/instantiator/phpunit.xml.dist deleted file mode 100644 index 178ba17..0000000 --- a/core/vendor/doctrine/instantiator/phpunit.xml.dist +++ /dev/null @@ -1,25 +0,0 @@ - - - - ./tests/DoctrineTest/InstantiatorTest - - - - ./src - - - - - - diff --git a/core/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/ExceptionInterface.php b/core/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/ExceptionInterface.php deleted file mode 100644 index 3065375..0000000 --- a/core/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/ExceptionInterface.php +++ /dev/null @@ -1,29 +0,0 @@ -. - */ - -namespace Doctrine\Instantiator\Exception; - -/** - * Base exception marker interface for the instantiator component - * - * @author Marco Pivetta - */ -interface ExceptionInterface -{ -} diff --git a/core/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/InvalidArgumentException.php b/core/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/InvalidArgumentException.php deleted file mode 100644 index ea8d28c..0000000 --- a/core/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/InvalidArgumentException.php +++ /dev/null @@ -1,62 +0,0 @@ -. - */ - -namespace Doctrine\Instantiator\Exception; - -use InvalidArgumentException as BaseInvalidArgumentException; -use ReflectionClass; - -/** - * Exception for invalid arguments provided to the instantiator - * - * @author Marco Pivetta - */ -class InvalidArgumentException extends BaseInvalidArgumentException implements ExceptionInterface -{ - /** - * @param string $className - * - * @return self - */ - public static function fromNonExistingClass($className) - { - if (interface_exists($className)) { - return new self(sprintf('The provided type "%s" is an interface, and can not be instantiated', $className)); - } - - if (PHP_VERSION_ID >= 50400 && trait_exists($className)) { - return new self(sprintf('The provided type "%s" is a trait, and can not be instantiated', $className)); - } - - return new self(sprintf('The provided class "%s" does not exist', $className)); - } - - /** - * @param ReflectionClass $reflectionClass - * - * @return self - */ - public static function fromAbstractClass(ReflectionClass $reflectionClass) - { - return new self(sprintf( - 'The provided class "%s" is abstract, and can not be instantiated', - $reflectionClass->getName() - )); - } -} diff --git a/core/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/UnexpectedValueException.php b/core/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/UnexpectedValueException.php deleted file mode 100644 index 1681e56..0000000 --- a/core/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/UnexpectedValueException.php +++ /dev/null @@ -1,79 +0,0 @@ -. - */ - -namespace Doctrine\Instantiator\Exception; - -use Exception; -use ReflectionClass; -use UnexpectedValueException as BaseUnexpectedValueException; - -/** - * Exception for given parameters causing invalid/unexpected state on instantiation - * - * @author Marco Pivetta - */ -class UnexpectedValueException extends BaseUnexpectedValueException implements ExceptionInterface -{ - /** - * @param ReflectionClass $reflectionClass - * @param Exception $exception - * - * @return self - */ - public static function fromSerializationTriggeredException(ReflectionClass $reflectionClass, Exception $exception) - { - return new self( - sprintf( - 'An exception was raised while trying to instantiate an instance of "%s" via un-serialization', - $reflectionClass->getName() - ), - 0, - $exception - ); - } - - /** - * @param ReflectionClass $reflectionClass - * @param string $errorString - * @param int $errorCode - * @param string $errorFile - * @param int $errorLine - * - * @return UnexpectedValueException - */ - public static function fromUncleanUnSerialization( - ReflectionClass $reflectionClass, - $errorString, - $errorCode, - $errorFile, - $errorLine - ) { - return new self( - sprintf( - 'Could not produce an instance of "%s" via un-serialization, since an error was triggered ' - . 'in file "%s" at line "%d"', - $reflectionClass->getName(), - $errorFile, - $errorLine - ), - 0, - new Exception($errorString, $errorCode) - ); - } -} diff --git a/core/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Instantiator.php b/core/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Instantiator.php deleted file mode 100644 index 98868cf..0000000 --- a/core/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Instantiator.php +++ /dev/null @@ -1,254 +0,0 @@ -. - */ - -namespace Doctrine\Instantiator; - -use Closure; -use Doctrine\Instantiator\Exception\InvalidArgumentException; -use Doctrine\Instantiator\Exception\UnexpectedValueException; -use Exception; -use ReflectionClass; - -/** - * {@inheritDoc} - * - * @author Marco Pivetta - */ -final class Instantiator implements InstantiatorInterface -{ - /** - * Markers used internally by PHP to define whether {@see \unserialize} should invoke - * the method {@see \Serializable::unserialize()} when dealing with classes implementing - * the {@see \Serializable} interface. - */ - const SERIALIZATION_FORMAT_USE_UNSERIALIZER = 'C'; - const SERIALIZATION_FORMAT_AVOID_UNSERIALIZER = 'O'; - - /** - * @var \Closure[] of {@see \Closure} instances used to instantiate specific classes - */ - private static $cachedInstantiators = array(); - - /** - * @var object[] of objects that can directly be cloned - */ - private static $cachedCloneables = array(); - - /** - * {@inheritDoc} - */ - public function instantiate($className) - { - if (isset(self::$cachedCloneables[$className])) { - return clone self::$cachedCloneables[$className]; - } - - if (isset(self::$cachedInstantiators[$className])) { - $factory = self::$cachedInstantiators[$className]; - - return $factory(); - } - - $factory = self::$cachedInstantiators[$className] = $this->buildFactory($className); - $instance = $factory(); - $reflection = new ReflectionClass($instance); - - if ($this->isSafeToClone($reflection)) { - self::$cachedCloneables[$className] = clone $instance; - } - - return $instance; - } - - /** - * @internal - * @private - * - * Builds a {@see \Closure} capable of instantiating the given $className without - * invoking its constructor. - * This method is only exposed as public because of PHP 5.3 compatibility. Do not - * use this method in your own code - * - * @param string $className - * - * @return Closure - */ - public function buildFactory($className) - { - $reflectionClass = $this->getReflectionClass($className); - - if ($this->isInstantiableViaReflection($reflectionClass)) { - return function () use ($reflectionClass) { - return $reflectionClass->newInstanceWithoutConstructor(); - }; - } - - $serializedString = sprintf( - '%s:%d:"%s":0:{}', - $this->getSerializationFormat($reflectionClass), - strlen($className), - $className - ); - - $this->attemptInstantiationViaUnSerialization($reflectionClass, $serializedString); - - return function () use ($serializedString) { - return unserialize($serializedString); - }; - } - - /** - * @param string $className - * - * @return ReflectionClass - * - * @throws InvalidArgumentException - */ - private function getReflectionClass($className) - { - if (! class_exists($className)) { - throw InvalidArgumentException::fromNonExistingClass($className); - } - - $reflection = new ReflectionClass($className); - - if ($reflection->isAbstract()) { - throw InvalidArgumentException::fromAbstractClass($reflection); - } - - return $reflection; - } - - /** - * @param ReflectionClass $reflectionClass - * @param string $serializedString - * - * @throws UnexpectedValueException - * - * @return void - */ - private function attemptInstantiationViaUnSerialization(ReflectionClass $reflectionClass, $serializedString) - { - set_error_handler(function ($code, $message, $file, $line) use ($reflectionClass, & $error) { - $error = UnexpectedValueException::fromUncleanUnSerialization( - $reflectionClass, - $message, - $code, - $file, - $line - ); - }); - - try { - unserialize($serializedString); - } catch (Exception $exception) { - restore_error_handler(); - - throw UnexpectedValueException::fromSerializationTriggeredException($reflectionClass, $exception); - } - - restore_error_handler(); - - if ($error) { - throw $error; - } - } - - /** - * @param ReflectionClass $reflectionClass - * - * @return bool - */ - private function isInstantiableViaReflection(ReflectionClass $reflectionClass) - { - if (\PHP_VERSION_ID >= 50600) { - return ! ($reflectionClass->isInternal() && $reflectionClass->isFinal()); - } - - return \PHP_VERSION_ID >= 50400 && ! $this->hasInternalAncestors($reflectionClass); - } - - /** - * Verifies whether the given class is to be considered internal - * - * @param ReflectionClass $reflectionClass - * - * @return bool - */ - private function hasInternalAncestors(ReflectionClass $reflectionClass) - { - do { - if ($reflectionClass->isInternal()) { - return true; - } - } while ($reflectionClass = $reflectionClass->getParentClass()); - - return false; - } - - /** - * Verifies if the given PHP version implements the `Serializable` interface serialization - * with an incompatible serialization format. If that's the case, use serialization marker - * "C" instead of "O". - * - * @link http://news.php.net/php.internals/74654 - * - * @param ReflectionClass $reflectionClass - * - * @return string the serialization format marker, either self::SERIALIZATION_FORMAT_USE_UNSERIALIZER - * or self::SERIALIZATION_FORMAT_AVOID_UNSERIALIZER - */ - private function getSerializationFormat(ReflectionClass $reflectionClass) - { - if ($this->isPhpVersionWithBrokenSerializationFormat() - && $reflectionClass->implementsInterface('Serializable') - ) { - return self::SERIALIZATION_FORMAT_USE_UNSERIALIZER; - } - - return self::SERIALIZATION_FORMAT_AVOID_UNSERIALIZER; - } - - /** - * Checks whether the current PHP runtime uses an incompatible serialization format - * - * @return bool - */ - private function isPhpVersionWithBrokenSerializationFormat() - { - return PHP_VERSION_ID === 50429 || PHP_VERSION_ID === 50513; - } - - /** - * Checks if a class is cloneable - * - * @param ReflectionClass $reflection - * - * @return bool - */ - private function isSafeToClone(ReflectionClass $reflection) - { - if (method_exists($reflection, 'isCloneable') && ! $reflection->isCloneable()) { - return false; - } - - // not cloneable if it implements `__clone`, as we want to avoid calling it - return ! $reflection->hasMethod('__clone'); - } -} diff --git a/core/vendor/doctrine/instantiator/src/Doctrine/Instantiator/InstantiatorInterface.php b/core/vendor/doctrine/instantiator/src/Doctrine/Instantiator/InstantiatorInterface.php deleted file mode 100644 index b665bea..0000000 --- a/core/vendor/doctrine/instantiator/src/Doctrine/Instantiator/InstantiatorInterface.php +++ /dev/null @@ -1,37 +0,0 @@ -. - */ - -namespace Doctrine\Instantiator; - -/** - * Instantiator provides utility methods to build objects without invoking their constructors - * - * @author Marco Pivetta - */ -interface InstantiatorInterface -{ - /** - * @param string $className - * - * @return object - * - * @throws \Doctrine\Instantiator\Exception\ExceptionInterface - */ - public function instantiate($className); -} diff --git a/core/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorPerformance/InstantiatorPerformanceEvent.php b/core/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorPerformance/InstantiatorPerformanceEvent.php deleted file mode 100644 index 3e8fc6f..0000000 --- a/core/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorPerformance/InstantiatorPerformanceEvent.php +++ /dev/null @@ -1,96 +0,0 @@ -. - */ - -namespace DoctrineTest\InstantiatorPerformance; - -use Athletic\AthleticEvent; -use Doctrine\Instantiator\Instantiator; - -/** - * Performance tests for {@see \Doctrine\Instantiator\Instantiator} - * - * @author Marco Pivetta - */ -class InstantiatorPerformanceEvent extends AthleticEvent -{ - /** - * @var \Doctrine\Instantiator\Instantiator - */ - private $instantiator; - - /** - * {@inheritDoc} - */ - protected function setUp() - { - $this->instantiator = new Instantiator(); - - $this->instantiator->instantiate(__CLASS__); - $this->instantiator->instantiate('ArrayObject'); - $this->instantiator->instantiate('DoctrineTest\\InstantiatorTestAsset\\SimpleSerializableAsset'); - $this->instantiator->instantiate('DoctrineTest\\InstantiatorTestAsset\\SerializableArrayObjectAsset'); - $this->instantiator->instantiate('DoctrineTest\\InstantiatorTestAsset\\UnCloneableAsset'); - } - - /** - * @iterations 20000 - * @baseline - * @group instantiation - */ - public function testInstantiateSelf() - { - $this->instantiator->instantiate(__CLASS__); - } - - /** - * @iterations 20000 - * @group instantiation - */ - public function testInstantiateInternalClass() - { - $this->instantiator->instantiate('ArrayObject'); - } - - /** - * @iterations 20000 - * @group instantiation - */ - public function testInstantiateSimpleSerializableAssetClass() - { - $this->instantiator->instantiate('DoctrineTest\\InstantiatorTestAsset\\SimpleSerializableAsset'); - } - - /** - * @iterations 20000 - * @group instantiation - */ - public function testInstantiateSerializableArrayObjectAsset() - { - $this->instantiator->instantiate('DoctrineTest\\InstantiatorTestAsset\\SerializableArrayObjectAsset'); - } - - /** - * @iterations 20000 - * @group instantiation - */ - public function testInstantiateUnCloneableAsset() - { - $this->instantiator->instantiate('DoctrineTest\\InstantiatorTestAsset\\UnCloneableAsset'); - } -} diff --git a/core/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTest/Exception/InvalidArgumentExceptionTest.php b/core/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTest/Exception/InvalidArgumentExceptionTest.php deleted file mode 100644 index 39d9b94..0000000 --- a/core/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTest/Exception/InvalidArgumentExceptionTest.php +++ /dev/null @@ -1,83 +0,0 @@ -. - */ - -namespace DoctrineTest\InstantiatorTest\Exception; - -use Doctrine\Instantiator\Exception\InvalidArgumentException; -use PHPUnit_Framework_TestCase; -use ReflectionClass; - -/** - * Tests for {@see \Doctrine\Instantiator\Exception\InvalidArgumentException} - * - * @author Marco Pivetta - * - * @covers \Doctrine\Instantiator\Exception\InvalidArgumentException - */ -class InvalidArgumentExceptionTest extends PHPUnit_Framework_TestCase -{ - public function testFromNonExistingTypeWithNonExistingClass() - { - $className = __CLASS__ . uniqid(); - $exception = InvalidArgumentException::fromNonExistingClass($className); - - $this->assertInstanceOf('Doctrine\\Instantiator\\Exception\\InvalidArgumentException', $exception); - $this->assertSame('The provided class "' . $className . '" does not exist', $exception->getMessage()); - } - - public function testFromNonExistingTypeWithTrait() - { - if (PHP_VERSION_ID < 50400) { - $this->markTestSkipped('Need at least PHP 5.4.0, as this test requires traits support to run'); - } - - $exception = InvalidArgumentException::fromNonExistingClass( - 'DoctrineTest\\InstantiatorTestAsset\\SimpleTraitAsset' - ); - - $this->assertSame( - 'The provided type "DoctrineTest\\InstantiatorTestAsset\\SimpleTraitAsset" is a trait, ' - . 'and can not be instantiated', - $exception->getMessage() - ); - } - - public function testFromNonExistingTypeWithInterface() - { - $exception = InvalidArgumentException::fromNonExistingClass('Doctrine\\Instantiator\\InstantiatorInterface'); - - $this->assertSame( - 'The provided type "Doctrine\\Instantiator\\InstantiatorInterface" is an interface, ' - . 'and can not be instantiated', - $exception->getMessage() - ); - } - - public function testFromAbstractClass() - { - $reflection = new ReflectionClass('DoctrineTest\\InstantiatorTestAsset\\AbstractClassAsset'); - $exception = InvalidArgumentException::fromAbstractClass($reflection); - - $this->assertSame( - 'The provided class "DoctrineTest\\InstantiatorTestAsset\\AbstractClassAsset" is abstract, ' - . 'and can not be instantiated', - $exception->getMessage() - ); - } -} diff --git a/core/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTest/Exception/UnexpectedValueExceptionTest.php b/core/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTest/Exception/UnexpectedValueExceptionTest.php deleted file mode 100644 index 84154e7..0000000 --- a/core/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTest/Exception/UnexpectedValueExceptionTest.php +++ /dev/null @@ -1,69 +0,0 @@ -. - */ - -namespace DoctrineTest\InstantiatorTest\Exception; - -use Doctrine\Instantiator\Exception\UnexpectedValueException; -use Exception; -use PHPUnit_Framework_TestCase; -use ReflectionClass; - -/** - * Tests for {@see \Doctrine\Instantiator\Exception\UnexpectedValueException} - * - * @author Marco Pivetta - * - * @covers \Doctrine\Instantiator\Exception\UnexpectedValueException - */ -class UnexpectedValueExceptionTest extends PHPUnit_Framework_TestCase -{ - public function testFromSerializationTriggeredException() - { - $reflectionClass = new ReflectionClass($this); - $previous = new Exception(); - $exception = UnexpectedValueException::fromSerializationTriggeredException($reflectionClass, $previous); - - $this->assertInstanceOf('Doctrine\\Instantiator\\Exception\\UnexpectedValueException', $exception); - $this->assertSame($previous, $exception->getPrevious()); - $this->assertSame( - 'An exception was raised while trying to instantiate an instance of "' - . __CLASS__ . '" via un-serialization', - $exception->getMessage() - ); - } - - public function testFromUncleanUnSerialization() - { - $reflection = new ReflectionClass('DoctrineTest\\InstantiatorTestAsset\\AbstractClassAsset'); - $exception = UnexpectedValueException::fromUncleanUnSerialization($reflection, 'foo', 123, 'bar', 456); - - $this->assertInstanceOf('Doctrine\\Instantiator\\Exception\\UnexpectedValueException', $exception); - $this->assertSame( - 'Could not produce an instance of "DoctrineTest\\InstantiatorTestAsset\\AbstractClassAsset" ' - . 'via un-serialization, since an error was triggered in file "bar" at line "456"', - $exception->getMessage() - ); - - $previous = $exception->getPrevious(); - - $this->assertInstanceOf('Exception', $previous); - $this->assertSame('foo', $previous->getMessage()); - $this->assertSame(123, $previous->getCode()); - } -} diff --git a/core/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTest/InstantiatorTest.php b/core/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTest/InstantiatorTest.php deleted file mode 100644 index e7f6e94..0000000 --- a/core/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTest/InstantiatorTest.php +++ /dev/null @@ -1,216 +0,0 @@ -. - */ - -namespace DoctrineTest\InstantiatorTest; - -use Doctrine\Instantiator\Exception\UnexpectedValueException; -use Doctrine\Instantiator\Instantiator; -use PHPUnit_Framework_TestCase; -use ReflectionClass; - -/** - * Tests for {@see \Doctrine\Instantiator\Instantiator} - * - * @author Marco Pivetta - * - * @covers \Doctrine\Instantiator\Instantiator - */ -class InstantiatorTest extends PHPUnit_Framework_TestCase -{ - /** - * @var Instantiator - */ - private $instantiator; - - /** - * {@inheritDoc} - */ - protected function setUp() - { - $this->instantiator = new Instantiator(); - } - - /** - * @param string $className - * - * @dataProvider getInstantiableClasses - */ - public function testCanInstantiate($className) - { - $this->assertInstanceOf($className, $this->instantiator->instantiate($className)); - } - - /** - * @param string $className - * - * @dataProvider getInstantiableClasses - */ - public function testInstantiatesSeparateInstances($className) - { - $instance1 = $this->instantiator->instantiate($className); - $instance2 = $this->instantiator->instantiate($className); - - $this->assertEquals($instance1, $instance2); - $this->assertNotSame($instance1, $instance2); - } - - public function testExceptionOnUnSerializationException() - { - if (defined('HHVM_VERSION')) { - $this->markTestSkipped( - 'As of facebook/hhvm#3432, HHVM has no PDORow, and therefore ' - . ' no internal final classes that cannot be instantiated' - ); - } - - $className = 'DoctrineTest\\InstantiatorTestAsset\\UnserializeExceptionArrayObjectAsset'; - - if (\PHP_VERSION_ID >= 50600) { - $className = 'PDORow'; - } - - if (\PHP_VERSION_ID === 50429 || \PHP_VERSION_ID === 50513) { - $className = 'DoctrineTest\\InstantiatorTestAsset\\SerializableArrayObjectAsset'; - } - - $this->setExpectedException('Doctrine\\Instantiator\\Exception\\UnexpectedValueException'); - - $this->instantiator->instantiate($className); - } - - public function testNoticeOnUnSerializationException() - { - if (\PHP_VERSION_ID >= 50600) { - $this->markTestSkipped( - 'PHP 5.6 supports `ReflectionClass#newInstanceWithoutConstructor()` for some internal classes' - ); - } - - try { - $this->instantiator->instantiate('DoctrineTest\\InstantiatorTestAsset\\WakeUpNoticesAsset'); - - $this->fail('No exception was raised'); - } catch (UnexpectedValueException $exception) { - $wakeUpNoticesReflection = new ReflectionClass('DoctrineTest\\InstantiatorTestAsset\\WakeUpNoticesAsset'); - $previous = $exception->getPrevious(); - - $this->assertInstanceOf('Exception', $previous); - - // in PHP 5.4.29 and PHP 5.5.13, this case is not a notice, but an exception being thrown - if (! (\PHP_VERSION_ID === 50429 || \PHP_VERSION_ID === 50513)) { - $this->assertSame( - 'Could not produce an instance of "DoctrineTest\\InstantiatorTestAsset\WakeUpNoticesAsset" ' - . 'via un-serialization, since an error was triggered in file "' - . $wakeUpNoticesReflection->getFileName() . '" at line "36"', - $exception->getMessage() - ); - - $this->assertSame('Something went bananas while un-serializing this instance', $previous->getMessage()); - $this->assertSame(\E_USER_NOTICE, $previous->getCode()); - } - } - } - - /** - * @param string $invalidClassName - * - * @dataProvider getInvalidClassNames - */ - public function testInstantiationFromNonExistingClass($invalidClassName) - { - $this->setExpectedException('Doctrine\\Instantiator\\Exception\\InvalidArgumentException'); - - $this->instantiator->instantiate($invalidClassName); - } - - public function testInstancesAreNotCloned() - { - $className = 'TemporaryClass' . uniqid(); - - eval('namespace ' . __NAMESPACE__ . '; class ' . $className . '{}'); - - $instance = $this->instantiator->instantiate(__NAMESPACE__ . '\\' . $className); - - $instance->foo = 'bar'; - - $instance2 = $this->instantiator->instantiate(__NAMESPACE__ . '\\' . $className); - - $this->assertObjectNotHasAttribute('foo', $instance2); - } - - /** - * Provides a list of instantiable classes (existing) - * - * @return string[][] - */ - public function getInstantiableClasses() - { - $classes = array( - array('stdClass'), - array(__CLASS__), - array('Doctrine\\Instantiator\\Instantiator'), - array('PharException'), - array('DoctrineTest\\InstantiatorTestAsset\\SimpleSerializableAsset'), - array('DoctrineTest\\InstantiatorTestAsset\\PharExceptionAsset'), - array('DoctrineTest\\InstantiatorTestAsset\\UnCloneableAsset'), - array('DoctrineTest\\InstantiatorTestAsset\\XMLReaderAsset'), - ); - - if (\PHP_VERSION_ID === 50429 || \PHP_VERSION_ID === 50513) { - return $classes; - } - - $classes = array_merge( - $classes, - array( - array('PharException'), - array('ArrayObject'), - array('DoctrineTest\\InstantiatorTestAsset\\ArrayObjectAsset'), - array('DoctrineTest\\InstantiatorTestAsset\\SerializableArrayObjectAsset'), - ) - ); - - if (\PHP_VERSION_ID >= 50600) { - $classes[] = array('DoctrineTest\\InstantiatorTestAsset\\WakeUpNoticesAsset'); - $classes[] = array('DoctrineTest\\InstantiatorTestAsset\\UnserializeExceptionArrayObjectAsset'); - } - - return $classes; - } - - /** - * Provides a list of instantiable classes (existing) - * - * @return string[][] - */ - public function getInvalidClassNames() - { - $classNames = array( - array(__CLASS__ . uniqid()), - array('Doctrine\\Instantiator\\InstantiatorInterface'), - array('DoctrineTest\\InstantiatorTestAsset\\AbstractClassAsset'), - ); - - if (\PHP_VERSION_ID >= 50400) { - $classNames[] = array('DoctrineTest\\InstantiatorTestAsset\\SimpleTraitAsset'); - } - - return $classNames; - } -} diff --git a/core/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/AbstractClassAsset.php b/core/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/AbstractClassAsset.php deleted file mode 100644 index fbe28dd..0000000 --- a/core/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/AbstractClassAsset.php +++ /dev/null @@ -1,29 +0,0 @@ -. - */ - -namespace DoctrineTest\InstantiatorTestAsset; - -/** - * A simple asset for an abstract class - * - * @author Marco Pivetta - */ -abstract class AbstractClassAsset -{ -} diff --git a/core/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/ArrayObjectAsset.php b/core/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/ArrayObjectAsset.php deleted file mode 100644 index 56146d7..0000000 --- a/core/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/ArrayObjectAsset.php +++ /dev/null @@ -1,41 +0,0 @@ -. - */ - -namespace DoctrineTest\InstantiatorTestAsset; - -use ArrayObject; -use BadMethodCallException; - -/** - * Test asset that extends an internal PHP class - * - * @author Marco Pivetta - */ -class ArrayObjectAsset extends ArrayObject -{ - /** - * Constructor - should not be called - * - * @throws BadMethodCallException - */ - public function __construct() - { - throw new BadMethodCallException('Not supposed to be called!'); - } -} diff --git a/core/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/PharAsset.php b/core/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/PharAsset.php deleted file mode 100644 index 553fd56..0000000 --- a/core/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/PharAsset.php +++ /dev/null @@ -1,41 +0,0 @@ -. - */ - -namespace DoctrineTest\InstantiatorTestAsset; - -use BadMethodCallException; -use Phar; - -/** - * Test asset that extends an internal PHP class - * - * @author Marco Pivetta - */ -class PharAsset extends Phar -{ - /** - * Constructor - should not be called - * - * @throws BadMethodCallException - */ - public function __construct() - { - throw new BadMethodCallException('Not supposed to be called!'); - } -} diff --git a/core/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/PharExceptionAsset.php b/core/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/PharExceptionAsset.php deleted file mode 100644 index 42bf73e..0000000 --- a/core/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/PharExceptionAsset.php +++ /dev/null @@ -1,44 +0,0 @@ -. - */ - -namespace DoctrineTest\InstantiatorTestAsset; - -use BadMethodCallException; -use PharException; - -/** - * Test asset that extends an internal PHP class - * This class should be serializable without problems - * and without getting the "Erroneous data format for unserializing" - * error - * - * @author Marco Pivetta - */ -class PharExceptionAsset extends PharException -{ - /** - * Constructor - should not be called - * - * @throws BadMethodCallException - */ - public function __construct() - { - throw new BadMethodCallException('Not supposed to be called!'); - } -} diff --git a/core/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/SerializableArrayObjectAsset.php b/core/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/SerializableArrayObjectAsset.php deleted file mode 100644 index ba19aaf..0000000 --- a/core/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/SerializableArrayObjectAsset.php +++ /dev/null @@ -1,62 +0,0 @@ -. - */ - -namespace DoctrineTest\InstantiatorTestAsset; - -use ArrayObject; -use BadMethodCallException; -use Serializable; - -/** - * Serializable test asset that also extends an internal class - * - * @author Marco Pivetta - */ -class SerializableArrayObjectAsset extends ArrayObject implements Serializable -{ - /** - * Constructor - should not be called - * - * @throws BadMethodCallException - */ - public function __construct() - { - throw new BadMethodCallException('Not supposed to be called!'); - } - - /** - * {@inheritDoc} - */ - public function serialize() - { - return ''; - } - - /** - * {@inheritDoc} - * - * Should not be called - * - * @throws BadMethodCallException - */ - public function unserialize($serialized) - { - throw new BadMethodCallException('Not supposed to be called!'); - } -} diff --git a/core/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/SimpleSerializableAsset.php b/core/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/SimpleSerializableAsset.php deleted file mode 100644 index 39f84a6..0000000 --- a/core/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/SimpleSerializableAsset.php +++ /dev/null @@ -1,61 +0,0 @@ -. - */ - -namespace DoctrineTest\InstantiatorTestAsset; - -use BadMethodCallException; -use Serializable; - -/** - * Base serializable test asset - * - * @author Marco Pivetta - */ -class SimpleSerializableAsset implements Serializable -{ - /** - * Constructor - should not be called - * - * @throws BadMethodCallException - */ - public function __construct() - { - throw new BadMethodCallException('Not supposed to be called!'); - } - - /** - * {@inheritDoc} - */ - public function serialize() - { - return ''; - } - - /** - * {@inheritDoc} - * - * Should not be called - * - * @throws BadMethodCallException - */ - public function unserialize($serialized) - { - throw new BadMethodCallException('Not supposed to be called!'); - } -} diff --git a/core/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/SimpleTraitAsset.php b/core/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/SimpleTraitAsset.php deleted file mode 100644 index 04e7806..0000000 --- a/core/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/SimpleTraitAsset.php +++ /dev/null @@ -1,29 +0,0 @@ -. - */ - -namespace DoctrineTest\InstantiatorTestAsset; - -/** - * A simple trait with no attached logic - * - * @author Marco Pivetta - */ -trait SimpleTraitAsset -{ -} diff --git a/core/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/UnCloneableAsset.php b/core/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/UnCloneableAsset.php deleted file mode 100644 index 7d03bda..0000000 --- a/core/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/UnCloneableAsset.php +++ /dev/null @@ -1,50 +0,0 @@ -. - */ - -namespace DoctrineTest\InstantiatorTestAsset; - -use BadMethodCallException; - -/** - * Base un-cloneable asset - * - * @author Marco Pivetta - */ -class UnCloneableAsset -{ - /** - * Constructor - should not be called - * - * @throws BadMethodCallException - */ - public function __construct() - { - throw new BadMethodCallException('Not supposed to be called!'); - } - - /** - * Magic `__clone` - should not be invoked - * - * @throws BadMethodCallException - */ - public function __clone() - { - throw new BadMethodCallException('Not supposed to be called!'); - } -} diff --git a/core/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/UnserializeExceptionArrayObjectAsset.php b/core/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/UnserializeExceptionArrayObjectAsset.php deleted file mode 100644 index b348a40..0000000 --- a/core/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/UnserializeExceptionArrayObjectAsset.php +++ /dev/null @@ -1,39 +0,0 @@ -. - */ - -namespace DoctrineTest\InstantiatorTestAsset; - -use ArrayObject; -use BadMethodCallException; - -/** - * A simple asset for an abstract class - * - * @author Marco Pivetta - */ -class UnserializeExceptionArrayObjectAsset extends ArrayObject -{ - /** - * {@inheritDoc} - */ - public function __wakeup() - { - throw new BadMethodCallException(); - } -} diff --git a/core/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/WakeUpNoticesAsset.php b/core/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/WakeUpNoticesAsset.php deleted file mode 100644 index 18dc671..0000000 --- a/core/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/WakeUpNoticesAsset.php +++ /dev/null @@ -1,38 +0,0 @@ -. - */ - -namespace DoctrineTest\InstantiatorTestAsset; - -use ArrayObject; - -/** - * A simple asset for an abstract class - * - * @author Marco Pivetta - */ -class WakeUpNoticesAsset extends ArrayObject -{ - /** - * Wakeup method called after un-serialization - */ - public function __wakeup() - { - trigger_error('Something went bananas while un-serializing this instance'); - } -} diff --git a/core/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/XMLReaderAsset.php b/core/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/XMLReaderAsset.php deleted file mode 100644 index 39ee699..0000000 --- a/core/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/XMLReaderAsset.php +++ /dev/null @@ -1,41 +0,0 @@ -. - */ - -namespace DoctrineTest\InstantiatorTestAsset; - -use BadMethodCallException; -use XMLReader; - -/** - * Test asset that extends an internal PHP class - * - * @author Dave Marshall - */ -class XMLReaderAsset extends XMLReader -{ - /** - * Constructor - should not be called - * - * @throws BadMethodCallException - */ - public function __construct() - { - throw new BadMethodCallException('Not supposed to be called!'); - } -} diff --git a/core/vendor/doctrine/lexer/README.md b/core/vendor/doctrine/lexer/README.md deleted file mode 100644 index 66f4430..0000000 --- a/core/vendor/doctrine/lexer/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# Doctrine Lexer - -Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers. - -This lexer is used in Doctrine Annotations and in Doctrine ORM (DQL). diff --git a/core/vendor/doctrine/lexer/composer.json b/core/vendor/doctrine/lexer/composer.json deleted file mode 100644 index 5e6e83a..0000000 --- a/core/vendor/doctrine/lexer/composer.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "doctrine/lexer", - "type": "library", - "description": "Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.", - "keywords": ["lexer", "parser"], - "homepage": "http://www.doctrine-project.org", - "license": "MIT", - "authors": [ - {"name": "Guilherme Blanco", "email": "guilhermeblanco@gmail.com"}, - {"name": "Roman Borschel", "email": "roman@code-factory.org"}, - {"name": "Johannes Schmitt", "email": "schmittjoh@gmail.com"} - ], - "require": { - "php": ">=5.3.2" - }, - "autoload": { - "psr-0": { "Doctrine\\Common\\Lexer\\": "lib/" } - } -} diff --git a/core/vendor/doctrine/lexer/lib/Doctrine/Common/Lexer/AbstractLexer.php b/core/vendor/doctrine/lexer/lib/Doctrine/Common/Lexer/AbstractLexer.php deleted file mode 100644 index eb6cf7c..0000000 --- a/core/vendor/doctrine/lexer/lib/Doctrine/Common/Lexer/AbstractLexer.php +++ /dev/null @@ -1,265 +0,0 @@ -. - */ - -namespace Doctrine\Common\Lexer; - -/** - * Base class for writing simple lexers, i.e. for creating small DSLs. - * - * @since 2.0 - * @author Guilherme Blanco - * @author Jonathan Wage - * @author Roman Borschel - */ -abstract class AbstractLexer -{ - /** - * @var array Array of scanned tokens - */ - private $tokens = array(); - - /** - * @var integer Current lexer position in input string - */ - private $position = 0; - - /** - * @var integer Current peek of current lexer position - */ - private $peek = 0; - - /** - * @var array The next token in the input. - */ - public $lookahead; - - /** - * @var array The last matched/seen token. - */ - public $token; - - /** - * Sets the input data to be tokenized. - * - * The Lexer is immediately reset and the new input tokenized. - * Any unprocessed tokens from any previous input are lost. - * - * @param string $input The input to be tokenized. - */ - public function setInput($input) - { - $this->tokens = array(); - $this->reset(); - $this->scan($input); - } - - /** - * Resets the lexer. - */ - public function reset() - { - $this->lookahead = null; - $this->token = null; - $this->peek = 0; - $this->position = 0; - } - - /** - * Resets the peek pointer to 0. - */ - public function resetPeek() - { - $this->peek = 0; - } - - /** - * Resets the lexer position on the input to the given position. - * - * @param integer $position Position to place the lexical scanner - */ - public function resetPosition($position = 0) - { - $this->position = $position; - } - - /** - * Checks whether a given token matches the current lookahead. - * - * @param integer|string $token - * @return boolean - */ - public function isNextToken($token) - { - return null !== $this->lookahead && $this->lookahead['type'] === $token; - } - - /** - * Checks whether any of the given tokens matches the current lookahead - * - * @param array $tokens - * @return boolean - */ - public function isNextTokenAny(array $tokens) - { - return null !== $this->lookahead && in_array($this->lookahead['type'], $tokens, true); - } - - /** - * Moves to the next token in the input string. - * - * A token is an associative array containing three items: - * - 'value' : the string value of the token in the input string - * - 'type' : the type of the token (identifier, numeric, string, input - * parameter, none) - * - 'position' : the position of the token in the input string - * - * @return array|null the next token; null if there is no more tokens left - */ - public function moveNext() - { - $this->peek = 0; - $this->token = $this->lookahead; - $this->lookahead = (isset($this->tokens[$this->position])) - ? $this->tokens[$this->position++] : null; - - return $this->lookahead !== null; - } - - /** - * Tells the lexer to skip input tokens until it sees a token with the given value. - * - * @param string $type The token type to skip until. - */ - public function skipUntil($type) - { - while ($this->lookahead !== null && $this->lookahead['type'] !== $type) { - $this->moveNext(); - } - } - - /** - * Checks if given value is identical to the given token - * - * @param mixed $value - * @param integer $token - * @return boolean - */ - public function isA($value, $token) - { - return $this->getType($value) === $token; - } - - /** - * Moves the lookahead token forward. - * - * @return array | null The next token or NULL if there are no more tokens ahead. - */ - public function peek() - { - if (isset($this->tokens[$this->position + $this->peek])) { - return $this->tokens[$this->position + $this->peek++]; - } else { - return null; - } - } - - /** - * Peeks at the next token, returns it and immediately resets the peek. - * - * @return array|null The next token or NULL if there are no more tokens ahead. - */ - public function glimpse() - { - $peek = $this->peek(); - $this->peek = 0; - return $peek; - } - - /** - * Scans the input string for tokens. - * - * @param string $input a query string - */ - protected function scan($input) - { - static $regex; - - if ( ! isset($regex)) { - $regex = '/(' . implode(')|(', $this->getCatchablePatterns()) . ')|' - . implode('|', $this->getNonCatchablePatterns()) . '/i'; - } - - $flags = PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_OFFSET_CAPTURE; - $matches = preg_split($regex, $input, -1, $flags); - - foreach ($matches as $match) { - // Must remain before 'value' assignment since it can change content - $type = $this->getType($match[0]); - - $this->tokens[] = array( - 'value' => $match[0], - 'type' => $type, - 'position' => $match[1], - ); - } - } - - /** - * Gets the literal for a given token. - * - * @param integer $token - * @return string - */ - public function getLiteral($token) - { - $className = get_class($this); - $reflClass = new \ReflectionClass($className); - $constants = $reflClass->getConstants(); - - foreach ($constants as $name => $value) { - if ($value === $token) { - return $className . '::' . $name; - } - } - - return $token; - } - - /** - * Lexical catchable patterns. - * - * @return array - */ - abstract protected function getCatchablePatterns(); - - /** - * Lexical non-catchable patterns. - * - * @return array - */ - abstract protected function getNonCatchablePatterns(); - - /** - * Retrieve token type. Also processes the token value if necessary. - * - * @param string $value - * @return integer - */ - abstract protected function getType(&$value); -} diff --git a/core/vendor/easyrdf/easyrdf/CHANGELOG.md b/core/vendor/easyrdf/easyrdf/CHANGELOG.md deleted file mode 100644 index f902b3c..0000000 --- a/core/vendor/easyrdf/easyrdf/CHANGELOG.md +++ /dev/null @@ -1,282 +0,0 @@ -EasyRdf 0.8.0 -============= - -Major new features ------------------- -* Now PSR-2 compliant -* Added RDFa parser -* Added SPARQL Update support to `EasyRdf_Sparql_Client` - -API changes ------------ -* `is_a()` has been renamed to `isA()` -* `isBnode()` has been renamed to `isBNode()` -* `getNodeId()` has been renamed to `getBNodeId()` -* Added a `$value` property to `hasProperty()` -* Renamed `toArray()` to `toRdfPhp()` -* Renamed `count()` to `countValues()` in `EasyRdf_Graph` and `EasyRdf_Resource` -* Made passing a URI to `delete()` behave more like `all()` and `get()` - you must enclose in `<>` -* `dump(true)` has changed to `dump('html')` -* `getUri()` in `EasyRdf_Sparql_Client` has been renamed to `getQueryUri()` - -Enhancements ------------- -* Added `EasyRdf_Container` class to help iterate through `rdf:Alt`, `rdf:Bag` and `rdf:Seq` -* Added `EasyRdf_Collection` class to help iterate through `rdf:List` -* Added `EasyRdf_Literal_HTML` and `EasyRdf_Literal_XML` -* Changed formatting of `xsd:dateTime` from `DateTime::ISO8601` to `DateTime::ATOM` -* Added `rss:title` to the list of properties that `label()` will check for -* Added support for serialising containers to the RDF/XML serialiser -* Added getGraph method to `EasyRdf_Resource` -* Turtle parser improvements -* Added the `application/n-triples` MIME type for the N-Triples format -* Added support to `EasyRdf_Namespace` for expanding `a` to `rdf:type` -* Added `listNamedGraphs()` function to `EasyRdf_Sparql_Client` -* Added line and column number to exceptions in the built-in parsers - -Bug Fixes ---------- -* Fixed bug in `EasyRdf_Namespace::expand()` (see issue #114) -* Fix for dumping SPARQL SELECT query with unbound result (see issue #112) -* Sesame compatibility : avoid duplicate Content-Length header -* Fix for for passing objects of type DateTime to $graph->add() (see issue #119) -* Fix for SPARQL queries longer than 2KB (see issue #85) -* Fix for dumping literal with unshortenable datatype uri (see issue #120) -* Fix for getting default mime type or extension when there isn't one -* Fix for missing trailing slash the HTTP client - - -EasyRdf 0.7.2 -============= - -Enhancements ------------- -* Removed automatic registration of ARC2 and librdf parsers and serialisers -** You must now specifically choose the parser or serialiser -* Refactored `EasyRdf_Literal` with datatypes so that it preserves exact value -* Changed Turtle serialiser to not escape Unicode characters unnecessarily -* Fix for escaping literals objects in Turtle serialiser -* Added a new static function `newAndLoad()` to `EasyRdf_Graph` -* Added setters for each of the components of the URI to the class `EasyRdf_ParsedUri` -* Added option to the converter example, to allow raw output, without any HTML - -Bug Fixes ---------- -* Fixed broken Redland parser (thanks to Jon Phipps) -* Fix for serialising two bnodes that reference each other in Turtle -* Added support for parsing literals with single quotes in Turtle -* Removed require for EasyRdf/Exception.php -* Fix for serialising `EasyRdf_Literal_DateTime` to Turtle -* Fix for serialising Turtle literals with a shorthand syntax -* Several typo fixes and minor corrections - - -EasyRdf 0.7.1 -============= - -Enhancements ------------- -* Changed minimum version of PHPUnit to 3.5.15 -* Added RDFa namespace -* Added Open Graph Protocol namespace -* Made improvements to formatting of the Turtle serialiser -* Added new splitUri() function to EasyRdf_Namespace -* Made improvements to format guessing - -Bug Fixes ---------- -* Fix for RDF/XML parser not returning the number of triples -* Added re-mapping of b-nodes to N-Triples and Redland parsers - - -EasyRdf 0.7.0 -============= - -API Changes ------------ -* You must now wrap full property URIs in angle brackets - -Major new features ------------------- -* Added a new pure-PHP Turtle parser -* Added basic property-path support for traversing graphs -* Added support for serialising to the GraphViz dot format (and generating images) -* Added a new class `EasyRdf_ParsedUri` - a RFC3986 compliant URI parser - -Enhancements ------------- -* The load() function in `EasyRdf_Graph` no-longer takes a $data argument -* The parse() and load() methods, now return the number of triples parsed -* Added count() method to `EasyRdf_Resource` and `EasyRdf_Graph` -* Added localName() method to `EasyRdf_Resource` -* Added htmlLink() method to `EasyRdf_Resource` -* Added methods deleteResource() and deleteLiteral() to `EasyRdf_Graph` -* Added support for guessing the file format based on the file extension -* Performance improvements to built-in serialisers - -Environment changes -------------------- -* Added PHP Composer description to the project -* Now properly PSR-0 autoloader compatible -* New minimum version of PHP is 5.2.8 -* Changed test suite to require PHPUnit 3.6 -* Changed from Phing to GNU Make based build system -* Added automated testing of the examples - -Bug Fixes ---------- -* Fix for loading https:// URLs -* Fix for storing the value 0 in a `EasyRdf_Graph` -* Fix for HTTP servers that return relative URIs in the Location header -* Fix for Literals with languages in the SPARQL Query Results XML Format -* Fix for SPARQL servers that put extra whitespace into the XML result -* Fix for the httpget.php example in PHP 5.4+ - - -EasyRdf 0.6.3 -============= -* Added $graph->parseFile() method. -* Added support for SSL (https) to the built-in HTTP client -* Fixes for HTTP responses with a charset parameter in the Content Type. -* Improved error handling and empty documents in JSON and rapper parsers. -* Added connivence class for xsd:hexBinary literals: - - `EasyRdf_Literal_HexBinary` -* Made EasyRdf more tolerant of 'badly serialised bnodes' -* Fix for SPARQL servers that return charset in the MIME Type. -* Fix for using xml:lang in SPARQL 1.1 Query Results JSON Format -* Changed datetime ISO formatting to use 'Z' instead of +0000 for UTC dateTimes -* Added the namespace for 'The Cert Ontology' to EasyRdf. - - -EasyRdf 0.6.2 -============= -* Bug fix for missing triples in the RDF/XML serialiser. -* Added countTriples() method to `EasyRdf_Graph`. -* Re-factored the mechanism for mapping RDF datatypes to PHP classes. -* Added subclasses of `EasyRdf_Literal` for various XSD datatypes: - - `EasyRdf_Literal_Boolean` - - `EasyRdf_Literal_Date` - - `EasyRdf_Literal_DateTime` - - `EasyRdf_Literal_Decimal` - - `EasyRdf_Literal_Integer` -* Made the Redland based parser write triples directly to `EasyRdf_Graph` -* Added support for datatypes and languages in the `EasyRdf_Parser_Ntriples` parser. -* Fix for parsing XML Literals in RDF/XML - - -EasyRdf 0.6.1 -============= -* Updated API documentation for new classes and methods added in 0.6.0 -* Added a description to the top of the source code for each example. -* Changed the generated bnode identifier names from eidXXX to genidXXX. -* Implemented inlining of resources in the RDF/XML serialiser. -* Added new reversePropertyUris() method to `EasyRdf_Graph` and `EasyRdf_Resource`. -* Added addType() and setType() to `EasyRdf_Resource`. -* Added a textarea to the converter example. -* Added support for parsing the json-triples format. -* Renamed `EasyRdf_SparqlClient` to `EasyRdf_Sparql_Client` -* Renamed `EasyRdf_SparqlResult` to `EasyRdf_Sparql_Result` -* Fix for $graph->isEmpty() failing after adding and deleting some triples -* Added new `EasyRdf_DatatypeMapper` class that allows you to map RDF datatypes to PHP classes. -* Renamed guessDatatype() to getDatatypeForValue() in `EasyRdf_Literal`. -* Added getResource() and allResources() to `EasyRdf_Graph` and `EasyRdf_Resource` -* Implemented value casting in literals based on the datatype. - - -EasyRdf 0.6.0 -============= -* Major re-factor of the way data is stored internally in `EasyRdf_Graph`. -* Parsing and serialising is now much faster and will enable further optimisations. -* API is mostly backwards-compatible apart from: - - Changed inverse property operator from - to ^ to match Sparql 1.1 property paths. - - New `EasyRdf_Graphs` will not automatically be loaded on creation - You must now call $graph->load(); - - Setting the default HTTP client is now part of a new `EasyRdf_Http` class - - It is no-longer possible to add multiple properties at once using an associative array. -* Added methods to `EasyRdf_Graph` for direct manipulation of triples. -* Added new `EasyRdf_GraphStore` - class for fetching, saving and deleting graphs to a Graph Store over HTTP. -* Added new `EasyRdf_SparqlClient` and `EasyRdf_SparqlResult` - class for querying a SPARQL endpoint over HTTP. -* Added q values for each Mime-Type associated with an `EasyRdf_Format`. -* New example demonstrating integration with the Zend Framework. -* New `EasyRdf_HTTP_MockClient` class makes testing easier. - - -EasyRdf 0.5.2 -============= -* Added a built-in RDF/XML parser -* Made the RDF/XML serialiser use the rdf:type to open tags -* Added support for comments in the N-Triples parser -* Added new resolveUriReference() function to `EasyRdf_Utils` -* Added the application/rdf+json and text/rdf+n3 mime types - - -EasyRdf 0.5.1 -============= -* Bug fixes for PHP 5.2 - - -EasyRdf 0.5.0 -============= -* Added support for inverse properties. -* Updated RDF/XML and Turtle serialisers to create new namespaces if possible. -* Added new is_a($type) method to `EasyRdf_Resource`. -* Added support for passing an array of properties to the get() method. -* Added primaryTopic() method to `EasyRdf_Resource`. -* The function label() in `EasyRdf_Resource` will no longer attempted to shorten the URI, - if there is no label available. -* Resource types are now stored as resources, instead of shortened URIs. -* Added support for deleting a specific value for property to `EasyRdf_Resource`. -* Properties and datatypes are now stored as full URIs and not - converted to qnames during import. -* Change the TypeMapper to store full URIs internally. -* Added bibo and geo to the set of default namespaces. -* Improved bnode links in dump format -* Fix for converting non-string `EasyRdf_Literal` to string. -* Created an example that resolves UK postcodes using uk-postcodes.com. - - -EasyRdf 0.4.0 -============= -* Moved source code to Github -* Added an `EasyRdf_Literal` class -* Added proper support for Datatypes and Languages -* Added built-in RDF/XML serialiser -* Added built-in Turtle serialiser -* Added a new `EasyRdf_Format` class to deal with mime types etc. -* finished a major refactoring of the Parser/Serialiser registration -* removed all parsing related code from `EasyRdf_Graph` -* Added a basic serialisation example -* Added additional common namespaces -* Test fixes - - -EasyRdf 0.3.0 -============= -* Generated Wiki pages from phpdoc -* Filtering of literals by language -* Moved parsers into `EasyRdf_Parser_XXX` namespace -* Added support for serialisation -* Wrote RDF generation example (foafmaker.php) -* Added built-in ntriples parser/generator -* Added built-in RDF/PHP serialiser -* Added built-in RDF/JSON serialiser -* Added SKOS and RSS to the set of default namespaces. - - -EasyRdf 0.2.0 -============= -* Added support for Redland PHP bindings -* Added support for n-triples document type. -* Improved blank node handing and added newBNode() method to `EasyRdf_Graph`. -* Add option to `EasyRdf_RapperParser` to choose location of rapper command -* Added Rails style HTML tag helpers to examples to make them simpler - - -EasyRdf 0.1.0 -============= -* First public release -* Support for ARC2 and Rapper -* Built-in HTTP Client -* API Documentation -* PHP Unit tests for every class. -* Several usage examples diff --git a/core/vendor/easyrdf/easyrdf/DEVELOPER.md b/core/vendor/easyrdf/easyrdf/DEVELOPER.md deleted file mode 100644 index a4516ef..0000000 --- a/core/vendor/easyrdf/easyrdf/DEVELOPER.md +++ /dev/null @@ -1,32 +0,0 @@ -Contributing to EasyRdf -======================= - - -Contributions to the EasyRdf codebase are welcome using the usual Github pull request workflow. - -To run the code style checker: -``` -make cs - -``` -You can run the PHP unit test suite with: -``` -make test -``` - -Unit tests are automatically run after being received by Github: -http://ci.aelius.com/job/easyrdf/ - -The tests for the examples are run in a sperate test: -http://ci.aelius.com/job/easyrdf-examples/ - - -Notes ------ - -* Please ask on the [mailing list] before starting work on any significant chnages -* Please write tests for any new features or bug fixes. The tests should be checked in the same commit as the code. - - - -[mailing list]:http://groups.google.com/group/easyrdf diff --git a/core/vendor/easyrdf/easyrdf/LICENSE.md b/core/vendor/easyrdf/easyrdf/LICENSE.md deleted file mode 100644 index 274a8e6..0000000 --- a/core/vendor/easyrdf/easyrdf/LICENSE.md +++ /dev/null @@ -1,23 +0,0 @@ -LICENSE -======= - -Copyright (c) 2009-2011 Nicholas J Humfrey. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - * The name of the author 'Nicholas J Humfrey" may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. diff --git a/core/vendor/easyrdf/easyrdf/README.md b/core/vendor/easyrdf/easyrdf/README.md deleted file mode 100644 index d5b9956..0000000 --- a/core/vendor/easyrdf/easyrdf/README.md +++ /dev/null @@ -1,112 +0,0 @@ -EasyRdf -======= -EasyRdf is a PHP library designed to make it easy to consume and produce [RDF]. -It was designed for use in mixed teams of experienced and inexperienced RDF -developers. It is written in Object Oriented PHP and has been tested -extensively using PHPUnit. - -After parsing EasyRdf builds up a graph of PHP objects that can then be walked -around to get the data to be placed on the page. Dump methods are available to -inspect what data is available during development. - -Data is typically loaded into a [EasyRdf_Graph] object from source RDF -documents, loaded from the web via HTTP. The [EasyRdf_GraphStore] class -simplifies loading and saving data to a SPARQL 1.1 Graph Store. - -SPARQL queries can be made over HTTP to a Triplestore using the -[EasyRdf_Sparql_Client] class. SELECT and ASK queries will return an -[EasyRdf_Sparql_Result] object and CONSTRUCT and DESCRIBE queries will return -an [EasyRdf_Graph] object. - -### Example ### - - $foaf = new EasyRdf_Graph("http://njh.me/foaf.rdf"); - $foaf->load(); - $me = $foaf->primaryTopic(); - echo "My name is: ".$me->get('foaf:name')."\n"; - - -Downloads ---------- - -The latest _stable_ version of EasyRdf can be [downloaded from the EasyRdf website]. - - -Links ------ - -* [EasyRdf Homepage](http://www.easyrdf.org/) -* [API documentation](http://www.easyrdf.org/docs/api) -* [Change Log](http://github.com/njh/easyrdf/blob/master/CHANGELOG.md) -* Source Code: -* Issue Tracker: - - -Requirements ------------- - -* PHP 5.2.8 or higher - - -Features --------- - -* API documentation written in phpdoc -* Extensive unit tests written using phpunit - * Automated testing against PHP 5.2, 5.3 and 5.4 -* Built-in parsers and serialisers: RDF/JSON, N-Triples, RDF/XML, Turtle -* Optional parsing support for: [ARC2], [Redland Bindings], [rapper] -* Optional support for [Zend_Http_Client] -* No required external dependancies upon other libraries (PEAR, Zend, etc...) -* Complies with Zend Framework coding style. -* Type mapper - resources of type foaf:Person can be mapped into PHP object of class Foaf_Person -* Support for visualisation of graphs using [GraphViz] -* Comes with a number of examples - - -More Examples -------------- - -* [artistinfo.php](https://github.com/njh/easyrdf/blob/master/examples/artistinfo.php#slider) - Example of mapping an RDF class type to a PHP Class -* [basic.php](https://github.com/njh/easyrdf/blob/master/examples/basic.php#slider) - Basic "Hello World" type example -* [basic_sparql.php](https://github.com/njh/easyrdf/blob/master/examples/basic_sparql.php#slider) - Example of making a SPARQL SELECT query -* [converter.php](https://github.com/njh/easyrdf/blob/master/examples/converter.php#slider) - Convert RDF from one format to another -* [dump.php](https://github.com/njh/easyrdf/blob/master/examples/dump.php#slider) - Display the contents of a graph -* [foafinfo.php](https://github.com/njh/easyrdf/blob/master/examples/foafinfo.php#slider) - Display the basic information in a FOAF document -* [foafmaker.php](https://github.com/njh/easyrdf/blob/master/examples/foafmaker.php#slider) - Construct a FOAF document with a choice of serialisations -* [graph_direct.php](https://github.com/njh/easyrdf/blob/master/examples/graph_direct.php#slider) - Example of using EasyRdf_Graph directly without EasyRdf_Resource -* [graphstore.php](https://github.com/njh/easyrdf/blob/master/examples/graphstore.php#slider) - Store and retrieve data from a SPARQL 1.1 Graph Store -* [graphviz.php](https://github.com/njh/easyrdf/blob/master/examples/graphviz.php#slider) - GraphViz rendering example -* [html_tag_helpers.php](https://github.com/njh/easyrdf/blob/master/examples/html_tag_helpers.php#slider) - Rails Style html tag helpers to make the EasyRdf examples simplier -* [httpget.php](https://github.com/njh/easyrdf/blob/master/examples/httpget.php#slider) - No RDF, just test EasyRdf_Http_Client -* [serialise.php](https://github.com/njh/easyrdf/blob/master/examples/serialise.php#slider) - Basic serialisation example -* [sparql_queryform.php](https://github.com/njh/easyrdf/blob/master/examples/sparql_queryform.php#slider) - Form to submit SPARQL queries and display the result -* [uk_postcode.php](https://github.com/njh/easyrdf/blob/master/examples/uk_postcode.php#slider) - Example of resolving UK postcodes using uk-postcodes.com -* [villages.php](https://github.com/njh/easyrdf/blob/master/examples/villages.php#slider) - Fetch and information about villages in Fife from dbpedialite.org -* [zend_framework.php](https://github.com/njh/easyrdf/blob/master/examples/zend_framework.php#slider) - Example of using Zend_Http_Client and Zend_Loader_Autoloader with EasyRdf - - - -Licensing ---------- - -The EasyRdf library and tests are licensed under the [BSD-3-Clause] license. -The examples are in the public domain, for more information see [UNLICENSE]. - - - -[EasyRdf_Graph]:http://www.easyrdf.org/docs/api/EasyRdf_Graph.html -[EasyRdf_GraphStore]:http://www.easyrdf.org/docs/api/EasyRdf_GraphStore.html -[EasyRdf_Sparql_Client]:http://www.easyrdf.org/docs/api/EasyRdf_Sparql_Client.html -[EasyRdf_Sparql_Result]:http://www.easyrdf.org/docs/api/EasyRdf_Sparql_Result.html - -[ARC2]:http://github.com/semsol/arc2/ -[BSD-3-Clause]:http://www.opensource.org/licenses/BSD-3-Clause -[downloaded from the EasyRdf website]:http://www.easyrdf.org/downloads -[GraphViz]:http://www.graphviz.org/ -[rapper]:http://librdf.org/raptor/rapper.html -[RDF]:http://en.wikipedia.org/wiki/Resource_Description_Framework -[Redland Bindings]:http://librdf.org/bindings/ -[SPARQL 1.1 query language]:http://www.w3.org/TR/sparql11-query/ -[UNLICENSE]:http://unlicense.org/ -[Zend_Http_Client]:http://framework.zend.com/manual/en/zend.http.client.html diff --git a/core/vendor/easyrdf/easyrdf/composer.json b/core/vendor/easyrdf/easyrdf/composer.json deleted file mode 100644 index 15be804..0000000 --- a/core/vendor/easyrdf/easyrdf/composer.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "easyrdf/easyrdf", - "description": "EasyRdf is a PHP library designed to make it easy to consume and produce RDF.", - "version": "0.8.0", - "type": "library", - "keywords": ["RDF", "Semantic Web", "Linked Data", "Turtle", "RDFa", "SPARQL"], - "homepage": "http://www.easyrdf.org/", - "license": "BSD-3-Clause", - "authors": [ - { - "name": "Nicholas Humfrey", - "email": "njh@aelius.com", - "homepage": "http://www.aelius.com/njh/", - "role": "Developer" - } - ], - "support": { - "forum": "http://groups.google.com/group/easyrdf/", - "issues": "http://github.com/njh/easyrdf/issues", - "irc": "irc://chat.freenode.net/easyrdf" - }, - "require": { - "php": ">=5.2.8" - }, - "suggest": { - "ml/json-ld": "dev-master" - }, - "require-dev": { - "phpunit/PHPUnit": ">=3.5.15", - "squizlabs/php_codesniffer": ">=1.4.3", - "sami/sami": "dev-master" - }, - "replace": { - "njh/easyrdf": "self.version" - }, - "autoload": { - "psr-0": { "EasyRdf_": "lib/" } - } -} diff --git a/core/vendor/easyrdf/easyrdf/doap.php b/core/vendor/easyrdf/easyrdf/doap.php deleted file mode 100644 index 4393fe0..0000000 --- a/core/vendor/easyrdf/easyrdf/doap.php +++ /dev/null @@ -1,45 +0,0 @@ -homepage.'doap.rdf'); - $easyrdf = $doap->resource('#easyrdf', 'doap:Project', 'foaf:Project'); - $easyrdf->addLiteral('doap:name', 'EasyRDF'); - $easyrdf->addLiteral('doap:shortname', 'easyrdf'); - $easyrdf->addLiteral('doap:revision', $composer->version); - $easyrdf->addLiteral('doap:shortdesc', $composer->description, 'en'); - $easyrdf->addResource('doap:homepage', $composer->homepage); - - $easyrdf->addLiteral('doap:programming-language', 'PHP'); - $easyrdf->addLiteral( - 'doap:description', 'EasyRdf is a PHP library designed to make it easy to consume and produce RDF. '. - 'It was designed for use in mixed teams of experienced and inexperienced RDF developers. '. - 'It is written in Object Oriented PHP and has been tested extensively using PHPUnit.', 'en' - ); - $easyrdf->addResource('doap:license', 'http://usefulinc.com/doap/licenses/bsd'); - $easyrdf->addResource('doap:download-page', 'http://github.com/njh/easyrdf/downloads'); - $easyrdf->addResource('doap:download-page', 'http://github.com/njh/easyrdf/downloads'); - $easyrdf->addResource('doap:bug-database', 'http://github.com/njh/easyrdf/issues'); - $easyrdf->addResource('doap:mailing-list', 'http://groups.google.com/group/easyrdf'); - - $easyrdf->addResource('doap:category', 'http://dbpedia.org/resource/Resource_Description_Framework'); - $easyrdf->addResource('doap:category', 'http://dbpedia.org/resource/PHP'); - $easyrdf->addResource('doap:category', 'http://www.dbpedialite.org/things/24131#id'); - $easyrdf->addResource('doap:category', 'http://www.dbpedialite.org/things/53847#id'); - - $repository = $doap->newBNode('doap:GitRepository'); - $repository->addResource('doap:browse', 'http://github.com/njh/easyrdf'); - $repository->addResource('doap:location', 'git://github.com/njh/easyrdf.git'); - $easyrdf->addResource('doap:repository', $repository); - - $njh = $doap->resource('http://njh.me/', 'foaf:Person'); - $njh->addLiteral('foaf:name', 'Nicholas J Humfrey'); - $njh->addResource('foaf:homepage', 'http://www.aelius.com/njh/'); - $easyrdf->add('doap:maintainer', $njh); - $easyrdf->add('doap:developer', $njh); - $easyrdf->add('foaf:maker', $njh); - - print $doap->serialise('rdfxml'); diff --git a/core/vendor/easyrdf/easyrdf/lib/EasyRdf.php b/core/vendor/easyrdf/easyrdf/lib/EasyRdf.php deleted file mode 100644 index 8c7248b..0000000 --- a/core/vendor/easyrdf/easyrdf/lib/EasyRdf.php +++ /dev/null @@ -1,244 +0,0 @@ -position = 1; - $this->current = null; - parent::__construct($uri, $graph); - } - - /** Seek to a specific position in the container - * - * The first item is postion 1 - * - * @param integer $position The position in the container to seek to - * @throws OutOfBoundsException - */ - public function seek($position) - { - if (is_int($position) and $position > 0) { - list($node, $actual) = $this->getCollectionNode($position); - if ($actual === $position) { - $this->position = $actual; - $this->current = $node; - } else { - throw new OutOfBoundsException( - "Unable to seek to position $position in the collection" - ); - } - } else { - throw new InvalidArgumentException( - "Collection position must be a positive integer" - ); - } - } - - /** Rewind the iterator back to the start of the collection - * - */ - public function rewind() - { - $this->position = 1; - $this->current = null; - } - - /** Return the current item in the collection - * - * @return mixed The current item - */ - public function current() - { - if ($this->position === 1) { - return $this->get('rdf:first'); - } elseif ($this->current) { - return $this->current->get('rdf:first'); - } - } - - /** Return the key / current position in the collection - * - * Note: the first item is number 1 - * - * @return int The current position - */ - public function key() - { - return $this->position; - } - - /** Move forward to next item in the collection - * - */ - public function next() - { - if ($this->position === 1) { - $this->current = $this->get('rdf:rest'); - } elseif ($this->current) { - $this->current = $this->current->get('rdf:rest'); - } - $this->position++; - } - - /** Checks if current position is valid - * - * @return bool True if the current position is valid - */ - public function valid() - { - if ($this->position === 1 and $this->hasProperty('rdf:first')) { - return true; - } elseif ($this->current !== null and $this->current->hasProperty('rdf:first')) { - return true; - } else { - return false; - } - } - - /** Get a node for a particular offset into the collection - * - * This function may not return the item you requested, if - * it does not exist. Please check the $postion parameter - * returned. - * - * If the offset is null, then the last node in the - * collection (before rdf:nil) will be returned. - * - * @param integer $offset The offset into the collection (or null) - * @return array $node, $postion The node object and postion of the node - */ - public function getCollectionNode($offset) - { - $position = 1; - $node = $this; - $nil = $this->graph->resource('rdf:nil'); - while (($rest = $node->get('rdf:rest')) and $rest !== $nil and (is_null($offset) or ($position < $offset))) { - $node = $rest; - $position++; - } - return array($node, $position); - } - - /** Counts the number of items in the collection - * - * Note that this is an slow method - it is more efficient to use - * the iterator interface, if you can. - * - * @return integer The number of items in the collection - */ - public function count() - { - // Find the end of the collection - list($node, $position) = $this->getCollectionNode(null); - if (!$node->hasProperty('rdf:first')) { - return 0; - } else { - return $position; - } - } - - /** Append an item to the end of the collection - * - * @param mixed $value The value to append - * @return integer The number of values appended (1 or 0) - */ - public function append($value) - { - // Find the end of the collection - list($node, $position) = $this->getCollectionNode(null); - $rest = $node->get('rdf:rest'); - - if ($node === $this and is_null($rest)) { - $node->set('rdf:first', $value); - $node->addResource('rdf:rest', 'rdf:nil'); - } else { - $new = $this->graph->newBnode(); - $node->set('rdf:rest', $new); - $new->add('rdf:first', $value); - $new->addResource('rdf:rest', 'rdf:nil'); - } - - return 1; - } - - /** Array Access: check if a position exists in collection using array syntax - * - * Example: isset($list[2]) - */ - public function offsetExists($offset) - { - if (is_int($offset) and $offset > 0) { - list($node, $position) = $this->getCollectionNode($offset); - return ($node and $position === $offset and $node->hasProperty('rdf:first')); - } else { - throw new InvalidArgumentException( - "Collection offset must be a positive integer" - ); - } - } - - /** Array Access: get an item at a specified position in collection using array syntax - * - * Example: $item = $list[2]; - */ - public function offsetGet($offset) - { - if (is_int($offset) and $offset > 0) { - list($node, $position) = $this->getCollectionNode($offset); - if ($node and $position === $offset) { - return $node->get('rdf:first'); - } - } else { - throw new InvalidArgumentException( - "Collection offset must be a positive integer" - ); - } - } - - /** - * Array Access: set an item at a positon in collection using array syntax - * - * Example: $list[2] = $item; - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - // No offset - append to end of collection - $this->append($value); - } elseif (is_int($offset) and $offset > 0) { - list($node, $position) = $this->getCollectionNode($offset); - - // Create nodes, if they are missing - while ($position < $offset) { - $new = $this->graph->newBnode(); - $node->set('rdf:rest', $new); - $new->addResource('rdf:rest', 'rdf:nil'); - $node = $new; - $position++; - } - - // Terminate the list - if (!$node->hasProperty('rdf:rest')) { - $node->addResource('rdf:rest', 'rdf:nil'); - } - - return $node->set('rdf:first', $value); - } else { - throw new InvalidArgumentException( - "Collection offset must be a positive integer" - ); - } - } - - /** - * Array Access: delete an item at a specific postion using array syntax - * - * Example: unset($seq[2]); - */ - public function offsetUnset($offset) - { - if (is_int($offset) and $offset > 0) { - list($node, $position) = $this->getCollectionNode($offset); - } else { - throw new InvalidArgumentException( - "Collection offset must be a positive integer" - ); - } - - // Does the item exist? - if ($node and $position === $offset) { - $nil = $this->graph->resource('rdf:nil'); - if ($position === 1) { - $rest = $node->get('rdf:rest'); - if ($rest and $rest !== $nil) { - // Move second value, so we can keep the head of list - $node->set('rdf:first', $rest->get('rdf:first')); - $node->set('rdf:rest', $rest->get('rdf:rest')); - $rest->delete('rdf:first'); - $rest->delete('rdf:rest'); - } else { - // Just remove the value - $node->delete('rdf:first'); - $node->delete('rdf:rest'); - } - } else { - // Remove the value and re-link the list - $node->delete('rdf:first'); - $rest = $node->get('rdf:rest'); - $previous = $node->get('^rdf:rest'); - if (is_null($rest)) { - $rest = $nil; - } - if ($previous) { - $previous->set('rdf:rest', $rest); - } - } - } - } -} diff --git a/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Container.php b/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Container.php deleted file mode 100644 index 2207956..0000000 --- a/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Container.php +++ /dev/null @@ -1,230 +0,0 @@ -position = 1; - parent::__construct($uri, $graph); - } - - /** Seek to a specific position in the container - * - * The first item is postion 1 - * - * @param integer $position The position in the container to seek to - * @throws OutOfBoundsException - */ - public function seek($position) - { - if (is_int($position) and $position > 0) { - if ($this->hasProperty('rdf:_'.$position)) { - $this->position = $position; - } else { - throw new OutOfBoundsException( - "Unable to seek to position $position in the container" - ); - } - } else { - throw new InvalidArgumentException( - "Container position must be a positive integer" - ); - } - } - - /** Rewind the iterator back to the start of the container (item 1) - * - */ - public function rewind() - { - $this->position = 1; - } - - /** Return the current item in the container - * - * @return mixed The current item - */ - public function current() - { - return $this->get('rdf:_'.$this->position); - } - - /** Return the key / current position in the container - * - * @return int The current position - */ - public function key() - { - return $this->position; - } - - /** Move forward to next item in the container - * - */ - public function next() - { - $this->position++; - } - - /** Checks if current position is valid - * - * @return bool True if the current position is valid - */ - public function valid() - { - return $this->hasProperty('rdf:_'.$this->position); - } - - /** Counts the number of items in the container - * - * Note that this is an slow method - it is more efficient to use - * the iterator interface, if you can. - * - * @return integer The number of items in the container - */ - public function count() - { - $pos = 1; - while ($this->hasProperty('rdf:_'.$pos)) { - $pos++; - } - return $pos - 1; - } - - /** Append an item to the end of the container - * - * @param mixed $value The value to append - * @return integer The number of values appended (1 or 0) - */ - public function append($value) - { - // Find the end of the list - $pos = 1; - while ($this->hasProperty('rdf:_'.$pos)) { - $pos++; - } - - // Add the item - return $this->add('rdf:_'.$pos, $value); - } - - /** Array Access: check if a position exists in container using array syntax - * - * Example: isset($seq[2]) - */ - public function offsetExists($offset) - { - if (is_int($offset) and $offset > 0) { - return $this->hasProperty('rdf:_'.$offset); - } else { - throw new InvalidArgumentException( - "Container position must be a positive integer" - ); - } - } - - /** Array Access: get an item at a specified position in container using array syntax - * - * Example: $item = $seq[2]; - */ - public function offsetGet($offset) - { - if (is_int($offset) and $offset > 0) { - return $this->get('rdf:_'.$offset); - } else { - throw new InvalidArgumentException( - "Container position must be a positive integer" - ); - } - } - - /** - * Array Access: set an item at a positon in container using array syntax - * - * Example: $seq[2] = $item; - * - * Warning: creating gaps in the sequence will result in unexpected behavior - */ - public function offsetSet($offset, $value) - { - if (is_int($offset) and $offset > 0) { - return $this->set('rdf:_'.$offset, $value); - } elseif (is_null($offset)) { - return $this->append($value); - } else { - throw new InvalidArgumentException( - "Container position must be a positive integer" - ); - } - } - - /** - * Array Access: delete an item at a specific postion using array syntax - * - * Example: unset($seq[2]); - * - * Warning: creating gaps in the sequence will result in unexpected behavior - */ - public function offsetUnset($offset) - { - if (is_int($offset) and $offset > 0) { - return $this->delete('rdf:_'.$offset); - } else { - throw new InvalidArgumentException( - "Container position must be a positive integer" - ); - } - } -} diff --git a/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Exception.php b/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Exception.php deleted file mode 100644 index 25090a5..0000000 --- a/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Exception.php +++ /dev/null @@ -1,50 +0,0 @@ - 0.5) where 0.5 is the - * q value for that type. The types are sorted by q value - * before constructing the string. - * - * @param array $extraTypes extra MIME types to add - * @return string list of supported MIME types - */ - public static function getHttpAcceptHeader($extraTypes = array()) - { - $accept = $extraTypes; - foreach (self::$formats as $format) { - if ($format->parserClass and count($format->mimeTypes) > 0) { - $accept = array_merge($accept, $format->mimeTypes); - } - } - arsort($accept, SORT_NUMERIC); - - $acceptStr=''; - foreach ($accept as $type => $q) { - if ($acceptStr) { - $acceptStr .= ','; - } - if ($q == 1.0) { - $acceptStr .= $type; - } else { - $acceptStr .= sprintf("%s;q=%1.1f", $type, $q); - } - } - return $acceptStr; - } - - /** Check if a named graph exists - * - * @param string $name the name of the format - * @return boolean true if the format exists - */ - public static function formatExists($name) - { - return array_key_exists($name, self::$formats); - } - - /** Get a EasyRdf_Format from a name, uri or mime type - * - * @param string $query a query string to search for - * @return object the first EasyRdf_Format that matches the query - * @throws EasyRdf_Exception if no format is found - */ - public static function getFormat($query) - { - if (!is_string($query) or $query == null or $query == '') { - throw new InvalidArgumentException( - "\$query should be a string and cannot be null or empty" - ); - } - - foreach (self::$formats as $format) { - if ($query == $format->name or - $query == $format->uri or - array_key_exists($query, $format->mimeTypes) or - in_array($query, $format->extensions)) { - return $format; - } - } - - # No match - throw new EasyRdf_Exception( - "Format is not recognised: $query" - ); - } - - /** Register a new format - * - * @param string $name The name of the format (e.g. ntriples) - * @param string $label The label for the format (e.g. N-Triples) - * @param string $uri The URI for the format - * @param string $mimeTypes One or more mime types for the format - * @param string $extensions One or more extensions (file suffix) - * @return object The new EasyRdf_Format object - */ - public static function register( - $name, - $label = null, - $uri = null, - $mimeTypes = array(), - $extensions = array() - ) { - if (!is_string($name) or $name == null or $name == '') { - throw new InvalidArgumentException( - "\$name should be a string and cannot be null or empty" - ); - } - - if (!array_key_exists($name, self::$formats)) { - self::$formats[$name] = new EasyRdf_Format($name); - } - - self::$formats[$name]->setLabel($label); - self::$formats[$name]->setUri($uri); - self::$formats[$name]->setMimeTypes($mimeTypes); - self::$formats[$name]->setExtensions($extensions); - return self::$formats[$name]; - } - - /** Remove a format from the registry - * - * @param string $name The name of the format (e.g. ntriples) - */ - public static function unregister($name) - { - unset(self::$formats[$name]); - } - - /** Class method to register a parser class to a format name - * - * @param string $name The name of the format (e.g. ntriples) - * @param string $class The name of the class (e.g. EasyRdf_Parser_Ntriples) - */ - public static function registerParser($name, $class) - { - if (!self::formatExists($name)) { - self::register($name); - } - self::getFormat($name)->setParserClass($class); - } - - /** Class method to register a serialiser class to a format name - * - * @param string $name The name of the format (e.g. ntriples) - * @param string $class The name of the class (e.g. EasyRdf_Serialiser_Ntriples) - */ - public static function registerSerialiser($name, $class) - { - if (!self::formatExists($name)) { - self::register($name); - } - self::getFormat($name)->setSerialiserClass($class); - } - - /** Attempt to guess the document format from some content. - * - * If $filename is given, then the suffix is first used to guess the format. - * - * If the document format is not recognised, null is returned. - * - * @param string $data The document data - * @param string $filename Optional filename - * @return object EasyRdf_Format The format object - */ - public static function guessFormat($data, $filename = null) - { - if (is_array($data)) { - # Data has already been parsed into RDF/PHP - return self::getFormat('php'); - } - - // First try and identify by the filename - if ($filename and preg_match("/\.(\w+)$/", $filename, $matches)) { - foreach (self::$formats as $format) { - if (in_array($matches[1], $format->extensions)) { - return $format; - } - } - } - - // Then try and guess by the first 1024 bytes of content - $short = substr($data, 0, 1024); - if (preg_match("/^\s*\{/", $short)) { - return self::getFormat('json'); - } elseif (preg_match("/ <.+>/m", $short)) { - return self::getFormat('ntriples'); - } elseif (preg_match("|http://www.w3.org/2005/sparql-results|", $short)) { - return self::getFormat('sparql-xml'); - } elseif (preg_match("/\WRDFa\W/i", $short)) { - return self::getFormat('rdfa'); - } elseif (preg_match("/name = $name; - $this->label = $name; # Only a default - } - - /** Get the name of a format object - * - * @return string The name of the format (e.g. rdfxml) - */ - public function getName() - { - return $this->name; - } - - /** Get the label for a format object - * - * @return string The format label (e.g. RDF/XML) - */ - public function getLabel() - { - return $this->label; - } - - /** Set the label for a format object - * - * @param string $label The new label for the format - */ - public function setLabel($label) - { - if ($label) { - if (!is_string($label)) { - throw new InvalidArgumentException( - "\$label should be a string" - ); - } - return $this->label = $label; - } else { - return $this->label = null; - } - } - - /** Get the URI for a format object - * - * @return string The format URI - */ - public function getUri() - { - return $this->uri; - } - - /** Set the URI for a format object - * - * @param string $uri The new URI for the format - */ - public function setUri($uri) - { - if ($uri) { - if (!is_string($uri)) { - throw new InvalidArgumentException( - "\$uri should be a string" - ); - } - return $this->uri = $uri; - } else { - return $this->uri = null; - } - } - - /** Get the default registered mime type for a format object - * - * @return string The default mime type as a string. - */ - public function getDefaultMimeType() - { - $types = array_keys($this->mimeTypes); - if (isset($types[0])) { - return $types[0]; - } - } - - /** Get all the registered mime types for a format object - * - * @return array One or more MIME types in an array with - * the mime type as the key and q value as the value - */ - public function getMimeTypes() - { - return $this->mimeTypes; - } - - /** Set the MIME Types for a format object - * - * @param array $mimeTypes One or more mime types - */ - public function setMimeTypes($mimeTypes) - { - if ($mimeTypes) { - if (!is_array($mimeTypes)) { - $mimeTypes = array($mimeTypes); - } - $this->mimeTypes = $mimeTypes; - } else { - $this->mimeTypes = array(); - } - } - - /** Get the default registered file extension (filename suffix) for a format object - * - * @return string The default extension as a string. - */ - public function getDefaultExtension() - { - if (isset($this->extensions[0])) { - return $this->extensions[0]; - } - } - - /** Get all the registered file extensions (filename suffix) for a format object - * - * @return array One or more extensions as an array - */ - public function getExtensions() - { - return $this->extensions; - } - - /** Set the file format extensions (filename suffix) for a format object - * - * @param mixed $extensions One or more file extensions - */ - public function setExtensions($extensions) - { - if ($extensions) { - if (!is_array($extensions)) { - $extensions = array($extensions); - } - $this->extensions = $extensions; - } else { - $this->extensions = array(); - } - } - - /** Set the parser to use for a format - * - * @param string $class The name of the class - */ - public function setParserClass($class) - { - if ($class) { - if (!is_string($class)) { - throw new InvalidArgumentException( - "\$class should be a string" - ); - } - $this->parserClass = $class; - } else { - $this->parserClass = null; - } - } - - /** Get the name of the class to use to parse the format - * - * @return string The name of the class - */ - public function getParserClass() - { - return $this->parserClass; - } - - /** Create a new parser to parse this format - * - * @return object The new parser object - */ - public function newParser() - { - $parserClass = $this->parserClass; - if (!$parserClass) { - throw new EasyRdf_Exception( - "No parser class available for format: ".$this->getName() - ); - } - return (new $parserClass()); - } - - /** Set the serialiser to use for a format - * - * @param string $class The name of the class - */ - public function setSerialiserClass($class) - { - if ($class) { - if (!is_string($class)) { - throw new InvalidArgumentException( - "\$class should be a string" - ); - } - $this->serialiserClass = $class; - } else { - $this->serialiserClass = null; - } - } - - /** Get the name of the class to use to serialise the format - * - * @return string The name of the class - */ - public function getSerialiserClass() - { - return $this->serialiserClass; - } - - /** Create a new serialiser to parse this format - * - * @return object The new serialiser object - */ - public function newSerialiser() - { - $serialiserClass = $this->serialiserClass; - if (!$serialiserClass) { - throw new EasyRdf_Exception( - "No serialiser class available for format: ".$this->getName() - ); - } - return (new $serialiserClass()); - } - - /** Magic method to return the name of the format when casted to string - * - * @return string The name of the format - */ - public function __toString() - { - return $this->name; - } -} - - -/* - Register default set of supported formats - NOTE: they are ordered by preference -*/ - -EasyRdf_Format::register( - 'php', - 'RDF/PHP', - 'http://n2.talis.com/wiki/RDF_PHP_Specification', - array( - 'application/x-httpd-php-source' => 1.0 - ), - array('phps') -); - -EasyRdf_Format::register( - 'json', - 'RDF/JSON Resource-Centric', - 'http://n2.talis.com/wiki/RDF_JSON_Specification', - array( - 'application/json' => 1.0, - 'text/json' => 0.9, - 'application/rdf+json' => 0.9 - ), - array('json') -); - -EasyRdf_Format::register( - 'ntriples', - 'N-Triples', - 'http://www.w3.org/TR/n-triples/', - array( - 'application/n-triples' => 1.0, - 'text/plain' => 0.9, - 'text/ntriples' => 0.9, - 'application/ntriples' => 0.9, - 'application/x-ntriples' => 0.9 - ), - array('nt') -); - -EasyRdf_Format::register( - 'turtle', - 'Turtle Terse RDF Triple Language', - 'http://www.dajobe.org/2004/01/turtle', - array( - 'text/turtle' => 0.8, - 'application/turtle' => 0.7, - 'application/x-turtle' => 0.7 - ), - array('ttl') -); - -EasyRdf_Format::register( - 'rdfxml', - 'RDF/XML', - 'http://www.w3.org/TR/rdf-syntax-grammar', - array( - 'application/rdf+xml' => 0.8 - ), - array('rdf', 'xrdf') -); - -EasyRdf_Format::register( - 'dot', - 'Graphviz', - 'http://www.graphviz.org/doc/info/lang.html', - array( - 'text/vnd.graphviz' => 0.8 - ), - array('gv', 'dot') -); - -EasyRdf_Format::register( - 'json-triples', - 'RDF/JSON Triples' -); - -EasyRdf_Format::register( - 'n3', - 'Notation3', - 'http://www.w3.org/2000/10/swap/grammar/n3#', - array( - 'text/n3' => 0.5, - 'text/rdf+n3' => 0.5 - ), - array('n3') -); - -EasyRdf_Format::register( - 'rdfa', - 'RDFa', - 'http://www.w3.org/TR/rdfa-core/', - array( - 'text/html' => 0.4, - 'application/xhtml+xml' => 0.4 - ), - array('html') -); - -EasyRdf_Format::register( - 'sparql-xml', - 'SPARQL XML Query Results', - 'http://www.w3.org/TR/rdf-sparql-XMLres/', - array( - 'application/sparql-results+xml' => 1.0 - ) -); - -EasyRdf_Format::register( - 'sparql-json', - 'SPARQL JSON Query Results', - 'http://www.w3.org/TR/rdf-sparql-json-res/', - array( - 'application/sparql-results+json' => 1.0 - ) -); - -EasyRdf_Format::register( - 'png', - 'Portable Network Graphics (PNG)', - 'http://www.w3.org/TR/PNG/', - array( - 'image/png' => 0.3 - ), - array('png') -); - -EasyRdf_Format::register( - 'gif', - 'Graphics Interchange Format (GIF)', - 'http://www.w3.org/Graphics/GIF/spec-gif89a.txt', - array( - 'image/gif' => 0.2 - ), - array('gif') -); - -EasyRdf_Format::register( - 'svg', - 'Scalable Vector Graphics (SVG)', - 'http://www.w3.org/TR/SVG/', - array( - 'image/svg+xml' => 0.3 - ), - array('svg') -); - - -/* - Register default set of parsers and serialisers -*/ - -EasyRdf_Format::registerParser('json', 'EasyRdf_Parser_Json'); -EasyRdf_Format::registerParser('ntriples', 'EasyRdf_Parser_Ntriples'); -EasyRdf_Format::registerParser('php', 'EasyRdf_Parser_RdfPhp'); -EasyRdf_Format::registerParser('rdfxml', 'EasyRdf_Parser_RdfXml'); -EasyRdf_Format::registerParser('turtle', 'EasyRdf_Parser_Turtle'); -EasyRdf_Format::registerParser('rdfa', 'EasyRdf_Parser_Rdfa'); - -EasyRdf_Format::registerSerialiser('json', 'EasyRdf_Serialiser_Json'); -EasyRdf_Format::registerSerialiser('jsonld', 'EasyRdf_Serialiser_JsonLd'); -EasyRdf_Format::registerSerialiser('n3', 'EasyRdf_Serialiser_Turtle'); -EasyRdf_Format::registerSerialiser('ntriples', 'EasyRdf_Serialiser_Ntriples'); -EasyRdf_Format::registerSerialiser('php', 'EasyRdf_Serialiser_RdfPhp'); -EasyRdf_Format::registerSerialiser('rdfxml', 'EasyRdf_Serialiser_RdfXml'); -EasyRdf_Format::registerSerialiser('turtle', 'EasyRdf_Serialiser_Turtle'); - -EasyRdf_Format::registerSerialiser('dot', 'EasyRdf_Serialiser_GraphViz'); -EasyRdf_Format::registerSerialiser('gif', 'EasyRdf_Serialiser_GraphViz'); -EasyRdf_Format::registerSerialiser('png', 'EasyRdf_Serialiser_GraphViz'); -EasyRdf_Format::registerSerialiser('svg', 'EasyRdf_Serialiser_GraphViz'); diff --git a/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Graph.php b/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Graph.php deleted file mode 100644 index ba8ca82..0000000 --- a/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Graph.php +++ /dev/null @@ -1,1649 +0,0 @@ -checkResourceParam($uri, true); - - if ($uri) { - $this->uri = $uri; - $this->parsedUri = new EasyRdf_ParsedUri($uri); - if ($data) { - $this->parse($data, $format, $this->uri); - } - } - } - - /** - * Create a new graph and load RDF data from a URI into it - * - * This static function is shorthand for: - * $graph = new EasyRdf_Graph($uri); - * $graph->load($uri, $format); - * - * The document type is optional but should be specified if it - * can't be guessed or got from the HTTP headers. - * - * @param string $uri The URI of the data to load - * @param string $format Optional format of the data (eg. rdfxml) - * @return object EasyRdf_Graph The new the graph object - */ - public static function newAndLoad($uri, $format = null) - { - $graph = new self($uri); - $graph->load($uri, $format); - return $graph; - } - - /** Get or create a resource stored in a graph - * - * If the resource did not previously exist, then a new resource will - * be created. If you provide an RDF type and that type is registered - * with the EasyRdf_TypeMapper, then the resource will be an instance - * of the class registered. - * - * If URI is null, then the URI of the graph is used. - * - * @param string $uri The URI of the resource - * @param mixed $types RDF type of a new resource (e.g. foaf:Person) - * @return object EasyRdf_Resource - */ - public function resource($uri = null, $types = array()) - { - $this->checkResourceParam($uri, true); - if (!$uri) { - throw new InvalidArgumentException( - '$uri is null and EasyRdf_Graph object has no URI either.' - ); - } - - // Resolve relative URIs - if ($this->parsedUri) { - $uri = $this->parsedUri->resolve($uri)->toString(); - } - - // Add the types - $this->addType($uri, $types); - - // Create resource object if it doesn't already exist - if (!isset($this->resources[$uri])) { - $resClass = $this->classForResource($uri); - $this->resources[$uri] = new $resClass($uri, $this); - } - - return $this->resources[$uri]; - } - - /** Work out the class to instantiate a resource as - * @ignore - */ - protected function classForResource($uri) - { - $rdfType = 'http://www.w3.org/1999/02/22-rdf-syntax-ns#type'; - if (isset($this->index[$uri][$rdfType])) { - foreach ($this->index[$uri][$rdfType] as $type) { - if ($type['type'] == 'uri' or $type['type'] == 'bnode') { - $class = EasyRdf_TypeMapper::get($type['value']); - if ($class != null) { - return $class; - } - } - } - } - - // Parsers don't typically add a rdf:type to rdf:List, so we have to - // do a bit of 'inference' here using properties. - if ($uri == 'http://www.w3.org/1999/02/22-rdf-syntax-ns#nil' or - isset($this->index[$uri]['http://www.w3.org/1999/02/22-rdf-syntax-ns#first']) or - isset($this->index[$uri]['http://www.w3.org/1999/02/22-rdf-syntax-ns#rest']) - ) { - return 'EasyRdf_Collection'; - } - return 'EasyRdf_Resource'; - } - - /** - * Create a new blank node in the graph and return it. - * - * If you provide an RDF type and that type is registered - * with the EasyRdf_TypeMapper, then the resource will be an instance - * of the class registered. - * - * @param mixed $types RDF type of a new blank node (e.g. foaf:Person) - * @return object EasyRdf_Resource The new blank node - */ - public function newBNode($types = array()) - { - return $this->resource($this->newBNodeId(), $types); - } - - /** - * Create a new unique blank node identifier and return it. - * - * @return string The new blank node identifier (e.g. _:genid1) - */ - public function newBNodeId() - { - return "_:genid".(++$this->bNodeCount); - } - - /** - * Parse some RDF data into the graph object. - * - * @param string $data Data to parse for the graph - * @param string $format Optional format of the data - * @param string $uri The URI of the data to load - * @return integer The number of triples added to the graph - */ - public function parse($data, $format = null, $uri = null) - { - $this->checkResourceParam($uri, true); - - if (empty($format) or $format == 'guess') { - // Guess the format if it is Unknown - $format = EasyRdf_Format::guessFormat($data, $uri); - } else { - $format = EasyRdf_Format::getFormat($format); - } - - if (!$format) { - throw new EasyRdf_Exception( - "Unable to parse data of an unknown format." - ); - } - - $parser = $format->newParser(); - return $parser->parse($this, $data, $format, $uri); - } - - /** - * Parse a file containing RDF data into the graph object. - * - * @param string $filename The path of the file to load - * @param string $format Optional format of the file - * @param string $uri The URI of the file to load - * @return integer The number of triples added to the graph - */ - public function parseFile($filename, $format = null, $uri = null) - { - if ($uri === null) { - $uri = "file://$filename"; - } - - return $this->parse( - file_get_contents($filename), - $format, - $uri - ); - } - - /** - * Load RDF data into the graph from a URI. - * - * If no URI is given, then the URI of the graph will be used. - * - * The document type is optional but should be specified if it - * can't be guessed or got from the HTTP headers. - * - * @param string $uri The URI of the data to load - * @param string $format Optional format of the data (eg. rdfxml) - * @return integer The number of triples added to the graph - */ - public function load($uri = null, $format = null) - { - $this->checkResourceParam($uri, true); - - if (!$uri) { - throw new EasyRdf_Exception( - "No URI given to load() and the graph does not have a URI." - ); - } - - // Setup the HTTP client - $client = EasyRdf_Http::getDefaultHttpClient(); - $client->resetParameters(true); - $client->setConfig(array('maxredirects' => 0)); - $client->setMethod('GET'); - $client->setHeaders('Accept', EasyRdf_Format::getHttpAcceptHeader()); - - $requestUrl = $uri; - $response = null; - $redirectCounter = 0; - do { - // Have we already loaded it into the graph? - $requestUrl = EasyRdf_Utils::removeFragmentFromUri($requestUrl); - if (in_array($requestUrl, $this->loaded)) { - return 0; - } - - // Make the HTTP request - $client->setHeaders('host', null); - $client->setUri($requestUrl); - $response = $client->request(); - - // Add the URL to the list of URLs loaded - $this->loaded[] = $requestUrl; - - if ($response->isRedirect() and $location = $response->getHeader('location')) { - // Avoid problems with buggy servers that add whitespace - $location = trim($location); - - // Some servers return relative URLs in the location header - // resolve it in relation to previous request - $baseUri = new EasyRdf_ParsedUri($requestUrl); - $requestUrl = $baseUri->resolve($location)->toString(); - $requestUrl = EasyRdf_Utils::removeFragmentFromUri($requestUrl); - - // If it is a 303 then drop the parameters - if ($response->getStatus() == 303) { - $client->resetParameters(); - } - - ++$redirectCounter; - } elseif ($response->isSuccessful()) { - // If we didn't get any location, stop redirecting - break; - } else { - throw new EasyRdf_Exception( - "HTTP request for $requestUrl failed: ".$response->getMessage() - ); - } - } while ($redirectCounter < $this->maxRedirects); - - if (!$format or $format == 'guess') { - list($format, $params) = EasyRdf_Utils::parseMimeType( - $response->getHeader('Content-Type') - ); - } - - // Parse the data - return $this->parse($response->getBody(), $format, $uri); - } - - /** Get an associative array of all the resources stored in the graph. - * The keys of the array is the URI of the EasyRdf_Resource. - * - * @return array Array of EasyRdf_Resource - */ - public function resources() - { - foreach ($this->index as $subject => $properties) { - if (!isset($this->resources[$subject])) { - $this->resource($subject); - } - } - - foreach ($this->revIndex as $object => $properties) { - if (!isset($this->resources[$object])) { - $this->resource($object); - } - } - - return $this->resources; - } - - /** Get an arry of resources matching a certain property and optional value. - * - * For example this routine could be used as a way of getting - * everyone who has name: - * $people = $graph->resourcesMatching('foaf:name') - * - * Or everyone who is male: - * $people = $graph->resourcesMatching('foaf:gender', 'male'); - * - * Or all homepages: - * $people = $graph->resourcesMatching('^foaf:homepage'); - * - * @param string $property The property to check. - * @param mixed $value Optional, the value of the propery to check for. - * @return array Array of EasyRdf_Resource - */ - public function resourcesMatching($property, $value = null) - { - $this->checkSinglePropertyParam($property, $inverse); - $this->checkValueParam($value); - - // Use the reverse index if it is an inverse property - if ($inverse) { - $index = &$this->revIndex; - } else { - $index = &$this->index; - } - - $matched = array(); - foreach ($index as $subject => $props) { - if (isset($index[$subject][$property])) { - if (isset($value)) { - foreach ($this->index[$subject][$property] as $v) { - if ($v['type'] == $value['type'] and - $v['value'] == $value['value']) { - $matched[] = $this->resource($subject); - break; - } - } - } else { - $matched[] = $this->resource($subject); - } - } - } - return $matched; - } - - /** Get the URI of the graph - * - * @return string The URI of the graph - */ - public function getUri() - { - return $this->uri; - } - - /** Check that a URI/resource parameter is valid, and convert it to a string - * @ignore - */ - protected function checkResourceParam(&$resource, $allowNull = false) - { - if ($allowNull == true) { - if ($resource === null) { - if ($this->uri) { - $resource = $this->uri; - } else { - return; - } - } - } elseif ($resource === null) { - throw new InvalidArgumentException( - "\$resource cannot be null" - ); - } - - if (is_object($resource) and $resource instanceof EasyRdf_Resource) { - $resource = $resource->getUri(); - } elseif (is_object($resource) and $resource instanceof EasyRdf_ParsedUri) { - $resource = strval($resource); - } elseif (is_string($resource)) { - if ($resource == '') { - throw new InvalidArgumentException( - "\$resource cannot be an empty string" - ); - } elseif (preg_match("|^<(.+)>$|", $resource, $matches)) { - $resource = $matches[1]; - } else { - $resource = EasyRdf_Namespace::expand($resource); - } - } else { - throw new InvalidArgumentException( - "\$resource should be a string or an EasyRdf_Resource" - ); - } - } - - /** Check that a single URI/property parameter (not a property path) - * is valid, and expand it if required - * @ignore - */ - protected function checkSinglePropertyParam(&$property, &$inverse) - { - if (is_object($property) and $property instanceof EasyRdf_Resource) { - $property = $property->getUri(); - } elseif (is_object($property) and $property instanceof EasyRdf_ParsedUri) { - $property = strval($property); - } elseif (is_string($property)) { - if ($property == '') { - throw new InvalidArgumentException( - "\$property cannot be an empty string" - ); - } elseif (substr($property, 0, 1) == '^') { - $inverse = true; - $property = EasyRdf_Namespace::expand(substr($property, 1)); - } elseif (substr($property, 0, 2) == '_:') { - throw new InvalidArgumentException( - "\$property cannot be a blank node" - ); - } else { - $inverse = false; - $property = EasyRdf_Namespace::expand($property); - } - } - - if ($property === null or !is_string($property)) { - throw new InvalidArgumentException( - "\$property should be a string or EasyRdf_Resource and cannot be null" - ); - } - } - - /** Check that a value parameter is valid, and convert it to an associative array if needed - * @ignore - */ - protected function checkValueParam(&$value) - { - if (isset($value)) { - if (is_object($value)) { - if (!method_exists($value, 'toRdfPhp')) { - // Convert to a literal object - $value = EasyRdf_Literal::create($value); - } - $value = $value->toRdfPhp(); - } elseif (is_array($value)) { - if (!isset($value['type'])) { - throw new InvalidArgumentException( - "\$value is missing a 'type' key" - ); - } - - if (!isset($value['value'])) { - throw new InvalidArgumentException( - "\$value is missing a 'value' key" - ); - } - - // Fix ordering and remove unknown keys - $value = array( - 'type' => strval($value['type']), - 'value' => strval($value['value']), - 'lang' => isset($value['lang']) ? strval($value['lang']) : null, - 'datatype' => isset($value['datatype']) ? strval($value['datatype']) : null - ); - } else { - $value = array( - 'type' => 'literal', - 'value' => strval($value), - 'datatype' => EasyRdf_Literal::getDatatypeForValue($value) - ); - } - if (!in_array($value['type'], array('uri', 'bnode', 'literal'), true)) { - throw new InvalidArgumentException( - "\$value does not have a valid type (".$value['type'].")" - ); - } - if (empty($value['datatype'])) { - unset($value['datatype']); - } - if (empty($value['lang'])) { - unset($value['lang']); - } - if (isset($value['lang']) and isset($value['datatype'])) { - throw new InvalidArgumentException( - "\$value cannot have both and language and a datatype" - ); - } - } - } - - /** Get a single value for a property of a resource - * - * If multiple values are set for a property then the value returned - * may be arbitrary. - * - * If $property is an array, then the first item in the array that matches - * a property that exists is returned. - * - * This method will return null if the property does not exist. - * - * @param string $resource The URI of the resource (e.g. http://example.com/joe#me) - * @param string $propertyPath A valid property path - * @param string $type The type of value to filter by (e.g. literal or resource) - * @param string $lang The language to filter by (e.g. en) - * @return mixed A value associated with the property - */ - public function get($resource, $propertyPath, $type = null, $lang = null) - { - $this->checkResourceParam($resource); - - if (is_object($propertyPath) and $propertyPath instanceof EasyRdf_Resource) { - return $this->getSingleProperty($resource, $propertyPath->getUri(), $type, $lang); - } elseif (is_string($propertyPath) and preg_match('|^(\^?)<(.+)>|', $propertyPath, $matches)) { - return $this->getSingleProperty($resource, "$matches[1]$matches[2]", $type, $lang); - } elseif ($propertyPath === null or !is_string($propertyPath)) { - throw new InvalidArgumentException( - "\$propertyPath should be a string or EasyRdf_Resource and cannot be null" - ); - } elseif ($propertyPath === '') { - throw new InvalidArgumentException( - "\$propertyPath cannot be an empty string" - ); - } - - // Loop through each component in the path - foreach (explode('/', $propertyPath) as $part) { - // Stop if we come to a literal - if ($resource instanceof EasyRdf_Literal) { - return null; - } - - // Try each of the alternative paths - foreach (explode('|', $part) as $p) { - $res = $this->getSingleProperty($resource, $p, $type, $lang); - if ($res) { - break; - } - } - - // Stop if nothing was found - $resource = $res; - if (!$resource) { - break; - } - } - - return $resource; - } - - /** Get a single value for a property of a resource - * - * @param string $resource The URI of the resource (e.g. http://example.com/joe#me) - * @param string $property The name of the property (e.g. foaf:name) - * @param string $type The type of value to filter by (e.g. literal or resource) - * @param string $lang The language to filter by (e.g. en) - * @return mixed A value associated with the property - * - * @ignore - */ - protected function getSingleProperty($resource, $property, $type = null, $lang = null) - { - $this->checkResourceParam($resource); - $this->checkSinglePropertyParam($property, $inverse); - - // Get an array of values for the property - $values = $this->propertyValuesArray($resource, $property, $inverse); - if (!isset($values)) { - return null; - } - - // Filter the results - $result = null; - if ($type) { - foreach ($values as $value) { - if ($type == 'literal' and $value['type'] == 'literal') { - if ($lang == null or (isset($value['lang']) and $value['lang'] == $lang)) { - $result = $value; - break; - } - } elseif ($type == 'resource') { - if ($value['type'] == 'uri' or $value['type'] == 'bnode') { - $result = $value; - break; - } - } - } - } else { - $result = $values[0]; - } - - // Convert the internal data structure into a PHP object - return $this->arrayToObject($result); - } - - /** Get a single literal value for a property of a resource - * - * If multiple values are set for a property then the value returned - * may be arbitrary. - * - * This method will return null if there is not literal value for the - * property. - * - * @param string $resource The URI of the resource (e.g. http://example.com/joe#me) - * @param string|array $property The name of the property (e.g. foaf:name) - * @param string $lang The language to filter by (e.g. en) - * @return object EasyRdf_Literal Literal value associated with the property - */ - public function getLiteral($resource, $property, $lang = null) - { - return $this->get($resource, $property, 'literal', $lang); - } - - /** Get a single resource value for a property of a resource - * - * If multiple values are set for a property then the value returned - * may be arbitrary. - * - * This method will return null if there is not resource for the - * property. - * - * @param string $resource The URI of the resource (e.g. http://example.com/joe#me) - * @param string|array $property The name of the property (e.g. foaf:name) - * @return object EasyRdf_Resource Resource associated with the property - */ - public function getResource($resource, $property) - { - return $this->get($resource, $property, 'resource'); - } - - /** Return all the values for a particular property of a resource - * @ignore - */ - protected function propertyValuesArray($resource, $property, $inverse = false) - { - // Is an inverse property being requested? - if ($inverse) { - if (isset($this->revIndex[$resource])) { - $properties = &$this->revIndex[$resource]; - } - } else { - if (isset($this->index[$resource])) { - $properties = &$this->index[$resource]; - } - } - - if (isset($properties[$property])) { - return $properties[$property]; - } else { - return null; - } - } - - /** Get an EasyRdf_Resource or EasyRdf_Literal object from an associative array. - * @ignore - */ - protected function arrayToObject($data) - { - if ($data) { - if ($data['type'] == 'uri' or $data['type'] == 'bnode') { - return $this->resource($data['value']); - } else { - return EasyRdf_Literal::create($data); - } - } else { - return null; - } - } - - /** Get all values for a property path - * - * This method will return an empty array if the property does not exist. - * - * @param string $resource The URI of the resource (e.g. http://example.com/joe#me) - * @param string $propertyPath A valid property path - * @param string $type The type of value to filter by (e.g. literal) - * @param string $lang The language to filter by (e.g. en) - * @return array An array of values associated with the property - */ - public function all($resource, $propertyPath, $type = null, $lang = null) - { - $this->checkResourceParam($resource); - - if (is_object($propertyPath) and $propertyPath instanceof EasyRdf_Resource) { - return $this->allForSingleProperty($resource, $propertyPath->getUri(), $type, $lang); - } elseif (is_string($propertyPath) and preg_match('|^(\^?)<(.+)>|', $propertyPath, $matches)) { - return $this->allForSingleProperty($resource, "$matches[1]$matches[2]", $type, $lang); - } elseif ($propertyPath === null or !is_string($propertyPath)) { - throw new InvalidArgumentException( - "\$propertyPath should be a string or EasyRdf_Resource and cannot be null" - ); - } elseif ($propertyPath === '') { - throw new InvalidArgumentException( - "\$propertyPath cannot be an empty string" - ); - } - - $objects = array($resource); - - // Loop through each component in the path - foreach (explode('/', $propertyPath) as $part) { - - $results = array(); - foreach (explode('|', $part) as $p) { - foreach ($objects as $o) { - // Ignore literals found earlier in path - if ($o instanceof EasyRdf_Literal) { - continue; - } - - $results = array_merge( - $results, - $this->allForSingleProperty($o, $p, $type, $lang) - ); - } - } - - // Stop if we don't have anything - if (empty($objects)) { - break; - } - - // Use the results as the input to the next iteration - $objects = $results; - } - - return $results; - } - - /** Get all values for a single property of a resource - * - * @param string $resource The URI of the resource (e.g. http://example.com/joe#me) - * @param string $property The name of the property (e.g. foaf:name) - * @param string $type The type of value to filter by (e.g. literal) - * @param string $lang The language to filter by (e.g. en) - * @return array An array of values associated with the property - * - * @ignore - */ - protected function allForSingleProperty($resource, $property, $type = null, $lang = null) - { - $this->checkResourceParam($resource); - $this->checkSinglePropertyParam($property, $inverse); - - // Get an array of values for the property - $values = $this->propertyValuesArray($resource, $property, $inverse); - if (!isset($values)) { - return array(); - } - - $objects = array(); - if ($type) { - foreach ($values as $value) { - if ($type == 'literal' and $value['type'] == 'literal') { - if ($lang == null or (isset($value['lang']) and $value['lang'] == $lang)) { - $objects[] = $this->arrayToObject($value); - } - } elseif ($type == 'resource') { - if ($value['type'] == 'uri' or $value['type'] == 'bnode') { - $objects[] = $this->arrayToObject($value); - } - } - } - } else { - foreach ($values as $value) { - $objects[] = $this->arrayToObject($value); - } - } - return $objects; - } - - /** Get all literal values for a property of a resource - * - * This method will return an empty array if the resource does not - * has any literal values for that property. - * - * @param string $resource The URI of the resource (e.g. http://example.com/joe#me) - * @param string $property The name of the property (e.g. foaf:name) - * @param string $lang The language to filter by (e.g. en) - * @return array An array of values associated with the property - */ - public function allLiterals($resource, $property, $lang = null) - { - return $this->all($resource, $property, 'literal', $lang); - } - - /** Get all resources for a property of a resource - * - * This method will return an empty array if the resource does not - * has any resources for that property. - * - * @param string $resource The URI of the resource (e.g. http://example.com/joe#me) - * @param string $property The name of the property (e.g. foaf:name) - * @return array An array of values associated with the property - */ - public function allResources($resource, $property) - { - return $this->all($resource, $property, 'resource'); - } - - /** Get all the resources in the graph of a certain type - * - * If no resources of the type are available and empty - * array is returned. - * - * @param string $type The type of the resource (e.g. foaf:Person) - * @return array The array of resources - */ - public function allOfType($type) - { - return $this->all($type, '^rdf:type'); - } - - /** Count the number of values for a property of a resource - * - * @param string $resource The URI of the resource (e.g. http://example.com/joe#me) - * @param string $property The name of the property (e.g. foaf:name) - * @param string $type The type of value to filter by (e.g. literal) - * @param string $lang The language to filter by (e.g. en) - * @return integer The number of values for this property - */ - public function countValues($resource, $property, $type = null, $lang = null) - { - return count($this->all($resource, $property, $type, $lang)); - } - - /** Concatenate all values for a property of a resource into a string. - * - * The default is to join the values together with a space character. - * This method will return an empty string if the property does not exist. - * - * @param mixed $resource The resource to get the property on - * @param string $property The name of the property (e.g. foaf:name) - * @param string $glue The string to glue the values together with. - * @param string $lang The language to filter by (e.g. en) - * @return string Concatenation of all the values. - */ - public function join($resource, $property, $glue = ' ', $lang = null) - { - return join($glue, $this->all($resource, $property, 'literal', $lang)); - } - - /** Add data to the graph - * - * The resource can either be a resource or the URI of a resource. - * - * Example: - * $graph->add("http://www.example.com", 'dc:title', 'Title of Page'); - * - * @param mixed $resource The resource to add data to - * @param mixed $property The property name - * @param mixed $value The new value for the property - * @return integer The number of values added (1 or 0) - */ - public function add($resource, $property, $value) - { - $this->checkResourceParam($resource); - $this->checkSinglePropertyParam($property, $inverse); - $this->checkValueParam($value); - - // No value given? - if ($value === null) { - return 0; - } - - // Check that the value doesn't already exist - if (isset($this->index[$resource][$property])) { - foreach ($this->index[$resource][$property] as $v) { - if ($v == $value) { - return 0; - } - } - } - $this->index[$resource][$property][] = $value; - - // Add to the reverse index if it is a resource - if ($value['type'] == 'uri' or $value['type'] == 'bnode') { - $uri = $value['value']; - $this->revIndex[$uri][$property][] = array( - 'type' => substr($resource, 0, 2) == '_:' ? 'bnode' : 'uri', - 'value' => $resource - ); - } - - // Success - return 1; - } - - /** Add a literal value as a property of a resource - * - * The resource can either be a resource or the URI of a resource. - * The value can either be a single value or an array of values. - * - * Example: - * $graph->add("http://www.example.com", 'dc:title', 'Title of Page'); - * - * @param mixed $resource The resource to add data to - * @param mixed $property The property name - * @param mixed $value The value or values for the property - * @param string $lang The language of the literal - * @return integer The number of values added - */ - public function addLiteral($resource, $property, $value, $lang = null) - { - $this->checkResourceParam($resource); - $this->checkSinglePropertyParam($property, $inverse); - - if (is_array($value)) { - $added = 0; - foreach ($value as $v) { - $added += $this->addLiteral($resource, $property, $v, $lang); - } - return $added; - } elseif (!is_object($value) or !$value instanceof EasyRdf_Literal) { - $value = EasyRdf_Literal::create($value, $lang); - } - return $this->add($resource, $property, $value); - } - - /** Add a resource as a property of another resource - * - * The resource can either be a resource or the URI of a resource. - * - * Example: - * $graph->add("http://example.com/bob", 'foaf:knows', 'http://example.com/alice'); - * - * @param mixed $resource The resource to add data to - * @param mixed $property The property name - * @param mixed $resource2 The resource to be value of the property - * @return integer The number of values added - */ - public function addResource($resource, $property, $resource2) - { - $this->checkResourceParam($resource); - $this->checkSinglePropertyParam($property, $inverse); - $this->checkResourceParam($resource2); - - return $this->add( - $resource, - $property, - array( - 'type' => substr($resource2, 0, 2) == '_:' ? 'bnode' : 'uri', - 'value' => $resource2 - ) - ); - } - - /** Set a value for a property - * - * The new value will replace the existing values for the property. - * - * @param string $resource The resource to set the property on - * @param string $property The name of the property (e.g. foaf:name) - * @param mixed $value The value for the property - * @return integer The number of values added (1 or 0) - */ - public function set($resource, $property, $value) - { - $this->checkResourceParam($resource); - $this->checkSinglePropertyParam($property, $inverse); - $this->checkValueParam($value); - - // Delete the old values - $this->delete($resource, $property); - - // Add the new values - return $this->add($resource, $property, $value); - } - - /** Delete a property (or optionally just a specific value) - * - * @param mixed $resource The resource to delete the property from - * @param string $property The name of the property (e.g. foaf:name) - * @param mixed $value The value to delete (null to delete all values) - * @return integer The number of values deleted - */ - public function delete($resource, $property, $value = null) - { - $this->checkResourceParam($resource); - - if (is_object($property) and $property instanceof EasyRdf_Resource) { - return $this->deleteSingleProperty($resource, $property->getUri(), $value); - } elseif (is_string($property) and preg_match('|^(\^?)<(.+)>|', $property, $matches)) { - return $this->deleteSingleProperty($resource, "$matches[1]$matches[2]", $value); - } elseif ($property === null or !is_string($property)) { - throw new InvalidArgumentException( - "\$property should be a string or EasyRdf_Resource and cannot be null" - ); - } elseif ($property === '') { - throw new InvalidArgumentException( - "\$property cannot be an empty string" - ); - } - - // FIXME: finish implementing property paths for delete - return $this->deleteSingleProperty($resource, $property, $value); - } - - - /** Delete a property (or optionally just a specific value) - * - * @param mixed $resource The resource to delete the property from - * @param string $property The name of the property (e.g. foaf:name) - * @param mixed $value The value to delete (null to delete all values) - * @return integer The number of values deleted - * - * @ignore - */ - public function deleteSingleProperty($resource, $property, $value = null) - { - $this->checkResourceParam($resource); - $this->checkSinglePropertyParam($property, $inverse); - $this->checkValueParam($value); - - $count = 0; - if (isset($this->index[$resource][$property])) { - foreach ($this->index[$resource][$property] as $k => $v) { - if (!$value or $v == $value) { - unset($this->index[$resource][$property][$k]); - $count++; - if ($v['type'] == 'uri' or $v['type'] == 'bnode') { - $this->deleteInverse($v['value'], $property, $resource); - } - } - } - - // Clean up the indexes - remove empty properties and resources - if ($count) { - if (count($this->index[$resource][$property]) == 0) { - unset($this->index[$resource][$property]); - } - if (count($this->index[$resource]) == 0) { - unset($this->index[$resource]); - } - } - } - - return $count; - } - - /** Delete a resource from a property of another resource - * - * The resource can either be a resource or the URI of a resource. - * - * Example: - * $graph->delete("http://example.com/bob", 'foaf:knows', 'http://example.com/alice'); - * - * @param mixed $resource The resource to delete data from - * @param mixed $property The property name - * @param mixed $resource2 The resource value of the property to be deleted - */ - public function deleteResource($resource, $property, $resource2) - { - $this->checkResourceParam($resource); - $this->checkSinglePropertyParam($property, $inverse); - $this->checkResourceParam($resource2); - - return $this->delete( - $resource, - $property, - array( - 'type' => substr($resource2, 0, 2) == '_:' ? 'bnode' : 'uri', - 'value' => $resource2 - ) - ); - } - - /** Delete a literal value from a property of a resource - * - * Example: - * $graph->delete("http://www.example.com", 'dc:title', 'Title of Page'); - * - * @param mixed $resource The resource to add data to - * @param mixed $property The property name - * @param mixed $value The value of the property - * @param string $lang The language of the literal - */ - public function deleteLiteral($resource, $property, $value, $lang = null) - { - $this->checkResourceParam($resource); - $this->checkSinglePropertyParam($property, $inverse); - $this->checkValueParam($value); - - if ($lang) { - $value['lang'] = $lang; - } - - return $this->delete($resource, $property, $value); - } - - /** This function is for internal use only. - * - * Deletes an inverse property from a resource. - * - * @ignore - */ - protected function deleteInverse($resource, $property, $value) - { - if (isset($this->revIndex[$resource])) { - foreach ($this->revIndex[$resource][$property] as $k => $v) { - if ($v['value'] === $value) { - unset($this->revIndex[$resource][$property][$k]); - } - } - if (count($this->revIndex[$resource][$property]) == 0) { - unset($this->revIndex[$resource][$property]); - } - if (count($this->revIndex[$resource]) == 0) { - unset($this->revIndex[$resource]); - } - } - } - - /** Check if the graph contains any statements - * - * @return boolean True if the graph contains no statements - */ - public function isEmpty() - { - return count($this->index) == 0; - } - - /** Get a list of all the shortened property names (qnames) for a resource. - * - * This method will return an empty array if the resource has no properties. - * - * @return array Array of shortened URIs - */ - public function properties($resource) - { - $this->checkResourceParam($resource); - - $properties = array(); - if (isset($this->index[$resource])) { - foreach ($this->index[$resource] as $property => $value) { - $short = EasyRdf_Namespace::shorten($property); - if ($short) { - $properties[] = $short; - } - } - } - return $properties; - } - - /** Get a list of the full URIs for the properties of a resource. - * - * This method will return an empty array if the resource has no properties. - * - * @return array Array of full URIs - */ - public function propertyUris($resource) - { - $this->checkResourceParam($resource); - - if (isset($this->index[$resource])) { - return array_keys($this->index[$resource]); - } else { - return array(); - } - } - - /** Get a list of the full URIs for the properties that point to a resource. - * - * @return array Array of full property URIs - */ - public function reversePropertyUris($resource) - { - $this->checkResourceParam($resource); - - if (isset($this->revIndex[$resource])) { - return array_keys($this->revIndex[$resource]); - } else { - return array(); - } - } - - /** Check to see if a property exists for a resource. - * - * This method will return true if the property exists. - * If the value parameter is given, then it will only return true - * if the value also exists for that property. - * - * By providing a value parameter you can use this function to check - * to see if a triple exists in the graph. - * - * @param mixed $resource The resource to check - * @param string $property The name of the property (e.g. foaf:name) - * @param mixed $value An optional value of the property - * @return boolean True if value the property exists. - */ - public function hasProperty($resource, $property, $value = null) - { - $this->checkResourceParam($resource); - $this->checkSinglePropertyParam($property, $inverse); - $this->checkValueParam($value); - - // Use the reverse index if it is an inverse property - if ($inverse) { - $index = &$this->revIndex; - } else { - $index = &$this->index; - } - - if (isset($index[$resource][$property])) { - if (is_null($value)) { - return true; - } else { - foreach ($index[$resource][$property] as $v) { - if ($v == $value) { - return true; - } - } - } - } - - return false; - } - - /** Serialise the graph into RDF - * - * The $format parameter can be an EasyRdf_Format object, a - * format name, a mime type or a file extension. - * - * Example: - * $turtle = $graph->serialise('turtle'); - * - * @param mixed $format The format to serialise to - * @param array $options Serialiser-specific options, for fine-tuning the output - * @return mixed The serialised graph - */ - public function serialise($format, array $options = array()) - { - if (!$format instanceof EasyRdf_Format) { - $format = EasyRdf_Format::getFormat($format); - } - $serialiser = $format->newSerialiser(); - return $serialiser->serialise($this, $format->getName(), $options); - } - - /** Return a human readable view of all the resources in the graph - * - * This method is intended to be a debugging aid and will - * return a pretty-print view of all the resources and their - * properties. - * - * @param string $format Either 'html' or 'text' - * @return string - */ - public function dump($format = 'html') - { - $result = ''; - if ($format == 'html') { - $result .= "
". - "Graph: ". $this->uri . "
\n"; - } else { - $result .= "Graph: ". $this->uri . "\n"; - } - - foreach ($this->index as $resource => $properties) { - $result .= $this->dumpResource($resource, $format); - } - return $result; - } - - /** Return a human readable view of a resource and its properties - * - * This method is intended to be a debugging aid and will - * print a resource and its properties. - * - * @param mixed $resource The resource to dump - * @param string $format Either 'html' or 'text' - * @return string - */ - public function dumpResource($resource, $format = 'html') - { - $this->checkResourceParam($resource, true); - - if (isset($this->index[$resource])) { - $properties = $this->index[$resource]; - } else { - return ''; - } - - $plist = array(); - foreach ($properties as $property => $values) { - $olist = array(); - foreach ($values as $value) { - if ($value['type'] == 'literal') { - $olist []= EasyRdf_Utils::dumpLiteralValue($value, $format, 'black'); - } else { - $olist []= EasyRdf_Utils::dumpResourceValue($value['value'], $format, 'blue'); - } - } - - $pstr = EasyRdf_Namespace::shorten($property); - if ($pstr == null) { - $pstr = $property; - } - if ($format == 'html') { - $plist []= " ". - "". - htmlentities($pstr) . " ". - " ". - join(", ", $olist); - } else { - $plist []= " -> $pstr -> " . join(", ", $olist); - } - } - - if ($format == 'html') { - return "
\n". - "
".EasyRdf_Utils::dumpResourceValue($resource, $format, 'blue')." ". - "(". - $this->classForResource($resource).")
\n". - "
\n". - "
".join("
\n
", $plist)."
". - "
\n"; - } else { - return $resource." (".$this->classForResource($resource).")\n" . - join("\n", $plist) . "\n\n"; - } - } - - /** Get the resource type of the graph - * - * The type will be a shortened URI as a string. - * If the graph has multiple types then the type returned - * may be arbitrary. - * This method will return null if the resource has no type. - * - * @return string A type assocated with the resource (e.g. foaf:Document) - */ - public function type($resource = null) - { - $this->checkResourceParam($resource, true); - - if ($resource) { - $type = $this->get($resource, 'rdf:type', 'resource'); - if ($type) { - return EasyRdf_Namespace::shorten($type); - } - } - - return null; - } - - /** Get the resource type of the graph as a EasyRdf_Resource - * - * If the graph has multiple types then the type returned - * may be arbitrary. - * This method will return null if the resource has no type. - * - * @return object EasyRdf_Resource A type assocated with the resource - */ - public function typeAsResource($resource = null) - { - $this->checkResourceParam($resource, true); - - if ($resource) { - return $this->get($resource, 'rdf:type', 'resource'); - } - - return null; - } - - /** Get a list of types for a resource - * - * The types will each be a shortened URI as a string. - * This method will return an empty array if the resource has no types. - * - * If $resource is null, then it will get the types for the URI of the graph. - * - * @return array All types assocated with the resource (e.g. foaf:Person) - */ - public function types($resource = null) - { - $this->checkResourceParam($resource, true); - - $types = array(); - if ($resource) { - foreach ($this->all($resource, 'rdf:type', 'resource') as $type) { - $types[] = EasyRdf_Namespace::shorten($type); - } - } - - return $types; - } - - /** Check if a resource is of the specified type - * - * @param string $resource The resource to check the type of - * @param string $type The type to check (e.g. foaf:Person) - * @return boolean True if resource is of specified type - */ - public function isA($resource, $type) - { - $this->checkResourceParam($resource, true); - - $type = EasyRdf_Namespace::expand($type); - foreach ($this->all($resource, 'rdf:type', 'resource') as $t) { - if ($t->getUri() == $type) { - return true; - } - } - return false; - } - - /** Add one or more rdf:type properties to a resource - * - * @param string $resource The resource to add the type to - * @param string $types One or more types to add (e.g. foaf:Person) - * @return integer The number of types added - */ - public function addType($resource, $types) - { - $this->checkResourceParam($resource, true); - - if (!is_array($types)) { - $types = array($types); - } - - $count = 0; - foreach ($types as $type) { - $type = EasyRdf_Namespace::expand($type); - $count += $this->add($resource, 'rdf:type', array('type' => 'uri', 'value' => $type)); - } - - return $count; - } - - /** Change the rdf:type property for a resource - * - * Note that if the resource object has already previously - * been created, then the PHP class of the resource will not change. - * - * @param string $resource The resource to change the type of - * @param string $type The new type (e.g. foaf:Person) - * @return integer The number of types added - */ - public function setType($resource, $type) - { - $this->checkResourceParam($resource, true); - - $this->delete($resource, 'rdf:type'); - return $this->addType($resource, $type); - } - - /** Get a human readable label for a resource - * - * This method will check a number of properties for a resource - * (in the order: skos:prefLabel, rdfs:label, foaf:name, dc:title) - * and return an approriate first that is available. If no label - * is available then it will return null. - * - * @return string A label for the resource. - */ - public function label($resource = null, $lang = null) - { - $this->checkResourceParam($resource, true); - - if ($resource) { - return $this->get( - $resource, - 'skos:prefLabel|rdfs:label|foaf:name|rss:title|dc:title|dc11:title', - 'literal', - $lang - ); - } else { - return null; - } - } - - /** Get the primary topic of the graph - * - * @return EasyRdf_Resource The primary topic of the document. - */ - public function primaryTopic($resource = null) - { - $this->checkResourceParam($resource, true); - - if ($resource) { - return $this->get( - $resource, - 'foaf:primaryTopic|^foaf:isPrimaryTopicOf', - 'resource' - ); - } else { - return null; - } - } - - /** Returns the graph as a RDF/PHP associative array - * - * @return array The contents of the graph as an array. - */ - public function toRdfPhp() - { - return $this->index; - } - - /** Calculates the number of triples in the graph - * - * @return integer The number of triples in the graph. - */ - public function countTriples() - { - $count = 0; - foreach ($this->index as $resource) { - foreach ($resource as $property => $values) { - $count += count($values); - } - } - return $count; - } - - /** Magic method to return URI of resource when casted to string - * - * @return string The URI of the resource - */ - public function __toString() - { - return $this->uri == null ? '' : $this->uri; - } - - /** Magic method to get a property of the graph - * - * Note that only properties in the default namespace can be accessed in this way. - * - * Example: - * $value = $graph->title; - * - * @see EasyRdf_Namespace::setDefault() - * @param string $name The name of the property - * @return string A single value for the named property - */ - public function __get($name) - { - return $this->get($this->uri, $name); - } - - /** Magic method to set the value for a property of the graph - * - * Note that only properties in the default namespace can be accessed in this way. - * - * Example: - * $graph->title = 'Title'; - * - * @see EasyRdf_Namespace::setDefault() - * @param string $name The name of the property - * @param string $value The value for the property - */ - public function __set($name, $value) - { - return $this->set($this->uri, $name, $value); - } - - /** Magic method to check if a property exists - * - * Note that only properties in the default namespace can be accessed in this way. - * - * Example: - * if (isset($graph->title)) { blah(); } - * - * @see EasyRdf_Namespace::setDefault() - * @param string $name The name of the property - */ - public function __isset($name) - { - return $this->hasProperty($this->uri, $name); - } - - /** Magic method to delete a property of the graph - * - * Note that only properties in the default namespace can be accessed in this way. - * - * Example: - * unset($graph->title); - * - * @see EasyRdf_Namespace::setDefault() - * @param string $name The name of the property - */ - public function __unset($name) - { - return $this->delete($this->uri, $name); - } -} diff --git a/core/vendor/easyrdf/easyrdf/lib/EasyRdf/GraphStore.php b/core/vendor/easyrdf/easyrdf/lib/EasyRdf/GraphStore.php deleted file mode 100644 index 1909575..0000000 --- a/core/vendor/easyrdf/easyrdf/lib/EasyRdf/GraphStore.php +++ /dev/null @@ -1,215 +0,0 @@ -uri = $uri; - $this->parsedUri = new EasyRdf_ParsedUri($uri); - } - - /** Get the URI of the graph store - * - * @return string The URI of the graph store - */ - public function getUri() - { - return $this->uri; - } - - /** Fetch a named graph from the graph store - * - * The URI can either be a full absolute URI or - * a URI relative to the URI of the graph store. - * - * @param string $uriRef The URI of graph desired - * @return object EasyRdf_Graph The graph requested - */ - public function get($uriRef) - { - $graphUri = $this->parsedUri->resolve($uriRef)->toString(); - $dataUrl = $this->urlForGraph($graphUri); - $graph = new EasyRdf_Graph($graphUri); - $graph->load($dataUrl); - return $graph; - } - - /** Send some graph data to the graph store - * - * This method is used by insert() and replace() - * - * @ignore - */ - protected function sendGraph($method, $graph, $uriRef, $format) - { - if (is_object($graph) and $graph instanceof EasyRdf_Graph) { - if ($uriRef == null) { - $uriRef = $graph->getUri(); - } - $data = $graph->serialise($format); - } else { - $data = $graph; - } - - $formatObj = EasyRdf_Format::getFormat($format); - $mimeType = $formatObj->getDefaultMimeType(); - - $graphUri = $this->parsedUri->resolve($uriRef)->toString(); - $dataUrl = $this->urlForGraph($graphUri); - - $client = EasyRdf_Http::getDefaultHttpClient(); - $client->resetParameters(true); - $client->setUri($dataUrl); - $client->setMethod($method); - $client->setRawData($data); - $client->setHeaders('Content-Type', $mimeType); - $response = $client->request(); - if (!$response->isSuccessful()) { - throw new EasyRdf_Exception( - "HTTP request for $dataUrl failed: ".$response->getMessage() - ); - } - return $response; - } - - /** Replace the contents of a graph in the graph store with new data - * - * The $graph parameter is the EasyRdf_Graph object to be sent to the - * graph store. Alternatively it can be a string, already serialised. - * - * The URI can either be a full absolute URI or - * a URI relative to the URI of the graph store. - * - * The $format parameter can be given to specify the serialisation - * used to send the graph data to the graph store. - * - * @param object EasyRdfGraph $graph The URI of graph desired - * @param string $uriRef The URI of graph to be replaced - * @param string $format The format of the data to send to the graph store - * @return object EasyRdf_Http_Response The response from the graph store - */ - public function replace($graph, $uriRef = null, $format = 'ntriples') - { - return $this->sendGraph('PUT', $graph, $uriRef, $format); - } - - /** Add data to a graph in the graph store - * - * The $graph parameter is the EasyRdf_Graph object to be sent to the - * graph store. Alternatively it can be a string, already serialised. - * - * The URI can either be a full absolute URI or - * a URI relative to the URI of the graph store. - * - * The $format parameter can be given to specify the serialisation - * used to send the graph data to the graph store. - * - * @param object EasyRdfGraph $graph The URI of graph desired - * @param string $uriRef The URI of graph to be added to - * @param string $format The format of the data to send to the graph store - * @return object EasyRdf_Http_Response The response from the graph store - */ - public function insert($graph, $uriRef = null, $format = 'ntriples') - { - return $this->sendGraph('POST', $graph, $uriRef, $format); - } - - /** Delete a graph from the graph store - * - * The URI can either be a full absolute URI or - * a URI relative to the URI of the graph store. - * - * @param string $uriRef The URI of graph to be added to - * @return object EasyRdf_Http_Response The response from the graph store - */ - public function delete($uriRef) - { - $graphUri = $this->parsedUri->resolve($uriRef)->toString(); - $dataUrl = $this->urlForGraph($graphUri); - - $client = EasyRdf_Http::getDefaultHttpClient(); - $client->resetParameters(true); - $client->setUri($dataUrl); - $client->setMethod('DELETE'); - $response = $client->request(); - if (!$response->isSuccessful()) { - throw new EasyRdf_Exception( - "HTTP request to delete $dataUrl failed: ".$response->getMessage() - ); - } - return $response; - } - - /** Work out the full URL for a graph store request. - * by checking if if it is a direct or indirect request. - * @ignore - */ - protected function urlForGraph($url) - { - if (strpos($url, $this->uri) === false) { - $url = $this->uri."?graph=".urlencode($url); - } - return $url; - } - - /** Magic method to return URI of the graph store when casted to string - * - * @return string The URI of the graph store - */ - public function __toString() - { - return empty($this->uri) ? '' : $this->uri; - } -} diff --git a/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Http.php b/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Http.php deleted file mode 100644 index 47e8bdb..0000000 --- a/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Http.php +++ /dev/null @@ -1,82 +0,0 @@ - 5, - 'useragent' => 'EasyRdf_Http_Client', - 'timeout' => 10 - ); - - /** - * Request URI - * - * @var string - */ - private $uri = null; - - /** - * Associative array of request headers - * - * @var array - */ - private $headers = array(); - - /** - * HTTP request method - * - * @var string - */ - private $method = 'GET'; - - /** - * Associative array of GET parameters - * - * @var array - */ - private $paramsGet = array(); - - /** - * The raw post data to send. Could be set by setRawData($data). - * - * @var string - */ - private $rawPostData = null; - - /** - * Redirection counter - * - * @var int - */ - private $redirectCounter = 0; - - /** - * Constructor method. Will create a new HTTP client. Accepts the target - * URL and optionally configuration array. - * - * @param string $uri - * @param array $config Configuration key-value pairs. - */ - public function __construct($uri = null, $config = null) - { - if ($uri !== null) { - $this->setUri($uri); - } - if ($config !== null) { - $this->setConfig($config); - } - } - - /** - * Set the URI for the next request - * - * @param string $uri - * @return EasyRdf_Http_Client - */ - public function setUri($uri) - { - if (!is_string($uri)) { - $uri = strval($uri); - } - - if (!preg_match('/^http(s?):/', $uri)) { - throw new InvalidArgumentException( - "EasyRdf_Http_Client only supports the 'http' and 'https' schemes." - ); - } - - $this->uri = $uri; - - return $this; - } - - /** - * Get the URI for the next request - * - * @return string - */ - public function getUri($asString = true) - { - return $this->uri; - } - - /** - * Set configuration parameters for this HTTP client - * - * @param array $config - * @return EasyRdf_Http_Client - * @throws InvalidArgumentException - */ - public function setConfig($config = array()) - { - if ($config == null or !is_array($config)) { - throw new InvalidArgumentException( - "\$config should be an array and cannot be null" - ); - } - - foreach ($config as $k => $v) { - $this->config[strtolower($k)] = $v; - } - - return $this; - } - - /** - * Set a request header - * - * @param string $name Header name (e.g. 'Accept') - * @param string $value Header value or null - * @return EasyRdf_Http_Client - */ - public function setHeaders($name, $value = null) - { - $normalizedName = strtolower($name); - - // If $value is null or false, unset the header - if ($value === null || $value === false) { - unset($this->headers[$normalizedName]); - } else { - // Else, set the header - $this->headers[$normalizedName] = array($name, $value); - } - - return $this; - } - - /** - * Set the next request's method - * - * Validated the passed method and sets it. - * - * @param string $method - * @return EasyRdf_Http_Client - * @throws InvalidArgumentException - */ - public function setMethod($method) - { - if (!is_string($method) or !preg_match('/^[A-Z]+$/', $method)) { - throw new InvalidArgumentException("Invalid HTTP request method."); - } - - $this->method = $method; - - return $this; - } - - /** - * Get the method for the next request - * - * @return string - */ - public function getMethod() - { - return $this->method; - } - - /** - * Get the value of a specific header - * - * Note that if the header has more than one value, an array - * will be returned. - * - * @param string $key - * @return string|array|null The header value or null if it is not set - */ - public function getHeader($key) - { - $key = strtolower($key); - if (isset($this->headers[$key])) { - return $this->headers[$key][1]; - } else { - return null; - } - } - - /** - * Set a GET parameter for the request. - * - * @param string $name - * @param string $value - * @return EasyRdf_Http_Client - */ - public function setParameterGet($name, $value = null) - { - if ($value === null) { - if (isset($this->paramsGet[$name])) { - unset($this->paramsGet[$name]); - } - } else { - $this->paramsGet[$name] = $value; - } - - return $this; - } - - /** - * Get a GET parameter for the request. - * - * @param string $name - * @return string value - */ - public function getParameterGet($name) - { - if (isset($this->paramsGet[$name])) { - return $this->paramsGet[$name]; - } else { - return null; - } - } - - /** - * Get all the GET parameters - * - * @return array - */ - public function getParametersGet() - { - return $this->paramsGet; - } - - /** - * Get the number of redirections done on the last request - * - * @return int - */ - public function getRedirectionsCount() - { - return $this->redirectCounter; - } - - /** - * Set the raw (already encoded) POST data. - * - * This function is here for two reasons: - * 1. For advanced user who would like to set their own data, already encoded - * 2. For backwards compatibilty: If someone uses the old post($data) method. - * this method will be used to set the encoded data. - * - * $data can also be stream (such as file) from which the data will be read. - * - * @param string|resource $data - * @return Zend_Http_Client - */ - public function setRawData($data) - { - $this->rawPostData = $data; - return $this; - } - - /** - * Get the raw (already encoded) POST data. - * - * @return string - */ - public function getRawData() - { - return $this->rawPostData; - } - - /** - * Clear all GET and POST parameters - * - * Should be used to reset the request parameters if the client is - * used for several concurrent requests. - * - * clearAll parameter controls if we clean just parameters or also - * headers - * - * @param bool $clearAll Should all data be cleared? - * @return EasyRdf_Http_Client - */ - public function resetParameters($clearAll = false) - { - // Reset parameter data - $this->paramsGet = array(); - $this->rawPostData = null; - $this->method = 'GET'; - - if ($clearAll) { - $this->headers = array(); - } else { - // Clear outdated headers - if (isset($this->headers['content-type'])) { - unset($this->headers['content-type']); - } - if (isset($this->headers['content-length'])) { - unset($this->headers['content-length']); - } - } - - return $this; - } - - /** - * Send the HTTP request and return an HTTP response object - * - * @return EasyRdf_Http_Response - * @throws EasyRdf_Exception - */ - public function request($method = null) - { - if (!$this->uri) { - throw new EasyRdf_Exception( - "Set URI before calling EasyRdf_Http_Client->request()" - ); - } - - if ($method) { - $this->setMethod($method); - } - $this->redirectCounter = 0; - $response = null; - - // Send the first request. If redirected, continue. - do { - // Clone the URI and add the additional GET parameters to it - $uri = parse_url($this->uri); - if ($uri['scheme'] === 'http') { - $host = $uri['host']; - } elseif ($uri['scheme'] === 'https') { - $host = 'ssl://'.$uri['host']; - } else { - throw new EasyRdf_Exception( - "Unsupported URI scheme: ".$uri['scheme'] - ); - } - - if (isset($uri['port'])) { - $port = $uri['port']; - } else { - if ($uri['scheme'] === 'https') { - $port = 443; - } else { - $port = 80; - } - } - - if (!empty($this->paramsGet)) { - if (!empty($uri['query'])) { - $uri['query'] .= '&'; - } else { - $uri['query'] = ''; - } - $uri['query'] .= http_build_query($this->paramsGet, null, '&'); - } - - $headers = $this->prepareHeaders($uri['host'], $port); - - // Open socket to remote server - $socket = @fsockopen($host, $port, $errno, $errstr, $this->config['timeout']); - if (!$socket) { - throw new EasyRdf_Exception("Unable to connect to $host:$port ($errstr)"); - } - - // Write the request - $path = $uri['path']; - if (empty($path)) { - $path = '/'; - } - if (isset($uri['query'])) { - $path .= '?' . $uri['query']; - } - fwrite($socket, "{$this->method} {$path} HTTP/1.1\r\n"); - foreach ($headers as $k => $v) { - if (is_string($k)) { - $v = ucfirst($k) . ": $v"; - } - fwrite($socket, "$v\r\n"); - } - fwrite($socket, "\r\n"); - - // Send the request body, if there is one set - if (isset($this->rawPostData)) { - fwrite($socket, $this->rawPostData); - } - - // Read in the response - $content = ''; - while (!feof($socket)) { - $content .= fgets($socket); - } - - // FIXME: support HTTP/1.1 100 Continue - - // Close the socket - @fclose($socket); - - // Parse the response string - $response = EasyRdf_Http_Response::fromString($content); - - // If we got redirected, look for the Location header - if ($response->isRedirect() && - ($location = $response->getHeader('location')) - ) { - - // Avoid problems with buggy servers that add whitespace at the - // end of some headers (See ZF-11283) - $location = trim($location); - - // Some servers return relative URLs in the location header - // resolve it in relation to previous request - $baseUri = new EasyRdf_ParsedUri($this->uri); - $location = $baseUri->resolve($location)->toString(); - - // If it is a 303 then drop the parameters and send a GET request - if ($response->getStatus() == 303) { - $this->resetParameters(); - $this->setMethod('GET'); - } - - // If we got a well formed absolute URI - if (parse_url($location)) { - $this->setHeaders('host', null); - $this->setUri($location); - } else { - throw new EasyRdf_Exception( - "Failed to parse Location header returned by ". - $this->uri - ); - } - ++$this->redirectCounter; - - } else { - // If we didn't get any location, stop redirecting - break; - } - - - } while ($this->redirectCounter < $this->config['maxredirects']); - - return $response; - } - - /** - * Prepare the request headers - * - * @ignore - * @return array - */ - protected function prepareHeaders($host, $port) - { - $headers = array(); - - // Set the host header - if (! isset($this->headers['host'])) { - // If the port is not default, add it - if ($port !== 80 and $port !== 443) { - $host .= ':' . $port; - } - $headers[] = "Host: {$host}"; - } - - // Set the connection header - if (! isset($this->headers['connection'])) { - $headers[] = "Connection: close"; - } - - // Set the user agent header - if (! isset($this->headers['user-agent'])) { - $headers[] = "User-Agent: {$this->config['useragent']}"; - } - - // If we have rawPostData set, set the content-length header - if (isset($this->rawPostData)) { - $headers[] = "Content-Length: ".strlen($this->rawPostData); - } - - // Add all other user defined headers - foreach ($this->headers as $header) { - list($name, $value) = $header; - if (is_array($value)) { - $value = implode(', ', $value); - } - - $headers[] = "$name: $value"; - } - - return $headers; - } -} diff --git a/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Http/Response.php b/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Http/Response.php deleted file mode 100644 index 80edfc2..0000000 --- a/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Http/Response.php +++ /dev/null @@ -1,360 +0,0 @@ -status = intval($status); - $this->body = $body; - $this->version = $version; - $this->message = $message; - - foreach ($headers as $k => $v) { - $k = ucwords(strtolower($k)); - $this->headers[$k] = $v; - } - } - - /** - * Check whether the response in successful - * - * @return boolean - */ - public function isSuccessful() - { - return ($this->status >= 200 && $this->status < 300); - } - - /** - * Check whether the response is an error - * - * @return boolean - */ - public function isError() - { - return ($this->status >= 400 && $this->status < 600); - } - - /** - * Check whether the response is a redirection - * - * @return boolean - */ - public function isRedirect() - { - return ($this->status >= 300 && $this->status < 400); - } - - /** - * Get the HTTP response status code - * - * @return int - */ - public function getStatus() - { - return $this->status; - } - - /** - * Return a message describing the HTTP response code - * (Eg. "OK", "Not Found", "Moved Permanently") - * - * @return string - */ - public function getMessage() - { - return $this->message; - } - - /** - * Get the response body as string - * - * @return string - */ - public function getBody() - { - // Decode the body if it was transfer-encoded - switch (strtolower($this->getHeader('transfer-encoding'))) { - // Handle chunked body - case 'chunked': - return self::decodeChunkedBody($this->body); - break; - - // No transfer encoding, or unknown encoding extension: - // return body as is - default: - return $this->body; - break; - } - } - - /** - * Get the raw response body (as transfered "on wire") as string - * - * If the body is encoded (with Transfer-Encoding, not content-encoding - - * IE "chunked" body), gzip compressed, etc. it will not be decoded. - * - * @return string - */ - public function getRawBody() - { - return $this->body; - } - - /** - * Get the HTTP version of the response - * - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * Get the response headers - * - * @return array - */ - public function getHeaders() - { - return $this->headers; - } - - /** - * Get a specific header as string, or null if it is not set - * - * @param string$header - * @return string|array|null - */ - public function getHeader($header) - { - $header = ucwords(strtolower($header)); - if (array_key_exists($header, $this->headers)) { - return $this->headers[$header]; - } else { - return null; - } - } - - /** - * Get all headers as string - * - * @param boolean $statusLine Whether to return the first status line (ie "HTTP 200 OK") - * @param string $br Line breaks (eg. "\n", "\r\n", "
") - * @return string - */ - public function getHeadersAsString($statusLine = true, $br = "\n") - { - $str = ''; - - if ($statusLine) { - $str = "HTTP/{$this->version} {$this->status} {$this->message}{$br}"; - } - - // Iterate over the headers and stringify them - foreach ($this->headers as $name => $value) { - if (is_string($value)) { - $str .= "{$name}: {$value}{$br}"; - } elseif (is_array($value)) { - foreach ($value as $subval) { - $str .= "{$name}: {$subval}{$br}"; - } - } - } - - return $str; - } - - /** - * Create an EasyRdf_Http_Response object from a HTTP response string - * - * @param string $responseStr - * @return EasyRdf_Http_Response - */ - public static function fromString($responseStr) - { - // First, split body and headers - $matches = preg_split('|(?:\r?\n){2}|m', $responseStr, 2); - if ($matches and sizeof($matches) == 2) { - list ($headerLines, $body) = $matches; - } else { - throw new EasyRdf_Exception( - "Failed to parse HTTP response." - ); - } - - // Split headers part to lines - $headerLines = preg_split('|[\r\n]+|m', $headerLines); - $status = array_shift($headerLines); - if (preg_match("|^HTTP/([\d\.x]+) (\d+) ([^\r\n]+)|", $status, $m)) { - $version = $m[1]; - $status = $m[2]; - $message = $m[3]; - } else { - throw new EasyRdf_Exception( - "Failed to parse HTTP response status line." - ); - } - - // Process the rest of the header lines - $headers = array(); - foreach ($headerLines as $line) { - if (preg_match("|^([\w-]+):\s+(.+)$|", $line, $m)) { - $hName = ucwords(strtolower($m[1])); - $hValue = $m[2]; - - if (isset($headers[$hName])) { - if (! is_array($headers[$hName])) { - $headers[$hName] = array($headers[$hName]); - } - $headers[$hName][] = $hValue; - } else { - $headers[$hName] = $hValue; - } - } - } - - return new EasyRdf_Http_Response($status, $headers, $body, $version, $message); - } - - - /** - * Decode a "chunked" transfer-encoded body and return the decoded text - * - * @param string $body - * @return string - */ - public static function decodeChunkedBody($body) - { - $decBody = ''; - - while (trim($body)) { - if (preg_match("/^([\da-fA-F]+)[^\r\n]*\r\n/sm", $body, $m)) { - $length = hexdec(trim($m[1])); - $cut = strlen($m[0]); - $decBody .= substr($body, $cut, $length); - $body = substr($body, $cut + $length + 2); - } else { - throw new EasyRdf_Exception( - "Failed to decode chunked body in HTTP response." - ); - } - } - - return $decBody; - } - - - /** - * Get the entire response as string - * - * @param string $br Line breaks (eg. "\n", "\r\n", "
") - * @return string - */ - public function asString($br = "\n") - { - return $this->getHeadersAsString(true, $br) . $br . $this->getRawBody(); - } - - /** - * Implements magic __toString() - * - * @return string - */ - public function __toString() - { - return $this->asString(); - } -} diff --git a/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Isomorphic.php b/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Isomorphic.php deleted file mode 100644 index 5b46125..0000000 --- a/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Isomorphic.php +++ /dev/null @@ -1,436 +0,0 @@ - 0 or count($bnodesB > 0)) { - // There are blank nodes - build a bi-jection - return self::buildBijectionTo($statementsA, $bnodesA, $statementsB, $bnodesB); - } else { - // No bnodes and the grounded statements match - return array(); - } - } - - /** - * Count the number of subjects in a graph - * @ignore - */ - private static function countSubjects($graph) - { - return count($graph->toRdfPhp()); - } - - /** - * Check if all the statements in $graphA also appear in $graphB - * @ignore - */ - private static function groundedStatementsMatch($graphA, $graphB, &$bnodes, &$anonStatements) - { - $groundedStatementsMatch = true; - - foreach ($graphA->toRdfPhp() as $subject => $properties) { - if (substr($subject, 0, 2) == '_:') { - array_push($bnodes, $subject); - $subjectIsBnode = true; - } else { - $subjectIsBnode = false; - } - - foreach ($properties as $property => $values) { - foreach ($values as $value) { - if ($value['type'] == 'uri' and substr($value['value'], 0, 2) == '_:') { - array_push($bnodes, $value['value']); - $objectIsBnode = true; - } else { - $objectIsBnode = false; - } - - if ($groundedStatementsMatch and - $subjectIsBnode === false and - $objectIsBnode === false and - $graphB->hasProperty($subject, $property, $value) === false - ) { - $groundedStatementsMatch = false; - } - - if ($subjectIsBnode or $objectIsBnode) { - array_push( - $anonStatements, - array( - array('type' => $subjectIsBnode ? 'bnode' : 'uri', 'value' => $subject), - array('type' => 'uri', 'value' => $property), - $value - ) - ); - } - } - } - } - - return $groundedStatementsMatch; - } - - /** - * The main recursive bijection algorithm. - * - * This algorithm is very similar to the one explained by Jeremy Carroll in - * http://www.hpl.hp.com/techreports/2001/HPL-2001-293.pdf. Page 12 has the - * relevant pseudocode. - * - * @ignore - */ - private static function buildBijectionTo - ( - $statementsA, - $nodesA, - $statementsB, - $nodesB, - $groundedHashesA = array(), - $groundedHashesB = array() - ) { - - // Create a hash signature of every node, based on the signature of - // statements it exists in. - // We also save hashes of nodes that cannot be reliably known; we will use - // that information to eliminate possible recursion combinations. - // - // Any mappings given in the method parameters are considered grounded. - list($hashesA, $ungroundedHashesA) = self::hashNodes($statementsA, $nodesA, $groundedHashesA); - list($hashesB, $ungroundedHashesB) = self::hashNodes($statementsB, $nodesB, $groundedHashesB); - - // Grounded hashes are built at the same rate between the two graphs (if - // they are isomorphic). If there exists a grounded node in one that is - // not in the other, we can just return. Ungrounded nodes might still - // conflict, so we don't check them. This is a little bit messy in the - // middle of the method, and probably slows down isomorphic checks, but - // prevents almost-isomorphic cases from getting nutty. - foreach ($hashesA as $nodeA => $hashA) { - if (!in_array($hashA, $hashesB)) { - return null; - } - } - foreach ($hashesB as $nodeB => $hashB) { - if (!in_array($hashB, $hashesA)) { - return null; - } - } - - // Using the created hashes, map nodes to other_nodes - // Ungrounded hashes will also be equal, but we keep the distinction - // around for when we recurse later (we only recurse on ungrounded nodes) - $bijection = array(); - foreach ($nodesA as $nodeA) { - $foundNode = null; - foreach ($ungroundedHashesB as $nodeB => $hashB) { - if ($ungroundedHashesA[$nodeA] == $hashB) { - $foundNode = $nodeB; - } - } - - if ($foundNode) { - $bijection[$nodeA] = $foundNode; - - // Deletion is required to keep counts even; two nodes with identical - // signatures can biject to each other at random. - unset($ungroundedHashesB[$foundNode]); - } - } - - // bijection is now a mapping of nodes to other_nodes. If all are - // accounted for on both sides, we have a bijection. - // - // If not, we will speculatively mark pairs with matching ungrounded - // hashes as bijected and recurse. - $bijectionA = array_keys($bijection); - $bijectionB = array_values($bijection); - sort($bijectionA); - sort($nodesA); - sort($bijectionB); - sort($nodesB); - if ($bijectionA != $nodesA or $bijectionB != $nodesB) { - $bijection = null; - - foreach ($nodesA as $nodeA) { - - // We don't replace grounded nodes' hashes - if (isset($hashesA[$nodeA])) { - continue; - } - - foreach ($nodesB as $nodeB) { - // We don't replace grounded nodesB's hashes - if (isset($hashesB[$nodeB])) { - continue; - } - - // The ungrounded signature must match for this to potentially work - if ($ungroundedHashesA[$nodeA] != $ungroundedHashesB[$nodeB]) { - continue; - } - - $hash = sha1($nodeA); - $hashesA[$nodeA] = $hash; - $hashesB[$nodeB] = $hash; - $bijection = self::buildBijectionTo( - $statementsA, - $nodesA, - $statementsB, - $nodesA, - $hashesA, - $hashesB - ); - } - } - } - - return $bijection; - } - - /** - * Given a set of statements, create a mapping of node => SHA1 for a given - * set of blank nodes. grounded_hashes is a mapping of node => SHA1 pairs - * that we will take as a given, and use those to make more specific - * signatures of other nodes. - * - * Returns a tuple of associative arrats: one of grounded hashes, and one of all - * hashes. grounded hashes are based on non-blank nodes and grounded blank - * nodes, and can be used to determine if a node's signature matches - * another. - * - * @ignore - */ - private static function hashNodes($statements, $nodes, $groundedHahes) - { - $hashes = $groundedHahes; - $ungroundedHashes = array(); - $hashNeeded = true; - - // We may have to go over the list multiple times. If a node is marked as - // grounded, other nodes can then use it to decide their own state of - // grounded. - while ($hashNeeded) { - $startingGroundedNodes = count($hashes); - foreach ($nodes as $node) { - if (!isset($hashes[$node])) { - $hash = self::nodeHashFor($node, $statements, $hashes); - if (self::nodeIsGrounded($node, $statements, $hashes)) { - $hashes[$node] = $hash; - } - } - $ungroundedHashes[$node] = $hash; - } - - // after going over the list, any nodes with a unique hash can be marked - // as grounded, even if we have not tied them back to a root yet. - $uniques = array(); - foreach ($ungroundedHashes as $node => $hash) { - $uniques[$hash] = isset($uniques[$hash]) ? false : $node; - } - foreach ($uniques as $hash => $node) { - if ($node) { - $hashes[$node] = $hash; - } - } - $hashNeeded = ($startingGroundedNodes != count($hashes)); - } - - return array($hashes, $ungroundedHashes); - } - - /** - * Generate a hash for a node based on the signature of the statements it - * appears in. Signatures consist of grounded elements in statements - * associated with a node, that is, anything but an ungrounded anonymous - * node. Creating the hash is simply hashing a sorted list of each - * statement's signature, which is itself a concatenation of the string form - * of all grounded elements. - * - * Nodes other than the given node are considered grounded if they are a - * member in the given hash. - * - * Returns a tuple consisting of grounded being true or false and the string - * for the hash - * - * @ignore - */ - private static function nodeHashFor($node, $statements, $hashes) - { - $statement_signatures = array(); - foreach ($statements as $statement) { - foreach ($statement as $n) { - if ($n['type'] != 'literal' and $n['value'] == $node) { - array_push( - $statement_signatures, - self::hashStringFor($statement, $hashes, $node) - ); - } - } - } - - // Note that we sort the signatures--without a canonical ordering, - // we might get different hashes for equivalent nodes - sort($statement_signatures); - - // Convert statements into one long string and hash it - return sha1(implode('', $statement_signatures)); - } - - /** - * Returns true if a given node is grounded - * A node is groundd if it is not a blank node or it is included - * in the given mapping of grounded nodes. - * - * @ignore - */ - private static function nodeIsGrounded($node, $statements, $hashes) - { - $grounded = true; - foreach ($statements as $statement) { - if (in_array($node, $statement)) { - foreach ($statement as $resource) { - if ($node['type'] != 'bnode' or - isset($hashes[$node['value']]) or - $resource == $node - ) { - $grounded = false; - } - } - } - } - return $grounded; - } - - /** - * Provide a string signature for the given statement, collecting - * string signatures for grounded node elements. - * - * @ignore - */ - private static function hashStringFor($statement, $hashes, $node) - { - $str = ""; - foreach ($statement as $r) { - $str .= self::stringForNode($r, $hashes, $node); - } - return $str; - } - - /** - * Provides a string for the given node for use in a string signature - * Non-anonymous nodes will return their string form. Grounded anonymous - * nodes will return their hashed form. - * - * @ignore - */ - private static function stringForNode($node, $hashes, $target) - { - if (is_null($node)) { - return ""; - } elseif ($node['type'] == 'bnode') { - if ($node['value'] == $target) { - return "itself"; - } elseif (isset($hashes[$node['value']])) { - return $hashes[$node['value']]; - } else { - return "a blank node"; - } - } else { - $s = new EasyRdf_Serialiser_Ntriples(); - return $s->serialiseValue($node); - } - } -} diff --git a/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Literal.php b/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Literal.php deleted file mode 100644 index 8030e4e..0000000 --- a/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Literal.php +++ /dev/null @@ -1,327 +0,0 @@ -value = $value; - $this->lang = $lang ? $lang : null; - $this->datatype = $datatype ? $datatype : null; - - if ($this->datatype) { - if (is_object($this->datatype)) { - // Convert objects to strings - $this->datatype = strval($this->datatype); - } else { - // Expand shortened URIs (CURIEs) - $this->datatype = EasyRdf_Namespace::expand($this->datatype); - } - - // Literals can not have both a language and a datatype - $this->lang = null; - } else { - // Set the datatype based on the subclass - $class = get_class($this); - if (isset(self::$classMap[$class])) { - $this->datatype = self::$classMap[$class]; - $this->lang = null; - } - } - - // Cast value to string - settype($this->value, 'string'); - } - - /** Returns the value of the literal. - * - * @return string Value of this literal. - */ - public function getValue() - { - return $this->value; - } - - /** Returns the full datatype URI of the literal. - * - * @return string Datatype URI of this literal. - */ - public function getDatatypeUri() - { - return $this->datatype; - } - - /** Returns the shortened datatype URI of the literal. - * - * @return string Datatype of this literal (e.g. xsd:integer). - */ - public function getDatatype() - { - if ($this->datatype) { - return EasyRdf_Namespace::shorten($this->datatype); - } else { - return null; - } - } - - /** Returns the language of the literal. - * - * @return string Language of this literal. - */ - public function getLang() - { - return $this->lang; - } - - /** Returns the properties of the literal as an associative array - * - * For example: - * array('type' => 'literal', 'value' => 'string value') - * - * @return array The properties of the literal - */ - public function toRdfPhp() - { - $array = array( - 'type' => 'literal', - 'value' => $this->value - ); - - if ($this->datatype) { - $array['datatype'] = $this->datatype; - } - - if ($this->lang) { - $array['lang'] = $this->lang; - } - - return $array; - } - - /** Magic method to return the value of a literal as a string - * - * @return string The value of the literal - */ - public function __toString() - { - return isset($this->value) ? $this->value : ''; - } - - /** Return pretty-print view of the literal - * - * @param string $format Either 'html' or 'text' - * @param string $color The colour of the text - * @return string - */ - public function dumpValue($format = 'html', $color = 'black') - { - return EasyRdf_Utils::dumpLiteralValue($this, $format, $color); - } -} - -/* - Register default set of datatype classes -*/ - -EasyRdf_Literal::setDatatypeMapping('xsd:boolean', 'EasyRdf_Literal_Boolean'); -EasyRdf_Literal::setDatatypeMapping('xsd:date', 'EasyRdf_Literal_Date'); -EasyRdf_Literal::setDatatypeMapping('xsd:dateTime', 'EasyRdf_Literal_DateTime'); -EasyRdf_Literal::setDatatypeMapping('xsd:decimal', 'EasyRdf_Literal_Decimal'); -EasyRdf_Literal::setDatatypeMapping('xsd:hexBinary', 'EasyRdf_Literal_HexBinary'); -EasyRdf_Literal::setDatatypeMapping('rdf:HTML', 'EasyRdf_Literal_HTML'); -EasyRdf_Literal::setDatatypeMapping('xsd:integer', 'EasyRdf_Literal_Integer'); -EasyRdf_Literal::setDatatypeMapping('rdf:XMLLiteral', 'EasyRdf_Literal_XML'); diff --git a/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Literal/Boolean.php b/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Literal/Boolean.php deleted file mode 100644 index d8ca2ed..0000000 --- a/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Literal/Boolean.php +++ /dev/null @@ -1,93 +0,0 @@ -value) === 'true' or $this->value === '1'; - } - - /** Return true if the value of the literal is 'true' or '1' - * - * @return bool - */ - public function isTrue() - { - return strtolower($this->value) === 'true' or $this->value === '1'; - } - - /** Return true if the value of the literal is 'false' or '0' - * - * @return bool - */ - public function isFalse() - { - return strtolower($this->value) === 'false' or $this->value === '0'; - } -} diff --git a/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Literal/Date.php b/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Literal/Date.php deleted file mode 100644 index 0e05acf..0000000 --- a/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Literal/Date.php +++ /dev/null @@ -1,137 +0,0 @@ -format('Y-m-d'); - } - - parent::__construct($value, null, $datatype); - } - - /** Parses a string using DateTime and creates a new literal - * - * Example: - * $date = EasyRdf_Literal_Date::parse('1 January 2011'); - * - * @see DateTime - * @param string $value The date to parse - * @return object EasyRdf_Literal_Date - */ - public static function parse($value) - { - $value = new DateTime($value); - return new EasyRdf_Literal_Date($value); - } - - /** Returns the date as a PHP DateTime object - * - * @see DateTime::format - * @return string - */ - public function getValue() - { - return new DateTime($this->value); - } - - /** Returns date formatted according to given format - * - * @see DateTime::format - * @param string $format - * @return string - */ - public function format($format) - { - return $this->getValue()->format($format); - } - - /** A full integer representation of the year, 4 digits - * - * @return integer - */ - public function year() - { - return (int)$this->format('Y'); - } - - /** Integer representation of the month - * - * @return integer - */ - public function month() - { - return (int)$this->format('m'); - } - - /** Integer representation of the day of the month - * - * @return integer - */ - public function day() - { - return (int)$this->format('d'); - } -} diff --git a/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Literal/DateTime.php b/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Literal/DateTime.php deleted file mode 100644 index c1c602d..0000000 --- a/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Literal/DateTime.php +++ /dev/null @@ -1,117 +0,0 @@ -format(DateTime::ATOM); - $value = preg_replace('/[\+\-]00(\:?)00$/', 'Z', $atom); - } - - EasyRdf_Literal::__construct($value, null, $datatype); - } - - /** Parses a string using DateTime and creates a new literal - * - * Example: - * $dt = EasyRdf_Literal_DateTime::parse('Mon 18 Jul 2011 18:45:43 BST'); - * - * @see DateTime - * @param string $value The date and time to parse - * @return object EasyRdf_Literal_DateTime - */ - public static function parse($value) - { - $value = new DateTime($value); - return new EasyRdf_Literal_DateTime($value); - } - - /** 24-hour format of the hour as an integer - * - * @return integer - */ - public function hour() - { - return (int)$this->format('H'); - } - - /** The minutes pasts the hour as an integer - * - * @return integer - */ - public function min() - { - return (int)$this->format('i'); - } - - /** The seconds pasts the minute as an integer - * - * @return integer - */ - public function sec() - { - return (int)$this->format('s'); - } -} diff --git a/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Literal/Decimal.php b/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Literal/Decimal.php deleted file mode 100644 index 59b2cd1..0000000 --- a/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Literal/Decimal.php +++ /dev/null @@ -1,68 +0,0 @@ -value; - } -} diff --git a/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Literal/HTML.php b/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Literal/HTML.php deleted file mode 100644 index a4915b7..0000000 --- a/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Literal/HTML.php +++ /dev/null @@ -1,70 +0,0 @@ -value, $allowableTags); - } -} diff --git a/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Literal/HexBinary.php b/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Literal/HexBinary.php deleted file mode 100644 index 75ed24e..0000000 --- a/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Literal/HexBinary.php +++ /dev/null @@ -1,89 +0,0 @@ -value); - } -} diff --git a/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Literal/Integer.php b/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Literal/Integer.php deleted file mode 100644 index 47de413..0000000 --- a/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Literal/Integer.php +++ /dev/null @@ -1,68 +0,0 @@ -value; - } -} diff --git a/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Literal/XML.php b/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Literal/XML.php deleted file mode 100644 index 3f8dd79..0000000 --- a/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Literal/XML.php +++ /dev/null @@ -1,71 +0,0 @@ -loadXML($this->value); - return $dom; - } -} diff --git a/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Namespace.php b/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Namespace.php deleted file mode 100644 index 353d3ba..0000000 --- a/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Namespace.php +++ /dev/null @@ -1,350 +0,0 @@ - 'http://purl.org/ontology/bibo/', - 'cc' => 'http://creativecommons.org/ns#', - 'cert' => 'http://www.w3.org/ns/auth/cert#', - 'ctag' => 'http://commontag.org/ns#', - 'dc' => 'http://purl.org/dc/terms/', - 'dc11' => 'http://purl.org/dc/elements/1.1/', - 'dcterms' => 'http://purl.org/dc/terms/', - 'doap' => 'http://usefulinc.com/ns/doap#', - 'exif' => 'http://www.w3.org/2003/12/exif/ns#', - 'foaf' => 'http://xmlns.com/foaf/0.1/', - 'geo' => 'http://www.w3.org/2003/01/geo/wgs84_pos#', - 'gr' => 'http://purl.org/goodrelations/v1#', - 'grddl' => 'http://www.w3.org/2003/g/data-view#', - 'ical' => 'http://www.w3.org/2002/12/cal/icaltzd#', - 'ma' => 'http://www.w3.org/ns/ma-ont#', - 'og' => 'http://ogp.me/ns#', - 'owl' => 'http://www.w3.org/2002/07/owl#', - 'rdf' => 'http://www.w3.org/1999/02/22-rdf-syntax-ns#', - 'rdfa' => 'http://www.w3.org/ns/rdfa#', - 'rdfs' => 'http://www.w3.org/2000/01/rdf-schema#', - 'rev' => 'http://purl.org/stuff/rev#', - 'rif' => 'http://www.w3.org/2007/rif#', - 'rss' => 'http://purl.org/rss/1.0/', - 'schema' => 'http://schema.org/', - 'sioc' => 'http://rdfs.org/sioc/ns#', - 'skos' => 'http://www.w3.org/2004/02/skos/core#', - 'skosxl' => 'http://www.w3.org/2008/05/skos-xl#', - 'synd' => 'http://purl.org/rss/1.0/modules/syndication/', - 'v' => 'http://rdf.data-vocabulary.org/#', - 'vcard' => 'http://www.w3.org/2006/vcard/ns#', - 'void' => 'http://rdfs.org/ns/void#', - 'wdr' => 'http://www.w3.org/2007/05/powder#', - 'wdrs' => 'http://www.w3.org/2007/05/powder-s#', - 'wot' => 'http://xmlns.com/wot/0.1/', - 'xhv' => 'http://www.w3.org/1999/xhtml/vocab#', - 'xml' => 'http://www.w3.org/XML/1998/namespace', - 'xsd' => 'http://www.w3.org/2001/XMLSchema#', - ); - - private static $default = null; - - /** Counter for numbering anonymous namespaces */ - private static $anonymousNamespaceCount = 0; - - /** - * Return all the namespaces registered - * - * @return array Associative array of all the namespaces. - */ - public static function namespaces() - { - return self::$namespaces; - } - - /** - * Return a namespace given its prefix. - * - * @param string $prefix The namespace prefix (eg 'foaf') - * @return string The namespace URI (eg 'http://xmlns.com/foaf/0.1/') - */ - public static function get($prefix) - { - if (!is_string($prefix) or $prefix === null or $prefix === '') { - throw new InvalidArgumentException( - "\$prefix should be a string and cannot be null or empty" - ); - } - - if (preg_match('/\W/', $prefix)) { - throw new InvalidArgumentException( - "\$prefix should only contain alpha-numeric characters" - ); - } - - $prefix = strtolower($prefix); - if (array_key_exists($prefix, self::$namespaces)) { - return self::$namespaces[$prefix]; - } else { - return null; - } - } - - /** - * Register a new namespace. - * - * @param string $prefix The namespace prefix (eg 'foaf') - * @param string $long The namespace URI (eg 'http://xmlns.com/foaf/0.1/') - */ - public static function set($prefix, $long) - { - if (!is_string($prefix) or $prefix === null or $prefix === '') { - throw new InvalidArgumentException( - "\$prefix should be a string and cannot be null or empty" - ); - } - - if (preg_match('/\W/', $prefix)) { - throw new InvalidArgumentException( - "\$prefix should only contain alpha-numeric characters" - ); - } - - if (!is_string($long) or $long === null or $long === '') { - throw new InvalidArgumentException( - "\$long should be a string and cannot be null or empty" - ); - } - - $prefix = strtolower($prefix); - self::$namespaces[$prefix] = $long; - } - - /** - * Get the default namespace - * - * Returns the URI of the default namespace or null - * if no default namespace is defined. - * - * @return string The URI of the default namespace - */ - public static function getDefault() - { - return self::$default; - } - - /** - * Set the default namespace - * - * Set the default namespace to either a URI or the prefix of - * an already defined namespace. - * - * Example: - * EasyRdf_Namespace::setDefault('http://schema.org/'); - * - * @param string $namespace The URI or prefix of a namespace (eg 'og') - */ - public static function setDefault($namespace) - { - if (is_null($namespace) or $namespace === '') { - self::$default = null; - } elseif (preg_match("/^\w+$/", $namespace)) { - if (isset(self::$namespaces[$namespace])) { - self::$default = self::$namespaces[$namespace]; - } else { - throw new InvalidArgumentException( - "Unable to set default namespace to unknown prefix: $namespace" - ); - } - } else { - self::$default = $namespace; - } - } - - /** - * Delete an existing namespace. - * - * @param string $prefix The namespace prefix (eg 'foaf') - */ - public static function delete($prefix) - { - if (!is_string($prefix) or $prefix === null or $prefix === '') { - throw new InvalidArgumentException( - "\$prefix should be a string and cannot be null or empty" - ); - } - - $prefix = strtolower($prefix); - if (isset(self::$namespaces[$prefix])) { - unset(self::$namespaces[$prefix]); - } - } - - /** - * Delete the anonymous namespaces and reset the counter to 0 - */ - public static function reset() - { - while (self::$anonymousNamespaceCount > 0) { - self::delete('ns'.(self::$anonymousNamespaceCount-1)); - self::$anonymousNamespaceCount--; - } - } - - /** - * Try and breakup a URI into a prefix and local part - * - * If $createNamespace is true, and the URI isn't part of an existing - * namespace, then EasyRdf will attempt to create a new namespace and - * return the name of the new prefix (for example 'ns0', 'term'). - * - * If it isn't possible to split the URI, then null will be returned. - * - * @param string $uri The full URI (eg 'http://xmlns.com/foaf/0.1/name') - * @param bool $createNamespace If true, a new namespace will be created - * @return array The split URI (eg 'foaf', 'name') or null - */ - public static function splitUri($uri, $createNamespace = false) - { - if ($uri === null or $uri === '') { - throw new InvalidArgumentException( - "\$uri cannot be null or empty" - ); - } - - if (is_object($uri) and ($uri instanceof EasyRdf_Resource)) { - $uri = $uri->getUri(); - } elseif (!is_string($uri)) { - throw new InvalidArgumentException( - "\$uri should be a string or EasyRdf_Resource" - ); - } - - foreach (self::$namespaces as $prefix => $long) { - if (substr($uri, 0, strlen($long)) == $long) { - return array($prefix, substr($uri, strlen($long))); - } - } - - if ($createNamespace) { - // Try and create a new namespace - # FIXME: check the valid characters for an XML element name - if (preg_match("/^(.+?)([\w\-]+)$/", $uri, $matches)) { - $prefix = "ns".(self::$anonymousNamespaceCount++); - self::set($prefix, $matches[1]); - return array($prefix, $matches[2]); - } - } - - return null; - } - - /** - * Return the prefix namespace that a URI belongs to. - * - * @param string $uri A full URI (eg 'http://xmlns.com/foaf/0.1/name') - * @return string The prefix namespace that it is a part of(eg 'foaf') - */ - public static function prefixOfUri($uri) - { - if ($parts = self::splitUri($uri)) { - return $parts[0]; - } - } - - /** - * Shorten a URI by substituting in the namespace prefix. - * - * If $createNamespace is true, and the URI isn't part of an existing - * namespace, then EasyRdf will attempt to create a new namespace and - * use that namespace to shorten the URI (for example ns0:term). - * - * If it isn't possible to shorten the URI, then null will be returned. - * - * @param string $uri The full URI (eg 'http://xmlns.com/foaf/0.1/name') - * @param bool $createNamespace If true, a new namespace will be created - * @return string The shortened URI (eg 'foaf:name') or null - */ - public static function shorten($uri, $createNamespace = false) - { - if ($parts = self::splitUri($uri, $createNamespace)) { - return implode(':', $parts); - } - } - - /** - * Expand a shortened URI (qname) back into a full URI. - * - * If it isn't possible to expand the qname, for example if the namespace - * isn't registered, then the original string will be returned. - * - * @param string $shortUri The short URI (eg 'foaf:name') - * @return string The full URI (eg 'http://xmlns.com/foaf/0.1/name') - */ - public static function expand($shortUri) - { - if (!is_string($shortUri) or $shortUri === '') { - throw new InvalidArgumentException( - "\$shortUri should be a string and cannot be null or empty" - ); - } - - if ($shortUri === 'a') { - return self::$namespaces['rdf'] . 'type'; - } elseif (preg_match("/^(\w+?):([\w\-]+)$/", $shortUri, $matches)) { - $long = self::get($matches[1]); - if ($long) { - return $long . $matches[2]; - } - } elseif (preg_match("/^(\w+)$/", $shortUri) and isset(self::$default)) { - return self::$default . $shortUri; - } - - return $shortUri; - } -} diff --git a/core/vendor/easyrdf/easyrdf/lib/EasyRdf/ParsedUri.php b/core/vendor/easyrdf/easyrdf/lib/EasyRdf/ParsedUri.php deleted file mode 100644 index 0b8dd47..0000000 --- a/core/vendor/easyrdf/easyrdf/lib/EasyRdf/ParsedUri.php +++ /dev/null @@ -1,340 +0,0 @@ -scheme = isset($matches[2]) ? $matches[2] : ''; - } - if (!empty($matches[3])) { - $this->authority = isset($matches[4]) ? $matches[4] : ''; - } - $this->path = isset($matches[5]) ? $matches[5] : ''; - if (!empty($matches[6])) { - $this->query = isset($matches[7]) ? $matches[7] : ''; - } - if (!empty($matches[8])) { - $this->fragment = isset($matches[9]) ? $matches[9] : ''; - } - } - } elseif (is_array($uri)) { - $this->scheme = isset($uri['scheme']) ? $uri['scheme'] : null; - $this->authority = isset($uri['authority']) ? $uri['authority'] : null; - $this->path = isset($uri['path']) ? $uri['path'] : null; - $this->query = isset($uri['query']) ? $uri['query'] : null; - $this->fragment = isset($uri['fragment']) ? $uri['fragment'] : null; - } - } - - - /** Returns true if this is an absolute (complete) URI - * @return boolean - */ - public function isAbsolute() - { - return $this->scheme !== null; - } - - /** Returns true if this is an relative (partial) URI - * @return boolean - */ - public function isRelative() - { - return $this->scheme === null; - } - - /** Returns the scheme of the URI (e.g. http) - * @return string - */ - public function getScheme() - { - return $this->scheme; - } - - /** Sets the scheme of the URI (e.g. http) - * @param string $scheme The new value for the scheme of the URI - */ - public function setScheme($scheme) - { - $this->scheme = $scheme; - } - - /** Returns the authority of the URI (e.g. www.example.com:8080) - * @return string - */ - public function getAuthority() - { - return $this->authority; - } - - /** Sets the authority of the URI (e.g. www.example.com:8080) - * @param string $authority The new value for the authority component of the URI - */ - public function setAuthority($authority) - { - $this->authority = $authority; - } - - /** Returns the path of the URI (e.g. /foo/bar) - * @return string - */ - public function getPath() - { - return $this->path; - } - - /** Set the path of the URI (e.g. /foo/bar) - * @param string $path The new value for the path component of the URI - */ - public function setPath($path) - { - $this->path = $path; - } - - /** Returns the query string part of the URI (e.g. foo=bar) - * @return string - */ - public function getQuery() - { - return $this->query; - } - - /** Set the query string of the URI (e.g. foo=bar) - * @param string $query The new value for the query string component of the URI - */ - public function setQuery($query) - { - $this->query = $query; - } - - /** Returns the fragment part of the URI (i.e. after the #) - * @return string - */ - public function getFragment() - { - return $this->fragment; - } - - /** Set the fragment of the URI (i.e. after the #) - * @param string $fragment The new value for the fragment component of the URI - */ - public function setFragment($fragment) - { - $this->fragment = $fragment; - } - - - /** - * Normalises the path of this URI if it has one. Normalising a path means - * that any unnecessary '.' and '..' segments are removed. For example, the - * URI http://example.com/a/b/../c/./d would be normalised to - * http://example.com/a/c/d - * - * @return object EasyRdf_ParsedUri - */ - public function normalise() - { - if (empty($this->path)) { - return $this; - } - - // Remove ./ from the start - if (substr($this->path, 0, 2) == './') { - // Remove both characters - $this->path = substr($this->path, 2); - } - - // Remove /. from the end - if (substr($this->path, -2) == '/.') { - // Remove only the last dot, not the slash! - $this->path = substr($this->path, 0, -1); - } - - if (substr($this->path, -3) == '/..') { - $this->path .= '/'; - } - - // Split the path into its segments - $segments = explode('/', $this->path); - $newSegments = array(); - - // Remove all unnecessary '.' and '..' segments - foreach ($segments as $segment) { - if ($segment == '..') { - // Remove the previous part of the path - $count = count($newSegments); - if ($count > 0 && $newSegments[$count-1]) { - array_pop($newSegments); - } - } elseif ($segment == '.') { - // Ignore - continue; - } else { - array_push($newSegments, $segment); - } - } - - // Construct the new normalised path - $this->path = implode($newSegments, '/'); - - // Allow easy chaining of methods - return $this; - } - - /** - * Resolves a relative URI using this URI as the base URI. - */ - public function resolve($relUri) - { - // If it is a string, then convert it to a parsed object - if (is_string($relUri)) { - $relUri = new EasyRdf_ParsedUri($relUri); - } - - // This code is based on the pseudocode in section 5.2.2 of RFC3986 - $target = new EasyRdf_ParsedUri(); - if ($relUri->scheme) { - $target->scheme = $relUri->scheme; - $target->authority = $relUri->authority; - $target->path = $relUri->path; - $target->query = $relUri->query; - } else { - if ($relUri->authority) { - $target->authority = $relUri->authority; - $target->path = $relUri->path; - $target->query = $relUri->query; - } else { - if (empty($relUri->path)) { - $target->path = $this->path; - if ($relUri->query) { - $target->query = $relUri->query; - } else { - $target->query = $this->query; - } - } else { - if (substr($relUri->path, 0, 1) == '/') { - $target->path = $relUri->path; - } else { - $path = $this->path; - $lastSlash = strrpos($path, '/'); - if ($lastSlash !== false) { - $path = substr($path, 0, $lastSlash + 1); - } else { - $path = '/'; - } - - $target->path .= $path . $relUri->path; - } - $target->query = $relUri->query; - } - $target->authority = $this->authority; - } - $target->scheme = $this->scheme; - } - - $target->fragment = $relUri->fragment; - - $target->normalise(); - - return $target; - } - - /** Convert the parsed URI back into a string - * - * @return string The URI as a string - */ - public function toString() - { - $str = ''; - if ($this->scheme !== null) { - $str .= $this->scheme . ':'; - } - if ($this->authority !== null) { - $str .= '//' . $this->authority; - } - $str .= $this->path; - if ($this->query !== null) { - $str .= '?' . $this->query; - } - if ($this->fragment !== null) { - $str .= '#' . $this->fragment; - } - return $str; - } - - /** Magic method to convert the URI, when casted, back to a string - * - * @return string The URI as a string - */ - public function __toString() - { - return $this->toString(); - } -} diff --git a/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Parser.php b/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Parser.php deleted file mode 100644 index b15b449..0000000 --- a/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Parser.php +++ /dev/null @@ -1,149 +0,0 @@ -bnodeMap[$name])) { - $this->bnodeMap[$name] = $this->graph->newBNodeId(); - } - return $this->bnodeMap[$name]; - } - - /** - * Delete the bnode mapping - to be called at the start of a new parse - * @ignore - */ - protected function resetBnodeMap() - { - $this->bnodeMap = array(); - } - - /** - * Check, cleanup parameters and prepare for parsing - * @ignore - */ - protected function checkParseParams($graph, $data, $format, $baseUri) - { - if ($graph == null or !is_object($graph) or - !($graph instanceof EasyRdf_Graph)) { - throw new InvalidArgumentException( - "\$graph should be an EasyRdf_Graph object and cannot be null" - ); - } else { - $this->graph = $graph; - } - - if ($format == null or $format == '') { - throw new InvalidArgumentException( - "\$format cannot be null or empty" - ); - } elseif (is_object($format) and $format instanceof EasyRdf_Format) { - $this->format = $format = $format->getName(); - } elseif (!is_string($format)) { - throw new InvalidArgumentException( - "\$format should be a string or an EasyRdf_Format object" - ); - } else { - $this->format = $format; - } - - if ($baseUri) { - if (!is_string($baseUri)) { - throw new InvalidArgumentException( - "\$baseUri should be a string" - ); - } else { - $this->baseUri = new EasyRdf_ParsedUri($baseUri); - } - } else { - $this->baseUri = null; - } - - // Prepare for parsing - $this->resetBnodeMap(); - $this->tripleCount = 0; - } - - /** - * Sub-classes must follow this protocol - * @ignore - */ - public function parse($graph, $data, $format, $baseUri) - { - throw new EasyRdf_Exception( - "This method should be overridden by sub-classes." - ); - } - - /** - * Add a triple to the current graph, and keep count of the number of triples - * @ignore - */ - protected function addTriple($resource, $property, $value) - { - $count = $this->graph->add($resource, $property, $value); - $this->tripleCount += $count; - return $count; - } -} diff --git a/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Parser/Arc.php b/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Parser/Arc.php deleted file mode 100644 index b4e5e1e..0000000 --- a/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Parser/Arc.php +++ /dev/null @@ -1,96 +0,0 @@ - 'RDFXML', - 'turtle' => 'Turtle', - 'ntriples' => 'Turtle', - 'rdfa' => 'SemHTML', - ); - - /** - * Constructor - * - * @return object EasyRdf_Parser_Arc - */ - public function __construct() - { - require_once 'arc/ARC2.php'; - } - - /** - * Parse an RDF document into an EasyRdf_Graph - * - * @param object EasyRdf_Graph $graph the graph to load the data into - * @param string $data the RDF document data - * @param string $format the format of the input data - * @param string $baseUri the base URI of the data being parsed - * @return integer The number of triples added to the graph - */ - public function parse($graph, $data, $format, $baseUri) - { - parent::checkParseParams($graph, $data, $format, $baseUri); - - if (array_key_exists($format, self::$supportedTypes)) { - $className = self::$supportedTypes[$format]; - } else { - throw new EasyRdf_Exception( - "EasyRdf_Parser_Arc does not support: $format" - ); - } - - $parser = ARC2::getParser($className); - if ($parser) { - $parser->parse($baseUri, $data); - $rdfphp = $parser->getSimpleIndex(false); - return parent::parse($graph, $rdfphp, 'php', $baseUri); - } else { - throw new EasyRdf_Exception( - "ARC2 failed to get a $className parser." - ); - } - } -} diff --git a/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Parser/Exception.php b/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Parser/Exception.php deleted file mode 100644 index d03b5bd..0000000 --- a/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Parser/Exception.php +++ /dev/null @@ -1,76 +0,0 @@ -parserLine = $line; - $this->parserColumn = $column; - - if (!is_null($line)) { - $message .= " on line $line"; - if (!is_null($column)) { - $message .= ", column $column"; - } - } - - parent::__construct($message); - } - - public function getParserLine() - { - return $this->parserLine; - } - - public function getParserColumn() - { - return $this->parserColumn; - } -} diff --git a/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Parser/Json.php b/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Parser/Json.php deleted file mode 100644 index ee31d1d..0000000 --- a/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Parser/Json.php +++ /dev/null @@ -1,155 +0,0 @@ -jsonLastErrorExists = function_exists('json_last_error'); - } - - /** Return the last JSON parser error as a string - * - * If json_last_error() is not available a generic message will be returned. - * - * @ignore - */ - protected function jsonLastErrorString() - { - if ($this->jsonLastErrorExists) { - switch (json_last_error()) { - case JSON_ERROR_NONE: - return null; - case JSON_ERROR_DEPTH: - return "JSON Parse error: the maximum stack depth has been exceeded"; - case JSON_ERROR_STATE_MISMATCH: - return "JSON Parse error: invalid or malformed JSON"; - case JSON_ERROR_CTRL_CHAR: - return "JSON Parse error: control character error, possibly incorrectly encoded"; - case JSON_ERROR_SYNTAX: - return "JSON Parse syntax error"; - case JSON_ERROR_UTF8: - return "JSON Parse error: malformed UTF-8 characters, possibly incorrectly encoded"; - default: - return "JSON Parse error: unknown"; - } - } else { - return "JSON Parse error"; - } - } - - /** Parse the triple-centric JSON format, as output by libraptor - * - * http://librdf.org/raptor/api/serializer-json.html - * - * @ignore - */ - protected function parseJsonTriples($data, $baseUri) - { - foreach ($data['triples'] as $triple) { - if ($triple['subject']['type'] == 'bnode') { - $subject = $this->remapBnode($triple['subject']['value']); - } else { - $subject = $triple['subject']['value']; - } - - $predicate = $triple['predicate']['value']; - - if ($triple['object']['type'] == 'bnode') { - $object = array( - 'type' => 'bnode', - 'value' => $this->remapBnode($triple['object']['value']) - ); - } else { - $object = $triple['object']; - } - - $this->addTriple($subject, $predicate, $object); - } - - return $this->tripleCount; - } - - /** - * Parse RDF/JSON into an EasyRdf_Graph - * - * @param object EasyRdf_Graph $graph the graph to load the data into - * @param string $data the RDF document data - * @param string $format the format of the input data - * @param string $baseUri the base URI of the data being parsed - * @return integer The number of triples added to the graph - */ - public function parse($graph, $data, $format, $baseUri) - { - $this->checkParseParams($graph, $data, $format, $baseUri); - - if ($format != 'json') { - throw new EasyRdf_Exception( - "EasyRdf_Parser_Json does not support: $format" - ); - } - - $decoded = @json_decode(strval($data), true); - if ($decoded === null) { - throw new EasyRdf_Parser_Exception( - $this->jsonLastErrorString() - ); - } - - if (array_key_exists('triples', $decoded)) { - return $this->parseJsonTriples($decoded, $baseUri); - } else { - return parent::parse($graph, $decoded, 'php', $baseUri); - } - } -} diff --git a/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Parser/Ntriples.php b/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Parser/Ntriples.php deleted file mode 100644 index 1392b5b..0000000 --- a/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Parser/Ntriples.php +++ /dev/null @@ -1,211 +0,0 @@ - chr(0x09), - 'b' => chr(0x08), - 'n' => chr(0x0A), - 'r' => chr(0x0D), - 'f' => chr(0x0C), - '\"' => chr(0x22), - '\'' => chr(0x27) - ); - foreach ($mappings as $in => $out) { - $str = preg_replace('/\x5c([' . $in . '])/', $out, $str); - } - - if (stripos($str, '\u') === false) { - return $str; - } - - while (preg_match('/\\\(U)([0-9A-F]{8})/', $str, $matches) || - preg_match('/\\\(u)([0-9A-F]{4})/', $str, $matches)) { - $no = hexdec($matches[2]); - if ($no < 128) { // 0x80 - $char = chr($no); - } elseif ($no < 2048) { // 0x800 - $char = chr(($no >> 6) + 192) . - chr(($no & 63) + 128); - } elseif ($no < 65536) { // 0x10000 - $char = chr(($no >> 12) + 224) . - chr((($no >> 6) & 63) + 128) . - chr(($no & 63) + 128); - } elseif ($no < 2097152) { // 0x200000 - $char = chr(($no >> 18) + 240) . - chr((($no >> 12) & 63) + 128) . - chr((($no >> 6) & 63) + 128) . - chr(($no & 63) + 128); - } else { - # FIXME: throw an exception instead? - $char = ''; - } - $str = str_replace('\\' . $matches[1] . $matches[2], $char, $str); - } - return $str; - } - - /** - * @ignore - */ - protected function parseNtriplesSubject($sub, $lineNum) - { - if (preg_match('/<([^<>]+)>/', $sub, $matches)) { - return $this->unescapeString($matches[1]); - } elseif (preg_match('/_:([A-Za-z0-9]*)/', $sub, $matches)) { - if (empty($matches[1])) { - return $this->graph->newBNodeId(); - } else { - $nodeid = $this->unescapeString($matches[1]); - return $this->remapBnode($nodeid); - } - } else { - throw new EasyRdf_Parser_Exception( - "Failed to parse subject: $sub", - $lineNum - ); - } - } - - /** - * @ignore - */ - protected function parseNtriplesObject($obj, $lineNum) - { - if (preg_match('/"(.+)"\^\^<([^<>]+)>/', $obj, $matches)) { - return array( - 'type' => 'literal', - 'value' => $this->unescapeString($matches[1]), - 'datatype' => $this->unescapeString($matches[2]) - ); - } elseif (preg_match('/"(.+)"@([\w\-]+)/', $obj, $matches)) { - return array( - 'type' => 'literal', - 'value' => $this->unescapeString($matches[1]), - 'lang' => $this->unescapeString($matches[2]) - ); - } elseif (preg_match('/"(.*)"/', $obj, $matches)) { - return array('type' => 'literal', 'value' => $this->unescapeString($matches[1])); - } elseif (preg_match('/<([^<>]+)>/', $obj, $matches)) { - return array('type' => 'uri', 'value' => $matches[1]); - } elseif (preg_match('/_:([A-Za-z0-9]*)/', $obj, $matches)) { - if (empty($matches[1])) { - return array( - 'type' => 'bnode', - 'value' => $this->graph->newBNodeId() - ); - } else { - $nodeid = $this->unescapeString($matches[1]); - return array( - 'type' => 'bnode', - 'value' => $this->remapBnode($nodeid) - ); - } - } else { - throw new EasyRdf_Parser_Exception( - "Failed to parse object: $obj", - $lineNum - ); - } - } - - /** - * Parse an N-Triples document into an EasyRdf_Graph - * - * @param object EasyRdf_Graph $graph the graph to load the data into - * @param string $data the RDF document data - * @param string $format the format of the input data - * @param string $baseUri the base URI of the data being parsed - * @return integer The number of triples added to the graph - */ - public function parse($graph, $data, $format, $baseUri) - { - parent::checkParseParams($graph, $data, $format, $baseUri); - - if ($format != 'ntriples') { - throw new EasyRdf_Exception( - "EasyRdf_Parser_Ntriples does not support: $format" - ); - } - - $lines = preg_split("/\x0D?\x0A/", strval($data)); - foreach ($lines as $index => $line) { - $lineNum = $index + 1; - if (preg_match("/^\s*#/", $line)) { - # Comment - continue; - } elseif (preg_match("/^\s*(.+?)\s+<([^<>]+?)>\s+(.+?)\s*\.\s*$/", $line, $matches)) { - $this->addTriple( - $this->parseNtriplesSubject($matches[1], $lineNum), - $this->unescapeString($matches[2]), - $this->parseNtriplesObject($matches[3], $lineNum) - ); - } elseif (preg_match("/^\s*$/", $line)) { - # Blank line - continue; - } else { - throw new EasyRdf_Parser_Exception( - "Failed to parse statement", - $lineNum - ); - } - } - - return $this->tripleCount; - } -} diff --git a/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Parser/Rapper.php b/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Parser/Rapper.php deleted file mode 100644 index ed12198..0000000 --- a/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Parser/Rapper.php +++ /dev/null @@ -1,102 +0,0 @@ -/dev/null", $output, $status); - if ($status != 0) { - throw new EasyRdf_Exception( - "Failed to execute the command '$rapperCmd': $result" - ); - } elseif (version_compare($result, self::MINIMUM_RAPPER_VERSION) < 0) { - throw new EasyRdf_Exception( - "Version ".self::MINIMUM_RAPPER_VERSION." or higher of rapper is required." - ); - } else { - $this->rapperCmd = $rapperCmd; - } - } - - /** - * Parse an RDF document into an EasyRdf_Graph - * - * @param object EasyRdf_Graph $graph the graph to load the data into - * @param string $data the RDF document data - * @param string $format the format of the input data - * @param string $baseUri the base URI of the data being parsed - * @return integer The number of triples added to the graph - */ - public function parse($graph, $data, $format, $baseUri) - { - parent::checkParseParams($graph, $data, $format, $baseUri); - - $json = EasyRdf_Utils::execCommandPipe( - $this->rapperCmd, - array( - '--quiet', - '--input', $format, - '--output', 'json', - '--ignore-errors', - '--input-uri', $baseUri, - '--output-uri', '-', '-' - ), - $data - ); - - // Parse in the JSON - return parent::parse($graph, $json, 'json', $baseUri); - } -} diff --git a/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Parser/RdfPhp.php b/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Parser/RdfPhp.php deleted file mode 100644 index cea3c8a..0000000 --- a/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Parser/RdfPhp.php +++ /dev/null @@ -1,99 +0,0 @@ -checkParseParams($graph, $data, $format, $baseUri); - - if ($format != 'php') { - throw new EasyRdf_Exception( - "EasyRdf_Parser_RdfPhp does not support: $format" - ); - } - - foreach ($data as $subject => $properties) { - if (substr($subject, 0, 2) === '_:') { - $subject = $this->remapBnode($subject); - } elseif (preg_match('/^\w+$/', $subject)) { - # Cope with invalid RDF/JSON serialisations that - # put the node name in, without the _: prefix - # (such as net.fortytwo.sesametools.rdfjson) - $subject = $this->remapBnode($subject); - } - - foreach ($properties as $property => $objects) { - foreach ($objects as $object) { - if ($object['type'] === 'bnode') { - $object['value'] = $this->remapBnode($object['value']); - } - $this->addTriple($subject, $property, $object); - } - } - } - - return $this->tripleCount; - } -} diff --git a/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Parser/RdfXml.php b/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Parser/RdfXml.php deleted file mode 100644 index b7d59fe..0000000 --- a/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Parser/RdfXml.php +++ /dev/null @@ -1,808 +0,0 @@ -graph = $graph; - $this->state = 0; - $this->xLang = null; - $this->xBase = new EasyRdf_ParsedUri($base); - $this->xml = 'http://www.w3.org/XML/1998/namespace'; - $this->rdf = 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'; - $this->nsp = array($this->xml => 'xml', $this->rdf => 'rdf'); - $this->sStack = array(); - $this->sCount = 0; - } - - /** @ignore */ - protected function initXMLParser() - { - if (!isset($this->xmlParser)) { - $parser = xml_parser_create_ns('UTF-8', ''); - xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 0); - xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0); - xml_set_element_handler($parser, 'startElementHandler', 'endElementHandler'); - xml_set_character_data_handler($parser, 'cdataHandler'); - xml_set_start_namespace_decl_handler($parser, 'newNamespaceHandler'); - xml_set_object($parser, $this); - $this->xmlParser = $parser; - } - } - - /** @ignore */ - protected function pushS(&$s) - { - $s['pos'] = $this->sCount; - $this->sStack[$this->sCount] = $s; - $this->sCount++; - } - - /** @ignore */ - protected function popS() - { - $r = array(); - $this->sCount--; - for ($i = 0, $iMax = $this->sCount; $i < $iMax; $i++) { - $r[$i] = $this->sStack[$i]; - } - $this->sStack = $r; - } - - /** @ignore */ - protected function updateS($s) - { - $this->sStack[$s['pos']] = $s; - } - - /** @ignore */ - protected function getParentS() - { - if ($this->sCount && isset($this->sStack[$this->sCount - 1])) { - return $this->sStack[$this->sCount - 1]; - } else { - return false; - } - } - - /** @ignore */ - protected function getParentXBase() - { - if ($p = $this->getParentS()) { - if (isset($p['p_x_base']) && $p['p_x_base']) { - return $p['p_x_base']; - } elseif (isset($p['x_base'])) { - return $p['x_base']; - } else { - return ''; - } - } else { - return $this->xBase; - } - } - - /** @ignore */ - protected function getParentXLang() - { - if ($p = $this->getParentS()) { - if (isset($p['p_x_lang']) && $p['p_x_lang']) { - return $p['p_x_lang']; - } elseif (isset($p['x_lang'])) { - return $p['x_lang']; - } else { - return null; - } - } else { - return $this->xLang; - } - } - - /** @ignore */ - protected function splitURI($v) - { - /* auto-splitting on / or # */ - if (preg_match('/^(.*[\/\#])([^\/\#]+)$/', $v, $m)) { - return array($m[1], $m[2]); - } - /* auto-splitting on last special char, e.g. urn:foo:bar */ - if (preg_match('/^(.*[\:\/])([^\:\/]+)$/', $v, $m)) { - return array($m[1], $m[2]); - } - return array($v, ''); - } - - /** @ignore */ - protected function add($s, $p, $o, $sType, $oType, $oDatatype = null, $oLang = null) - { - $this->addTriple( - $s, - $p, - array( - 'type' => $oType, - 'value' => $o, - 'lang' => $oLang, - 'datatype' => $oDatatype - ) - ); - } - - /** @ignore */ - protected function reify($t, $s, $p, $o, $sType, $oType, $oDatatype = null, $oLang = null) - { - $this->add($t, $this->rdf.'type', $this->rdf.'Statement', 'uri', 'uri'); - $this->add($t, $this->rdf.'subject', $s, 'uri', $sType); - $this->add($t, $this->rdf.'predicate', $p, 'uri', 'uri'); - $this->add($t, $this->rdf.'object', $o, 'uri', $oType, $oDatatype, $oLang); - } - - /** @ignore */ - protected function startElementHandler($p, $t, $a) - { - switch($this->state) { - case 0: - return $this->startState0($t, $a); - case 1: - return $this->startState1($t, $a); - case 2: - return $this->startState2($t, $a); - case 4: - return $this->startState4($t, $a); - case 5: - return $this->startState5($t, $a); - case 6: - return $this->startState6($t, $a); - default: - throw new EasyRdf_Parser_Exception( - 'startElementHandler() called at state ' . $this->state . ' in '.$t - ); - } - } - - /** @ignore */ - protected function endElementHandler($p, $t) - { - switch($this->state){ - case 1: - return $this->endState1($t); - case 2: - return $this->endState2($t); - case 3: - return $this->endState3($t); - case 4: - return $this->endState4($t); - case 5: - return $this->endState5($t); - case 6: - return $this->endState6($t); - default: - throw new EasyRdf_Parser_Exception( - 'endElementHandler() called at state ' . $this->state . ' in '.$t - ); - } - } - - /** @ignore */ - protected function cdataHandler($p, $d) - { - switch($this->state){ - case 4: - return $this->cdataState4($d); - case 6: - return $this->cdataState6($d); - default: - return false; - } - } - - /** @ignore */ - protected function newNamespaceHandler($p, $prf, $uri) - { - $this->nsp[$uri] = isset($this->nsp[$uri]) ? $this->nsp[$uri] : $prf; - } - - /** @ignore */ - protected function startState0($t, $a) - { - $this->state = 1; - if ($t !== $this->rdf.'RDF') { - $this->startState1($t, $a); - } - } - - /** @ignore */ - protected function startState1($t, $a) - { - $s = array( - 'x_base' => $this->getParentXBase(), - 'x_lang' => $this->getParentXLang(), - 'li_count' => 0, - ); - - if (isset($a[$this->xml.'base'])) { - $s['x_base'] = $this->xBase->resolve($a[$this->xml.'base']); - } - - if (isset($a[$this->xml.'lang'])) { - $s['x_lang'] = $a[$this->xml.'lang']; - } - - /* ID */ - if (isset($a[$this->rdf.'ID'])) { - $s['type'] = 'uri'; - $s['value'] = $s['x_base']->resolve('#'.$a[$this->rdf.'ID']); - /* about */ - } elseif (isset($a[$this->rdf.'about'])) { - $s['type'] = 'uri'; - $s['value'] = $s['x_base']->resolve($a[$this->rdf.'about']); - /* bnode */ - } else { - $s['type'] = 'bnode'; - if (isset($a[$this->rdf.'nodeID'])) { - $s['value'] = $this->remapBnode($a[$this->rdf.'nodeID']); - } else { - $s['value'] = $this->graph->newBNodeId(); - } - } - - /* sub-node */ - if ($this->state === 4) { - $supS = $this->getParentS(); - /* new collection */ - if (isset($supS['o_is_coll']) && $supS['o_is_coll']) { - $coll = array( - 'type' => 'bnode', - 'value' => $this->graph->newBNodeId(), - 'is_coll' => true, - 'x_base' => $s['x_base'], - 'x_lang' => $s['x_lang'] - ); - $this->add($supS['value'], $supS['p'], $coll['value'], $supS['type'], $coll['type']); - $this->add($coll['value'], $this->rdf.'first', $s['value'], $coll['type'], $s['type']); - $this->pushS($coll); - - } elseif (isset($supS['is_coll']) && $supS['is_coll']) { - /* new entry in existing coll */ - $coll = array( - 'type' => 'bnode', - 'value' => $this->graph->newBNodeId(), - 'is_coll' => true, - 'x_base' => $s['x_base'], - 'x_lang' => $s['x_lang'] - ); - $this->add($supS['value'], $this->rdf.'rest', $coll['value'], $supS['type'], $coll['type']); - $this->add($coll['value'], $this->rdf.'first', $s['value'], $coll['type'], $s['type']); - $this->pushS($coll); - /* normal sub-node */ - } elseif (isset($supS['p']) && $supS['p']) { - $this->add($supS['value'], $supS['p'], $s['value'], $supS['type'], $s['type']); - } - } - /* typed node */ - if ($t !== $this->rdf.'Description') { - $this->add($s['value'], $this->rdf.'type', $t, $s['type'], 'uri'); - } - /* (additional) typing attr */ - if (isset($a[$this->rdf.'type'])) { - $this->add($s['value'], $this->rdf.'type', $a[$this->rdf.'type'], $s['type'], 'uri'); - } - - /* Seq|Bag|Alt */ - // if (in_array($t, array($this->rdf.'Seq', $this->rdf.'Bag', $this->rdf.'Alt'))) { - // # FIXME: what is this? - // $s['is_con'] = true; - // } - - /* any other attrs (skip rdf and xml, except rdf:_, rdf:value, rdf:Seq) */ - foreach ($a as $k => $v) { - if (((strpos($k, $this->xml) === false) && (strpos($k, $this->rdf) === false)) || - preg_match('/(\_[0-9]+|value|Seq|Bag|Alt|Statement|Property|List)$/', $k)) { - if (strpos($k, ':')) { - $this->add($s['value'], $k, $v, $s['type'], 'literal', null, $s['x_lang']); - } - } - } - $this->pushS($s); - $this->state = 2; - } - - /** @ignore */ - protected function startState2($t, $a) - { - $s = $this->getParentS(); - foreach (array('p_x_base', 'p_x_lang', 'p_id', 'o_is_coll') as $k) { - unset($s[$k]); - } - /* base */ - if (isset($a[$this->xml.'base'])) { - $s['p_x_base'] = $s['x_base']->resolve($a[$this->xml.'base']); - } - $b = isset($s['p_x_base']) && $s['p_x_base'] ? $s['p_x_base'] : $s['x_base']; - /* lang */ - if (isset($a[$this->xml.'lang'])) { - $s['p_x_lang'] = $a[$this->xml.'lang']; - } - $l = isset($s['p_x_lang']) && $s['p_x_lang'] ? $s['p_x_lang'] : $s['x_lang']; - /* adjust li */ - if ($t === $this->rdf.'li') { - $s['li_count']++; - $t = $this->rdf.'_'.$s['li_count']; - } - /* set p */ - $s['p'] = $t; - /* reification */ - if (isset($a[$this->rdf.'ID'])) { - $s['p_id'] = $a[$this->rdf.'ID']; - } - $o = array('value' => null, 'type' => null, 'x_base' => $b, 'x_lang' => $l); - /* resource/rdf:resource */ - if (isset($a['resource'])) { - $a[$this->rdf.'resource'] = $a['resource']; - unset($a['resource']); - } - if (isset($a[$this->rdf.'resource'])) { - $o['type'] = 'uri'; - $o['value'] = $b->resolve($a[$this->rdf.'resource']); - $this->add($s['value'], $s['p'], $o['value'], $s['type'], $o['type']); - /* type */ - if (isset($a[$this->rdf.'type'])) { - $this->add( - $o['value'], - $this->rdf.'type', - $a[$this->rdf.'type'], - 'uri', - 'uri' - ); - } - /* reification */ - if (isset($s['p_id'])) { - $this->reify( - $b->resolve('#'.$s['p_id']), - $s['value'], - $s['p'], - $o['value'], - $s['type'], - $o['type'] - ); - unset($s['p_id']); - } - $this->state = 3; - } elseif (isset($a[$this->rdf.'nodeID'])) { - /* named bnode */ - $o['value'] = $this->remapBnode($a[$this->rdf.'nodeID']); - $o['type'] = 'bnode'; - $this->add($s['value'], $s['p'], $o['value'], $s['type'], $o['type']); - $this->state = 3; - /* reification */ - if (isset($s['p_id'])) { - $this->reify( - $b->resolve('#'.$s['p_id']), - $s['value'], - $s['p'], - $o['value'], - $s['type'], - $o['type'] - ); - } - /* parseType */ - } elseif (isset($a[$this->rdf.'parseType'])) { - if ($a[$this->rdf.'parseType'] === 'Literal') { - $s['o_xml_level'] = 0; - $s['o_xml_data'] = ''; - $s['p_xml_literal_level'] = 0; - $s['ns'] = array(); - $this->state = 6; - } elseif ($a[$this->rdf.'parseType'] === 'Resource') { - $o['value'] = $this->graph->newBNodeId(); - $o['type'] = 'bnode'; - $o['hasClosingTag'] = 0; - $this->add($s['value'], $s['p'], $o['value'], $s['type'], $o['type']); - $this->pushS($o); - /* reification */ - if (isset($s['p_id'])) { - $this->reify( - $b->resolve('#'.$s['p_id']), - $s['value'], - $s['p'], - $o['value'], - $s['type'], - $o['type'] - ); - unset($s['p_id']); - } - $this->state = 2; - } elseif ($a[$this->rdf.'parseType'] === 'Collection') { - $s['o_is_coll'] = true; - $this->state = 4; - } - } else { - /* sub-node or literal */ - $s['o_cdata'] = ''; - if (isset($a[$this->rdf.'datatype'])) { - $s['o_datatype'] = $a[$this->rdf.'datatype']; - } - $this->state = 4; - } - /* any other attrs (skip rdf and xml) */ - foreach ($a as $k => $v) { - if (((strpos($k, $this->xml) === false) && - (strpos($k, $this->rdf) === false)) || - preg_match('/(\_[0-9]+|value)$/', $k)) { - if (strpos($k, ':')) { - if (!$o['value']) { - $o['value'] = $this->graph->newBNodeId(); - $o['type'] = 'bnode'; - $this->add($s['value'], $s['p'], $o['value'], $s['type'], $o['type']); - } - /* reification */ - if (isset($s['p_id'])) { - $this->reify( - $b->resolve('#'.$s['p_id']), - $s['value'], - $s['p'], - $o['value'], - $s['type'], - $o['type'] - ); - unset($s['p_id']); - } - $this->add($o['value'], $k, $v, $o['type'], 'literal'); - $this->state = 3; - } - } - } - $this->updateS($s); - } - - /** @ignore */ - protected function startState4($t, $a) - { - return $this->startState1($t, $a); - } - - /** @ignore */ - protected function startState5($t, $a) - { - $this->state = 4; - return $this->startState4($t, $a); - } - - /** @ignore */ - protected function startState6($t, $a) - { - $s = $this->getParentS(); - $data = isset($s['o_xml_data']) ? $s['o_xml_data'] : ''; - $ns = isset($s['ns']) ? $s['ns'] : array(); - $parts = $this->splitURI($t); - if (count($parts) === 1) { - $data .= '<'.$t; - } else { - $nsUri = $parts[0]; - $name = $parts[1]; - if (!isset($this->nsp[$nsUri])) { - foreach ($this->nsp as $tmp1 => $tmp2) { - if (strpos($t, $tmp1) === 0) { - $nsUri = $tmp1; - $name = substr($t, strlen($tmp1)); - break; - } - } - } - - $nsp = isset($this->nsp[$nsUri]) ? $this->nsp[$nsUri] : ''; - $data .= $nsp ? '<' . $nsp . ':' . $name : '<' . $name; - /* ns */ - if (!isset($ns[$nsp.'='.$nsUri]) || !$ns[$nsp.'='.$nsUri]) { - $data .= $nsp ? ' xmlns:'.$nsp.'="'.$nsUri.'"' : ' xmlns="'.$nsUri.'"'; - $ns[$nsp.'='.$nsUri] = true; - $s['ns'] = $ns; - } - } - foreach ($a as $k => $v) { - $parts = $this->splitURI($k); - if (count($parts) === 1) { - $data .= ' '.$k.'="'.$v.'"'; - } else { - $nsUri = $parts[0]; - $name = $parts[1]; - $nsp = isset($this->nsp[$nsUri]) ? $this->nsp[$nsUri] : ''; - $data .= $nsp ? ' '.$nsp.':'.$name.'="'.$v.'"' : ' '.$name.'="'.$v.'"' ; - } - } - $data .= '>'; - $s['o_xml_data'] = $data; - $s['o_xml_level'] = isset($s['o_xml_level']) ? $s['o_xml_level'] + 1 : 1; - if ($t == $s['p']) {/* xml container prop */ - $s['p_xml_literal_level'] = isset($s['p_xml_literal_level']) ? $s['p_xml_literal_level'] + 1 : 1; - } - $this->updateS($s); - } - - /** @ignore */ - protected function endState1($t) - { - /* end of doc */ - $this->state = 0; - } - - /** @ignore */ - protected function endState2($t) - { - /* expecting a prop, getting a close */ - if ($s = $this->getParentS()) { - $hasClosingTag = (isset($s['hasClosingTag']) && !$s['hasClosingTag']) ? 0 : 1; - $this->popS(); - $this->state = 5; - if ($s = $this->getParentS()) { - /* new s */ - if (!isset($s['p']) || !$s['p']) { - /* p close after collection|parseType=Resource|node close after p close */ - $this->state = $this->sCount ? 4 : 1; - if (!$hasClosingTag) { - $this->state = 2; - } - } elseif (!$hasClosingTag) { - $this->state = 2; - } - } - } - } - - /** @ignore */ - protected function endState3($t) - { - /* p close */ - $this->state = 2; - } - - /** @ignore */ - protected function endState4($t) - { - /* empty p | pClose after cdata | pClose after collection */ - if ($s = $this->getParentS()) { - $b = isset($s['p_x_base']) && $s['p_x_base'] ? - $s['p_x_base'] : (isset($s['x_base']) ? $s['x_base'] : ''); - if (isset($s['is_coll']) && $s['is_coll']) { - $this->add($s['value'], $this->rdf.'rest', $this->rdf.'nil', $s['type'], 'uri'); - /* back to collection start */ - while ((!isset($s['p']) || ($s['p'] != $t))) { - $subS = $s; - $this->popS(); - $s = $this->getParentS(); - } - /* reification */ - if (isset($s['p_id']) && $s['p_id']) { - $this->reify( - $b->resolve('#'.$s['p_id']), - $s['value'], - $s['p'], - $subS['value'], - $s['type'], - $subS['type'] - ); - } - unset($s['p']); - $this->updateS($s); - } else { - $dt = isset($s['o_datatype']) ? $s['o_datatype'] : null; - $l = isset($s['p_x_lang']) && $s['p_x_lang'] ? - $s['p_x_lang'] : (isset($s['x_lang']) ? $s['x_lang'] : null); - $o = array('type' => 'literal', 'value' => $s['o_cdata']); - $this->add( - $s['value'], - $s['p'], - $o['value'], - $s['type'], - $o['type'], - $dt, - $l - ); - /* reification */ - if (isset($s['p_id']) && $s['p_id']) { - $this->reify( - $b->resolve('#'.$s['p_id']), - $s['value'], - $s['p'], - $o['value'], - $s['type'], - $o['type'], - $dt, - $l - ); - } - unset($s['o_cdata']); - unset($s['o_datatype']); - unset($s['p']); - $this->updateS($s); - } - $this->state = 2; - } - } - - /** @ignore */ - protected function endState5($t) - { - /* p close */ - if ($s = $this->getParentS()) { - unset($s['p']); - $this->updateS($s); - $this->state = 2; - } - } - - /** @ignore */ - protected function endState6($t) - { - if ($s = $this->getParentS()) { - $l = isset($s['p_x_lang']) && $s['p_x_lang'] ? - $s['p_x_lang'] : - (isset($s['x_lang']) ? $s['x_lang'] : null); - $data = $s['o_xml_data']; - $level = $s['o_xml_level']; - if ($level === 0) { - /* pClose */ - $this->add( - $s['value'], - $s['p'], - trim($data, ' '), - $s['type'], - 'literal', - $this->rdf.'XMLLiteral', - $l - ); - unset($s['o_xml_data']); - $this->state = 2; - } else { - $parts = $this->splitURI($t); - if (count($parts) == 1) { - $data .= ''; - } else { - $nsUri = $parts[0]; - $name = $parts[1]; - if (!isset($this->nsp[$nsUri])) { - foreach ($this->nsp as $tmp1 => $tmp2) { - if (strpos($t, $tmp1) === 0) { - $nsUri = $tmp1; - $name = substr($t, strlen($tmp1)); - break; - } - } - } - $nsp = isset($this->nsp[$nsUri]) ? $this->nsp[$nsUri] : ''; - $data .= $nsp ? '' : ''; - } - $s['o_xml_data'] = $data; - $s['o_xml_level'] = $level - 1; - if ($t == $s['p']) { - /* xml container prop */ - $s['p_xml_literal_level']--; - } - } - $this->updateS($s); - } - } - - /** @ignore */ - protected function cdataState4($d) - { - if ($s = $this->getParentS()) { - $s['o_cdata'] = isset($s['o_cdata']) ? $s['o_cdata'] . $d : $d; - $this->updateS($s); - } - } - - /** @ignore */ - protected function cdataState6($d) - { - if ($s = $this->getParentS()) { - if (isset($s['o_xml_data']) || preg_match("/[\n\r]/", $d) || trim($d)) { - $d = htmlspecialchars($d, ENT_NOQUOTES); - $s['o_xml_data'] = isset($s['o_xml_data']) ? $s['o_xml_data'] . $d : $d; - } - $this->updateS($s); - } - } - - /** - * Parse an RDF/XML document into an EasyRdf_Graph - * - * @param object EasyRdf_Graph $graph the graph to load the data into - * @param string $data the RDF document data - * @param string $format the format of the input data - * @param string $baseUri the base URI of the data being parsed - * @return integer The number of triples added to the graph - */ - public function parse($graph, $data, $format, $baseUri) - { - parent::checkParseParams($graph, $data, $format, $baseUri); - - if ($format != 'rdfxml') { - throw new EasyRdf_Exception( - "EasyRdf_Parser_RdfXml does not support: $format" - ); - } - - $this->init($graph, $baseUri); - $this->resetBnodeMap(); - - /* xml parser */ - $this->initXMLParser(); - - /* parse */ - if (!xml_parse($this->xmlParser, $data, false)) { - $message = xml_error_string(xml_get_error_code($this->xmlParser)); - throw new EasyRdf_Parser_Exception( - 'XML error: "' . $message . '"', - xml_get_current_line_number($this->xmlParser), - xml_get_current_column_number($this->xmlParser) - ); - } - - xml_parser_free($this->xmlParser); - - return $this->tripleCount; - } -} diff --git a/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Parser/Rdfa.php b/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Parser/Rdfa.php deleted file mode 100644 index 5811fb2..0000000 --- a/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Parser/Rdfa.php +++ /dev/null @@ -1,727 +0,0 @@ -debug) { - print "Adding triple: $resource -> $property -> ".$value['type'].':'.$value['value']."\n"; - } - $count = $this->graph->add($resource, $property, $value); - $this->tripleCount += $count; - return $count; - } - - protected function generateList($subject, $property, $list) - { - $current = $subject; - $prop = $property; - - // Output a blank node for each item in the list - foreach ($list as $item) { - $newNode = $this->graph->newBNodeId(); - $this->addTriple($current, $prop, array('type' => 'bnode', 'value' => $newNode)); - $this->addTriple($newNode, 'rdf:first', $item); - - $current = $newNode; - $prop = 'rdf:rest'; - } - - // Finally, terminate the list - $this->addTriple( - $current, - $prop, - array('type' => 'uri', 'value' => EasyRdf_Namespace::expand('rdf:nil')) - ); - } - - protected function addToList($listMapping, $property, $value) - { - if ($this->debug) { - print "Adding to list: $property -> ".$value['type'].':'.$value['value']."\n"; - } - - // Create property in the list mapping if it doesn't already exist - if (!isset($listMapping->$property)) { - $listMapping->$property = array(); - } - array_push($listMapping->$property, $value); - } - - protected function printNode($node, $depth) - { - $indent = str_repeat(' ', $depth); - print $indent; - switch($node->nodeType) { - case XML_ELEMENT_NODE: - print 'node'; - break; - case XML_ATTRIBUTE_NODE: - print 'attr'; - break; - case XML_TEXT_NODE: - print 'text'; - break; - case XML_CDATA_SECTION_NODE: - print 'cdata'; - break; - case XML_ENTITY_REF_NODE: - print 'entref'; - break; - case XML_ENTITY_NODE: - print 'entity'; - break; - case XML_PI_NODE: - print 'pi'; - break; - case XML_COMMENT_NODE: - print 'comment'; - break; - case XML_DOCUMENT_NODE: - print 'doc'; - break; - case XML_DOCUMENT_TYPE_NODE: - print 'doctype'; - break; - case XML_HTML_DOCUMENT_NODE: - print 'html'; - break; - default: - throw new EasyRdf_Exception("unknown node type: ".$node->nodeType); - break; - } - print ' '.$node->nodeName."\n"; - - if ($node->hasAttributes()) { - foreach ($node->attributes as $attr) { - print $indent.' '.$attr->nodeName." => ".$attr->nodeValue."\n"; - } - } - } - - protected function guessTimeDatatype($value) - { - if (preg_match("/^-?\d{4}-\d{2}-\d{2}(Z|[\-\+]\d{2}:\d{2})?$/", $value)) { - return 'http://www.w3.org/2001/XMLSchema#date'; - } elseif (preg_match("/^\d{2}:\d{2}:\d{2}(Z|[\-\+]\d{2}:\d{2})?$/", $value)) { - return 'http://www.w3.org/2001/XMLSchema#time'; - } elseif (preg_match("/^-?\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(Z|[\-\+]\d{2}:\d{2})?$/", $value)) { - return 'http://www.w3.org/2001/XMLSchema#dateTime'; - } elseif (preg_match("/^P(\d+Y)?(\d+M)?(\d+D)?T?(\d+H)?(\d+M)?(\d+S)?$/", $value)) { - return 'http://www.w3.org/2001/XMLSchema#duration'; - } elseif (preg_match("/^\d{4}$/", $value)) { - return 'http://www.w3.org/2001/XMLSchema#gYear'; - } elseif (preg_match("/^\d{4}-\d{2}$/", $value)) { - return 'http://www.w3.org/2001/XMLSchema#gYearMonth'; - } else { - return null; - } - } - - protected function initialContext() - { - $context = array( - 'prefixes' => array(), - 'vocab' => null, - 'subject' => $this->baseUri, - 'property' => null, - 'object' => null, - 'terms' => array(), - 'incompleteRels' => array(), - 'incompleteRevs' => array(), - 'listMapping' => null, - 'lang' => null, - 'path' => '', - 'xmlns' => array(), - ); - - // Set the default prefix - $context['prefixes'][''] = 'http://www.w3.org/1999/xhtml/vocab#'; - - // RDFa 1.1 default term mapping - $context['terms']['describedby'] = 'http://www.w3.org/2007/05/powder-s#describedby'; - $context['terms']['license'] = 'http://www.w3.org/1999/xhtml/vocab#license'; - $context['terms']['role'] = 'http://www.w3.org/1999/xhtml/vocab#role'; - - return $context; - } - - protected function expandCurie($node, &$context, $value) - { - if (preg_match("/^(\w*?):(.*)$/", $value, $matches)) { - list (, $prefix, $local) = $matches; - $prefix = strtolower($prefix); - if ($prefix === '_') { - // It is a bnode - return $this->remapBnode(substr($value, 2)); - } elseif (empty($prefix) and $context['vocab']) { - // Empty prefix - return $context['vocab'] . $local; - } elseif (isset($context['prefixes'][$prefix])) { - return $context['prefixes'][$prefix] . $local; - } elseif ($uri = $node->lookupNamespaceURI($prefix)) { - return $uri . $local; - } elseif (!empty($prefix) and $uri = EasyRdf_Namespace::get($prefix)) { - // Expand using well-known prefixes - return $uri . $local; - } - } - } - - protected function processUri($node, &$context, $value, $isProp = false) - { - if (preg_match("/^\[(.*)\]$/", $value, $matches)) { - // Safe CURIE - return $this->expandCurie($node, $context, $matches[1]); - } elseif (preg_match(self::TERM_REGEXP, $value) and $isProp) { - $term = strtolower($value); - if ($context['vocab']) { - return $context['vocab'] . $value; - } elseif (isset($context['terms'][$term])) { - return $context['terms'][$term]; - } - } elseif (substr($value, 0, 2) === '_:' and $isProp) { - return null; - } else { - $uri = $this->expandCurie($node, $context, $value); - if ($uri) { - return $uri; - } else { - $parsed = new EasyRdf_ParsedUri($value); - if ($parsed->isAbsolute()) { - return $value; - } elseif ($isProp) { - // Properties can't be relative URIs - return null; - } elseif ($this->baseUri) { - return $this->baseUri->resolve($parsed); - } - } - } - } - - protected function processUriList($node, $context, $values) - { - if (!$values) { - return array(); - } - - $uris = array(); - foreach (preg_split("/\s+/", $values) as $value) { - $uri = $this->processUri($node, $context, $value, true); - if ($uri) { - array_push($uris, $uri); - } - } - return $uris; - } - - protected function getUriAttribute($node, &$context, $attributes) - { - if (!is_array($attributes)) { - $attributes = array($attributes); - } - - // Find the first attribute that returns a valid URI - foreach ($attributes as $attribute) { - if ($node->hasAttribute($attribute)) { - $value = $node->getAttribute($attribute); - $uri = $this->processUri($node, $context, $value); - if ($uri) { - return $uri; - } - } - } - } - - protected function processNode($node, &$context, $depth = 1) - { - if ($this->debug) { - $this->printNode($node, $depth); - } - - // Step 1: establish local variables - $skip = false; - $subject = null; - $typedResource = null; - $object = null; - $rels = array(); - $revs = array(); - $lang = $context['lang']; - $incompleteRels = array(); - $incompleteRevs = array(); - - if ($node->nodeType === XML_ELEMENT_NODE) { - $context['path'] .= '/' . $node->nodeName; - - $content = $node->hasAttribute('content') ? $node->getAttribute('content') : null; - $datatype = $node->hasAttribute('datatype') ? $node->getAttribute('datatype') : null; - $property = $node->getAttribute('property') ? $node->getAttribute('property') : null; - $typeof = $node->getAttribute('typeof') ? $node->getAttribute('typeof') : null; - - // Step 2: Default vocabulary - if ($node->hasAttribute('vocab')) { - $context['vocab'] = $node->getAttribute('vocab'); - if ($context['vocab']) { - $this->addTriple( - $this->baseUri, - 'rdfa:usesVocabulary', - array('type' => 'uri', 'value' => $context['vocab']) - ); - } - } - - // Step 3: Set prefix mappings - // Support for deprecated xmlns if present in document - foreach ($context['xmlns'] as $prefix => $uri) { - if ($node->hasAttribute('xmlns:' . $prefix)) { - $context['prefixes'][$prefix] = $node->getAttribute('xmlns:' . $prefix); - if ($this->debug) { - print "Prefix (xmlns): $prefix => $uri\n"; - } - } - } - if ($node->hasAttribute('prefix')) { - $mappings = preg_split("/\s+/", $node->getAttribute('prefix')); - while (count($mappings)) { - $prefix = strtolower(array_shift($mappings)); - $uri = array_shift($mappings); - - if (substr($prefix, -1) === ':') { - $prefix = substr($prefix, 0, -1); - } else { - continue; - } - - if ($prefix === '_') { - continue; - } elseif (!empty($prefix)) { - $context['prefixes'][$prefix] = $uri; - if ($this->debug) { - print "Prefix: $prefix => $uri\n"; - } - } - } - } - - // Step 4 - if ($node->hasAttributeNS(self::XML_NS, 'lang')) { - $lang = $node->getAttributeNS(self::XML_NS, 'lang'); - } elseif ($node->hasAttribute('lang')) { - $lang = $node->getAttribute('lang'); - } - - // HTML+RDFa 1.1: ignore rel and rev unless they contain CURIEs. - foreach (array('rel', 'rev') as $attr) { - if ($node->hasAttribute('property') and $node->hasAttribute($attr)) { - // Quick check in case there are no CURIEs to deal with. - if (strpos($node->getAttribute($attr), ':') === false) { - $node->removeAttribute($attr); - } else { - // Only keep CURIEs. - $curies = array(); - foreach (preg_split("/\s+/", $node->getAttribute($attr)) as $token) { - if (strpos($token, ':')) { - $curies[] = $token; - } - } - $node->setAttribute($attr, implode(' ', $curies)); - } - } - } - - $rels = $this->processUriList($node, $context, $node->getAttribute('rel')); - $revs = $this->processUriList($node, $context, $node->getAttribute('rev')); - - if (!$node->hasAttribute('rel') and !$node->hasAttribute('rev')) { - // Step 5: Establish a new subject if no rel/rev - if ($property and is_null($content) and is_null($datatype)) { - $subject = $this->getUriAttribute($node, $context, 'about'); - if ($typeof and !$subject) { - $typedResource = $this->getUriAttribute( - $node, - $context, - array('resource', 'href', 'src') - ); - if (!$typedResource) { - $typedResource = $this->graph->newBNodeId(); - } - $object = $typedResource; - } - } else { - $subject = $this->getUriAttribute( - $node, - $context, - array('about', 'resource', 'href', 'src') - ); - } - - // Establish a subject if there isn't one - # FIXME: refactor this - if (is_null($subject)) { - if ($context['path'] === '/html/head') { - $subject = $context['object']; - } elseif ($depth <= 2) { - $subject = $this->baseUri; - } elseif ($typeof and !$property) { - $subject = $this->graph->newBNodeId(); - } else { - if (!$property) { - $skip = true; - } - $subject = $context['object']; - } - } - - } else { - // Step 6 - // If the current element does contain a @rel or @rev attribute, then the next step is to - // establish both a value for new subject and a value for current object resource: - - $subject = $this->getUriAttribute($node, $context, 'about'); - - $object = $this->getUriAttribute( - $node, - $context, - array('resource', 'href', 'src') - ); - - if ($typeof) { - if (!$object and !$subject) { - $object = $this->graph->newBNodeId(); - } - $typedResource = $subject ? $subject : $object; - } - - # FIXME: if the element is the root element of the document - # then act as if there is an empty @about present - if (!$subject) { - $subject = $context['object']; - } - - } - - # FIXME: better place for this? - if ($typeof and $subject and !$typedResource) { - $typedResource = $subject; - } - - // Step 7: Process @typeof if there is a subject - if ($typedResource) { - foreach ($this->processUriList($node, $context, $typeof) as $type) { - $this->addTriple( - $typedResource, - 'rdf:type', - array('type' => 'uri', 'value' => $type) - ); - } - } - - // Step 8: Create new List mapping if the subject has changed - if ($subject and $subject !== $context['subject']) { - $listMapping = new StdClass(); - } else { - $listMapping = $context['listMapping']; - } - - // Step 9: Generate triples with given object - if ($subject and $object) { - foreach ($rels as $prop) { - $obj = array('type' => 'uri', 'value' => $object); - if ($node->hasAttribute('inlist')) { - $this->addToList($listMapping, $prop, $obj); - } else { - $this->addTriple($subject, $prop, $obj); - } - } - - foreach ($revs as $prop) { - $this->addTriple( - $object, - $prop, - array('type' => 'uri', 'value' => $subject) - ); - } - } elseif ($rels or $revs) { - // Step 10: Incomplete triples and bnode creation - $object = $this->graph->newBNodeId(); - if ($rels) { - if ($node->hasAttribute('inlist')) { - foreach ($rels as $prop) { - # FIXME: add support for incomplete lists - if (!isset($listMapping->$prop)) { - $listMapping->$prop = array(); - } - } - } else { - $incompleteRels = $rels; - if ($this->debug) { - print "Incomplete rels: ".implode(',', $rels)."\n"; - } - } - } - - if ($revs) { - $incompleteRevs = $revs; - if ($this->debug) { - print "Incomplete revs: ".implode(',', $revs)."\n"; - } - } - } - - // Step 11: establish current property value - if ($subject and $property) { - $value = array(); - - if ($datatype) { - $datatype = $this->processUri($node, $context, $datatype, true); - } - - if ($content !== null) { - $value['value'] = $content; - } elseif ($node->hasAttribute('datetime')) { - $value['value'] = $node->getAttribute('datetime'); - $datetime = true; - } elseif ($datatype === '') { - $value['value'] = $node->textContent; - } elseif ($datatype === self::RDF_XML_LITERAL) { - $value['value'] = ''; - foreach ($node->childNodes as $child) { - $value['value'] .= $child->C14N(); - } - } elseif (is_null($datatype) and empty($rels) and empty($revs)) { - $value['value'] = $this->getUriAttribute( - $node, - $context, - array('resource', 'href', 'src') - ); - - if ($value['value']) { - $value['type'] = 'uri'; - } - } - - if (empty($value['value']) and $typedResource and !$node->hasAttribute('about')) { - $value['type'] = 'uri'; - $value['value'] = $typedResource; - } - - if (empty($value['value'])) { - $value['value'] = $node->textContent; - } - - if (empty($value['type'])) { - $value['type'] = 'literal'; - if ($datatype) { - $value['datatype'] = $datatype; - } elseif (isset($datetime) or $node->nodeName === 'time') { - $value['datatype'] = $this->guessTimeDatatype($value['value']); - } - - if (empty($value['datatype']) and $lang) { - $value['lang'] = $lang; - } - } - - // Add each of the properties - foreach ($this->processUriList($node, $context, $property) as $prop) { - if ($node->hasAttribute('inlist')) { - $this->addToList($listMapping, $prop, $value); - } elseif ($subject) { - $this->addTriple($subject, $prop, $value); - } - } - } - - // Step 12: Complete the incomplete triples from the evaluation context - if (!$skip and $subject and ($context['incompleteRels'] or $context['incompleteRevs'])) { - foreach ($context['incompleteRels'] as $prop) { - $this->addTriple( - $context['subject'], - $prop, - array('type' => 'uri', 'value' => $subject) - ); - } - - foreach ($context['incompleteRevs'] as $prop) { - $this->addTriple( - $subject, - $prop, - array('type' => 'uri', 'value' => $context['subject']) - ); - } - } - } - - // Step 13: create a new evaluation context and proceed recursively - if ($node->hasChildNodes()) { - if ($skip) { - $newContext = $context; - } else { - // Prepare a new evaluation context - $newContext = $context; - if ($object) { - $newContext['object'] = $object; - } elseif ($subject) { - $newContext['object'] = $subject; - } else { - $newContext['object'] = $context['subject']; - } - if ($subject) { - $newContext['subject'] = $subject; - } - $newContext['incompleteRels'] = $incompleteRels; - $newContext['incompleteRevs'] = $incompleteRevs; - if (isset($listMapping)) { - $newContext['listMapping'] = $listMapping; - } - } - - // The language is always updated, even if skip is set - $newContext['lang'] = $lang; - - foreach ($node->childNodes as $child) { - if ($child->nodeType === XML_ELEMENT_NODE) { - $this->processNode($child, $newContext, $depth+1); - } - } - } - - // Step 14: create triples for lists - if (!empty($listMapping)) { - foreach ($listMapping as $prop => $list) { - if ($context['listMapping'] !== $listMapping) { - if ($this->debug) { - print "Need to create triples for $prop => ".count($list)." items\n"; - } - $this->generateList($subject, $prop, $list); - } - } - } - } - - /** - * Parse RDFa 1.1 into an EasyRdf_Graph - * - * @param object EasyRdf_Graph $graph the graph to load the data into - * @param string $data the RDF document data - * @param string $format the format of the input data - * @param string $baseUri the base URI of the data being parsed - * @return integer The number of triples added to the graph - */ - public function parse($graph, $data, $format, $baseUri) - { - parent::checkParseParams($graph, $data, $format, $baseUri); - - if ($format != 'rdfa') { - throw new EasyRdf_Exception( - "EasyRdf_Parser_Rdfa does not support: $format" - ); - } - - // Initialise evaluation context. - $context = $this->initialContext(); - - libxml_use_internal_errors(true); - - // Parse the document into DOM - $doc = new DOMDocument(); - // Attempt to parse the document as strict XML, and fall back to HTML - // if XML parsing fails. - if ($doc->loadXML($data, LIBXML_NONET)) { - if ($this->debug) { - print "Document was parsed as XML."; - } - // Collect all xmlns namespaces defined throughout the document. - $sxe = simplexml_import_dom($doc); - $context['xmlns'] = $sxe->getDocNamespaces(true); - unset($context['xmlns']['']); - } else { - $doc->loadHTML($data); - if ($this->debug) { - print "Document was parsed as HTML."; - } - } - - // Establish the base for both XHTML and HTML documents. - $xpath = new DOMXPath($doc); - $xpath->registerNamespace('xh', "http://www.w3.org/1999/xhtml"); - $nodeList = $xpath->query('/xh:html/xh:head/xh:base'); - if ($node = $nodeList->item(0) and $href = $node->getAttribute('href')) { - $this->baseUri = new EasyRdf_ParsedUri($href); - } - $nodeList = $xpath->query('/html/head/base'); - if ($node = $nodeList->item(0) and $href = $node->getAttribute('href')) { - $this->baseUri = new EasyRdf_ParsedUri($href); - } - - // Remove the fragment from the base URI - $this->baseUri->setFragment(null); - - // Recursively process XML nodes - $this->processNode($doc, $context); - - return $this->tripleCount; - } -} diff --git a/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Parser/Redland.php b/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Parser/Redland.php deleted file mode 100644 index bdeb5a2..0000000 --- a/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Parser/Redland.php +++ /dev/null @@ -1,246 +0,0 @@ -remapBnode( - librdf_node_get_blank_identifier($node) - ); - } else { - throw new EasyRdf_Exception("Unsupported type: ".$type); - } - } - - /** - * Convert a node into an associate array - * @ignore - */ - protected function nodeToRdfPhp($node) - { - $object = array(); - $object['type'] = EasyRdf_Parser_Redland::nodeTypeString($node); - if ($object['type'] == 'uri') { - $object['value'] = EasyRdf_Parser_Redland::nodeUriString($node); - } elseif ($object['type'] == 'bnode') { - $object['value'] = '_:'.librdf_node_get_blank_identifier($node); - } elseif ($object['type'] == 'literal') { - $object['value'] = librdf_node_get_literal_value($node); - $lang = librdf_node_get_literal_value_language($node); - if ($lang) { - $object['lang'] = $lang; - } - $datatype = librdf_node_get_literal_value_datatype_uri($node); - if ($datatype) { - $object['datatype'] = librdf_uri_to_string($datatype); - } - } else { - throw new EasyRdf_Exception("Unsupported type: ".$object['type']); - } - return $object; - } - - /** - * Return the number of errors during parsing - * @ignore - */ - protected function parserErrorCount($parser) - { - $errorUri = librdf_new_uri( - $this->world, - self::LIBRDF_PARSER_FEATURE_ERROR_COUNT - ); - $errorNode = librdf_parser_get_feature($parser, $errorUri); - $errorCount = librdf_node_get_literal_value($errorNode); - librdf_free_uri($errorUri); - return $errorCount; - } - - /** - * Constructor - * - * @return object EasyRdf_Parser_Redland - */ - public function __construct() - { - if (extension_loaded('redland')) { - $this->world = librdf_php_get_world(); - if (!$this->world) { - throw new EasyRdf_Exception( - "Failed to initialise librdf world." - ); - } - } else { - throw new EasyRdf_Exception( - "Redland PHP extension is not available." - ); - } - } - - /** - * Parse an RDF document into an EasyRdf_Graph - * - * @param object EasyRdf_Graph $graph the graph to load the data into - * @param string $data the RDF document data - * @param string $format the format of the input data - * @param string $baseUri the base URI of the data being parsed - * @return integer The number of triples added to the graph - */ - public function parse($graph, $data, $format, $baseUri) - { - parent::checkParseParams($graph, $data, $format, $baseUri); - - $parser = librdf_new_parser($this->world, $format, null, null); - if (!$parser) { - throw new EasyRdf_Exception( - "Failed to create librdf_parser of type: $format" - ); - } - - $rdfUri = librdf_new_uri($this->world, $baseUri); - if (!$rdfUri) { - throw new EasyRdf_Exception( - "Failed to create librdf_uri from: $baseUri" - ); - } - - $stream = librdf_parser_parse_string_as_stream($parser, $data, $rdfUri); - if (!$stream) { - throw new EasyRdf_Parser_Exception( - "Failed to parse RDF stream" - ); - } - - do { - $statement = librdf_stream_get_object($stream); - if ($statement) { - $subject = EasyRdf_Parser_Redland::nodeUriString( - librdf_statement_get_subject($statement) - ); - $predicate = EasyRdf_Parser_Redland::nodeUriString( - librdf_statement_get_predicate($statement) - ); - $object = EasyRdf_Parser_Redland::nodeToRdfPhp( - librdf_statement_get_object($statement) - ); - - $this->addTriple($subject, $predicate, $object); - } - } while (!librdf_stream_next($stream)); - - $errorCount = $this->parserErrorCount($parser); - if ($errorCount) { - throw new EasyRdf_Parser_Exception("$errorCount errors while parsing."); - } - - librdf_free_uri($rdfUri); - librdf_free_stream($stream); - librdf_free_parser($parser); - - return $this->tripleCount; - } -} diff --git a/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Parser/Turtle.php b/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Parser/Turtle.php deleted file mode 100644 index 3915e32..0000000 --- a/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Parser/Turtle.php +++ /dev/null @@ -1,1311 +0,0 @@ -data = $data; - $this->namespaces = array(); - $this->subject = null; - $this->predicate = null; - $this->object = null; - - $this->line = 1; - $this->column = 1; - - $this->resetBnodeMap(); - - $c = $this->skipWSC(); - while ($c != -1) { - $this->parseStatement(); - $c = $this->skipWSC(); - } - - return $this->tripleCount; - } - - - /** - * Parse a statement [2] - * @ignore - */ - protected function parseStatement() - { - $directive = ''; - while (true) { - $c = $this->read(); - if ($c == -1 || self::isWhitespace($c)) { - $this->unread($c); - break; - } else { - $directive .= $c; - } - } - - if (preg_match("/^(@|prefix$|base$)/i", $directive)) { - $this->parseDirective($directive); - $this->skipWSC(); - // SPARQL BASE and PREFIX lines do not end in . - if ($directive[0] == "@") { - $this->verifyCharacterOrFail($this->read(), "."); - } - } else { - $this->unread($directive); - $this->parseTriples(); - $this->skipWSC(); - $this->verifyCharacterOrFail($this->read(), "."); - } - } - - /** - * Parse a directive [3] - * @ignore - */ - protected function parseDirective($directive) - { - $directive = strtolower($directive); - if ($directive == "prefix" || $directive == '@prefix') { - $this->parsePrefixID(); - } elseif ($directive == "base" || $directive == '@base') { - $this->parseBase(); - } elseif (mb_strlen($directive) == 0) { - throw new EasyRdf_Parser_Exception( - "Turtle Parse Error: directive name is missing, expected @prefix or @base", - $this->line, - $this->column - ); - } else { - throw new EasyRdf_Parser_Exception( - "Turtle Parse Error: unknown directive \"$directive\"", - $this->line, - $this->column - ); - } - } - - /** - * Parse a prefixID [4] - * @ignore - */ - protected function parsePrefixID() - { - $this->skipWSC(); - - // Read prefix ID (e.g. "rdf:" or ":") - $prefixID = ''; - - while (true) { - $c = $this->read(); - if ($c == ':') { - $this->unread($c); - break; - } elseif (self::isWhitespace($c)) { - break; - } elseif ($c == -1) { - throw new EasyRdf_Parser_Exception( - "Turtle Parse Error: unexpected end of file while reading prefix id", - $this->line, - $this->column - ); - } - - $prefixID .= $c; - } - - $this->skipWSC(); - $this->verifyCharacterOrFail($this->read(), ":"); - $this->skipWSC(); - - // Read the namespace URI - $namespace = $this->parseURI(); - - // Store local namespace mapping - $this->namespaces[$prefixID] = $namespace['value']; - } - - /** - * Parse base [5] - * @ignore - */ - protected function parseBase() - { - $this->skipWSC(); - - $baseUri = $this->parseURI(); - $this->baseUri = new EasyRdf_ParsedUri($baseUri['value']); - } - - /** - * Parse triples [6] - * @ignore - */ - protected function parseTriples() - { - $c = $this->peek(); - - // If the first character is an open bracket we need to decide which of - // the two parsing methods for blank nodes to use - if ($c == '[') { - $c = $this->read(); - $this->skipWSC(); - $c = $this->peek(); - if ($c == ']') { - $c = $this->read(); - $this->subject = $this->createBNode(); - $this->skipWSC(); - $this->parsePredicateObjectList(); - } else { - $this->unread('['); - $this->subject = $this->parseImplicitBlank(); - } - $this->skipWSC(); - $c = $this->peek(); - - // if this is not the end of the statement, recurse into the list of - // predicate and objects, using the subject parsed above as the subject - // of the statement. - if ($c != '.') { - $this->parsePredicateObjectList(); - } - } else { - $this->parseSubject(); - $this->skipWSC(); - $this->parsePredicateObjectList(); - } - - $this->subject = null; - $this->predicate = null; - $this->object = null; - } - - /** - * Parse a predicateObjectList [7] - * @ignore - */ - protected function parsePredicateObjectList() - { - $this->predicate = $this->parsePredicate(); - - $this->skipWSC(); - $this->parseObjectList(); - - while ($this->skipWSC() == ';') { - $this->read(); - - $c = $this->skipWSC(); - - if ($c == '.' || $c == ']') { - break; - } elseif ($c == ';') { - // empty predicateObjectList, skip to next - continue; - } - - $this->predicate = $this->parsePredicate(); - - $this->skipWSC(); - - $this->parseObjectList(); - } - } - - /** - * Parse a objectList [8] - * @ignore - */ - protected function parseObjectList() - { - $this->parseObject(); - - while ($this->skipWSC() == ',') { - $this->read(); - $this->skipWSC(); - $this->parseObject(); - } - } - - /** - * Parse a subject [10] - * @ignore - */ - protected function parseSubject() - { - $c = $this->peek(); - if ($c == '(') { - $this->subject = $this->parseCollection(); - } elseif ($c == '[') { - $this->subject = $this->parseImplicitBlank(); - } else { - $value = $this->parseValue(); - - if ($value['type'] == 'uri' or $value['type'] == 'bnode') { - $this->subject = $value; - } else { - throw new EasyRdf_Parser_Exception( - "Turtle Parse Error: illegal subject type: ".$value['type'], - $this->line, - $this->column - ); - } - } - } - - /** - * Parse a predicate [11] - * @ignore - */ - protected function parsePredicate() - { - // Check if the short-cut 'a' is used - $c1 = $this->read(); - - if ($c1 == 'a') { - $c2 = $this->read(); - - if (self::isWhitespace($c2)) { - // Short-cut is used, return the rdf:type URI - return array( - 'type' => 'uri', - 'value' => EasyRdf_Namespace::get('rdf') . 'type' - ); - } - - // Short-cut is not used, unread all characters - $this->unread($c2); - } - $this->unread($c1); - - // Predicate is a normal resource - $predicate = $this->parseValue(); - if ($predicate['type'] == 'uri') { - return $predicate; - } else { - throw new EasyRdf_Parser_Exception( - "Turtle Parse Error: Illegal predicate type: " . $predicate['type'], - $this->line, - $this->column - ); - } - } - - /** - * Parse a object [12] - * @ignore - */ - protected function parseObject() - { - $c = $this->peek(); - - if ($c == '(') { - $this->object = $this->parseCollection(); - } elseif ($c == '[') { - $this->object = $this->parseImplicitBlank(); - } else { - $this->object = $this->parseValue(); - } - - $this->addTriple( - $this->subject['value'], - $this->predicate['value'], - $this->object - ); - } - - /** - * Parses a blankNodePropertyList [15] - * - * This method parses the token [] - * and predicateObjectLists that are surrounded by square brackets. - * - * @ignore - */ - protected function parseImplicitBlank() - { - $this->verifyCharacterOrFail($this->read(), "["); - - $bnode = $this->createBNode(); - - $c = $this->read(); - if ($c != ']') { - $this->unread($c); - - // Remember current subject and predicate - $oldSubject = $this->subject; - $oldPredicate = $this->predicate; - - // generated bNode becomes subject - $this->subject = $bnode; - - // Enter recursion with nested predicate-object list - $this->skipWSC(); - - $this->parsePredicateObjectList(); - - $this->skipWSC(); - - // Read closing bracket - $this->verifyCharacterOrFail($this->read(), "]"); - - // Restore previous subject and predicate - $this->subject = $oldSubject; - $this->predicate = $oldPredicate; - } - - return $bnode; - } - - /** - * Parses a collection [16], e.g: ( item1 item2 item3 ) - * @ignore - */ - protected function parseCollection() - { - $this->verifyCharacterOrFail($this->read(), "("); - - $c = $this->skipWSC(); - if ($c == ')') { - // Empty list - $this->read(); - return array( - 'type' => 'uri', - 'value' => EasyRdf_Namespace::get('rdf') . 'nil' - ); - } else { - $listRoot = $this->createBNode(); - - // Remember current subject and predicate - $oldSubject = $this->subject; - $oldPredicate = $this->predicate; - - // generated bNode becomes subject, predicate becomes rdf:first - $this->subject = $listRoot; - $this->predicate = array( - 'type' => 'uri', - 'value' => EasyRdf_Namespace::get('rdf') . 'first' - ); - - $this->parseObject(); - $bNode = $listRoot; - - while ($this->skipWSC() != ')') { - // Create another list node and link it to the previous - $newNode = $this->createBNode(); - - $this->addTriple( - $bNode['value'], - EasyRdf_Namespace::get('rdf') . 'rest', - $newNode - ); - - // New node becomes the current - $this->subject = $bNode = $newNode; - - $this->parseObject(); - } - - // Skip ')' - $this->read(); - - // Close the list - $this->addTriple( - $bNode['value'], - EasyRdf_Namespace::get('rdf') . 'rest', - array( - 'type' => 'uri', - 'value' => EasyRdf_Namespace::get('rdf') . 'nil' - ) - ); - - // Restore previous subject and predicate - $this->subject = $oldSubject; - $this->predicate = $oldPredicate; - - return $listRoot; - } - } - - /** - * Parses an RDF value. This method parses uriref, qname, node ID, quoted - * literal, integer, double and boolean. - * @ignore - */ - protected function parseValue() - { - $c = $this->peek(); - - if ($c == '<') { - // uriref, e.g. - return $this->parseURI(); - } elseif ($c == ':' || self::isPrefixStartChar($c)) { - // qname or boolean - return $this->parseQNameOrBoolean(); - } elseif ($c == '_') { - // node ID, e.g. _:n1 - return $this->parseNodeID(); - } elseif ($c == '"' || $c == "'") { - // quoted literal, e.g. "foo" or """foo""" or 'foo' or '''foo''' - return $this->parseQuotedLiteral(); - } elseif (ctype_digit($c) || $c == '.' || $c == '+' || $c == '-') { - // integer or double, e.g. 123 or 1.2e3 - return $this->parseNumber(); - } elseif ($c == -1) { - throw new EasyRdf_Parser_Exception( - "Turtle Parse Error: unexpected end of file while reading value", - $this->line, - $this->column - ); - } else { - throw new EasyRdf_Parser_Exception( - "Turtle Parse Error: expected an RDF value here, found '$c'", - $this->line, - $this->column - ); - } - } - - /** - * Parses a quoted string, optionally followed by a language tag or datatype. - * @ignore - */ - protected function parseQuotedLiteral() - { - $label = $this->parseQuotedString(); - - // Check for presence of a language tag or datatype - $c = $this->peek(); - - if ($c == '@') { - $this->read(); - - // Read language - $lang = ''; - $c = $this->read(); - if ($c == -1) { - throw new EasyRdf_Parser_Exception( - "Turtle Parse Error: unexpected end of file while reading language", - $this->line, - $this->column - ); - } elseif (!self::isLanguageStartChar($c)) { - throw new EasyRdf_Parser_Exception( - "Turtle Parse Error: expected a letter, found '$c'", - $this->line, - $this->column - ); - } - - $lang .= $c; - - $c = $this->read(); - while (!self::isWhitespace($c)) { - if ($c == '.' || $c == ';' || $c == ',' || $c == ')' || $c == ']' || $c == -1) { - break; - } - if (self::isLanguageChar($c)) { - $lang .= $c; - } else { - throw new EasyRdf_Parser_Exception( - "Turtle Parse Error: illegal language tag char: '$c'", - $this->line, - $this->column - ); - } - $c = $this->read(); - } - - $this->unread($c); - - return array( - 'type' => 'literal', - 'value' => $label, - 'lang' => $lang - ); - } elseif ($c == '^') { - $this->read(); - - // next character should be another '^' - $this->verifyCharacterOrFail($this->read(), "^"); - - // Read datatype - $datatype = $this->parseValue(); - if ($datatype['type'] == 'uri') { - return array( - 'type' => 'literal', - 'value' => $label, - 'datatype' => $datatype['value'] - ); - } else { - throw new EasyRdf_Parser_Exception( - "Turtle Parse Error: illegal datatype type: " . $datatype['type'], - $this->line, - $this->column - ); - } - } else { - return array( - 'type' => 'literal', - 'value' => $label - ); - } - } - - /** - * Parses a quoted string, which is either a "normal string" or a """long string""". - * @ignore - */ - protected function parseQuotedString() - { - $result = null; - - $c1 = $this->read(); - - // First character should be ' or " - $this->verifyCharacterOrFail($c1, "\"\'"); - - // Check for long-string, which starts and ends with three double quotes - $c2 = $this->read(); - $c3 = $this->read(); - - if ($c2 == $c1 && $c3 == $c1) { - // Long string - $result = $this->parseLongString($c2); - } else { - // Normal string - $this->unread($c3); - $this->unread($c2); - - $result = $this->parseString($c1); - } - - // Unescape any escape sequences - return $this->unescapeString($result); - } - - /** - * Parses a "normal string". This method requires that the opening character - * has already been parsed. - * @param string $closingCharacter The type of quote to use (either ' or ") - * @ignore - */ - protected function parseString($closingCharacter) - { - $str = ''; - - while (true) { - $c = $this->read(); - - if ($c == $closingCharacter) { - break; - } elseif ($c == -1) { - throw new EasyRdf_Parser_Exception( - "Turtle Parse Error: unexpected end of file while reading string", - $this->line, - $this->column - ); - } - - $str .= $c; - - if ($c == '\\') { - // This escapes the next character, which might be a ' or a " - $c = $this->read(); - if ($c == -1) { - throw new EasyRdf_Parser_Exception( - "Turtle Parse Error: unexpected end of file while reading string", - $this->line, - $this->column - ); - } - $str .= $c; - } - } - - return $str; - } - - /** - * Parses a """long string""". This method requires that the first three - * characters have already been parsed. - * @param string $closingCharacter The type of quote to use (either ' or ") - * @ignore - */ - protected function parseLongString($closingCharacter) - { - $str = ''; - $doubleQuoteCount = 0; - - while ($doubleQuoteCount < 3) { - $c = $this->read(); - - if ($c == -1) { - throw new EasyRdf_Parser_Exception( - "Turtle Parse Error: unexpected end of file while reading long string", - $this->line, - $this->column - ); - } elseif ($c == $closingCharacter) { - $doubleQuoteCount++; - } else { - $doubleQuoteCount = 0; - } - - $str .= $c; - - if ($c == '\\') { - // This escapes the next character, which might be a ' or " - $c = $this->read(); - if ($c == -1) { - throw new EasyRdf_Parser_Exception( - "Turtle Parse Error: unexpected end of file while reading long string", - $this->line, - $this->column - ); - } - $str .= $c; - } - } - - return mb_substr($str, 0, -3); - } - - /** - * Parses a numeric value, either of type integer, decimal or double - * @ignore - */ - protected function parseNumber() - { - $value = ''; - $datatype = EasyRdf_Namespace::get('xsd').'integer'; - - $c = $this->read(); - - // read optional sign character - if ($c == '+' || $c == '-') { - $value .= $c; - $c = $this->read(); - } - - while (ctype_digit($c)) { - $value .= $c; - $c = $this->read(); - } - - if ($c == '.' || $c == 'e' || $c == 'E') { - // read optional fractional digits - if ($c == '.') { - - if (self::isWhitespace($this->peek())) { - // We're parsing an integer that did not have a space before the - // period to end the statement - } else { - $value .= $c; - $c = $this->read(); - while (ctype_digit($c)) { - $value .= $c; - $c = $this->read(); - } - - if (mb_strlen($value) == 1) { - // We've only parsed a '.' - throw new EasyRdf_Parser_Exception( - "Turtle Parse Error: object for statement missing", - $this->line, - $this->column - ); - } - - // We're parsing a decimal or a double - $datatype = EasyRdf_Namespace::get('xsd').'decimal'; - } - } else { - if (mb_strlen($value) == 0) { - // We've only parsed an 'e' or 'E' - throw new EasyRdf_Parser_Exception( - "Turtle Parse Error: object for statement missing", - $this->line, - $this->column - ); - } - } - - // read optional exponent - if ($c == 'e' || $c == 'E') { - $datatype = EasyRdf_Namespace::get('xsd').'double'; - $value .= $c; - - $c = $this->read(); - if ($c == '+' || $c == '-') { - $value .= $c; - $c = $this->read(); - } - - if (!ctype_digit($c)) { - throw new EasyRdf_Parser_Exception( - "Turtle Parse Error: exponent value missing", - $this->line, - $this->column - ); - } - - $value .= $c; - - $c = $this->read(); - while (ctype_digit($c)) { - $value .= $c; - $c = $this->read(); - } - } - } - - // Unread last character, it isn't part of the number - $this->unread($c); - - // Return result as a typed literal - return array( - 'type' => 'literal', - 'value' => $value, - 'datatype' => $datatype - ); - } - - /** - * Parses a URI / IRI - * @ignore - */ - protected function parseURI() - { - $uri = ''; - - // First character should be '<' - $this->verifyCharacterOrFail($this->read(), "<"); - - // Read up to the next '>' character - while (true) { - $c = $this->read(); - - if ($c == '>') { - break; - } elseif ($c == -1) { - throw new EasyRdf_Parser_Exception( - "Turtle Parse Error: unexpected end of file while reading URI", - $this->line, - $this->column - ); - } - - $uri .= $c; - - if ($c == '\\') { - // This escapes the next character, which might be a '>' - $c = $this->read(); - if ($c == -1) { - throw new EasyRdf_Parser_Exception( - "Turtle Parse Error: unexpected end of file while reading URI", - $this->line, - $this->column - ); - } - $uri .= $c; - } - } - - // Unescape any escape sequences - $uri = $this->unescapeString($uri); - - return array( - 'type' => 'uri', - 'value' => $this->resolve($uri) - ); - } - - /** - * Parses qnames and boolean values, which have equivalent starting - * characters. - * @ignore - */ - protected function parseQNameOrBoolean() - { - // First character should be a ':' or a letter - $c = $this->read(); - if ($c == -1) { - throw new EasyRdf_Parser_Exception( - "Turtle Parse Error: unexpected end of file while readying value", - $this->line, - $this->column - ); - } - if ($c != ':' && !self::isPrefixStartChar($c)) { - throw new EasyRdf_Parser_Exception( - "Turtle Parse Error: expected a ':' or a letter, found '$c'", - $this->line, - $this->column - ); - } - - $namespace = null; - - if ($c == ':') { - // qname using default namespace - if (isset($this->namespaces[''])) { - $namespace = $this->namespaces['']; - } else { - throw new EasyRdf_Parser_Exception( - "Turtle Parse Error: default namespace used but not defined", - $this->line, - $this->column - ); - } - } else { - // $c is the first letter of the prefix - $prefix = $c; - - $c = $this->read(); - while (self::isPrefixChar($c)) { - $prefix .= $c; - $c = $this->read(); - } - - if ($c != ':') { - // prefix may actually be a boolean value - $value = $prefix; - - if ($value == "true" || $value == "false") { - return array( - 'type' => 'literal', - 'value' => $value, - 'datatype' => EasyRdf_Namespace::get('xsd') . 'boolean' - ); - } - } - - $this->verifyCharacterOrFail($c, ":"); - - if (isset($this->namespaces[$prefix])) { - $namespace = $this->namespaces[$prefix]; - } else { - throw new EasyRdf_Parser_Exception( - "Turtle Parse Error: namespace prefix '$prefix' used but not defined", - $this->line, - $this->column - ); - } - } - - // $c == ':', read optional local name - $localName = ''; - $c = $this->read(); - if (self::isNameStartChar($c)) { - if ($c == '\\') { - $localName .= $this->readLocalEscapedChar(); - } else { - $localName .= $c; - } - - $c = $this->read(); - while (self::isNameChar($c)) { - if ($c == '\\') { - $localName .= $this->readLocalEscapedChar(); - } else { - $localName .= $c; - } - $c = $this->read(); - } - } - - // Unread last character - $this->unread($c); - - // Note: namespace has already been resolved - return array( - 'type' => 'uri', - 'value' => $namespace . $localName - ); - } - - protected function readLocalEscapedChar() - { - $c = $this->read(); - - if (self::isLocalEscapedChar($c)) { - return $c; - } else { - throw new EasyRdf_Parser_Exception( - "found '" . $c . "', expected one of: " . implode(', ', self::$localEscapedChars), - $this->line, - $this->column - ); - } - } - - /** - * Parses a blank node ID, e.g: _:node1 - * @ignore - */ - protected function parseNodeID() - { - // Node ID should start with "_:" - $this->verifyCharacterOrFail($this->read(), "_"); - $this->verifyCharacterOrFail($this->read(), ":"); - - // Read the node ID - $c = $this->read(); - if ($c == -1) { - throw new EasyRdf_Parser_Exception( - "Turtle Parse Error: unexpected end of file while reading node id", - $this->line, - $this->column - ); - } elseif (!self::isNameStartChar($c)) { - throw new EasyRdf_Parser_Exception( - "Turtle Parse Error: expected a letter, found '$c'", - $this->line, - $this->column - ); - } - - // Read all following letter and numbers, they are part of the name - $name = $c; - $c = $this->read(); - while (self::isNameChar($c)) { - $name .= $c; - $c = $this->read(); - } - - $this->unread($c); - - return array( - 'type' => 'bnode', - 'value' => $this->remapBnode($name) - ); - } - - protected function resolve($uri) - { - if ($this->baseUri) { - return $this->baseUri->resolve($uri)->toString(); - } else { - return $uri; - } - } - - /** - * Verifies that the supplied character $c is one of the expected - * characters specified in $expected. This method will throw a - * exception if this is not the case. - * @ignore - */ - protected function verifyCharacterOrFail($c, $expected) - { - if ($c == -1) { - throw new EasyRdf_Parser_Exception( - "Turtle Parse Error: unexpected end of file", - $this->line, - $this->column - ); - } elseif (strpbrk($c, $expected) === false) { - $msg = 'expected '; - for ($i = 0; $i < strlen($expected); $i++) { - if ($i > 0) { - $msg .= " or "; - } - $msg .= '\''.$expected[$i].'\''; - } - $msg .= ", found '$c'"; - - throw new EasyRdf_Parser_Exception( - "Turtle Parse Error: $msg", - $this->line, - $this->column - ); - } - } - - /** - * Skip through whitespace and comments - * @ignore - */ - protected function skipWSC() - { - $c = $this->read(); - while (self::isWhitespace($c) || $c == '#') { - if ($c == '#') { - $this->processComment(); - } - - $c = $this->read(); - } - - $this->unread($c); - return $c; - } - - /** - * Consumes characters from reader until the first EOL has been read. - * @ignore - */ - protected function processComment() - { - $comment = ''; - $c = $this->read(); - while ($c != -1 && $c != "\r" && $c != "\n") { - $comment .= $c; - $c = $this->read(); - } - - // c is equal to -1, \r or \n. - // In case c is equal to \r, we should also read a following \n. - if ($c == "\r") { - $c = $this->read(); - if ($c != "\n") { - $this->unread($c); - } - } - } - - /** - * Read a single character from the input buffer. - * Returns -1 when the end of the file is reached. - * @ignore - */ - protected function read() - { - if (!empty($this->data)) { - $c = mb_substr($this->data, 0, 1); - // Keep tracks of which line we are on (0A = Line Feed) - if ($c == "\x0A") { - $this->line += 1; - $this->column = 1; - } else { - $this->column += 1; - } - $this->data = mb_substr($this->data, 1); - return $c; - } else { - return -1; - } - } - - /** - * Gets the next character to be returned by read() - * without removing it from the input buffer. - * @ignore - */ - protected function peek() - { - if (!empty($this->data)) { - return mb_substr($this->data, 0, 1); - } else { - return -1; - } - } - - - /** - * Steps back, restoring the previous character read() to the input buffer - * @ignore - */ - protected function unread($c) - { - # FIXME: deal with unreading new lines - $this->column -= mb_strlen($c); - $this->data = $c . $this->data; - } - - /** @ignore */ - protected function createBNode() - { - return array( - 'type' => 'bnode', - 'value' => $this->graph->newBNodeId() - ); - } - - /** - * Returns true if $c is a whitespace character - * @ignore - */ - public static function isWhitespace($c) - { - // Whitespace character are space, tab, newline and carriage return: - return $c == "\x20" || $c == "\x09" || $c == "\x0A" || $c == "\x0D"; - } - - /** @ignore */ - public static function isPrefixStartChar($c) - { - $o = ord($c); - return - $o >= 0x41 && $o <= 0x5a || # A-Z - $o >= 0x61 && $o <= 0x7a || # a-z - $o >= 0x00C0 && $o <= 0x00D6 || - $o >= 0x00D8 && $o <= 0x00F6 || - $o >= 0x00F8 && $o <= 0x02FF || - $o >= 0x0370 && $o <= 0x037D || - $o >= 0x037F && $o <= 0x1FFF || - $o >= 0x200C && $o <= 0x200D || - $o >= 0x2070 && $o <= 0x218F || - $o >= 0x2C00 && $o <= 0x2FEF || - $o >= 0x3001 && $o <= 0xD7FF || - $o >= 0xF900 && $o <= 0xFDCF || - $o >= 0xFDF0 && $o <= 0xFFFD || - $o >= 0x10000 && $o <= 0xEFFFF; - } - - /** @ignore */ - public static function isNameStartChar($c) - { - return - $c == '\\' || - $c == '_' || - $c == ':' || - $c == '%' || - ctype_digit($c) || - self::isPrefixStartChar($c); - } - - /** @ignore */ - public static function isNameChar($c) - { - $o = ord($c); - return - self::isNameStartChar($c) || - $o >= 0x30 && $o <= 0x39 || # 0-9 - $c == '-' || - $o == 0x00B7 || - $o >= 0x0300 && $o <= 0x036F || - $o >= 0x203F && $o <= 0x2040; - } - - /** @ignore */ - private static $localEscapedChars = array( - '_', '~', '.', '-', '!', '$', '&', '\'', '(', ')', - '*', '+', ',', ';', '=', '/', '?', '#', '@', '%' - ); - - /** @ignore */ - public static function isLocalEscapedChar($c) - { - return in_array($c, self::$localEscapedChars); - } - - /** @ignore */ - public static function isPrefixChar($c) - { - $o = ord($c); - return - $c == '_' || - $o >= 0x30 && $o <= 0x39 || # 0-9 - self::isPrefixStartChar($c) || - $c == '-' || - $o == 0x00B7 || - $c >= 0x0300 && $c <= 0x036F || - $c >= 0x203F && $c <= 0x2040; - } - - /** @ignore */ - public static function isLanguageStartChar($c) - { - $o = ord($c); - return - $o >= 0x41 && $o <= 0x5a || # A-Z - $o >= 0x61 && $o <= 0x7a; # a-z - } - - /** @ignore */ - public static function isLanguageChar($c) - { - $o = ord($c); - return - $o >= 0x41 && $o <= 0x5a || # A-Z - $o >= 0x61 && $o <= 0x7a || # a-z - $o >= 0x30 && $o <= 0x39 || # 0-9 - $c == '-'; - } -} diff --git a/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Resource.php b/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Resource.php deleted file mode 100644 index e5d1e91..0000000 --- a/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Resource.php +++ /dev/null @@ -1,707 +0,0 @@ -resource('http://www.example.com/'); - * - */ - public function __construct($uri, $graph = null) - { - if (!is_string($uri) or $uri == null or $uri == '') { - throw new InvalidArgumentException( - "\$uri should be a string and cannot be null or empty" - ); - } - - $this->uri = $uri; - - # Check that $graph is an EasyRdf_Graph object - if (is_object($graph) and $graph instanceof EasyRdf_Graph) { - $this->graph = $graph; - } elseif (!is_null($graph)) { - throw new InvalidArgumentException( - "\$graph should be an EasyRdf_Graph object" - ); - } - } - - /** - * Return the graph that this resource belongs to - * - * @return EasyRdf_Graph - */ - public function getGraph() - { - return $this->graph; - } - - /** Returns the URI for the resource. - * - * @return string URI of this resource. - */ - public function getUri() - { - return $this->uri; - } - - /** Check to see if a resource is a blank node. - * - * @return bool True if this resource is a blank node. - */ - public function isBNode() - { - if (substr($this->uri, 0, 2) == '_:') { - return true; - } else { - return false; - } - } - - /** Get the identifier for a blank node - * - * Returns null if the resource is not a blank node. - * - * @return string The identifer for the bnode - */ - public function getBNodeId() - { - if (substr($this->uri, 0, 2) == '_:') { - return substr($this->uri, 2); - } else { - return null; - } - } - - /** Get a the prefix of the namespace that this resource is part of - * - * This method will return null the resource isn't part of any - * registered namespace. - * - * @return string The namespace prefix of the resource (e.g. foaf) - */ - public function prefix() - { - return EasyRdf_Namespace::prefixOfUri($this->uri); - } - - /** Get a shortened version of the resources URI. - * - * This method will return the full URI if the resource isn't part of any - * registered namespace. - * - * @return string The shortened URI of this resource (e.g. foaf:name) - */ - public function shorten() - { - return EasyRdf_Namespace::shorten($this->uri); - } - - /** Gets the local name of the URI of this resource - * - * The local name is defined as the part of the URI string - * after the last occurrence of the '#', ':' or '/' character. - * - * @return string The local name - */ - public function localName() - { - if (preg_match("|([^#:/]+)$|", $this->uri, $matches)) { - return $matches[1]; - } - } - - /** Parse the URI of the resource and return as a ParsedUri object - * - * @return EasyRdf_ParsedUri - */ - public function parseUri() - { - return new EasyRdf_ParsedUri($this->uri); - } - - /** Generates an HTML anchor tag, linking to this resource. - * - * If no text is given, then the URI also uses as the link text. - * - * @param string $text Text for the link. - * @param array $options Associative array of attributes for the anchor tag - * @return string The HTML link string - */ - public function htmlLink($text = null, $options = array()) - { - $options = array_merge(array('href' => $this->uri), $options); - if ($text === null) { - $text = $this->uri; - } - - $html = " $value) { - if (!preg_match('/^[-\w]+$/', $key)) { - throw new InvalidArgumentException( - "\$options should use valid attribute names as keys" - ); - } - - $html .= " ".htmlspecialchars($key)."=\"". - htmlspecialchars($value)."\""; - } - $html .= ">".htmlspecialchars($text).""; - - return $html; - } - - /** Returns the properties of the resource as an RDF/PHP associative array - * - * For example: - * array('type' => 'uri', 'value' => 'http://www.example.com/') - * - * @return array The properties of the resource - */ - public function toRdfPhp() - { - if ($this->isBNode()) { - return array('type' => 'bnode', 'value' => $this->uri); - } else { - return array('type' => 'uri', 'value' => $this->uri); - } - } - - /** Return pretty-print view of the resource - * - * @param string $format Either 'html' or 'text' - * @param string $color The colour of the text - * @return string - */ - public function dumpValue($format = 'html', $color = 'blue') - { - return EasyRdf_Utils::dumpResourceValue($this, $format, $color); - } - - /** Magic method to return URI of resource when casted to string - * - * @return string The URI of the resource - */ - public function __toString() - { - return $this->uri; - } - - - - /** Throw can exception if the resource does not belong to a graph - * @ignore - */ - protected function checkHasGraph() - { - if (!$this->graph) { - throw new EasyRdf_Exception( - "EasyRdf_Resource is not part of a graph." - ); - } - } - - /** Perform a load (download of remote URI) of the resource into the graph - * - * The document type is optional but should be specified if it - * can't be guessed or got from the HTTP headers. - * - * @param string $format Optional format of the data (eg. rdfxml) - */ - public function load($format = null) - { - $this->checkHasGraph(); - return $this->graph->load($this->uri, $format); - } - - /** Delete a property (or optionally just a specific value) - * - * @param string $property The name of the property (e.g. foaf:name) - * @param object $value The value to delete (null to delete all values) - * @return null - */ - public function delete($property, $value = null) - { - $this->checkHasGraph(); - return $this->graph->delete($this->uri, $property, $value); - } - - /** Add values to for a property of the resource - * - * Example: - * $resource->add('prefix:property', 'value'); - * - * @param mixed $property The property name - * @param mixed $value The value for the property - * @return integer The number of values added (1 or 0) - */ - public function add($property, $value) - { - $this->checkHasGraph(); - return $this->graph->add($this->uri, $property, $value); - } - - /** Add a literal value as a property of the resource - * - * The value can either be a single value or an array of values. - * - * Example: - * $resource->add('dc:title', 'Title of Page'); - * - * @param mixed $property The property name - * @param mixed $values The value or values for the property - * @param string $lang The language of the literal - * @return integer The number of values added - */ - public function addLiteral($property, $values, $lang = null) - { - $this->checkHasGraph(); - return $this->graph->addLiteral($this->uri, $property, $values, $lang); - } - - /** Add a resource as a property of the resource - * - * Example: - * $bob->add('foaf:knows', 'http://example.com/alice'); - * - * @param mixed $property The property name - * @param mixed $resource2 The resource to be the value of the property - * @return integer The number of values added (1 or 0) - */ - public function addResource($property, $resource2) - { - $this->checkHasGraph(); - return $this->graph->addResource($this->uri, $property, $resource2); - } - - /** Set value for a property - * - * The new value(s) will replace the existing values for the property. - * The name of the property should be a string. - * If you set a property to null or an empty array, then the property - * will be deleted. - * - * @param string $property The name of the property (e.g. foaf:name) - * @param mixed $value The value for the property. - * @return integer The number of values added (1 or 0) - */ - public function set($property, $value) - { - $this->checkHasGraph(); - return $this->graph->set($this->uri, $property, $value); - } - - /** Get a single value for a property - * - * If multiple values are set for a property then the value returned - * may be arbitrary. - * - * If $property is an array, then the first item in the array that matches - * a property that exists is returned. - * - * This method will return null if the property does not exist. - * - * @param string|array $property The name of the property (e.g. foaf:name) - * @param string $type The type of value to filter by (e.g. literal or resource) - * @param string $lang The language to filter by (e.g. en) - * @return mixed A value associated with the property - */ - public function get($property, $type = null, $lang = null) - { - $this->checkHasGraph(); - return $this->graph->get($this->uri, $property, $type, $lang); - } - - /** Get a single literal value for a property of the resource - * - * If multiple values are set for a property then the value returned - * may be arbitrary. - * - * This method will return null if there is not literal value for the - * property. - * - * @param string|array $property The name of the property (e.g. foaf:name) - * @param string $lang The language to filter by (e.g. en) - * @return object EasyRdf_Literal Literal value associated with the property - */ - public function getLiteral($property, $lang = null) - { - $this->checkHasGraph(); - return $this->graph->get($this->uri, $property, 'literal', $lang); - } - - /** Get a single resource value for a property of the resource - * - * If multiple values are set for a property then the value returned - * may be arbitrary. - * - * This method will return null if there is not resource for the - * property. - * - * @param string|array $property The name of the property (e.g. foaf:name) - * @return object EasyRdf_Resource Resource associated with the property - */ - public function getResource($property) - { - $this->checkHasGraph(); - return $this->graph->get($this->uri, $property, 'resource'); - } - - /** Get all values for a property - * - * This method will return an empty array if the property does not exist. - * - * @param string $property The name of the property (e.g. foaf:name) - * @param string $type The type of value to filter by (e.g. literal) - * @param string $lang The language to filter by (e.g. en) - * @return array An array of values associated with the property - */ - public function all($property, $type = null, $lang = null) - { - $this->checkHasGraph(); - return $this->graph->all($this->uri, $property, $type, $lang); - } - - /** Get all literal values for a property of the resource - * - * This method will return an empty array if the resource does not - * has any literal values for that property. - * - * @param string $property The name of the property (e.g. foaf:name) - * @param string $lang The language to filter by (e.g. en) - * @return array An array of values associated with the property - */ - public function allLiterals($property, $lang = null) - { - $this->checkHasGraph(); - return $this->graph->all($this->uri, $property, 'literal', $lang); - } - - /** Get all resources for a property of the resource - * - * This method will return an empty array if the resource does not - * has any resources for that property. - * - * @param string $property The name of the property (e.g. foaf:name) - * @return array An array of values associated with the property - */ - public function allResources($property) - { - $this->checkHasGraph(); - return $this->graph->all($this->uri, $property, 'resource'); - } - - /** Count the number of values for a property of a resource - * - * This method will return 0 if the property does not exist. - * - * @param string $property The name of the property (e.g. foaf:name) - * @param string $type The type of value to filter by (e.g. literal) - * @param string $lang The language to filter by (e.g. en) - * @return integer The number of values associated with the property - */ - public function countValues($property, $type = null, $lang = null) - { - $this->checkHasGraph(); - return $this->graph->countValues($this->uri, $property, $type, $lang); - } - - /** Concatenate all values for a property into a string. - * - * The default is to join the values together with a space character. - * This method will return an empty string if the property does not exist. - * - * @param string $property The name of the property (e.g. foaf:name) - * @param string $glue The string to glue the values together with. - * @param string $lang The language to filter by (e.g. en) - * @return string Concatenation of all the values. - */ - public function join($property, $glue = ' ', $lang = null) - { - $this->checkHasGraph(); - return $this->graph->join($this->uri, $property, $glue, $lang); - } - - /** Get a list of the full URIs for the properties of this resource. - * - * This method will return an empty array if the resource has no properties. - * - * @return array Array of full URIs - */ - public function propertyUris() - { - $this->checkHasGraph(); - return $this->graph->propertyUris($this->uri); - } - - /** Get a list of all the shortened property names (qnames) for a resource. - * - * This method will return an empty array if the resource has no properties. - * - * @return array Array of shortened URIs - */ - public function properties() - { - $this->checkHasGraph(); - return $this->graph->properties($this->uri); - } - - /** Get a list of the full URIs for the properties that point to this resource. - * - * @return array Array of full property URIs - */ - public function reversePropertyUris() - { - $this->checkHasGraph(); - return $this->graph->reversePropertyUris($this->uri); - } - - /** Check to see if a property exists for this resource. - * - * This method will return true if the property exists. - * If the value parameter is given, then it will only return true - * if the value also exists for that property. - * - * @param string $property The name of the property (e.g. foaf:name) - * @param mixed $value An optional value of the property - * @return bool True if value the property exists. - */ - public function hasProperty($property, $value = null) - { - $this->checkHasGraph(); - return $this->graph->hasProperty($this->uri, $property, $value); - } - - /** Get a list of types for a resource. - * - * The types will each be a shortened URI as a string. - * This method will return an empty array if the resource has no types. - * - * @return array All types assocated with the resource (e.g. foaf:Person) - */ - public function types() - { - $this->checkHasGraph(); - return $this->graph->types($this->uri); - } - - /** Get a single type for a resource. - * - * The type will be a shortened URI as a string. - * If the resource has multiple types then the type returned - * may be arbitrary. - * This method will return null if the resource has no type. - * - * @return string A type assocated with the resource (e.g. foaf:Person) - */ - public function type() - { - $this->checkHasGraph(); - return $this->graph->type($this->uri); - } - - /** Get a single type for a resource, as a resource. - * - * The type will be returned as an EasyRdf_Resource. - * If the resource has multiple types then the type returned - * may be arbitrary. - * This method will return null if the resource has no type. - * - * @return EasyRdf_Resource A type assocated with the resource. - */ - public function typeAsResource() - { - return $this->graph->typeAsResource($this->uri); - } - - /** Check if a resource is of the specified type - * - * @param string $type The type to check (e.g. foaf:Person) - * @return boolean True if resource is of specified type. - */ - public function isA($type) - { - $this->checkHasGraph(); - return $this->graph->isA($this->uri, $type); - } - - /** Add one or more rdf:type properties to the resource - * - * @param string $types One or more types to add (e.g. foaf:Person) - * @return integer The number of types added - */ - public function addType($types) - { - $this->checkHasGraph(); - return $this->graph->addType($this->uri, $types); - } - - /** Change the rdf:type property for the resource - * - * Note that the PHP class of the resource will not change. - * - * @param string $type The new type (e.g. foaf:Person) - * @return integer The number of types added - */ - public function setType($type) - { - $this->checkHasGraph(); - return $this->graph->setType($this->uri, $type); - } - - /** Get the primary topic of this resource. - * - * Returns null if no primary topic is available. - * - * @return EasyRdf_Resource The primary topic of this resource. - */ - public function primaryTopic() - { - $this->checkHasGraph(); - return $this->graph->primaryTopic($this->uri); - } - - /** Get a human readable label for this resource - * - * This method will check a number of properties for the resource - * (in the order: skos:prefLabel, rdfs:label, foaf:name, dc:title) - * and return an approriate first that is available. If no label - * is available then it will return null. - * - * @return string A label for the resource. - */ - public function label($lang = null) - { - $this->checkHasGraph(); - return $this->graph->label($this->uri, $lang); - } - - /** Return a human readable view of the resource and its properties - * - * This method is intended to be a debugging aid and will - * print a resource and its properties. - * - * @param string $format Either 'html' or 'text' - * @return string - */ - public function dump($format = 'html') - { - $this->checkHasGraph(); - return $this->graph->dumpResource($this->uri, $format); - } - - /** Magic method to get a property of a resource - * - * Note that only properties in the default namespace can be accessed in this way. - * - * Example: - * $value = $resource->title; - * - * @see EasyRdf_Namespace::setDefault() - * @param string $name The name of the property - * @return string A single value for the named property - */ - public function __get($name) - { - return $this->graph->get($this->uri, $name); - } - - /** Magic method to set the value for a property of a resource - * - * Note that only properties in the default namespace can be accessed in this way. - * - * Example: - * $resource->title = 'Title'; - * - * @see EasyRdf_Namespace::setDefault() - * @param string $name The name of the property - * @param string $value The value for the property - */ - public function __set($name, $value) - { - return $this->graph->set($this->uri, $name, $value); - } - - /** Magic method to check if a property exists - * - * Note that only properties in the default namespace can be accessed in this way. - * - * Example: - * if (isset($resource->title)) { blah(); } - * - * @see EasyRdf_Namespace::setDefault() - * @param string $name The name of the property - */ - public function __isset($name) - { - return $this->graph->hasProperty($this->uri, $name); - } - - /** Magic method to delete a property of the resource - * - * Note that only properties in the default namespace can be accessed in this way. - * - * Example: - * unset($resource->title); - * - * @see EasyRdf_Namespace::setDefault() - * @param string $name The name of the property - */ - public function __unset($name) - { - return $this->graph->delete($this->uri, $name); - } -} diff --git a/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Serialiser.php b/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Serialiser.php deleted file mode 100644 index 1c0acb8..0000000 --- a/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Serialiser.php +++ /dev/null @@ -1,116 +0,0 @@ -prefixes[$prefix] = true; - } - - /** - * Check and cleanup parameters passed to serialise() method - * @ignore - */ - protected function checkSerialiseParams(&$graph, &$format) - { - if (is_null($graph) or !is_object($graph) or !($graph instanceof EasyRdf_Graph)) { - throw new InvalidArgumentException( - "\$graph should be an EasyRdf_Graph object and cannot be null" - ); - } - - if (is_null($format) or $format == '') { - throw new InvalidArgumentException( - "\$format cannot be null or empty" - ); - } elseif (is_object($format) and ($format instanceof EasyRdf_Format)) { - $format = $format->getName(); - } elseif (!is_string($format)) { - throw new InvalidArgumentException( - "\$format should be a string or an EasyRdf_Format object" - ); - } - } - - /** - * Protected method to get the number of reverse properties for a resource - * If a resource only has a single property, the number of values for that - * property is returned instead. - * @ignore - */ - protected function reversePropertyCount($resource) - { - $properties = $resource->reversePropertyUris(); - $count = count($properties); - if ($count == 1) { - $property = $properties[0]; - return $resource->countValues("^<$property>"); - } else { - return $count; - } - } - - /** - * Sub-classes must follow this protocol - * @ignore - */ - public function serialise($graph, $format, array $options = array()) - { - throw new EasyRdf_Exception( - "This method should be overridden by sub-classes." - ); - } -} diff --git a/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Serialiser/Arc.php b/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Serialiser/Arc.php deleted file mode 100644 index 31bd8b7..0000000 --- a/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Serialiser/Arc.php +++ /dev/null @@ -1,98 +0,0 @@ - 'RDFXML', - 'turtle' => 'Turtle', - 'ntriples' => 'NTriples', - 'posh' => 'POSHRDF' - ); - - /** - * Constructor - * - * @return object EasyRdf_Serialiser_Arc - */ - public function __construct() - { - require_once 'arc/ARC2.php'; - } - - /** - * Serialise an EasyRdf_Graph into RDF format of choice. - * - * @param EasyRdf_Graph $graph An EasyRdf_Graph object. - * @param string $format The name of the format to convert to. - * @param array $options - * @throws EasyRdf_Exception - * @return string The RDF in the new desired format. - */ - public function serialise($graph, $format, array $options = array()) - { - parent::checkSerialiseParams($graph, $format); - - if (array_key_exists($format, self::$supportedTypes)) { - $className = self::$supportedTypes[$format]; - } else { - throw new EasyRdf_Exception( - "EasyRdf_Serialiser_Arc does not support: $format" - ); - } - - $serialiser = ARC2::getSer($className); - if ($serialiser) { - return $serialiser->getSerializedIndex( - parent::serialise($graph, 'php') - ); - } else { - throw new EasyRdf_Exception( - "ARC2 failed to get a $className serialiser." - ); - } - } -} - -EasyRdf_Format::register('posh', 'poshRDF'); diff --git a/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Serialiser/GraphViz.php b/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Serialiser/GraphViz.php deleted file mode 100644 index 2fd22da..0000000 --- a/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Serialiser/GraphViz.php +++ /dev/null @@ -1,392 +0,0 @@ - 'utf-8'); - - /** - * Constructor - * - * @return object EasyRdf_Serialiser_GraphViz - */ - public function __construct() - { - } - - /** - * Set the path to the GraphViz 'dot' command - * - * Default is to search PATH for the command 'dot'. - * - * @param string $cmd The path to the 'dot' command. - * @return object EasyRdf_Serialiser_GraphViz - */ - public function setDotCommand($cmd) - { - $this->dotCommand = $cmd; - return $this; - } - - /** - * Get the path to the GraphViz 'dot' command - * - * The default value is simply 'dot' - * - * @return string The path to the 'dot' command. - */ - public function getDotCommand() - { - return $this->dotCommand; - } - - /** - * Turn on/off the option to display labels instead of URIs. - * - * When this option is turned on, then labels for resources will - * be displayed instead of the full URI of a resource. This makes - * it simpler to create friendly diagrams that non-technical people - * can understand. - * - * This option is turned off by default. - * - * @param bool $useLabels A boolean value to turn labels on and off - * @return object EasyRdf_Serialiser_GraphViz - */ - public function setUseLabels($useLabels) - { - $this->useLabels = $useLabels; - return $this; - } - - /** - * Get the state of the use labels option - * - * @return bool The current state of the use labels option - */ - public function getUseLabels() - { - return $this->useLabels; - } - - /** - * Turn on/off the option to only display nodes and edges with labels - * - * When this option is turned on, then only nodes (resources and literals) - * and edges (properties) will only be displayed if they have a label. You - * can use this option, to create concise, diagrams of your data, rather than - * the RDF. - * - * This option is turned off by default. - * - * @param bool $onlyLabelled A boolean value to enable/display only labelled items - * @return object EasyRdf_Serialiser_GraphViz - */ - public function setOnlyLabelled($onlyLabelled) - { - $this->onlyLabelled = $onlyLabelled; - return $this; - } - - /** - * Get the state of the only Only Labelled option - * - * @return bool The current state of the Only Labelled option - */ - public function getOnlyLabelled() - { - return $this->onlyLabelled; - } - - /** - * Set an attribute on the GraphViz graph - * - * Example: - * $serialiser->setAttribute('rotate', 90); - * - * See the GraphViz tool documentation for information about the - * available attributes. - * - * @param string $name The name of the attribute - * @param string $value The value for the attribute - * @return object EasyRdf_Serialiser_GraphViz - */ - public function setAttribute($name, $value) - { - $this->attributes[$name] = $value; - return $this; - } - - /** - * Get an attribute of the GraphViz graph - * - * @param string $name Attribute name - * @return string The value of the graph attribute - */ - public function getAttribute($name) - { - return $this->attributes[$name]; - } - - /** - * Convert an EasyRdf object into a GraphViz node identifier - * - * @ignore - */ - protected function nodeName($entity) - { - if ($entity instanceof EasyRdf_Resource) { - if ($entity->isBNode()) { - return "B".$entity->getUri(); - } else { - return "R".$entity->getUri(); - } - } else { - return "L".$entity; - } - } - - /** - * Internal function to escape a string into DOT safe syntax - * - * @ignore - */ - protected function escape($input) - { - if (preg_match('/^([a-z_][a-z_0-9]*|-?(\.[0-9]+|[0-9]+(\.[0-9]*)?))$/i', $input)) { - return $input; - } else { - return '"'.str_replace( - array("\r\n", "\n", "\r", '"'), - array('\n', '\n', '\n', '\"'), - $input - ).'"'; - } - } - - /** - * Internal function to escape an associate array of attributes and - * turns it into a DOT notation string - * - * @ignore - */ - protected function escapeAttributes($array) - { - $items = ''; - foreach ($array as $k => $v) { - $items[] = $this->escape($k).'='.$this->escape($v); - } - return '['.implode(',', $items).']'; - } - - /** - * Internal function to create dot syntax line for either a node or an edge - * - * @ignore - */ - protected function serialiseRow($node1, $node2 = null, $attributes = array()) - { - $result = ' '.$this->escape($node1); - if ($node2) { - $result .= ' -> '.$this->escape($node2); - } - if (count($attributes)) { - $result .= ' '.$this->escapeAttributes($attributes); - } - return $result.";\n"; - } - - /** - * Internal function to serialise an EasyRdf_Graph into a DOT formatted string - * - * @ignore - */ - protected function serialiseDot($graph) - { - $result = "digraph {\n"; - - // Write the graph attributes - foreach ($this->attributes as $k => $v) { - $result .= ' '.$this->escape($k).'='.$this->escape($v).";\n"; - } - - // Go through each of the properties and write the edges - $nodes = array(); - $result .= "\n // Edges\n"; - foreach ($graph->resources() as $resource) { - $name1 = $this->nodeName($resource); - foreach ($resource->propertyUris() as $property) { - $label = null; - if ($this->useLabels) { - $label = $graph->resource($property)->label(); - } - if ($label === null) { - if ($this->onlyLabelled == true) { - continue; - } else { - $label = EasyRdf_Namespace::shorten($property); - } - } - foreach ($resource->all("<$property>") as $value) { - $name2 = $this->nodeName($value); - $nodes[$name1] = $resource; - $nodes[$name2] = $value; - $result .= $this->serialiseRow( - $name1, - $name2, - array('label' => $label) - ); - } - } - } - - ksort($nodes); - - $result .= "\n // Nodes\n"; - foreach ($nodes as $name => $node) { - $type = substr($name, 0, 1); - $label = ''; - if ($type == 'R') { - if ($this->useLabels) { - $label = $node->label(); - } - if (!$label) { - $label = $node->shorten(); - } - if (!$label) { - $label = $node->getURI(); - } - $result .= $this->serialiseRow( - $name, - null, - array( - 'URL' => $node->getURI(), - 'label' => $label, - 'shape' => 'ellipse', - 'color' => 'blue' - ) - ); - } elseif ($type == 'B') { - if ($this->useLabels) { - $label = $node->label(); - } - $result .= $this->serialiseRow( - $name, - null, - array( - 'label' => $label, - 'shape' => 'circle', - 'color' => 'green' - ) - ); - } else { - $result .= $this->serialiseRow( - $name, - null, - array( - 'label' => strval($node), - 'shape' => 'record', - ) - ); - } - - } - - $result .= "}\n"; - - return $result; - } - - /** - * Internal function to render a graph into an image - * - * @ignore - */ - public function renderImage($graph, $format = 'png') - { - $dot = $this->serialiseDot($graph); - - return EasyRdf_Utils::execCommandPipe( - $this->dotCommand, - array("-T$format"), - $dot - ); - } - - /** - * Serialise an EasyRdf_Graph into a GraphViz dot document. - * - * Supported output format names: dot, gif, png, svg - * - * @param EasyRdf_Graph $graph An EasyRdf_Graph object. - * @param string $format The name of the format to convert to. - * @param array $options - * @throws EasyRdf_Exception - * @return string The RDF in the new desired format. - */ - public function serialise($graph, $format, array $options = array()) - { - parent::checkSerialiseParams($graph, $format); - - switch($format) { - case 'dot': - return $this->serialiseDot($graph); - case 'png': - case 'gif': - case 'svg': - return $this->renderImage($graph, $format); - default: - throw new EasyRdf_Exception( - "EasyRdf_Serialiser_GraphViz does not support: $format" - ); - } - } -} diff --git a/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Serialiser/Json.php b/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Serialiser/Json.php deleted file mode 100644 index bc0ae7a..0000000 --- a/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Serialiser/Json.php +++ /dev/null @@ -1,71 +0,0 @@ - 5 or (PHP_MAJOR_VERSION == 5 and PHP_MINOR_VERSION >= 3)) { - require dirname(__FILE__).'/JsonLd_real.php'; -} else { - throw new LogicException("JSON-LD support requires PHP 5.3+"); -} diff --git a/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Serialiser/JsonLd_real.php b/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Serialiser/JsonLd_real.php deleted file mode 100644 index a744f0f..0000000 --- a/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Serialiser/JsonLd_real.php +++ /dev/null @@ -1,135 +0,0 @@ -toRdfPhp() as $resource => $properties) { - if (array_key_exists($resource, $nodes)) { - $node = $nodes[$resource]; - } else { - $node = $ld_graph->createNode($resource); - $nodes[$resource] = $node; - } - - foreach ($properties as $property => $values) { - foreach ($values as $value) { - if ($value['type'] == 'bnode' or $value['type'] == 'uri') { - if (array_key_exists($value['value'], $nodes)) { - $_value = $nodes[$value['value']]; - } else { - $_value = $ld_graph->createNode($value['value']); - $nodes[$value['value']] = $_value; - } - } elseif ($value['type'] == 'literal') { - if (isset($value['lang'])) { - $_value = new \ML\JsonLD\LanguageTaggedString($value['value'], $value['lang']); - } elseif (isset($value['datatype'])) { - $_value = new \ML\JsonLD\TypedValue($value['value'], $value['datatype']); - } else { - $_value = $value['value']; - } - } else { - throw new EasyRdf_Exception( - "Unable to serialise object to JSON-LD: ".$value['type'] - ); - } - - if ($property == "http://www.w3.org/1999/02/22-rdf-syntax-ns#type") { - $node->addType($_value); - } else { - $node->addPropertyValue($property, $_value); - } - } - } - } - - // OPTIONS - $use_native_types = !(isset($options['expand_native_types']) and $options['expand_native_types'] == true); - $should_compact = (isset($options['compact']) and $options['compact'] == true); - - // expanded form - $data = $ld_graph->toJsonLd($use_native_types); - - if ($should_compact) { - // compact form - $compact_context = isset($options['context']) ? $options['context'] : null; - $compact_options = array( - 'useNativeTypes' => $use_native_types, - 'base' => $graph->getUri() - ); - - $data = \ML\JsonLD\JsonLD::compact($data, $compact_context, $compact_options); - } - - return \ML\JsonLD\JsonLD::toString($data); - } -} diff --git a/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Serialiser/Ntriples.php b/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Serialiser/Ntriples.php deleted file mode 100644 index d77a638..0000000 --- a/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Serialiser/Ntriples.php +++ /dev/null @@ -1,221 +0,0 @@ -escChars[$c])) { - $this->escChars[$c] = $this->escapedChar($c); - } - $result .= $this->escChars[$c]; - } - return $result; - } - - /** - * @ignore - */ - protected function unicodeCharNo($c) - { - $cUtf = utf8_encode($c); - $bl = strlen($cUtf); /* binary length */ - $r = 0; - switch ($bl) { - case 1: /* 0####### (0-127) */ - $r = ord($cUtf); - break; - case 2: /* 110##### 10###### = 192+x 128+x */ - $r = ((ord($cUtf[0]) - 192) * 64) + - (ord($cUtf[1]) - 128); - break; - case 3: /* 1110#### 10###### 10###### = 224+x 128+x 128+x */ - $r = ((ord($cUtf[0]) - 224) * 4096) + - ((ord($cUtf[1]) - 128) * 64) + - (ord($cUtf[2]) - 128); - break; - case 4: /* 1111#### 10###### 10###### 10###### = 240+x 128+x 128+x 128+x */ - $r = ((ord($cUtf[0]) - 240) * 262144) + - ((ord($cUtf[1]) - 128) * 4096) + - ((ord($cUtf[2]) - 128) * 64) + - (ord($cUtf[3]) - 128); - break; - } - return $r; - } - - /** - * @ignore - */ - protected function escapedChar($c) - { - $no = $this->unicodeCharNo($c); - - /* see http://www.w3.org/TR/rdf-testcases/#ntrip_strings */ - if ($no < 9) { - return "\\u" . sprintf('%04X', $no); /* #x0-#x8 (0-8) */ - } elseif ($no == 9) { - return '\t'; /* #x9 (9) */ - } elseif ($no == 10) { - return '\n'; /* #xA (10) */ - } elseif ($no < 13) { - return "\\u" . sprintf('%04X', $no); /* #xB-#xC (11-12) */ - } elseif ($no == 13) { - return '\r'; /* #xD (13) */ - } elseif ($no < 32) { - return "\\u" . sprintf('%04X', $no); /* #xE-#x1F (14-31) */ - } elseif ($no < 34) { - return $c; /* #x20-#x21 (32-33) */ - } elseif ($no == 34) { - return '\"'; /* #x22 (34) */ - } elseif ($no < 92) { - return $c; /* #x23-#x5B (35-91) */ - } elseif ($no == 92) { - return '\\'; /* #x5C (92) */ - } elseif ($no < 127) { - return $c; /* #x5D-#x7E (93-126) */ - } elseif ($no < 65536) { - return "\\u" . sprintf('%04X', $no); /* #x7F-#xFFFF (128-65535) */ - } elseif ($no < 1114112) { - return "\\U" . sprintf('%08X', $no); /* #x10000-#x10FFFF (65536-1114111) */ - } else { - return ''; /* not defined => ignore */ - } - } - - /** - * @ignore - */ - protected function serialiseResource($res) - { - $escaped = $this->escapeString($res); - if (substr($res, 0, 2) == '_:') { - return $escaped; - } else { - return "<$escaped>"; - } - } - - /** - * Serialise an RDF value into N-Triples - * - * The value can either be an array in RDF/PHP form, or - * an EasyRdf_Literal or EasyRdf_Resource object. - * - * @param array|object $value An associative array or an object - * @throws EasyRdf_Exception - * @return string The RDF value serialised to N-Triples - */ - public function serialiseValue($value) - { - if (is_object($value)) { - $value = $value->toRdfPhp(); - } - - if ($value['type'] == 'uri' or $value['type'] == 'bnode') { - return $this->serialiseResource($value['value']); - } elseif ($value['type'] == 'literal') { - $escaped = $this->escapeString($value['value']); - if (isset($value['lang'])) { - $lang = $this->escapeString($value['lang']); - return '"' . $escaped . '"' . '@' . $lang; - } elseif (isset($value['datatype'])) { - $datatype = $this->escapeString($value['datatype']); - return '"' . $escaped . '"' . "^^<$datatype>"; - } else { - return '"' . $escaped . '"'; - } - } else { - throw new EasyRdf_Exception( - "Unable to serialise object of type '".$value['type']."' to ntriples: " - ); - } - } - - /** - * Serialise an EasyRdf_Graph into N-Triples - * - * @param EasyRdf_Graph $graph An EasyRdf_Graph object. - * @param string $format The name of the format to convert to. - * @param array $options - * @throws EasyRdf_Exception - * @return string The RDF in the new desired format. - */ - public function serialise($graph, $format, array $options = array()) - { - parent::checkSerialiseParams($graph, $format); - - if ($format == 'ntriples') { - $nt = ''; - foreach ($graph->toRdfPhp() as $resource => $properties) { - foreach ($properties as $property => $values) { - foreach ($values as $value) { - $nt .= $this->serialiseResource($resource)." "; - $nt .= "<" . $this->escapeString($property) . "> "; - $nt .= $this->serialiseValue($value)." .\n"; - } - } - } - return $nt; - } else { - throw new EasyRdf_Exception( - "EasyRdf_Serialiser_Ntriples does not support: $format" - ); - } - } -} diff --git a/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Serialiser/Rapper.php b/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Serialiser/Rapper.php deleted file mode 100644 index ba42bc5..0000000 --- a/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Serialiser/Rapper.php +++ /dev/null @@ -1,100 +0,0 @@ -/dev/null", $output, $status); - if ($status != 0) { - throw new EasyRdf_Exception( - "Failed to execute the command '$rapperCmd': $result" - ); - } else { - $this->rapperCmd = $rapperCmd; - } - } - - /** - * Serialise an EasyRdf_Graph to the RDF format of choice. - * - * @param EasyRdf_Graph $graph An EasyRdf_Graph object. - * @param string $format The name of the format to convert to. - * @param array $options - * @return string The RDF in the new desired format. - */ - public function serialise($graph, $format, array $options = array()) - { - parent::checkSerialiseParams($graph, $format); - - $ntriples = parent::serialise($graph, 'ntriples'); - - // Hack to produce more concise RDF/XML - if ($format == 'rdfxml') { - $format = 'rdfxml-abbrev'; - } - - return EasyRdf_Utils::execCommandPipe( - $this->rapperCmd, - array( - '--quiet', - '--input', 'ntriples', - '--output', $format, - '-', 'unknown://' - ), - $ntriples - ); - } -} diff --git a/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Serialiser/RdfPhp.php b/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Serialiser/RdfPhp.php deleted file mode 100644 index 7ec80b0..0000000 --- a/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Serialiser/RdfPhp.php +++ /dev/null @@ -1,72 +0,0 @@ -toRdfPhp(); - } -} diff --git a/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Serialiser/RdfXml.php b/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Serialiser/RdfXml.php deleted file mode 100644 index d448578..0000000 --- a/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Serialiser/RdfXml.php +++ /dev/null @@ -1,236 +0,0 @@ -propertyUris()); - $rpcount = $this->reversePropertyCount($obj); - $alreadyOutput = isset($this->outputtedResources[$obj->getUri()]); - - $tag = "$indent<$property"; - if ($obj->isBNode()) { - if ($alreadyOutput or $rpcount > 1 or $pcount == 0) { - $tag .= " rdf:nodeID=\"".htmlspecialchars($obj->getBNodeId()).'"'; - } - } else { - if ($alreadyOutput or $rpcount != 1 or $pcount == 0) { - $tag .= " rdf:resource=\"".htmlspecialchars($obj->getURI()).'"'; - } - } - - if ($alreadyOutput == false and $rpcount == 1 and $pcount > 0) { - $xml = $this->rdfxmlResource($obj, false, $depth+1); - if ($xml) { - return "$tag>$xml$indent\n\n"; - } else { - return ''; - } - } else { - return $tag."/>\n"; - } - - } elseif (is_object($obj) and $obj instanceof EasyRdf_Literal) { - $atrributes = ""; - $datatype = $obj->getDatatypeUri(); - if ($datatype) { - if ($datatype == self::RDF_XML_LITERAL) { - $atrributes .= " rdf:parseType=\"Literal\""; - $value = strval($obj); - } else { - $datatype = htmlspecialchars($datatype); - $atrributes .= " rdf:datatype=\"$datatype\""; - } - } elseif ($obj->getLang()) { - $atrributes .= ' xml:lang="'. - htmlspecialchars($obj->getLang()).'"'; - } - - // Escape the value - if (!isset($value)) { - $value = htmlspecialchars(strval($obj)); - } - - return "$indent<$property$atrributes>$value\n"; - } else { - throw new EasyRdf_Exception( - "Unable to serialise object to xml: ".getType($obj) - ); - } - } - - /** - * Protected method to serialise a whole resource and its properties - * @ignore - */ - protected function rdfxmlResource($res, $showNodeId, $depth = 1) - { - // Keep track of the resources we have already serialised - if (isset($this->outputtedResources[$res->getUri()])) { - return ''; - } else { - $this->outputtedResources[$res->getUri()] = true; - } - - // If the resource has no properties - don't serialise it - $properties = $res->propertyUris(); - if (count($properties) == 0) { - return ''; - } - - $type = $res->type(); - if ($type) { - $this->addPrefix($type); - } else { - $type = 'rdf:Description'; - } - - $indent = str_repeat(' ', $depth); - $xml = "\n$indent<$type"; - if ($res->isBNode()) { - if ($showNodeId) { - $xml .= ' rdf:nodeID="'.htmlspecialchars($res->getBNodeId()).'"'; - } - } else { - $xml .= ' rdf:about="'.htmlspecialchars($res->getUri()).'"'; - } - $xml .= ">\n"; - - if ($res instanceof EasyRdf_Container) { - foreach ($res as $item) { - $xml .= $this->rdfxmlObject('rdf:li', $item, $depth+1); - } - } else { - foreach ($properties as $property) { - $short = EasyRdf_Namespace::shorten($property, true); - if ($short) { - $this->addPrefix($short); - $objects = $res->all("<$property>"); - if ($short == 'rdf:type') { - array_shift($objects); - } - foreach ($objects as $object) { - $xml .= $this->rdfxmlObject($short, $object, $depth+1); - } - } else { - throw new EasyRdf_Exception( - "It is not possible to serialse the property ". - "'$property' to RDF/XML." - ); - } - } - } - $xml .= "$indent\n"; - - return $xml; - } - - - /** - * Method to serialise an EasyRdf_Graph to RDF/XML - * - * @param EasyRdf_Graph $graph An EasyRdf_Graph object. - * @param string $format The name of the format to convert to. - * @param array $options - * @throws EasyRdf_Exception - * @return string The RDF in the new desired format. - */ - public function serialise($graph, $format, array $options = array()) - { - parent::checkSerialiseParams($graph, $format); - - if ($format != 'rdfxml') { - throw new EasyRdf_Exception( - "EasyRdf_Serialiser_RdfXml does not support: $format" - ); - } - - // store of namespaces to be appended to the rdf:RDF tag - $this->prefixes = array('rdf' => true); - - // store of the resource URIs we have serialised - $this->outputtedResources = array(); - - $xml = ''; - - // Serialise URIs first - foreach ($graph->resources() as $resource) { - if (!$resource->isBnode()) { - $xml .= $this->rdfxmlResource($resource, true); - } - } - - // Serialise bnodes afterwards - foreach ($graph->resources() as $resource) { - if ($resource->isBnode()) { - $xml .= $this->rdfxmlResource($resource, true); - } - } - - // iterate through namepsaces array prefix and output a string. - $namespaceStr = ''; - foreach ($this->prefixes as $prefix => $count) { - $url = EasyRdf_Namespace::get($prefix); - if (strlen($namespaceStr)) { - $namespaceStr .= "\n "; - } - $namespaceStr .= ' xmlns:'.$prefix.'="'.htmlspecialchars($url).'"'; - } - - return "\n". - "\n" . $xml . "\n\n"; - } -} diff --git a/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Serialiser/Turtle.php b/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Serialiser/Turtle.php deleted file mode 100644 index 0a89d38..0000000 --- a/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Serialiser/Turtle.php +++ /dev/null @@ -1,360 +0,0 @@ -', '\\>', $resourceIri); - return "<$escapedIri>"; - } - - /** - * Given a string, enclose in quotes and escape any quotes in the string. - * Strings containing tabs, linefeeds or carriage returns will be - * enclosed in three double quotes ("""). - * - * @param string $value - * @return string - */ - public static function quotedString($value) - { - if (preg_match("/[\t\n\r]/", $value)) { - $escaped = str_replace(array('\\', '"""'), array('\\\\', '\\"""'), $value); - return '"""'.$escaped.'"""'; - } else { - $escaped = str_replace(array('\\', '"'), array('\\\\', '\\"'), $value); - return '"'.$escaped.'"'; - } - } - - /** - * Given a an EasyRdf_Resource or URI, convert it into a string, suitable to - * be written to a Turtle document. URIs will be shortened into CURIES - * where possible. - * - * @param EasyRdf_Resource $resource The resource to convert to a Turtle string - * @param boolean $createNamespace If true, a new namespace may be created - * @return string - */ - public function serialiseResource($resource, $createNamespace = false) - { - if (is_object($resource)) { - if ($resource->isBNode()) { - return $resource->getUri(); - } else { - $resource = $resource->getUri(); - } - } - - $short = EasyRdf_Namespace::shorten($resource, $createNamespace); - if ($short) { - $this->addPrefix($short); - return $short; - } else { - return self::escapeIri($resource); - } - } - - /** - * Given an EasyRdf_Literal object, convert it into a string, suitable to - * be written to a Turtle document. Supports multiline literals and literals with - * datatypes or languages. - * - * @param EasyRdf_Literal $literal - * @return string - */ - public function serialiseLiteral($literal) - { - $value = strval($literal); - $quoted = self::quotedString($value); - - if ($datatype = $literal->getDatatypeUri()) { - if ($datatype == 'http://www.w3.org/2001/XMLSchema#integer') { - return sprintf('%d', $value); - } elseif ($datatype == 'http://www.w3.org/2001/XMLSchema#decimal') { - return sprintf('%g', $value); - } elseif ($datatype == 'http://www.w3.org/2001/XMLSchema#double') { - return sprintf('%e', $value); - } elseif ($datatype == 'http://www.w3.org/2001/XMLSchema#boolean') { - return sprintf('%s', $value ? 'true' : 'false'); - } else { - $escaped = $this->serialiseResource($datatype, true); - return sprintf('%s^^%s', $quoted, $escaped); - } - } elseif ($lang = $literal->getLang()) { - return $quoted . '@' . $lang; - } else { - return $quoted; - } - } - - /** - * Convert an EasyRdf object into a string suitable to - * be written to a Turtle document. - * - * @param EasyRdf_Resource|EasyRdf_Literal $object - * @return string - */ - public function serialiseObject($object) - { - if ($object instanceof EasyRdf_Resource) { - return $this->serialiseResource($object); - } elseif ($object instanceof EasyRdf_Literal) { - return $this->serialiseLiteral($object); - } else { - throw new InvalidArgumentException( - "serialiseObject() requires \$object to be ". - "of type EasyRdf_Resource or EasyRdf_Literal" - ); - } - } - - - /** - * Protected method to serialise a RDF collection - * @ignore - */ - protected function serialiseCollection($node, $indent) - { - $turtle = '('; - $count = 0; - while ($node) { - if ($id = $node->getBNodeId()) { - $this->outputtedBnodes[$id] = true; - } - - $value = $node->get('rdf:first'); - $node = $node->get('rdf:rest'); - if ($node and $node->hasProperty('rdf:first')) { - $count++; - } - - if ($value !== null) { - $serialised = $this->serialiseObject($value); - if ($count) { - $turtle .= "\n$indent $serialised"; - } else { - $turtle .= " ".$serialised; - } - } - } - if ($count) { - $turtle .= "\n$indent)"; - } else { - $turtle .= " )"; - } - return $turtle; - } - - /** - * Protected method to serialise the properties of a resource - * @ignore - */ - protected function serialiseProperties($res, $depth = 1) - { - $properties = $res->propertyUris(); - $indent = str_repeat(' ', ($depth*2)-1); - - $turtle = ''; - if (count($properties) > 1) { - $turtle .= "\n$indent"; - } - - $pCount = 0; - foreach ($properties as $property) { - if ($property === 'http://www.w3.org/1999/02/22-rdf-syntax-ns#type') { - $pStr = 'a'; - } else { - $pStr = $this->serialiseResource($property, true); - } - - if ($pCount) { - $turtle .= " ;\n$indent"; - } - - $turtle .= ' ' . $pStr; - - $oCount = 0; - foreach ($res->all("<$property>") as $object) { - if ($oCount) { - $turtle .= ','; - } - - if ($object instanceof EasyRdf_Collection) { - $turtle .= ' ' . $this->serialiseCollection($object, $indent); - } elseif ($object instanceof EasyRdf_Resource and $object->isBNode()) { - $id = $object->getBNodeId(); - $rpcount = $this->reversePropertyCount($object); - if ($rpcount <= 1 and !isset($this->outputtedBnodes[$id])) { - // Nested unlabelled Blank Node - $this->outputtedBnodes[$id] = true; - $turtle .= ' ['; - $turtle .= $this->serialiseProperties($object, $depth+1); - $turtle .= ' ]'; - } else { - // Multiple properties pointing to this blank node - $turtle .= ' ' . $this->serialiseObject($object); - } - } else { - $turtle .= ' ' . $this->serialiseObject($object); - } - $oCount++; - } - $pCount++; - } - - if ($depth == 1) { - $turtle .= " ."; - if ($pCount > 1) { - $turtle .= "\n"; - } - } elseif ($pCount > 1) { - $turtle .= "\n" . str_repeat(' ', (($depth-1)*2)-1); - } - - return $turtle; - } - - /** - * @ignore - */ - protected function serialisePrefixes() - { - $turtle = ''; - foreach ($this->prefixes as $prefix => $count) { - $url = EasyRdf_Namespace::get($prefix); - $turtle .= "@prefix $prefix: <$url> .\n"; - } - return $turtle; - } - - /** - * @ignore - */ - protected function serialiseSubjects($graph, $filterType) - { - $turtle = ''; - foreach ($graph->resources() as $resource) { - /** @var $resource EasyRdf_Resource */ - // If the resource has no properties - don't serialise it - $properties = $resource->propertyUris(); - if (count($properties) == 0) { - continue; - } - - // Is this node of the right type? - $thisType = $resource->isBNode() ? 'bnode' : 'uri'; - if ($thisType != $filterType) { - continue; - } - - if ($thisType == 'bnode') { - $id = $resource->getBNodeId(); - if (isset($this->outputtedBnodes[$id])) { - // Already been serialised - continue; - } else { - $this->outputtedBnodes[$id] = true; - $rpcount = $this->reversePropertyCount($resource); - if ($rpcount == 0) { - $turtle .= '[]'; - } else { - $turtle .= $this->serialiseResource($resource); - } - } - } else { - $turtle .= $this->serialiseResource($resource); - } - - $turtle .= $this->serialiseProperties($resource); - $turtle .= "\n"; - } - return $turtle; - } - - /** - * Serialise an EasyRdf_Graph to Turtle. - * - * @param EasyRdf_Graph $graph An EasyRdf_Graph object. - * @param string $format The name of the format to convert to. - * @param array $options - * @throws EasyRdf_Exception - * @return string The RDF in the new desired format. - */ - public function serialise($graph, $format, array $options = array()) - { - parent::checkSerialiseParams($graph, $format); - - if ($format != 'turtle' and $format != 'n3') { - throw new EasyRdf_Exception( - "EasyRdf_Serialiser_Turtle does not support: $format" - ); - } - - $this->prefixes = array(); - $this->outputtedBnodes = array(); - - $turtle = ''; - $turtle .= $this->serialiseSubjects($graph, 'uri'); - $turtle .= $this->serialiseSubjects($graph, 'bnode'); - - if (count($this->prefixes)) { - return $this->serialisePrefixes() . "\n" . $turtle; - } else { - return $turtle; - } - } -} diff --git a/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Sparql/Client.php b/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Sparql/Client.php deleted file mode 100644 index 2cf9ad5..0000000 --- a/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Sparql/Client.php +++ /dev/null @@ -1,302 +0,0 @@ -queryUri = $queryUri; - if ($updateUri) { - $this->updateUri = $updateUri; - } else { - $this->updateUri = $queryUri; - } - } - - /** Get the URI of the SPARQL query endpoint - * - * @return string The query URI of the SPARQL endpoint - */ - public function getQueryUri() - { - return $this->queryUri; - } - - /** Get the URI of the SPARQL update endpoint - * - * @return string The query URI of the SPARQL endpoint - */ - public function getUpdateUri() - { - return $this->updateUri; - } - - /** - * @depredated - * @ignore - */ - public function getUri() - { - return $this->queryUri; - } - - /** Make a query to the SPARQL endpoint - * - * SELECT and ASK queries will return an object of type - * EasyRdf_Sparql_Result. - * - * CONSTRUCT and DESCRIBE queries will return an object - * of type EasyRdf_Graph. - * - * @param string $query The query string to be executed - * @return object EasyRdf_Sparql_Result|EasyRdf_Graph Result of the query. - */ - public function query($query) - { - return $this->request('query', $query); - } - - /** Count the number of triples in a SPARQL 1.1 endpoint - * - * Performs a SELECT query to estriblish the total number of triples. - * - * Counts total number of triples by default but a conditional triple pattern - * can be given to count of a subset of all triples. - * - * @param string $condition Triple-pattern condition for the count query - * @return integer The number of triples - */ - public function countTriples($condition = '?s ?p ?o') - { - // SELECT (COUNT(*) AS ?count) - // WHERE { - // {?s ?p ?o} - // UNION - // {GRAPH ?g {?s ?p ?o}} - // } - $result = $this->query('SELECT (COUNT(*) AS ?count) {'.$condition.'}'); - return $result[0]->count->getValue(); - } - - /** Get a list of named graphs from a SPARQL 1.1 endpoint - * - * Performs a SELECT query to get a list of the named graphs - * - * @param string $limit Optional limit to the number of results - * @return array Array of EasyRdf_Resource objects for each named graph - */ - public function listNamedGraphs($limit = null) - { - $query = "SELECT DISTINCT ?g WHERE {GRAPH ?g {?s ?p ?o}}"; - if (!is_null($limit)) { - $query .= " LIMIT ".(int)$limit; - } - $result = $this->query($query); - - // Convert the result object into an array of resources - $graphs = array(); - foreach ($result as $row) { - array_push($graphs, $row->g); - } - return $graphs; - } - - /** Make an update request to the SPARQL endpoint - * - * Successful responses will return the HTTP response object - * - * Unsuccessful responses will throw an exception - * - * @param string $query The update query string to be executed - * @return object EasyRdf_Http_Response HTTP response - */ - public function update($query) - { - return $this->request('update', $query); - } - - public function insert($data, $graphUri = null) - { - #$this->updateData('INSET', - $query = 'INSERT DATA {'; - if ($graphUri) { - $query .= "GRAPH <$graphUri> {"; - } - $query .= $this->convertToTriples($data); - if ($graphUri) { - $query .= "}"; - } - $query .= '}'; - return $this->update($query); - } - - protected function updateData($operation, $data, $graphUri = null) - { - $query = "$operation DATA {"; - if ($graphUri) { - $query .= "GRAPH <$graphUri> {"; - } - $query .= $this->convertToTriples($data); - if ($graphUri) { - $query .= "}"; - } - $query .= '}'; - return $this->update($query); - } - - public function clear($graphUri, $silent = false) - { - $query = "CLEAR"; - if ($silent) { - $query .= " SILENT"; - } - if (preg_match("/^all|named|default$/i", $graphUri)) { - $query .= " $graphUri"; - } else { - $query .= " GRAPH <$graphUri>"; - } - return $this->update($query); - } - - /* - * Internal function to make an HTTP request to SPARQL endpoint - * - * @ignore - */ - protected function request($type, $query) - { - // Check for undefined prefixes - $prefixes = ''; - foreach (EasyRdf_Namespace::namespaces() as $prefix => $uri) { - if (strpos($query, "$prefix:") !== false and - strpos($query, "PREFIX $prefix:") === false) { - $prefixes .= "PREFIX $prefix: <$uri>\n"; - } - } - - $client = EasyRdf_Http::getDefaultHttpClient(); - $client->resetParameters(); - - // Tell the server which response formats we can parse - $accept = EasyRdf_Format::getHttpAcceptHeader( - array( - 'application/sparql-results+json' => 1.0, - 'application/sparql-results+xml' => 0.8 - ) - ); - $client->setHeaders('Accept', $accept); - - if ($type == 'update') { - $client->setMethod('POST'); - $client->setUri($this->updateUri); - $client->setRawData($prefixes . $query); - $client->setHeaders('Content-Type', 'application/sparql-update'); - } elseif ($type == 'query') { - // Use GET if the query is less than 2kB - // 2046 = 2kB minus 1 for '?' and 1 for NULL-terminated string on server - $encodedQuery = 'query='.urlencode($prefixes . $query); - if (strlen($encodedQuery) + strlen($this->queryUri) <= 2046) { - $client->setMethod('GET'); - $client->setUri($this->queryUri.'?'.$encodedQuery); - } else { - // Fall back to POST instead (which is un-cacheable) - $client->setMethod('POST'); - $client->setUri($this->queryUri); - $client->setRawData($encodedQuery); - $client->setHeaders('Content-Type', 'application/x-www-form-urlencoded'); - } - } - - $response = $client->request(); - if ($response->getStatus() == 204) { - // No content - return $response; - } elseif ($response->isSuccessful()) { - list($type, $params) = EasyRdf_Utils::parseMimeType( - $response->getHeader('Content-Type') - ); - if (strpos($type, 'application/sparql-results') === 0) { - return new EasyRdf_Sparql_Result($response->getBody(), $type); - } else { - return new EasyRdf_Graph($this->queryUri, $response->getBody(), $type); - } - } else { - throw new EasyRdf_Exception( - "HTTP request for SPARQL query failed: ".$response->getBody() - ); - } - } - - protected function convertToTriples($data) - { - if (is_string($data)) { - return $data; - } elseif (is_object($data) and $data instanceof EasyRdf_Graph) { - # FIXME: insert Turtle when there is a way of seperateing out the prefixes - return $data->serialise('ntriples'); - } else { - throw new EasyRdf_Exception( - "Don't know how to convert to triples for SPARQL query: ".$response->getBody() - ); - } - } -} diff --git a/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Sparql/Result.php b/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Sparql/Result.php deleted file mode 100644 index 22001e9..0000000 --- a/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Sparql/Result.php +++ /dev/null @@ -1,384 +0,0 @@ -parseXml($data); - } elseif ($mimeType == 'application/sparql-results+json') { - return $this->parseJson($data); - } else { - throw new EasyRdf_Exception( - "Unsupported SPARQL Query Results format: $mimeType" - ); - } - } - - /** Get the query result type (boolean/bindings) - * - * ASK queries return a result of type 'boolean'. - * SELECT query return a result of type 'bindings'. - * - * @return string The query result type. - */ - public function getType() - { - return $this->type; - } - - /** Return the boolean value of the query result - * - * If the query was of type boolean then this method will - * return either true or false. If the query was of some other - * type then this method will return null. - * - * @return boolean The result of the query. - */ - public function getBoolean() - { - return $this->boolean; - } - - /** Return true if the result of the query was true. - * - * @return boolean True if the query result was true. - */ - public function isTrue() - { - return $this->boolean == true; - } - - /** Return false if the result of the query was false. - * - * @return boolean True if the query result was false. - */ - public function isFalse() - { - return $this->boolean == false; - } - - /** Return the number of fields in a query result of type bindings. - * - * @return integer The number of fields. - */ - public function numFields() - { - return count($this->fields); - } - - /** Return the number of rows in a query result of type bindings. - * - * @return integer The number of rows. - */ - public function numRows() - { - return count($this); - } - - /** Get the field names in a query result of type bindings. - * - * @return array The names of the fields in the result. - */ - public function getFields() - { - return $this->fields; - } - - /** Return a human readable view of the query result. - * - * This method is intended to be a debugging aid and will - * return a pretty-print view of the query result. - * - * @param string $format Either 'text' or 'html' - */ - public function dump($format = 'html') - { - if ($this->type == 'bindings') { - $result = ''; - if ($format == 'html') { - $result .= ""; - $result .= ""; - foreach ($this->fields as $field) { - $result .= ""; - } - $result .= ""; - foreach ($this as $row) { - $result .= ""; - foreach ($this->fields as $field) { - if (isset($row->$field)) { - $result .= ""; - } else { - $result .= ""; - } - } - $result .= ""; - } - $result .= "
". - "?$field
". - $row->$field->dumpValue($format)." 
"; - } else { - // First calculate the width of each comment - $colWidths = array(); - foreach ($this->fields as $field) { - $colWidths[$field] = strlen($field); - } - - $textData = array(); - foreach ($this as $row) { - $textRow = array(); - foreach ($row as $k => $v) { - $textRow[$k] = $v->dumpValue('text'); - $width = strlen($textRow[$k]); - if ($colWidths[$k] < $width) { - $colWidths[$k] = $width; - } - } - $textData[] = $textRow; - } - - // Create a horizontal rule - $hr = "+"; - foreach ($colWidths as $k => $v) { - $hr .= "-".str_repeat('-', $v).'-+'; - } - - // Output the field names - $result .= "$hr\n|"; - foreach ($this->fields as $field) { - $result .= ' '.str_pad("?$field", $colWidths[$field]).' |'; - } - - // Output each of the rows - $result .= "\n$hr\n"; - foreach ($textData as $textRow) { - $result .= '|'; - foreach ($textRow as $k => $v) { - $result .= ' '.str_pad($v, $colWidths[$k]).' |'; - } - $result .= "\n"; - } - $result .= "$hr\n"; - - } - return $result; - } elseif ($this->type == 'boolean') { - $str = ($this->boolean ? 'true' : 'false'); - if ($format == 'html') { - return "

Result: $str

"; - } else { - return "Result: $str"; - } - } else { - throw new EasyRdf_Exception( - "Failed to dump SPARQL Query Results format, unknown type: ". $this->type - ); - } - } - - /** Create a new EasyRdf_Resource or EasyRdf_Literal depending - * on the type of data passed in. - * - * @ignore - */ - protected function newTerm($data) - { - switch($data['type']) { - case 'bnode': - return new EasyRdf_Resource('_:'.$data['value']); - case 'uri': - return new EasyRdf_Resource($data['value']); - case 'literal': - case 'typed-literal': - return EasyRdf_Literal::create($data); - default: - throw new EasyRdf_Exception( - "Failed to parse SPARQL Query Results format, unknown term type: ". - $data['type'] - ); - } - } - - /** Parse a SPARQL result in the XML format into the object. - * - * @ignore - */ - protected function parseXml($data) - { - $doc = new DOMDocument(); - $doc->loadXML($data); - - # Check for valid root node. - if ($doc->hasChildNodes() == false or - $doc->childNodes->length != 1 or - $doc->firstChild->nodeName != 'sparql' or - $doc->firstChild->namespaceURI != self::SPARQL_XML_RESULTS_NS) { - throw new EasyRdf_Exception( - "Incorrect root node in SPARQL XML Query Results format" - ); - } - - # Is it the result of an ASK query? - $boolean = $doc->getElementsByTagName('boolean'); - if ($boolean->length) { - $this->type = 'boolean'; - $value = $boolean->item(0)->nodeValue; - $this->boolean = $value == 'true' ? true : false; - return; - } - - # Get a list of variables from the header - $head = $doc->getElementsByTagName('head'); - if ($head->length) { - $variables = $head->item(0)->getElementsByTagName('variable'); - foreach ($variables as $variable) { - $this->fields[] = $variable->getAttribute('name'); - } - } - - # Is it the result of a SELECT query? - $resultstag = $doc->getElementsByTagName('results'); - if ($resultstag->length) { - $this->type = 'bindings'; - $results = $resultstag->item(0)->getElementsByTagName('result'); - foreach ($results as $result) { - $bindings = $result->getElementsByTagName('binding'); - $t = new stdClass(); - foreach ($bindings as $binding) { - $key = $binding->getAttribute('name'); - foreach ($binding->childNodes as $node) { - if ($node->nodeType != XML_ELEMENT_NODE) { - continue; - } - $t->$key = $this->newTerm( - array( - 'type' => $node->nodeName, - 'value' => $node->nodeValue, - 'lang' => $node->getAttribute('xml:lang'), - 'datatype' => $node->getAttribute('datatype') - ) - ); - break; - } - } - $this[] = $t; - } - return $this; - } - - throw new EasyRdf_Exception( - "Failed to parse SPARQL XML Query Results format" - ); - } - - /** Parse a SPARQL result in the JSON format into the object. - * - * @ignore - */ - protected function parseJson($data) - { - // Decode JSON to an array - $data = json_decode($data, true); - - if (isset($data['boolean'])) { - $this->type = 'boolean'; - $this->boolean = $data['boolean']; - } elseif (isset($data['results'])) { - $this->type = 'bindings'; - if (isset($data['head']['vars'])) { - $this->fields = $data['head']['vars']; - } - - foreach ($data['results']['bindings'] as $row) { - $t = new stdClass(); - foreach ($row as $key => $value) { - $t->$key = $this->newTerm($value); - } - $this[] = $t; - } - } else { - throw new EasyRdf_Exception( - "Failed to parse SPARQL JSON Query Results format" - ); - } - } - - /** Magic method to return value of the result to string - * - * If this is a boolean result then it will return 'true' or 'false'. - * If it is a bindings type, then it will dump as a text based table. - * - * @return string A string representation of the result. - */ - public function __toString() - { - if ($this->type == 'boolean') { - return $this->boolean ? 'true' : 'false'; - } else { - return $this->dump('text'); - } - } -} diff --git a/core/vendor/easyrdf/easyrdf/lib/EasyRdf/TypeMapper.php b/core/vendor/easyrdf/easyrdf/lib/EasyRdf/TypeMapper.php deleted file mode 100644 index 81404d2..0000000 --- a/core/vendor/easyrdf/easyrdf/lib/EasyRdf/TypeMapper.php +++ /dev/null @@ -1,125 +0,0 @@ -$short"; - } else { - return "$escaped"; - } - } else { - if ($short) { - return $short; - } else { - return $resource; - } - } - } - - /** Return pretty-print view of a literal - * - * This method is mainly intended for internal use and is used by - * EasyRdf_Graph and EasyRdf_Sparql_Result to format a literal - * for display. - * - * @param mixed $literal An EasyRdf_Literal object or an associative array - * @param string $format Either 'html' or 'text' - * @param string $color The colour of the text - * @return string - */ - public static function dumpLiteralValue($literal, $format = 'html', $color = 'black') - { - if (!preg_match('/^#?[-\w]+$/', $color)) { - throw new InvalidArgumentException( - "\$color must be a legal color code or name" - ); - } - - if (is_object($literal)) { - $literal = $literal->toRdfPhp(); - } elseif (!is_array($literal)) { - $literal = array('value' => $literal); - } - - $text = '"'.$literal['value'].'"'; - if (isset($literal['lang'])) { - $text .= '@' . $literal['lang']; - } - if (isset($literal['datatype'])) { - $short = EasyRdf_Namespace::shorten($literal['datatype']); - if ($short) { - $text .= "^^$short"; - } else { - $text .= "^^<".$literal['datatype'].">"; - } - } - - if ($format == 'html') { - return "". - htmlentities($text, ENT_COMPAT, "UTF-8"). - ""; - } else { - return $text; - } - } - - /** Clean up and split a mime-type up into its parts - * - * @param string $mimeType A MIME Type, optionally with parameters - * @return array $type, $parameters - */ - public static function parseMimeType($mimeType) - { - $parts = explode(';', strtolower($mimeType)); - $type = trim(array_shift($parts)); - $params = array(); - foreach ($parts as $part) { - if (preg_match("/^\s*(\w+)\s*=\s*(.+?)\s*$/", $part, $matches)) { - $params[$matches[1]] = $matches[2]; - } - } - return array($type, $params); - } - - /** Execute a command as a pipe - * - * The proc_open() function is used to open a pipe to a - * a command line process, writing $input to STDIN, returning STDOUT - * and throwing an exception if anything is written to STDERR or the - * process returns non-zero. - * - * @param string $command The command to execute - * @param array $args Optional list of arguments to pass to the command - * @param string $input Optional buffer to send to the command - * @param string $dir Path to directory to run command in (defaults to /tmp) - * @return string The result of the command, printed to STDOUT - */ - public static function execCommandPipe($command, $args = null, $input = null, $dir = null) - { - $descriptorspec = array( - 0 => array('pipe', 'r'), - 1 => array('pipe', 'w'), - 2 => array('pipe', 'w') - ); - - // Use the system tmp directory by default - if (!$dir) { - $dir = sys_get_temp_dir(); - } - - if (is_array($args)) { - $fullCommand = implode( - ' ', - array_map('escapeshellcmd', array_merge(array($command), $args)) - ); - } else { - $fullCommand = escapeshellcmd($command); - if ($args) { - $fullCommand .= ' '.escapeshellcmd($args); - } - } - - $process = proc_open($fullCommand, $descriptorspec, $pipes, $dir); - if (is_resource($process)) { - // $pipes now looks like this: - // 0 => writeable handle connected to child stdin - // 1 => readable handle connected to child stdout - // 2 => readable handle connected to child stderr - - if ($input) { - fwrite($pipes[0], $input); - } - fclose($pipes[0]); - - $output = stream_get_contents($pipes[1]); - fclose($pipes[1]); - $error = stream_get_contents($pipes[2]); - fclose($pipes[2]); - - // It is important that you close any pipes before calling - // proc_close in order to avoid a deadlock - $returnValue = proc_close($process); - if ($returnValue) { - throw new EasyRdf_Exception( - "Error while executing command $command: ".$error - ); - } - } else { - throw new EasyRdf_Exception( - "Failed to execute command $command" - ); - } - - return $output; - } -} diff --git a/core/vendor/easyrdf/easyrdf/scripts/copyright_updater.php b/core/vendor/easyrdf/easyrdf/scripts/copyright_updater.php deleted file mode 100644 index 557356b..0000000 --- a/core/vendor/easyrdf/easyrdf/scripts/copyright_updater.php +++ /dev/null @@ -1,64 +0,0 @@ -isValid($email)) { - echo $email . ' is a valid email address'; -} -``` - -More advanced example (returns detailed diagnostic error codes): - -```php -isValid($email); - -if ($result) { - echo $email . ' is a valid email address'; -} else if ($validator->hasWarnings()) { - echo 'Warning! ' . $email . ' has unusual/deprecated features (result code ' . var_export($validator->getWarnings(), true) . ')'; -} else { - echo $email . ' is not a valid email address (result code ' . $validator->getError() . ')'; -} -``` - -##Contributors## -As this is a port from another library and work, here are other people related to the previous: - -* Ricard Clau [@ricardclau](http://github.com/ricardclau): Performance against PHP built-in filter_var -* Josepf Bielawski [@stloyd](http://github.com/stloyd): For its first re-work of Dominic's lib -* Dominic Sayers [@dominicsayers](http://github.com/dominicsayers): The original isemail function - -##License## -Released under the MIT License attached with this code. - diff --git a/core/vendor/egulias/email-validator/composer.json b/core/vendor/egulias/email-validator/composer.json deleted file mode 100644 index c8fb886..0000000 --- a/core/vendor/egulias/email-validator/composer.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "name": "egulias/email-validator", - "description": "A library for validating emails", - "homepage": "https://github.com/egulias/EmailValidator", - "type": "Library", - "keywords": ["email", "validation", "validator"], - "license": "MIT", - "authors": [ - {"name": "Eduardo Gulias Davis"} - ], - "extra": { - "branch-alias": { - "dev-master": "1.3.x-dev" - } - }, - "require": { - "php": ">= 5.3.3", - "doctrine/lexer": "~1.0" - }, - "require-dev" : { - "satooshi/php-coveralls": "dev-master" - }, - "autoload": { - "psr-0": { - "Egulias\\": "src/" - } - } -} diff --git a/core/vendor/egulias/email-validator/composer.lock b/core/vendor/egulias/email-validator/composer.lock deleted file mode 100644 index 3e5a485..0000000 --- a/core/vendor/egulias/email-validator/composer.lock +++ /dev/null @@ -1,584 +0,0 @@ -{ - "_readme": [ - "This file locks the dependencies of your project to a known state", - "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", - "This file is @generated automatically" - ], - "hash": "9e9dff0cc08c7292600453e681201e13", - "packages": [ - { - "name": "doctrine/lexer", - "version": "v1.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/lexer.git", - "reference": "2f708a85bb3aab5d99dab8be435abd73e0b18acb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/2f708a85bb3aab5d99dab8be435abd73e0b18acb", - "reference": "2f708a85bb3aab5d99dab8be435abd73e0b18acb", - "shasum": "" - }, - "require": { - "php": ">=5.3.2" - }, - "type": "library", - "autoload": { - "psr-0": { - "Doctrine\\Common\\Lexer\\": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com", - "homepage": "http://www.instaclick.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com", - "homepage": "http://jmsyst.com", - "role": "Developer of wrapped JMSSerializerBundle" - } - ], - "description": "Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.", - "homepage": "http://www.doctrine-project.org", - "keywords": [ - "lexer", - "parser" - ], - "time": "2013-01-12 18:59:04" - } - ], - "packages-dev": [ - { - "name": "guzzle/guzzle", - "version": "v3.9.2", - "source": { - "type": "git", - "url": "https://github.com/guzzle/guzzle3.git", - "reference": "54991459675c1a2924122afbb0e5609ade581155" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle3/zipball/54991459675c1a2924122afbb0e5609ade581155", - "reference": "54991459675c1a2924122afbb0e5609ade581155", - "shasum": "" - }, - "require": { - "ext-curl": "*", - "php": ">=5.3.3", - "symfony/event-dispatcher": "~2.1" - }, - "replace": { - "guzzle/batch": "self.version", - "guzzle/cache": "self.version", - "guzzle/common": "self.version", - "guzzle/http": "self.version", - "guzzle/inflection": "self.version", - "guzzle/iterator": "self.version", - "guzzle/log": "self.version", - "guzzle/parser": "self.version", - "guzzle/plugin": "self.version", - "guzzle/plugin-async": "self.version", - "guzzle/plugin-backoff": "self.version", - "guzzle/plugin-cache": "self.version", - "guzzle/plugin-cookie": "self.version", - "guzzle/plugin-curlauth": "self.version", - "guzzle/plugin-error-response": "self.version", - "guzzle/plugin-history": "self.version", - "guzzle/plugin-log": "self.version", - "guzzle/plugin-md5": "self.version", - "guzzle/plugin-mock": "self.version", - "guzzle/plugin-oauth": "self.version", - "guzzle/service": "self.version", - "guzzle/stream": "self.version" - }, - "require-dev": { - "doctrine/cache": "~1.3", - "monolog/monolog": "~1.0", - "phpunit/phpunit": "3.7.*", - "psr/log": "~1.0", - "symfony/class-loader": "~2.1", - "zendframework/zend-cache": "2.*,<2.3", - "zendframework/zend-log": "2.*,<2.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.9-dev" - } - }, - "autoload": { - "psr-0": { - "Guzzle": "src/", - "Guzzle\\Tests": "tests/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - }, - { - "name": "Guzzle Community", - "homepage": "https://github.com/guzzle/guzzle/contributors" - } - ], - "description": "Guzzle is a PHP HTTP client library and framework for building RESTful web service clients", - "homepage": "http://guzzlephp.org/", - "keywords": [ - "client", - "curl", - "framework", - "http", - "http client", - "rest", - "web service" - ], - "time": "2014-08-11 04:32:36" - }, - { - "name": "psr/log", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "fe0936ee26643249e916849d48e3a51d5f5e278b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/fe0936ee26643249e916849d48e3a51d5f5e278b", - "reference": "fe0936ee26643249e916849d48e3a51d5f5e278b", - "shasum": "" - }, - "type": "library", - "autoload": { - "psr-0": { - "Psr\\Log\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for logging libraries", - "keywords": [ - "log", - "psr", - "psr-3" - ], - "time": "2012-12-21 11:40:51" - }, - { - "name": "satooshi/php-coveralls", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/satooshi/php-coveralls.git", - "reference": "94389a0ebdb64857d6899b5e0254dffa99e5aa96" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/satooshi/php-coveralls/zipball/94389a0ebdb64857d6899b5e0254dffa99e5aa96", - "reference": "94389a0ebdb64857d6899b5e0254dffa99e5aa96", - "shasum": "" - }, - "require": { - "ext-json": "*", - "ext-simplexml": "*", - "guzzle/guzzle": ">=2.7", - "php": ">=5.3", - "psr/log": "1.0.0", - "symfony/config": ">=2.0", - "symfony/console": ">=2.0", - "symfony/stopwatch": ">=2.2", - "symfony/yaml": ">=2.0" - }, - "require-dev": { - "apigen/apigen": "2.8.*@stable", - "pdepend/pdepend": "dev-master as 2.0.0", - "phpmd/phpmd": "dev-master", - "phpunit/php-invoker": ">=1.1.0,<1.2.0", - "phpunit/phpunit": "3.7.*@stable", - "sebastian/finder-facade": "dev-master", - "sebastian/phpcpd": "1.4.*@stable", - "squizlabs/php_codesniffer": "1.4.*@stable", - "theseer/fdomdocument": "dev-master" - }, - "suggest": { - "symfony/http-kernel": "Allows Symfony integration" - }, - "bin": [ - "composer/bin/coveralls" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "0.7-dev" - } - }, - "autoload": { - "psr-0": { - "Satooshi\\Component": "src/", - "Satooshi\\Bundle": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Kitamura Satoshi", - "email": "with.no.parachute@gmail.com", - "homepage": "https://www.facebook.com/satooshi.jp" - } - ], - "description": "PHP client library for Coveralls API", - "homepage": "https://github.com/satooshi/php-coveralls", - "keywords": [ - "ci", - "coverage", - "github", - "test" - ], - "time": "2014-07-09 10:45:38" - }, - { - "name": "symfony/config", - "version": "v2.5.4", - "target-dir": "Symfony/Component/Config", - "source": { - "type": "git", - "url": "https://github.com/symfony/Config.git", - "reference": "080eabdc256c1d7a3a7cf6296271edb68eb1ab2b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/Config/zipball/080eabdc256c1d7a3a7cf6296271edb68eb1ab2b", - "reference": "080eabdc256c1d7a3a7cf6296271edb68eb1ab2b", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "symfony/filesystem": "~2.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.5-dev" - } - }, - "autoload": { - "psr-0": { - "Symfony\\Component\\Config\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Symfony Config Component", - "homepage": "http://symfony.com", - "time": "2014-08-31 03:22:04" - }, - { - "name": "symfony/console", - "version": "v2.5.4", - "target-dir": "Symfony/Component/Console", - "source": { - "type": "git", - "url": "https://github.com/symfony/Console.git", - "reference": "748beed2a1e73179c3f5154d33fe6ae100c1aeb1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/Console/zipball/748beed2a1e73179c3f5154d33fe6ae100c1aeb1", - "reference": "748beed2a1e73179c3f5154d33fe6ae100c1aeb1", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "psr/log": "~1.0", - "symfony/event-dispatcher": "~2.1" - }, - "suggest": { - "psr/log": "For using the console logger", - "symfony/event-dispatcher": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.5-dev" - } - }, - "autoload": { - "psr-0": { - "Symfony\\Component\\Console\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Symfony Console Component", - "homepage": "http://symfony.com", - "time": "2014-08-14 16:10:54" - }, - { - "name": "symfony/event-dispatcher", - "version": "v2.5.4", - "target-dir": "Symfony/Component/EventDispatcher", - "source": { - "type": "git", - "url": "https://github.com/symfony/EventDispatcher.git", - "reference": "8faf5cc7e80fde74a650a36e60d32ce3c3e0457b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/8faf5cc7e80fde74a650a36e60d32ce3c3e0457b", - "reference": "8faf5cc7e80fde74a650a36e60d32ce3c3e0457b", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "psr/log": "~1.0", - "symfony/config": "~2.0", - "symfony/dependency-injection": "~2.0", - "symfony/stopwatch": "~2.2" - }, - "suggest": { - "symfony/dependency-injection": "", - "symfony/http-kernel": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.5-dev" - } - }, - "autoload": { - "psr-0": { - "Symfony\\Component\\EventDispatcher\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Symfony EventDispatcher Component", - "homepage": "http://symfony.com", - "time": "2014-07-28 13:20:46" - }, - { - "name": "symfony/filesystem", - "version": "v2.5.4", - "target-dir": "Symfony/Component/Filesystem", - "source": { - "type": "git", - "url": "https://github.com/symfony/Filesystem.git", - "reference": "a765efd199e02ff4001c115c318e219030be9364" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/Filesystem/zipball/a765efd199e02ff4001c115c318e219030be9364", - "reference": "a765efd199e02ff4001c115c318e219030be9364", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.5-dev" - } - }, - "autoload": { - "psr-0": { - "Symfony\\Component\\Filesystem\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Symfony Filesystem Component", - "homepage": "http://symfony.com", - "time": "2014-09-03 09:00:14" - }, - { - "name": "symfony/stopwatch", - "version": "v2.5.4", - "target-dir": "Symfony/Component/Stopwatch", - "source": { - "type": "git", - "url": "https://github.com/symfony/Stopwatch.git", - "reference": "22ab4f76cdeefd38b00022a6be5709190a2fd046" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/Stopwatch/zipball/22ab4f76cdeefd38b00022a6be5709190a2fd046", - "reference": "22ab4f76cdeefd38b00022a6be5709190a2fd046", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.5-dev" - } - }, - "autoload": { - "psr-0": { - "Symfony\\Component\\Stopwatch\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Symfony Stopwatch Component", - "homepage": "http://symfony.com", - "time": "2014-08-14 16:10:54" - }, - { - "name": "symfony/yaml", - "version": "v2.5.4", - "target-dir": "Symfony/Component/Yaml", - "source": { - "type": "git", - "url": "https://github.com/symfony/Yaml.git", - "reference": "01a7695bcfb013d0a15c6757e15aae120342986f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/Yaml/zipball/01a7695bcfb013d0a15c6757e15aae120342986f", - "reference": "01a7695bcfb013d0a15c6757e15aae120342986f", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.5-dev" - } - }, - "autoload": { - "psr-0": { - "Symfony\\Component\\Yaml\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Symfony Yaml Component", - "homepage": "http://symfony.com", - "time": "2014-08-31 03:22:04" - } - ], - "aliases": [ - - ], - "minimum-stability": "stable", - "stability-flags": { - "satooshi/php-coveralls": 20 - }, - "prefer-stable": false, - "platform": { - "php": ">= 5.3.3" - }, - "platform-dev": [ - - ] -} diff --git a/core/vendor/egulias/email-validator/documentation/Ohter.md b/core/vendor/egulias/email-validator/documentation/Ohter.md deleted file mode 100644 index 9ec4bd9..0000000 --- a/core/vendor/egulias/email-validator/documentation/Ohter.md +++ /dev/null @@ -1,69 +0,0 @@ -Email length ------------- -http://tools.ietf.org/html/rfc5321#section-4.1.2 - Forward-path = Path - - Path = "<" [ A-d-l ":" ] Mailbox ">" - -http://tools.ietf.org/html/rfc5321#section-4.5.3.1.3 -http://tools.ietf.org/html/rfc1035#section-2.3.4 - -DNS ---- - -http://tools.ietf.org/html/rfc5321#section-2.3.5 - Names that can - be resolved to MX RRs or address (i.e., A or AAAA) RRs (as discussed - in Section 5) are permitted, as are CNAME RRs whose targets can be - resolved, in turn, to MX or address RRs. - -http://tools.ietf.org/html/rfc5321#section-5.1 - The lookup first attempts to locate an MX record associated with the - name. If a CNAME record is found, the resulting name is processed as - if it were the initial name. ... If an empty list of MXs is returned, - the address is treated as if it was associated with an implicit MX - RR, with a preference of 0, pointing to that host. - -is_email() author's note: We will regard the existence of a CNAME to be -sufficient evidence of the domain's existence. For performance reasons -we will not repeat the DNS lookup for the CNAME's target, but we will -raise a warning because we didn't immediately find an MX record. - -Check for TLD addresses ------------------------ -TLD addresses are specifically allowed in RFC 5321 but they are -unusual to say the least. We will allocate a separate -status to these addresses on the basis that they are more likely -to be typos than genuine addresses (unless we've already -established that the domain does have an MX record) - -http://tools.ietf.org/html/rfc5321#section-2.3.5 - In the case - of a top-level domain used by itself in an email address, a single - string is used without any dots. This makes the requirement, - described in more detail below, that only fully-qualified domain - names appear in SMTP transactions on the public Internet, - particularly important where top-level domains are involved. - -TLD format ----------- -The format of TLDs has changed a number of times. The standards -used by IANA have been largely ignored by ICANN, leading to -confusion over the standards being followed. These are not defined -anywhere, except as a general component of a DNS host name (a label). -However, this could potentially lead to 123.123.123.123 being a -valid DNS name (rather than an IP address) and thereby creating -an ambiguity. The most authoritative statement on TLD formats that -the author can find is in a (rejected!) erratum to RFC 1123 -submitted by John Klensin, the author of RFC 5321: - -http://www.rfc-editor.org/errata_search.php?rfc=1123&eid=1353 - However, a valid host name can never have the dotted-decimal - form #.#.#.#, since this change does not permit the highest-level - component label to start with a digit even if it is not all-numeric. - -Comments --------- -Comments at the start of the domain are deprecated in the text -Comments at the start of a subdomain are obs-domain -(http://tools.ietf.org/html/rfc5322#section-3.4.1) diff --git a/core/vendor/egulias/email-validator/documentation/RFC5321BNF.html b/core/vendor/egulias/email-validator/documentation/RFC5321BNF.html deleted file mode 100644 index 2313f01..0000000 --- a/core/vendor/egulias/email-validator/documentation/RFC5321BNF.html +++ /dev/null @@ -1,89 +0,0 @@ - - - - - -The BNF from RFC 5321 defining parts of a valid SMTP address - - - -
-   Mailbox        = Local-part "@" ( Domain / address-literal )
-
-   Local-part     = Dot-string / Quoted-string
-                  ; MAY be case-sensitive
-
-
-   Dot-string     = Atom *("."  Atom)
-
-   Atom           = 1*atext
-
-   Quoted-string  = DQUOTE *QcontentSMTP DQUOTE
-
-   QcontentSMTP   = qtextSMTP / quoted-pairSMTP
-
-   quoted-pairSMTP  = %d92 %d32-126
-                    ; i.e., backslash followed by any ASCII
-                    ; graphic (including itself) or SPace
-
-   qtextSMTP      = %d32-33 / %d35-91 / %d93-126
-                  ; i.e., within a quoted string, any
-                  ; ASCII graphic or space is permitted
-                  ; without blackslash-quoting except
-                  ; double-quote and the backslash itself.
-
-   Domain         = sub-domain *("." sub-domain)
-
-   sub-domain     = Let-dig [Ldh-str]
-
-   Let-dig        = ALPHA / DIGIT
-
-   Ldh-str        = *( ALPHA / DIGIT / "-" ) Let-dig
-
-   address-literal  = "[" ( IPv4-address-literal /
-                    IPv6-address-literal /
-                    General-address-literal ) "]"
-                    ; See Section 4.1.3
-
-   IPv4-address-literal  = Snum 3("."  Snum)
-
-   IPv6-address-literal  = "IPv6:" IPv6-addr
-
-   General-address-literal  = Standardized-tag ":" 1*dcontent
-
-   Standardized-tag  = Ldh-str
-                     ; Standardized-tag MUST be specified in a
-                     ; Standards-Track RFC and registered with IANA
-
-   dcontent       = %d33-90 / ; Printable US-ASCII
-                  %d94-126 ; excl. "[", "\", "]"
-
-   Snum           = 1*3DIGIT
-                  ; representing a decimal integer
-                  ; value in the range 0 through 255
-
-   IPv6-addr      = IPv6-full / IPv6-comp / IPv6v4-full / IPv6v4-comp
-
-   IPv6-hex       = 1*4HEXDIG
-
-   IPv6-full      = IPv6-hex 7(":" IPv6-hex)
-
-   IPv6-comp      = [IPv6-hex *5(":" IPv6-hex)] "::"
-                  [IPv6-hex *5(":" IPv6-hex)]
-                  ; The "::" represents at least 2 16-bit groups of
-                  ; zeros.  No more than 6 groups in addition to the
-                  ; "::" may be present.
-
-   IPv6v4-full    = IPv6-hex 5(":" IPv6-hex) ":" IPv4-address-literal
-
-   IPv6v4-comp    = [IPv6-hex *3(":" IPv6-hex)] "::"
-                  [IPv6-hex *3(":" IPv6-hex) ":"]
-                  IPv4-address-literal
-                  ; The "::" represents at least 2 16-bit groups of
-                  ; zeros.  No more than 4 groups in addition to the
-                  ; "::" and IPv4-address-literal may be present.
-
-
- - - diff --git a/core/vendor/egulias/email-validator/documentation/RFC5322BNF.html b/core/vendor/egulias/email-validator/documentation/RFC5322BNF.html deleted file mode 100644 index e2f8fd7..0000000 --- a/core/vendor/egulias/email-validator/documentation/RFC5322BNF.html +++ /dev/null @@ -1,141 +0,0 @@ - - - - - -The BNF from RFC 5322 defining parts of a valid internet message address - - - -
-   addr-spec       =   local-part "@" domain
-
-   local-part      =   dot-atom / quoted-string / obs-local-part
-
-   dot-atom        =   [CFWS] dot-atom-text [CFWS]
-
-   CFWS            =   (1*([FWS] comment) [FWS]) / FWS
-
-   FWS             =   ([*WSP CRLF] 1*WSP) /  obs-FWS
-                                          ; Folding white space
-
-   WSP             =   SP / HTAB          ; white space
-
-   obs-FWS         =   1*([CRLF] WSP)     ; As amended in erratum #1908
-
-   ctext           =   %d33-39 /          ; Printable US-ASCII
-                       %d42-91 /          ;  characters not including
-                       %d93-126 /         ;  "(", ")", or "\"
-                       obs-ctext
-
-   obs-ctext       =   obs-NO-WS-CTL
-   ccontent        =   ctext / quoted-pair / comment
-
-   comment         =   "(" *([FWS] ccontent) [FWS] ")"
-
-   dot-atom-text   =   1*atext *("." 1*atext)
-
-   atext           =   ALPHA / DIGIT /    ; Printable US-ASCII
-                       "!" / "#" /        ;  characters not including
-                       "$" / "%" /        ;  specials.  Used for atoms.
-                       "&" / "'" /
-                       "*" / "+" /
-                       "-" / "/" /
-                       "=" / "?" /
-                       "^" / "_" /
-                       "`" / "{" /
-                       "|" / "}" /
-                       "~"
-
-   specials        =   "(" / ")" /        ; Special characters that do
-                       "<" / ">" /        ;  not appear in atext
-                       "[" / "]" /
-                       ":" / ";" /
-                       "@" / "\" /
-                       "," / "." /
-                       DQUOTE
-
-   quoted-string   =   [CFWS]
-                       DQUOTE *([FWS] qcontent) [FWS] DQUOTE
-                       [CFWS]
-
-   qcontent        =   qtext / quoted-pair
-
-   qtext           =   %d33 /             ; Printable US-ASCII
-                       %d35-91 /          ;  characters not including
-                       %d93-126 /         ;  "\" or the quote character
-                       obs-qtext
-
-   obs-qtext       =   obs-NO-WS-CTL
-
-   obs-NO-WS-CTL   =   %d1-8 /            ; US-ASCII control
-                       %d11 /             ;  characters that do not
-                       %d12 /             ;  include the carriage
-                       %d14-31 /          ;  return, line feed, and
-                       %d127              ;  white space characters
-
-   quoted-pair     =   ("\" (VCHAR / WSP)) / obs-qp
-
-   VCHAR           =   %x21-7E            ; visible (printing) characters
-
-   obs-qp          =   "\" (%d0 / obs-NO-WS-CTL / LF / CR)
-
-   obs-local-part  =   word *("." word)
-
-   word            =   atom / quoted-string
-
-   atom            =   [CFWS] 1*atext [CFWS]
-
-   domain          =   dot-atom / domain-literal / obs-domain
-
-   domain-literal  =   [CFWS] "[" *([FWS] dtext) [FWS] "]" [CFWS]
-
-   dtext           =   %d33-90 /          ; Printable US-ASCII
-                       %d94-126 /         ;  characters not including
-                       obs-dtext          ;  "[", "]", or "\"
-
-   obs-dtext       =   obs-NO-WS-CTL / quoted-pair
-
-   obs-domain      =   atom *("." atom)
-
-NB For SMTP mail, the domain-literal is restricted by RFC5321 as follows:
-
-   Mailbox        = Local-part "@" ( Domain / address-literal )
-
-   address-literal  = "[" ( IPv4-address-literal /
-                    IPv6-address-literal /
-                    General-address-literal ) "]"
-
-   IPv4-address-literal  = Snum 3("."  Snum)
-
-   IPv6-address-literal  = "IPv6:" IPv6-addr
-
-   Snum           = 1*3DIGIT
-                  ; representing a decimal integer
-                  ; value in the range 0 through 255
-
-   IPv6-addr      = IPv6-full / IPv6-comp / IPv6v4-full / IPv6v4-comp
-
-   IPv6-hex       = 1*4HEXDIG
-
-   IPv6-full      = IPv6-hex 7(":" IPv6-hex)
-
-   IPv6-comp      = [IPv6-hex *5(":" IPv6-hex)] "::"
-                  [IPv6-hex *5(":" IPv6-hex)]
-                  ; The "::" represents at least 2 16-bit groups of
-                  ; zeros.  No more than 6 groups in addition to the
-                  ; "::" may be present.
-
-   IPv6v4-full    = IPv6-hex 5(":" IPv6-hex) ":" IPv4-address-literal
-
-   IPv6v4-comp    = [IPv6-hex *3(":" IPv6-hex)] "::"
-                  [IPv6-hex *3(":" IPv6-hex) ":"]
-                  IPv4-address-literal
-                  ; The "::" represents at least 2 16-bit groups of
-                  ; zeros.  No more than 4 groups in addition to the
-                  ; "::" and IPv4-address-literal may be present.
-
-
- - - diff --git a/core/vendor/egulias/email-validator/phpunit.xml.dist b/core/vendor/egulias/email-validator/phpunit.xml.dist deleted file mode 100644 index f335ec1..0000000 --- a/core/vendor/egulias/email-validator/phpunit.xml.dist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - ./tests/egulias/Tests/ - ./vendor/ - - - - - - ./vendor - - - diff --git a/core/vendor/egulias/email-validator/src/Egulias/EmailValidator/EmailLexer.php b/core/vendor/egulias/email-validator/src/Egulias/EmailValidator/EmailLexer.php deleted file mode 100644 index 7056235..0000000 --- a/core/vendor/egulias/email-validator/src/Egulias/EmailValidator/EmailLexer.php +++ /dev/null @@ -1,214 +0,0 @@ - self::S_OPENPARENTHESIS, - ')' => self::S_CLOSEPARENTHESIS, - '<' => self::S_LOWERTHAN, - '>' => self::S_GREATERTHAN, - '[' => self::S_OPENBRACKET, - ']' => self::S_CLOSEBRACKET, - ':' => self::S_COLON, - ';' => self::S_SEMICOLON, - '@' => self::S_AT, - '\\' => self::S_BACKSLASH, - '/' => self::S_SLASH, - ',' => self::S_COMMA, - '.' => self::S_DOT, - '"' => self::S_DQUOTE, - '-' => self::S_HYPHEN, - '::' => self::S_DOUBLECOLON, - ' ' => self::S_SP, - "\t" => self::S_HTAB, - "\r" => self::S_CR, - "\n" => self::S_LF, - "\r\n" => self::CRLF, - 'IPv6' => self::S_IPV6TAG, - '<' => self::S_LOWERTHAN, - '>' => self::S_GREATERTHAN, - '{' => self::S_OPENQBRACKET, - '}' => self::S_CLOSEQBRACKET, - '' => self::S_EMPTY, - '\0' => self::C_NUL, - ); - - protected $invalidASCII = array(226 => 1,); - - protected $hasInvalidTokens = false; - - protected $previous; - - public function reset() - { - $this->hasInvalidTokens = false; - parent::reset(); - } - - public function hasInvalidTokens() - { - return $this->hasInvalidTokens; - } - - /** - * @param $type - * @throws \UnexpectedValueException - * @return boolean - */ - public function find($type) - { - $search = clone $this; - $search->skipUntil($type); - - if (!$search->lookahead) { - throw new \UnexpectedValueException($type . ' not found'); - } - return true; - } - - /** - * getPrevious - * - * @return array token - */ - public function getPrevious() - { - return $this->previous; - } - - /** - * moveNext - * - * @return boolean - */ - public function moveNext() - { - $this->previous = $this->token; - - return parent::moveNext(); - } - - /** - * Lexical catchable patterns. - * - * @return string[] - */ - protected function getCatchablePatterns() - { - return array( - '[a-zA-Z_]+[46]?', - '[0-9]+', - '\r\n', - '::', - '\s+', - '[\x10-\x1F]+', - '.', - ); - } - - /** - * Lexical non-catchable patterns. - * - * @return string[] - */ - protected function getNonCatchablePatterns() - { - return array('[\x7f-\xff]+'); - } - - /** - * Retrieve token type. Also processes the token value if necessary. - * - * @param string $value - * @throws \InvalidArgumentException - * @return integer - */ - protected function getType(&$value) - { - - if ($this->isNullType($value)) { - return self::C_NUL; - } - - if (isset($this->charValue[$value])) { - return $this->charValue[$value]; - } - - if ($this->isInvalid($value)) { - $this->hasInvalidTokens = true; - return self::INVALID; - } - - return self::GENERIC; - } - - /** - * @param string $value - */ - protected function isNullType($value) - { - if ($value === "\0") { - return true; - } - - return false; - } - - /** - * @param string $value - */ - protected function isInvalid($value) - { - if (preg_match('/[\x10-\x1F]+/', $value)) { - return true; - } - - if (isset($this->invalidASCII[ord($value)])) { - return true; - } - - return false; - } -} diff --git a/core/vendor/egulias/email-validator/src/Egulias/EmailValidator/EmailParser.php b/core/vendor/egulias/email-validator/src/Egulias/EmailValidator/EmailParser.php deleted file mode 100644 index 0c5d156..0000000 --- a/core/vendor/egulias/email-validator/src/Egulias/EmailValidator/EmailParser.php +++ /dev/null @@ -1,98 +0,0 @@ - - */ -class EmailParser -{ - const EMAIL_MAX_LENGTH = 254; - - protected $warnings = array(); - protected $domainPart = ''; - protected $localPart = ''; - protected $lexer; - protected $localPartParser; - protected $domainPartParser; - - public function __construct(EmailLexer $lexer) - { - $this->lexer = $lexer; - $this->localPartParser = new LocalPart($this->lexer); - $this->domainPartParser = new DomainPart($this->lexer); - } - - /** - * @param string $str - */ - public function parse($str) - { - $this->lexer->setInput($str); - - if (!$this->hasAtToken()) { - throw new \InvalidArgumentException('ERR_NOLOCALPART'); - } - - if ($this->lexer->hasInvalidTokens()) { - throw new \InvalidArgumentException('ERR_INVALID_ATEXT'); - } - - $this->localPartParser->parse($str); - $this->domainPartParser->parse($str); - - $this->setParts($str); - - return array('local' => $this->localPart, 'domain' => $this->domainPart); - } - - public function getWarnings() - { - $localPartWarnings = $this->localPartParser->getWarnings(); - $domainPartWarnings = $this->domainPartParser->getWarnings(); - - $this->warnings = array_merge($localPartWarnings, $domainPartWarnings); - $this->addLongEmailWarning($this->localPart, $this->domainPart); - - return $this->warnings; - } - - public function getParsedDomainPart() - { - return $this->domainPart; - } - - protected function setParts($email) - { - $parts = explode('@', $email); - $this->domainPart = $this->domainPartParser->getDomainPart(); - $this->localPart = $parts[0]; - } - - protected function hasAtToken() - { - $this->lexer->moveNext(); - $this->lexer->moveNext(); - if ($this->lexer->token['type'] === EmailLexer::S_AT) { - return false; - } - - return true; - } - - /** - * @param string $localPart - * @param string $parsedDomainPart - */ - protected function addLongEmailWarning($localPart, $parsedDomainPart) - { - if (strlen($localPart . '@' . $parsedDomainPart) > self::EMAIL_MAX_LENGTH) { - $this->warnings[] = EmailValidator::RFC5322_TOOLONG; - } - } -} diff --git a/core/vendor/egulias/email-validator/src/Egulias/EmailValidator/EmailValidator.php b/core/vendor/egulias/email-validator/src/Egulias/EmailValidator/EmailValidator.php deleted file mode 100644 index d047dec..0000000 --- a/core/vendor/egulias/email-validator/src/Egulias/EmailValidator/EmailValidator.php +++ /dev/null @@ -1,169 +0,0 @@ - - */ -class EmailValidator -{ - const ERR_CONSECUTIVEATS = 128; - const ERR_EXPECTING_DTEXT = 129; - const ERR_NOLOCALPART = 130; - const ERR_NODOMAIN = 131; - const ERR_CONSECUTIVEDOTS = 132; - const ERR_ATEXT_AFTER_CFWS = 133; - const ERR_ATEXT_AFTER_QS = 134; - const ERR_ATEXT_AFTER_DOMLIT = 135; - const ERR_EXPECTING_QPAIR = 136; - const ERR_EXPECTING_ATEXT = 137; - const ERR_EXPECTING_QTEXT = 138; - const ERR_EXPECTING_CTEXT = 139; - const ERR_BACKSLASHEND = 140; - const ERR_DOT_START = 141; - const ERR_DOT_END = 142; - const ERR_DOMAINHYPHENSTART = 143; - const ERR_DOMAINHYPHENEND = 144; - const ERR_UNCLOSEDQUOTEDSTR = 145; - const ERR_UNCLOSEDCOMMENT = 146; - const ERR_UNCLOSEDDOMLIT = 147; - const ERR_FWS_CRLF_X2 = 148; - const ERR_FWS_CRLF_END = 149; - const ERR_CR_NO_LF = 150; - const ERR_DEPREC_REACHED = 151; - const RFC5321_TLD = 9; - const RFC5321_TLDNUMERIC = 10; - const RFC5321_QUOTEDSTRING = 11; - const RFC5321_ADDRESSLITERAL = 12; - const RFC5321_IPV6DEPRECATED = 13; - const CFWS_COMMENT = 17; - const CFWS_FWS = 18; - const DEPREC_LOCALPART = 33; - const DEPREC_FWS = 34; - const DEPREC_QTEXT = 35; - const DEPREC_QP = 36; - const DEPREC_COMMENT = 37; - const DEPREC_CTEXT = 38; - const DEPREC_CFWS_NEAR_AT = 49; - const RFC5322_LOCAL_TOOLONG = 64; - const RFC5322_LABEL_TOOLONG = 63; - const RFC5322_DOMAIN = 65; - const RFC5322_TOOLONG = 66; - const RFC5322_DOMAIN_TOOLONG = 255; - const RFC5322_DOMAINLITERAL = 70; - const RFC5322_DOMLIT_OBSDTEXT = 71; - const RFC5322_IPV6_GRPCOUNT = 72; - const RFC5322_IPV6_2X2XCOLON = 73; - const RFC5322_IPV6_BADCHAR = 74; - const RFC5322_IPV6_MAXGRPS = 75; - const RFC5322_IPV6_COLONSTRT = 76; - const RFC5322_IPV6_COLONEND = 77; - const DNSWARN_NO_MX_RECORD = 5; - const DNSWARN_NO_RECORD = 6; - - protected $parser; - protected $warnings = array(); - protected $error; - protected $threshold = 255; - - public function __construct() - { - $this->parser = new EmailParser(new EmailLexer()); - } - - public function isValid($email, $checkDNS = false, $strict = false) - { - try { - $this->parser->parse((string)$email); - $this->warnings = $this->parser->getWarnings(); - } catch (\Exception $e) { - $rClass = new \ReflectionClass($this); - $this->error = $rClass->getConstant($e->getMessage()); - return false; - } - - $dns = true; - if ($checkDNS) { - $dns = $this->checkDNS(); - } - - if ($this->hasWarnings() && ((int) max($this->warnings) > $this->threshold)) { - $this->error = self::ERR_DEPREC_REACHED; - - return false; - } - - return !$strict || (!$this->hasWarnings() && $dns); - } - - /** - * @return boolean - */ - public function hasWarnings() - { - return !empty($this->warnings); - } - - /** - * @return array - */ - public function getWarnings() - { - return $this->warnings; - } - - /** - * @return string - */ - public function getError() - { - return $this->error; - } - - /** - * @param int $threshold - * - * @return EmailValidator - */ - public function setThreshold($threshold) - { - $this->threshold = (int) $threshold; - - return $this; - } - - /** - * @return int - */ - public function getThreshold() - { - return $this->threshold; - } - - protected function checkDNS() - { - $checked = true; - - $result = checkdnsrr(trim($this->parser->getParsedDomainPart()), 'MX'); - - if (!$result) { - $this->warnings[] = self::DNSWARN_NO_RECORD; - $checked = false; - $this->addTLDWarnings(); - } - - return $checked; - } - - protected function addTLDWarnings() - { - if (!in_array(self::DNSWARN_NO_RECORD, $this->warnings) && - !in_array(self::DNSWARN_NO_MX_RECORD, $this->warnings) && - in_array(self::RFC5322_DOMAINLITERAL, $this->warnings) - ) { - $this->warnings[] = self::RFC5321_TLD; - } - } -} diff --git a/core/vendor/egulias/email-validator/src/Egulias/EmailValidator/Parser/DomainPart.php b/core/vendor/egulias/email-validator/src/Egulias/EmailValidator/Parser/DomainPart.php deleted file mode 100644 index 33875a4..0000000 --- a/core/vendor/egulias/email-validator/src/Egulias/EmailValidator/Parser/DomainPart.php +++ /dev/null @@ -1,308 +0,0 @@ -lexer->moveNext(); - - if ($this->lexer->token['type'] === EmailLexer::S_DOT) { - throw new \InvalidArgumentException('ERR_DOT_START'); - } - - if ($this->lexer->token['type'] === EmailLexer::S_EMPTY) { - throw new \InvalidArgumentException('ERR_NODOMAIN'); - } - if ($this->lexer->token['type'] === EmailLexer::S_HYPHEN) { - throw new \InvalidArgumentException('ERR_DOMAINHYPHENEND'); - } - - if ($this->lexer->token['type'] === EmailLexer::S_OPENPARENTHESIS) { - $this->warnings[] = EmailValidator::DEPREC_COMMENT; - $this->parseDomainComments(); - } - - $domain = $this->doParseDomainPart(); - - $prev = $this->lexer->getPrevious(); - $length = strlen($domain); - - if ($prev['type'] === EmailLexer::S_DOT) { - throw new \InvalidArgumentException('ERR_DOT_END'); - } - if ($prev['type'] === EmailLexer::S_HYPHEN) { - throw new \InvalidArgumentException('ERR_DOMAINHYPHENEND'); - } - if ($length > self::DOMAIN_MAX_LENGTH) { - $this->warnings[] = EmailValidator::RFC5322_DOMAIN_TOOLONG; - } - if ($prev['type'] === EmailLexer::S_CR) { - throw new \InvalidArgumentException('ERR_FWS_CRLF_END'); - } - $this->domainPart = $domain; - } - - public function getDomainPart() - { - return $this->domainPart; - } - - public function checkIPV6Tag($addressLiteral, $maxGroups = 8) - { - $prev = $this->lexer->getPrevious(); - if ($prev['type'] === EmailLexer::S_COLON) { - $this->warnings[] = EmailValidator::RFC5322_IPV6_COLONEND; - } - - $IPv6 = substr($addressLiteral, 5); - //Daniel Marschall's new IPv6 testing strategy - $matchesIP = explode(':', $IPv6); - $groupCount = count($matchesIP); - $colons = strpos($IPv6, '::'); - - if (count(preg_grep('/^[0-9A-Fa-f]{0,4}$/', $matchesIP, PREG_GREP_INVERT)) !== 0) { - $this->warnings[] = EmailValidator::RFC5322_IPV6_BADCHAR; - } - - if ($colons === false) { - // We need exactly the right number of groups - if ($groupCount !== $maxGroups) { - $this->warnings[] = EmailValidator::RFC5322_IPV6_GRPCOUNT; - } - return; - } - - if ($colons !== strrpos($IPv6, '::')) { - $this->warnings[] = EmailValidator::RFC5322_IPV6_2X2XCOLON; - return; - } - - if ($colons === 0 || $colons === (strlen($IPv6) - 2)) { - // RFC 4291 allows :: at the start or end of an address - //with 7 other groups in addition - ++$maxGroups; - } - - if ($groupCount > $maxGroups) { - $this->warnings[] = EmailValidator::RFC5322_IPV6_MAXGRPS; - } elseif ($groupCount === $maxGroups) { - $this->warnings[] = EmailValidator::RFC5321_IPV6DEPRECATED; - } - } - - protected function doParseDomainPart() - { - $domain = ''; - do { - $prev = $this->lexer->getPrevious(); - - if ($this->lexer->token['type'] === EmailLexer::S_SLASH) { - throw new \InvalidArgumentException('ERR_DOMAIN_CHAR_NOT_ALLOWED'); - } - - if ($this->lexer->token['type'] === EmailLexer::S_OPENPARENTHESIS) { - $this->parseComments(); - $this->lexer->moveNext(); - } - - $this->checkConsecutiveDots(); - $this->checkDomainPartExceptions($prev); - - if ($this->hasBrackets()) { - $this->parseDomainLiteral(); - } - - $this->checkLabelLength($prev); - - if ($this->isFWS()) { - $this->parseFWS(); - } - - $domain .= $this->lexer->token['value']; - $this->lexer->moveNext(); - } while ($this->lexer->token); - - return $domain; - } - - protected function parseDomainLiteral() - { - if ($this->lexer->isNextToken(EmailLexer::S_COLON)) { - $this->warnings[] = EmailValidator::RFC5322_IPV6_COLONSTRT; - } - if ($this->lexer->isNextToken(EmailLexer::S_IPV6TAG)) { - $lexer = clone $this->lexer; - $lexer->moveNext(); - if ($lexer->isNextToken(EmailLexer::S_DOUBLECOLON)) { - $this->warnings[] = EmailValidator::RFC5322_IPV6_COLONSTRT; - } - } - - return $this->doParseDomainLiteral(); - } - - protected function doParseDomainLiteral() - { - $IPv6TAG = false; - $addressLiteral = ''; - do { - if ($this->lexer->token['type'] === EmailLexer::C_NUL) { - throw new \InvalidArgumentException('ERR_EXPECTING_DTEXT'); - } - - if ($this->lexer->token['type'] === EmailLexer::INVALID || - $this->lexer->token['type'] === EmailLexer::C_DEL || - $this->lexer->token['type'] === EmailLexer::S_LF - ) { - $this->warnings[] = EmailValidator::RFC5322_DOMLIT_OBSDTEXT; - } - - if ($this->lexer->isNextTokenAny(array(EmailLexer::S_OPENQBRACKET, EmailLexer::S_OPENBRACKET))) { - throw new \InvalidArgumentException('ERR_EXPECTING_DTEXT'); - } - - if ($this->lexer->isNextTokenAny( - array(EmailLexer::S_HTAB, EmailLexer::S_SP, $this->lexer->token['type'] === EmailLexer::CRLF) - )) { - $this->warnings[] = EmailValidator::CFWS_FWS; - $this->parseFWS(); - } - - if ($this->lexer->isNextToken(EmailLexer::S_CR)) { - throw new \InvalidArgumentException("ERR_CR_NO_LF"); - } - if ($this->lexer->token['type'] === EmailLexer::S_BACKSLASH) { - $this->warnings[] = EmailValidator::RFC5322_DOMLIT_OBSDTEXT; - $addressLiteral .= $this->lexer->token['value']; - $this->lexer->moveNext(); - $this->validateQuotedPair(); - } - if ($this->lexer->token['type'] === EmailLexer::S_IPV6TAG) { - $IPv6TAG = true; - } - if ($this->lexer->token['type'] === EmailLexer::S_CLOSEQBRACKET) { - break; - } - - $addressLiteral .= $this->lexer->token['value']; - - } while ($this->lexer->moveNext()); - - $addressLiteral = str_replace('[', '', $addressLiteral); - $addressLiteral = $this->checkIPV4Tag($addressLiteral); - - if (false === $addressLiteral) { - return $addressLiteral; - } - - if (!$IPv6TAG) { - $this->warnings[] = EmailValidator::RFC5322_DOMAINLITERAL; - return $addressLiteral; - } - - $this->warnings[] = EmailValidator::RFC5321_ADDRESSLITERAL; - - $this->checkIPV6Tag($addressLiteral); - - return $addressLiteral; - } - - /** - * @param string $addressLiteral - */ - protected function checkIPV4Tag($addressLiteral) - { - $matchesIP = array(); - - // Extract IPv4 part from the end of the address-literal (if there is one) - if (preg_match( - '/\\b(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/', - $addressLiteral, - $matchesIP - ) > 0 - ) { - $index = strrpos($addressLiteral, $matchesIP[0]); - if ($index === 0) { - $this->warnings[] = EmailValidator::RFC5321_ADDRESSLITERAL; - return false; - } - // Convert IPv4 part to IPv6 format for further testing - $addressLiteral = substr($addressLiteral, 0, $index) . '0:0'; - } - - return $addressLiteral; - } - - protected function checkDomainPartExceptions($prev) - { - if ($this->lexer->token['type'] === EmailLexer::S_COMMA) { - throw new \InvalidArgumentException('ERR_COMMA_IN_DOMAIN'); - } - - if ($this->lexer->token['type'] === EmailLexer::S_AT) { - throw new \InvalidArgumentException('ERR_CONSECUTIVEATS'); - } - - if ($this->lexer->token['type'] === EmailLexer::S_OPENQBRACKET && $prev['type'] !== EmailLexer::S_AT) { - throw new \InvalidArgumentException('ERR_EXPECTING_ATEXT'); - } - - if ($this->lexer->token['type'] === EmailLexer::S_HYPHEN && $this->lexer->isNextToken(EmailLexer::S_DOT)) { - throw new \InvalidArgumentException('ERR_DOMAINHYPHENEND'); - } - - if ($this->lexer->token['type'] === EmailLexer::S_BACKSLASH - && $this->lexer->isNextToken(EmailLexer::GENERIC)) { - throw new \InvalidArgumentException('ERR_EXPECTING_ATEXT'); - } - } - - protected function hasBrackets() - { - if ($this->lexer->token['type'] !== EmailLexer::S_OPENBRACKET) { - return false; - } - - try { - $this->lexer->find(EmailLexer::S_CLOSEBRACKET); - } catch (\RuntimeException $e) { - throw new \InvalidArgumentException('ERR_EXPECTING_DOMLIT_CLOSE'); - } - - return true; - } - - protected function checkLabelLength($prev) - { - if ($this->lexer->token['type'] === EmailLexer::S_DOT && - $prev['type'] === EmailLexer::GENERIC && - strlen($prev['value']) > 63 - ) { - $this->warnings[] = EmailValidator::RFC5322_LABEL_TOOLONG; - } - } - - protected function parseDomainComments() - { - $this->isUnclosedComment(); - while (!$this->lexer->isNextToken(EmailLexer::S_CLOSEPARENTHESIS)) { - $this->warnEscaping(); - $this->lexer->moveNext(); - } - - $this->lexer->moveNext(); - if ($this->lexer->isNextToken(EmailLexer::S_DOT)) { - throw new \InvalidArgumentException('ERR_EXPECTING_ATEXT'); - } - } -} diff --git a/core/vendor/egulias/email-validator/src/Egulias/EmailValidator/Parser/LocalPart.php b/core/vendor/egulias/email-validator/src/Egulias/EmailValidator/Parser/LocalPart.php deleted file mode 100644 index 4db0ea6..0000000 --- a/core/vendor/egulias/email-validator/src/Egulias/EmailValidator/Parser/LocalPart.php +++ /dev/null @@ -1,122 +0,0 @@ -lexer->token['type'] !== EmailLexer::S_AT && $this->lexer->token) { - - if ($this->lexer->token['type'] === EmailLexer::S_DOT && !$this->lexer->getPrevious()) { - throw new \InvalidArgumentException('ERR_DOT_START'); - } - - $closingQuote = $this->checkDQUOTE($closingQuote); - if ($closingQuote && $parseDQuote) { - $parseDQuote = $this->parseDoubleQuote(); - } - - if ($this->lexer->token['type'] === EmailLexer::S_OPENPARENTHESIS) { - $this->parseComments(); - } - - $this->checkConsecutiveDots(); - - if ( - $this->lexer->token['type'] === EmailLexer::S_DOT && - $this->lexer->isNextToken(EmailLexer::S_AT) - ) { - throw new \InvalidArgumentException('ERR_DOT_END'); - } - - $this->warnEscaping(); - $this->isInvalidToken($this->lexer->token, $closingQuote); - - if ($this->isFWS()) { - $this->parseFWS(); - } - - $this->lexer->moveNext(); - } - - $prev = $this->lexer->getPrevious(); - if (strlen($prev['value']) > EmailValidator::RFC5322_LOCAL_TOOLONG) { - $this->warnings[] = EmailValidator::RFC5322_LOCAL_TOOLONG; - } - } - - protected function parseDoubleQuote() - { - $parseAgain = true; - $special = array( - EmailLexer::S_CR => true, - EmailLexer::S_HTAB => true, - EmailLexer::S_LF => true - ); - - $invalid = array( - EmailLexer::C_NUL => true, - EmailLexer::S_HTAB => true, - EmailLexer::S_CR => true, - EmailLexer::S_LF => true - ); - $setSpecialsWarning = true; - - $this->lexer->moveNext(); - - while ($this->lexer->token['type'] !== EmailLexer::S_DQUOTE && $this->lexer->token) { - $parseAgain = false; - if (isset($special[$this->lexer->token['type']]) && $setSpecialsWarning) { - $this->warnings[] = EmailValidator::CFWS_FWS; - $setSpecialsWarning = false; - } - - $this->lexer->moveNext(); - - if (!$this->escaped() && isset($invalid[$this->lexer->token['type']])) { - throw new InvalidArgumentException("ERR_EXPECTED_ATEXT"); - } - } - - $prev = $this->lexer->getPrevious(); - - if ($prev['type'] === EmailLexer::S_BACKSLASH) { - if (!$this->checkDQUOTE(false)) { - throw new \InvalidArgumentException("ERR_UNCLOSED_DQUOTE"); - } - } - - if (!$this->lexer->isNextToken(EmailLexer::S_AT) && $prev['type'] !== EmailLexer::S_BACKSLASH) { - throw new \InvalidArgumentException("ERR_EXPECED_AT"); - } - - return $parseAgain; - } - - protected function isInvalidToken($token, $closingQuote) - { - $forbidden = array( - EmailLexer::S_COMMA, - EmailLexer::S_CLOSEBRACKET, - EmailLexer::S_OPENBRACKET, - EmailLexer::S_GREATERTHAN, - EmailLexer::S_LOWERTHAN, - EmailLexer::S_COLON, - EmailLexer::S_SEMICOLON, - EmailLexer::INVALID - ); - - if (in_array($token['type'], $forbidden) && !$closingQuote) { - throw new \InvalidArgumentException('ERR_EXPECTING_ATEXT'); - } - } -} diff --git a/core/vendor/egulias/email-validator/src/Egulias/EmailValidator/Parser/Parser.php b/core/vendor/egulias/email-validator/src/Egulias/EmailValidator/Parser/Parser.php deleted file mode 100644 index b66279e..0000000 --- a/core/vendor/egulias/email-validator/src/Egulias/EmailValidator/Parser/Parser.php +++ /dev/null @@ -1,190 +0,0 @@ -lexer = $lexer; - } - - public function getWarnings() - { - return $this->warnings; - } - - abstract function parse($str); - - /** - * validateQuotedPair - */ - protected function validateQuotedPair() - { - if (!($this->lexer->token['type'] === EmailLexer::INVALID - || $this->lexer->token['type'] === EmailLexer::C_DEL)) { - throw new \InvalidArgumentException('ERR_EXPECTING_QPAIR'); - } - - $this->warnings[] = EmailValidator::DEPREC_QP; - } - - /** - * @return string the the comment - * @throws \InvalidArgumentException - */ - protected function parseComments() - { - $this->isUnclosedComment(); - $this->warnings[] = EmailValidator::CFWS_COMMENT; - while (!$this->lexer->isNextToken(EmailLexer::S_CLOSEPARENTHESIS)) { - $this->warnEscaping(); - $this->lexer->moveNext(); - } - - $this->lexer->moveNext(); - if ($this->lexer->isNextTokenAny(array(EmailLexer::GENERIC, EmailLexer::S_EMPTY))) { - throw new \InvalidArgumentException('ERR_EXPECTING_ATEXT'); - } - - if ($this->lexer->isNextToken(EmailLexer::S_AT)) { - $this->warnings[] = EmailValidator::DEPREC_CFWS_NEAR_AT; - } - } - - protected function isUnclosedComment() - { - try { - $this->lexer->find(EmailLexer::S_CLOSEPARENTHESIS); - return true; - } catch (\RuntimeException $e) { - throw new \InvalidArgumentException('ERR_UNCLOSEDCOMMENT'); - } - } - - protected function parseFWS() - { - $previous = $this->lexer->getPrevious(); - - $this->checkCRLFInFWS(); - - if ($this->lexer->token['type'] === EmailLexer::S_CR) { - throw new \InvalidArgumentException("ERR_CR_NO_LF"); - } - - if ($this->lexer->isNextToken(EmailLexer::GENERIC) && $previous['type'] !== EmailLexer::S_AT) { - throw new \InvalidArgumentException("ERR_ATEXT_AFTER_CFWS"); - } - - if ($this->lexer->token['type'] === EmailLexer::S_LF || $this->lexer->token['type'] === EmailLexer::C_NUL) { - throw new \InvalidArgumentException('ERR_EXPECTING_CTEXT'); - } - - if ($this->lexer->isNextToken(EmailLexer::S_AT) || $previous['type'] === EmailLexer::S_AT) { - $this->warnings[] = EmailValidator::DEPREC_CFWS_NEAR_AT; - } else { - $this->warnings[] = EmailValidator::CFWS_FWS; - } - } - - protected function checkConsecutiveDots() - { - if ($this->lexer->token['type'] === EmailLexer::S_DOT && $this->lexer->isNextToken(EmailLexer::S_DOT)) { - throw new \InvalidArgumentException('ERR_CONSECUTIVEDOTS'); - } - } - - protected function isFWS() - { - if ($this->escaped()) { - return false; - } - - if ($this->lexer->token['type'] === EmailLexer::S_SP || - $this->lexer->token['type'] === EmailLexer::S_HTAB || - $this->lexer->token['type'] === EmailLexer::S_CR || - $this->lexer->token['type'] === EmailLexer::S_LF || - $this->lexer->token['type'] === EmailLexer::CRLF - ) { - return true; - } - - return false; - } - - protected function escaped() - { - $previous = $this->lexer->getPrevious(); - - if ($previous['type'] === EmailLexer::S_BACKSLASH - && - $this->lexer->token['type'] !== EmailLexer::GENERIC - ) { - return true; - } - - return false; - } - - protected function warnEscaping() - { - if ($this->lexer->token['type'] !== EmailLexer::S_BACKSLASH) { - return false; - } - - if ($this->lexer->isNextToken(EmailLexer::GENERIC)) { - throw new \InvalidArgumentException('ERR_EXPECTING_ATEXT'); - } - - if (!$this->lexer->isNextTokenAny(array(EmailLexer::S_SP, EmailLexer::S_HTAB, EmailLexer::C_DEL))) { - return false; - } - - $this->warnings[] = EmailValidator::DEPREC_QP; - return true; - - } - - protected function checkDQUOTE($hasClosingQuote) - { - if ($this->lexer->token['type'] !== EmailLexer::S_DQUOTE) { - return $hasClosingQuote; - } - if ($hasClosingQuote) { - return $hasClosingQuote; - } - $previous = $this->lexer->getPrevious(); - if ($this->lexer->isNextToken(EmailLexer::GENERIC) && $previous['type'] === EmailLexer::GENERIC) { - throw new \InvalidArgumentException('ERR_EXPECTING_ATEXT'); - } - - $this->warnings[] = EmailValidator::RFC5321_QUOTEDSTRING; - try { - $this->lexer->find(EmailLexer::S_DQUOTE); - $hasClosingQuote = true; - } catch (\Exception $e) { - throw new \InvalidArgumentException('ERR_UNCLOSEDQUOTEDSTR'); - } - - return $hasClosingQuote; - } - - protected function checkCRLFInFWS() - { - if ($this->lexer->token['type'] !== EmailLexer::CRLF) { - return; - } - if ($this->lexer->isNextToken(EmailLexer::CRLF)) { - throw new \InvalidArgumentException("ERR_FWS_CRLF_X2"); - } - if (!$this->lexer->isNextTokenAny(array(EmailLexer::S_SP, EmailLexer::S_HTAB))) { - throw new \InvalidArgumentException("ERR_FWS_CRLF_END"); - } - } -} diff --git a/core/vendor/egulias/email-validator/tests/bootstrap.php b/core/vendor/egulias/email-validator/tests/bootstrap.php deleted file mode 100644 index 676c4b1..0000000 --- a/core/vendor/egulias/email-validator/tests/bootstrap.php +++ /dev/null @@ -1,8 +0,0 @@ -isValid($testingMail); -} -$b = microtime(true); -echo ($b - $a) . ' seconds with EmailValidator + instantiation' . PHP_EOL; - -$a = microtime(true); -$validator = new EmailValidator(); -for ($i = 0; $i < $iterations; $i++) { - $isValid = $validator->isValid($testingMail); -} -$b = microtime(true); -echo ($b - $a) . ' seconds with EmailValidator once instanced' . PHP_EOL; diff --git a/core/vendor/egulias/email-validator/tests/egulias/Performance/AgainstOldIsemail.php b/core/vendor/egulias/email-validator/tests/egulias/Performance/AgainstOldIsemail.php deleted file mode 100644 index 99476c1..0000000 --- a/core/vendor/egulias/email-validator/tests/egulias/Performance/AgainstOldIsemail.php +++ /dev/null @@ -1,34 +0,0 @@ -isValid($testingMail); -} -$b = microtime(true); -echo ($b - $a) . ' seconds with EmailValidator + instantiation' . PHP_EOL; - -$a = microtime(true); -$validator = new EmailValidator(); -for ($i = 0; $i < $iterations; $i++) { - $isValid = $validator->isValid($testingMail); -} -$b = microtime(true); -echo ($b - $a) . ' seconds with EmailValidator once instanced' . PHP_EOL; diff --git a/core/vendor/egulias/email-validator/tests/egulias/Tests/EmailValidator/EmailLexerTest.php b/core/vendor/egulias/email-validator/tests/egulias/Tests/EmailValidator/EmailLexerTest.php deleted file mode 100644 index 4af771c..0000000 --- a/core/vendor/egulias/email-validator/tests/egulias/Tests/EmailValidator/EmailLexerTest.php +++ /dev/null @@ -1,92 +0,0 @@ -assertInstanceOf('Doctrine\Common\Lexer\AbstractLexer', $lexer); - } - - /** - * @dataProvider getTokens - * - */ - public function testLexerTokens($str, $token) - { - $lexer = new EmailLexer(); - $lexer->setInput($str); - $lexer->moveNext(); - $lexer->moveNext(); - $this->assertEquals($token, $lexer->token['type']); - } - - public function testLexerForTab() - { - $lexer = new EmailLexer(); - $lexer->setInput("foo\tbar"); - $lexer->moveNext(); - $lexer->skipUntil(EmailLexer::S_HTAB); - $lexer->moveNext(); - $this->assertEquals(EmailLexer::S_HTAB, $lexer->token['type']); - } - - public function testLexerSearchToken() - { - $lexer = new EmailLexer(); - $lexer->setInput("foo\tbar"); - $lexer->moveNext(); - $this->assertTrue($lexer->find(EmailLexer::S_HTAB)); - } - - public function testLexerHasInvalidTokens() - { - $lexer = new EmailLexer(); - $lexer->setInput(chr(226)); - $lexer->moveNext(); - $lexer->moveNext(); - $this->assertTrue($lexer->hasInvalidTokens()); - } - - public function getTokens() - { - return array( - array("foo", EmailLexer::GENERIC), - array("\r", EmailLexer::S_CR), - array("\t", EmailLexer::S_HTAB), - array("\r\n", EmailLexer::CRLF), - array("\n", EmailLexer::S_LF), - array(" ", EmailLexer::S_SP), - array("@", EmailLexer::S_AT), - array("IPv6", EmailLexer::S_IPV6TAG), - array("::", EmailLexer::S_DOUBLECOLON), - array(":", EmailLexer::S_COLON), - array(".", EmailLexer::S_DOT), - array("\"", EmailLexer::S_DQUOTE), - array("-", EmailLexer::S_HYPHEN), - array("\\", EmailLexer::S_BACKSLASH), - array("/", EmailLexer::S_SLASH), - array("(", EmailLexer::S_OPENPARENTHESIS), - array(")", EmailLexer::S_CLOSEPARENTHESIS), - array('<', EmailLexer::S_LOWERTHAN), - array('>', EmailLexer::S_GREATERTHAN), - array('[', EmailLexer::S_OPENBRACKET), - array(']', EmailLexer::S_CLOSEBRACKET), - array(';', EmailLexer::S_SEMICOLON), - array(',', EmailLexer::S_COMMA), - array('<', EmailLexer::S_LOWERTHAN), - array('>', EmailLexer::S_GREATERTHAN), - array('{', EmailLexer::S_OPENQBRACKET), - array('}', EmailLexer::S_CLOSEQBRACKET), - array('', EmailLexer::S_EMPTY), - array(chr(31), EmailLexer::INVALID), - array(chr(226), EmailLexer::INVALID), - array(chr(0), EmailLexer::C_NUL) - ); - } -} diff --git a/core/vendor/egulias/email-validator/tests/egulias/Tests/EmailValidator/EmailValidatorTest.php b/core/vendor/egulias/email-validator/tests/egulias/Tests/EmailValidator/EmailValidatorTest.php deleted file mode 100644 index e72fde4..0000000 --- a/core/vendor/egulias/email-validator/tests/egulias/Tests/EmailValidator/EmailValidatorTest.php +++ /dev/null @@ -1,327 +0,0 @@ -validator = new EmailValidator(); - } - - protected function tearDown() - { - $this->validator = null; - } - - /** - * @dataProvider getValidEmails - */ - public function testValidEmails($email) - { - $this->assertTrue($this->validator->isValid($email)); - } - - public function getValidEmails() - { - return array( - array('fabien@symfony.com'), - array('example@example.co.uk'), - array('fabien_potencier@example.fr'), - array('example@localhost'), - array('fab\'ien@symfony.com'), - array('fab\ ien@symfony.com'), - array('example((example))@fakedfake.co.uk'), - array('example@faked(fake).co.uk'), - array('fabien+@symfony.com'), - array('инфо@письмо.рф'), - array('"username"@example.com'), - array('"user,name"@example.com'), - array('"user name"@example.com'), - array('"user@name"@example.com'), - array('"\a"@iana.org'), - array('"test\ test"@iana.org'), - array('""@iana.org'), - array('"\""@iana.org'), - ); - } - - /** - * @dataProvider getInvalidEmails - */ - public function testInvalidEmails($email) - { - $this->assertFalse($this->validator->isValid($email)); - } - - public function getInvalidEmails() - { - return array( - - array('example.@example.co.uk'), - array('example@example@example.co.uk'), - array('(test_exampel@example.fr)'), - array('example(example)example@example.co.uk'), - array('.example@localhost'), - array('ex\ample@localhost'), - array('example@local\host'), - array('example@localhost.'), - array('user name@example.com'), - array('username@ example . com'), - array('example@(fake).com'), - array('example@(fake.com'), - array('username@example,com'), - array('usern,ame@example.com'), - array('user[na]me@example.com'), - array('"""@iana.org'), - array('"\"@iana.org'), - array('"test"test@iana.org'), - array('"test""test"@iana.org'), - array('"test"."test"@iana.org'), - array('"test".test@iana.org'), - array('"test"' . chr(0) . '@iana.org'), - array('"test\"@iana.org'), - array(chr(226) . '@iana.org'), - array('test@' . chr(226) . '.org'), - array('\r\ntest@iana.org'), - array('\r\n test@iana.org'), - array('\r\n \r\ntest@iana.org'), - array('\r\n \r\ntest@iana.org'), - array('\r\n \r\n test@iana.org'), - array('test@iana.org \r\n'), - array('test@iana.org \r\n '), - array('test@iana.org \r\n \r\n'), - array('test@iana.org \r\n\r\n'), - array('test@iana.org \r\n\r\n '), - array('test@iana/icann.org'), - ); - } - - /** - * @dataProvider getInvalidEmailsWithErrors - */ - public function testInvalidEmailsWithErrorsCheck($errors, $email) - { - $this->assertFalse($this->validator->isValid($email)); - - $this->assertEquals($errors, $this->validator->getError()); - } - - public function getInvalidEmailsWithErrors() - { - return array( - array(EmailValidator::ERR_NOLOCALPART, '@example.co.uk'), - array(EmailValidator::ERR_NODOMAIN, 'example@'), - array(EmailValidator::ERR_DOMAINHYPHENEND, 'example@example-.co.uk'), - array(EmailValidator::ERR_DOMAINHYPHENEND, 'example@example-'), - array(EmailValidator::ERR_CONSECUTIVEATS, 'example@@example.co.uk'), - array(EmailValidator::ERR_CONSECUTIVEDOTS, 'example..example@example.co.uk'), - array(EmailValidator::ERR_CONSECUTIVEDOTS, 'example@example..co.uk'), - array(EmailValidator::ERR_EXPECTING_ATEXT, '@example.fr'), - array(EmailValidator::ERR_DOT_START, '.example@localhost'), - array(EmailValidator::ERR_DOT_START, 'example@.localhost'), - array(EmailValidator::ERR_DOT_END, 'example@localhost.'), - array(EmailValidator::ERR_DOT_END, 'example.@example.co.uk'), - array(EmailValidator::ERR_UNCLOSEDCOMMENT, '(example@localhost'), - array(EmailValidator::ERR_UNCLOSEDQUOTEDSTR, '"example@localhost'), - array(EmailValidator::ERR_EXPECTING_ATEXT, 'exa"mple@localhost'), - //This was the original. But atext is not allowed after \n - //array(EmailValidator::ERR_EXPECTING_ATEXT, "exampl\ne@example.co.uk"), - array(EmailValidator::ERR_ATEXT_AFTER_CFWS, "exampl\ne@example.co.uk"), - array(EmailValidator::ERR_EXPECTING_DTEXT, "example@[[]"), - array(EmailValidator::ERR_ATEXT_AFTER_CFWS, "exampl\te@example.co.uk"), - array(EmailValidator::ERR_CR_NO_LF, "example@exa\rmple.co.uk"), - array(EmailValidator::ERR_CR_NO_LF, "example@[\r]"), - array(EmailValidator::ERR_CR_NO_LF, "exam\rple@example.co.uk"), - ); - } - - /** - * @dataProvider getInvalidEmailsWithWarnings - */ - public function testValidEmailsWithWarningsCheck($warnings, $email) - { - $this->assertTrue($this->validator->isValid($email, true)); - - $this->assertEquals($warnings, $this->validator->getWarnings()); - } - - /** - * @dataProvider getInvalidEmailsWithWarnings - */ - public function testInvalidEmailsWithDnsCheckAndStrictMode($warnings, $email) - { - $this->assertFalse($this->validator->isValid($email, true, true)); - - $this->assertEquals($warnings, $this->validator->getWarnings()); - } - - public function getInvalidEmailsWithWarnings() - { - return array( - array(array( EmailValidator::DEPREC_CFWS_NEAR_AT,), 'example @example.co.uk'), - array(array( EmailValidator::DEPREC_CFWS_NEAR_AT,), 'example@ example.co.uk'), - array(array( EmailValidator::CFWS_COMMENT,), 'example@example(examplecomment).co.uk'), - array( - array( - EmailValidator::CFWS_COMMENT, - EmailValidator::DEPREC_CFWS_NEAR_AT, - ), - 'example(examplecomment)@example.co.uk' - ), - array( - array( - EmailValidator::RFC5321_QUOTEDSTRING, - EmailValidator::CFWS_FWS, - ), - "\"\t\"@example.co.uk" - ), - array( - array( - EmailValidator::RFC5321_QUOTEDSTRING, - EmailValidator::CFWS_FWS, - ), - "\"\r\"@example.co.uk" - ), - array( - array( - EmailValidator::RFC5321_ADDRESSLITERAL, - EmailValidator::DNSWARN_NO_RECORD, - ), - 'example@[127.0.0.1]' - ), - array( - array( - EmailValidator::RFC5321_ADDRESSLITERAL, - EmailValidator::DNSWARN_NO_RECORD, - ), - 'example@[IPv6:2001:0db8:85a3:0000:0000:8a2e:0370:7334]' - ), - array( - array( - EmailValidator::RFC5321_ADDRESSLITERAL, - EmailValidator::RFC5321_IPV6DEPRECATED, - EmailValidator::DNSWARN_NO_RECORD, - ), - 'example@[IPv6:2001:0db8:85a3:0000:0000:8a2e:0370::]' - ), - array( - array( - EmailValidator::RFC5321_ADDRESSLITERAL, - EmailValidator::RFC5322_IPV6_MAXGRPS, - EmailValidator::DNSWARN_NO_RECORD, - ), - 'example@[IPv6:2001:0db8:85a3:0000:0000:8a2e:0370:7334::]' - ), - array( - array( - EmailValidator::RFC5321_ADDRESSLITERAL, - EmailValidator::RFC5322_IPV6_2X2XCOLON, - EmailValidator::DNSWARN_NO_RECORD, - ), - 'example@[IPv6:1::1::1]' - ), - array( - array( - EmailValidator::RFC5322_DOMLIT_OBSDTEXT, - EmailValidator::RFC5322_DOMAINLITERAL, - EmailValidator::DNSWARN_NO_RECORD, - ), - "example@[\n]" - ), - array( - array( - EmailValidator::RFC5322_DOMAINLITERAL, - EmailValidator::DNSWARN_NO_RECORD, - ), - 'example@[::1]' - ), - array( - array( - EmailValidator::RFC5322_DOMAINLITERAL, - EmailValidator::DNSWARN_NO_RECORD, - ), - 'example@[::123.45.67.178]' - ), - array( - array( - EmailValidator::RFC5322_IPV6_COLONSTRT, - EmailValidator::RFC5321_ADDRESSLITERAL, - EmailValidator::RFC5322_IPV6_GRPCOUNT, - EmailValidator::DNSWARN_NO_RECORD, - ), - 'example@[IPv6::2001:0db8:85a3:0000:0000:8a2e:0370:7334]' - ), - array( - array( - EmailValidator::RFC5321_ADDRESSLITERAL, - EmailValidator::RFC5322_IPV6_BADCHAR, - EmailValidator::DNSWARN_NO_RECORD, - ), - 'example@[IPv6:z001:0db8:85a3:0000:0000:8a2e:0370:7334]' - ), - array( - array( - EmailValidator::RFC5321_ADDRESSLITERAL, - EmailValidator::RFC5322_IPV6_COLONEND, - EmailValidator::DNSWARN_NO_RECORD, - ), - 'example@[IPv6:2001:0db8:85a3:0000:0000:8a2e:0370:]' - ), - array( - array( - EmailValidator::RFC5321_QUOTEDSTRING, - ), - '"example"@example.co.uk' - ), - array( - array( - EmailValidator::RFC5322_LOCAL_TOOLONG, - ), - 'too_long_localpart_too_long_localpart_too_long_localpart_too_long_localpart@example.co.uk' - ), - array( - array( - EmailValidator::RFC5322_LABEL_TOOLONG, - EmailValidator::DNSWARN_NO_RECORD, - ), - 'example@toolonglocalparttoolonglocalparttoolonglocalparttoolonglocalpart.co.uk' - ), - array( - array( - EmailValidator::RFC5322_DOMAIN_TOOLONG, - EmailValidator::RFC5322_TOOLONG, - EmailValidator::DNSWARN_NO_RECORD, - ), - 'example@toolonglocalparttoolonglocalparttoolonglocalparttoolonglocalparttoolonglocalparttoolonglocal'. - 'parttoolonglocalparttoolonglocalparttoolonglocalparttoolonglocalparttoolonglocalparttoolonglocalpart'. - 'toolonglocalparttoolonglocalparttoolonglocalparttoolonglocalpart' - ), - array( - array( - EmailValidator::RFC5322_DOMAIN_TOOLONG, - EmailValidator::RFC5322_TOOLONG, - EmailValidator::DNSWARN_NO_RECORD, - ), - 'example@toolonglocalparttoolonglocalparttoolonglocalparttoolonglocalparttoolonglocalparttoolonglocal'. - 'parttoolonglocalparttoolonglocalparttoolonglocalparttoolonglocalparttoolonglocalparttoolonglocalpart'. - 'toolonglocalparttoolonglocalparttoolonglocalparttoolonglocalpar' - ), - array( - array( - EmailValidator::DNSWARN_NO_RECORD, - ), - 'test@test' - ), - ); - } - - public function testInvalidEmailsWithStrict() - { - $this->assertFalse($this->validator->isValid('"test"@test', false, true)); - } -} diff --git a/core/vendor/guzzlehttp/guzzle/.gitignore b/core/vendor/guzzlehttp/guzzle/.gitignore deleted file mode 100644 index 83ec41e..0000000 --- a/core/vendor/guzzlehttp/guzzle/.gitignore +++ /dev/null @@ -1,11 +0,0 @@ -phpunit.xml -composer.phar -composer.lock -composer-test.lock -vendor/ -build/artifacts/ -artifacts/ -docs/_build -docs/*.pyc -.idea -.DS_STORE diff --git a/core/vendor/guzzlehttp/guzzle/.travis.yml b/core/vendor/guzzlehttp/guzzle/.travis.yml deleted file mode 100644 index 77bcf4a..0000000 --- a/core/vendor/guzzlehttp/guzzle/.travis.yml +++ /dev/null @@ -1,39 +0,0 @@ -language: php - -php: - - 5.4 - - 5.5 - - 5.6 - - hhvm - -before_script: - - curl --version - - pear config-set php_ini ~/.phpenv/versions/`php -r 'echo phpversion();'`/etc/php.ini || echo 'Error modifying PEAR' - - pecl install uri_template || echo 'Error installing uri_template' - - composer self-update - - composer install --no-interaction --prefer-source --dev - - ~/.nvm/nvm.sh install v0.6.14 - - ~/.nvm/nvm.sh run v0.6.14 - -script: make test - -matrix: - allow_failures: - - php: hhvm - fast_finish: true - -before_deploy: - - make package - -deploy: - provider: releases - api_key: - secure: UpypqlYgsU68QT/x40YzhHXvzWjFwCNo9d+G8KAdm7U9+blFfcWhV1aMdzugvPMl6woXgvJj7qHq5tAL4v6oswCORhpSBfLgOQVFaica5LiHsvWlAedOhxGmnJqMTwuepjBCxXhs3+I8Kof1n4oUL9gKytXjOVCX/f7XU1HiinU= - file: - - build/artifacts/guzzle.phar - - build/artifacts/guzzle.zip - on: - repo: guzzle/guzzle - tags: true - all_branches: true - php: 5.4 diff --git a/core/vendor/guzzlehttp/guzzle/CHANGELOG.md b/core/vendor/guzzlehttp/guzzle/CHANGELOG.md deleted file mode 100644 index e997e10..0000000 --- a/core/vendor/guzzlehttp/guzzle/CHANGELOG.md +++ /dev/null @@ -1,1013 +0,0 @@ -# CHANGELOG - -## 5.0.3 - 2014-11-03 - -This change updates query strings so that they are treated as un-encoded values -by default where the value represents an un-encoded value to send over the -wire. A Query object then encodes the value before sending over the wire. This -means that even value query string values (e.g., ":") are url encoded. This -makes the Query class match PHP's http_build_query function. However, if you -want to send requests over the wire using valid query string characters that do -not need to be encoded, then you can provide a string to Url::setQuery() and -pass true as the second argument to specify that the query string is a raw -string that should not be parsed or encoded (unless a call to getQuery() is -subsequently made, forcing the query-string to be converted into a Query -object). - -## 5.0.2 - 2014-10-30 - -* Added a trailing `\r\n` to multipart/form-data payloads. See - https://github.com/guzzle/guzzle/pull/871 -* Added a `GuzzleHttp\Pool::send()` convenience method to match the docs. -* Status codes are now returned as integers. See - https://github.com/guzzle/guzzle/issues/881 -* No longer overwriting an existing `application/x-www-form-urlencoded` header - when sending POST requests, allowing for customized headers. See - https://github.com/guzzle/guzzle/issues/877 -* Improved path URL serialization. - - * No longer double percent-encoding characters in the path or query string if - they are already encoded. - * Now properly encoding the supplied path to a URL object, instead of only - encoding ' ' and '?'. - * Note: This has been changed in 5.0.3 to now encode query string values by - default unless the `rawString` argument is provided when setting the query - string on a URL: Now allowing many more characters to be present in the - query string without being percent encoded. See http://tools.ietf.org/html/rfc3986#appendix-A - -## 5.0.1 - 2014-10-16 - -Bugfix release. - -* Fixed an issue where connection errors still returned response object in - error and end events event though the response is unusable. This has been - corrected so that a response is not returned in the `getResponse` method of - these events if the response did not complete. https://github.com/guzzle/guzzle/issues/867 -* Fixed an issue where transfer statistics were not being populated in the - RingBridge. https://github.com/guzzle/guzzle/issues/866 - -## 5.0.0 - 2014-10-12 - -Adding support for non-blocking responses and some minor API cleanup. - -### New Features - -* Added support for non-blocking responses based on `guzzlehttp/guzzle-ring`. -* Added a public API for creating a default HTTP adapter. -* Updated the redirect plugin to be non-blocking so that redirects are sent - concurrently. Other plugins like this can now be updated to be non-blocking. -* Added a "progress" event so that you can get upload and download progress - events. -* Added `GuzzleHttp\Pool` which implements FutureInterface and transfers - requests concurrently using a capped pool size as efficiently as possible. -* Added `hasListeners()` to EmitterInterface. -* Removed `GuzzleHttp\ClientInterface::sendAll` and marked - `GuzzleHttp\Client::sendAll` as deprecated (it's still there, just not the - recommended way). - -### Breaking changes - -The breaking changes in this release are relatively minor. The biggest thing to -look out for is that request and response objects no longer implement fluent -interfaces. - -* Removed the fluent interfaces (i.e., ``return $this``) from requests, - responses, ``GuzzleHttp\Collection``, ``GuzzleHttp\Url``, - ``GuzzleHttp\Query``, ``GuzzleHttp\Post\PostBody``, and - ``GuzzleHttp\Cookie\SetCookie``. This blog post provides a good outline of - why I did this: http://ocramius.github.io/blog/fluent-interfaces-are-evil/. - This also makes the Guzzle message interfaces compatible with the current - PSR-7 message proposal. -* Removed "functions.php", so that Guzzle is truly PSR-4 compliant. Except - for the HTTP request functions from function.php, these functions are now - implemented in `GuzzleHttp\Utils` using camelCase. `GuzzleHttp\json_decode` - moved to `GuzzleHttp\Utils::jsonDecode`. `GuzzleHttp\get_path` moved to - `GuzzleHttp\Utils::getPath`. `GuzzleHttp\set_path` moved to - `GuzzleHttp\Utils::setPath`. `GuzzleHttp\batch` should now be - `GuzzleHttp\Pool::batch`, which returns a bjectStorage`. Using functions.php - caused problems for many users: they aren't PSR-4 compliant, require an - explicit include, and needed an if-guard to ensure that the functions are not - declared multiple times. -* Rewrote adapter layer. - * Removing all classes from `GuzzleHttp\Adapter`, these are now - implemented as callables that are stored in `GuzzleHttp\Ring\Client`. - * Removed the concept of "parallel adapters". Sending requests serially or - concurrently is now handled using a single adapter. - * Moved `GuzzleHttp\Adapter\Transaction` to `GuzzleHttp\Transaction`. The - Transaction object now exposes the request, response, and client as public - properties. The getters and setters have been removed. -* Removed the "headers" event. This event was only useful for changing the - body a response once the headers of the response were known. You can implement - a similar behavior in a number of ways. One example might be to use a - FnStream that has access to the transaction being sent. For example, when the - first byte is written, you could check if the response headers match your - expectations, and if so, change the actual stream body that is being - written to. -* Removed the `asArray` parameter from - `GuzzleHttp\Message\MessageInterface::getHeader`. If you want to get a header - value as an array, then use the newly added ``getHeaderAsArray()`` method of - ``MessageInterface``. This change makes the Guzzle interfaces compatible with - the PSR-7 interfaces. -* ``GuzzleHttp\Message\MessageFactory`` no longer allows subclasses to add - custom request options using double-dispatch (this was an implementation - detail). Instead, you should now provide an associative array to the - constructor which is a mapping of the request option name mapping to a - function that applies the option value to a request. -* Removed the concept of "throwImmediately" from exceptions and error events. - This control mechanism was used to stop a transfer of concurrent requests - from completing. This can now be handled by throwing the exception or by - cancelling a pool of requests or each outstanding future request individually. -* Updated to "GuzzleHttp\Streams" 3.0. - * `GuzzleHttp\Stream\StreamInterface::getContents()` no longer accepts a - `maxLen` parameter. This update makes the Guzzle streams project - compatible with the current PSR-7 proposal. - * ``GuzzleHttp\Stream\Stream::__construct``, - ``GuzzleHttp\Stream\Stream::factory``, and - ``GuzzleHttp\Stream\Utils::create`` no longer accept a size in the second - argument. They now accept an associative array of options, including the - "size" key and "metadata" key which can be used to provide custom metadata. - -## 4.2.2 - 2014-09-08 - -* Fixed a memory leak in the CurlAdapter when reusing cURL handles. -* No longer using `request_fulluri` in stream adapter proxies. -* Relative redirects are now based on the last response, not the first response. - -## 4.2.1 - 2014-08-19 - -* Ensuring that the StreamAdapter does not always add a Content-Type header -* Adding automated github releases with a phar and zip - -## 4.2.0 - 2014-08-17 - -* Now merging in default options using a case-insensitive comparison. - Closes https://github.com/guzzle/guzzle/issues/767 -* Added the ability to automatically decode `Content-Encoding` response bodies - using the `decode_content` request option. This is set to `true` by default - to decode the response body if it comes over the wire with a - `Content-Encoding`. Set this value to `false` to disable decoding the - response content, and pass a string to provide a request `Accept-Encoding` - header and turn on automatic response decoding. This feature now allows you - to pass an `Accept-Encoding` header in the headers of a request but still - disable automatic response decoding. - Closes https://github.com/guzzle/guzzle/issues/764 -* Added the ability to throw an exception immediately when transferring - requests in parallel. Closes https://github.com/guzzle/guzzle/issues/760 -* Updating guzzlehttp/streams dependency to ~2.1 -* No longer utilizing the now deprecated namespaced methods from the stream - package. - -## 4.1.8 - 2014-08-14 - -* Fixed an issue in the CurlFactory that caused setting the `stream=false` - request option to throw an exception. - See: https://github.com/guzzle/guzzle/issues/769 -* TransactionIterator now calls rewind on the inner iterator. - See: https://github.com/guzzle/guzzle/pull/765 -* You can now set the `Content-Type` header to `multipart/form-data` - when creating POST requests to force multipart bodies. - See https://github.com/guzzle/guzzle/issues/768 - -## 4.1.7 - 2014-08-07 - -* Fixed an error in the HistoryPlugin that caused the same request and response - to be logged multiple times when an HTTP protocol error occurs. -* Ensuring that cURL does not add a default Content-Type when no Content-Type - has been supplied by the user. This prevents the adapter layer from modifying - the request that is sent over the wire after any listeners may have already - put the request in a desired state (e.g., signed the request). -* Throwing an exception when you attempt to send requests that have the - "stream" set to true in parallel using the MultiAdapter. -* Only calling curl_multi_select when there are active cURL handles. This was - previously changed and caused performance problems on some systems due to PHP - always selecting until the maximum select timeout. -* Fixed a bug where multipart/form-data POST fields were not correctly - aggregated (e.g., values with "&"). - -## 4.1.6 - 2014-08-03 - -* Added helper methods to make it easier to represent messages as strings, - including getting the start line and getting headers as a string. - -## 4.1.5 - 2014-08-02 - -* Automatically retrying cURL "Connection died, retrying a fresh connect" - errors when possible. -* cURL implementation cleanup -* Allowing multiple event subscriber listeners to be registered per event by - passing an array of arrays of listener configuration. - -## 4.1.4 - 2014-07-22 - -* Fixed a bug that caused multi-part POST requests with more than one field to - serialize incorrectly. -* Paths can now be set to "0" -* `ResponseInterface::xml` now accepts a `libxml_options` option and added a - missing default argument that was required when parsing XML response bodies. -* A `save_to` stream is now created lazily, which means that files are not - created on disk unless a request succeeds. - -## 4.1.3 - 2014-07-15 - -* Various fixes to multipart/form-data POST uploads -* Wrapping function.php in an if-statement to ensure Guzzle can be used - globally and in a Composer install -* Fixed an issue with generating and merging in events to an event array -* POST headers are only applied before sending a request to allow you to change - the query aggregator used before uploading -* Added much more robust query string parsing -* Fixed various parsing and normalization issues with URLs -* Fixing an issue where multi-valued headers were not being utilized correctly - in the StreamAdapter - -## 4.1.2 - 2014-06-18 - -* Added support for sending payloads with GET requests - -## 4.1.1 - 2014-06-08 - -* Fixed an issue related to using custom message factory options in subclasses -* Fixed an issue with nested form fields in a multi-part POST -* Fixed an issue with using the `json` request option for POST requests -* Added `ToArrayInterface` to `GuzzleHttp\Cookie\CookieJar` - -## 4.1.0 - 2014-05-27 - -* Added a `json` request option to easily serialize JSON payloads. -* Added a `GuzzleHttp\json_decode()` wrapper to safely parse JSON. -* Added `setPort()` and `getPort()` to `GuzzleHttp\Message\RequestInterface`. -* Added the ability to provide an emitter to a client in the client constructor. -* Added the ability to persist a cookie session using $_SESSION. -* Added a trait that can be used to add event listeners to an iterator. -* Removed request method constants from RequestInterface. -* Fixed warning when invalid request start-lines are received. -* Updated MessageFactory to work with custom request option methods. -* Updated cacert bundle to latest build. - -4.0.2 (2014-04-16) ------------------- - -* Proxy requests using the StreamAdapter now properly use request_fulluri (#632) -* Added the ability to set scalars as POST fields (#628) - -## 4.0.1 - 2014-04-04 - -* The HTTP status code of a response is now set as the exception code of - RequestException objects. -* 303 redirects will now correctly switch from POST to GET requests. -* The default parallel adapter of a client now correctly uses the MultiAdapter. -* HasDataTrait now initializes the internal data array as an empty array so - that the toArray() method always returns an array. - -## 4.0.0 - 2014-03-29 - -* For more information on the 4.0 transition, see: - http://mtdowling.com/blog/2014/03/15/guzzle-4-rc/ -* For information on changes and upgrading, see: - https://github.com/guzzle/guzzle/blob/master/UPGRADING.md#3x-to-40 -* Added `GuzzleHttp\batch()` as a convenience function for sending requests in - parallel without needing to write asynchronous code. -* Restructured how events are added to `GuzzleHttp\ClientInterface::sendAll()`. - You can now pass a callable or an array of associative arrays where each - associative array contains the "fn", "priority", and "once" keys. - -## 4.0.0.rc-2 - 2014-03-25 - -* Removed `getConfig()` and `setConfig()` from clients to avoid confusion - around whether things like base_url, message_factory, etc. should be able to - be retrieved or modified. -* Added `getDefaultOption()` and `setDefaultOption()` to ClientInterface -* functions.php functions were renamed using snake_case to match PHP idioms -* Added support for `HTTP_PROXY`, `HTTPS_PROXY`, and - `GUZZLE_CURL_SELECT_TIMEOUT` environment variables -* Added the ability to specify custom `sendAll()` event priorities -* Added the ability to specify custom stream context options to the stream - adapter. -* Added a functions.php function for `get_path()` and `set_path()` -* CurlAdapter and MultiAdapter now use a callable to generate curl resources -* MockAdapter now properly reads a body and emits a `headers` event -* Updated Url class to check if a scheme and host are set before adding ":" - and "//". This allows empty Url (e.g., "") to be serialized as "". -* Parsing invalid XML no longer emits warnings -* Curl classes now properly throw AdapterExceptions -* Various performance optimizations -* Streams are created with the faster `Stream\create()` function -* Marked deprecation_proxy() as internal -* Test server is now a collection of static methods on a class - -## 4.0.0-rc.1 - 2014-03-15 - -* See https://github.com/guzzle/guzzle/blob/master/UPGRADING.md#3x-to-40 - -## 3.8.1 - 2014-01-28 - -* Bug: Always using GET requests when redirecting from a 303 response -* Bug: CURLOPT_SSL_VERIFYHOST is now correctly set to false when setting `$certificateAuthority` to false in - `Guzzle\Http\ClientInterface::setSslVerification()` -* Bug: RedirectPlugin now uses strict RFC 3986 compliance when combining a base URL with a relative URL -* Bug: The body of a request can now be set to `"0"` -* Sending PHP stream requests no longer forces `HTTP/1.0` -* Adding more information to ExceptionCollection exceptions so that users have more context, including a stack trace of - each sub-exception -* Updated the `$ref` attribute in service descriptions to merge over any existing parameters of a schema (rather than - clobbering everything). -* Merging URLs will now use the query string object from the relative URL (thus allowing custom query aggregators) -* Query strings are now parsed in a way that they do no convert empty keys with no value to have a dangling `=`. - For example `foo&bar=baz` is now correctly parsed and recognized as `foo&bar=baz` rather than `foo=&bar=baz`. -* Now properly escaping the regular expression delimiter when matching Cookie domains. -* Network access is now disabled when loading XML documents - -## 3.8.0 - 2013-12-05 - -* Added the ability to define a POST name for a file -* JSON response parsing now properly walks additionalProperties -* cURL error code 18 is now retried automatically in the BackoffPlugin -* Fixed a cURL error when URLs contain fragments -* Fixed an issue in the BackoffPlugin retry event where it was trying to access all exceptions as if they were - CurlExceptions -* CURLOPT_PROGRESS function fix for PHP 5.5 (69fcc1e) -* Added the ability for Guzzle to work with older versions of cURL that do not support `CURLOPT_TIMEOUT_MS` -* Fixed a bug that was encountered when parsing empty header parameters -* UriTemplate now has a `setRegex()` method to match the docs -* The `debug` request parameter now checks if it is truthy rather than if it exists -* Setting the `debug` request parameter to true shows verbose cURL output instead of using the LogPlugin -* Added the ability to combine URLs using strict RFC 3986 compliance -* Command objects can now return the validation errors encountered by the command -* Various fixes to cache revalidation (#437 and 29797e5) -* Various fixes to the AsyncPlugin -* Cleaned up build scripts - -## 3.7.4 - 2013-10-02 - -* Bug fix: 0 is now an allowed value in a description parameter that has a default value (#430) -* Bug fix: SchemaFormatter now returns an integer when formatting to a Unix timestamp - (see https://github.com/aws/aws-sdk-php/issues/147) -* Bug fix: Cleaned up and fixed URL dot segment removal to properly resolve internal dots -* Minimum PHP version is now properly specified as 5.3.3 (up from 5.3.2) (#420) -* Updated the bundled cacert.pem (#419) -* OauthPlugin now supports adding authentication to headers or query string (#425) - -## 3.7.3 - 2013-09-08 - -* Added the ability to get the exception associated with a request/command when using `MultiTransferException` and - `CommandTransferException`. -* Setting `additionalParameters` of a response to false is now honored when parsing responses with a service description -* Schemas are only injected into response models when explicitly configured. -* No longer guessing Content-Type based on the path of a request. Content-Type is now only guessed based on the path of - an EntityBody. -* Bug fix: ChunkedIterator can now properly chunk a \Traversable as well as an \Iterator. -* Bug fix: FilterIterator now relies on `\Iterator` instead of `\Traversable`. -* Bug fix: Gracefully handling malformed responses in RequestMediator::writeResponseBody() -* Bug fix: Replaced call to canCache with canCacheRequest in the CallbackCanCacheStrategy of the CachePlugin -* Bug fix: Visiting XML attributes first before visting XML children when serializing requests -* Bug fix: Properly parsing headers that contain commas contained in quotes -* Bug fix: mimetype guessing based on a filename is now case-insensitive - -## 3.7.2 - 2013-08-02 - -* Bug fix: Properly URL encoding paths when using the PHP-only version of the UriTemplate expander - See https://github.com/guzzle/guzzle/issues/371 -* Bug fix: Cookie domains are now matched correctly according to RFC 6265 - See https://github.com/guzzle/guzzle/issues/377 -* Bug fix: GET parameters are now used when calculating an OAuth signature -* Bug fix: Fixed an issue with cache revalidation where the If-None-Match header was being double quoted -* `Guzzle\Common\AbstractHasDispatcher::dispatch()` now returns the event that was dispatched -* `Guzzle\Http\QueryString::factory()` now guesses the most appropriate query aggregator to used based on the input. - See https://github.com/guzzle/guzzle/issues/379 -* Added a way to add custom domain objects to service description parsing using the `operation.parse_class` event. See - https://github.com/guzzle/guzzle/pull/380 -* cURL multi cleanup and optimizations - -## 3.7.1 - 2013-07-05 - -* Bug fix: Setting default options on a client now works -* Bug fix: Setting options on HEAD requests now works. See #352 -* Bug fix: Moving stream factory before send event to before building the stream. See #353 -* Bug fix: Cookies no longer match on IP addresses per RFC 6265 -* Bug fix: Correctly parsing header parameters that are in `<>` and quotes -* Added `cert` and `ssl_key` as request options -* `Host` header can now diverge from the host part of a URL if the header is set manually -* `Guzzle\Service\Command\LocationVisitor\Request\XmlVisitor` was rewritten to change from using SimpleXML to XMLWriter -* OAuth parameters are only added via the plugin if they aren't already set -* Exceptions are now thrown when a URL cannot be parsed -* Returning `false` if `Guzzle\Http\EntityBody::getContentMd5()` fails -* Not setting a `Content-MD5` on a command if calculating the Content-MD5 fails via the CommandContentMd5Plugin - -## 3.7.0 - 2013-06-10 - -* See UPGRADING.md for more information on how to upgrade. -* Requests now support the ability to specify an array of $options when creating a request to more easily modify a - request. You can pass a 'request.options' configuration setting to a client to apply default request options to - every request created by a client (e.g. default query string variables, headers, curl options, etc.). -* Added a static facade class that allows you to use Guzzle with static methods and mount the class to `\Guzzle`. - See `Guzzle\Http\StaticClient::mount`. -* Added `command.request_options` to `Guzzle\Service\Command\AbstractCommand` to pass request options to requests - created by a command (e.g. custom headers, query string variables, timeout settings, etc.). -* Stream size in `Guzzle\Stream\PhpStreamRequestFactory` will now be set if Content-Length is returned in the - headers of a response -* Added `Guzzle\Common\Collection::setPath($path, $value)` to set a value into an array using a nested key - (e.g. `$collection->setPath('foo/baz/bar', 'test'); echo $collection['foo']['bar']['bar'];`) -* ServiceBuilders now support storing and retrieving arbitrary data -* CachePlugin can now purge all resources for a given URI -* CachePlugin can automatically purge matching cached items when a non-idempotent request is sent to a resource -* CachePlugin now uses the Vary header to determine if a resource is a cache hit -* `Guzzle\Http\Message\Response` now implements `\Serializable` -* Added `Guzzle\Cache\CacheAdapterFactory::fromCache()` to more easily create cache adapters -* `Guzzle\Service\ClientInterface::execute()` now accepts an array, single command, or Traversable -* Fixed a bug in `Guzzle\Http\Message\Header\Link::addLink()` -* Better handling of calculating the size of a stream in `Guzzle\Stream\Stream` using fstat() and caching the size -* `Guzzle\Common\Exception\ExceptionCollection` now creates a more readable exception message -* Fixing BC break: Added back the MonologLogAdapter implementation rather than extending from PsrLog so that older - Symfony users can still use the old version of Monolog. -* Fixing BC break: Added the implementation back in for `Guzzle\Http\Message\AbstractMessage::getTokenizedHeader()`. - Now triggering an E_USER_DEPRECATED warning when used. Use `$message->getHeader()->parseParams()`. -* Several performance improvements to `Guzzle\Common\Collection` -* Added an `$options` argument to the end of the following methods of `Guzzle\Http\ClientInterface`: - createRequest, head, delete, put, patch, post, options, prepareRequest -* Added an `$options` argument to the end of `Guzzle\Http\Message\Request\RequestFactoryInterface::createRequest()` -* Added an `applyOptions()` method to `Guzzle\Http\Message\Request\RequestFactoryInterface` -* Changed `Guzzle\Http\ClientInterface::get($uri = null, $headers = null, $body = null)` to - `Guzzle\Http\ClientInterface::get($uri = null, $headers = null, $options = array())`. You can still pass in a - resource, string, or EntityBody into the $options parameter to specify the download location of the response. -* Changed `Guzzle\Common\Collection::__construct($data)` to no longer accepts a null value for `$data` but a - default `array()` -* Added `Guzzle\Stream\StreamInterface::isRepeatable` -* Removed `Guzzle\Http\ClientInterface::setDefaultHeaders(). Use - $client->getConfig()->setPath('request.options/headers/{header_name}', 'value')`. or - $client->getConfig()->setPath('request.options/headers', array('header_name' => 'value'))`. -* Removed `Guzzle\Http\ClientInterface::getDefaultHeaders(). Use $client->getConfig()->getPath('request.options/headers')`. -* Removed `Guzzle\Http\ClientInterface::expandTemplate()` -* Removed `Guzzle\Http\ClientInterface::setRequestFactory()` -* Removed `Guzzle\Http\ClientInterface::getCurlMulti()` -* Removed `Guzzle\Http\Message\RequestInterface::canCache` -* Removed `Guzzle\Http\Message\RequestInterface::setIsRedirect` -* Removed `Guzzle\Http\Message\RequestInterface::isRedirect` -* Made `Guzzle\Http\Client::expandTemplate` and `getUriTemplate` protected methods. -* You can now enable E_USER_DEPRECATED warnings to see if you are using a deprecated method by setting - `Guzzle\Common\Version::$emitWarnings` to true. -* Marked `Guzzle\Http\Message\Request::isResponseBodyRepeatable()` as deprecated. Use - `$request->getResponseBody()->isRepeatable()` instead. -* Marked `Guzzle\Http\Message\Request::canCache()` as deprecated. Use - `Guzzle\Plugin\Cache\DefaultCanCacheStrategy->canCacheRequest()` instead. -* Marked `Guzzle\Http\Message\Request::canCache()` as deprecated. Use - `Guzzle\Plugin\Cache\DefaultCanCacheStrategy->canCacheRequest()` instead. -* Marked `Guzzle\Http\Message\Request::setIsRedirect()` as deprecated. Use the HistoryPlugin instead. -* Marked `Guzzle\Http\Message\Request::isRedirect()` as deprecated. Use the HistoryPlugin instead. -* Marked `Guzzle\Cache\CacheAdapterFactory::factory()` as deprecated -* Marked 'command.headers', 'command.response_body' and 'command.on_complete' as deprecated for AbstractCommand. - These will work through Guzzle 4.0 -* Marked 'request.params' for `Guzzle\Http\Client` as deprecated. Use [request.options][params]. -* Marked `Guzzle\Service\Client::enableMagicMethods()` as deprecated. Magic methods can no longer be disabled on a Guzzle\Service\Client. -* Marked `Guzzle\Service\Client::getDefaultHeaders()` as deprecated. Use $client->getConfig()->getPath('request.options/headers')`. -* Marked `Guzzle\Service\Client::setDefaultHeaders()` as deprecated. Use $client->getConfig()->setPath('request.options/headers/{header_name}', 'value')`. -* Marked `Guzzle\Parser\Url\UrlParser` as deprecated. Just use PHP's `parse_url()` and percent encode your UTF-8. -* Marked `Guzzle\Common\Collection::inject()` as deprecated. -* Marked `Guzzle\Plugin\CurlAuth\CurlAuthPlugin` as deprecated. Use `$client->getConfig()->setPath('request.options/auth', array('user', 'pass', 'Basic|Digest');` -* CacheKeyProviderInterface and DefaultCacheKeyProvider are no longer used. All of this logic is handled in a - CacheStorageInterface. These two objects and interface will be removed in a future version. -* Always setting X-cache headers on cached responses -* Default cache TTLs are now handled by the CacheStorageInterface of a CachePlugin -* `CacheStorageInterface::cache($key, Response $response, $ttl = null)` has changed to `cache(RequestInterface - $request, Response $response);` -* `CacheStorageInterface::fetch($key)` has changed to `fetch(RequestInterface $request);` -* `CacheStorageInterface::delete($key)` has changed to `delete(RequestInterface $request);` -* Added `CacheStorageInterface::purge($url)` -* `DefaultRevalidation::__construct(CacheKeyProviderInterface $cacheKey, CacheStorageInterface $cache, CachePlugin - $plugin)` has changed to `DefaultRevalidation::__construct(CacheStorageInterface $cache, - CanCacheStrategyInterface $canCache = null)` -* Added `RevalidationInterface::shouldRevalidate(RequestInterface $request, Response $response)` - -## 3.6.0 - 2013-05-29 - -* ServiceDescription now implements ToArrayInterface -* Added command.hidden_params to blacklist certain headers from being treated as additionalParameters -* Guzzle can now correctly parse incomplete URLs -* Mixed casing of headers are now forced to be a single consistent casing across all values for that header. -* Messages internally use a HeaderCollection object to delegate handling case-insensitive header resolution -* Removed the whole changedHeader() function system of messages because all header changes now go through addHeader(). -* Specific header implementations can be created for complex headers. When a message creates a header, it uses a - HeaderFactory which can map specific headers to specific header classes. There is now a Link header and - CacheControl header implementation. -* Removed from interface: Guzzle\Http\ClientInterface::setUriTemplate -* Removed from interface: Guzzle\Http\ClientInterface::setCurlMulti() -* Removed Guzzle\Http\Message\Request::receivedRequestHeader() and implemented this functionality in - Guzzle\Http\Curl\RequestMediator -* Removed the optional $asString parameter from MessageInterface::getHeader(). Just cast the header to a string. -* Removed the optional $tryChunkedTransfer option from Guzzle\Http\Message\EntityEnclosingRequestInterface -* Removed the $asObjects argument from Guzzle\Http\Message\MessageInterface::getHeaders() -* Removed Guzzle\Parser\ParserRegister::get(). Use getParser() -* Removed Guzzle\Parser\ParserRegister::set(). Use registerParser(). -* All response header helper functions return a string rather than mixing Header objects and strings inconsistently -* Removed cURL blacklist support. This is no longer necessary now that Expect, Accept, etc. are managed by Guzzle - directly via interfaces -* Removed the injecting of a request object onto a response object. The methods to get and set a request still exist - but are a no-op until removed. -* Most classes that used to require a ``Guzzle\Service\Command\CommandInterface` typehint now request a - `Guzzle\Service\Command\ArrayCommandInterface`. -* Added `Guzzle\Http\Message\RequestInterface::startResponse()` to the RequestInterface to handle injecting a response - on a request while the request is still being transferred -* The ability to case-insensitively search for header values -* Guzzle\Http\Message\Header::hasExactHeader -* Guzzle\Http\Message\Header::raw. Use getAll() -* Deprecated cache control specific methods on Guzzle\Http\Message\AbstractMessage. Use the CacheControl header object - instead. -* `Guzzle\Service\Command\CommandInterface` now extends from ToArrayInterface and ArrayAccess -* Added the ability to cast Model objects to a string to view debug information. - -## 3.5.0 - 2013-05-13 - -* Bug: Fixed a regression so that request responses are parsed only once per oncomplete event rather than multiple times -* Bug: Better cleanup of one-time events accross the board (when an event is meant to fire once, it will now remove - itself from the EventDispatcher) -* Bug: `Guzzle\Log\MessageFormatter` now properly writes "total_time" and "connect_time" values -* Bug: Cloning an EntityEnclosingRequest now clones the EntityBody too -* Bug: Fixed an undefined index error when parsing nested JSON responses with a sentAs parameter that reference a - non-existent key -* Bug: All __call() method arguments are now required (helps with mocking frameworks) -* Deprecating Response::getRequest() and now using a shallow clone of a request object to remove a circular reference - to help with refcount based garbage collection of resources created by sending a request -* Deprecating ZF1 cache and log adapters. These will be removed in the next major version. -* Deprecating `Response::getPreviousResponse()` (method signature still exists, but it'sdeprecated). Use the - HistoryPlugin for a history. -* Added a `responseBody` alias for the `response_body` location -* Refactored internals to no longer rely on Response::getRequest() -* HistoryPlugin can now be cast to a string -* HistoryPlugin now logs transactions rather than requests and responses to more accurately keep track of the requests - and responses that are sent over the wire -* Added `getEffectiveUrl()` and `getRedirectCount()` to Response objects - -## 3.4.3 - 2013-04-30 - -* Bug fix: Fixing bug introduced in 3.4.2 where redirect responses are duplicated on the final redirected response -* Added a check to re-extract the temp cacert bundle from the phar before sending each request - -## 3.4.2 - 2013-04-29 - -* Bug fix: Stream objects now work correctly with "a" and "a+" modes -* Bug fix: Removing `Transfer-Encoding: chunked` header when a Content-Length is present -* Bug fix: AsyncPlugin no longer forces HEAD requests -* Bug fix: DateTime timezones are now properly handled when using the service description schema formatter -* Bug fix: CachePlugin now properly handles stale-if-error directives when a request to the origin server fails -* Setting a response on a request will write to the custom request body from the response body if one is specified -* LogPlugin now writes to php://output when STDERR is undefined -* Added the ability to set multiple POST files for the same key in a single call -* application/x-www-form-urlencoded POSTs now use the utf-8 charset by default -* Added the ability to queue CurlExceptions to the MockPlugin -* Cleaned up how manual responses are queued on requests (removed "queued_response" and now using request.before_send) -* Configuration loading now allows remote files - -## 3.4.1 - 2013-04-16 - -* Large refactoring to how CurlMulti handles work. There is now a proxy that sits in front of a pool of CurlMulti - handles. This greatly simplifies the implementation, fixes a couple bugs, and provides a small performance boost. -* Exceptions are now properly grouped when sending requests in parallel -* Redirects are now properly aggregated when a multi transaction fails -* Redirects now set the response on the original object even in the event of a failure -* Bug fix: Model names are now properly set even when using $refs -* Added support for PHP 5.5's CurlFile to prevent warnings with the deprecated @ syntax -* Added support for oauth_callback in OAuth signatures -* Added support for oauth_verifier in OAuth signatures -* Added support to attempt to retrieve a command first literally, then ucfirst, the with inflection - -## 3.4.0 - 2013-04-11 - -* Bug fix: URLs are now resolved correctly based on http://tools.ietf.org/html/rfc3986#section-5.2. #289 -* Bug fix: Absolute URLs with a path in a service description will now properly override the base URL. #289 -* Bug fix: Parsing a query string with a single PHP array value will now result in an array. #263 -* Bug fix: Better normalization of the User-Agent header to prevent duplicate headers. #264. -* Bug fix: Added `number` type to service descriptions. -* Bug fix: empty parameters are removed from an OAuth signature -* Bug fix: Revalidating a cache entry prefers the Last-Modified over the Date header -* Bug fix: Fixed "array to string" error when validating a union of types in a service description -* Bug fix: Removed code that attempted to determine the size of a stream when data is written to the stream -* Bug fix: Not including an `oauth_token` if the value is null in the OauthPlugin. -* Bug fix: Now correctly aggregating successful requests and failed requests in CurlMulti when a redirect occurs. -* The new default CURLOPT_TIMEOUT setting has been increased to 150 seconds so that Guzzle works on poor connections. -* Added a feature to EntityEnclosingRequest::setBody() that will automatically set the Content-Type of the request if - the Content-Type can be determined based on the entity body or the path of the request. -* Added the ability to overwrite configuration settings in a client when grabbing a throwaway client from a builder. -* Added support for a PSR-3 LogAdapter. -* Added a `command.after_prepare` event -* Added `oauth_callback` parameter to the OauthPlugin -* Added the ability to create a custom stream class when using a stream factory -* Added a CachingEntityBody decorator -* Added support for `additionalParameters` in service descriptions to define how custom parameters are serialized. -* The bundled SSL certificate is now provided in the phar file and extracted when running Guzzle from a phar. -* You can now send any EntityEnclosingRequest with POST fields or POST files and cURL will handle creating bodies -* POST requests using a custom entity body are now treated exactly like PUT requests but with a custom cURL method. This - means that the redirect behavior of POST requests with custom bodies will not be the same as POST requests that use - POST fields or files (the latter is only used when emulating a form POST in the browser). -* Lots of cleanup to CurlHandle::factory and RequestFactory::createRequest - -## 3.3.1 - 2013-03-10 - -* Added the ability to create PHP streaming responses from HTTP requests -* Bug fix: Running any filters when parsing response headers with service descriptions -* Bug fix: OauthPlugin fixes to allow for multi-dimensional array signing, and sorting parameters before signing -* Bug fix: Removed the adding of default empty arrays and false Booleans to responses in order to be consistent across - response location visitors. -* Bug fix: Removed the possibility of creating configuration files with circular dependencies -* RequestFactory::create() now uses the key of a POST file when setting the POST file name -* Added xmlAllowEmpty to serialize an XML body even if no XML specific parameters are set - -## 3.3.0 - 2013-03-03 - -* A large number of performance optimizations have been made -* Bug fix: Added 'wb' as a valid write mode for streams -* Bug fix: `Guzzle\Http\Message\Response::json()` now allows scalar values to be returned -* Bug fix: Fixed bug in `Guzzle\Http\Message\Response` where wrapping quotes were stripped from `getEtag()` -* BC: Removed `Guzzle\Http\Utils` class -* BC: Setting a service description on a client will no longer modify the client's command factories. -* BC: Emitting IO events from a RequestMediator is now a parameter that must be set in a request's curl options using - the 'emit_io' key. This was previously set under a request's parameters using 'curl.emit_io' -* BC: `Guzzle\Stream\Stream::getWrapper()` and `Guzzle\Stream\Stream::getSteamType()` are no longer converted to - lowercase -* Operation parameter objects are now lazy loaded internally -* Added ErrorResponsePlugin that can throw errors for responses defined in service description operations' errorResponses -* Added support for instantiating responseType=class responseClass classes. Classes must implement - `Guzzle\Service\Command\ResponseClassInterface` -* Added support for additionalProperties for top-level parameters in responseType=model responseClasses. These - additional properties also support locations and can be used to parse JSON responses where the outermost part of the - JSON is an array -* Added support for nested renaming of JSON models (rename sentAs to name) -* CachePlugin - * Added support for stale-if-error so that the CachePlugin can now serve stale content from the cache on error - * Debug headers can now added to cached response in the CachePlugin - -## 3.2.0 - 2013-02-14 - -* CurlMulti is no longer reused globally. A new multi object is created per-client. This helps to isolate clients. -* URLs with no path no longer contain a "/" by default -* Guzzle\Http\QueryString does no longer manages the leading "?". This is now handled in Guzzle\Http\Url. -* BadResponseException no longer includes the full request and response message -* Adding setData() to Guzzle\Service\Description\ServiceDescriptionInterface -* Adding getResponseBody() to Guzzle\Http\Message\RequestInterface -* Various updates to classes to use ServiceDescriptionInterface type hints rather than ServiceDescription -* Header values can now be normalized into distinct values when multiple headers are combined with a comma separated list -* xmlEncoding can now be customized for the XML declaration of a XML service description operation -* Guzzle\Http\QueryString now uses Guzzle\Http\QueryAggregator\QueryAggregatorInterface objects to add custom value - aggregation and no longer uses callbacks -* The URL encoding implementation of Guzzle\Http\QueryString can now be customized -* Bug fix: Filters were not always invoked for array service description parameters -* Bug fix: Redirects now use a target response body rather than a temporary response body -* Bug fix: The default exponential backoff BackoffPlugin was not giving when the request threshold was exceeded -* Bug fix: Guzzle now takes the first found value when grabbing Cache-Control directives - -## 3.1.2 - 2013-01-27 - -* Refactored how operation responses are parsed. Visitors now include a before() method responsible for parsing the - response body. For example, the XmlVisitor now parses the XML response into an array in the before() method. -* Fixed an issue where cURL would not automatically decompress responses when the Accept-Encoding header was sent -* CURLOPT_SSL_VERIFYHOST is never set to 1 because it is deprecated (see 5e0ff2ef20f839e19d1eeb298f90ba3598784444) -* Fixed a bug where redirect responses were not chained correctly using getPreviousResponse() -* Setting default headers on a client after setting the user-agent will not erase the user-agent setting - -## 3.1.1 - 2013-01-20 - -* Adding wildcard support to Guzzle\Common\Collection::getPath() -* Adding alias support to ServiceBuilder configs -* Adding Guzzle\Service\Resource\CompositeResourceIteratorFactory and cleaning up factory interface - -## 3.1.0 - 2013-01-12 - -* BC: CurlException now extends from RequestException rather than BadResponseException -* BC: Renamed Guzzle\Plugin\Cache\CanCacheStrategyInterface::canCache() to canCacheRequest() and added CanCacheResponse() -* Added getData to ServiceDescriptionInterface -* Added context array to RequestInterface::setState() -* Bug: Removing hard dependency on the BackoffPlugin from Guzzle\Http -* Bug: Adding required content-type when JSON request visitor adds JSON to a command -* Bug: Fixing the serialization of a service description with custom data -* Made it easier to deal with exceptions thrown when transferring commands or requests in parallel by providing - an array of successful and failed responses -* Moved getPath from Guzzle\Service\Resource\Model to Guzzle\Common\Collection -* Added Guzzle\Http\IoEmittingEntityBody -* Moved command filtration from validators to location visitors -* Added `extends` attributes to service description parameters -* Added getModels to ServiceDescriptionInterface - -## 3.0.7 - 2012-12-19 - -* Fixing phar detection when forcing a cacert to system if null or true -* Allowing filename to be passed to `Guzzle\Http\Message\Request::setResponseBody()` -* Cleaning up `Guzzle\Common\Collection::inject` method -* Adding a response_body location to service descriptions - -## 3.0.6 - 2012-12-09 - -* CurlMulti performance improvements -* Adding setErrorResponses() to Operation -* composer.json tweaks - -## 3.0.5 - 2012-11-18 - -* Bug: Fixing an infinite recursion bug caused from revalidating with the CachePlugin -* Bug: Response body can now be a string containing "0" -* Bug: Using Guzzle inside of a phar uses system by default but now allows for a custom cacert -* Bug: QueryString::fromString now properly parses query string parameters that contain equal signs -* Added support for XML attributes in service description responses -* DefaultRequestSerializer now supports array URI parameter values for URI template expansion -* Added better mimetype guessing to requests and post files - -## 3.0.4 - 2012-11-11 - -* Bug: Fixed a bug when adding multiple cookies to a request to use the correct glue value -* Bug: Cookies can now be added that have a name, domain, or value set to "0" -* Bug: Using the system cacert bundle when using the Phar -* Added json and xml methods to Response to make it easier to parse JSON and XML response data into data structures -* Enhanced cookie jar de-duplication -* Added the ability to enable strict cookie jars that throw exceptions when invalid cookies are added -* Added setStream to StreamInterface to actually make it possible to implement custom rewind behavior for entity bodies -* Added the ability to create any sort of hash for a stream rather than just an MD5 hash - -## 3.0.3 - 2012-11-04 - -* Implementing redirects in PHP rather than cURL -* Added PECL URI template extension and using as default parser if available -* Bug: Fixed Content-Length parsing of Response factory -* Adding rewind() method to entity bodies and streams. Allows for custom rewinding of non-repeatable streams. -* Adding ToArrayInterface throughout library -* Fixing OauthPlugin to create unique nonce values per request - -## 3.0.2 - 2012-10-25 - -* Magic methods are enabled by default on clients -* Magic methods return the result of a command -* Service clients no longer require a base_url option in the factory -* Bug: Fixed an issue with URI templates where null template variables were being expanded - -## 3.0.1 - 2012-10-22 - -* Models can now be used like regular collection objects by calling filter, map, etc. -* Models no longer require a Parameter structure or initial data in the constructor -* Added a custom AppendIterator to get around a PHP bug with the `\AppendIterator` - -## 3.0.0 - 2012-10-15 - -* Rewrote service description format to be based on Swagger - * Now based on JSON schema - * Added nested input structures and nested response models - * Support for JSON and XML input and output models - * Renamed `commands` to `operations` - * Removed dot class notation - * Removed custom types -* Broke the project into smaller top-level namespaces to be more component friendly -* Removed support for XML configs and descriptions. Use arrays or JSON files. -* Removed the Validation component and Inspector -* Moved all cookie code to Guzzle\Plugin\Cookie -* Magic methods on a Guzzle\Service\Client now return the command un-executed. -* Calling getResult() or getResponse() on a command will lazily execute the command if needed. -* Now shipping with cURL's CA certs and using it by default -* Added previousResponse() method to response objects -* No longer sending Accept and Accept-Encoding headers on every request -* Only sending an Expect header by default when a payload is greater than 1MB -* Added/moved client options: - * curl.blacklist to curl.option.blacklist - * Added ssl.certificate_authority -* Added a Guzzle\Iterator component -* Moved plugins from Guzzle\Http\Plugin to Guzzle\Plugin -* Added a more robust backoff retry strategy (replaced the ExponentialBackoffPlugin) -* Added a more robust caching plugin -* Added setBody to response objects -* Updating LogPlugin to use a more flexible MessageFormatter -* Added a completely revamped build process -* Cleaning up Collection class and removing default values from the get method -* Fixed ZF2 cache adapters - -## 2.8.8 - 2012-10-15 - -* Bug: Fixed a cookie issue that caused dot prefixed domains to not match where popular browsers did - -## 2.8.7 - 2012-09-30 - -* Bug: Fixed config file aliases for JSON includes -* Bug: Fixed cookie bug on a request object by using CookieParser to parse cookies on requests -* Bug: Removing the path to a file when sending a Content-Disposition header on a POST upload -* Bug: Hardening request and response parsing to account for missing parts -* Bug: Fixed PEAR packaging -* Bug: Fixed Request::getInfo -* Bug: Fixed cases where CURLM_CALL_MULTI_PERFORM return codes were causing curl transactions to fail -* Adding the ability for the namespace Iterator factory to look in multiple directories -* Added more getters/setters/removers from service descriptions -* Added the ability to remove POST fields from OAuth signatures -* OAuth plugin now supports 2-legged OAuth - -## 2.8.6 - 2012-09-05 - -* Added the ability to modify and build service descriptions -* Added the use of visitors to apply parameters to locations in service descriptions using the dynamic command -* Added a `json` parameter location -* Now allowing dot notation for classes in the CacheAdapterFactory -* Using the union of two arrays rather than an array_merge when extending service builder services and service params -* Ensuring that a service is a string before doing strpos() checks on it when substituting services for references - in service builder config files. -* Services defined in two different config files that include one another will by default replace the previously - defined service, but you can now create services that extend themselves and merge their settings over the previous -* The JsonLoader now supports aliasing filenames with different filenames. This allows you to alias something like - '_default' with a default JSON configuration file. - -## 2.8.5 - 2012-08-29 - -* Bug: Suppressed empty arrays from URI templates -* Bug: Added the missing $options argument from ServiceDescription::factory to enable caching -* Added support for HTTP responses that do not contain a reason phrase in the start-line -* AbstractCommand commands are now invokable -* Added a way to get the data used when signing an Oauth request before a request is sent - -## 2.8.4 - 2012-08-15 - -* Bug: Custom delay time calculations are no longer ignored in the ExponentialBackoffPlugin -* Added the ability to transfer entity bodies as a string rather than streamed. This gets around curl error 65. Set `body_as_string` in a request's curl options to enable. -* Added a StreamInterface, EntityBodyInterface, and added ftell() to Guzzle\Common\Stream -* Added an AbstractEntityBodyDecorator and a ReadLimitEntityBody decorator to transfer only a subset of a decorated stream -* Stream and EntityBody objects will now return the file position to the previous position after a read required operation (e.g. getContentMd5()) -* Added additional response status codes -* Removed SSL information from the default User-Agent header -* DELETE requests can now send an entity body -* Added an EventDispatcher to the ExponentialBackoffPlugin and added an ExponentialBackoffLogger to log backoff retries -* Added the ability of the MockPlugin to consume mocked request bodies -* LogPlugin now exposes request and response objects in the extras array - -## 2.8.3 - 2012-07-30 - -* Bug: Fixed a case where empty POST requests were sent as GET requests -* Bug: Fixed a bug in ExponentialBackoffPlugin that caused fatal errors when retrying an EntityEnclosingRequest that does not have a body -* Bug: Setting the response body of a request to null after completing a request, not when setting the state of a request to new -* Added multiple inheritance to service description commands -* Added an ApiCommandInterface and added ``getParamNames()`` and ``hasParam()`` -* Removed the default 2mb size cutoff from the Md5ValidatorPlugin so that it now defaults to validating everything -* Changed CurlMulti::perform to pass a smaller timeout to CurlMulti::executeHandles - -## 2.8.2 - 2012-07-24 - -* Bug: Query string values set to 0 are no longer dropped from the query string -* Bug: A Collection object is no longer created each time a call is made to ``Guzzle\Service\Command\AbstractCommand::getRequestHeaders()`` -* Bug: ``+`` is now treated as an encoded space when parsing query strings -* QueryString and Collection performance improvements -* Allowing dot notation for class paths in filters attribute of a service descriptions - -## 2.8.1 - 2012-07-16 - -* Loosening Event Dispatcher dependency -* POST redirects can now be customized using CURLOPT_POSTREDIR - -## 2.8.0 - 2012-07-15 - -* BC: Guzzle\Http\Query - * Query strings with empty variables will always show an equal sign unless the variable is set to QueryString::BLANK (e.g. ?acl= vs ?acl) - * Changed isEncodingValues() and isEncodingFields() to isUrlEncoding() - * Changed setEncodeValues(bool) and setEncodeFields(bool) to useUrlEncoding(bool) - * Changed the aggregation functions of QueryString to be static methods - * Can now use fromString() with querystrings that have a leading ? -* cURL configuration values can be specified in service descriptions using ``curl.`` prefixed parameters -* Content-Length is set to 0 before emitting the request.before_send event when sending an empty request body -* Cookies are no longer URL decoded by default -* Bug: URI template variables set to null are no longer expanded - -## 2.7.2 - 2012-07-02 - -* BC: Moving things to get ready for subtree splits. Moving Inflection into Common. Moving Guzzle\Http\Parser to Guzzle\Parser. -* BC: Removing Guzzle\Common\Batch\Batch::count() and replacing it with isEmpty() -* CachePlugin now allows for a custom request parameter function to check if a request can be cached -* Bug fix: CachePlugin now only caches GET and HEAD requests by default -* Bug fix: Using header glue when transferring headers over the wire -* Allowing deeply nested arrays for composite variables in URI templates -* Batch divisors can now return iterators or arrays - -## 2.7.1 - 2012-06-26 - -* Minor patch to update version number in UA string -* Updating build process - -## 2.7.0 - 2012-06-25 - -* BC: Inflection classes moved to Guzzle\Inflection. No longer static methods. Can now inject custom inflectors into classes. -* BC: Removed magic setX methods from commands -* BC: Magic methods mapped to service description commands are now inflected in the command factory rather than the client __call() method -* Verbose cURL options are no longer enabled by default. Set curl.debug to true on a client to enable. -* Bug: Now allowing colons in a response start-line (e.g. HTTP/1.1 503 Service Unavailable: Back-end server is at capacity) -* Guzzle\Service\Resource\ResourceIteratorApplyBatched now internally uses the Guzzle\Common\Batch namespace -* Added Guzzle\Service\Plugin namespace and a PluginCollectionPlugin -* Added the ability to set POST fields and files in a service description -* Guzzle\Http\EntityBody::factory() now accepts objects with a __toString() method -* Adding a command.before_prepare event to clients -* Added BatchClosureTransfer and BatchClosureDivisor -* BatchTransferException now includes references to the batch divisor and transfer strategies -* Fixed some tests so that they pass more reliably -* Added Guzzle\Common\Log\ArrayLogAdapter - -## 2.6.6 - 2012-06-10 - -* BC: Removing Guzzle\Http\Plugin\BatchQueuePlugin -* BC: Removing Guzzle\Service\Command\CommandSet -* Adding generic batching system (replaces the batch queue plugin and command set) -* Updating ZF cache and log adapters and now using ZF's composer repository -* Bug: Setting the name of each ApiParam when creating through an ApiCommand -* Adding result_type, result_doc, deprecated, and doc_url to service descriptions -* Bug: Changed the default cookie header casing back to 'Cookie' - -## 2.6.5 - 2012-06-03 - -* BC: Renaming Guzzle\Http\Message\RequestInterface::getResourceUri() to getResource() -* BC: Removing unused AUTH_BASIC and AUTH_DIGEST constants from -* BC: Guzzle\Http\Cookie is now used to manage Set-Cookie data, not Cookie data -* BC: Renaming methods in the CookieJarInterface -* Moving almost all cookie logic out of the CookiePlugin and into the Cookie or CookieJar implementations -* Making the default glue for HTTP headers ';' instead of ',' -* Adding a removeValue to Guzzle\Http\Message\Header -* Adding getCookies() to request interface. -* Making it easier to add event subscribers to HasDispatcherInterface classes. Can now directly call addSubscriber() - -## 2.6.4 - 2012-05-30 - -* BC: Cleaning up how POST files are stored in EntityEnclosingRequest objects. Adding PostFile class. -* BC: Moving ApiCommand specific functionality from the Inspector and on to the ApiCommand -* Bug: Fixing magic method command calls on clients -* Bug: Email constraint only validates strings -* Bug: Aggregate POST fields when POST files are present in curl handle -* Bug: Fixing default User-Agent header -* Bug: Only appending or prepending parameters in commands if they are specified -* Bug: Not requiring response reason phrases or status codes to match a predefined list of codes -* Allowing the use of dot notation for class namespaces when using instance_of constraint -* Added any_match validation constraint -* Added an AsyncPlugin -* Passing request object to the calculateWait method of the ExponentialBackoffPlugin -* Allowing the result of a command object to be changed -* Parsing location and type sub values when instantiating a service description rather than over and over at runtime - -## 2.6.3 - 2012-05-23 - -* [BC] Guzzle\Common\FromConfigInterface no longer requires any config options. -* [BC] Refactoring how POST files are stored on an EntityEnclosingRequest. They are now separate from POST fields. -* You can now use an array of data when creating PUT request bodies in the request factory. -* Removing the requirement that HTTPS requests needed a Cache-Control: public directive to be cacheable. -* [Http] Adding support for Content-Type in multipart POST uploads per upload -* [Http] Added support for uploading multiple files using the same name (foo[0], foo[1]) -* Adding more POST data operations for easier manipulation of POST data. -* You can now set empty POST fields. -* The body of a request is only shown on EntityEnclosingRequest objects that do not use POST files. -* Split the Guzzle\Service\Inspector::validateConfig method into two methods. One to initialize when a command is created, and one to validate. -* CS updates - -## 2.6.2 - 2012-05-19 - -* [Http] Better handling of nested scope requests in CurlMulti. Requests are now always prepares in the send() method rather than the addRequest() method. - -## 2.6.1 - 2012-05-19 - -* [BC] Removing 'path' support in service descriptions. Use 'uri'. -* [BC] Guzzle\Service\Inspector::parseDocBlock is now protected. Adding getApiParamsForClass() with cache. -* [BC] Removing Guzzle\Common\NullObject. Use https://github.com/mtdowling/NullObject if you need it. -* [BC] Removing Guzzle\Common\XmlElement. -* All commands, both dynamic and concrete, have ApiCommand objects. -* Adding a fix for CurlMulti so that if all of the connections encounter some sort of curl error, then the loop exits. -* Adding checks to EntityEnclosingRequest so that empty POST files and fields are ignored. -* Making the method signature of Guzzle\Service\Builder\ServiceBuilder::factory more flexible. - -## 2.6.0 - 2012-05-15 - -* [BC] Moving Guzzle\Service\Builder to Guzzle\Service\Builder\ServiceBuilder -* [BC] Executing a Command returns the result of the command rather than the command -* [BC] Moving all HTTP parsing logic to Guzzle\Http\Parsers. Allows for faster C implementations if needed. -* [BC] Changing the Guzzle\Http\Message\Response::setProtocol() method to accept a protocol and version in separate args. -* [BC] Moving ResourceIterator* to Guzzle\Service\Resource -* [BC] Completely refactored ResourceIterators to iterate over a cloned command object -* [BC] Moved Guzzle\Http\UriTemplate to Guzzle\Http\Parser\UriTemplate\UriTemplate -* [BC] Guzzle\Guzzle is now deprecated -* Moving Guzzle\Common\Guzzle::inject to Guzzle\Common\Collection::inject -* Adding Guzzle\Version class to give version information about Guzzle -* Adding Guzzle\Http\Utils class to provide getDefaultUserAgent() and getHttpDate() -* Adding Guzzle\Curl\CurlVersion to manage caching curl_version() data -* ServiceDescription and ServiceBuilder are now cacheable using similar configs -* Changing the format of XML and JSON service builder configs. Backwards compatible. -* Cleaned up Cookie parsing -* Trimming the default Guzzle User-Agent header -* Adding a setOnComplete() method to Commands that is called when a command completes -* Keeping track of requests that were mocked in the MockPlugin -* Fixed a caching bug in the CacheAdapterFactory -* Inspector objects can be injected into a Command object -* Refactoring a lot of code and tests to be case insensitive when dealing with headers -* Adding Guzzle\Http\Message\HeaderComparison for easy comparison of HTTP headers using a DSL -* Adding the ability to set global option overrides to service builder configs -* Adding the ability to include other service builder config files from within XML and JSON files -* Moving the parseQuery method out of Url and on to QueryString::fromString() as a static factory method. - -## 2.5.0 - 2012-05-08 - -* Major performance improvements -* [BC] Simplifying Guzzle\Common\Collection. Please check to see if you are using features that are now deprecated. -* [BC] Using a custom validation system that allows a flyweight implementation for much faster validation. No longer using Symfony2 Validation component. -* [BC] No longer supporting "{{ }}" for injecting into command or UriTemplates. Use "{}" -* Added the ability to passed parameters to all requests created by a client -* Added callback functionality to the ExponentialBackoffPlugin -* Using microtime in ExponentialBackoffPlugin to allow more granular backoff strategies. -* Rewinding request stream bodies when retrying requests -* Exception is thrown when JSON response body cannot be decoded -* Added configurable magic method calls to clients and commands. This is off by default. -* Fixed a defect that added a hash to every parsed URL part -* Fixed duplicate none generation for OauthPlugin. -* Emitting an event each time a client is generated by a ServiceBuilder -* Using an ApiParams object instead of a Collection for parameters of an ApiCommand -* cache.* request parameters should be renamed to params.cache.* -* Added the ability to set arbitrary curl options on requests (disable_wire, progress, etc.). See CurlHandle. -* Added the ability to disable type validation of service descriptions -* ServiceDescriptions and ServiceBuilders are now Serializable diff --git a/core/vendor/guzzlehttp/guzzle/LICENSE b/core/vendor/guzzlehttp/guzzle/LICENSE deleted file mode 100644 index 71d3b78..0000000 --- a/core/vendor/guzzlehttp/guzzle/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2014 Michael Dowling, https://github.com/mtdowling - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/core/vendor/guzzlehttp/guzzle/Makefile b/core/vendor/guzzlehttp/guzzle/Makefile deleted file mode 100644 index 69bf327..0000000 --- a/core/vendor/guzzlehttp/guzzle/Makefile +++ /dev/null @@ -1,50 +0,0 @@ -all: clean coverage docs - -start-server: - cd vendor/guzzlehttp/ringphp && make start-server - -stop-server: - cd vendor/guzzlehttp/ringphp && make stop-server - -test: start-server - vendor/bin/phpunit - $(MAKE) stop-server - -coverage: start-server - vendor/bin/phpunit --coverage-html=artifacts/coverage - $(MAKE) stop-server - -view-coverage: - open artifacts/coverage/index.html - -clean: - rm -rf artifacts/* - -docs: - cd docs && make html && cd .. - -view-docs: - open docs/_build/html/index.html - -tag: - $(if $(TAG),,$(error TAG is not defined. Pass via "make tag TAG=4.2.1")) - @echo Tagging $(TAG) - chag update $(TAG) - sed -i '' -e "s/VERSION = '.*'/VERSION = '$(TAG)'/" src/ClientInterface.php - php -l src/ClientInterface.php - git add -A - git commit -m '$(TAG) release' - chag tag - -perf: start-server - php tests/perf.php - $(MAKE) stop-server - -package: burgomaster - php build/packager.php - -burgomaster: - mkdir -p build/artifacts - curl -s https://raw.githubusercontent.com/mtdowling/Burgomaster/0.0.2/src/Burgomaster.php > build/artifacts/Burgomaster.php - -.PHONY: docs burgomaster diff --git a/core/vendor/guzzlehttp/guzzle/README.md b/core/vendor/guzzlehttp/guzzle/README.md deleted file mode 100644 index 9df6981..0000000 --- a/core/vendor/guzzlehttp/guzzle/README.md +++ /dev/null @@ -1,70 +0,0 @@ -Guzzle, PHP HTTP client and webservice framework -================================================ - -[![Build Status](https://secure.travis-ci.org/guzzle/guzzle.png?branch=master)](http://travis-ci.org/guzzle/guzzle) - -Guzzle is a PHP HTTP client that makes it easy to send HTTP requests and -trivial to integrate with web services. - -- Manages things like persistent connections, represents query strings as - collections, simplifies sending streaming POST requests with fields and - files, and abstracts away the underlying HTTP transport layer. -- Can send both synchronous and asynchronous requests using the same interface - without requiring a dependency on a specific event loop. -- Pluggable HTTP adapters allows Guzzle to integrate with any method you choose - for sending HTTP requests over the wire (e.g., cURL, sockets, PHP's stream - wrapper, non-blocking event loops like ReactPHP. -- Guzzle makes it so that you no longer need to fool around with cURL options, - stream contexts, or sockets. - -```php -$client = new GuzzleHttp\Client(); -$response = $client->get('http://guzzlephp.org'); -$res = $client->get('https://api.github.com/user', ['auth' => ['user', 'pass']]); -echo $res->getStatusCode(); -// "200" -echo $res->getHeader('content-type'); -// 'application/json; charset=utf8' -echo $res->getBody(); -// {"type":"User"...' -var_export($res->json()); -// Outputs the JSON decoded data - -// Send an asynchronous request. -$req = $client->createRequest('GET', 'http://httpbin.org', ['future' => true]); -$client->send($req)->then(function ($response) { - echo 'I completed! ' . $response; -}); -``` - -Get more information and answers with the -[Documentation](http://guzzlephp.org/), -[Forums](https://groups.google.com/forum/?hl=en#!forum/guzzle), -and [Gitter](https://gitter.im/guzzle/guzzle). - -### Installing via Composer - -The recommended way to install Guzzle is through -[Composer](http://getcomposer.org). - -```bash -# Install Composer -curl -sS https://getcomposer.org/installer | php -``` - -Next, run the Composer command to install the latest stable version of Guzzle: - -```bash -composer require guzzlehttp/guzzle -``` - -After installing, you need to require Composer's autoloader: - -```php -require 'vendor/autoload.php'; -``` - -### Documentation - -More information can be found in the online documentation at -http://guzzlephp.org/. diff --git a/core/vendor/guzzlehttp/guzzle/UPGRADING.md b/core/vendor/guzzlehttp/guzzle/UPGRADING.md deleted file mode 100644 index d0f55bc..0000000 --- a/core/vendor/guzzlehttp/guzzle/UPGRADING.md +++ /dev/null @@ -1,1050 +0,0 @@ -Guzzle Upgrade Guide -==================== - -4.x to 5.0 ----------- - -## Rewritten Adapter Layer - -Guzzle now uses `RingPHP `_ to send -HTTP requests. The `adapter` option in a `GuzzleHttp\Client` constructor -is still supported, but it has now been renamed to `handler`. Instead of -passing a `GuzzleHttp\Adapter\AdapterInterface`, you must now pass a PHP -`callable` that follows the RingPHP specification. - -## Removed Fluent Interfaces - -`Fluent interfaces were removed `_ -from the following classes: - -- `GuzzleHttp\Collection` -- `GuzzleHttp\Url` -- `GuzzleHttp\Query` -- `GuzzleHttp\Post\PostBody` -- `GuzzleHttp\Cookie\SetCookie` - -## Removed functions.php - -Removed "functions.php", so that Guzzle is truly PSR-4 compliant. The following -functions can be used as replacements. - -- `GuzzleHttp\json_decode` -> `GuzzleHttp\Utils::jsonDecode` -- `GuzzleHttp\get_path` -> `GuzzleHttp\Utils::getPath` -- `GuzzleHttp\Utils::setPath` -> `GuzzleHttp\set_path` -- `GuzzleHttp\Pool::batch` -> `GuzzleHttp\batch`. This function is, however, - deprecated in favor of using `GuzzleHttp\Pool::batch()`. - -The "procedural" global client has been removed with no replacement (e.g., -`GuzzleHttp\get()`, `GuzzleHttp\post()`, etc.). Use a `GuzzleHttl\Client` -object as a replacement. - -## `throwImmediately` has been removed - -The concept of "throwImmediately" has been removed from exceptions and error -events. This control mechanism was used to stop a transfer of concurrent -requests from completing. This can now be handled by throwing the exception or -by cancelling a pool of requests or each outstanding future request -individually. - -## headers event has been removed - -Removed the "headers" event. This event was only useful for changing the -body a response once the headers of the response were known. You can implement -a similar behavior in a number of ways. One example might be to use a -FnStream that has access to the transaction being sent. For example, when the -first byte is written, you could check if the response headers match your -expectations, and if so, change the actual stream body that is being -written to. - -## Updates to HTTP Messages - -Removed the `asArray` parameter from -`GuzzleHttp\Message\MessageInterface::getHeader`. If you want to get a header -value as an array, then use the newly added `getHeaderAsArray()` method of -`MessageInterface`. This change makes the Guzzle interfaces compatible with -the PSR-7 interfaces. - -3.x to 4.0 ----------- - -## Overarching changes: - -- Now requires PHP 5.4 or greater. -- No longer requires cURL to send requests. -- Guzzle no longer wraps every exception it throws. Only exceptions that are - recoverable are now wrapped by Guzzle. -- Various namespaces have been removed or renamed. -- No longer requiring the Symfony EventDispatcher. A custom event dispatcher - based on the Symfony EventDispatcher is - now utilized in `GuzzleHttp\Event\EmitterInterface` (resulting in significant - speed and functionality improvements). - -Changes per Guzzle 3.x namespace are described below. - -## Batch - -The `Guzzle\Batch` namespace has been removed. This is best left to -third-parties to implement on top of Guzzle's core HTTP library. - -## Cache - -The `Guzzle\Cache` namespace has been removed. (Todo: No suitable replacement -has been implemented yet, but hoping to utilize a PSR cache interface). - -## Common - -- Removed all of the wrapped exceptions. It's better to use the standard PHP - library for unrecoverable exceptions. -- `FromConfigInterface` has been removed. -- `Guzzle\Common\Version` has been removed. The VERSION constant can be found - at `GuzzleHttp\ClientInterface::VERSION`. - -### Collection - -- `getAll` has been removed. Use `toArray` to convert a collection to an array. -- `inject` has been removed. -- `keySearch` has been removed. -- `getPath` no longer supports wildcard expressions. Use something better like - JMESPath for this. -- `setPath` now supports appending to an existing array via the `[]` notation. - -### Events - -Guzzle no longer requires Symfony's EventDispatcher component. Guzzle now uses -`GuzzleHttp\Event\Emitter`. - -- `Symfony\Component\EventDispatcher\EventDispatcherInterface` is replaced by - `GuzzleHttp\Event\EmitterInterface`. -- `Symfony\Component\EventDispatcher\EventDispatcher` is replaced by - `GuzzleHttp\Event\Emitter`. -- `Symfony\Component\EventDispatcher\Event` is replaced by - `GuzzleHttp\Event\Event`, and Guzzle now has an EventInterface in - `GuzzleHttp\Event\EventInterface`. -- `AbstractHasDispatcher` has moved to a trait, `HasEmitterTrait`, and - `HasDispatcherInterface` has moved to `HasEmitterInterface`. Retrieving the - event emitter of a request, client, etc. now uses the `getEmitter` method - rather than the `getDispatcher` method. - -#### Emitter - -- Use the `once()` method to add a listener that automatically removes itself - the first time it is invoked. -- Use the `listeners()` method to retrieve a list of event listeners rather than - the `getListeners()` method. -- Use `emit()` instead of `dispatch()` to emit an event from an emitter. -- Use `attach()` instead of `addSubscriber()` and `detach()` instead of - `removeSubscriber()`. - -```php -$mock = new Mock(); -// 3.x -$request->getEventDispatcher()->addSubscriber($mock); -$request->getEventDispatcher()->removeSubscriber($mock); -// 4.x -$request->getEmitter()->attach($mock); -$request->getEmitter()->detach($mock); -``` - -Use the `on()` method to add a listener rather than the `addListener()` method. - -```php -// 3.x -$request->getEventDispatcher()->addListener('foo', function (Event $event) { /* ... */ } ); -// 4.x -$request->getEmitter()->on('foo', function (Event $event, $name) { /* ... */ } ); -``` - -## Http - -### General changes - -- The cacert.pem certificate has been moved to `src/cacert.pem`. -- Added the concept of adapters that are used to transfer requests over the - wire. -- Simplified the event system. -- Sending requests in parallel is still possible, but batching is no longer a - concept of the HTTP layer. Instead, you must use the `complete` and `error` - events to asynchronously manage parallel request transfers. -- `Guzzle\Http\Url` has moved to `GuzzleHttp\Url`. -- `Guzzle\Http\QueryString` has moved to `GuzzleHttp\Query`. -- QueryAggregators have been rewritten so that they are simply callable - functions. -- `GuzzleHttp\StaticClient` has been removed. Use the functions provided in - `functions.php` for an easy to use static client instance. -- Exceptions in `GuzzleHttp\Exception` have been updated to all extend from - `GuzzleHttp\Exception\TransferException`. - -### Client - -Calling methods like `get()`, `post()`, `head()`, etc. no longer create and -return a request, but rather creates a request, sends the request, and returns -the response. - -```php -// 3.0 -$request = $client->get('/'); -$response = $request->send(); - -// 4.0 -$response = $client->get('/'); - -// or, to mirror the previous behavior -$request = $client->createRequest('GET', '/'); -$response = $client->send($request); -``` - -`GuzzleHttp\ClientInterface` has changed. - -- The `send` method no longer accepts more than one request. Use `sendAll` to - send multiple requests in parallel. -- `setUserAgent()` has been removed. Use a default request option instead. You - could, for example, do something like: - `$client->setConfig('defaults/headers/User-Agent', 'Foo/Bar ' . $client::getDefaultUserAgent())`. -- `setSslVerification()` has been removed. Use default request options instead, - like `$client->setConfig('defaults/verify', true)`. - -`GuzzleHttp\Client` has changed. - -- The constructor now accepts only an associative array. You can include a - `base_url` string or array to use a URI template as the base URL of a client. - You can also specify a `defaults` key that is an associative array of default - request options. You can pass an `adapter` to use a custom adapter, - `batch_adapter` to use a custom adapter for sending requests in parallel, or - a `message_factory` to change the factory used to create HTTP requests and - responses. -- The client no longer emits a `client.create_request` event. -- Creating requests with a client no longer automatically utilize a URI - template. You must pass an array into a creational method (e.g., - `createRequest`, `get`, `put`, etc.) in order to expand a URI template. - -### Messages - -Messages no longer have references to their counterparts (i.e., a request no -longer has a reference to it's response, and a response no loger has a -reference to its request). This association is now managed through a -`GuzzleHttp\Adapter\TransactionInterface` object. You can get references to -these transaction objects using request events that are emitted over the -lifecycle of a request. - -#### Requests with a body - -- `GuzzleHttp\Message\EntityEnclosingRequest` and - `GuzzleHttp\Message\EntityEnclosingRequestInterface` have been removed. The - separation between requests that contain a body and requests that do not - contain a body has been removed, and now `GuzzleHttp\Message\RequestInterface` - handles both use cases. -- Any method that previously accepts a `GuzzleHttp\Response` object now accept a - `GuzzleHttp\Message\ResponseInterface`. -- `GuzzleHttp\Message\RequestFactoryInterface` has been renamed to - `GuzzleHttp\Message\MessageFactoryInterface`. This interface is used to create - both requests and responses and is implemented in - `GuzzleHttp\Message\MessageFactory`. -- POST field and file methods have been removed from the request object. You - must now use the methods made available to `GuzzleHttp\Post\PostBodyInterface` - to control the format of a POST body. Requests that are created using a - standard `GuzzleHttp\Message\MessageFactoryInterface` will automatically use - a `GuzzleHttp\Post\PostBody` body if the body was passed as an array or if - the method is POST and no body is provided. - -```php -$request = $client->createRequest('POST', '/'); -$request->getBody()->setField('foo', 'bar'); -$request->getBody()->addFile(new PostFile('file_key', fopen('/path/to/content', 'r'))); -``` - -#### Headers - -- `GuzzleHttp\Message\Header` has been removed. Header values are now simply - represented by an array of values or as a string. Header values are returned - as a string by default when retrieving a header value from a message. You can - pass an optional argument of `true` to retrieve a header value as an array - of strings instead of a single concatenated string. -- `GuzzleHttp\PostFile` and `GuzzleHttp\PostFileInterface` have been moved to - `GuzzleHttp\Post`. This interface has been simplified and now allows the - addition of arbitrary headers. -- Custom headers like `GuzzleHttp\Message\Header\Link` have been removed. Most - of the custom headers are now handled separately in specific - subscribers/plugins, and `GuzzleHttp\Message\HeaderValues::parseParams()` has - been updated to properly handle headers that contain parameters (like the - `Link` header). - -#### Responses - -- `GuzzleHttp\Message\Response::getInfo()` and - `GuzzleHttp\Message\Response::setInfo()` have been removed. Use the event - system to retrieve this type of information. -- `GuzzleHttp\Message\Response::getRawHeaders()` has been removed. -- `GuzzleHttp\Message\Response::getMessage()` has been removed. -- `GuzzleHttp\Message\Response::calculateAge()` and other cache specific - methods have moved to the CacheSubscriber. -- Header specific helper functions like `getContentMd5()` have been removed. - Just use `getHeader('Content-MD5')` instead. -- `GuzzleHttp\Message\Response::setRequest()` and - `GuzzleHttp\Message\Response::getRequest()` have been removed. Use the event - system to work with request and response objects as a transaction. -- `GuzzleHttp\Message\Response::getRedirectCount()` has been removed. Use the - Redirect subscriber instead. -- `GuzzleHttp\Message\Response::isSuccessful()` and other related methods have - been removed. Use `getStatusCode()` instead. - -#### Streaming responses - -Streaming requests can now be created by a client directly, returning a -`GuzzleHttp\Message\ResponseInterface` object that contains a body stream -referencing an open PHP HTTP stream. - -```php -// 3.0 -use Guzzle\Stream\PhpStreamRequestFactory; -$request = $client->get('/'); -$factory = new PhpStreamRequestFactory(); -$stream = $factory->fromRequest($request); -$data = $stream->read(1024); - -// 4.0 -$response = $client->get('/', ['stream' => true]); -// Read some data off of the stream in the response body -$data = $response->getBody()->read(1024); -``` - -#### Redirects - -The `configureRedirects()` method has been removed in favor of a -`allow_redirects` request option. - -```php -// Standard redirects with a default of a max of 5 redirects -$request = $client->createRequest('GET', '/', ['allow_redirects' => true]); - -// Strict redirects with a custom number of redirects -$request = $client->createRequest('GET', '/', [ - 'allow_redirects' => ['max' => 5, 'strict' => true] -]); -``` - -#### EntityBody - -EntityBody interfaces and classes have been removed or moved to -`GuzzleHttp\Stream`. All classes and interfaces that once required -`GuzzleHttp\EntityBodyInterface` now require -`GuzzleHttp\Stream\StreamInterface`. Creating a new body for a request no -longer uses `GuzzleHttp\EntityBody::factory` but now uses -`GuzzleHttp\Stream\Stream::factory` or even better: -`GuzzleHttp\Stream\create()`. - -- `Guzzle\Http\EntityBodyInterface` is now `GuzzleHttp\Stream\StreamInterface` -- `Guzzle\Http\EntityBody` is now `GuzzleHttp\Stream\Stream` -- `Guzzle\Http\CachingEntityBody` is now `GuzzleHttp\Stream\CachingStream` -- `Guzzle\Http\ReadLimitEntityBody` is now `GuzzleHttp\Stream\LimitStream` -- `Guzzle\Http\IoEmittyinEntityBody` has been removed. - -#### Request lifecycle events - -Requests previously submitted a large number of requests. The number of events -emitted over the lifecycle of a request has been significantly reduced to make -it easier to understand how to extend the behavior of a request. All events -emitted during the lifecycle of a request now emit a custom -`GuzzleHttp\Event\EventInterface` object that contains context providing -methods and a way in which to modify the transaction at that specific point in -time (e.g., intercept the request and set a response on the transaction). - -- `request.before_send` has been renamed to `before` and now emits a - `GuzzleHttp\Event\BeforeEvent` -- `request.complete` has been renamed to `complete` and now emits a - `GuzzleHttp\Event\CompleteEvent`. -- `request.sent` has been removed. Use `complete`. -- `request.success` has been removed. Use `complete`. -- `error` is now an event that emits a `GuzzleHttp\Event\ErrorEvent`. -- `request.exception` has been removed. Use `error`. -- `request.receive.status_line` has been removed. -- `curl.callback.progress` has been removed. Use a custom `StreamInterface` to - maintain a status update. -- `curl.callback.write` has been removed. Use a custom `StreamInterface` to - intercept writes. -- `curl.callback.read` has been removed. Use a custom `StreamInterface` to - intercept reads. - -`headers` is a new event that is emitted after the response headers of a -request have been received before the body of the response is downloaded. This -event emits a `GuzzleHttp\Event\HeadersEvent`. - -You can intercept a request and inject a response using the `intercept()` event -of a `GuzzleHttp\Event\BeforeEvent`, `GuzzleHttp\Event\CompleteEvent`, and -`GuzzleHttp\Event\ErrorEvent` event. - -See: http://docs.guzzlephp.org/en/latest/events.html - -## Inflection - -The `Guzzle\Inflection` namespace has been removed. This is not a core concern -of Guzzle. - -## Iterator - -The `Guzzle\Iterator` namespace has been removed. - -- `Guzzle\Iterator\AppendIterator`, `Guzzle\Iterator\ChunkedIterator`, and - `Guzzle\Iterator\MethodProxyIterator` are nice, but not a core requirement of - Guzzle itself. -- `Guzzle\Iterator\FilterIterator` is no longer needed because an equivalent - class is shipped with PHP 5.4. -- `Guzzle\Iterator\MapIterator` is not really needed when using PHP 5.5 because - it's easier to just wrap an iterator in a generator that maps values. - -For a replacement of these iterators, see https://github.com/nikic/iter - -## Log - -The LogPlugin has moved to https://github.com/guzzle/log-subscriber. The -`Guzzle\Log` namespace has been removed. Guzzle now relies on -`Psr\Log\LoggerInterface` for all logging. The MessageFormatter class has been -moved to `GuzzleHttp\Subscriber\Log\Formatter`. - -## Parser - -The `Guzzle\Parser` namespace has been removed. This was previously used to -make it possible to plug in custom parsers for cookies, messages, URI -templates, and URLs; however, this level of complexity is not needed in Guzzle -so it has been removed. - -- Cookie: Cookie parsing logic has been moved to - `GuzzleHttp\Cookie\SetCookie::fromString`. -- Message: Message parsing logic for both requests and responses has been moved - to `GuzzleHttp\Message\MessageFactory::fromMessage`. Message parsing is only - used in debugging or deserializing messages, so it doesn't make sense for - Guzzle as a library to add this level of complexity to parsing messages. -- UriTemplate: URI template parsing has been moved to - `GuzzleHttp\UriTemplate`. The Guzzle library will automatically use the PECL - URI template library if it is installed. -- Url: URL parsing is now performed in `GuzzleHttp\Url::fromString` (previously - it was `Guzzle\Http\Url::factory()`). If custom URL parsing is necessary, - then developers are free to subclass `GuzzleHttp\Url`. - -## Plugin - -The `Guzzle\Plugin` namespace has been renamed to `GuzzleHttp\Subscriber`. -Several plugins are shipping with the core Guzzle library under this namespace. - -- `GuzzleHttp\Subscriber\Cookie`: Replaces the old CookiePlugin. Cookie jar - code has moved to `GuzzleHttp\Cookie`. -- `GuzzleHttp\Subscriber\History`: Replaces the old HistoryPlugin. -- `GuzzleHttp\Subscriber\HttpError`: Throws errors when a bad HTTP response is - received. -- `GuzzleHttp\Subscriber\Mock`: Replaces the old MockPlugin. -- `GuzzleHttp\Subscriber\Prepare`: Prepares the body of a request just before - sending. This subscriber is attached to all requests by default. -- `GuzzleHttp\Subscriber\Redirect`: Replaces the RedirectPlugin. - -The following plugins have been removed (third-parties are free to re-implement -these if needed): - -- `GuzzleHttp\Plugin\Async` has been removed. -- `GuzzleHttp\Plugin\CurlAuth` has been removed. -- `GuzzleHttp\Plugin\ErrorResponse\ErrorResponsePlugin` has been removed. This - functionality should instead be implemented with event listeners that occur - after normal response parsing occurs in the guzzle/command package. - -The following plugins are not part of the core Guzzle package, but are provided -in separate repositories: - -- `Guzzle\Http\Plugin\BackoffPlugin` has been rewritten to be muchs simpler - to build custom retry policies using simple functions rather than various - chained classes. See: https://github.com/guzzle/retry-subscriber -- `Guzzle\Http\Plugin\Cache\CachePlugin` has moved to - https://github.com/guzzle/cache-subscriber -- `Guzzle\Http\Plugin\Log\LogPlugin` has moved to - https://github.com/guzzle/log-subscriber -- `Guzzle\Http\Plugin\Md5\Md5Plugin` has moved to - https://github.com/guzzle/message-integrity-subscriber -- `Guzzle\Http\Plugin\Mock\MockPlugin` has moved to - `GuzzleHttp\Subscriber\MockSubscriber`. -- `Guzzle\Http\Plugin\Oauth\OauthPlugin` has moved to - https://github.com/guzzle/oauth-subscriber - -## Service - -The service description layer of Guzzle has moved into two separate packages: - -- http://github.com/guzzle/command Provides a high level abstraction over web - services by representing web service operations using commands. -- http://github.com/guzzle/guzzle-services Provides an implementation of - guzzle/command that provides request serialization and response parsing using - Guzzle service descriptions. - -## Stream - -Stream have moved to a separate package available at -https://github.com/guzzle/streams. - -`Guzzle\Stream\StreamInterface` has been given a large update to cleanly take -on the responsibilities of `Guzzle\Http\EntityBody` and -`Guzzle\Http\EntityBodyInterface` now that they have been removed. The number -of methods implemented by the `StreamInterface` has been drastically reduced to -allow developers to more easily extend and decorate stream behavior. - -## Removed methods from StreamInterface - -- `getStream` and `setStream` have been removed to better encapsulate streams. -- `getMetadata` and `setMetadata` have been removed in favor of - `GuzzleHttp\Stream\MetadataStreamInterface`. -- `getWrapper`, `getWrapperData`, `getStreamType`, and `getUri` have all been - removed. This data is accessible when - using streams that implement `GuzzleHttp\Stream\MetadataStreamInterface`. -- `rewind` has been removed. Use `seek(0)` for a similar behavior. - -## Renamed methods - -- `detachStream` has been renamed to `detach`. -- `feof` has been renamed to `eof`. -- `ftell` has been renamed to `tell`. -- `readLine` has moved from an instance method to a static class method of - `GuzzleHttp\Stream\Stream`. - -## Metadata streams - -`GuzzleHttp\Stream\MetadataStreamInterface` has been added to denote streams -that contain additonal metadata accessible via `getMetadata()`. -`GuzzleHttp\Stream\StreamInterface::getMetadata` and -`GuzzleHttp\Stream\StreamInterface::setMetadata` have been removed. - -## StreamRequestFactory - -The entire concept of the StreamRequestFactory has been removed. The way this -was used in Guzzle 3 broke the actual interface of sending streaming requests -(instead of getting back a Response, you got a StreamInterface). Streeaming -PHP requests are now implemented throught the `GuzzleHttp\Adapter\StreamAdapter`. - -3.6 to 3.7 ----------- - -### Deprecations - -- You can now enable E_USER_DEPRECATED warnings to see if you are using any deprecated methods.: - -```php -\Guzzle\Common\Version::$emitWarnings = true; -``` - -The following APIs and options have been marked as deprecated: - -- Marked `Guzzle\Http\Message\Request::isResponseBodyRepeatable()` as deprecated. Use `$request->getResponseBody()->isRepeatable()` instead. -- Marked `Guzzle\Http\Message\Request::canCache()` as deprecated. Use `Guzzle\Plugin\Cache\DefaultCanCacheStrategy->canCacheRequest()` instead. -- Marked `Guzzle\Http\Message\Request::canCache()` as deprecated. Use `Guzzle\Plugin\Cache\DefaultCanCacheStrategy->canCacheRequest()` instead. -- Marked `Guzzle\Http\Message\Request::setIsRedirect()` as deprecated. Use the HistoryPlugin instead. -- Marked `Guzzle\Http\Message\Request::isRedirect()` as deprecated. Use the HistoryPlugin instead. -- Marked `Guzzle\Cache\CacheAdapterFactory::factory()` as deprecated -- Marked `Guzzle\Service\Client::enableMagicMethods()` as deprecated. Magic methods can no longer be disabled on a Guzzle\Service\Client. -- Marked `Guzzle\Parser\Url\UrlParser` as deprecated. Just use PHP's `parse_url()` and percent encode your UTF-8. -- Marked `Guzzle\Common\Collection::inject()` as deprecated. -- Marked `Guzzle\Plugin\CurlAuth\CurlAuthPlugin` as deprecated. Use - `$client->getConfig()->setPath('request.options/auth', array('user', 'pass', 'Basic|Digest|NTLM|Any'));` or - `$client->setDefaultOption('auth', array('user', 'pass', 'Basic|Digest|NTLM|Any'));` - -3.7 introduces `request.options` as a parameter for a client configuration and as an optional argument to all creational -request methods. When paired with a client's configuration settings, these options allow you to specify default settings -for various aspects of a request. Because these options make other previous configuration options redundant, several -configuration options and methods of a client and AbstractCommand have been deprecated. - -- Marked `Guzzle\Service\Client::getDefaultHeaders()` as deprecated. Use `$client->getDefaultOption('headers')`. -- Marked `Guzzle\Service\Client::setDefaultHeaders()` as deprecated. Use `$client->setDefaultOption('headers/{header_name}', 'value')`. -- Marked 'request.params' for `Guzzle\Http\Client` as deprecated. Use `$client->setDefaultOption('params/{param_name}', 'value')` -- Marked 'command.headers', 'command.response_body' and 'command.on_complete' as deprecated for AbstractCommand. These will work through Guzzle 4.0 - - $command = $client->getCommand('foo', array( - 'command.headers' => array('Test' => '123'), - 'command.response_body' => '/path/to/file' - )); - - // Should be changed to: - - $command = $client->getCommand('foo', array( - 'command.request_options' => array( - 'headers' => array('Test' => '123'), - 'save_as' => '/path/to/file' - ) - )); - -### Interface changes - -Additions and changes (you will need to update any implementations or subclasses you may have created): - -- Added an `$options` argument to the end of the following methods of `Guzzle\Http\ClientInterface`: - createRequest, head, delete, put, patch, post, options, prepareRequest -- Added an `$options` argument to the end of `Guzzle\Http\Message\Request\RequestFactoryInterface::createRequest()` -- Added an `applyOptions()` method to `Guzzle\Http\Message\Request\RequestFactoryInterface` -- Changed `Guzzle\Http\ClientInterface::get($uri = null, $headers = null, $body = null)` to - `Guzzle\Http\ClientInterface::get($uri = null, $headers = null, $options = array())`. You can still pass in a - resource, string, or EntityBody into the $options parameter to specify the download location of the response. -- Changed `Guzzle\Common\Collection::__construct($data)` to no longer accepts a null value for `$data` but a - default `array()` -- Added `Guzzle\Stream\StreamInterface::isRepeatable` -- Made `Guzzle\Http\Client::expandTemplate` and `getUriTemplate` protected methods. - -The following methods were removed from interfaces. All of these methods are still available in the concrete classes -that implement them, but you should update your code to use alternative methods: - -- Removed `Guzzle\Http\ClientInterface::setDefaultHeaders(). Use - `$client->getConfig()->setPath('request.options/headers/{header_name}', 'value')`. or - `$client->getConfig()->setPath('request.options/headers', array('header_name' => 'value'))` or - `$client->setDefaultOption('headers/{header_name}', 'value')`. or - `$client->setDefaultOption('headers', array('header_name' => 'value'))`. -- Removed `Guzzle\Http\ClientInterface::getDefaultHeaders(). Use `$client->getConfig()->getPath('request.options/headers')`. -- Removed `Guzzle\Http\ClientInterface::expandTemplate()`. This is an implementation detail. -- Removed `Guzzle\Http\ClientInterface::setRequestFactory()`. This is an implementation detail. -- Removed `Guzzle\Http\ClientInterface::getCurlMulti()`. This is a very specific implementation detail. -- Removed `Guzzle\Http\Message\RequestInterface::canCache`. Use the CachePlugin. -- Removed `Guzzle\Http\Message\RequestInterface::setIsRedirect`. Use the HistoryPlugin. -- Removed `Guzzle\Http\Message\RequestInterface::isRedirect`. Use the HistoryPlugin. - -### Cache plugin breaking changes - -- CacheKeyProviderInterface and DefaultCacheKeyProvider are no longer used. All of this logic is handled in a - CacheStorageInterface. These two objects and interface will be removed in a future version. -- Always setting X-cache headers on cached responses -- Default cache TTLs are now handled by the CacheStorageInterface of a CachePlugin -- `CacheStorageInterface::cache($key, Response $response, $ttl = null)` has changed to `cache(RequestInterface - $request, Response $response);` -- `CacheStorageInterface::fetch($key)` has changed to `fetch(RequestInterface $request);` -- `CacheStorageInterface::delete($key)` has changed to `delete(RequestInterface $request);` -- Added `CacheStorageInterface::purge($url)` -- `DefaultRevalidation::__construct(CacheKeyProviderInterface $cacheKey, CacheStorageInterface $cache, CachePlugin - $plugin)` has changed to `DefaultRevalidation::__construct(CacheStorageInterface $cache, - CanCacheStrategyInterface $canCache = null)` -- Added `RevalidationInterface::shouldRevalidate(RequestInterface $request, Response $response)` - -3.5 to 3.6 ----------- - -* Mixed casing of headers are now forced to be a single consistent casing across all values for that header. -* Messages internally use a HeaderCollection object to delegate handling case-insensitive header resolution -* Removed the whole changedHeader() function system of messages because all header changes now go through addHeader(). - For example, setHeader() first removes the header using unset on a HeaderCollection and then calls addHeader(). - Keeping the Host header and URL host in sync is now handled by overriding the addHeader method in Request. -* Specific header implementations can be created for complex headers. When a message creates a header, it uses a - HeaderFactory which can map specific headers to specific header classes. There is now a Link header and - CacheControl header implementation. -* Moved getLinks() from Response to just be used on a Link header object. - -If you previously relied on Guzzle\Http\Message\Header::raw(), then you will need to update your code to use the -HeaderInterface (e.g. toArray(), getAll(), etc.). - -### Interface changes - -* Removed from interface: Guzzle\Http\ClientInterface::setUriTemplate -* Removed from interface: Guzzle\Http\ClientInterface::setCurlMulti() -* Removed Guzzle\Http\Message\Request::receivedRequestHeader() and implemented this functionality in - Guzzle\Http\Curl\RequestMediator -* Removed the optional $asString parameter from MessageInterface::getHeader(). Just cast the header to a string. -* Removed the optional $tryChunkedTransfer option from Guzzle\Http\Message\EntityEnclosingRequestInterface -* Removed the $asObjects argument from Guzzle\Http\Message\MessageInterface::getHeaders() - -### Removed deprecated functions - -* Removed Guzzle\Parser\ParserRegister::get(). Use getParser() -* Removed Guzzle\Parser\ParserRegister::set(). Use registerParser(). - -### Deprecations - -* The ability to case-insensitively search for header values -* Guzzle\Http\Message\Header::hasExactHeader -* Guzzle\Http\Message\Header::raw. Use getAll() -* Deprecated cache control specific methods on Guzzle\Http\Message\AbstractMessage. Use the CacheControl header object - instead. - -### Other changes - -* All response header helper functions return a string rather than mixing Header objects and strings inconsistently -* Removed cURL blacklist support. This is no longer necessary now that Expect, Accept, etc. are managed by Guzzle - directly via interfaces -* Removed the injecting of a request object onto a response object. The methods to get and set a request still exist - but are a no-op until removed. -* Most classes that used to require a `Guzzle\Service\Command\CommandInterface` typehint now request a - `Guzzle\Service\Command\ArrayCommandInterface`. -* Added `Guzzle\Http\Message\RequestInterface::startResponse()` to the RequestInterface to handle injecting a response - on a request while the request is still being transferred -* `Guzzle\Service\Command\CommandInterface` now extends from ToArrayInterface and ArrayAccess - -3.3 to 3.4 ----------- - -Base URLs of a client now follow the rules of http://tools.ietf.org/html/rfc3986#section-5.2.2 when merging URLs. - -3.2 to 3.3 ----------- - -### Response::getEtag() quote stripping removed - -`Guzzle\Http\Message\Response::getEtag()` no longer strips quotes around the ETag response header - -### Removed `Guzzle\Http\Utils` - -The `Guzzle\Http\Utils` class was removed. This class was only used for testing. - -### Stream wrapper and type - -`Guzzle\Stream\Stream::getWrapper()` and `Guzzle\Stream\Stream::getStreamType()` are no longer converted to lowercase. - -### curl.emit_io became emit_io - -Emitting IO events from a RequestMediator is now a parameter that must be set in a request's curl options using the -'emit_io' key. This was previously set under a request's parameters using 'curl.emit_io' - -3.1 to 3.2 ----------- - -### CurlMulti is no longer reused globally - -Before 3.2, the same CurlMulti object was reused globally for each client. This can cause issue where plugins added -to a single client can pollute requests dispatched from other clients. - -If you still wish to reuse the same CurlMulti object with each client, then you can add a listener to the -ServiceBuilder's `service_builder.create_client` event to inject a custom CurlMulti object into each client as it is -created. - -```php -$multi = new Guzzle\Http\Curl\CurlMulti(); -$builder = Guzzle\Service\Builder\ServiceBuilder::factory('/path/to/config.json'); -$builder->addListener('service_builder.create_client', function ($event) use ($multi) { - $event['client']->setCurlMulti($multi); -} -}); -``` - -### No default path - -URLs no longer have a default path value of '/' if no path was specified. - -Before: - -```php -$request = $client->get('http://www.foo.com'); -echo $request->getUrl(); -// >> http://www.foo.com/ -``` - -After: - -```php -$request = $client->get('http://www.foo.com'); -echo $request->getUrl(); -// >> http://www.foo.com -``` - -### Less verbose BadResponseException - -The exception message for `Guzzle\Http\Exception\BadResponseException` no longer contains the full HTTP request and -response information. You can, however, get access to the request and response object by calling `getRequest()` or -`getResponse()` on the exception object. - -### Query parameter aggregation - -Multi-valued query parameters are no longer aggregated using a callback function. `Guzzle\Http\Query` now has a -setAggregator() method that accepts a `Guzzle\Http\QueryAggregator\QueryAggregatorInterface` object. This object is -responsible for handling the aggregation of multi-valued query string variables into a flattened hash. - -2.8 to 3.x ----------- - -### Guzzle\Service\Inspector - -Change `\Guzzle\Service\Inspector::fromConfig` to `\Guzzle\Common\Collection::fromConfig` - -**Before** - -```php -use Guzzle\Service\Inspector; - -class YourClient extends \Guzzle\Service\Client -{ - public static function factory($config = array()) - { - $default = array(); - $required = array('base_url', 'username', 'api_key'); - $config = Inspector::fromConfig($config, $default, $required); - - $client = new self( - $config->get('base_url'), - $config->get('username'), - $config->get('api_key') - ); - $client->setConfig($config); - - $client->setDescription(ServiceDescription::factory(__DIR__ . DIRECTORY_SEPARATOR . 'client.json')); - - return $client; - } -``` - -**After** - -```php -use Guzzle\Common\Collection; - -class YourClient extends \Guzzle\Service\Client -{ - public static function factory($config = array()) - { - $default = array(); - $required = array('base_url', 'username', 'api_key'); - $config = Collection::fromConfig($config, $default, $required); - - $client = new self( - $config->get('base_url'), - $config->get('username'), - $config->get('api_key') - ); - $client->setConfig($config); - - $client->setDescription(ServiceDescription::factory(__DIR__ . DIRECTORY_SEPARATOR . 'client.json')); - - return $client; - } -``` - -### Convert XML Service Descriptions to JSON - -**Before** - -```xml - - - - - - Get a list of groups - - - Uses a search query to get a list of groups - - - - Create a group - - - - - Delete a group by ID - - - - - - - Update a group - - - - - - -``` - -**After** - -```json -{ - "name": "Zendesk REST API v2", - "apiVersion": "2012-12-31", - "description":"Provides access to Zendesk views, groups, tickets, ticket fields, and users", - "operations": { - "list_groups": { - "httpMethod":"GET", - "uri": "groups.json", - "summary": "Get a list of groups" - }, - "search_groups":{ - "httpMethod":"GET", - "uri": "search.json?query=\"{query} type:group\"", - "summary": "Uses a search query to get a list of groups", - "parameters":{ - "query":{ - "location": "uri", - "description":"Zendesk Search Query", - "type": "string", - "required": true - } - } - }, - "create_group": { - "httpMethod":"POST", - "uri": "groups.json", - "summary": "Create a group", - "parameters":{ - "data": { - "type": "array", - "location": "body", - "description":"Group JSON", - "filters": "json_encode", - "required": true - }, - "Content-Type":{ - "type": "string", - "location":"header", - "static": "application/json" - } - } - }, - "delete_group": { - "httpMethod":"DELETE", - "uri": "groups/{id}.json", - "summary": "Delete a group", - "parameters":{ - "id":{ - "location": "uri", - "description":"Group to delete by ID", - "type": "integer", - "required": true - } - } - }, - "get_group": { - "httpMethod":"GET", - "uri": "groups/{id}.json", - "summary": "Get a ticket", - "parameters":{ - "id":{ - "location": "uri", - "description":"Group to get by ID", - "type": "integer", - "required": true - } - } - }, - "update_group": { - "httpMethod":"PUT", - "uri": "groups/{id}.json", - "summary": "Update a group", - "parameters":{ - "id": { - "location": "uri", - "description":"Group to update by ID", - "type": "integer", - "required": true - }, - "data": { - "type": "array", - "location": "body", - "description":"Group JSON", - "filters": "json_encode", - "required": true - }, - "Content-Type":{ - "type": "string", - "location":"header", - "static": "application/json" - } - } - } -} -``` - -### Guzzle\Service\Description\ServiceDescription - -Commands are now called Operations - -**Before** - -```php -use Guzzle\Service\Description\ServiceDescription; - -$sd = new ServiceDescription(); -$sd->getCommands(); // @returns ApiCommandInterface[] -$sd->hasCommand($name); -$sd->getCommand($name); // @returns ApiCommandInterface|null -$sd->addCommand($command); // @param ApiCommandInterface $command -``` - -**After** - -```php -use Guzzle\Service\Description\ServiceDescription; - -$sd = new ServiceDescription(); -$sd->getOperations(); // @returns OperationInterface[] -$sd->hasOperation($name); -$sd->getOperation($name); // @returns OperationInterface|null -$sd->addOperation($operation); // @param OperationInterface $operation -``` - -### Guzzle\Common\Inflection\Inflector - -Namespace is now `Guzzle\Inflection\Inflector` - -### Guzzle\Http\Plugin - -Namespace is now `Guzzle\Plugin`. Many other changes occur within this namespace and are detailed in their own sections below. - -### Guzzle\Http\Plugin\LogPlugin and Guzzle\Common\Log - -Now `Guzzle\Plugin\Log\LogPlugin` and `Guzzle\Log` respectively. - -**Before** - -```php -use Guzzle\Common\Log\ClosureLogAdapter; -use Guzzle\Http\Plugin\LogPlugin; - -/** @var \Guzzle\Http\Client */ -$client; - -// $verbosity is an integer indicating desired message verbosity level -$client->addSubscriber(new LogPlugin(new ClosureLogAdapter(function($m) { echo $m; }, $verbosity = LogPlugin::LOG_VERBOSE); -``` - -**After** - -```php -use Guzzle\Log\ClosureLogAdapter; -use Guzzle\Log\MessageFormatter; -use Guzzle\Plugin\Log\LogPlugin; - -/** @var \Guzzle\Http\Client */ -$client; - -// $format is a string indicating desired message format -- @see MessageFormatter -$client->addSubscriber(new LogPlugin(new ClosureLogAdapter(function($m) { echo $m; }, $format = MessageFormatter::DEBUG_FORMAT); -``` - -### Guzzle\Http\Plugin\CurlAuthPlugin - -Now `Guzzle\Plugin\CurlAuth\CurlAuthPlugin`. - -### Guzzle\Http\Plugin\ExponentialBackoffPlugin - -Now `Guzzle\Plugin\Backoff\BackoffPlugin`, and other changes. - -**Before** - -```php -use Guzzle\Http\Plugin\ExponentialBackoffPlugin; - -$backoffPlugin = new ExponentialBackoffPlugin($maxRetries, array_merge( - ExponentialBackoffPlugin::getDefaultFailureCodes(), array(429) - )); - -$client->addSubscriber($backoffPlugin); -``` - -**After** - -```php -use Guzzle\Plugin\Backoff\BackoffPlugin; -use Guzzle\Plugin\Backoff\HttpBackoffStrategy; - -// Use convenient factory method instead -- see implementation for ideas of what -// you can do with chaining backoff strategies -$backoffPlugin = BackoffPlugin::getExponentialBackoff($maxRetries, array_merge( - HttpBackoffStrategy::getDefaultFailureCodes(), array(429) - )); -$client->addSubscriber($backoffPlugin); -``` - -### Known Issues - -#### [BUG] Accept-Encoding header behavior changed unintentionally. - -(See #217) (Fixed in 09daeb8c666fb44499a0646d655a8ae36456575e) - -In version 2.8 setting the `Accept-Encoding` header would set the CURLOPT_ENCODING option, which permitted cURL to -properly handle gzip/deflate compressed responses from the server. In versions affected by this bug this does not happen. -See issue #217 for a workaround, or use a version containing the fix. diff --git a/core/vendor/guzzlehttp/guzzle/build/packager.php b/core/vendor/guzzlehttp/guzzle/build/packager.php deleted file mode 100644 index 96afa93..0000000 --- a/core/vendor/guzzlehttp/guzzle/build/packager.php +++ /dev/null @@ -1,21 +0,0 @@ -deepCopy($file, $file); -} - -// Copy each dependency to the staging directory. Copy *.php and *.pem files. -$packager->recursiveCopy('src', 'GuzzleHttp', ['php']); -$packager->recursiveCopy('vendor/react/promise/src', ''); -$packager->recursiveCopy('vendor/guzzlehttp/ringphp/src', 'GuzzleHttp/Ring'); -$packager->recursiveCopy('vendor/guzzlehttp/streams/src', 'GuzzleHttp/Stream'); -$packager->createAutoloader(['React/Promise/functions.php']); -$packager->createPhar(__DIR__ . '/artifacts/guzzle.phar'); -$packager->createZip(__DIR__ . '/artifacts/guzzle.zip'); diff --git a/core/vendor/guzzlehttp/guzzle/composer.json b/core/vendor/guzzlehttp/guzzle/composer.json deleted file mode 100644 index e9615a0..0000000 --- a/core/vendor/guzzlehttp/guzzle/composer.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "guzzlehttp/guzzle", - "type": "library", - "description": "Guzzle is a PHP HTTP client library and framework for building RESTful web service clients", - "keywords": ["framework", "http", "rest", "web service", "curl", "client", "HTTP client"], - "homepage": "http://guzzlephp.org/", - "license": "MIT", - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - } - ], - "require": { - "php": ">=5.4.0", - "guzzlehttp/ringphp": "~1.0" - }, - "require-dev": { - "ext-curl": "*", - "psr/log": "~1.0", - "phpunit/phpunit": "~4.0" - }, - "autoload": { - "psr-4": { - "GuzzleHttp\\": "src/" - } - }, - "autoload-dev": { - "psr-4": { - "GuzzleHttp\\Tests\\": "tests/" - } - }, - "extra": { - "branch-alias": { - "dev-master": "5.0-dev" - } - } -} diff --git a/core/vendor/guzzlehttp/guzzle/docs/Makefile b/core/vendor/guzzlehttp/guzzle/docs/Makefile deleted file mode 100644 index d92e03f..0000000 --- a/core/vendor/guzzlehttp/guzzle/docs/Makefile +++ /dev/null @@ -1,153 +0,0 @@ -# Makefile for Sphinx documentation -# - -# You can set these variables from the command line. -SPHINXOPTS = -SPHINXBUILD = sphinx-build -PAPER = -BUILDDIR = _build - -# Internal variables. -PAPEROPT_a4 = -D latex_paper_size=a4 -PAPEROPT_letter = -D latex_paper_size=letter -ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . -# the i18n builder cannot share the environment and doctrees with the others -I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . - -.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext - -help: - @echo "Please use \`make ' where is one of" - @echo " html to make standalone HTML files" - @echo " dirhtml to make HTML files named index.html in directories" - @echo " singlehtml to make a single large HTML file" - @echo " pickle to make pickle files" - @echo " json to make JSON files" - @echo " htmlhelp to make HTML files and a HTML help project" - @echo " qthelp to make HTML files and a qthelp project" - @echo " devhelp to make HTML files and a Devhelp project" - @echo " epub to make an epub" - @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" - @echo " latexpdf to make LaTeX files and run them through pdflatex" - @echo " text to make text files" - @echo " man to make manual pages" - @echo " texinfo to make Texinfo files" - @echo " info to make Texinfo files and run them through makeinfo" - @echo " gettext to make PO message catalogs" - @echo " changes to make an overview of all changed/added/deprecated items" - @echo " linkcheck to check all external links for integrity" - @echo " doctest to run all doctests embedded in the documentation (if enabled)" - -clean: - -rm -rf $(BUILDDIR)/* - -html: - $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html - @echo - @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." - -dirhtml: - $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml - @echo - @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." - -singlehtml: - $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml - @echo - @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." - -pickle: - $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle - @echo - @echo "Build finished; now you can process the pickle files." - -json: - $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json - @echo - @echo "Build finished; now you can process the JSON files." - -htmlhelp: - $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp - @echo - @echo "Build finished; now you can run HTML Help Workshop with the" \ - ".hhp project file in $(BUILDDIR)/htmlhelp." - -qthelp: - $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp - @echo - @echo "Build finished; now you can run "qcollectiongenerator" with the" \ - ".qhcp project file in $(BUILDDIR)/qthelp, like this:" - @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/Guzzle.qhcp" - @echo "To view the help file:" - @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/Guzzle.qhc" - -devhelp: - $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp - @echo - @echo "Build finished." - @echo "To view the help file:" - @echo "# mkdir -p $$HOME/.local/share/devhelp/Guzzle" - @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/Guzzle" - @echo "# devhelp" - -epub: - $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub - @echo - @echo "Build finished. The epub file is in $(BUILDDIR)/epub." - -latex: - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo - @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." - @echo "Run \`make' in that directory to run these through (pdf)latex" \ - "(use \`make latexpdf' here to do that automatically)." - -latexpdf: - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo "Running LaTeX files through pdflatex..." - $(MAKE) -C $(BUILDDIR)/latex all-pdf - @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." - -text: - $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text - @echo - @echo "Build finished. The text files are in $(BUILDDIR)/text." - -man: - $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man - @echo - @echo "Build finished. The manual pages are in $(BUILDDIR)/man." - -texinfo: - $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo - @echo - @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." - @echo "Run \`make' in that directory to run these through makeinfo" \ - "(use \`make info' here to do that automatically)." - -info: - $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo - @echo "Running Texinfo files through makeinfo..." - make -C $(BUILDDIR)/texinfo info - @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." - -gettext: - $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale - @echo - @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." - -changes: - $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes - @echo - @echo "The overview file is in $(BUILDDIR)/changes." - -linkcheck: - $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck - @echo - @echo "Link check complete; look for any errors in the above output " \ - "or in $(BUILDDIR)/linkcheck/output.txt." - -doctest: - $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest - @echo "Testing of doctests in the sources finished, look at the " \ - "results in $(BUILDDIR)/doctest/output.txt." diff --git a/core/vendor/guzzlehttp/guzzle/docs/_static/guzzle-icon.png b/core/vendor/guzzlehttp/guzzle/docs/_static/guzzle-icon.png deleted file mode 100644 index f1017f7..0000000 --- a/core/vendor/guzzlehttp/guzzle/docs/_static/guzzle-icon.png +++ /dev/null @@ -1,4 +0,0 @@ -PNG - - IHDR&bKGD̿ pHYsgRtIME,BIDAT8˕Kex4ljsN ƊQD"^n џ0.#X/x6E Z3_[f:[,j6/K,p.|zRHzG-q pْJ|'73^ g kY)q,5$1פQf9wtwB%92:"R2qZ5qK.@A9/.%=ryb"  ]|pUgxKM_S.nUZ(3i;4gŐrs>4^^ܰ`nN}YI5vPk. ÞguXW~0 1ɤc -tYP0i8hR z$k$+„1u[ ᴣn1fL[6h7D؈jgeg(=IENDB` \ No newline at end of file diff --git a/core/vendor/guzzlehttp/guzzle/docs/_static/logo.png b/core/vendor/guzzlehttp/guzzle/docs/_static/logo.png deleted file mode 100644 index 965a4ef..0000000 --- a/core/vendor/guzzlehttp/guzzle/docs/_static/logo.png +++ /dev/null @@ -1,936 +0,0 @@ -PNG - - IHDR_d` pHYsgR@IDATx]U7>2s$ɤM - @ʄŒO,iև=}C' -P$**F;If#$Ap{.뜻koQ9y %@^Wv-/K@^柃K H |π]%@^yK /3 =Bw@^y oK /΀ =e^y %Wg /8+3 |y %@^柁K H |π]%@^yK /3 =Bw@^y lto߾];.ɟ@^y TJ*`63#G<Ҟh,Nܞo"JCokit_ULQ>4OMMM)hm5uCthry:r[KYLSlzЯB5IK$u\dRWSkSJVbnϪGSWX1򽣬=P N9arz`S6UBg4dN7G!Y2cUNW*b=m5m9UEΟ",\ džt&U8j˒jzqaAr"S.*@%o:ʙffM:6ץ ;獳ǖnʦ"ZNmHMye - bj#M6A(ߕ+W -]]'葈).H-뮾B&Aa.K"qw˒ۥDhEY%uױb'*P(KĥNĢpe@ -GR‹J%a]өIQV -cS2jGH{PNt 6\m+jQ DljYXM9<Lb?P(VvvlS U_8x(_J xʯ5m97(sNB:]2L(Ȱ~X$ϑM>ۼ=x-&$&1m+\kl)sbs3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[~ΏGǖ\pP SF9/ SvȹB^TJMkZh- -]ӮәVRcζǎeɈt %3ɾ]ɂ)E \/"H5'>{9ykb|w t0\(hf#+ҙ|Vr&g̅>4B9FJ-{NZ17$ϫRev-, DxOn_J},?0v>d>S//'ڵ!S0γۥW04~8;7CYrO_)ɮ>:2 PVeAkW*94OMޟ? -rėdg#MHVBwLp浊EE!7MՊ)Uvp/Ptl s2Y0dԀCxՊŊ\ZW4D5VRr R@*ք̘x)bk!UGG[XpzZ[C yeZݎKf w Puȷ\!'?oC.1+XG[Q@@y^,R}o<&+k2CR|l_X-]Zz~n61Aӝ7 qCKuIߏrs+oۨ@B Dh(0r̈́hY"Ghs B%5bjGxTK gr}(j;2*K*Sf FŊoCehF{u"i}>l)4ʤZEd?M#7tbFRtłm6ٸqǨ!Z|kV:H -$afvZS IOc"81ޡΓ#*]Pos=ߧI{=ߝkN^^.y%$:a?9`tƳ%ŕ5﷋j#=فH,TnżNDĈ5+i6p1UHL{&ӃPtڦvw;I5vJI?-:sQ*=f(tF>͊45^x9ܛXY3v\My$-h=wK;u|=dPe -`Wljt}VZż>;Q\iɽGϱ??Z -rӗM5TT=/sH<ݱi'G`r&dFr?1=IENDB` \ No newline at end of file diff --git a/core/vendor/guzzlehttp/guzzle/docs/_templates/nav_links.html b/core/vendor/guzzlehttp/guzzle/docs/_templates/nav_links.html deleted file mode 100644 index 7950a0f..0000000 --- a/core/vendor/guzzlehttp/guzzle/docs/_templates/nav_links.html +++ /dev/null @@ -1,3 +0,0 @@ -

  • GitHub
  • -
  • Forum
  • -
  • IRC
  • diff --git a/core/vendor/guzzlehttp/guzzle/docs/clients.rst b/core/vendor/guzzlehttp/guzzle/docs/clients.rst deleted file mode 100644 index c5aed63..0000000 --- a/core/vendor/guzzlehttp/guzzle/docs/clients.rst +++ /dev/null @@ -1,1298 +0,0 @@ -======= -Clients -======= - -Clients are used to create requests, create transactions, send requests -through an HTTP handler, and return a response. You can add default request -options to a client that are applied to every request (e.g., default headers, -default query string parameters, etc.), and you can add event listeners and -subscribers to every request created by a client. - -Creating a client -================= - -The constructor of a client accepts an associative array of configuration -options. - -base_url - Configures a base URL for the client so that requests created - using a relative URL are combined with the ``base_url`` of the client - according to section `5.2 of RFC 3986 `_. - - .. code-block:: php - - // Create a client with a base URL - $client = new GuzzleHttp\Client(['base_url' => 'https://github.com']); - // Send a request to https://github.com/notifications - $response = $client->get('/notifications'); - - `Absolute URLs `_ sent - through a client will not use the base URL of the client. - -handler - Configures the `RingPHP handler `_ - used to transfer the HTTP requests of a client. Guzzle will, by default, - utilize a stacked handlers that chooses the best handler to use based on the - provided request options and based on the extensions available in the - environment. - -message_factory - Specifies the factory used to create HTTP requests and responses - (``GuzzleHttp\Message\MessageFactoryInterface``). - -defaults - Associative array of :ref:`request-options` that are applied to every - request created by the client. This allows you to specify things like - default headers (e.g., User-Agent), default query string parameters, SSL - configurations, and any other supported request options. - -emitter - Specifies an event emitter (``GuzzleHttp\Event\EmitterInterface``) instance - to be used by the client to emit request events. This option is useful if - you need to inject an emitter with listeners/subscribers already attached. - -Here's an example of creating a client with various options. - -.. code-block:: php - - use GuzzleHttp\Client; - - $client = new Client([ - 'base_url' => ['https://api.twitter.com/{version}/', ['version' => 'v1.1']], - 'defaults' => [ - 'headers' => ['Foo' => 'Bar'], - 'query' => ['testing' => '123'], - 'auth' => ['username', 'password'], - 'proxy' => 'tcp://localhost:80' - ] - ]); - -Sending Requests -================ - -Requests can be created using various methods of a client. You can create -**and** send requests using one of the following methods: - -- ``GuzzleHttp\Client::get``: Sends a GET request. -- ``GuzzleHttp\Client::head``: Sends a HEAD request -- ``GuzzleHttp\Client::post``: Sends a POST request -- ``GuzzleHttp\Client::put``: Sends a PUT request -- ``GuzzleHttp\Client::delete``: Sends a DELETE request -- ``GuzzleHttp\Client::options``: Sends an OPTIONS request - -Each of the above methods accepts a URL as the first argument and an optional -associative array of :ref:`request-options` as the second argument. - -Synchronous Requests --------------------- - -Guzzle sends synchronous (blocking) requests when the ``future`` request option -is not specified. This means that the request will complete immediately, and if -an error is encountered, a ``GuzzleHttp\Exception\RequestException`` will be -thrown. - -.. code-block:: php - - $client = new GuzzleHttp\Client(); - - $client->put('http://httpbin.org', [ - 'headers' => ['X-Foo' => 'Bar'], - 'body' => 'this is the body!', - 'save_to' => '/path/to/local/file', - 'allow_redirects' => false, - 'timeout' => 5 - ]); - -Synchronous Error Handling -~~~~~~~~~~~~~~~~~~~~~~~~~~ - -When a recoverable error is encountered while calling the ``send()`` method of -a client, a ``GuzzleHttp\Exception\RequestException`` is thrown. - -.. code-block:: php - - use GuzzleHttp\Client; - use GuzzleHttp\Exception\RequestException; - - $client = new Client(); - - try { - $client->get('http://httpbin.org'); - } catch (RequestException $e) { - echo $e->getRequest() . "\n"; - if ($e->hasResponse()) { - echo $e->getResponse() . "\n"; - } - } - -``GuzzleHttp\Exception\RequestException`` always contains a -``GuzzleHttp\Message\RequestInterface`` object that can be accessed using the -exception's ``getRequest()`` method. - -A response might be present in the exception. In the event of a networking -error, no response will be received. You can check if a ``RequestException`` -has a response using the ``hasResponse()`` method. If the exception has a -response, then you can access the associated -``GuzzleHttp\Message\ResponseInterface`` using the ``getResponse()`` method of -the exception. - -Asynchronous Requests ---------------------- - -You can send asynchronous requests by setting the ``future`` request option -to ``true`` (or a string that your handler understands). This creates a -``GuzzleHttp\Message\FutureResponse`` object that has not yet completed. Once -you have a future response, you can use a promise object obtained by calling -the ``then`` method of the response to take an action when the response has -completed or encounters an error. - -.. code-block:: php - - $response = $client->put('http://httpbin.org/get', ['future' => true]); - - // Call the function when the response completes - $response->then(function ($response) { - echo $response->getStatusCode(); - }); - -You can call the ``wait()`` method of a future response to block until it has -completed. You also use a future response object just like a normal response -object by accessing the methods of the response. Using a future response like a -normal response object, also known as *dereferencing*, will block until the -response has completed. - -.. code-block:: php - - $response = $client->put('http://httpbin.org/get', ['future' => true]); - - // Block until the response has completed - echo $response->getStatusCode(); - -.. important:: - - If an exception occurred while transferring the future response, then the - exception encountered will be thrown when dereferencing. - -Asynchronous Error Handling -~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Handling errors with future response object promises is a bit different. When -using a promise, exceptions are forwarded to the ``$onError`` function provided -to the second argument of the ``then()`` function. - -.. code-block:: php - - $response = $client->put('http://httpbin.org/get', ['future' => true]); - - $response - ->then( - function ($response) { - // This is called when the request succeeded - echo 'Success: ' . $response->getStatusCode(); - // Returning a value will forward the value to the next promise - // in the chain. - return $response; - }, - function ($error) { - // This is called when the exception failed. - echo 'Exception: ' . $error->getMessage(); - // Throwing will "forward" the exception to the next promise - // in the chain. - throw $error; - } - ) - ->then( - function($response) { - // This is called after the first promise in the chain. It - // receives the value returned from the first promise. - echo $response->getReasonPhrase(); - }, - function ($error) { - // This is called if the first promise error handler in the - // chain rethrows the exception. - echo 'Error: ' . $error->getMessage(); - } - ); - -Please see the `React/Promises project documentation `_ -for more information on how promise resolution and rejection forwarding works. - -HTTP Errors ------------ - -If the ``exceptions`` request option is not set to ``false``, then exceptions -are thrown for HTTP protocol errors as well: -``GuzzleHttp\Exception\ClientErrorResponseException`` for 4xx level HTTP -responses and ``GuzzleHttp\Exception\ServerException`` for 5xx level responses, -both of which extend from ``GuzzleHttp\Exception\BadResponseException``. - -Creating Requests ------------------ - -You can create a request without sending it. This is useful for building up -requests over time or sending requests in concurrently. - -.. code-block:: php - - $request = $client->createRequest('GET', 'http://httpbin.org', [ - 'headers' => ['X-Foo' => 'Bar'] - ]); - - // Modify the request as needed - $request->setHeader('Baz', 'bar'); - -After creating a request, you can send it with the client's ``send()`` method. - -.. code-block:: php - - $response = $client->send($request); - -Sending Requests With a Pool -============================ - -You can send requests concurrently using a fixed size pool via the -``GuzzleHttp\Pool`` class. The Pool class is an implementation of -``GuzzleHttp\Ring\Future\FutureInterface``, meaning it can be dereferenced at a -later time or cancelled before sending. The Pool constructor accepts a client -object, iterator or array that yields ``GuzzleHttp\Message\RequestInterface`` -objects, and an optional associative array of options that can be used to -affect the transfer. - -.. code-block:: php - - use GuzzleHttp\Pool; - - $requests = [ - $client->createRequest('GET', 'http://httpbin.org'), - $client->createRequest('DELETE', 'http://httpbin.org/delete'), - $client->createRequest('PUT', 'http://httpbin.org/put', ['body' => 'test']) - ]; - - $options = []; - - // Create a pool. Note: the options array is optional. - $pool = new Pool($client, $requests, $options); - - // Send the requests - $pool->wait(); - -The Pool constructor accepts the following associative array of options: - -- **pool_size**: Integer representing the maximum number of requests that are - allowed to be sent concurrently. -- **before**: Callable or array representing the event listeners to add to - each request's :ref:`before_event` event. -- **complete**: Callable or array representing the event listeners to add to - each request's :ref:`complete_event` event. -- **error**: Callable or array representing the event listeners to add to - each request's :ref:`error_event` event. -- **end**: Callable or array representing the event listeners to add to - each request's :ref:`end_event` event. - -The "before", "complete", "error", and "end" event options accept a callable or -an array of associative arrays where each associative array contains a "fn" key -with a callable value, an optional "priority" key representing the event -priority (with a default value of 0), and an optional "once" key that can be -set to true so that the event listener will be removed from the request after -it is first triggered. - -.. code-block:: php - - use GuzzleHttp\Pool; - use GuzzleHttp\Event\CompleteEvent; - - // Add a single event listener using a callable. - Pool::send($client, $requests, [ - 'complete' => function (CompleteEvent $event) { - echo 'Completed request to ' . $event->getRequest()->getUrl() . "\n"; - echo 'Response: ' . $event->getResponse()->getBody() . "\n\n"; - } - ]); - - // The above is equivalent to the following, but the following structure - // allows you to add multiple event listeners to the same event name. - Pool::send($client, $requests, [ - 'complete' => [ - [ - 'fn' => function (CompleteEvent $event) { /* ... */ }, - 'priority' => 0, // Optional - 'once' => false // Optional - ] - ] - ]); - -Asynchronous Response Handling ------------------------------- - -When sending requests concurrently using a pool, the request/response/error -lifecycle must be handled asynchronously. This means that you give the Pool -multiple requests and handle the response or errors that is associated with the -request using event callbacks. - -.. code-block:: php - - use GuzzleHttp\Pool; - use GuzzleHttp\Event\ErrorEvent; - - Pool::send($client, $requests, [ - 'complete' => function (CompleteEvent $event) { - echo 'Completed request to ' . $event->getRequest()->getUrl() . "\n"; - echo 'Response: ' . $event->getResponse()->getBody() . "\n\n"; - // Do something with the completion of the request... - }, - 'error' => function (ErrorEvent $event) { - echo 'Request failed: ' . $event->getRequest()->getUrl() . "\n"; - echo $event->getException(); - // Do something to handle the error... - } - ]); - -The ``GuzzleHttp\Event\ErrorEvent`` event object is emitted when an error -occurs during a transfer. With this event, you have access to the request that -was sent, the response that was received (if one was received), access to -transfer statistics, and the ability to intercept the exception with a -different ``GuzzleHttp\Message\ResponseInterface`` object. See :doc:`events` -for more information. - -Handling Errors After Transferring -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -It sometimes might be easier to handle all of the errors that occurred during a -transfer after all of the requests have been sent. Here we are adding each -failed request to an array that we can use to process errors later. - -.. code-block:: php - - use GuzzleHttp\Pool; - use GuzzleHttp\Event\ErrorEvent; - - $errors = []; - Pool::send($client, $requests, [ - 'error' => function (ErrorEvent $event) use (&$errors) { - $errors[] = $event; - } - ]); - - foreach ($errors as $error) { - // Handle the error... - } - -.. _batch-requests: - -Batching Requests ------------------ - -Sometimes you just want to send a few requests concurrently and then process -the results all at once after they've been sent. Guzzle provides a convenience -function ``GuzzleHttp\Pool::batch()`` that makes this very simple: - -.. code-block:: php - - use GuzzleHttp\Pool; - use GuzzleHttp\Client; - - $client = new Client(); - - $requests = [ - $client->createRequest('GET', 'http://httpbin.org/get'), - $client->createRequest('HEAD', 'http://httpbin.org/get'), - $client->createRequest('PUT', 'http://httpbin.org/put'), - ]; - - // Results is a GuzzleHttp\BatchResults object. - $results = Pool::batch($client, $requests); - - // Can be accessed by index. - echo $results[0]->getStatusCode(); - - // Can be accessed by request. - echo $results->getResult($requests[0])->getStatusCode(); - - // Retrieve all successful responses - foreach ($results->getSuccessful() as $response) { - echo $response->getStatusCode() . "\n"; - } - - // Retrieve all failures. - foreach ($results->getFailures() as $requestException) { - echo $requestException->getMessage() . "\n"; - } - -``GuzzleHttp\Pool::batch()`` accepts an optional associative array of options -in the third argument that allows you to specify the 'before', 'complete', -'error', and 'end' events as well as specify the maximum number of requests to -send concurrently using the 'pool_size' option key. - -.. _request-options: - -Request Options -=============== - -You can customize requests created by a client using **request options**. -Request options control various aspects of a request including, headers, -query string parameters, timeout settings, the body of a request, and much -more. - -All of the following examples use the following client: - -.. code-block:: php - - $client = new GuzzleHttp\Client(['base_url' => 'http://httpbin.org']); - -headers -------- - -:Summary: Associative array of headers to add to the request. Each key is the - name of a header, and each value is a string or array of strings - representing the header field values. -:Types: array -:Defaults: None - -.. code-block:: php - - // Set various headers on a request - $client->get('/get', [ - 'headers' => [ - 'User-Agent' => 'testing/1.0', - 'Accept' => 'application/json', - 'X-Foo' => ['Bar', 'Baz'] - ] - ]); - -body ----- - -:Summary: The ``body`` option is used to control the body of an entity - enclosing request (e.g., PUT, POST, PATCH). -:Types: - - string - - ``fopen()`` resource - - ``GuzzleHttp\Stream\StreamInterface`` - - ``GuzzleHttp\Post\PostBodyInterface`` -:Default: None - -This setting can be set to any of the following types: - -- string - - .. code-block:: php - - // You can send requests that use a string as the message body. - $client->put('/put', ['body' => 'foo']); - -- resource returned from ``fopen()`` - - .. code-block:: php - - // You can send requests that use a stream resource as the body. - $resource = fopen('http://httpbin.org', 'r'); - $client->put('/put', ['body' => $resource]); - -- Array - - Use an array to send POST style requests that use a - ``GuzzleHttp\Post\PostBodyInterface`` object as the body. - - .. code-block:: php - - // You can send requests that use a POST body containing fields & files. - $client->post('/post', [ - 'body' => [ - 'field' => 'abc', - 'other_field' => '123', - 'file_name' => fopen('/path/to/file', 'r') - ] - ]); - -- ``GuzzleHttp\Stream\StreamInterface`` - - .. code-block:: php - - // You can send requests that use a Guzzle stream object as the body - $stream = GuzzleHttp\Stream\Stream::factory('contents...'); - $client->post('/post', ['body' => $stream]); - -json ----- - -:Summary: The ``json`` option is used to easily upload JSON encoded data as the - body of a request. A Content-Type header of ``application/json`` will be - added if no Content-Type header is already present on the message. -:Types: - Any PHP type that can be operated on by PHP's ``json_encode()`` function. -:Default: None - -.. code-block:: php - - $request = $client->createRequest('/put', ['json' => ['foo' => 'bar']]); - echo $request->getHeader('Content-Type'); - // application/json - echo $request->getBody(); - // {"foo":"bar"} - -.. note:: - - This request option does not support customizing the Content-Type header - or any of the options from PHP's `json_encode() `_ - function. If you need to customize these settings, then you must pass the - JSON encoded data into the request yourself using the ``body`` request - option and you must specify the correct Content-Type header using the - ``headers`` request option. - -query ------ - -:Summary: Associative array of query string values to add to the request. -:Types: - - array - - ``GuzzleHttp\Query`` -:Default: None - -.. code-block:: php - - // Send a GET request to /get?foo=bar - $client->get('/get', ['query' => ['foo' => 'bar']]); - -Query strings specified in the ``query`` option are combined with any query -string values that are parsed from the URL. - -.. code-block:: php - - // Send a GET request to /get?abc=123&foo=bar - $client->get('/get?abc=123', ['query' => ['foo' => 'bar']]); - -auth ----- - -:Summary: Pass an array of HTTP authentication parameters to use with the - request. The array must contain the username in index [0], the password in - index [1], and you can optionally provide a built-in authentication type in - index [2]. Pass ``null`` to disable authentication for a request. -:Types: - - array - - string - - null -:Default: None - -The built-in authentication types are as follows: - -basic - Use `basic HTTP authentication `_ in - the ``Authorization`` header (the default setting used if none is - specified). - - .. code-block:: php - - $client->get('/get', ['auth' => ['username', 'password']]); - -digest - Use `digest authentication `_ (must be - supported by the HTTP handler). - - .. code-block:: php - - $client->get('/get', ['auth' => ['username', 'password', 'digest']]); - - *This is currently only supported when using the cURL handler, but creating - a replacement that can be used with any HTTP handler is planned.* - -.. important:: - - The authentication type (whether it's provided as a string or as the third - option in an array) is always converted to a lowercase string. Take this - into account when implementing custom authentication types and when - implementing custom message factories. - -Custom Authentication Schemes -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -You can also provide a string representing a custom authentication type name. -When using a custom authentication type string, you will need to implement -the authentication method in an event listener that checks the ``auth`` request -option of a request before it is sent. Authentication listeners that require -a request is not modified after they are signed should have a very low priority -to ensure that they are fired last or near last in the event chain. - -.. code-block:: php - - use GuzzleHttp\Event\BeforeEvent; - use GuzzleHttp\Event\RequestEvents; - - /** - * Custom authentication listener that handles the "foo" auth type. - * - * Listens to the "before" event of a request and only modifies the request - * when the "auth" config setting of the request is "foo". - */ - class FooAuth implements GuzzleHttp\Event\SubscriberInterface - { - private $password; - - public function __construct($password) - { - $this->password = $password; - } - - public function getEvents() - { - return ['before' => ['sign', RequestEvents::SIGN_REQUEST]]; - } - - public function sign(BeforeEvent $e) - { - if ($e->getRequest()->getConfig()['auth'] == 'foo') { - $e->getRequest()->setHeader('X-Foo', 'Foo ' . $this->password); - } - } - } - - $client->getEmitter()->attach(new FooAuth('password')); - $client->get('/', ['auth' => 'foo']); - -Adapter Specific Authentication Schemes -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -If you need to use authentication methods provided by cURL (e.g., NTLM, GSS, -etc.), then you need to specify a curl handler option in the ``options`` -request option array. See :ref:`config-option` for more information. - -.. _cookies-option: - -cookies -------- - -:Summary: Specifies whether or not cookies are used in a request or what cookie - jar to use or what cookies to send. -:Types: - - bool - - array - - ``GuzzleHttp\Cookie\CookieJarInterface`` -:Default: None - -Set to ``true`` to use a shared cookie session associated with the client. - -.. code-block:: php - - // Enable cookies using the shared cookie jar of the client. - $client->get('/get', ['cookies' => true]); - -Pass an associative array containing cookies to send in the request and start a -new cookie session. - -.. code-block:: php - - // Enable cookies and send specific cookies - $client->get('/get', ['cookies' => ['foo' => 'bar']]); - -Set to a ``GuzzleHttp\Cookie\CookieJarInterface`` object to use an existing -cookie jar. - -.. code-block:: php - - $jar = new GuzzleHttp\Cookie\CookieJar(); - $client->get('/get', ['cookies' => $jar]); - -.. _allow_redirects-option: - -allow_redirects ---------------- - -:Summary: Describes the redirect behavior of a request -:Types: - - bool - - array -:Default: ``['max' => 5, 'strict' => false, 'referer' => true]`` - -Set to ``false`` to disable redirects. - -.. code-block:: php - - $res = $client->get('/redirect/3', ['allow_redirects' => false]); - echo $res->getStatusCode(); - // 302 - -Set to ``true`` (the default setting) to enable normal redirects with a maximum -number of 5 redirects. - -.. code-block:: php - - $res = $client->get('/redirect/3'); - echo $res->getStatusCode(); - // 200 - -Pass an associative array containing the 'max' key to specify the maximum -number of redirects, optionally provide a 'strict' key value to specify -whether or not to use strict RFC compliant redirects (meaning redirect POST -requests with POST requests vs. doing what most browsers do which is redirect -POST requests with GET requests), and optionally provide a 'referer' key to -specify whether or not the "Referer" header should be added when redirecting. - -.. code-block:: php - - $res = $client->get('/redirect/3', [ - 'allow_redirects' => [ - 'max' => 10, - 'strict' => true, - 'referer' => true - ] - ]); - echo $res->getStatusCode(); - // 200 - -decode_content --------------- - -:Summary: Specify whether or not ``Content-Encoding`` responses (gzip, - deflate, etc.) are automatically decoded. -:Types: - - string - - bool -:Default: ``true`` - -This option can be used to control how content-encoded response bodies are -handled. By default, ``decode_content`` is set to true, meaning any gzipped -or deflated response will be decoded by Guzzle. - -When set to ``false``, the body of a response is never decoded, meaning the -bytes pass through the handler unchanged. - -.. code-block:: php - - // Request gzipped data, but do not decode it while downloading - $client->get('/foo.js', [ - 'headers' => ['Accept-Encoding' => 'gzip'], - 'decode_content' => false - ]); - -When set to a string, the bytes of a response are decoded and the string value -provided to the ``decode_content`` option is passed as the ``Accept-Encoding`` -header of the request. - -.. code-block:: php - - // Pass "gzip" as the Accept-Encoding header. - $client->get('/foo.js', ['decode_content' => 'gzip']); - -.. _save_to-option: - -save_to -------- - -:Summary: Specify where the body of a response will be saved. -:Types: - - string - - ``fopen()`` resource - - ``GuzzleHttp\Stream\StreamInterface`` -:Default: PHP temp stream - -Pass a string to specify the path to a file that will store the contents of the -response body: - -.. code-block:: php - - $client->get('/stream/20', ['save_to' => '/path/to/file']); - -Pass a resource returned from ``fopen()`` to write the response to a PHP stream: - -.. code-block:: php - - $resource = fopen('/path/to/file', 'w'); - $client->get('/stream/20', ['save_to' => $resource]); - -Pass a ``GuzzleHttp\Stream\StreamInterface`` object to stream the response body -to an open Guzzle stream: - -.. code-block:: php - - $resource = fopen('/path/to/file', 'w'); - $stream = GuzzleHttp\Stream\Stream::factory($resource); - $client->get('/stream/20', ['save_to' => $stream]); - -.. _events-option: - -events ------- - -:Summary: An associative array mapping event names to a callable. Or an - associative array containing the 'fn' key that maps to a callable, an - optional 'priority' key used to specify the event priority, and an optional - 'once' key used to specify if the event should remove itself the first time - it is triggered. -:Types: array -:Default: None - -.. code-block:: php - - use GuzzleHttp\Event\BeforeEvent; - use GuzzleHttp\Event\HeadersEvent; - use GuzzleHttp\Event\CompleteEvent; - use GuzzleHttp\Event\ErrorEvent; - - $client->get('/', [ - 'events' => [ - 'before' => function (BeforeEvent $e) { echo 'Before'; }, - 'complete' => function (CompleteEvent $e) { echo 'Complete'; }, - 'error' => function (ErrorEvent $e) { echo 'Error'; }, - ] - ]); - -Here's an example of using the associative array format for control over the -priority and whether or not an event should be triggered more than once. - -.. code-block:: php - - $client->get('/', [ - 'events' => [ - 'before' => [ - 'fn' => function (BeforeEvent $e) { echo 'Before'; }, - 'priority' => 100, - 'once' => true - ] - ] - ]); - -.. _subscribers-option: - -subscribers ------------ - -:Summary: Array of event subscribers to add to the request. Each value in the - array must be an instance of ``GuzzleHttp\Event\SubscriberInterface``. -:Types: array -:Default: None - -.. code-block:: php - - use GuzzleHttp\Subscriber\History; - use GuzzleHttp\Subscriber\Mock; - use GuzzleHttp\Message\Response; - - $history = new History(); - $mock = new Mock([new Response(200)]); - $client->get('/', ['subscribers' => [$history, $mock]]); - - echo $history; - // Outputs the request and response history - -.. _exceptions-option: - -exceptions ----------- - -:Summary: Set to ``false`` to disable throwing exceptions on an HTTP protocol - errors (i.e., 4xx and 5xx responses). Exceptions are thrown by default when - HTTP protocol errors are encountered. -:Types: bool -:Default: ``true`` - -.. code-block:: php - - $client->get('/status/500'); - // Throws a GuzzleHttp\Exception\ServerException - - $res = $client->get('/status/500', ['exceptions' => false]); - echo $res->getStatusCode(); - // 500 - -.. _timeout-option: - -timeout -------- - -:Summary: Float describing the timeout of the request in seconds. Use ``0`` - to wait indefinitely (the default behavior). -:Types: float -:Default: ``0`` - -.. code-block:: php - - // Timeout if a server does not return a response in 3.14 seconds. - $client->get('/delay/5', ['timeout' => 3.14]); - // PHP Fatal error: Uncaught exception 'GuzzleHttp\Exception\RequestException' - -.. _connect_timeout-option: - -connect_timeout ---------------- - -:Summary: Float describing the number of seconds to wait while trying to connect - to a server. Use ``0`` to wait indefinitely (the default behavior). -:Types: float -:Default: ``0`` - -.. code-block:: php - - // Timeout if the client fails to connect to the server in 3.14 seconds. - $client->get('/delay/5', ['connect_timeout' => 3.14]); - -.. note:: - - This setting must be supported by the HTTP handler used to send a request. - ``connect_timeout`` is currently only supported by the built-in cURL - handler. - -.. _verify-option: - -verify ------- - -:Summary: Describes the SSL certificate verification behavior of a request. - - - Set to ``true`` to enable SSL certificate verification and use the default - CA bundle provided by operating system. - - Set to ``false`` to disable certificate verification (this is insecure!). - - Set to a string to provide the path to a CA bundle to enable verification - using a custom certificate. -:Types: - - bool - - string -:Default: ``true`` - -.. code-block:: php - - // Use the system's CA bundle (this is the default setting) - $client->get('/', ['verify' => true]); - - // Use a custom SSL certificate on disk. - $client->get('/', ['verify' => '/path/to/cert.pem']); - - // Disable validation entirely (don't do this!). - $client->get('/', ['verify' => false]); - -Not all system's have a known CA bundle on disk. For example, Windows and -OS X do not have a single common location for CA bundles. When setting -"verify" to ``true``, Guzzle will do its best to find the most appropriate -CA bundle on your system. When using cURL or the PHP stream wrapper on PHP -versions >= 5.6, this happens by default. When using the PHP stream -wrapper on versions < 5.6, Guzzle tries to find your CA bundle in the -following order: - -1. Check if ``openssl.cafile`` is set in your php.ini file. -2. Check if ``curl.cainfo`` is set in your php.ini file. -3. Check if ``/etc/pki/tls/certs/ca-bundle.crt`` exists (Red Hat, CentOS, - Fedora; provided by the ca-certificates package) -4. Check if ``/etc/ssl/certs/ca-certificates.crt`` exists (Ubuntu, Debian; - provided by the ca-certificates package) -5. Check if ``/usr/local/share/certs/ca-root-nss.crt`` exists (FreeBSD; - provided by the ca_root_nss package) -6. Check if ``/usr/local/etc/openssl/cert.pem`` (OS X; provided by homebrew) -7. Check if ``C:\windows\system32\curl-ca-bundle.crt`` exists (Windows) -8. Check if ``C:\windows\curl-ca-bundle.crt`` exists (Windows) - -The result of this lookup is cached in memory so that subsequent calls -in the same process will return very quickly. However, when sending only -a single request per-process in something like Apache, you should consider -setting the ``openssl.cafile`` environment variable to the path on disk -to the file so that this entire process is skipped. - -If you do not need a specific certificate bundle, then Mozilla provides a -commonly used CA bundle which can be downloaded -`here `_ -(provided by the maintainer of cURL). Once you have a CA bundle available on -disk, you can set the "openssl.cafile" PHP ini setting to point to the path to -the file, allowing you to omit the "verify" request option. Much more detail on -SSL certificates can be found on the -`cURL website `_. - -.. _cert-option: - -cert ----- - -:Summary: Set to a string to specify the path to a file containing a PEM - formatted client side certificate. If a password is required, then set to - an array containing the path to the PEM file in the first array element - followed by the password required for the certificate in the second array - element. -:Types: - - string - - array -:Default: None - -.. code-block:: php - - $client->get('/', ['cert' => ['/path/server.pem', 'password']]); - -.. _ssl_key-option: - -ssl_key -------- - -:Summary: Specify the path to a file containing a private SSL key in PEM - format. If a password is required, then set to an array containing the path - to the SSL key in the first array element followed by the password required - for the certificate in the second element. -:Types: - - string - - array -:Default: None - -.. note:: - - ``ssl_key`` is implemented by HTTP handlers. This is currently only - supported by the cURL handler, but might be supported by other third-part - handlers. - -.. _proxy-option: - -proxy ------ - -:Summary: Pass a string to specify an HTTP proxy, or an array to specify - different proxies for different protocols. -:Types: - - string - - array -:Default: None - -Pass a string to specify a proxy for all protocols. - -.. code-block:: php - - $client->get('/', ['proxy' => 'tcp://localhost:8125']); - -Pass an associative array to specify HTTP proxies for specific URI schemes -(i.e., "http", "https"). - -.. code-block:: php - - $client->get('/', [ - 'proxy' => [ - 'http' => 'tcp://localhost:8125', // Use this proxy with "http" - 'https' => 'tcp://localhost:9124' // Use this proxy with "https" - ] - ]); - -.. note:: - - You can provide proxy URLs that contain a scheme, username, and password. - For example, ``"http://username:password@192.168.16.1:10"``. - -.. _debug-option: - -debug ------ - -:Summary: Set to ``true`` or set to a PHP stream returned by ``fopen()`` to - enable debug output with the handler used to send a request. For example, - when using cURL to transfer requests, cURL's verbose of ``CURLOPT_VERBOSE`` - will be emitted. When using the PHP stream wrapper, stream wrapper - notifications will be emitted. If set to true, the output is written to - PHP's STDOUT. If a PHP stream is provided, output is written to the stream. -:Types: - - bool - - ``fopen()`` resource -:Default: None - -.. code-block:: php - - $client->get('/get', ['debug' => true]); - -Running the above example would output something like the following: - -:: - - * About to connect() to httpbin.org port 80 (#0) - * Trying 107.21.213.98... * Connected to httpbin.org (107.21.213.98) port 80 (#0) - > GET /get HTTP/1.1 - Host: httpbin.org - User-Agent: Guzzle/4.0 curl/7.21.4 PHP/5.5.7 - - < HTTP/1.1 200 OK - < Access-Control-Allow-Origin: * - < Content-Type: application/json - < Date: Sun, 16 Feb 2014 06:50:09 GMT - < Server: gunicorn/0.17.4 - < Content-Length: 335 - < Connection: keep-alive - < - * Connection #0 to host httpbin.org left intact - -.. _stream-option: - -stream ------- - -:Summary: Set to ``true`` to stream a response rather than download it all - up-front. -:Types: bool -:Default: ``false`` - -.. code-block:: php - - $response = $client->get('/stream/20', ['stream' => true]); - // Read bytes off of the stream until the end of the stream is reached - $body = $response->getBody(); - while (!$body->eof()) { - echo $body->read(1024); - } - -.. note:: - - Streaming response support must be implemented by the HTTP handler used by - a client. This option might not be supported by every HTTP handler, but the - interface of the response object remains the same regardless of whether or - not it is supported by the handler. - -.. _expect-option: - -expect ------- - -:Summary: Controls the behavior of the "Expect: 100-Continue" header. -:Types: - - bool - - integer -:Default: ``1048576`` - -Set to ``true`` to enable the "Expect: 100-Continue" header for all requests -that sends a body. Set to ``false`` to disable the "Expect: 100-Continue" -header for all requests. Set to a number so that the size of the payload must -be greater than the number in order to send the Expect header. Setting to a -number will send the Expect header for all requests in which the size of the -payload cannot be determined or where the body is not rewindable. - -By default, Guzzle will add the "Expect: 100-Continue" header when the size of -the body of a request is greater than 1 MB and a request is using HTTP/1.1. - -.. note:: - - This option only takes effect when using HTTP/1.1. The HTTP/1.0 and - HTTP/2.0 protocols do not support the "Expect: 100-Continue" header. - Support for handling the "Expect: 100-Continue" workflow must be - implemented by Guzzle HTTP handlers used by a client. - -.. _version-option: - -version -------- - -:Summary: Protocol version to use with the request. -:Types: string, float -:Default: ``1.1`` - -.. code-block:: php - - // Force HTTP/1.0 - $request = $client->createRequest('GET', '/get', ['version' => 1.0]); - echo $request->getProtocolVersion(); - // 1.0 - -.. _config-option: - -config ------- - -:Summary: Associative array of config options that are forwarded to a request's - configuration collection. These values are used as configuration options - that can be consumed by plugins and handlers. -:Types: array -:Default: None - -.. code-block:: php - - $request = $client->createRequest('GET', '/get', ['config' => ['foo' => 'bar']]); - echo $request->getConfig('foo'); - // 'bar' - -Some HTTP handlers allow you to specify custom handler-specific settings. For -example, you can pass custom cURL options to requests by passing an associative -array in the ``config`` request option under the ``curl`` key. - -.. code-block:: php - - // Use custom cURL options with the request. This example uses NTLM auth - // to authenticate with a server. - $client->get('/', [ - 'config' => [ - 'curl' => [ - CURLOPT_HTTPAUTH => CURLAUTH_NTLM, - CURLOPT_USERPWD => 'username:password' - ] - ] - ]); - -future ------- - -:Summary: Specifies whether or not a response SHOULD be an instance of a - ``GuzzleHttp\Message\FutureResponse`` object. -:Types: - - bool - - string -:Default: ``false`` - -By default, Guzzle requests should be synchronous. You can create asynchronous -future responses by passing the ``future`` request option as ``true``. The -response will only be executed when it is used like a normal response, the -``wait()`` method of the response is called, or the corresponding handler that -created the response is destructing and there are futures that have not been -resolved. - -.. important:: - - This option only has an effect if your handler can create and return future - responses. However, even if a response is completed synchronously, Guzzle - will ensure that a FutureResponse object is returned for API consistency. - -.. code-block:: php - - $response = $client->get('/foo', ['future' => true]) - ->then(function ($response) { - echo 'I got a response! ' . $response; - }); - -Event Subscribers -================= - -Requests emit lifecycle events when they are transferred. A client object has a -``GuzzleHttp\Common\EventEmitter`` object that can be used to add event -*listeners* and event *subscribers* to all requests created by the client. - -.. important:: - - **Every** event listener or subscriber added to a client will be added to - every request created by the client. - -.. code-block:: php - - use GuzzleHttp\Client; - use GuzzleHttp\Event\BeforeEvent; - - $client = new Client(); - - // Add a listener that will echo out requests before they are sent - $client->getEmitter()->on('before', function (BeforeEvent $e) { - echo 'About to send request: ' . $e->getRequest(); - }); - - $client->get('http://httpbin.org/get'); - // Outputs the request as a string because of the event - -See :doc:`events` for more information on the event system used in Guzzle. - -Environment Variables -===================== - -Guzzle exposes a few environment variables that can be used to customize the -behavior of the library. - -``GUZZLE_CURL_SELECT_TIMEOUT`` - Controls the duration in seconds that a curl_multi_* handler will use when - selecting on curl handles using ``curl_multi_select()``. Some systems - have issues with PHP's implementation of ``curl_multi_select()`` where - calling this function always results in waiting for the maximum duration of - the timeout. -``HTTP_PROXY`` - Defines the proxy to use when sending requests using the "http" protocol. -``HTTPS_PROXY`` - Defines the proxy to use when sending requests using the "https" protocol. - -Relevant ini Settings ---------------------- - -Guzzle can utilize PHP ini settings when configuring clients. - -``openssl.cafile`` - Specifies the path on disk to a CA file in PEM format to use when sending - requests over "https". See: https://wiki.php.net/rfc/tls-peer-verification#phpini_defaults diff --git a/core/vendor/guzzlehttp/guzzle/docs/conf.py b/core/vendor/guzzlehttp/guzzle/docs/conf.py deleted file mode 100644 index 917bdf4..0000000 --- a/core/vendor/guzzlehttp/guzzle/docs/conf.py +++ /dev/null @@ -1,28 +0,0 @@ -import sys, os -from sphinx.highlighting import lexers -from pygments.lexers.web import PhpLexer - - -lexers['php'] = PhpLexer(startinline=True, linenos=1) -lexers['php-annotations'] = PhpLexer(startinline=True, linenos=1) -primary_domain = 'php' - -extensions = [] -templates_path = ['_templates'] -source_suffix = '.rst' -master_doc = 'index' -project = u'Guzzle' -copyright = u'2014, Michael Dowling' -version = '5.0.0' -html_title = "Guzzle Documentation" -html_short_title = "Guzzle" - -exclude_patterns = ['_build'] -html_static_path = ['_static'] - -on_rtd = os.environ.get('READTHEDOCS', None) == 'True' - -if not on_rtd: # only import and set the theme if we're building docs locally - import sphinx_rtd_theme - html_theme = 'sphinx_rtd_theme' - html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] diff --git a/core/vendor/guzzlehttp/guzzle/docs/events.rst b/core/vendor/guzzlehttp/guzzle/docs/events.rst deleted file mode 100644 index 4dae96b..0000000 --- a/core/vendor/guzzlehttp/guzzle/docs/events.rst +++ /dev/null @@ -1,508 +0,0 @@ -============ -Event System -============ - -Guzzle uses an event emitter to allow you to easily extend the behavior of a -request, change the response associated with a request, and implement custom -error handling. All events in Guzzle are managed and emitted by an -**event emitter**. - -Event Emitters -============== - -Clients, requests, and any other class that implements the -``GuzzleHttp\Common\HasEmitterInterface`` interface have a -``GuzzleHttp\Common\EventEmitter`` object. You can add event *listeners* and -event *subscribers* to an event *emitter*. - -emitter - An object that implements ``GuzzleHttp\Common\EventEmitterInterface``. This - object emits named events to event listeners. You may register event - listeners on subscribers on an emitter. - -event listeners - Callable functions that are registered on an event emitter for specific - events. Event listeners are registered on an emitter with a *priority* - setting. If no priority is provided, ``0`` is used by default. - -event subscribers - Classes that tell an event emitter what methods to listen to and what - functions on the class to invoke when the event is triggered. Event - subscribers subscribe event listeners to an event emitter. They should be - used when creating more complex event based logic in applications (i.e., - cookie handling is implemented using an event subscriber because it's - easier to share a subscriber than an anonymous function and because - handling cookies is a complex process). - -priority - Describes the order in which event listeners are invoked when an event is - emitted. The higher a priority value, the earlier the event listener will - be invoked (a higher priority means the listener is more important). If - no priority is provided, the priority is assumed to be ``0``. - - When specifying an event priority, you can pass ``"first"`` or ``"last"`` to - dynamically specify the priority based on the current event priorities - associated with the given event name in the emitter. Use ``"first"`` to set - the priority to the current highest priority plus one. Use ``"last"`` to - set the priority to the current lowest event priority minus one. It is - important to remember that these dynamic priorities are calculated only at - the point of insertion into the emitter and they are not rearranged after - subsequent listeners are added to an emitter. - -propagation - Describes whether or not other event listeners are triggered. Event - emitters will trigger every event listener registered to a specific event - in priority order until all of the listeners have been triggered **or** - until the propagation of an event is stopped. - -Getting an EventEmitter ------------------------ - -You can get the event emitter of ``GuzzleHttp\Common\HasEmitterInterface`` -object using the the ``getEmitter()`` method. Here's an example of getting a -client object's event emitter. - -.. code-block:: php - - $client = new GuzzleHttp\Client(); - $emitter = $client->getEmitter(); - -.. note:: - - You'll notice that the event emitter used in Guzzle is very similar to the - `Symfony2 EventDispatcher component `_. - This is because the Guzzle event system is based on the Symfony2 event - system with several changes. Guzzle uses its own event emitter to improve - performance, isolate Guzzle from changes to the Symfony, and provide a few - improvements that make it easier to use for an HTTP client (e.g., the - addition of the ``once()`` method). - -Adding Event Listeners ----------------------- - -After you have the emitter, you can register event listeners that listen to -specific events using the ``on()`` method. When registering an event listener, -you must tell the emitter what event to listen to (e.g., "before", "after", -"progress", "complete", "error", etc.), what callable to invoke when the -event is triggered, and optionally provide a priority. - -.. code-block:: php - - use GuzzleHttp\Event\BeforeEvent; - - $emitter->on('before', function (BeforeEvent $event) { - echo $event->getRequest(); - }); - -When a listener is triggered, it is passed an event that implements the -``GuzzleHttp\Common\EventInterface`` interface, the name of the event, and the -event emitter itself. The above example could more verbosely be written as -follows: - -.. code-block:: php - - use GuzzleHttp\Event\BeforeEvent; - - $emitter->on('before', function ( - BeforeEvent $event, - $name, - EmitterInterface $emitter - ) { - echo $event->getRequest(); - }); - -You can add an event listener that automatically removes itself after it is -triggered using the ``once()`` method of an event emitter. - -.. code-block:: php - - $client = new GuzzleHttp\Client(); - $client->getEmitter()->once('before', function () { - echo 'This will only happen once... per request!'; - }); - -Event Propagation ------------------ - -Event listeners can prevent other event listeners from being triggered by -stopping an event's propagation. - -Stopping event propagation can be useful, for example, if an event listener has -changed the state of the subject to such an extent that allowing subsequent -event listeners to be triggered could place the subject in an inconsistent -state. This technique is used in Guzzle extensively when intercepting error -events with responses. - -You can stop the propagation of an event using the ``stopPropagation()`` method -of a ``GuzzleHttp\Common\EventInterface`` object: - -.. code-block:: php - - use GuzzleHttp\Event\ErrorEvent; - - $emitter->on('error', function (ErrorEvent $event) { - $event->stopPropagation(); - }); - -After stopping the propagation of an event, any subsequent event listeners that -have not yet been triggered will not be triggered. You can check to see if the -propagation of an event was stopped using the ``isPropagationStopped()`` method -of the event. - -.. code-block:: php - - $client = new GuzzleHttp\Client(); - $emitter = $client->getEmitter(); - // Note: assume that the $errorEvent was created - if ($emitter->emit('error', $errorEvent)->isPropagationStopped()) { - echo 'It was stopped!'; - } - -.. hint:: - - When emitting events, the event that was emitted is returned from the - emitter. This allows you to easily chain calls as shown in the above - example. - -Event Subscribers ------------------ - -Event subscribers are classes that implement the -``GuzzleHttp\Common\EventSubscriberInterface`` object. They are used to register -one or more event listeners to methods of the class. Event subscribers tell -event emitters exactly which events to listen to and what method to invoke on -the class when the event is triggered by called the ``getEvents()`` method of -a subscriber. - -The following example registers event listeners to the ``before`` and -``complete`` event of a request. When the ``before`` event is emitted, the -``onBefore`` instance method of the subscriber is invoked. When the -``complete`` event is emitted, the ``onComplete`` event of the subscriber is -invoked. Each array value in the ``getEvents()`` return value MUST -contain the name of the method to invoke and can optionally contain the -priority of the listener (as shown in the ``before`` listener in the example). - -.. code-block:: php - - use GuzzleHttp\Event\EmitterInterface; - use GuzzleHttp\Event\SubscriberInterface; - use GuzzleHttp\Event\BeforeEvent; - use GuzzleHttp\Event\CompleteEvent; - - class SimpleSubscriber implements SubscriberInterface - { - public function getEvents() - { - return [ - // Provide name and optional priority - 'before' => ['onBefore', 100], - 'complete' => ['onComplete'], - // You can pass a list of listeners with different priorities - 'error' => [['beforeError', 'first'], ['afterError', 'last']] - ]; - } - - public function onBefore(BeforeEvent $event, $name) - { - echo 'Before!'; - } - - public function onComplete(CompleteEvent $event, $name) - { - echo 'Complete!'; - } - } - -.. note:: - - You can specify event priorities using integers or ``"first"`` and - ``"last"`` to dynamically determine the priority. - -Event Priorities -================ - -When adding event listeners or subscribers, you can provide an optional event -priority. This priority is used to determine how early or late a listener is -triggered. Specifying the correct priority is an important aspect of ensuring -a listener behaves as expected. For example, if you wanted to ensure that -cookies associated with a redirect were added to a cookie jar, you'd need to -make sure that the listener that collects the cookies is triggered before the -listener that performs the redirect. - -In order to help make the process of determining the correct event priority of -a listener easier, Guzzle provides several pre-determined named event -priorities. These priorities are exposed as constants on the -``GuzzleHttp\Event\RequestEvents`` object. - -last - Use ``"last"`` as an event priority to set the priority to the current - lowest event priority minus one. - -first - Use ``"first"`` as an event priority to set the priority to the current - highest priority plus one. - -``GuzzleHttp\Event\RequestEvents::EARLY`` - Used when you want a listener to be triggered as early as possible in the - event chain. - -``GuzzleHttp\Event\RequestEvents::LATE`` - Used when you want a listener to be to be triggered as late as possible in - the event chain. - -``GuzzleHttp\Event\RequestEvents::PREPARE_REQUEST`` - Used when you want a listener to be trigger while a request is being - prepared during the ``before`` event. This event priority is used by the - ``GuzzleHttp\Subscriber\Prepare`` event subscriber which is responsible for - guessing a Content-Type, Content-Length, and Expect header of a request. - You should subscribe after this event is triggered if you want to ensure - that this subscriber has already been triggered. - -``GuzzleHttp\Event\RequestEvents::SIGN_REQUEST`` - Used when you want a listener to be triggered when a request is about to be - signed. Any listener triggered at this point should expect that the request - object will no longer be mutated. If you are implementing a custom - signature subscriber, then you should use this event priority to sign - requests. - -``GuzzleHttp\Event\RequestEvents::VERIFY_RESPONSE`` - Used when you want a listener to be triggered when a response is being - validated during the ``complete`` event. The - ``GuzzleHttp\Subscriber\HttpError`` event subscriber uses this event - priority to check if an exception should be thrown due to a 4xx or 5xx - level response status code. If you are doing any kind of verification of a - response during the complete event, it should happen at this priority. - -``GuzzleHttp\Event\RequestEvents::REDIRECT_RESPONSE`` - Used when you want a listener to be triggered when a response is being - redirected during the ``complete`` event. The - ``GuzzleHttp\Subscriber\Redirect`` event subscriber uses this event - priority when performing redirects. - -You can use the above event priorities as a guideline for determining the -priority of you event listeners. You can use these constants and add to or -subtract from them to ensure that a listener happens before or after the named -priority. - -.. note:: - - "first" and "last" priorities are not adjusted after they added to an - emitter. For example, if you add a listener with a priority of "first", - you can still add subsequent listeners with a higher priority which would - be triggered before the listener added with a priority of "first". - -Working With Request Events -=========================== - -Requests emit lifecycle events when they are transferred. - -.. important:: - - Excluding the ``end`` event, request lifecycle events may be triggered - multiple times due to redirects, retries, or reusing a request multiple - times. Use the ``once()`` method want the event to be triggered once. You - can also remove an event listener from an emitter by using the emitter which - is provided to the listener. - -.. _before_event: - -before ------- - -The ``before`` event is emitted before a request is sent. The event emitted is -a ``GuzzleHttp\Event\BeforeEvent``. - -.. code-block:: php - - use GuzzleHttp\Client; - use GuzzleHttp\Common\EmitterInterface; - use GuzzleHttp\Event\BeforeEvent; - - $client = new Client(['base_url' => 'http://httpbin.org']); - $request = $client->createRequest('GET', '/'); - $request->getEmitter()->on( - 'before', - function (BeforeEvent $e, $name, EmitterInterface $emitter) { - echo $name . "\n"; - // "before" - echo $e->getRequest()->getMethod() . "\n"; - // "GET" / "POST" / "PUT" / etc. - echo get_class($e->getClient()); - // "GuzzleHttp\Client" - } - ); - -You can intercept a request with a response before the request is sent over the -wire. The ``intercept()`` method of the ``BeforeEvent`` accepts a -``GuzzleHttp\Message\ResponseInterface``. Intercepting the event will prevent -the request from being sent over the wire and stops the propagation of the -``before`` event, preventing subsequent event listeners from being invoked. - -.. code-block:: php - - use GuzzleHttp\Client; - use GuzzleHttp\Event\BeforeEvent; - use GuzzleHttp\Message\Response; - - $client = new Client(['base_url' => 'http://httpbin.org']); - $request = $client->createRequest('GET', '/status/500'); - $request->getEmitter()->on('before', function (BeforeEvent $e) { - $response = new Response(200); - $e->intercept($response); - }); - - $response = $client->send($request); - echo $response->getStatusCode(); - // 200 - -.. attention:: - - Any exception encountered while executing the ``before`` event will trigger - the ``error`` event of a request. - -.. _complete_event: - -complete --------- - -The ``complete`` event is emitted after a transaction completes and an entire -response has been received. The event is a ``GuzzleHttp\Event\CompleteEvent``. - -You can intercept the ``complete`` event with a different response if needed -using the ``intercept()`` method of the event. This can be useful, for example, -for changing the response for caching. - -.. code-block:: php - - use GuzzleHttp\Client; - use GuzzleHttp\Event\CompleteEvent; - use GuzzleHttp\Message\Response; - - $client = new Client(['base_url' => 'http://httpbin.org']); - $request = $client->createRequest('GET', '/status/302'); - $cachedResponse = new Response(200); - - $request->getEmitter()->on( - 'complete', - function (CompleteEvent $e) use ($cachedResponse) { - if ($e->getResponse()->getStatusCode() == 302) { - // Intercept the original transaction with the new response - $e->intercept($cachedResponse); - } - } - ); - - $response = $client->send($request); - echo $response->getStatusCode(); - // 200 - -.. attention:: - - Any ``GuzzleHttp\Exception\RequestException`` encountered while executing - the ``complete`` event will trigger the ``error`` event of a request. - -.. _error_event: - -error ------ - -The ``error`` event is emitted when a request fails (whether it's from a -networking error or an HTTP protocol error). The event emitted is a -``GuzzleHttp\Event\ErrorEvent``. - -This event is useful for retrying failed requests. Here's an example of -retrying failed basic auth requests by re-sending the original request with -a username and password. - -.. code-block:: php - - use GuzzleHttp\Client; - use GuzzleHttp\Event\ErrorEvent; - - $client = new Client(['base_url' => 'http://httpbin.org']); - $request = $client->createRequest('GET', '/basic-auth/foo/bar'); - $request->getEmitter()->on('error', function (ErrorEvent $e) { - if ($e->getResponse()->getStatusCode() == 401) { - // Add authentication stuff as needed and retry the request - $e->getRequest()->setHeader('Authorization', 'Basic ' . base64_encode('foo:bar')); - // Get the client of the event and retry the request - $newResponse = $e->getClient()->send($e->getRequest()); - // Intercept the original transaction with the new response - $e->intercept($newResponse); - } - }); - -.. attention:: - - If an ``error`` event is intercepted with a response, then the ``complete`` - event of a request is triggered. If the ``complete`` event fails, then the - ``error`` event is triggered once again. - -.. _progress_event: - -progress --------- - -The ``progress`` event is emitted when data is uploaded or downloaded. The -event emitted is a ``GuzzleHttp\Event\ProgressEvent``. - -You can access the emitted progress values using the corresponding public -properties of the event object: - -- ``$downloadSize``: The number of bytes that will be downloaded (if known) -- ``$downloaded``: The number of bytes that have been downloaded -- ``$uploadSize``: The number of bytes that will be uploaded (if known) -- ``$uploaded``: The number of bytes that have been uploaded - -This event cannot be intercepted. - -.. code-block:: php - - use GuzzleHttp\Client; - use GuzzleHttp\Event\ProgressEvent; - - $client = new Client(['base_url' => 'http://httpbin.org']); - $request = $client->createRequest('PUT', '/put', [ - 'body' => str_repeat('.', 100000) - ]); - - $request->getEmitter()->on('progress', function (ProgressEvent $e) { - echo 'Downloaded ' . $e->downloaded . ' of ' . $e->downloadSize . ' ' - . 'Uploaded ' . $e->uploaded . ' of ' . $e->uploadSize . "\r"; - }); - - $client->send($request); - echo "\n"; - -.. _end_event: - -end ---- - -The ``end`` event is a terminal event, emitted once per request, that provides -access to the repsonse that was received or the exception that was encountered. -The event emitted is a ``GuzzleHttp\Event\EndEvent``. - -This event can be intercepted, but keep in mind that the ``complete`` event -will not fire after intercepting this event. - -.. code-block:: php - - use GuzzleHttp\Client; - use GuzzleHttp\Event\EndEvent; - - $client = new Client(['base_url' => 'http://httpbin.org']); - $request = $client->createRequest('PUT', '/put', [ - 'body' => str_repeat('.', 100000) - ]); - - $request->getEmitter()->on('end', function (EndEvent $e) { - if ($e->getException()) { - echo 'Error: ' . $e->getException()->getMessage(); - } else { - echo 'Response: ' . $e->getResponse(); - } - }); - - $client->send($request); - echo "\n"; diff --git a/core/vendor/guzzlehttp/guzzle/docs/faq.rst b/core/vendor/guzzlehttp/guzzle/docs/faq.rst deleted file mode 100644 index 8457c7e..0000000 --- a/core/vendor/guzzlehttp/guzzle/docs/faq.rst +++ /dev/null @@ -1,199 +0,0 @@ -=== -FAQ -=== - -Why should I use Guzzle? -======================== - -Guzzle makes it easy to send HTTP requests and super simple to integrate with -web services. Guzzle manages things like persistent connections, represents -query strings as collections, makes it simple to send streaming POST requests -with fields and files, and abstracts away the underlying HTTP transport layer. -By providing an object oriented interface for HTTP clients, requests, responses, -headers, and message bodies, Guzzle makes it so that you no longer need to fool -around with cURL options, stream contexts, or sockets. - -**Asynchronous and Synchronous Requests** - -Guzzle allows you to send both asynchronous and synchronous requests using the -same interface and no direct dependency on an event loop. This flexibility -allows Guzzle to send an HTTP request using the most appropriate HTTP handler -based on the request being sent. For example, when sending synchronous -requests, Guzzle will by default send requests using cURL easy handles to -ensure you're using the fastest possible method for serially transferring HTTP -requests. When sending asynchronous requests, Guzzle might use cURL's multi -interface or any other asynchronous handler you configure. When you request -streaming data, Guzzle will by default use PHP's stream wrapper. - -**Streams** - -Request and response message bodies use :doc:`Guzzle Streams `, -allowing you to stream data without needing to load it all into memory. -Guzzle's stream layer provides a large suite of functionality: - -- You can modify streams at runtime using custom or a number of - pre-made decorators. -- You can emit progress events as data is read from a stream. -- You can validate the integrity of a stream using a rolling hash as data is - read from a stream. - -**Event System and Plugins** - -Guzzle's event system allows you to completely modify the behavior of a client -or request at runtime to cater them for any API. You can send a request with a -client, and the client can do things like automatically retry your request if -it fails, automatically redirect, log HTTP messages that are sent over the -wire, emit progress events as data is uploaded and downloaded, sign requests -using OAuth 1.0, verify the integrity of messages before and after they are -sent over the wire, and anything else you might need. - -**Testable** - -Another important aspect of Guzzle is that it's really -:doc:`easy to test clients `. You can mock HTTP responses and when -testing an handler implementation, Guzzle provides a mock node.js web server. - -**Ecosystem** - -Guzzle has a large `ecosystem of plugins `_, -including `service descriptions `_ -which allows you to abstract web services using service descriptions. These -service descriptions define how to serialize an HTTP request and how to parse -an HTTP response into a more meaningful model object. - -- `Guzzle Command `_: Provides the building - blocks for service description abstraction. -- `Guzzle Services `_: Provides an - implementation of "Guzzle Command" that utlizes Guzzle's service description - format. - -Does Guzzle require cURL? -========================= - -No. Guzzle can use any HTTP handler to send requests. This means that Guzzle -can be used with cURL, PHP's stream wrapper, sockets, and non-blocking libraries -like `React `_. You just need to configure a -`RingPHP `_ handler to use a -different method of sending requests. - -.. note:: - - Guzzle has historically only utilized cURL to send HTTP requests. cURL is - an amazing HTTP client (arguably the best), and Guzzle will continue to use - it by default when it is available. It is rare, but some developers don't - have cURL installed on their systems or run into version specific issues. - By allowing swappable HTTP handlers, Guzzle is now much more customizable - and able to adapt to fit the needs of more developers. - -Can Guzzle send asynchronous requests? -====================================== - -Yes. Pass the ``future`` true request option to a request to send it -asynchronously. Guzzle will then return a ``GuzzleHttp\Message\FutureResponse`` -object that can be used synchronously by accessing the response object like a -normal response, and it can be used asynchronoulsy using a promise that is -notified when the response is resolved with a real response or rejected with an -exception. - -.. code-block:: php - - $request = $client->createRequest('GET', ['future' => true]); - $client->send($request)->then(function ($response) { - echo 'Got a response! ' . $response; - }); - -You can force an asynchronous response to complete using the ``wait()`` method -of a response. - -.. code-block:: php - - $request = $client->createRequest('GET', ['future' => true]); - $futureResponse = $client->send($request); - $futureResponse->wait(); - -How can I add custom cURL options? -================================== - -cURL offer a huge number of `customizable options `_. -While Guzzle normalizes many of these options across different handlers, there -are times when you need to set custom cURL options. This can be accomplished -by passing an associative array of cURL settings in the **curl** key of the -**config** request option. - -For example, let's say you need to customize the outgoing network interface -used with a client. - -.. code-block:: php - - $client->get('/', [ - 'config' => [ - 'curl' => [ - CURLOPT_INTERFACE => 'xxx.xxx.xxx.xxx' - ] - ] - ]); - -How can I add custom stream context options? -============================================ - -You can pass custom `stream context options `_ -using the **stream_context** key of the **config** request option. The -**stream_context** array is an associative array where each key is a PHP -transport, and each value is an associative array of transport options. - -For example, let's say you need to customize the outgoing network interface -used with a client and allow self-signed certificates. - -.. code-block:: php - - $client->get('/', [ - 'stream' => true, - 'config' => [ - 'stream_context' => [ - 'ssl' => [ - 'allow_self_signed' => true - ], - 'socket' => [ - 'bindto' => 'xxx.xxx.xxx.xxx' - ] - ] - ] - ]); - -Why am I getting an SSL verification error? -=========================================== - -You need to specify the path on disk to the CA bundle used by Guzzle for -verifying the peer certificate. See :ref:`verify-option`. - -What is this Maximum function nesting error? -============================================ - - Maximum function nesting level of '100' reached, aborting - -You could run into this error if you have the XDebug extension installed and -you execute a lot of requests in callbacks. This error message comes -specifically from the XDebug extension. PHP itself does not have a function -nesting limit. Change this setting in your php.ini to increase the limit:: - - xdebug.max_nesting_level = 1000 - -Why am I getting a 417 error response? -====================================== - -This can occur for a number of reasons, but if you are sending PUT, POST, or -PATCH requests with an ``Expect: 100-Continue`` header, a server that does not -support this header will return a 417 response. You can work around this by -setting the ``expect`` request option to ``false``: - -.. code-block:: php - - $client = new GuzzleHttp\Client(); - - // Disable the expect header on a single request - $response = $client->put('/', [], 'the body', [ - 'expect' => false - ]); - - // Disable the expect header on all client requests - $client->setDefaultOption('expect', false) diff --git a/core/vendor/guzzlehttp/guzzle/docs/handlers.rst b/core/vendor/guzzlehttp/guzzle/docs/handlers.rst deleted file mode 100644 index d452003..0000000 --- a/core/vendor/guzzlehttp/guzzle/docs/handlers.rst +++ /dev/null @@ -1,43 +0,0 @@ -================ -RingPHP Handlers -================ - -Guzzle uses RingPHP handlers to send HTTP requests over the wire. -RingPHP provides a low-level library that can be used to "glue" Guzzle with -any transport method you choose. By default, Guzzle utilizes cURL and PHP's -stream wrappers to send HTTP requests. - -RingPHP handlers makes it extremely simple to integrate Guzzle with any -HTTP transport. For example, you could quite easily bridge Guzzle and React -to use Guzzle in React's event loop. - -Using a handler ---------------- - -You can change the handler used by a client using the ``handler`` option in the -``GuzzleHttp\Client`` constructor. - -.. code-block:: php - - use GuzzleHttp\Client; - use GuzzleHttp\Ring\Client\MockHandler; - - // Create a mock handler that always returns a 200 response. - $handler = new MockHandler(['status' => 200]); - - // Configure to client to use the mock handler. - $client = new Client(['handler' => $handler]); - -At its core, handlers are simply PHP callables that accept a request array -and return a ``GuzzleHttp\Ring\Future\FutureArrayInterface``. This future array -can be used just like a normal PHP array, causing it to block, or you can use -the promise interface using the ``then()`` method of the future. Guzzle hooks -up to the RingPHP project using a very simple bridge class -(``GuzzleHttp\RingBridge``). - -Creating a handler ------------------- - -See the `RingPHP `_ project -documentation for more information on creating custom handlers that can be -used with Guzzle clients. diff --git a/core/vendor/guzzlehttp/guzzle/docs/http-messages.rst b/core/vendor/guzzlehttp/guzzle/docs/http-messages.rst deleted file mode 100644 index 4144dc4..0000000 --- a/core/vendor/guzzlehttp/guzzle/docs/http-messages.rst +++ /dev/null @@ -1,483 +0,0 @@ -============================= -Request and Response Messages -============================= - -Guzzle is an HTTP client that sends HTTP requests to a server and receives HTTP -responses. Both requests and responses are referred to as messages. - -Headers -======= - -Both request and response messages contain HTTP headers. - -Complex Headers ---------------- - -Some headers contain additional key value pair information. For example, Link -headers contain a link and several key value pairs: - -:: - - ; rel="thing"; type="image/jpeg" - -Guzzle provides a convenience feature that can be used to parse these types of -headers: - -.. code-block:: php - - use GuzzleHttp\Message\Request; - - $request = new Request('GET', '/', [ - 'Link' => '; rel="front"; type="image/jpeg"' - ]); - - $parsed = Request::parseHeader($request, 'Link'); - var_export($parsed); - -Will output: - -.. code-block:: php - - array ( - 0 => - array ( - 0 => '', - 'rel' => 'front', - 'type' => 'image/jpeg', - ), - ) - -The result contains a hash of key value pairs. Header values that have no key -(i.e., the link) are indexed numerically while headers parts that form a key -value pair are added as a key value pair. - -See :ref:`headers` for information on how the headers of a request and response -can be accessed and modified. - -Body -==== - -Both request and response messages can contain a body. - -You can check to see if a request or response has a body using the -``getBody()`` method: - -.. code-block:: php - - $response = GuzzleHttp\get('http://httpbin.org/get'); - if ($response->getBody()) { - echo $response->getBody(); - // JSON string: { ... } - } - -The body used in request and response objects is a -``GuzzleHttp\Stream\StreamInterface``. This stream is used for both uploading -data and downloading data. Guzzle will, by default, store the body of a message -in a stream that uses PHP temp streams. When the size of the body exceeds -2 MB, the stream will automatically switch to storing data on disk rather than -in memory (protecting your application from memory exhaustion). - -You can change the body used in a request or response using the ``setBody()`` -method: - -.. code-block:: php - - use GuzzleHttp\Stream\Stream; - $request = $client->createRequest('PUT', 'http://httpbin.org/put'); - $request->setBody(Stream::factory('foo')); - -The easiest way to create a body for a request is using the static -``GuzzleHttp\Stream\Stream::factory()`` method. This method accepts various -inputs like strings, resources returned from ``fopen()``, and other -``GuzzleHttp\Stream\StreamInterface`` objects. - -The body of a request or response can be cast to a string or you can read and -write bytes off of the stream as needed. - -.. code-block:: php - - use GuzzleHttp\Stream\Stream; - $request = $client->createRequest('PUT', 'http://httpbin.org/put', ['body' => 'testing...']); - - echo $request->getBody()->read(4); - // test - echo $request->getBody()->read(4); - // ing. - echo $request->getBody()->read(1024); - // .. - var_export($request->eof()); - // true - -You can find out more about Guzzle stream objects in :doc:`streams`. - -Requests -======== - -Requests are sent from a client to a server. Requests include the method to -be applied to a resource, the identifier of the resource, and the protocol -version to use. - -Clients are used to create request messages. More precisely, clients use -a ``GuzzleHttp\Message\MessageFactoryInterface`` to create request messages. -You create requests with a client using the ``createRequest()`` method. - -.. code-block:: php - - // Create a request but don't send it immediately - $request = $client->createRequest('GET', 'http://httpbin.org/get'); - -Request Methods ---------------- - -When creating a request, you are expected to provide the HTTP method you wish -to perform. You can specify any method you'd like, including a custom method -that might not be part of RFC 7231 (like "MOVE"). - -.. code-block:: php - - // Create a request using a completely custom HTTP method - $request = $client->createRequest('MOVE', 'http://httpbin.org/move', ['exceptions' => false]); - - echo $request->getMethod(); - // MOVE - - $response = $client->send($request); - echo $response->getStatusCode(); - // 405 - -You can create and send a request using methods on a client that map to the -HTTP method you wish to use. - -:GET: ``$client->get('http://httpbin.org/get', [/** options **/])`` -:POST: ``$client->post('http://httpbin.org/post', [/** options **/])`` -:HEAD: ``$client->head('http://httpbin.org/get', [/** options **/])`` -:PUT: ``$client->put('http://httpbin.org/put', [/** options **/])`` -:DELETE: ``$client->delete('http://httpbin.org/delete', [/** options **/])`` -:OPTIONS: ``$client->options('http://httpbin.org/get', [/** options **/])`` -:PATCH: ``$client->patch('http://httpbin.org/put', [/** options **/])`` - -.. code-block:: php - - $response = $client->patch('http://httpbin.org/patch', ['body' => 'content']); - -Request URI ------------ - -The resource you are requesting with an HTTP request is identified by the -path of the request, the query string, and the "Host" header of the request. - -When creating a request, you can provide the entire resource URI as a URL. - -.. code-block:: php - - $response = $client->get('http://httbin.org/get?q=foo'); - -Using the above code, you will send a request that uses ``httpbin.org`` as -the Host header, sends the request over port 80, uses ``/get`` as the path, -and sends ``?q=foo`` as the query string. All of this is parsed automatically -from the provided URI. - -Sometimes you don't know what the entire request will be when it is created. -In these cases, you can modify the request as needed before sending it using -the ``createRequest()`` method of the client and methods on the request that -allow you to change it. - -.. code-block:: php - - $request = $client->createRequest('GET', 'http://httbin.org'); - -You can change the path of the request using ``setPath()``: - -.. code-block:: php - - $request->setPath('/get'); - echo $request->getPath(); - // /get - echo $request->getUrl(); - // http://httpbin.com/get - -Scheme -~~~~~~ - -The `scheme `_ of a request -specifies the protocol to use when sending the request. When using Guzzle, the -scheme can be set to "http" or "https". - -You can change the scheme of the request using the ``setScheme()`` method: - -.. code-block:: php - - $request = $client->createRequest('GET', 'http://httbin.org'); - $request->setScheme('https'); - echo $request->getScheme(); - // https - echo $request->getUrl(); - // https://httpbin.com/get - -Port -~~~~ - -No port is necessary when using the "http" or "https" schemes, but you can -override the port using ``setPort()``. If you need to modify the port used with -the specified scheme from the default setting, then you must use the -``setPort()`` method. - -.. code-block:: php - - $request = $client->createRequest('GET', 'http://httbin.org'); - $request->setPort(8080); - echo $request->getPort(); - // 8080 - echo $request->getUrl(); - // https://httpbin.com:8080/get - - // Set the port back to the default value for the scheme - $request->setPort(443); - echo $request->getUrl(); - // https://httpbin.com/get - -Query string -~~~~~~~~~~~~ - -You can get the query string of the request using the ``getQuery()`` method. -This method returns a ``GuzzleHttp\Query`` object. A Query object can be -accessed like a PHP array, iterated in a foreach statement like a PHP array, -and cast to a string. - -.. code-block:: php - - $request = $client->createRequest('GET', 'http://httbin.org'); - $query = $request->getQuery(); - $query['foo'] = 'bar'; - $query['baz'] = 'bam'; - $query['bam'] = ['test' => 'abc']; - - echo $request->getQuery(); - // foo=bar&baz=bam&bam%5Btest%5D=abc - - echo $request->getQuery()['foo']; - // bar - echo $request->getQuery()->get('foo'); - // bar - echo $request->getQuery()->get('foo'); - // bar - - var_export($request->getQuery()['bam']); - // array('test' => 'abc') - - foreach ($query as $key => $value) { - var_export($value); - } - - echo $request->getUrl(); - // https://httpbin.com/get?foo=bar&baz=bam&bam%5Btest%5D=abc - -Query Aggregators -^^^^^^^^^^^^^^^^^ - -Query objects can store scalar values or arrays of values. When an array of -values is added to a query object, the query object uses a query aggregator to -convert the complex structure into a string. Query objects will use -`PHP style query strings `_ when complex -query string parameters are converted to a string. You can customize how -complex query string parameters are aggregated using the ``setAggregator()`` -method of a query string object. - -.. code-block:: php - - $query->setAggregator($query::duplicateAggregator()); - -In the above example, we've changed the query object to use the -"duplicateAggregator". This aggregator will allow duplicate entries to appear -in a query string rather than appending "[n]" to each value. So if you had a -query string with ``['a' => ['b', 'c']]``, the duplicate aggregator would -convert this to "a=b&a=c" while the default aggregator would convert this to -"a[0]=b&a[1]=c" (with urlencoded brackets). - -The ``setAggregator()`` method accepts a ``callable`` which is used to convert -a deeply nested array of query string variables into a flattened array of key -value pairs. The callable accepts an array of query data and returns a -flattened array of key value pairs where each value is an array of strings. -You can use the ``GuzzleHttp\Query::walkQuery()`` static function to easily -create custom query aggregators. - -Host -~~~~ - -You can change the host header of the request in a predictable way using the -``setHost()`` method of a request: - -.. code-block:: php - - $request->setHost('www.google.com'); - echo $request->getHost(); - // www.google.com - echo $request->getUrl(); - // https://www.google.com/get?foo=bar&baz=bam - -.. note:: - - The Host header can also be changed by modifying the Host header of a - request directly, but modifying the Host header directly could result in - sending a request to a different Host than what is specified in the Host - header (sometimes this is actually the desired behavior). - -Resource -~~~~~~~~ - -You can use the ``getResource()`` method of a request to return the path and -query string of a request in a single string. - -.. code-block:: php - - $request = $client->createRequest('GET', 'http://httpbin.org/get?baz=bar'); - echo $request->getResource(); - // /get?baz=bar - -Request Config --------------- - -Request messages contain a configuration collection that can be used by -event listeners and HTTP handlers to modify how a request behaves or is -transferred over the wire. For example, many of the request options that are -specified when creating a request are actually set as config options that are -only acted upon by handlers and listeners when the request is sent. - -You can get access to the request's config object using the ``getConfig()`` -method of a request. - -.. code-block:: php - - $request = $client->createRequest('GET', '/'); - $config = $request->getConfig(); - -The config object is a ``GuzzleHttp\Common\Collection`` object that acts like -an associative array. You can grab values from the collection using array like -access. You can also modify and remove values using array like access. - -.. code-block:: php - - $config['foo'] = 'bar'; - echo $config['foo']; - // bar - - var_export(isset($config['foo'])); - // true - - unset($config['foo']); - var_export(isset($config['foo'])); - // false - - var_export($config['foo']); - // NULL - -HTTP handlers and event listeners can expose additional customization options -through request config settings. For example, in order to specify custom cURL -options to the cURL handler, you need to specify an associative array in the -``curl`` ``config`` request option. - -.. code-block:: php - - $client->get('/', [ - 'config' => [ - 'curl' => [ - CURLOPT_HTTPAUTH => CURLAUTH_NTLM, - CURLOPT_USERPWD => 'username:password' - ] - ] - ]); - -Consult the HTTP handlers and event listeners you are using to see if they -allow customization through request configuration options. - -Event Emitter -------------- - -Request objects implement ``GuzzleHttp\Common\HasEmitterInterface``, so they -have a method called ``getEmitter()`` that can be used to get an event emitter -used by the request. Any listener or subscriber attached to a request will only -be triggered for the lifecycle events of a specific request. Conversely, adding -an event listener or subscriber to a client will listen to all lifecycle events -of all requests created by the client. - -See :doc:`events` for more information. - -Responses -========= - -Responses are the HTTP messages a client receives from a server after sending -an HTTP request message. - -Start-Line ----------- - -The start-line of a response contains the protocol and protocol version, -status code, and reason phrase. - -.. code-block:: php - - $response = GuzzleHttp\get('http://httpbin.org/get'); - echo $response->getStatusCode(); - // 200 - echo $response->getReasonPhrase(); - // OK - echo $response->getProtocolVersion(); - // 1.1 - -Body ----- - -As described earlier, you can get the body of a response using the -``getBody()`` method. - -.. code-block:: php - - if ($body = $response->getBody()) { - echo $body; - // Cast to a string: { ... } - $body->seek(0); - // Rewind the body - $body->read(1024); - // Read bytes of the body - } - -When working with JSON responses, you can use the ``json()`` method of a -response: - -.. code-block:: php - - $json = $response->json(); - -.. note:: - - Guzzle uses the ``json_decode()`` method of PHP and uses arrays rather than - ``stdClass`` objects for objects. - -You can use the ``xml()`` method when working with XML data. - -.. code-block:: php - - $xml = $response->xml(); - -.. note:: - - Guzzle uses the ``SimpleXMLElement`` objects when converting response - bodies to XML. - -Effective URL -------------- - -The URL that was ultimately accessed that returned a response can be accessed -using the ``getEffectiveUrl()`` method of a response. This method will return -the URL of a request or the URL of the last redirected URL if any redirects -occurred while transferring a request. - -.. code-block:: php - - $response = GuzzleHttp\get('http://httpbin.org/get'); - echo $response->getEffectiveUrl(); - // http://httpbin.org/get - - $response = GuzzleHttp\get('http://httpbin.org/redirect-to?url=http://www.google.com'); - echo $response->getEffectiveUrl(); - // http://www.google.com diff --git a/core/vendor/guzzlehttp/guzzle/docs/index.rst b/core/vendor/guzzlehttp/guzzle/docs/index.rst deleted file mode 100644 index d456a5f..0000000 --- a/core/vendor/guzzlehttp/guzzle/docs/index.rst +++ /dev/null @@ -1,98 +0,0 @@ -.. title:: Guzzle | PHP HTTP client and framework for consuming RESTful web services - -====== -Guzzle -====== - -Guzzle is a PHP HTTP client that makes it easy to send HTTP requests and -trivial to integrate with web services. - -- Manages things like persistent connections, represents query strings as - collections, simplifies sending streaming POST requests with fields and - files, and abstracts away the underlying HTTP transport layer. -- Can send both synchronous and asynchronous requests using the same interface - without requiring a dependency on a specific event loop. -- Pluggable HTTP handlers allows Guzzle to integrate with any method you choose - for sending HTTP requests over the wire (e.g., cURL, sockets, PHP's stream - wrapper, non-blocking event loops like `React `_, etc.). -- Guzzle makes it so that you no longer need to fool around with cURL options, - stream contexts, or sockets. - -.. code-block:: php - - $client = new GuzzleHttp\Client(); - $response = $client->get('http://guzzlephp.org'); - $res = $client->get('https://api.github.com/user', ['auth' => ['user', 'pass']]); - echo $res->getStatusCode(); - // "200" - echo $res->getHeader('content-type'); - // 'application/json; charset=utf8' - echo $res->getBody(); - // {"type":"User"...' - var_export($res->json()); - // Outputs the JSON decoded data - - // Send an asynchronous request. - $req = $client->createRequest('GET', 'http://httpbin.org', ['future' => true]); - $client->send($req)->then(function ($response) { - echo 'I completed! ' . $response; - }); - -User guide ----------- - -.. toctree:: - :maxdepth: 2 - - overview - quickstart - clients - http-messages - events - streams - handlers - testing - faq - -HTTP Components ---------------- - -There are a number of optional libraries you can use along with Guzzle's HTTP -layer to add capabilities to the client. - -`Log Subscriber `_ - Logs HTTP requests and responses sent over the wire using customizable - log message templates. - -`OAuth Subscriber `_ - Signs requests using OAuth 1.0. - -`Cache Subscriber `_ - Implements a private transparent proxy cache that caches HTTP responses. - -`Retry Subscriber `_ - Retries failed requests using customizable retry strategies (e.g., retry - based on response status code, cURL error codes, etc.) - -`Message Integrity Subscriber `_ - Verifies the message integrity of HTTP responses using customizable - validators. This plugin can be used, for example, to verify the Content-MD5 - headers of responses. - -Service Description Commands ----------------------------- - -You can use the **Guzzle Command** library to encapsulate interaction with a -web service using command objects. Building on top of Guzzle's command -abstraction allows you to easily implement things like service description that -can be used to serialize requests and parse responses using a meta-description -of a web service. - -`Guzzle Command `_ - Provides the foundational elements used to build high-level, command based, - web service clients with Guzzle. - -`Guzzle Services `_ - Provides an implementation of the *Guzzle Command* library that uses - Guzzle service descriptions to describe web services, serialize requests, - and parse responses into easy to use model structures. diff --git a/core/vendor/guzzlehttp/guzzle/docs/overview.rst b/core/vendor/guzzlehttp/guzzle/docs/overview.rst deleted file mode 100644 index 1355afa..0000000 --- a/core/vendor/guzzlehttp/guzzle/docs/overview.rst +++ /dev/null @@ -1,150 +0,0 @@ -======== -Overview -======== - -Requirements -============ - -#. PHP 5.4.0 -#. To use the PHP stream handler, ``allow_url_fopen`` must be enabled in your - system's php.ini. -#. To use the cURL handler, you must have a recent version of cURL >= 7.16.2 - compiled with OpenSSL and zlib. - -.. note:: - - Guzzle no longer requires cURL in order to send HTTP requests. Guzzle will - use the PHP stream wrapper to send HTTP requests if cURL is not installed. - Alternatively, you can provide your own HTTP handler used to send requests. - -.. _installation: - -Installation -============ - -The recommended way to install Guzzle is with `Composer `_. Composer is a dependency -management tool for PHP that allows you to declare the dependencies your project needs and installs them into your -project. - -.. code-block:: bash - - # Install Composer - curl -sS https://getcomposer.org/installer | php - -You can add Guzzle as a dependency using the composer.phar CLI: - -.. code-block:: bash - - php composer.phar require guzzlehttp/guzzle:~5.0 - -Alternatively, you can specify Guzzle as a dependency in your project's -existing composer.json file: - -.. code-block:: js - - { - "require": { - "guzzlehttp/guzzle": "~5.0" - } - } - -After installing, you need to require Composer's autoloader: - -.. code-block:: php - - require 'vendor/autoload.php'; - -You can find out more on how to install Composer, configure autoloading, and -other best-practices for defining dependencies at `getcomposer.org `_. - -Bleeding edge -------------- - -During your development, you can keep up with the latest changes on the master -branch by setting the version requirement for Guzzle to ``~5.0@dev``. - -.. code-block:: js - - { - "require": { - "guzzlehttp/guzzle": "~5.0@dev" - } - } - -License -======= - -Licensed using the `MIT license `_. - - Copyright (c) 2014 Michael Dowling - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - -Contributing -============ - -Guidelines ----------- - -1. Guzzle follows PSR-0, PSR-1, and PSR-2. -2. Guzzle is meant to be lean and fast with very few dependencies. -3. Guzzle has a minimum PHP version requirement of PHP 5.4. Pull requests must - not require a PHP version greater than PHP 5.4. -4. All pull requests must include unit tests to ensure the change works as - expected and to prevent regressions. - -Running the tests ------------------ - -In order to contribute, you'll need to checkout the source from GitHub and -install Guzzle's dependencies using Composer: - -.. code-block:: bash - - git clone https://github.com/guzzle/guzzle.git - cd guzzle && curl -s http://getcomposer.org/installer | php && ./composer.phar install --dev - -Guzzle is unit tested with PHPUnit. Run the tests using the vendored PHPUnit -binary: - -.. code-block:: bash - - vendor/bin/phpunit - -.. note:: - - You'll need to install node.js v0.5.0 or newer in order to perform - integration tests on Guzzle's HTTP handlers. - -Reporting a security vulnerability -================================== - -We want to ensure that Guzzle is a secure HTTP client library for everyone. If -you've discovered a security vulnerability in Guzzle, we appreciate your help -in disclosing it to us in a `responsible manner `_. - -Publicly disclosing a vulnerability can put the entire community at risk. If -you've discovered a security concern, please email us at -security@guzzlephp.org. We'll work with you to make sure that we understand the -scope of the issue, and that we fully address your concern. We consider -correspondence sent to security@guzzlephp.org our highest priority, and work to -address any issues that arise as quickly as possible. - -After a security vulnerability has been corrected, a security hotfix release will -be deployed as soon as possible. diff --git a/core/vendor/guzzlehttp/guzzle/docs/quickstart.rst b/core/vendor/guzzlehttp/guzzle/docs/quickstart.rst deleted file mode 100644 index 65a70ed..0000000 --- a/core/vendor/guzzlehttp/guzzle/docs/quickstart.rst +++ /dev/null @@ -1,448 +0,0 @@ -========== -Quickstart -========== - -This page provides a quick introduction to Guzzle and introductory examples. -If you have not already installed, Guzzle, head over to the :ref:`installation` -page. - -Make a Request -============== - -You can send requests with Guzzle using a ``GuzzleHttp\ClientInterface`` -object. - -Creating a Client ------------------ - -The procedural API is simple but not very testable; it's best left for quick -prototyping. If you want to use Guzzle in a more flexible and testable way, -then you'll need to use a ``GuzzleHttp\ClientInterface`` object. - -.. code-block:: php - - use GuzzleHttp\Client; - - $client = new Client(); - $response = $client->get('http://httpbin.org/get'); - - // You can use the same methods you saw in the procedural API - $response = $client->delete('http://httpbin.org/delete'); - $response = $client->head('http://httpbin.org/get'); - $response = $client->options('http://httpbin.org/get'); - $response = $client->patch('http://httpbin.org/patch'); - $response = $client->post('http://httpbin.org/post'); - $response = $client->put('http://httpbin.org/put'); - -You can create a request with a client and then send the request with the -client when you're ready. - -.. code-block:: php - - $request = $client->createRequest('GET', 'http://www.foo.com'); - $response = $client->send($request); - -Client objects provide a great deal of flexibility in how request are -transferred including default request options, subscribers that are attached -to each request, and a base URL that allows you to send requests with relative -URLs. You can find out all about clients in the :doc:`clients` page of the -documentation. - -Using Responses -=============== - -In the previous examples, we retrieved a ``$response`` variable. This value is -actually a ``GuzzleHttp\Message\ResponseInterface`` object and contains lots -of helpful information. - -You can get the status code and reason phrase of the response. - -.. code-block:: php - - $code = $response->getStatusCode(); - // 200 - - $reason = $response->getReasonPhrase(); - // OK - -By providing the ``future`` request option to a request, you can send requests -asynchronously using the promise interface of a future response. - -.. code-block:: php - - $client->get('http://httpbin.org', ['future' => true]) - ->then(function ($response) { - echo $response->getStatusCode(); - }); - -Response Body -------------- - -The body of a response can be retrieved and cast to a string. - -.. code-block:: php - - $body = $response->getBody(); - echo $body; - // { "some_json_data" ...} - -You can also read read bytes from body of a response like a stream. - -.. code-block:: php - - $body = $response->getBody(); - - while (!$body->eof()) { - echo $body->read(1024); - } - -JSON Responses -~~~~~~~~~~~~~~ - -You can more easily work with JSON responses using the ``json()`` method of a -response. - -.. code-block:: php - - $response = $client->get('http://httpbin.org/get'); - $json = $response->json(); - var_dump($json[0]['origin']); - -Guzzle internally uses PHP's ``json_decode()`` function to parse responses. If -Guzzle is unable to parse the JSON response body, then a -``GuzzleHttp\Exception\ParseException`` is thrown. - -XML Responses -~~~~~~~~~~~~~ - -You can use a response's ``xml()`` method to more easily work with responses -that contain XML data. - -.. code-block:: php - - $response = $client->get('https://github.com/mtdowling.atom'); - $xml = $response->xml(); - echo $xml->id; - // tag:github.com,2008:/mtdowling - -Guzzle internally uses a ``SimpleXMLElement`` object to parse responses. If -Guzzle is unable to parse the XML response body, then a -``GuzzleHttp\Exception\ParseException`` is thrown. - -Query String Parameters -======================= - -Sending query string parameters with a request is easy. You can set query -string parameters in the request's URL. - -.. code-block:: php - - $response = $client->get('http://httpbin.org?foo=bar'); - -You can also specify the query string parameters using the ``query`` request -option. - -.. code-block:: php - - $client->get('http://httpbin.org', [ - 'query' => ['foo' => 'bar'] - ]); - -And finally, you can build up the query string of a request as needed by -calling the ``getQuery()`` method of a request and modifying the request's -``GuzzleHttp\Query`` object as needed. - -.. code-block:: php - - $request = $client->createRequest('GET', 'http://httpbin.org'); - $query = $request->getQuery(); - $query->set('foo', 'bar'); - - // You can use the query string object like an array - $query['baz'] = 'bam'; - - // The query object can be cast to a string - echo $query; - // foo=bar&baz=bam - - // Setting a value to false or null will cause the "=" sign to be omitted - $query['empty'] = null; - echo $query; - // foo=bar&baz=bam&empty - - // Use an empty string to include the "=" sign with an empty value - $query['empty'] = ''; - echo $query; - // foo=bar&baz=bam&empty= - -.. _headers: - -Request and Response Headers ----------------------------- - -You can specify request headers when sending or creating requests with a -client. In the following example, we send the ``X-Foo-Header`` with a value of -``value`` by setting the ``headers`` request option. - -.. code-block:: php - - $response = $client->get('http://httpbin.org/get', [ - 'headers' => ['X-Foo-Header' => 'value'] - ]); - -You can view the headers of a response using header specific methods of a -response class. Headers work exactly the same way for request and response -object. - -You can retrieve a header from a request or response using the ``getHeader()`` -method of the object. This method is case-insensitive and by default will -return a string containing the header field value. - -.. code-block:: php - - $response = $client->get('http://www.yahoo.com'); - $length = $response->getHeader('Content-Length'); - -Header fields that contain multiple values can be retrieved as a string or as -an array. Retrieving the field values as a string will naively concatenate all -of the header values together with a comma. Because not all header fields -should be represented this way (e.g., ``Set-Cookie``), you can pass an optional -flag to the ``getHeader()`` method to retrieve the header values as an array. - -.. code-block:: php - - $values = $response->getHeader('Set-Cookie', true); - foreach ($values as $value) { - echo $value; - } - -You can test if a request or response has a specific header using the -``hasHeader()`` method. This method accepts a case-insensitive string and -returns true if the header is present or false if it is not. - -You can retrieve all of the headers of a message using the ``getHeaders()`` -method of a request or response. The return value is an associative array where -the keys represent the header name as it will be sent over the wire, and each -value is an array of strings associated with the header. - -.. code-block:: php - - $headers = $response->getHeaders(); - foreach ($message->getHeaders() as $name => $values) { - echo $name . ": " . implode(", ", $values); - } - -Modifying headers ------------------ - -The headers of a message can be modified using the ``setHeader()``, -``addHeader()``, ``setHeaders()``, and ``removeHeader()`` methods of a request -or response object. - -.. code-block:: php - - $request = $client->createRequest('GET', 'http://httpbin.org/get'); - - // Set a single value for a header - $request->setHeader('User-Agent', 'Testing!'); - - // Set multiple values for a header in one call - $request->setHeader('X-Foo', ['Baz', 'Bar']); - - // Add a header to the message - $request->addHeader('X-Foo', 'Bam'); - - echo $request->getHeader('X-Foo'); - // Baz, Bar, Bam - - // Remove a specific header using a case-insensitive name - $request->removeHeader('x-foo'); - echo $request->getHeader('X-Foo'); - // Echoes an empty string: '' - -Uploading Data -============== - -Guzzle provides several methods of uploading data. - -You can send requests that contain a stream of data by passing a string, -resource returned from ``fopen``, or a ``GuzzleHttp\Stream\StreamInterface`` -object to the ``body`` request option. - -.. code-block:: php - - $r = $client->post('http://httpbin.org/post', ['body' => 'raw data']); - -You can easily upload JSON data using the ``json`` request option. - -.. code-block:: php - - $r = $client->put('http://httpbin.org/put', ['json' => ['foo' => 'bar']]); - -POST Requests -------------- - -In addition to specifying the raw data of a request using the ``body`` request -option, Guzzle provides helpful abstractions over sending POST data. - -Sending POST Fields -~~~~~~~~~~~~~~~~~~~ - -Sending ``application/x-www-form-urlencoded`` POST requests requires that you -specify the body of a POST request as an array. - -.. code-block:: php - - $response = $client->post('http://httpbin.org/post', [ - 'body' => [ - 'field_name' => 'abc', - 'other_field' => '123' - ] - ]); - -You can also build up POST requests before sending them. - -.. code-block:: php - - $request = $client->createRequest('POST', 'http://httpbin.org/post'); - $postBody = $request->getBody(); - - // $postBody is an instance of GuzzleHttp\Post\PostBodyInterface - $postBody->setField('foo', 'bar'); - echo $postBody->getField('foo'); - // 'bar' - - echo json_encode($postBody->getFields()); - // {"foo": "bar"} - - // Send the POST request - $response = $client->send($request); - -Sending POST Files -~~~~~~~~~~~~~~~~~~ - -Sending ``multipart/form-data`` POST requests (POST requests that contain -files) is the same as sending ``application/x-www-form-urlencoded``, except -some of the array values of the POST fields map to PHP ``fopen`` resources, or -``GuzzleHttp\Stream\StreamInterface``, or -``GuzzleHttp\Post\PostFileInterface`` objects. - -.. code-block:: php - - use GuzzleHttp\Post\PostFile; - - $response = $client->post('http://httpbin.org/post', [ - 'body' => [ - 'field_name' => 'abc', - 'file_filed' => fopen('/path/to/file', 'r'), - 'other_file' => new PostFile('other_file', 'this is the content') - ] - ]); - -Just like when sending POST fields, you can also build up POST requests with -files before sending them. - -.. code-block:: php - - use GuzzleHttp\Post\PostFile; - - $request = $client->createRequest('POST', 'http://httpbin.org/post'); - $postBody = $request->getBody(); - $postBody->setField('foo', 'bar'); - $postBody->addFile(new PostFile('test', fopen('/path/to/file', 'r'))); - $response = $client->send($request); - -Cookies -======= - -Guzzle can maintain a cookie session for you if instructed using the -``cookies`` request option. - -- Set to ``true`` to use a shared cookie session associated with the client. -- Pass an associative array containing cookies to send in the request and start - a new cookie session. -- Set to a ``GuzzleHttp\Subscriber\CookieJar\CookieJarInterface`` object to use - an existing cookie jar. - -Redirects -========= - -Guzzle will automatically follow redirects unless you tell it not to. You can -customize the redirect behavior using the ``allow_redirects`` request option. - -- Set to true to enable normal redirects with a maximum number of 5 redirects. - This is the default setting. -- Set to false to disable redirects. -- Pass an associative array containing the 'max' key to specify the maximum - number of redirects and optionally provide a 'strict' key value to specify - whether or not to use strict RFC compliant redirects (meaning redirect POST - requests with POST requests vs. doing what most browsers do which is - redirect POST requests with GET requests). - -.. code-block:: php - - $response = $client->get('http://github.com'); - echo $response->getStatusCode(); - // 200 - echo $response->getEffectiveUrl(); - // 'https://github.com/' - -The following example shows that redirects can be disabled. - -.. code-block:: php - - $response = $client->get('http://github.com', ['allow_redirects' => false]); - echo $response->getStatusCode(); - // 301 - echo $response->getEffectiveUrl(); - // 'http://github.com/' - -Exceptions -========== - -Guzzle throws exceptions for errors that occur during a transfer. - -- In the event of a networking error (connection timeout, DNS errors, etc.), - a ``GuzzleHttp\Exception\RequestException`` is thrown. This exception - extends from ``GuzzleHttp\Exception\TransferException``. Catching this - exception will catch any exception that can be thrown while transferring - (non-parallel) requests. - - .. code-block:: php - - use GuzzleHttp\Exception\RequestException; - - try { - $client->get('https://github.com/_abc_123_404'); - } catch (RequestException $e) { - echo $e->getRequest(); - if ($e->hasResponse()) { - echo $e->getResponse(); - } - } - -- A ``GuzzleHttp\Exception\ClientException`` is thrown for 400 - level errors if the ``exceptions`` request option is set to true. This - exception extends from ``GuzzleHttp\Exception\BadResponseException`` and - ``GuzzleHttp\Exception\BadResponseException`` extends from - ``GuzzleHttp\Exception\RequestException``. - - .. code-block:: php - - use GuzzleHttp\Exception\ClientException; - - try { - $client->get('https://github.com/_abc_123_404'); - } catch (ClientException $e) { - echo $e->getRequest(); - echo $e->getResponse(); - } - -- A ``GuzzleHttp\Exception\ServerException`` is thrown for 500 level - errors if the ``exceptions`` request option is set to true. This - exception extends from ``GuzzleHttp\Exception\BadResponseException``. -- A ``GuzzleHttp\Exception\TooManyRedirectsException`` is thrown when too - many redirects are followed. This exception extends from ``GuzzleHttp\Exception\RequestException``. - -All of the above exceptions extend from -``GuzzleHttp\Exception\TransferException``. diff --git a/core/vendor/guzzlehttp/guzzle/docs/requirements.txt b/core/vendor/guzzlehttp/guzzle/docs/requirements.txt deleted file mode 100644 index fe7a4ea..0000000 --- a/core/vendor/guzzlehttp/guzzle/docs/requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ -Sphinx>=1.2b1 -guzzle_sphinx_theme>=0.6.0 diff --git a/core/vendor/guzzlehttp/guzzle/docs/streams.rst b/core/vendor/guzzlehttp/guzzle/docs/streams.rst deleted file mode 100644 index 8fe9a69..0000000 --- a/core/vendor/guzzlehttp/guzzle/docs/streams.rst +++ /dev/null @@ -1,213 +0,0 @@ -======= -Streams -======= - -Guzzle uses stream objects to represent request and response message bodies. -These stream objects allow you to work with various types of data all using a -common interface. - -HTTP messages consist of a start-line, headers, and a body. The body of an HTTP -message can be very small or extremely large. Attempting to represent the body -of a message as a string can easily consume more memory than intended because -the body must be stored completely in memory. Attempting to store the body of a -request or response in memory would preclude the use of that implementation from -being able to work with large message bodies. The StreamInterface is used in -order to hide the implementation details of where a stream of data is read from -or written to. - -Guzzle's StreamInterface exposes several methods that enable streams to be read -from, written to, and traversed effectively. - -Streams expose their capabilities using three methods: ``isReadable()``, -``isWritable()``, and ``isSeekable()``. These methods can be used by stream -collaborators to determine if a stream is capable of their requirements. - -Each stream instance has various capabilities: they can be read-only, -write-only, read-write, allow arbitrary random access (seeking forwards or -backwards to any location), or only allow sequential access (for example in the -case of a socket or pipe). - -Creating Streams -================ - -The best way to create a stream is using the static factory method, -``GuzzleHttp\Stream\Stream::factory()``. This factory accepts strings, -resources returned from ``fopen()``, an object that implements -``__toString()``, and an object that implements -``GuzzleHttp\Stream\StreamInterface``. - -.. code-block:: php - - use GuzzleHttp\Stream\Stream; - - $stream = Stream::factory('string data'); - echo $stream; - // string data - echo $stream->read(3); - // str - echo $stream->getContents(); - // ing data - var_export($stream->eof()); - // true - var_export($stream->tell()); - // 11 - -Metadata -======== - -Guzzle streams expose stream metadata through the ``getMetadata()`` method. -This method provides the data you would retrieve when calling PHP's -`stream_get_meta_data() function `_, -and can optionally expose other custom data. - -.. code-block:: php - - use GuzzleHttp\Stream\Stream; - - $resource = fopen('/path/to/file', 'r'); - $stream = Stream::factory($resource); - echo $stream->getMetadata('uri'); - // /path/to/file - var_export($stream->isReadable()); - // true - var_export($stream->isWritable()); - // false - var_export($stream->isSeekable()); - // true - -Stream Decorators -================= - -With the small and focused interface, add custom functionality to streams is -very simple with stream decorators. Guzzle provides several built-in decorators -that provide additional stream functionality. - -CachingStream -------------- - -The CachingStream is used to allow seeking over previously read bytes on -non-seekable streams. This can be useful when transferring a non-seekable -entity body fails due to needing to rewind the stream (for example, resulting -from a redirect). Data that is read from the remote stream will be buffered in -a PHP temp stream so that previously read bytes are cached first in memory, -then on disk. - -.. code-block:: php - - use GuzzleHttp\Stream\Stream; - use GuzzleHttp\Stream\CachingStream; - - $original = Stream::factory(fopen('http://www.google.com', 'r')); - $stream = new CachingStream($original); - - $stream->read(1024); - echo $stream->tell(); - // 1024 - - $stream->seek(0); - echo $stream->tell(); - // 0 - -LimitStream ------------ - -LimitStream can be used to read a subset or slice of an existing stream object. -This can be useful for breaking a large file into smaller pieces to be sent in -chunks (e.g. Amazon S3's multipart upload API). - -.. code-block:: php - - use GuzzleHttp\Stream\Stream; - use GuzzleHttp\Stream\LimitStream; - - $original = Stream::factory(fopen('/tmp/test.txt', 'r+')); - echo $original->getSize(); - // >>> 1048576 - - // Limit the size of the body to 1024 bytes and start reading from byte 2048 - $stream = new LimitStream($original, 1024, 2048); - echo $stream->getSize(); - // >>> 1024 - echo $stream->tell(); - // >>> 0 - -NoSeekStream ------------- - -NoSeekStream wraps a stream and does not allow seeking. - -.. code-block:: php - - use GuzzleHttp\Stream\Stream; - use GuzzleHttp\Stream\LimitStream; - - $original = Stream::factory('foo'); - $noSeek = new NoSeekStream($original); - - echo $noSeek->read(3); - // foo - var_export($noSeek->isSeekable()); - // false - $noSeek->seek(0); - var_export($noSeek->read(3)); - // NULL - -Creating Custom Decorators --------------------------- - -Creating a stream decorator is very easy thanks to the -``GuzzleHttp\Stream\StreamDecoratorTrait``. This trait provides methods that -implement ``GuzzleHttp\Stream\StreamInterface`` by proxying to an underlying -stream. Just ``use`` the ``StreamDecoratorTrait`` and implement your custom -methods. - -For example, let's say we wanted to call a specific function each time the last -byte is read from a stream. This could be implemented by overriding the -``read()`` method. - -.. code-block:: php - - use GuzzleHttp\Stream\StreamDecoratorTrait; - - class EofCallbackStream implements StreamInterface - { - use StreamDecoratorTrait; - - private $callback; - - public function __construct(StreamInterface $stream, callable $callback) - { - $this->stream = $stream; - $this->callback = $callback; - } - - public function read($length) - { - $result = $this->stream->read($length); - - // Invoke the callback when EOF is hit. - if ($this->eof()) { - call_user_func($this->callback); - } - - return $result; - } - } - -This decorator could be added to any existing stream and used like so: - -.. code-block:: php - - use GuzzleHttp\Stream\Stream; - - $original = Stream::factory('foo'); - $eofStream = new EofCallbackStream($original, function () { - echo 'EOF!'; - }); - - $eofStream->read(2); - $eofStream->read(1); - // echoes "EOF!" - $eofStream->seek(0); - $eofStream->read(3); - // echoes "EOF!" diff --git a/core/vendor/guzzlehttp/guzzle/docs/testing.rst b/core/vendor/guzzlehttp/guzzle/docs/testing.rst deleted file mode 100644 index e7098be..0000000 --- a/core/vendor/guzzlehttp/guzzle/docs/testing.rst +++ /dev/null @@ -1,232 +0,0 @@ -====================== -Testing Guzzle Clients -====================== - -Guzzle provides several tools that will enable you to easily mock the HTTP -layer without needing to send requests over the internet. - -* Mock subscriber -* Mock handler -* Node.js web server for integration testing - -Mock Subscriber -=============== - -When testing HTTP clients, you often need to simulate specific scenarios like -returning a successful response, returning an error, or returning specific -responses in a certain order. Because unit tests need to be predictable, easy -to bootstrap, and fast, hitting an actual remote API is a test smell. - -Guzzle provides a mock subscriber that can be attached to clients or requests -that allows you to queue up a list of responses to use rather than hitting a -remote API. - -.. code-block:: php - - use GuzzleHttp\Client; - use GuzzleHttp\Subscriber\Mock; - use GuzzleHttp\Message\Response; - - $client = new Client(); - - // Create a mock subscriber and queue two responses. - $mock = new Mock([ - new Response(200, ['X-Foo' => 'Bar']), // Use response object - "HTTP/1.1 202 OK\r\nContent-Length: 0\r\n\r\n" // Use a response string - ]); - - // Add the mock subscriber to the client. - $client->getEmitter()->attach($mock); - // The first request is intercepted with the first response. - echo $client->get('/')->getStatusCode(); - //> 200 - // The second request is intercepted with the second response. - echo $client->get('/')->getStatusCode(); - //> 202 - -When no more responses are in the queue and a request is sent, an -``OutOfBoundsException`` is thrown. - -History Subscriber -================== - -When using things like the ``Mock`` subscriber, you often need to know if the -requests you expected to send were sent exactly as you intended. While the mock -subscriber responds with mocked responses, the ``GuzzleHttp\Subscriber\History`` -subscriber maintains a history of the requests that were sent by a client. - -.. code-block:: php - - use GuzzleHttp\Client; - use GuzzleHttp\Subscriber\History; - - $client = new Client(); - $history = new History(); - - // Add the history subscriber to the client. - $client->getEmitter()->attach($history); - - $client->get('http://httpbin.org/get'); - $client->head('http://httpbin.org/get'); - - // Count the number of transactions - echo count($history); - //> 2 - // Get the last request - $lastRequest = $history->getLastRequest(); - // Get the last response - $lastRequest = $history->getLastResponse(); - - // Iterate over the transactions that were sent - foreach ($history as $transaction) { - echo $transaction['request']->getMethod(); - //> GET, HEAD - echo $transaction['response']->getStatusCode(); - //> 200, 200 - } - -The history subscriber can also be printed, revealing the requests and -responses that were sent as a string, in order. - -.. code-block:: php - - echo $history; - -:: - - > GET /get HTTP/1.1 - Host: httpbin.org - User-Agent: Guzzle/4.0-dev curl/7.21.4 PHP/5.5.8 - - < HTTP/1.1 200 OK - Access-Control-Allow-Origin: * - Content-Type: application/json - Date: Tue, 25 Mar 2014 03:53:27 GMT - Server: gunicorn/0.17.4 - Content-Length: 270 - Connection: keep-alive - - { - "headers": { - "Connection": "close", - "X-Request-Id": "3d0f7d5c-c937-4394-8248-2b8e03fcccdb", - "User-Agent": "Guzzle/4.0-dev curl/7.21.4 PHP/5.5.8", - "Host": "httpbin.org" - }, - "origin": "76.104.247.1", - "args": {}, - "url": "http://httpbin.org/get" - } - - > HEAD /get HTTP/1.1 - Host: httpbin.org - User-Agent: Guzzle/4.0-dev curl/7.21.4 PHP/5.5.8 - - < HTTP/1.1 200 OK - Access-Control-Allow-Origin: * - Content-length: 270 - Content-Type: application/json - Date: Tue, 25 Mar 2014 03:53:27 GMT - Server: gunicorn/0.17.4 - Connection: keep-alive - -Mock Adapter -============ - -In addition to using the Mock subscriber, you can use the -``GuzzleHttp\Ring\Client\MockAdapter`` as the handler of a client to return the -same response over and over or return the result of a callable function. - -Test Web Server -=============== - -Using mock responses is almost always enough when testing a web service client. -When implementing custom :doc:`HTTP handlers `, you'll need to send -actual HTTP requests in order to sufficiently test the handler. However, a -best practice is to contact a local web server rather than a server over the -internet. - -- Tests are more reliable -- Tests do not require a network connection -- Tests have no external dependencies - -Using the test server ---------------------- - -.. warning:: - - The following functionality is provided to help developers of Guzzle - develop HTTP handlers. There is no promise of backwards compatibility - when it comes to the node.js test server or the ``GuzzleHttp\Tests\Server`` - class. If you are using the test server or ``Server`` class outside of - guzzlehttp/guzzle, then you will need to configure autoloading and - ensure the web server is started manually. - -.. hint:: - - You almost never need to use this test web server. You should only ever - consider using it when developing HTTP handlers. The test web server - is not necessary for mocking requests. For that, please use the - Mock subcribers and History subscriber. - -Guzzle ships with a node.js test server that receives requests and returns -responses from a queue. The test server exposes a simple API that is used to -enqueue responses and inspect the requests that it has received. - -Any operation on the ``Server`` object will ensure that -the server is running and wait until it is able to receive requests before -returning. - -.. code-block:: php - - use GuzzleHttp\Client; - use GuzzleHttp\Tests\Server; - - // Start the server and queue a response - Server::enqueue("HTTP/1.1 200 OK\r\n\Content-Length: 0r\n\r\n"); - - $client = new Client(['base_url' => Server::$url]); - echo $client->get('/foo')->getStatusCode(); - // 200 - -``GuzzleHttp\Tests\Server`` provides a static interface to the test server. You -can queue an HTTP response or an array of responses by calling -``Server::enqueue()``. This method accepts a string representing an HTTP -response message, a ``GuzzleHttp\Message\ResponseInterface``, or an array of -HTTP message strings / ``GuzzleHttp\Message\ResponseInterface`` objects. - -.. code-block:: php - - // Queue single response - Server::enqueue("HTTP/1.1 200 OK\r\n\Content-Length: 0r\n\r\n"); - - // Clear the queue and queue an array of responses - Server::enqueue([ - "HTTP/1.1 200 OK\r\n\Content-Length: 0r\n\r\n", - "HTTP/1.1 404 Not Found\r\n\Content-Length: 0r\n\r\n" - ]); - -When a response is queued on the test server, the test server will remove any -previously queued responses. As the server receives requests, queued responses -are dequeued and returned to the request. When the queue is empty, the server -will return a 500 response. - -You can inspect the requests that the server has retrieved by calling -``Server::received()``. This method accepts an optional ``$hydrate`` parameter -that specifies if you are retrieving an array of HTTP requests as strings or an -array of ``GuzzleHttp\Message\RequestInterface`` objects. - -.. code-block:: php - - foreach (Server::received() as $response) { - echo $response; - } - -You can clear the list of received requests from the web server using the -``Server::flush()`` method. - -.. code-block:: php - - Server::flush(); - echo count(Server::received()); - // 0 diff --git a/core/vendor/guzzlehttp/guzzle/phpunit.xml.dist b/core/vendor/guzzlehttp/guzzle/phpunit.xml.dist deleted file mode 100644 index 500cd53..0000000 --- a/core/vendor/guzzlehttp/guzzle/phpunit.xml.dist +++ /dev/null @@ -1,17 +0,0 @@ - - - - - tests - - - - - src - - src/ - - - - diff --git a/core/vendor/guzzlehttp/guzzle/src/BatchResults.php b/core/vendor/guzzlehttp/guzzle/src/BatchResults.php deleted file mode 100644 index e5af433..0000000 --- a/core/vendor/guzzlehttp/guzzle/src/BatchResults.php +++ /dev/null @@ -1,148 +0,0 @@ -hash = $hash; - } - - /** - * Get the keys that are available on the batch result. - * - * @return array - */ - public function getKeys() - { - return iterator_to_array($this->hash); - } - - /** - * Gets a result from the container for the given object. When getting - * results for a batch of requests, provide the request object. - * - * @param object $forObject Object to retrieve the result for. - * - * @return mixed|null - */ - public function getResult($forObject) - { - return isset($this->hash[$forObject]) ? $this->hash[$forObject] : null; - } - - /** - * Get an array of successful results. - * - * @return array - */ - public function getSuccessful() - { - $results = []; - foreach ($this->hash as $key) { - if (!($this->hash[$key] instanceof \Exception)) { - $results[] = $this->hash[$key]; - } - } - - return $results; - } - - /** - * Get an array of failed results. - * - * @return array - */ - public function getFailures() - { - $results = []; - foreach ($this->hash as $key) { - if ($this->hash[$key] instanceof \Exception) { - $results[] = $this->hash[$key]; - } - } - - return $results; - } - - /** - * Allows iteration over all batch result values. - * - * @return \ArrayIterator - */ - public function getIterator() - { - $results = []; - foreach ($this->hash as $key) { - $results[] = $this->hash[$key]; - } - - return new \ArrayIterator($results); - } - - /** - * Counts the number of elements in the batch result. - * - * @return int - */ - public function count() - { - return count($this->hash); - } - - /** - * Checks if the batch contains a specific numerical array index. - * - * @param int $key Index to access - * - * @return bool - */ - public function offsetExists($key) - { - return $key < count($this->hash); - } - - /** - * Allows access of the batch using a numerical array index. - * - * @param int $key Index to access. - * - * @return mixed|null - */ - public function offsetGet($key) - { - $i = -1; - foreach ($this->hash as $obj) { - if ($key === ++$i) { - return $this->hash[$obj]; - } - } - - return null; - } - - public function offsetUnset($key) - { - throw new \RuntimeException('Not implemented'); - } - - public function offsetSet($key, $value) - { - throw new \RuntimeException('Not implemented'); - } -} diff --git a/core/vendor/guzzlehttp/guzzle/src/Client.php b/core/vendor/guzzlehttp/guzzle/src/Client.php deleted file mode 100644 index c8045a1..0000000 --- a/core/vendor/guzzlehttp/guzzle/src/Client.php +++ /dev/null @@ -1,390 +0,0 @@ - [ - * 'http://www.foo.com/{version}/', - * ['version' => '123'] - * ], - * 'defaults' => [ - * 'timeout' => 10, - * 'allow_redirects' => false, - * 'proxy' => '192.168.16.1:10' - * ] - * ]); - * - * @param array $config Client configuration settings - * - base_url: Base URL of the client that is merged into relative URLs. - * Can be a string or an array that contains a URI template followed - * by an associative array of expansion variables to inject into the - * URI template. - * - handler: callable RingPHP handler used to transfer requests - * - message_factory: Factory used to create request and response object - * - defaults: Default request options to apply to each request - * - emitter: Event emitter used for request events - * - fsm: (internal use only) The request finite state machine. A - * function that accepts a transaction and optional final state. The - * function is responsible for transitioning a request through its - * lifecycle events. - */ - public function __construct(array $config = []) - { - $this->configureBaseUrl($config); - $this->configureDefaults($config); - - if (isset($config['emitter'])) { - $this->emitter = $config['emitter']; - } - - $this->messageFactory = isset($config['message_factory']) - ? $config['message_factory'] - : new MessageFactory(); - - if (isset($config['fsm'])) { - $this->fsm = $config['fsm']; - } else { - if (isset($config['handler'])) { - $handler = $config['handler']; - } elseif (isset($config['adapter'])) { - $handler = $config['adapter']; - } else { - $handler = static::getDefaultHandler(); - } - $this->fsm = new RequestFsm($handler, $this->messageFactory); - } - } - - /** - * Create a default handler to use based on the environment - * - * @throws \RuntimeException if no viable Handler is available. - */ - public static function getDefaultHandler() - { - $default = $future = $streaming = null; - - if (extension_loaded('curl')) { - $config = [ - 'select_timeout' => getenv('GUZZLE_CURL_SELECT_TIMEOUT') ?: 1 - ]; - if ($maxHandles = getenv('GUZZLE_CURL_MAX_HANDLES')) { - $config['max_handles'] = $maxHandles; - } - $future = new CurlMultiHandler($config); - if (function_exists('curl_reset')) { - $default = new CurlHandler(); - } - } - - if (ini_get('allow_url_fopen')) { - $streaming = new StreamHandler(); - } - - if (!($default = ($default ?: $future) ?: $streaming)) { - throw new \RuntimeException('Guzzle requires cURL, the ' - . 'allow_url_fopen ini setting, or a custom HTTP handler.'); - } - - $handler = $default; - - if ($streaming && $streaming !== $default) { - $handler = Middleware::wrapStreaming($default, $streaming); - } - - if ($future) { - $handler = Middleware::wrapFuture($handler, $future); - } - - return $handler; - } - - /** - * Get the default User-Agent string to use with Guzzle - * - * @return string - */ - public static function getDefaultUserAgent() - { - static $defaultAgent = ''; - if (!$defaultAgent) { - $defaultAgent = 'Guzzle/' . self::VERSION; - if (extension_loaded('curl')) { - $defaultAgent .= ' curl/' . curl_version()['version']; - } - $defaultAgent .= ' PHP/' . PHP_VERSION; - } - - return $defaultAgent; - } - - public function getDefaultOption($keyOrPath = null) - { - return $keyOrPath === null - ? $this->defaults - : Utils::getPath($this->defaults, $keyOrPath); - } - - public function setDefaultOption($keyOrPath, $value) - { - Utils::setPath($this->defaults, $keyOrPath, $value); - } - - public function getBaseUrl() - { - return (string) $this->baseUrl; - } - - public function createRequest($method, $url = null, array $options = []) - { - $headers = $this->mergeDefaults($options); - // Use a clone of the client's emitter - $options['config']['emitter'] = clone $this->getEmitter(); - - $request = $this->messageFactory->createRequest( - $method, - $url ? (string) $this->buildUrl($url) : (string) $this->baseUrl, - $options - ); - - // Merge in default headers - if ($headers) { - foreach ($headers as $key => $value) { - if (!$request->hasHeader($key)) { - $request->setHeader($key, $value); - } - } - } - - return $request; - } - - public function get($url = null, $options = []) - { - return $this->send($this->createRequest('GET', $url, $options)); - } - - public function head($url = null, array $options = []) - { - return $this->send($this->createRequest('HEAD', $url, $options)); - } - - public function delete($url = null, array $options = []) - { - return $this->send($this->createRequest('DELETE', $url, $options)); - } - - public function put($url = null, array $options = []) - { - return $this->send($this->createRequest('PUT', $url, $options)); - } - - public function patch($url = null, array $options = []) - { - return $this->send($this->createRequest('PATCH', $url, $options)); - } - - public function post($url = null, array $options = []) - { - return $this->send($this->createRequest('POST', $url, $options)); - } - - public function options($url = null, array $options = []) - { - return $this->send($this->createRequest('OPTIONS', $url, $options)); - } - - public function send(RequestInterface $request) - { - $trans = new Transaction($this, $request); - $fn = $this->fsm; - - // Ensure a future response is returned if one was requested. - if ($request->getConfig()->get('future')) { - try { - $fn($trans); - // Turn the normal response into a future if needed. - return $trans->response instanceof FutureInterface - ? $trans->response - : new FutureResponse(new FulfilledPromise($trans->response)); - } catch (RequestException $e) { - // Wrap the exception in a promise if the user asked for a future. - return new FutureResponse(new RejectedPromise($e)); - } - } else { - try { - $fn($trans); - return $trans->response instanceof FutureInterface - ? $trans->response->wait() - : $trans->response; - } catch (\Exception $e) { - throw RequestException::wrapException($trans->request, $e); - } - } - } - - /** - * Get an array of default options to apply to the client - * - * @return array - */ - protected function getDefaultOptions() - { - $settings = [ - 'allow_redirects' => true, - 'exceptions' => true, - 'decode_content' => true, - 'verify' => true - ]; - - // Use the standard Linux HTTP_PROXY and HTTPS_PROXY if set - if ($proxy = getenv('HTTP_PROXY')) { - $settings['proxy']['http'] = $proxy; - } - - if ($proxy = getenv('HTTPS_PROXY')) { - $settings['proxy']['https'] = $proxy; - } - - return $settings; - } - - /** - * Expand a URI template and inherit from the base URL if it's relative - * - * @param string|array $url URL or URI template to expand - * - * @return string - */ - private function buildUrl($url) - { - // URI template (absolute or relative) - if (!is_array($url)) { - return strpos($url, '://') - ? (string) $url - : (string) $this->baseUrl->combine($url); - } - - // Absolute URL - if (strpos($url[0], '://')) { - return Utils::uriTemplate($url[0], $url[1]); - } - - // Combine the relative URL with the base URL - return (string) $this->baseUrl->combine( - Utils::uriTemplate($url[0], $url[1]) - ); - } - - private function configureBaseUrl(&$config) - { - if (!isset($config['base_url'])) { - $this->baseUrl = new Url('', ''); - } elseif (is_array($config['base_url'])) { - $this->baseUrl = Url::fromString( - Utils::uriTemplate( - $config['base_url'][0], - $config['base_url'][1] - ) - ); - $config['base_url'] = (string) $this->baseUrl; - } else { - $this->baseUrl = Url::fromString($config['base_url']); - } - } - - private function configureDefaults($config) - { - if (!isset($config['defaults'])) { - $this->defaults = $this->getDefaultOptions(); - } else { - $this->defaults = array_replace( - $this->getDefaultOptions(), - $config['defaults'] - ); - } - - // Add the default user-agent header - if (!isset($this->defaults['headers'])) { - $this->defaults['headers'] = [ - 'User-Agent' => static::getDefaultUserAgent() - ]; - } elseif (!Core::hasHeader($this->defaults, 'User-Agent')) { - // Add the User-Agent header if one was not already set - $this->defaults['headers']['User-Agent'] = static::getDefaultUserAgent(); - } - } - - /** - * Merges default options into the array passed by reference and returns - * an array of headers that need to be merged in after the request is - * created. - * - * @param array $options Options to modify by reference - * - * @return array|null - */ - private function mergeDefaults(&$options) - { - // Merging optimization for when no headers are present - if (!isset($options['headers']) || !isset($this->defaults['headers'])) { - $options = array_replace_recursive($this->defaults, $options); - return null; - } - - $defaults = $this->defaults; - unset($defaults['headers']); - $options = array_replace_recursive($defaults, $options); - - return $this->defaults['headers']; - } - - /** - * @deprecated Use {@see GuzzleHttp\Pool} instead. - * @see GuzzleHttp\Pool - */ - public function sendAll($requests, array $options = []) - { - (new Pool($this, $requests, $options))->wait(); - } -} diff --git a/core/vendor/guzzlehttp/guzzle/src/ClientInterface.php b/core/vendor/guzzlehttp/guzzle/src/ClientInterface.php deleted file mode 100644 index 4f6ad26..0000000 --- a/core/vendor/guzzlehttp/guzzle/src/ClientInterface.php +++ /dev/null @@ -1,150 +0,0 @@ -data = $data; - } - - /** - * Create a new collection from an array, validate the keys, and add default - * values where missing - * - * @param array $config Configuration values to apply. - * @param array $defaults Default parameters - * @param array $required Required parameter names - * - * @return self - * @throws \InvalidArgumentException if a parameter is missing - */ - public static function fromConfig( - array $config = [], - array $defaults = [], - array $required = [] - ) { - $data = $config + $defaults; - - if ($missing = array_diff($required, array_keys($data))) { - throw new \InvalidArgumentException( - 'Config is missing the following keys: ' . - implode(', ', $missing)); - } - - return new self($data); - } - - /** - * Removes all key value pairs - */ - public function clear() - { - $this->data = []; - } - - /** - * Get a specific key value. - * - * @param string $key Key to retrieve. - * - * @return mixed|null Value of the key or NULL - */ - public function get($key) - { - return isset($this->data[$key]) ? $this->data[$key] : null; - } - - /** - * Set a key value pair - * - * @param string $key Key to set - * @param mixed $value Value to set - */ - public function set($key, $value) - { - $this->data[$key] = $value; - } - - /** - * Add a value to a key. If a key of the same name has already been added, - * the key value will be converted into an array and the new value will be - * pushed to the end of the array. - * - * @param string $key Key to add - * @param mixed $value Value to add to the key - */ - public function add($key, $value) - { - if (!array_key_exists($key, $this->data)) { - $this->data[$key] = $value; - } elseif (is_array($this->data[$key])) { - $this->data[$key][] = $value; - } else { - $this->data[$key] = array($this->data[$key], $value); - } - } - - /** - * Remove a specific key value pair - * - * @param string $key A key to remove - */ - public function remove($key) - { - unset($this->data[$key]); - } - - /** - * Get all keys in the collection - * - * @return array - */ - public function getKeys() - { - return array_keys($this->data); - } - - /** - * Returns whether or not the specified key is present. - * - * @param string $key The key for which to check the existence. - * - * @return bool - */ - public function hasKey($key) - { - return array_key_exists($key, $this->data); - } - - /** - * Checks if any keys contains a certain value - * - * @param string $value Value to search for - * - * @return mixed Returns the key if the value was found FALSE if the value - * was not found. - */ - public function hasValue($value) - { - return array_search($value, $this->data, true); - } - - /** - * Replace the data of the object with the value of an array - * - * @param array $data Associative array of data - */ - public function replace(array $data) - { - $this->data = $data; - } - - /** - * Add and merge in a Collection or array of key value pair data. - * - * @param Collection|array $data Associative array of key value pair data - */ - public function merge($data) - { - foreach ($data as $key => $value) { - $this->add($key, $value); - } - } - - /** - * Overwrite key value pairs in this collection with all of the data from - * an array or collection. - * - * @param array|\Traversable $data Values to override over this config - */ - public function overwriteWith($data) - { - if (is_array($data)) { - $this->data = $data + $this->data; - } elseif ($data instanceof Collection) { - $this->data = $data->toArray() + $this->data; - } else { - foreach ($data as $key => $value) { - $this->data[$key] = $value; - } - } - } - - /** - * Returns a Collection containing all the elements of the collection after - * applying the callback function to each one. - * - * The callable should accept three arguments: - * - (string) $key - * - (string) $value - * - (array) $context - * - * The callable must return a the altered or unaltered value. - * - * @param callable $closure Map function to apply - * @param array $context Context to pass to the callable - * - * @return Collection - */ - public function map(callable $closure, array $context = []) - { - $collection = new static(); - foreach ($this as $key => $value) { - $collection[$key] = $closure($key, $value, $context); - } - - return $collection; - } - - /** - * Iterates over each key value pair in the collection passing them to the - * callable. If the callable returns true, the current value from input is - * returned into the result Collection. - * - * The callable must accept two arguments: - * - (string) $key - * - (string) $value - * - * @param callable $closure Evaluation function - * - * @return Collection - */ - public function filter(callable $closure) - { - $collection = new static(); - foreach ($this->data as $key => $value) { - if ($closure($key, $value)) { - $collection[$key] = $value; - } - } - - return $collection; - } -} diff --git a/core/vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php b/core/vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php deleted file mode 100644 index f8ac7dd..0000000 --- a/core/vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php +++ /dev/null @@ -1,248 +0,0 @@ -strictMode = $strictMode; - - foreach ($cookieArray as $cookie) { - if (!($cookie instanceof SetCookie)) { - $cookie = new SetCookie($cookie); - } - $this->setCookie($cookie); - } - } - - /** - * Create a new Cookie jar from an associative array and domain. - * - * @param array $cookies Cookies to create the jar from - * @param string $domain Domain to set the cookies to - * - * @return self - */ - public static function fromArray(array $cookies, $domain) - { - $cookieJar = new self(); - foreach ($cookies as $name => $value) { - $cookieJar->setCookie(new SetCookie([ - 'Domain' => $domain, - 'Name' => $name, - 'Value' => $value, - 'Discard' => true - ])); - } - - return $cookieJar; - } - - /** - * Quote the cookie value if it is not already quoted and it contains - * problematic characters. - * - * @param string $value Value that may or may not need to be quoted - * - * @return string - */ - public static function getCookieValue($value) - { - if (substr($value, 0, 1) !== '"' && - substr($value, -1, 1) !== '"' && - strpbrk($value, ';,') - ) { - $value = '"' . $value . '"'; - } - - return $value; - } - - public function toArray() - { - return array_map(function (SetCookie $cookie) { - return $cookie->toArray(); - }, $this->getIterator()->getArrayCopy()); - } - - public function clear($domain = null, $path = null, $name = null) - { - if (!$domain) { - $this->cookies = []; - return; - } elseif (!$path) { - $this->cookies = array_filter( - $this->cookies, - function (SetCookie $cookie) use ($path, $domain) { - return !$cookie->matchesDomain($domain); - } - ); - } elseif (!$name) { - $this->cookies = array_filter( - $this->cookies, - function (SetCookie $cookie) use ($path, $domain) { - return !($cookie->matchesPath($path) && - $cookie->matchesDomain($domain)); - } - ); - } else { - $this->cookies = array_filter( - $this->cookies, - function (SetCookie $cookie) use ($path, $domain, $name) { - return !($cookie->getName() == $name && - $cookie->matchesPath($path) && - $cookie->matchesDomain($domain)); - } - ); - } - } - - public function clearSessionCookies() - { - $this->cookies = array_filter( - $this->cookies, - function (SetCookie $cookie) { - return !$cookie->getDiscard() && $cookie->getExpires(); - } - ); - } - - public function setCookie(SetCookie $cookie) - { - // Only allow cookies with set and valid domain, name, value - $result = $cookie->validate(); - if ($result !== true) { - if ($this->strictMode) { - throw new \RuntimeException('Invalid cookie: ' . $result); - } else { - $this->removeCookieIfEmpty($cookie); - return false; - } - } - - // Resolve conflicts with previously set cookies - foreach ($this->cookies as $i => $c) { - - // Two cookies are identical, when their path, and domain are - // identical. - if ($c->getPath() != $cookie->getPath() || - $c->getDomain() != $cookie->getDomain() || - $c->getName() != $cookie->getName() - ) { - continue; - } - - // The previously set cookie is a discard cookie and this one is - // not so allow the new cookie to be set - if (!$cookie->getDiscard() && $c->getDiscard()) { - unset($this->cookies[$i]); - continue; - } - - // If the new cookie's expiration is further into the future, then - // replace the old cookie - if ($cookie->getExpires() > $c->getExpires()) { - unset($this->cookies[$i]); - continue; - } - - // If the value has changed, we better change it - if ($cookie->getValue() !== $c->getValue()) { - unset($this->cookies[$i]); - continue; - } - - // The cookie exists, so no need to continue - return false; - } - - $this->cookies[] = $cookie; - - return true; - } - - public function count() - { - return count($this->cookies); - } - - public function getIterator() - { - return new \ArrayIterator(array_values($this->cookies)); - } - - public function extractCookies( - RequestInterface $request, - ResponseInterface $response - ) { - if ($cookieHeader = $response->getHeaderAsArray('Set-Cookie')) { - foreach ($cookieHeader as $cookie) { - $sc = SetCookie::fromString($cookie); - if (!$sc->getDomain()) { - $sc->setDomain($request->getHost()); - } - $this->setCookie($sc); - } - } - } - - public function addCookieHeader(RequestInterface $request) - { - $values = []; - $scheme = $request->getScheme(); - $host = $request->getHost(); - $path = $request->getPath(); - - foreach ($this->cookies as $cookie) { - if ($cookie->matchesPath($path) && - $cookie->matchesDomain($host) && - !$cookie->isExpired() && - (!$cookie->getSecure() || $scheme == 'https') - ) { - $values[] = $cookie->getName() . '=' - . self::getCookieValue($cookie->getValue()); - } - } - - if ($values) { - $request->setHeader('Cookie', implode('; ', $values)); - } - } - - /** - * If a cookie already exists and the server asks to set it again with a - * null value, the cookie must be deleted. - * - * @param SetCookie $cookie - */ - private function removeCookieIfEmpty(SetCookie $cookie) - { - $cookieValue = $cookie->getValue(); - if ($cookieValue === null || $cookieValue === '') { - $this->clear( - $cookie->getDomain(), - $cookie->getPath(), - $cookie->getName() - ); - } - } -} diff --git a/core/vendor/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php b/core/vendor/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php deleted file mode 100644 index 4ea8567..0000000 --- a/core/vendor/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php +++ /dev/null @@ -1,75 +0,0 @@ -filename = $cookieFile; - - if (file_exists($cookieFile)) { - $this->load($cookieFile); - } - } - - /** - * Saves the file when shutting down - */ - public function __destruct() - { - $this->save($this->filename); - } - - /** - * Saves the cookies to a file. - * - * @param string $filename File to save - * @throws \RuntimeException if the file cannot be found or created - */ - public function save($filename) - { - $json = []; - foreach ($this as $cookie) { - if ($cookie->getExpires() && !$cookie->getDiscard()) { - $json[] = $cookie->toArray(); - } - } - - if (false === file_put_contents($filename, json_encode($json))) { - // @codeCoverageIgnoreStart - throw new \RuntimeException("Unable to save file {$filename}"); - // @codeCoverageIgnoreEnd - } - } - - /** - * Load cookies from a JSON formatted file. - * - * Old cookies are kept unless overwritten by newly loaded ones. - * - * @param string $filename Cookie file to load. - * @throws \RuntimeException if the file cannot be loaded. - */ - public function load($filename) - { - $json = file_get_contents($filename); - if (false === $json) { - // @codeCoverageIgnoreStart - throw new \RuntimeException("Unable to load file {$filename}"); - // @codeCoverageIgnoreEnd - } - - $data = Utils::jsonDecode($json, true); - if (is_array($data)) { - foreach (Utils::jsonDecode($json, true) as $cookie) { - $this->setCookie(new SetCookie($cookie)); - } - } elseif (strlen($data)) { - throw new \RuntimeException("Invalid cookie file: {$filename}"); - } - } -} diff --git a/core/vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php b/core/vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php deleted file mode 100644 index 71a02d5..0000000 --- a/core/vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php +++ /dev/null @@ -1,66 +0,0 @@ -sessionKey = $sessionKey; - $this->load(); - } - - /** - * Saves cookies to session when shutting down - */ - public function __destruct() - { - $this->save(); - } - - /** - * Save cookies to the client session - */ - public function save() - { - $json = []; - foreach ($this as $cookie) { - if ($cookie->getExpires() && !$cookie->getDiscard()) { - $json[] = $cookie->toArray(); - } - } - - $_SESSION[$this->sessionKey] = json_encode($json); - } - - /** - * Load the contents of the client session into the data array - */ - protected function load() - { - $cookieJar = isset($_SESSION[$this->sessionKey]) - ? $_SESSION[$this->sessionKey] - : null; - - $data = Utils::jsonDecode($cookieJar, true); - if (is_array($data)) { - foreach ($data as $cookie) { - $this->setCookie(new SetCookie($cookie)); - } - } elseif (strlen($data)) { - throw new \RuntimeException("Invalid cookie data"); - } - } -} diff --git a/core/vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php b/core/vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php deleted file mode 100644 index ac9a890..0000000 --- a/core/vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php +++ /dev/null @@ -1,373 +0,0 @@ - null, - 'Value' => null, - 'Domain' => null, - 'Path' => '/', - 'Max-Age' => null, - 'Expires' => null, - 'Secure' => false, - 'Discard' => false, - 'HttpOnly' => false - ]; - - /** @var array Cookie data */ - private $data; - - /** - * Create a new SetCookie object from a string - * - * @param string $cookie Set-Cookie header string - * - * @return self - */ - public static function fromString($cookie) - { - // Create the default return array - $data = self::$defaults; - // Explode the cookie string using a series of semicolons - $pieces = array_filter(array_map('trim', explode(';', $cookie))); - // The name of the cookie (first kvp) must include an equal sign. - if (empty($pieces) || !strpos($pieces[0], '=')) { - return new self($data); - } - - // Add the cookie pieces into the parsed data array - foreach ($pieces as $part) { - - $cookieParts = explode('=', $part, 2); - $key = trim($cookieParts[0]); - $value = isset($cookieParts[1]) - ? trim($cookieParts[1], " \n\r\t\0\x0B\"") - : true; - - // Only check for non-cookies when cookies have been found - if (empty($data['Name'])) { - $data['Name'] = $key; - $data['Value'] = $value; - } else { - foreach (array_keys(self::$defaults) as $search) { - if (!strcasecmp($search, $key)) { - $data[$search] = $value; - continue 2; - } - } - $data[$key] = $value; - } - } - - return new self($data); - } - - /** - * @param array $data Array of cookie data provided by a Cookie parser - */ - public function __construct(array $data = []) - { - $this->data = array_replace(self::$defaults, $data); - // Extract the Expires value and turn it into a UNIX timestamp if needed - if (!$this->getExpires() && $this->getMaxAge()) { - // Calculate the Expires date - $this->setExpires(time() + $this->getMaxAge()); - } elseif ($this->getExpires() && !is_numeric($this->getExpires())) { - $this->setExpires($this->getExpires()); - } - } - - public function __toString() - { - $str = $this->data['Name'] . '=' . $this->data['Value'] . '; '; - foreach ($this->data as $k => $v) { - if ($k != 'Name' && $k != 'Value' && $v !== null && $v !== false) { - if ($k == 'Expires') { - $str .= 'Expires=' . gmdate('D, d M Y H:i:s \G\M\T', $v) . '; '; - } else { - $str .= ($v === true ? $k : "{$k}={$v}") . '; '; - } - } - } - - return rtrim($str, '; '); - } - - public function toArray() - { - return $this->data; - } - - /** - * Get the cookie name - * - * @return string - */ - public function getName() - { - return $this->data['Name']; - } - - /** - * Set the cookie name - * - * @param string $name Cookie name - */ - public function setName($name) - { - $this->data['Name'] = $name; - } - - /** - * Get the cookie value - * - * @return string - */ - public function getValue() - { - return $this->data['Value']; - } - - /** - * Set the cookie value - * - * @param string $value Cookie value - */ - public function setValue($value) - { - $this->data['Value'] = $value; - } - - /** - * Get the domain - * - * @return string|null - */ - public function getDomain() - { - return $this->data['Domain']; - } - - /** - * Set the domain of the cookie - * - * @param string $domain - */ - public function setDomain($domain) - { - $this->data['Domain'] = $domain; - } - - /** - * Get the path - * - * @return string - */ - public function getPath() - { - return $this->data['Path']; - } - - /** - * Set the path of the cookie - * - * @param string $path Path of the cookie - */ - public function setPath($path) - { - $this->data['Path'] = $path; - } - - /** - * Maximum lifetime of the cookie in seconds - * - * @return int|null - */ - public function getMaxAge() - { - return $this->data['Max-Age']; - } - - /** - * Set the max-age of the cookie - * - * @param int $maxAge Max age of the cookie in seconds - */ - public function setMaxAge($maxAge) - { - $this->data['Max-Age'] = $maxAge; - } - - /** - * The UNIX timestamp when the cookie Expires - * - * @return mixed - */ - public function getExpires() - { - return $this->data['Expires']; - } - - /** - * Set the unix timestamp for which the cookie will expire - * - * @param int $timestamp Unix timestamp - */ - public function setExpires($timestamp) - { - $this->data['Expires'] = is_numeric($timestamp) - ? (int) $timestamp - : strtotime($timestamp); - } - - /** - * Get whether or not this is a secure cookie - * - * @return null|bool - */ - public function getSecure() - { - return $this->data['Secure']; - } - - /** - * Set whether or not the cookie is secure - * - * @param bool $secure Set to true or false if secure - */ - public function setSecure($secure) - { - $this->data['Secure'] = $secure; - } - - /** - * Get whether or not this is a session cookie - * - * @return null|bool - */ - public function getDiscard() - { - return $this->data['Discard']; - } - - /** - * Set whether or not this is a session cookie - * - * @param bool $discard Set to true or false if this is a session cookie - */ - public function setDiscard($discard) - { - $this->data['Discard'] = $discard; - } - - /** - * Get whether or not this is an HTTP only cookie - * - * @return bool - */ - public function getHttpOnly() - { - return $this->data['HttpOnly']; - } - - /** - * Set whether or not this is an HTTP only cookie - * - * @param bool $httpOnly Set to true or false if this is HTTP only - */ - public function setHttpOnly($httpOnly) - { - $this->data['HttpOnly'] = $httpOnly; - } - - /** - * Check if the cookie matches a path value - * - * @param string $path Path to check against - * - * @return bool - */ - public function matchesPath($path) - { - return !$this->getPath() || 0 === stripos($path, $this->getPath()); - } - - /** - * Check if the cookie matches a domain value - * - * @param string $domain Domain to check against - * - * @return bool - */ - public function matchesDomain($domain) - { - // Remove the leading '.' as per spec in RFC 6265. - // http://tools.ietf.org/html/rfc6265#section-5.2.3 - $cookieDomain = ltrim($this->getDomain(), '.'); - - // Domain not set or exact match. - if (!$cookieDomain || !strcasecmp($domain, $cookieDomain)) { - return true; - } - - // Matching the subdomain according to RFC 6265. - // http://tools.ietf.org/html/rfc6265#section-5.1.3 - if (filter_var($domain, FILTER_VALIDATE_IP)) { - return false; - } - - return (bool) preg_match('/\.' . preg_quote($cookieDomain) . '$/i', $domain); - } - - /** - * Check if the cookie is expired - * - * @return bool - */ - public function isExpired() - { - return $this->getExpires() && time() > $this->getExpires(); - } - - /** - * Check if the cookie is valid according to RFC 6265 - * - * @return bool|string Returns true if valid or an error message if invalid - */ - public function validate() - { - // Names must not be empty, but can be 0 - $name = $this->getName(); - if (empty($name) && !is_numeric($name)) { - return 'The cookie name must not be empty'; - } - - // Check if any of the invalid characters are present in the cookie name - if (preg_match("/[=,; \t\r\n\013\014]/", $name)) { - return "Cookie name must not cannot invalid characters: =,; \\t\\r\\n\\013\\014"; - } - - // Value must not be empty, but can be 0 - $value = $this->getValue(); - if (empty($value) && !is_numeric($value)) { - return 'The cookie value must not be empty'; - } - - // Domains must not be empty, but can be 0 - // A "0" is not a valid internet domain, but may be used as server name - // in a private network. - $domain = $this->getDomain(); - if (empty($domain) && !is_numeric($domain)) { - return 'The cookie domain must not be empty'; - } - - return true; - } -} diff --git a/core/vendor/guzzlehttp/guzzle/src/Event/AbstractEvent.php b/core/vendor/guzzlehttp/guzzle/src/Event/AbstractEvent.php deleted file mode 100644 index 0d2f4db..0000000 --- a/core/vendor/guzzlehttp/guzzle/src/Event/AbstractEvent.php +++ /dev/null @@ -1,20 +0,0 @@ -propagationStopped; - } - - public function stopPropagation() - { - $this->propagationStopped = true; - } -} diff --git a/core/vendor/guzzlehttp/guzzle/src/Event/AbstractRequestEvent.php b/core/vendor/guzzlehttp/guzzle/src/Event/AbstractRequestEvent.php deleted file mode 100644 index 53383f4..0000000 --- a/core/vendor/guzzlehttp/guzzle/src/Event/AbstractRequestEvent.php +++ /dev/null @@ -1,51 +0,0 @@ -transaction = $transaction; - } - - /** - * Get the HTTP client associated with the event. - * - * @return ClientInterface - */ - public function getClient() - { - return $this->transaction->client; - } - - /** - * Get the request object - * - * @return RequestInterface - */ - public function getRequest() - { - return $this->transaction->request; - } - - /** - * @return Transaction - */ - protected function getTransaction() - { - return $this->transaction; - } -} diff --git a/core/vendor/guzzlehttp/guzzle/src/Event/AbstractRetryableEvent.php b/core/vendor/guzzlehttp/guzzle/src/Event/AbstractRetryableEvent.php deleted file mode 100644 index 828d315..0000000 --- a/core/vendor/guzzlehttp/guzzle/src/Event/AbstractRetryableEvent.php +++ /dev/null @@ -1,40 +0,0 @@ -transaction->response = null; - $this->transaction->exception = null; - $this->transaction->state = 'before'; - - if ($afterDelay) { - $this->transaction->request->getConfig()->set('delay', $afterDelay); - } - - $this->stopPropagation(); - } -} diff --git a/core/vendor/guzzlehttp/guzzle/src/Event/AbstractTransferEvent.php b/core/vendor/guzzlehttp/guzzle/src/Event/AbstractTransferEvent.php deleted file mode 100644 index 9e4a90f..0000000 --- a/core/vendor/guzzlehttp/guzzle/src/Event/AbstractTransferEvent.php +++ /dev/null @@ -1,61 +0,0 @@ -transaction->transferInfo - : (isset($this->transaction->transferInfo[$name]) - ? $this->transaction->transferInfo[$name] - : null); - } - - /** - * Returns true/false if a response is available. - * - * @return bool - */ - public function hasResponse() - { - return !($this->transaction->response instanceof FutureInterface); - } - - /** - * Get the response. - * - * @return ResponseInterface|null - */ - public function getResponse() - { - return $this->hasResponse() ? $this->transaction->response : null; - } - - /** - * Intercept the request and associate a response - * - * @param ResponseInterface $response Response to set - */ - public function intercept(ResponseInterface $response) - { - $this->transaction->response = $response; - $this->transaction->exception = null; - $this->stopPropagation(); - } -} diff --git a/core/vendor/guzzlehttp/guzzle/src/Event/BeforeEvent.php b/core/vendor/guzzlehttp/guzzle/src/Event/BeforeEvent.php deleted file mode 100644 index f313c37..0000000 --- a/core/vendor/guzzlehttp/guzzle/src/Event/BeforeEvent.php +++ /dev/null @@ -1,26 +0,0 @@ -transaction->response = $response; - $this->transaction->exception = null; - $this->stopPropagation(); - } -} diff --git a/core/vendor/guzzlehttp/guzzle/src/Event/CompleteEvent.php b/core/vendor/guzzlehttp/guzzle/src/Event/CompleteEvent.php deleted file mode 100644 index 56cc557..0000000 --- a/core/vendor/guzzlehttp/guzzle/src/Event/CompleteEvent.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * @link https://github.com/symfony/symfony/tree/master/src/Symfony/Component/EventDispatcher - */ -class Emitter implements EmitterInterface -{ - /** @var array */ - private $listeners = []; - - /** @var array */ - private $sorted = []; - - public function on($eventName, callable $listener, $priority = 0) - { - if ($priority === 'first') { - $priority = isset($this->listeners[$eventName]) - ? max(array_keys($this->listeners[$eventName])) + 1 - : 1; - } elseif ($priority === 'last') { - $priority = isset($this->listeners[$eventName]) - ? min(array_keys($this->listeners[$eventName])) - 1 - : -1; - } - - $this->listeners[$eventName][$priority][] = $listener; - unset($this->sorted[$eventName]); - } - - public function once($eventName, callable $listener, $priority = 0) - { - $onceListener = function ( - EventInterface $event, - $eventName - ) use (&$onceListener, $eventName, $listener, $priority) { - $this->removeListener($eventName, $onceListener); - $listener($event, $eventName, $this); - }; - - $this->on($eventName, $onceListener, $priority); - } - - public function removeListener($eventName, callable $listener) - { - if (empty($this->listeners[$eventName])) { - return; - } - - foreach ($this->listeners[$eventName] as $priority => $listeners) { - if (false !== ($key = array_search($listener, $listeners, true))) { - unset( - $this->listeners[$eventName][$priority][$key], - $this->sorted[$eventName] - ); - } - } - } - - public function listeners($eventName = null) - { - // Return all events in a sorted priority order - if ($eventName === null) { - foreach (array_keys($this->listeners) as $eventName) { - if (empty($this->sorted[$eventName])) { - $this->listeners($eventName); - } - } - return $this->sorted; - } - - // Return the listeners for a specific event, sorted in priority order - if (empty($this->sorted[$eventName])) { - $this->sorted[$eventName] = []; - if (isset($this->listeners[$eventName])) { - krsort($this->listeners[$eventName], SORT_NUMERIC); - foreach ($this->listeners[$eventName] as $listeners) { - foreach ($listeners as $listener) { - $this->sorted[$eventName][] = $listener; - } - } - } - } - - return $this->sorted[$eventName]; - } - - public function hasListeners($eventName) - { - return !empty($this->listeners[$eventName]); - } - - public function emit($eventName, EventInterface $event) - { - if (isset($this->listeners[$eventName])) { - foreach ($this->listeners($eventName) as $listener) { - $listener($event, $eventName); - if ($event->isPropagationStopped()) { - break; - } - } - } - - return $event; - } - - public function attach(SubscriberInterface $subscriber) - { - foreach ($subscriber->getEvents() as $eventName => $listeners) { - if (is_array($listeners[0])) { - foreach ($listeners as $listener) { - $this->on( - $eventName, - [$subscriber, $listener[0]], - isset($listener[1]) ? $listener[1] : 0 - ); - } - } else { - $this->on( - $eventName, - [$subscriber, $listeners[0]], - isset($listeners[1]) ? $listeners[1] : 0 - ); - } - } - } - - public function detach(SubscriberInterface $subscriber) - { - foreach ($subscriber->getEvents() as $eventName => $listener) { - $this->removeListener($eventName, [$subscriber, $listener[0]]); - } - } -} diff --git a/core/vendor/guzzlehttp/guzzle/src/Event/EmitterInterface.php b/core/vendor/guzzlehttp/guzzle/src/Event/EmitterInterface.php deleted file mode 100644 index 9783efd..0000000 --- a/core/vendor/guzzlehttp/guzzle/src/Event/EmitterInterface.php +++ /dev/null @@ -1,96 +0,0 @@ -transaction->exception; - } -} diff --git a/core/vendor/guzzlehttp/guzzle/src/Event/ErrorEvent.php b/core/vendor/guzzlehttp/guzzle/src/Event/ErrorEvent.php deleted file mode 100644 index 7432134..0000000 --- a/core/vendor/guzzlehttp/guzzle/src/Event/ErrorEvent.php +++ /dev/null @@ -1,27 +0,0 @@ -transaction->exception; - } -} diff --git a/core/vendor/guzzlehttp/guzzle/src/Event/EventInterface.php b/core/vendor/guzzlehttp/guzzle/src/Event/EventInterface.php deleted file mode 100644 index 97247e8..0000000 --- a/core/vendor/guzzlehttp/guzzle/src/Event/EventInterface.php +++ /dev/null @@ -1,23 +0,0 @@ -emitter) { - $this->emitter = new Emitter(); - } - - return $this->emitter; - } -} diff --git a/core/vendor/guzzlehttp/guzzle/src/Event/ListenerAttacherTrait.php b/core/vendor/guzzlehttp/guzzle/src/Event/ListenerAttacherTrait.php deleted file mode 100644 index 407dc92..0000000 --- a/core/vendor/guzzlehttp/guzzle/src/Event/ListenerAttacherTrait.php +++ /dev/null @@ -1,88 +0,0 @@ -getEmitter(); - foreach ($listeners as $el) { - if ($el['once']) { - $emitter->once($el['name'], $el['fn'], $el['priority']); - } else { - $emitter->on($el['name'], $el['fn'], $el['priority']); - } - } - } - - /** - * Extracts the allowed events from the provided array, and ignores anything - * else in the array. The event listener must be specified as a callable or - * as an array of event listener data ("name", "fn", "priority", "once"). - * - * @param array $source Array containing callables or hashes of data to be - * prepared as event listeners. - * @param array $events Names of events to look for in the provided $source - * array. Other keys are ignored. - * @return array - */ - private function prepareListeners(array $source, array $events) - { - $listeners = []; - foreach ($events as $name) { - if (isset($source[$name])) { - $this->buildListener($name, $source[$name], $listeners); - } - } - - return $listeners; - } - - /** - * Creates a complete event listener definition from the provided array of - * listener data. Also works recursively if more than one listeners are - * contained in the provided array. - * - * @param string $name Name of the event the listener is for. - * @param array|callable $data Event listener data to prepare. - * @param array $listeners Array of listeners, passed by reference. - * - * @throws \InvalidArgumentException if the event data is malformed. - */ - private function buildListener($name, $data, &$listeners) - { - static $defaults = ['priority' => 0, 'once' => false]; - - // If a callable is provided, normalize it to the array format. - if (is_callable($data)) { - $data = ['fn' => $data]; - } - - // Prepare the listener and add it to the array, recursively. - if (isset($data['fn'])) { - $data['name'] = $name; - $listeners[] = $data + $defaults; - } elseif (is_array($data)) { - foreach ($data as $listenerData) { - $this->buildListener($name, $listenerData, $listeners); - } - } else { - throw new \InvalidArgumentException('Each event listener must be a ' - . 'callable or an associative array containing a "fn" key.'); - } - } -} diff --git a/core/vendor/guzzlehttp/guzzle/src/Event/ProgressEvent.php b/core/vendor/guzzlehttp/guzzle/src/Event/ProgressEvent.php deleted file mode 100644 index 3fd0de4..0000000 --- a/core/vendor/guzzlehttp/guzzle/src/Event/ProgressEvent.php +++ /dev/null @@ -1,51 +0,0 @@ -downloadSize = $downloadSize; - $this->downloaded = $downloaded; - $this->uploadSize = $uploadSize; - $this->uploaded = $uploaded; - } -} diff --git a/core/vendor/guzzlehttp/guzzle/src/Event/RequestEvents.php b/core/vendor/guzzlehttp/guzzle/src/Event/RequestEvents.php deleted file mode 100644 index f51d420..0000000 --- a/core/vendor/guzzlehttp/guzzle/src/Event/RequestEvents.php +++ /dev/null @@ -1,56 +0,0 @@ - ['methodName']] - * - ['eventName' => ['methodName', $priority]] - * - ['eventName' => [['methodName'], ['otherMethod']] - * - ['eventName' => [['methodName'], ['otherMethod', $priority]] - * - ['eventName' => [['methodName', $priority], ['otherMethod', $priority]] - * - * @return array - */ - public function getEvents(); -} diff --git a/core/vendor/guzzlehttp/guzzle/src/Exception/BadResponseException.php b/core/vendor/guzzlehttp/guzzle/src/Exception/BadResponseException.php deleted file mode 100644 index fd78431..0000000 --- a/core/vendor/guzzlehttp/guzzle/src/Exception/BadResponseException.php +++ /dev/null @@ -1,7 +0,0 @@ -response = $response; - } - /** - * Get the associated response - * - * @return ResponseInterface|null - */ - public function getResponse() - { - return $this->response; - } -} diff --git a/core/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php b/core/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php deleted file mode 100644 index f81d248..0000000 --- a/core/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php +++ /dev/null @@ -1,121 +0,0 @@ -getStatusCode() - : 0; - parent::__construct($message, $code, $previous); - $this->request = $request; - $this->response = $response; - } - - /** - * Wrap non-RequesExceptions with a RequestException - * - * @param RequestInterface $request - * @param \Exception $e - * - * @return RequestException - */ - public static function wrapException(RequestInterface $request, \Exception $e) - { - if ($e instanceof RequestException) { - return $e; - } elseif ($e instanceof ConnectException) { - return new HttpConnectException($e->getMessage(), $request, null, $e); - } else { - return new RequestException($e->getMessage(), $request, null, $e); - } - } - - /** - * Factory method to create a new exception with a normalized error message - * - * @param RequestInterface $request Request - * @param ResponseInterface $response Response received - * @param \Exception $previous Previous exception - * - * @return self - */ - public static function create( - RequestInterface $request, - ResponseInterface $response = null, - \Exception $previous = null - ) { - if (!$response) { - return new self('Error completing request', $request, null, $previous); - } - - $level = floor($response->getStatusCode() / 100); - if ($level == '4') { - $label = 'Client error response'; - $className = __NAMESPACE__ . '\\ClientException'; - } elseif ($level == '5') { - $label = 'Server error response'; - $className = __NAMESPACE__ . '\\ServerException'; - } else { - $label = 'Unsuccessful response'; - $className = __CLASS__; - } - - $message = $label . ' [url] ' . $request->getUrl() - . ' [status code] ' . $response->getStatusCode() - . ' [reason phrase] ' . $response->getReasonPhrase(); - - return new $className($message, $request, $response, $previous); - } - - /** - * Get the request that caused the exception - * - * @return RequestInterface - */ - public function getRequest() - { - return $this->request; - } - - /** - * Get the associated response - * - * @return ResponseInterface|null - */ - public function getResponse() - { - return $this->response; - } - - /** - * Check if a response was received - * - * @return bool - */ - public function hasResponse() - { - return $this->response !== null; - } -} diff --git a/core/vendor/guzzlehttp/guzzle/src/Exception/ServerException.php b/core/vendor/guzzlehttp/guzzle/src/Exception/ServerException.php deleted file mode 100644 index 7cdd340..0000000 --- a/core/vendor/guzzlehttp/guzzle/src/Exception/ServerException.php +++ /dev/null @@ -1,7 +0,0 @@ -error = $error; - } - - /** - * Get the associated error - * - * @return \LibXMLError|null - */ - public function getError() - { - return $this->error; - } -} diff --git a/core/vendor/guzzlehttp/guzzle/src/HasDataTrait.php b/core/vendor/guzzlehttp/guzzle/src/HasDataTrait.php deleted file mode 100644 index 020dfc9..0000000 --- a/core/vendor/guzzlehttp/guzzle/src/HasDataTrait.php +++ /dev/null @@ -1,75 +0,0 @@ -data); - } - - public function offsetGet($offset) - { - return isset($this->data[$offset]) ? $this->data[$offset] : null; - } - - public function offsetSet($offset, $value) - { - $this->data[$offset] = $value; - } - - public function offsetExists($offset) - { - return isset($this->data[$offset]); - } - - public function offsetUnset($offset) - { - unset($this->data[$offset]); - } - - public function toArray() - { - return $this->data; - } - - public function count() - { - return count($this->data); - } - - /** - * Get a value from the collection using a path syntax to retrieve nested - * data. - * - * @param string $path Path to traverse and retrieve a value from - * - * @return mixed|null - */ - public function getPath($path) - { - return Utils::getPath($this->data, $path); - } - - /** - * Set a value into a nested array key. Keys will be created as needed to - * set the value. - * - * @param string $path Path to set - * @param mixed $value Value to set at the key - * - * @throws \RuntimeException when trying to setPath using a nested path - * that travels through a scalar value - */ - public function setPath($path, $value) - { - Utils::setPath($this->data, $path, $value); - } -} diff --git a/core/vendor/guzzlehttp/guzzle/src/Message/AbstractMessage.php b/core/vendor/guzzlehttp/guzzle/src/Message/AbstractMessage.php deleted file mode 100644 index 0c67575..0000000 --- a/core/vendor/guzzlehttp/guzzle/src/Message/AbstractMessage.php +++ /dev/null @@ -1,253 +0,0 @@ -getBody(); - } - - public function getProtocolVersion() - { - return $this->protocolVersion; - } - - public function getBody() - { - return $this->body; - } - - public function setBody(StreamInterface $body = null) - { - if ($body === null) { - // Setting a null body will remove the body of the request - $this->removeHeader('Content-Length'); - $this->removeHeader('Transfer-Encoding'); - } - - $this->body = $body; - } - - public function addHeader($header, $value) - { - if (is_array($value)) { - $current = array_merge($this->getHeaderAsArray($header), $value); - } else { - $current = $this->getHeaderAsArray($header); - $current[] = (string) $value; - } - - $this->setHeader($header, $current); - } - - public function addHeaders(array $headers) - { - foreach ($headers as $name => $header) { - $this->addHeader($name, $header); - } - } - - public function getHeader($header) - { - $name = strtolower($header); - return isset($this->headers[$name]) - ? implode(', ', $this->headers[$name]) - : ''; - } - - public function getHeaderAsArray($header) - { - $name = strtolower($header); - return isset($this->headers[$name]) ? $this->headers[$name] : []; - } - - public function getHeaders() - { - $headers = []; - foreach ($this->headers as $name => $values) { - $headers[$this->headerNames[$name]] = $values; - } - - return $headers; - } - - public function setHeader($header, $value) - { - $header = trim($header); - $name = strtolower($header); - $this->headerNames[$name] = $header; - - if (is_array($value)) { - foreach ($value as &$v) { - $v = trim($v); - } - $this->headers[$name] = $value; - } else { - $this->headers[$name] = [trim($value)]; - } - } - - public function setHeaders(array $headers) - { - $this->headers = $this->headerNames = []; - foreach ($headers as $key => $value) { - $this->setHeader($key, $value); - } - } - - public function hasHeader($header) - { - return isset($this->headers[strtolower($header)]); - } - - public function removeHeader($header) - { - $name = strtolower($header); - unset($this->headers[$name], $this->headerNames[$name]); - } - - /** - * Parse an array of header values containing ";" separated data into an - * array of associative arrays representing the header key value pair - * data of the header. When a parameter does not contain a value, but just - * contains a key, this function will inject a key with a '' string value. - * - * @param MessageInterface $message That contains the header - * @param string $header Header to retrieve from the message - * - * @return array Returns the parsed header values. - */ - public static function parseHeader(MessageInterface $message, $header) - { - static $trimmed = "\"' \n\t\r"; - $params = $matches = []; - - foreach (self::normalizeHeader($message, $header) as $val) { - $part = []; - foreach (preg_split('/;(?=([^"]*"[^"]*")*[^"]*$)/', $val) as $kvp) { - if (preg_match_all('/<[^>]+>|[^=]+/', $kvp, $matches)) { - $m = $matches[0]; - if (isset($m[1])) { - $part[trim($m[0], $trimmed)] = trim($m[1], $trimmed); - } else { - $part[] = trim($m[0], $trimmed); - } - } - } - if ($part) { - $params[] = $part; - } - } - - return $params; - } - - /** - * Converts an array of header values that may contain comma separated - * headers into an array of headers with no comma separated values. - * - * @param MessageInterface $message That contains the header - * @param string $header Header to retrieve from the message - * - * @return array Returns the normalized header field values. - */ - public static function normalizeHeader(MessageInterface $message, $header) - { - $h = $message->getHeaderAsArray($header); - for ($i = 0, $total = count($h); $i < $total; $i++) { - if (strpos($h[$i], ',') === false) { - continue; - } - foreach (preg_split('/,(?=([^"]*"[^"]*")*[^"]*$)/', $h[$i]) as $v) { - $h[] = trim($v); - } - unset($h[$i]); - } - - return $h; - } - - /** - * Gets the start-line and headers of a message as a string - * - * @param MessageInterface $message - * - * @return string - */ - public static function getStartLineAndHeaders(MessageInterface $message) - { - return static::getStartLine($message) - . self::getHeadersAsString($message); - } - - /** - * Gets the headers of a message as a string - * - * @param MessageInterface $message - * - * @return string - */ - public static function getHeadersAsString(MessageInterface $message) - { - $result = ''; - foreach ($message->getHeaders() as $name => $values) { - $result .= "\r\n{$name}: " . implode(', ', $values); - } - - return $result; - } - - /** - * Gets the start line of a message - * - * @param MessageInterface $message - * - * @return string - * @throws \InvalidArgumentException - */ - public static function getStartLine(MessageInterface $message) - { - if ($message instanceof RequestInterface) { - return trim($message->getMethod() . ' ' - . $message->getResource()) - . ' HTTP/' . $message->getProtocolVersion(); - } elseif ($message instanceof ResponseInterface) { - return 'HTTP/' . $message->getProtocolVersion() . ' ' - . $message->getStatusCode() . ' ' - . $message->getReasonPhrase(); - } else { - throw new \InvalidArgumentException('Unknown message type'); - } - } - - /** - * Accepts and modifies the options provided to the message in the - * constructor. - * - * Can be overridden in subclasses as necessary. - * - * @param array $options Options array passed by reference. - */ - protected function handleOptions(array &$options) - { - if (isset($options['protocol_version'])) { - $this->protocolVersion = $options['protocol_version']; - } - } -} diff --git a/core/vendor/guzzlehttp/guzzle/src/Message/FutureResponse.php b/core/vendor/guzzlehttp/guzzle/src/Message/FutureResponse.php deleted file mode 100644 index 5e5037e..0000000 --- a/core/vendor/guzzlehttp/guzzle/src/Message/FutureResponse.php +++ /dev/null @@ -1,158 +0,0 @@ -then($onFulfilled, $onRejected, $onProgress), - [$future, 'wait'], - [$future, 'cancel'] - ); - } - - public function getStatusCode() - { - return $this->_value->getStatusCode(); - } - - public function setStatusCode($code) - { - $this->_value->setStatusCode($code); - } - - public function getReasonPhrase() - { - return $this->_value->getReasonPhrase(); - } - - public function setReasonPhrase($phrase) - { - $this->_value->setReasonPhrase($phrase); - } - - public function getEffectiveUrl() - { - return $this->_value->getEffectiveUrl(); - } - - public function setEffectiveUrl($url) - { - $this->_value->setEffectiveUrl($url); - } - - public function json(array $config = []) - { - return $this->_value->json($config); - } - - public function xml(array $config = []) - { - return $this->_value->xml($config); - } - - public function __toString() - { - try { - return $this->_value->__toString(); - } catch (\Exception $e) { - trigger_error($e->getMessage(), E_USER_WARNING); - return ''; - } - } - - public function getProtocolVersion() - { - return $this->_value->getProtocolVersion(); - } - - public function setBody(StreamInterface $body = null) - { - $this->_value->setBody($body); - } - - public function getBody() - { - return $this->_value->getBody(); - } - - public function getHeaders() - { - return $this->_value->getHeaders(); - } - - public function getHeader($header) - { - return $this->_value->getHeader($header); - } - - public function getHeaderAsArray($header) - { - return $this->_value->getHeaderAsArray($header); - } - - public function hasHeader($header) - { - return $this->_value->hasHeader($header); - } - - public function removeHeader($header) - { - $this->_value->removeHeader($header); - } - - public function addHeader($header, $value) - { - $this->_value->addHeader($header, $value); - } - - public function addHeaders(array $headers) - { - $this->_value->addHeaders($headers); - } - - public function setHeader($header, $value) - { - $this->_value->setHeader($header, $value); - } - - public function setHeaders(array $headers) - { - $this->_value->setHeaders($headers); - } -} diff --git a/core/vendor/guzzlehttp/guzzle/src/Message/MessageFactory.php b/core/vendor/guzzlehttp/guzzle/src/Message/MessageFactory.php deleted file mode 100644 index 5b52ad6..0000000 --- a/core/vendor/guzzlehttp/guzzle/src/Message/MessageFactory.php +++ /dev/null @@ -1,368 +0,0 @@ - 1, 'timeout' => 1, 'verify' => 1, 'ssl_key' => 1, - 'cert' => 1, 'proxy' => 1, 'debug' => 1, 'save_to' => 1, 'stream' => 1, - 'expect' => 1, 'future' => 1 - ]; - - /** @var array Default allow_redirects request option settings */ - private static $defaultRedirect = [ - 'max' => 5, - 'strict' => false, - 'referer' => false - ]; - - /** - * @param array $customOptions Associative array of custom request option - * names mapping to functions used to apply - * the option. The function accepts the request - * and the option value to apply. - */ - public function __construct(array $customOptions = []) - { - $this->errorPlugin = new HttpError(); - $this->redirectPlugin = new Redirect(); - $this->customOptions = $customOptions; - } - - public function createResponse( - $statusCode, - array $headers = [], - $body = null, - array $options = [] - ) { - if (null !== $body) { - $body = Stream::factory($body); - } - - return new Response($statusCode, $headers, $body, $options); - } - - public function createRequest($method, $url, array $options = []) - { - // Handle the request protocol version option that needs to be - // specified in the request constructor. - if (isset($options['version'])) { - $options['config']['protocol_version'] = $options['version']; - unset($options['version']); - } - - $request = new Request($method, $url, [], null, - isset($options['config']) ? $options['config'] : []); - - unset($options['config']); - - // Use a POST body by default - if ($method == 'POST' - && !isset($options['body']) - && !isset($options['json']) - ) { - $options['body'] = []; - } - - if ($options) { - $this->applyOptions($request, $options); - } - - return $request; - } - - /** - * Create a request or response object from an HTTP message string - * - * @param string $message Message to parse - * - * @return RequestInterface|ResponseInterface - * @throws \InvalidArgumentException if unable to parse a message - */ - public function fromMessage($message) - { - static $parser; - if (!$parser) { - $parser = new MessageParser(); - } - - // Parse a response - if (strtoupper(substr($message, 0, 4)) == 'HTTP') { - $data = $parser->parseResponse($message); - return $this->createResponse( - $data['code'], - $data['headers'], - $data['body'] === '' ? null : $data['body'], - $data - ); - } - - // Parse a request - if (!($data = ($parser->parseRequest($message)))) { - throw new \InvalidArgumentException('Unable to parse request'); - } - - return $this->createRequest( - $data['method'], - Url::buildUrl($data['request_url']), - [ - 'headers' => $data['headers'], - 'body' => $data['body'] === '' ? null : $data['body'], - 'config' => [ - 'protocol_version' => $data['protocol_version'] - ] - ] - ); - } - - /** - * Apply POST fields and files to a request to attempt to give an accurate - * representation. - * - * @param RequestInterface $request Request to update - * @param array $body Body to apply - */ - protected function addPostData(RequestInterface $request, array $body) - { - static $fields = ['string' => true, 'array' => true, 'NULL' => true, - 'boolean' => true, 'double' => true, 'integer' => true]; - - $post = new PostBody(); - foreach ($body as $key => $value) { - if (isset($fields[gettype($value)])) { - $post->setField($key, $value); - } elseif ($value instanceof PostFileInterface) { - $post->addFile($value); - } else { - $post->addFile(new PostFile($key, $value)); - } - } - - if ($request->getHeader('Content-Type') == 'multipart/form-data') { - $post->forceMultipartUpload(true); - } - - $request->setBody($post); - } - - protected function applyOptions( - RequestInterface $request, - array $options = [] - ) { - $config = $request->getConfig(); - $emitter = $request->getEmitter(); - - foreach ($options as $key => $value) { - - if (isset(self::$configMap[$key])) { - $config[$key] = $value; - continue; - } - - switch ($key) { - - case 'allow_redirects': - - if ($value === false) { - continue; - } - - if ($value === true) { - $value = self::$defaultRedirect; - } elseif (!isset($value['max'])) { - throw new Iae('allow_redirects must be true, false, or an ' - . 'array that contains the \'max\' key'); - } else { - // Merge the default settings with the provided settings - $value += self::$defaultRedirect; - } - - $config['redirect'] = $value; - $emitter->attach($this->redirectPlugin); - break; - - case 'decode_content': - - if ($value === false) { - continue; - } - - $config['decode_content'] = true; - if ($value !== true) { - $request->setHeader('Accept-Encoding', $value); - } - break; - - case 'headers': - - if (!is_array($value)) { - throw new Iae('header value must be an array'); - } - - // Do not overwrite existing headers - foreach ($value as $k => $v) { - if (!$request->hasHeader($k)) { - $request->setHeader($k, $v); - } - } - break; - - case 'exceptions': - - if ($value === true) { - $emitter->attach($this->errorPlugin); - } - break; - - case 'body': - - if (is_array($value)) { - $this->addPostData($request, $value); - } elseif ($value !== null) { - $request->setBody(Stream::factory($value)); - } - break; - - case 'auth': - - if (!$value) { - continue; - } - - if (is_array($value)) { - $type = isset($value[2]) ? strtolower($value[2]) : 'basic'; - } else { - $type = strtolower($value); - } - - $config['auth'] = $value; - - if ($type == 'basic') { - $request->setHeader( - 'Authorization', - 'Basic ' . base64_encode("$value[0]:$value[1]") - ); - } elseif ($type == 'digest') { - // @todo: Do not rely on curl - $config->setPath('curl/' . CURLOPT_HTTPAUTH, CURLAUTH_DIGEST); - $config->setPath('curl/' . CURLOPT_USERPWD, "$value[0]:$value[1]"); - } - break; - - case 'query': - - if ($value instanceof Query) { - $original = $request->getQuery(); - // Do not overwrite existing query string variables by - // overwriting the object with the query string data passed - // in the URL - $value->overwriteWith($original->toArray()); - $request->setQuery($value); - } elseif (is_array($value)) { - // Do not overwrite existing query string variables - $query = $request->getQuery(); - foreach ($value as $k => $v) { - if (!isset($query[$k])) { - $query[$k] = $v; - } - } - } else { - throw new Iae('query must be an array or Query object'); - } - break; - - case 'cookies': - - if ($value === true) { - static $cookie = null; - if (!$cookie) { - $cookie = new Cookie(); - } - $emitter->attach($cookie); - } elseif (is_array($value)) { - $emitter->attach( - new Cookie(CookieJar::fromArray($value, $request->getHost())) - ); - } elseif ($value instanceof CookieJarInterface) { - $emitter->attach(new Cookie($value)); - } elseif ($value !== false) { - throw new Iae('cookies must be an array, true, or CookieJarInterface'); - } - break; - - case 'events': - - if (!is_array($value)) { - throw new Iae('events must be an array'); - } - - $this->attachListeners($request, - $this->prepareListeners( - $value, - ['before', 'complete', 'error', 'progress', 'end'] - ) - ); - break; - - case 'subscribers': - - if (!is_array($value)) { - throw new Iae('subscribers must be an array'); - } - - foreach ($value as $subscribers) { - $emitter->attach($subscribers); - } - break; - - case 'json': - - $request->setBody(Stream::factory(json_encode($value))); - if (!$request->hasHeader('Content-Type')) { - $request->setHeader('Content-Type', 'application/json'); - } - break; - - default: - - // Check for custom handler functions. - if (isset($this->customOptions[$key])) { - $fn = $this->customOptions[$key]; - $fn($request, $value); - continue; - } - - throw new Iae("No method can handle the {$key} config key"); - } - } - } -} diff --git a/core/vendor/guzzlehttp/guzzle/src/Message/MessageFactoryInterface.php b/core/vendor/guzzlehttp/guzzle/src/Message/MessageFactoryInterface.php deleted file mode 100644 index 57c43e5..0000000 --- a/core/vendor/guzzlehttp/guzzle/src/Message/MessageFactoryInterface.php +++ /dev/null @@ -1,71 +0,0 @@ -getHeaders() as $name => $values) { - * echo $name . ": " . implode(", ", $values); - * } - * - * @return array Returns an associative array of the message's headers. - */ - public function getHeaders(); - - /** - * Retrieve a header by the given case-insensitive name. - * - * @param string $header Case-insensitive header name. - * - * @return string - */ - public function getHeader($header); - - /** - * Retrieves a header by the given case-insensitive name as an array of strings. - * - * @param string $header Case-insensitive header name. - * - * @return string[] - */ - public function getHeaderAsArray($header); - - /** - * Checks if a header exists by the given case-insensitive name. - * - * @param string $header Case-insensitive header name. - * - * @return bool Returns true if any header names match the given header - * name using a case-insensitive string comparison. Returns false if - * no matching header name is found in the message. - */ - public function hasHeader($header); - - /** - * Remove a specific header by case-insensitive name. - * - * @param string $header Case-insensitive header name. - */ - public function removeHeader($header); - - /** - * Appends a header value to any existing values associated with the - * given header name. - * - * @param string $header Header name to add - * @param string $value Value of the header - */ - public function addHeader($header, $value); - - /** - * Merges in an associative array of headers. - * - * Each array key MUST be a string representing the case-insensitive name - * of a header. Each value MUST be either a string or an array of strings. - * For each value, the value is appended to any existing header of the same - * name, or, if a header does not already exist by the given name, then the - * header is added. - * - * @param array $headers Associative array of headers to add to the message - */ - public function addHeaders(array $headers); - - /** - * Sets a header, replacing any existing values of any headers with the - * same case-insensitive name. - * - * The header values MUST be a string or an array of strings. - * - * @param string $header Header name - * @param string|array $value Header value(s) - */ - public function setHeader($header, $value); - - /** - * Sets headers, replacing any headers that have already been set on the - * message. - * - * The array keys MUST be a string. The array values must be either a - * string or an array of strings. - * - * @param array $headers Headers to set. - */ - public function setHeaders(array $headers); -} diff --git a/core/vendor/guzzlehttp/guzzle/src/Message/MessageParser.php b/core/vendor/guzzlehttp/guzzle/src/Message/MessageParser.php deleted file mode 100644 index c3cc195..0000000 --- a/core/vendor/guzzlehttp/guzzle/src/Message/MessageParser.php +++ /dev/null @@ -1,171 +0,0 @@ -parseMessage($message))) { - return false; - } - - // Parse the protocol and protocol version - if (isset($parts['start_line'][2])) { - $startParts = explode('/', $parts['start_line'][2]); - $protocol = strtoupper($startParts[0]); - $version = isset($startParts[1]) ? $startParts[1] : '1.1'; - } else { - $protocol = 'HTTP'; - $version = '1.1'; - } - - $parsed = [ - 'method' => strtoupper($parts['start_line'][0]), - 'protocol' => $protocol, - 'protocol_version' => $version, - 'headers' => $parts['headers'], - 'body' => $parts['body'] - ]; - - $parsed['request_url'] = $this->getUrlPartsFromMessage( - (isset($parts['start_line'][1]) ? $parts['start_line'][1] : ''), $parsed); - - return $parsed; - } - - /** - * Parse an HTTP response message into an associative array of parts. - * - * @param string $message HTTP response to parse - * - * @return array|bool Returns false if the message is invalid - */ - public function parseResponse($message) - { - if (!($parts = $this->parseMessage($message))) { - return false; - } - - list($protocol, $version) = explode('/', trim($parts['start_line'][0])); - - return [ - 'protocol' => $protocol, - 'protocol_version' => $version, - 'code' => $parts['start_line'][1], - 'reason_phrase' => isset($parts['start_line'][2]) ? $parts['start_line'][2] : '', - 'headers' => $parts['headers'], - 'body' => $parts['body'] - ]; - } - - /** - * Parse a message into parts - * - * @param string $message Message to parse - * - * @return array|bool - */ - private function parseMessage($message) - { - if (!$message) { - return false; - } - - $startLine = null; - $headers = []; - $body = ''; - - // Iterate over each line in the message, accounting for line endings - $lines = preg_split('/(\\r?\\n)/', $message, -1, PREG_SPLIT_DELIM_CAPTURE); - for ($i = 0, $totalLines = count($lines); $i < $totalLines; $i += 2) { - - $line = $lines[$i]; - - // If two line breaks were encountered, then this is the end of body - if (empty($line)) { - if ($i < $totalLines - 1) { - $body = implode('', array_slice($lines, $i + 2)); - } - break; - } - - // Parse message headers - if (!$startLine) { - $startLine = explode(' ', $line, 3); - } elseif (strpos($line, ':')) { - $parts = explode(':', $line, 2); - $key = trim($parts[0]); - $value = isset($parts[1]) ? trim($parts[1]) : ''; - if (!isset($headers[$key])) { - $headers[$key] = $value; - } elseif (!is_array($headers[$key])) { - $headers[$key] = [$headers[$key], $value]; - } else { - $headers[$key][] = $value; - } - } - } - - return [ - 'start_line' => $startLine, - 'headers' => $headers, - 'body' => $body - ]; - } - - /** - * Create URL parts from HTTP message parts - * - * @param string $requestUrl Associated URL - * @param array $parts HTTP message parts - * - * @return array - */ - private function getUrlPartsFromMessage($requestUrl, array $parts) - { - // Parse the URL information from the message - $urlParts = ['path' => $requestUrl, 'scheme' => 'http']; - - // Check for the Host header - if (isset($parts['headers']['Host'])) { - $urlParts['host'] = $parts['headers']['Host']; - } elseif (isset($parts['headers']['host'])) { - $urlParts['host'] = $parts['headers']['host']; - } else { - $urlParts['host'] = null; - } - - if (false === strpos($urlParts['host'], ':')) { - $urlParts['port'] = ''; - } else { - $hostParts = explode(':', $urlParts['host']); - $urlParts['host'] = trim($hostParts[0]); - $urlParts['port'] = (int) trim($hostParts[1]); - if ($urlParts['port'] == 443) { - $urlParts['scheme'] = 'https'; - } - } - - // Check if a query is present - $path = $urlParts['path']; - $qpos = strpos($path, '?'); - if ($qpos) { - $urlParts['query'] = substr($path, $qpos + 1); - $urlParts['path'] = substr($path, 0, $qpos); - } else { - $urlParts['query'] = ''; - } - - return $urlParts; - } -} diff --git a/core/vendor/guzzlehttp/guzzle/src/Message/Request.php b/core/vendor/guzzlehttp/guzzle/src/Message/Request.php deleted file mode 100644 index 4dbe32e..0000000 --- a/core/vendor/guzzlehttp/guzzle/src/Message/Request.php +++ /dev/null @@ -1,195 +0,0 @@ -setUrl($url); - $this->method = strtoupper($method); - $this->handleOptions($options); - $this->transferOptions = new Collection($options); - $this->addPrepareEvent(); - - if ($body !== null) { - $this->setBody($body); - } - - if ($headers) { - foreach ($headers as $key => $value) { - $this->setHeader($key, $value); - } - } - } - - public function __clone() - { - if ($this->emitter) { - $this->emitter = clone $this->emitter; - } - $this->transferOptions = clone $this->transferOptions; - $this->url = clone $this->url; - } - - public function setUrl($url) - { - $this->url = $url instanceof Url ? $url : Url::fromString($url); - $this->updateHostHeaderFromUrl(); - } - - public function getUrl() - { - return (string) $this->url; - } - - public function setQuery($query) - { - $this->url->setQuery($query); - } - - public function getQuery() - { - return $this->url->getQuery(); - } - - public function setMethod($method) - { - $this->method = strtoupper($method); - } - - public function getMethod() - { - return $this->method; - } - - public function getScheme() - { - return $this->url->getScheme(); - } - - public function setScheme($scheme) - { - $this->url->setScheme($scheme); - } - - public function getPort() - { - return $this->url->getPort(); - } - - public function setPort($port) - { - $this->url->setPort($port); - $this->updateHostHeaderFromUrl(); - } - - public function getHost() - { - return $this->url->getHost(); - } - - public function setHost($host) - { - $this->url->setHost($host); - $this->updateHostHeaderFromUrl(); - } - - public function getPath() - { - return '/' . ltrim($this->url->getPath(), '/'); - } - - public function setPath($path) - { - $this->url->setPath($path); - } - - public function getResource() - { - $resource = $this->getPath(); - if ($query = (string) $this->url->getQuery()) { - $resource .= '?' . $query; - } - - return $resource; - } - - public function getConfig() - { - return $this->transferOptions; - } - - protected function handleOptions(array &$options) - { - parent::handleOptions($options); - // Use a custom emitter if one is specified, and remove it from - // options that are exposed through getConfig() - if (isset($options['emitter'])) { - $this->emitter = $options['emitter']; - unset($options['emitter']); - } - } - - /** - * Adds a subscriber that ensures a request's body is prepared before - * sending. - */ - private function addPrepareEvent() - { - static $subscriber; - if (!$subscriber) { - $subscriber = new Prepare(); - } - - $this->getEmitter()->attach($subscriber); - } - - private function updateHostHeaderFromUrl() - { - $port = $this->url->getPort(); - $scheme = $this->url->getScheme(); - if ($host = $this->url->getHost()) { - if (($port == 80 && $scheme == 'http') || - ($port == 443 && $scheme == 'https') - ) { - $this->setHeader('Host', $host); - } else { - $this->setHeader('Host', "{$host}:{$port}"); - } - } - } -} diff --git a/core/vendor/guzzlehttp/guzzle/src/Message/RequestInterface.php b/core/vendor/guzzlehttp/guzzle/src/Message/RequestInterface.php deleted file mode 100644 index f6a69d1..0000000 --- a/core/vendor/guzzlehttp/guzzle/src/Message/RequestInterface.php +++ /dev/null @@ -1,136 +0,0 @@ - 'Continue', - 101 => 'Switching Protocols', - 102 => 'Processing', - 200 => 'OK', - 201 => 'Created', - 202 => 'Accepted', - 203 => 'Non-Authoritative Information', - 204 => 'No Content', - 205 => 'Reset Content', - 206 => 'Partial Content', - 207 => 'Multi-Status', - 208 => 'Already Reported', - 226 => 'IM Used', - 300 => 'Multiple Choices', - 301 => 'Moved Permanently', - 302 => 'Found', - 303 => 'See Other', - 304 => 'Not Modified', - 305 => 'Use Proxy', - 307 => 'Temporary Redirect', - 308 => 'Permanent Redirect', - 400 => 'Bad Request', - 401 => 'Unauthorized', - 402 => 'Payment Required', - 403 => 'Forbidden', - 404 => 'Not Found', - 405 => 'Method Not Allowed', - 406 => 'Not Acceptable', - 407 => 'Proxy Authentication Required', - 408 => 'Request Timeout', - 409 => 'Conflict', - 410 => 'Gone', - 411 => 'Length Required', - 412 => 'Precondition Failed', - 413 => 'Request Entity Too Large', - 414 => 'Request-URI Too Long', - 415 => 'Unsupported Media Type', - 416 => 'Requested Range Not Satisfiable', - 417 => 'Expectation Failed', - 422 => 'Unprocessable Entity', - 423 => 'Locked', - 424 => 'Failed Dependency', - 425 => 'Reserved for WebDAV advanced collections expired proposal', - 426 => 'Upgrade required', - 428 => 'Precondition Required', - 429 => 'Too Many Requests', - 431 => 'Request Header Fields Too Large', - 500 => 'Internal Server Error', - 501 => 'Not Implemented', - 502 => 'Bad Gateway', - 503 => 'Service Unavailable', - 504 => 'Gateway Timeout', - 505 => 'HTTP Version Not Supported', - 506 => 'Variant Also Negotiates (Experimental)', - 507 => 'Insufficient Storage', - 508 => 'Loop Detected', - 510 => 'Not Extended', - 511 => 'Network Authentication Required', - ]; - - /** @var string The reason phrase of the response (human readable code) */ - private $reasonPhrase; - - /** @var string The status code of the response */ - private $statusCode; - - /** @var string The effective URL that returned this response */ - private $effectiveUrl; - - /** - * @param int|string $statusCode The response status code (e.g. 200) - * @param array $headers The response headers - * @param StreamInterface $body The body of the response - * @param array $options Response message options - * - reason_phrase: Set a custom reason phrase - * - protocol_version: Set a custom protocol version - */ - public function __construct( - $statusCode, - array $headers = [], - StreamInterface $body = null, - array $options = [] - ) { - $this->statusCode = (int) $statusCode; - $this->handleOptions($options); - - // Assume a reason phrase if one was not applied as an option - if (!$this->reasonPhrase && - isset(self::$statusTexts[$this->statusCode]) - ) { - $this->reasonPhrase = self::$statusTexts[$this->statusCode]; - } - - if ($headers) { - $this->setHeaders($headers); - } - - if ($body) { - $this->setBody($body); - } - } - - public function getStatusCode() - { - return $this->statusCode; - } - - public function setStatusCode($code) - { - return $this->statusCode = (int) $code; - } - - public function getReasonPhrase() - { - return $this->reasonPhrase; - } - - public function setReasonPhrase($phrase) - { - return $this->reasonPhrase = $phrase; - } - - public function json(array $config = []) - { - try { - return Utils::jsonDecode( - (string) $this->getBody(), - isset($config['object']) ? !$config['object'] : true, - 512, - isset($config['big_int_strings']) ? JSON_BIGINT_AS_STRING : 0 - ); - } catch (\InvalidArgumentException $e) { - throw new ParseException( - $e->getMessage(), - $this - ); - } - } - - public function xml(array $config = []) - { - $disableEntities = libxml_disable_entity_loader(true); - $internalErrors = libxml_use_internal_errors(true); - - try { - // Allow XML to be retrieved even if there is no response body - $xml = new \SimpleXMLElement( - (string) $this->getBody() ?: '', - isset($config['libxml_options']) ? $config['libxml_options'] : LIBXML_NONET, - false, - isset($config['ns']) ? $config['ns'] : '', - isset($config['ns_is_prefix']) ? $config['ns_is_prefix'] : false - ); - libxml_disable_entity_loader($disableEntities); - libxml_use_internal_errors($internalErrors); - } catch (\Exception $e) { - libxml_disable_entity_loader($disableEntities); - libxml_use_internal_errors($internalErrors); - throw new XmlParseException( - 'Unable to parse response body into XML: ' . $e->getMessage(), - $this, - $e, - (libxml_get_last_error()) ?: null - ); - } - - return $xml; - } - - public function getEffectiveUrl() - { - return $this->effectiveUrl; - } - - public function setEffectiveUrl($url) - { - $this->effectiveUrl = $url; - } - - /** - * Accepts and modifies the options provided to the response in the - * constructor. - * - * @param array $options Options array passed by reference. - */ - protected function handleOptions(array &$options = []) - { - parent::handleOptions($options); - if (isset($options['reason_phrase'])) { - $this->reasonPhrase = $options['reason_phrase']; - } - } -} diff --git a/core/vendor/guzzlehttp/guzzle/src/Message/ResponseInterface.php b/core/vendor/guzzlehttp/guzzle/src/Message/ResponseInterface.php deleted file mode 100644 index c0ae9be..0000000 --- a/core/vendor/guzzlehttp/guzzle/src/Message/ResponseInterface.php +++ /dev/null @@ -1,111 +0,0 @@ - 'text/vnd.in3d.3dml', - '3g2' => 'video/3gpp2', - '3gp' => 'video/3gpp', - '7z' => 'application/x-7z-compressed', - 'aab' => 'application/x-authorware-bin', - 'aac' => 'audio/x-aac', - 'aam' => 'application/x-authorware-map', - 'aas' => 'application/x-authorware-seg', - 'abw' => 'application/x-abiword', - 'ac' => 'application/pkix-attr-cert', - 'acc' => 'application/vnd.americandynamics.acc', - 'ace' => 'application/x-ace-compressed', - 'acu' => 'application/vnd.acucobol', - 'acutc' => 'application/vnd.acucorp', - 'adp' => 'audio/adpcm', - 'aep' => 'application/vnd.audiograph', - 'afm' => 'application/x-font-type1', - 'afp' => 'application/vnd.ibm.modcap', - 'ahead' => 'application/vnd.ahead.space', - 'ai' => 'application/postscript', - 'aif' => 'audio/x-aiff', - 'aifc' => 'audio/x-aiff', - 'aiff' => 'audio/x-aiff', - 'air' => 'application/vnd.adobe.air-application-installer-package+zip', - 'ait' => 'application/vnd.dvb.ait', - 'ami' => 'application/vnd.amiga.ami', - 'apk' => 'application/vnd.android.package-archive', - 'application' => 'application/x-ms-application', - 'apr' => 'application/vnd.lotus-approach', - 'asa' => 'text/plain', - 'asax' => 'application/octet-stream', - 'asc' => 'application/pgp-signature', - 'ascx' => 'text/plain', - 'asf' => 'video/x-ms-asf', - 'ashx' => 'text/plain', - 'asm' => 'text/x-asm', - 'asmx' => 'text/plain', - 'aso' => 'application/vnd.accpac.simply.aso', - 'asp' => 'text/plain', - 'aspx' => 'text/plain', - 'asx' => 'video/x-ms-asf', - 'atc' => 'application/vnd.acucorp', - 'atom' => 'application/atom+xml', - 'atomcat' => 'application/atomcat+xml', - 'atomsvc' => 'application/atomsvc+xml', - 'atx' => 'application/vnd.antix.game-component', - 'au' => 'audio/basic', - 'avi' => 'video/x-msvideo', - 'aw' => 'application/applixware', - 'axd' => 'text/plain', - 'azf' => 'application/vnd.airzip.filesecure.azf', - 'azs' => 'application/vnd.airzip.filesecure.azs', - 'azw' => 'application/vnd.amazon.ebook', - 'bat' => 'application/x-msdownload', - 'bcpio' => 'application/x-bcpio', - 'bdf' => 'application/x-font-bdf', - 'bdm' => 'application/vnd.syncml.dm+wbxml', - 'bed' => 'application/vnd.realvnc.bed', - 'bh2' => 'application/vnd.fujitsu.oasysprs', - 'bin' => 'application/octet-stream', - 'bmi' => 'application/vnd.bmi', - 'bmp' => 'image/bmp', - 'book' => 'application/vnd.framemaker', - 'box' => 'application/vnd.previewsystems.box', - 'boz' => 'application/x-bzip2', - 'bpk' => 'application/octet-stream', - 'btif' => 'image/prs.btif', - 'bz' => 'application/x-bzip', - 'bz2' => 'application/x-bzip2', - 'c' => 'text/x-c', - 'c11amc' => 'application/vnd.cluetrust.cartomobile-config', - 'c11amz' => 'application/vnd.cluetrust.cartomobile-config-pkg', - 'c4d' => 'application/vnd.clonk.c4group', - 'c4f' => 'application/vnd.clonk.c4group', - 'c4g' => 'application/vnd.clonk.c4group', - 'c4p' => 'application/vnd.clonk.c4group', - 'c4u' => 'application/vnd.clonk.c4group', - 'cab' => 'application/vnd.ms-cab-compressed', - 'car' => 'application/vnd.curl.car', - 'cat' => 'application/vnd.ms-pki.seccat', - 'cc' => 'text/x-c', - 'cct' => 'application/x-director', - 'ccxml' => 'application/ccxml+xml', - 'cdbcmsg' => 'application/vnd.contact.cmsg', - 'cdf' => 'application/x-netcdf', - 'cdkey' => 'application/vnd.mediastation.cdkey', - 'cdmia' => 'application/cdmi-capability', - 'cdmic' => 'application/cdmi-container', - 'cdmid' => 'application/cdmi-domain', - 'cdmio' => 'application/cdmi-object', - 'cdmiq' => 'application/cdmi-queue', - 'cdx' => 'chemical/x-cdx', - 'cdxml' => 'application/vnd.chemdraw+xml', - 'cdy' => 'application/vnd.cinderella', - 'cer' => 'application/pkix-cert', - 'cfc' => 'application/x-coldfusion', - 'cfm' => 'application/x-coldfusion', - 'cgm' => 'image/cgm', - 'chat' => 'application/x-chat', - 'chm' => 'application/vnd.ms-htmlhelp', - 'chrt' => 'application/vnd.kde.kchart', - 'cif' => 'chemical/x-cif', - 'cii' => 'application/vnd.anser-web-certificate-issue-initiation', - 'cil' => 'application/vnd.ms-artgalry', - 'cla' => 'application/vnd.claymore', - 'class' => 'application/java-vm', - 'clkk' => 'application/vnd.crick.clicker.keyboard', - 'clkp' => 'application/vnd.crick.clicker.palette', - 'clkt' => 'application/vnd.crick.clicker.template', - 'clkw' => 'application/vnd.crick.clicker.wordbank', - 'clkx' => 'application/vnd.crick.clicker', - 'clp' => 'application/x-msclip', - 'cmc' => 'application/vnd.cosmocaller', - 'cmdf' => 'chemical/x-cmdf', - 'cml' => 'chemical/x-cml', - 'cmp' => 'application/vnd.yellowriver-custom-menu', - 'cmx' => 'image/x-cmx', - 'cod' => 'application/vnd.rim.cod', - 'com' => 'application/x-msdownload', - 'conf' => 'text/plain', - 'cpio' => 'application/x-cpio', - 'cpp' => 'text/x-c', - 'cpt' => 'application/mac-compactpro', - 'crd' => 'application/x-mscardfile', - 'crl' => 'application/pkix-crl', - 'crt' => 'application/x-x509-ca-cert', - 'cryptonote' => 'application/vnd.rig.cryptonote', - 'cs' => 'text/plain', - 'csh' => 'application/x-csh', - 'csml' => 'chemical/x-csml', - 'csp' => 'application/vnd.commonspace', - 'css' => 'text/css', - 'cst' => 'application/x-director', - 'csv' => 'text/csv', - 'cu' => 'application/cu-seeme', - 'curl' => 'text/vnd.curl', - 'cww' => 'application/prs.cww', - 'cxt' => 'application/x-director', - 'cxx' => 'text/x-c', - 'dae' => 'model/vnd.collada+xml', - 'daf' => 'application/vnd.mobius.daf', - 'dataless' => 'application/vnd.fdsn.seed', - 'davmount' => 'application/davmount+xml', - 'dcr' => 'application/x-director', - 'dcurl' => 'text/vnd.curl.dcurl', - 'dd2' => 'application/vnd.oma.dd2+xml', - 'ddd' => 'application/vnd.fujixerox.ddd', - 'deb' => 'application/x-debian-package', - 'def' => 'text/plain', - 'deploy' => 'application/octet-stream', - 'der' => 'application/x-x509-ca-cert', - 'dfac' => 'application/vnd.dreamfactory', - 'dic' => 'text/x-c', - 'dir' => 'application/x-director', - 'dis' => 'application/vnd.mobius.dis', - 'dist' => 'application/octet-stream', - 'distz' => 'application/octet-stream', - 'djv' => 'image/vnd.djvu', - 'djvu' => 'image/vnd.djvu', - 'dll' => 'application/x-msdownload', - 'dmg' => 'application/octet-stream', - 'dms' => 'application/octet-stream', - 'dna' => 'application/vnd.dna', - 'doc' => 'application/msword', - 'docm' => 'application/vnd.ms-word.document.macroenabled.12', - 'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', - 'dot' => 'application/msword', - 'dotm' => 'application/vnd.ms-word.template.macroenabled.12', - 'dotx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.template', - 'dp' => 'application/vnd.osgi.dp', - 'dpg' => 'application/vnd.dpgraph', - 'dra' => 'audio/vnd.dra', - 'dsc' => 'text/prs.lines.tag', - 'dssc' => 'application/dssc+der', - 'dtb' => 'application/x-dtbook+xml', - 'dtd' => 'application/xml-dtd', - 'dts' => 'audio/vnd.dts', - 'dtshd' => 'audio/vnd.dts.hd', - 'dump' => 'application/octet-stream', - 'dvi' => 'application/x-dvi', - 'dwf' => 'model/vnd.dwf', - 'dwg' => 'image/vnd.dwg', - 'dxf' => 'image/vnd.dxf', - 'dxp' => 'application/vnd.spotfire.dxp', - 'dxr' => 'application/x-director', - 'ecelp4800' => 'audio/vnd.nuera.ecelp4800', - 'ecelp7470' => 'audio/vnd.nuera.ecelp7470', - 'ecelp9600' => 'audio/vnd.nuera.ecelp9600', - 'ecma' => 'application/ecmascript', - 'edm' => 'application/vnd.novadigm.edm', - 'edx' => 'application/vnd.novadigm.edx', - 'efif' => 'application/vnd.picsel', - 'ei6' => 'application/vnd.pg.osasli', - 'elc' => 'application/octet-stream', - 'eml' => 'message/rfc822', - 'emma' => 'application/emma+xml', - 'eol' => 'audio/vnd.digital-winds', - 'eot' => 'application/vnd.ms-fontobject', - 'eps' => 'application/postscript', - 'epub' => 'application/epub+zip', - 'es3' => 'application/vnd.eszigno3+xml', - 'esf' => 'application/vnd.epson.esf', - 'et3' => 'application/vnd.eszigno3+xml', - 'etx' => 'text/x-setext', - 'exe' => 'application/x-msdownload', - 'exi' => 'application/exi', - 'ext' => 'application/vnd.novadigm.ext', - 'ez' => 'application/andrew-inset', - 'ez2' => 'application/vnd.ezpix-album', - 'ez3' => 'application/vnd.ezpix-package', - 'f' => 'text/x-fortran', - 'f4v' => 'video/x-f4v', - 'f77' => 'text/x-fortran', - 'f90' => 'text/x-fortran', - 'fbs' => 'image/vnd.fastbidsheet', - 'fcs' => 'application/vnd.isac.fcs', - 'fdf' => 'application/vnd.fdf', - 'fe_launch' => 'application/vnd.denovo.fcselayout-link', - 'fg5' => 'application/vnd.fujitsu.oasysgp', - 'fgd' => 'application/x-director', - 'fh' => 'image/x-freehand', - 'fh4' => 'image/x-freehand', - 'fh5' => 'image/x-freehand', - 'fh7' => 'image/x-freehand', - 'fhc' => 'image/x-freehand', - 'fig' => 'application/x-xfig', - 'fli' => 'video/x-fli', - 'flo' => 'application/vnd.micrografx.flo', - 'flv' => 'video/x-flv', - 'flw' => 'application/vnd.kde.kivio', - 'flx' => 'text/vnd.fmi.flexstor', - 'fly' => 'text/vnd.fly', - 'fm' => 'application/vnd.framemaker', - 'fnc' => 'application/vnd.frogans.fnc', - 'for' => 'text/x-fortran', - 'fpx' => 'image/vnd.fpx', - 'frame' => 'application/vnd.framemaker', - 'fsc' => 'application/vnd.fsc.weblaunch', - 'fst' => 'image/vnd.fst', - 'ftc' => 'application/vnd.fluxtime.clip', - 'fti' => 'application/vnd.anser-web-funds-transfer-initiation', - 'fvt' => 'video/vnd.fvt', - 'fxp' => 'application/vnd.adobe.fxp', - 'fxpl' => 'application/vnd.adobe.fxp', - 'fzs' => 'application/vnd.fuzzysheet', - 'g2w' => 'application/vnd.geoplan', - 'g3' => 'image/g3fax', - 'g3w' => 'application/vnd.geospace', - 'gac' => 'application/vnd.groove-account', - 'gdl' => 'model/vnd.gdl', - 'geo' => 'application/vnd.dynageo', - 'gex' => 'application/vnd.geometry-explorer', - 'ggb' => 'application/vnd.geogebra.file', - 'ggt' => 'application/vnd.geogebra.tool', - 'ghf' => 'application/vnd.groove-help', - 'gif' => 'image/gif', - 'gim' => 'application/vnd.groove-identity-message', - 'gmx' => 'application/vnd.gmx', - 'gnumeric' => 'application/x-gnumeric', - 'gph' => 'application/vnd.flographit', - 'gqf' => 'application/vnd.grafeq', - 'gqs' => 'application/vnd.grafeq', - 'gram' => 'application/srgs', - 'gre' => 'application/vnd.geometry-explorer', - 'grv' => 'application/vnd.groove-injector', - 'grxml' => 'application/srgs+xml', - 'gsf' => 'application/x-font-ghostscript', - 'gtar' => 'application/x-gtar', - 'gtm' => 'application/vnd.groove-tool-message', - 'gtw' => 'model/vnd.gtw', - 'gv' => 'text/vnd.graphviz', - 'gxt' => 'application/vnd.geonext', - 'h' => 'text/x-c', - 'h261' => 'video/h261', - 'h263' => 'video/h263', - 'h264' => 'video/h264', - 'hal' => 'application/vnd.hal+xml', - 'hbci' => 'application/vnd.hbci', - 'hdf' => 'application/x-hdf', - 'hh' => 'text/x-c', - 'hlp' => 'application/winhlp', - 'hpgl' => 'application/vnd.hp-hpgl', - 'hpid' => 'application/vnd.hp-hpid', - 'hps' => 'application/vnd.hp-hps', - 'hqx' => 'application/mac-binhex40', - 'hta' => 'application/octet-stream', - 'htc' => 'text/html', - 'htke' => 'application/vnd.kenameaapp', - 'htm' => 'text/html', - 'html' => 'text/html', - 'hvd' => 'application/vnd.yamaha.hv-dic', - 'hvp' => 'application/vnd.yamaha.hv-voice', - 'hvs' => 'application/vnd.yamaha.hv-script', - 'i2g' => 'application/vnd.intergeo', - 'icc' => 'application/vnd.iccprofile', - 'ice' => 'x-conference/x-cooltalk', - 'icm' => 'application/vnd.iccprofile', - 'ico' => 'image/x-icon', - 'ics' => 'text/calendar', - 'ief' => 'image/ief', - 'ifb' => 'text/calendar', - 'ifm' => 'application/vnd.shana.informed.formdata', - 'iges' => 'model/iges', - 'igl' => 'application/vnd.igloader', - 'igm' => 'application/vnd.insors.igm', - 'igs' => 'model/iges', - 'igx' => 'application/vnd.micrografx.igx', - 'iif' => 'application/vnd.shana.informed.interchange', - 'imp' => 'application/vnd.accpac.simply.imp', - 'ims' => 'application/vnd.ms-ims', - 'in' => 'text/plain', - 'ini' => 'text/plain', - 'ipfix' => 'application/ipfix', - 'ipk' => 'application/vnd.shana.informed.package', - 'irm' => 'application/vnd.ibm.rights-management', - 'irp' => 'application/vnd.irepository.package+xml', - 'iso' => 'application/octet-stream', - 'itp' => 'application/vnd.shana.informed.formtemplate', - 'ivp' => 'application/vnd.immervision-ivp', - 'ivu' => 'application/vnd.immervision-ivu', - 'jad' => 'text/vnd.sun.j2me.app-descriptor', - 'jam' => 'application/vnd.jam', - 'jar' => 'application/java-archive', - 'java' => 'text/x-java-source', - 'jisp' => 'application/vnd.jisp', - 'jlt' => 'application/vnd.hp-jlyt', - 'jnlp' => 'application/x-java-jnlp-file', - 'joda' => 'application/vnd.joost.joda-archive', - 'jpe' => 'image/jpeg', - 'jpeg' => 'image/jpeg', - 'jpg' => 'image/jpeg', - 'jpgm' => 'video/jpm', - 'jpgv' => 'video/jpeg', - 'jpm' => 'video/jpm', - 'js' => 'text/javascript', - 'json' => 'application/json', - 'kar' => 'audio/midi', - 'karbon' => 'application/vnd.kde.karbon', - 'kfo' => 'application/vnd.kde.kformula', - 'kia' => 'application/vnd.kidspiration', - 'kml' => 'application/vnd.google-earth.kml+xml', - 'kmz' => 'application/vnd.google-earth.kmz', - 'kne' => 'application/vnd.kinar', - 'knp' => 'application/vnd.kinar', - 'kon' => 'application/vnd.kde.kontour', - 'kpr' => 'application/vnd.kde.kpresenter', - 'kpt' => 'application/vnd.kde.kpresenter', - 'ksp' => 'application/vnd.kde.kspread', - 'ktr' => 'application/vnd.kahootz', - 'ktx' => 'image/ktx', - 'ktz' => 'application/vnd.kahootz', - 'kwd' => 'application/vnd.kde.kword', - 'kwt' => 'application/vnd.kde.kword', - 'lasxml' => 'application/vnd.las.las+xml', - 'latex' => 'application/x-latex', - 'lbd' => 'application/vnd.llamagraphics.life-balance.desktop', - 'lbe' => 'application/vnd.llamagraphics.life-balance.exchange+xml', - 'les' => 'application/vnd.hhe.lesson-player', - 'lha' => 'application/octet-stream', - 'link66' => 'application/vnd.route66.link66+xml', - 'list' => 'text/plain', - 'list3820' => 'application/vnd.ibm.modcap', - 'listafp' => 'application/vnd.ibm.modcap', - 'log' => 'text/plain', - 'lostxml' => 'application/lost+xml', - 'lrf' => 'application/octet-stream', - 'lrm' => 'application/vnd.ms-lrm', - 'ltf' => 'application/vnd.frogans.ltf', - 'lvp' => 'audio/vnd.lucent.voice', - 'lwp' => 'application/vnd.lotus-wordpro', - 'lzh' => 'application/octet-stream', - 'm13' => 'application/x-msmediaview', - 'm14' => 'application/x-msmediaview', - 'm1v' => 'video/mpeg', - 'm21' => 'application/mp21', - 'm2a' => 'audio/mpeg', - 'm2v' => 'video/mpeg', - 'm3a' => 'audio/mpeg', - 'm3u' => 'audio/x-mpegurl', - 'm3u8' => 'application/vnd.apple.mpegurl', - 'm4a' => 'audio/mp4', - 'm4u' => 'video/vnd.mpegurl', - 'm4v' => 'video/mp4', - 'ma' => 'application/mathematica', - 'mads' => 'application/mads+xml', - 'mag' => 'application/vnd.ecowin.chart', - 'maker' => 'application/vnd.framemaker', - 'man' => 'text/troff', - 'mathml' => 'application/mathml+xml', - 'mb' => 'application/mathematica', - 'mbk' => 'application/vnd.mobius.mbk', - 'mbox' => 'application/mbox', - 'mc1' => 'application/vnd.medcalcdata', - 'mcd' => 'application/vnd.mcd', - 'mcurl' => 'text/vnd.curl.mcurl', - 'mdb' => 'application/x-msaccess', - 'mdi' => 'image/vnd.ms-modi', - 'me' => 'text/troff', - 'mesh' => 'model/mesh', - 'meta4' => 'application/metalink4+xml', - 'mets' => 'application/mets+xml', - 'mfm' => 'application/vnd.mfmp', - 'mgp' => 'application/vnd.osgeo.mapguide.package', - 'mgz' => 'application/vnd.proteus.magazine', - 'mid' => 'audio/midi', - 'midi' => 'audio/midi', - 'mif' => 'application/vnd.mif', - 'mime' => 'message/rfc822', - 'mj2' => 'video/mj2', - 'mjp2' => 'video/mj2', - 'mlp' => 'application/vnd.dolby.mlp', - 'mmd' => 'application/vnd.chipnuts.karaoke-mmd', - 'mmf' => 'application/vnd.smaf', - 'mmr' => 'image/vnd.fujixerox.edmics-mmr', - 'mny' => 'application/x-msmoney', - 'mobi' => 'application/x-mobipocket-ebook', - 'mods' => 'application/mods+xml', - 'mov' => 'video/quicktime', - 'movie' => 'video/x-sgi-movie', - 'mp2' => 'audio/mpeg', - 'mp21' => 'application/mp21', - 'mp2a' => 'audio/mpeg', - 'mp3' => 'audio/mpeg', - 'mp4' => 'video/mp4', - 'mp4a' => 'audio/mp4', - 'mp4s' => 'application/mp4', - 'mp4v' => 'video/mp4', - 'mpc' => 'application/vnd.mophun.certificate', - 'mpe' => 'video/mpeg', - 'mpeg' => 'video/mpeg', - 'mpg' => 'video/mpeg', - 'mpg4' => 'video/mp4', - 'mpga' => 'audio/mpeg', - 'mpkg' => 'application/vnd.apple.installer+xml', - 'mpm' => 'application/vnd.blueice.multipass', - 'mpn' => 'application/vnd.mophun.application', - 'mpp' => 'application/vnd.ms-project', - 'mpt' => 'application/vnd.ms-project', - 'mpy' => 'application/vnd.ibm.minipay', - 'mqy' => 'application/vnd.mobius.mqy', - 'mrc' => 'application/marc', - 'mrcx' => 'application/marcxml+xml', - 'ms' => 'text/troff', - 'mscml' => 'application/mediaservercontrol+xml', - 'mseed' => 'application/vnd.fdsn.mseed', - 'mseq' => 'application/vnd.mseq', - 'msf' => 'application/vnd.epson.msf', - 'msh' => 'model/mesh', - 'msi' => 'application/x-msdownload', - 'msl' => 'application/vnd.mobius.msl', - 'msty' => 'application/vnd.muvee.style', - 'mts' => 'model/vnd.mts', - 'mus' => 'application/vnd.musician', - 'musicxml' => 'application/vnd.recordare.musicxml+xml', - 'mvb' => 'application/x-msmediaview', - 'mwf' => 'application/vnd.mfer', - 'mxf' => 'application/mxf', - 'mxl' => 'application/vnd.recordare.musicxml', - 'mxml' => 'application/xv+xml', - 'mxs' => 'application/vnd.triscape.mxs', - 'mxu' => 'video/vnd.mpegurl', - 'n-gage' => 'application/vnd.nokia.n-gage.symbian.install', - 'n3' => 'text/n3', - 'nb' => 'application/mathematica', - 'nbp' => 'application/vnd.wolfram.player', - 'nc' => 'application/x-netcdf', - 'ncx' => 'application/x-dtbncx+xml', - 'ngdat' => 'application/vnd.nokia.n-gage.data', - 'nlu' => 'application/vnd.neurolanguage.nlu', - 'nml' => 'application/vnd.enliven', - 'nnd' => 'application/vnd.noblenet-directory', - 'nns' => 'application/vnd.noblenet-sealer', - 'nnw' => 'application/vnd.noblenet-web', - 'npx' => 'image/vnd.net-fpx', - 'nsf' => 'application/vnd.lotus-notes', - 'oa2' => 'application/vnd.fujitsu.oasys2', - 'oa3' => 'application/vnd.fujitsu.oasys3', - 'oas' => 'application/vnd.fujitsu.oasys', - 'obd' => 'application/x-msbinder', - 'oda' => 'application/oda', - 'odb' => 'application/vnd.oasis.opendocument.database', - 'odc' => 'application/vnd.oasis.opendocument.chart', - 'odf' => 'application/vnd.oasis.opendocument.formula', - 'odft' => 'application/vnd.oasis.opendocument.formula-template', - 'odg' => 'application/vnd.oasis.opendocument.graphics', - 'odi' => 'application/vnd.oasis.opendocument.image', - 'odm' => 'application/vnd.oasis.opendocument.text-master', - 'odp' => 'application/vnd.oasis.opendocument.presentation', - 'ods' => 'application/vnd.oasis.opendocument.spreadsheet', - 'odt' => 'application/vnd.oasis.opendocument.text', - 'oga' => 'audio/ogg', - 'ogg' => 'audio/ogg', - 'ogv' => 'video/ogg', - 'ogx' => 'application/ogg', - 'onepkg' => 'application/onenote', - 'onetmp' => 'application/onenote', - 'onetoc' => 'application/onenote', - 'onetoc2' => 'application/onenote', - 'opf' => 'application/oebps-package+xml', - 'oprc' => 'application/vnd.palm', - 'org' => 'application/vnd.lotus-organizer', - 'osf' => 'application/vnd.yamaha.openscoreformat', - 'osfpvg' => 'application/vnd.yamaha.openscoreformat.osfpvg+xml', - 'otc' => 'application/vnd.oasis.opendocument.chart-template', - 'otf' => 'application/x-font-otf', - 'otg' => 'application/vnd.oasis.opendocument.graphics-template', - 'oth' => 'application/vnd.oasis.opendocument.text-web', - 'oti' => 'application/vnd.oasis.opendocument.image-template', - 'otp' => 'application/vnd.oasis.opendocument.presentation-template', - 'ots' => 'application/vnd.oasis.opendocument.spreadsheet-template', - 'ott' => 'application/vnd.oasis.opendocument.text-template', - 'oxt' => 'application/vnd.openofficeorg.extension', - 'p' => 'text/x-pascal', - 'p10' => 'application/pkcs10', - 'p12' => 'application/x-pkcs12', - 'p7b' => 'application/x-pkcs7-certificates', - 'p7c' => 'application/pkcs7-mime', - 'p7m' => 'application/pkcs7-mime', - 'p7r' => 'application/x-pkcs7-certreqresp', - 'p7s' => 'application/pkcs7-signature', - 'p8' => 'application/pkcs8', - 'pas' => 'text/x-pascal', - 'paw' => 'application/vnd.pawaafile', - 'pbd' => 'application/vnd.powerbuilder6', - 'pbm' => 'image/x-portable-bitmap', - 'pcf' => 'application/x-font-pcf', - 'pcl' => 'application/vnd.hp-pcl', - 'pclxl' => 'application/vnd.hp-pclxl', - 'pct' => 'image/x-pict', - 'pcurl' => 'application/vnd.curl.pcurl', - 'pcx' => 'image/x-pcx', - 'pdb' => 'application/vnd.palm', - 'pdf' => 'application/pdf', - 'pfa' => 'application/x-font-type1', - 'pfb' => 'application/x-font-type1', - 'pfm' => 'application/x-font-type1', - 'pfr' => 'application/font-tdpfr', - 'pfx' => 'application/x-pkcs12', - 'pgm' => 'image/x-portable-graymap', - 'pgn' => 'application/x-chess-pgn', - 'pgp' => 'application/pgp-encrypted', - 'php' => 'text/x-php', - 'phps' => 'application/x-httpd-phps', - 'pic' => 'image/x-pict', - 'pkg' => 'application/octet-stream', - 'pki' => 'application/pkixcmp', - 'pkipath' => 'application/pkix-pkipath', - 'plb' => 'application/vnd.3gpp.pic-bw-large', - 'plc' => 'application/vnd.mobius.plc', - 'plf' => 'application/vnd.pocketlearn', - 'pls' => 'application/pls+xml', - 'pml' => 'application/vnd.ctc-posml', - 'png' => 'image/png', - 'pnm' => 'image/x-portable-anymap', - 'portpkg' => 'application/vnd.macports.portpkg', - 'pot' => 'application/vnd.ms-powerpoint', - 'potm' => 'application/vnd.ms-powerpoint.template.macroenabled.12', - 'potx' => 'application/vnd.openxmlformats-officedocument.presentationml.template', - 'ppam' => 'application/vnd.ms-powerpoint.addin.macroenabled.12', - 'ppd' => 'application/vnd.cups-ppd', - 'ppm' => 'image/x-portable-pixmap', - 'pps' => 'application/vnd.ms-powerpoint', - 'ppsm' => 'application/vnd.ms-powerpoint.slideshow.macroenabled.12', - 'ppsx' => 'application/vnd.openxmlformats-officedocument.presentationml.slideshow', - 'ppt' => 'application/vnd.ms-powerpoint', - 'pptm' => 'application/vnd.ms-powerpoint.presentation.macroenabled.12', - 'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation', - 'pqa' => 'application/vnd.palm', - 'prc' => 'application/x-mobipocket-ebook', - 'pre' => 'application/vnd.lotus-freelance', - 'prf' => 'application/pics-rules', - 'ps' => 'application/postscript', - 'psb' => 'application/vnd.3gpp.pic-bw-small', - 'psd' => 'image/vnd.adobe.photoshop', - 'psf' => 'application/x-font-linux-psf', - 'pskcxml' => 'application/pskc+xml', - 'ptid' => 'application/vnd.pvi.ptid1', - 'pub' => 'application/x-mspublisher', - 'pvb' => 'application/vnd.3gpp.pic-bw-var', - 'pwn' => 'application/vnd.3m.post-it-notes', - 'pya' => 'audio/vnd.ms-playready.media.pya', - 'pyv' => 'video/vnd.ms-playready.media.pyv', - 'qam' => 'application/vnd.epson.quickanime', - 'qbo' => 'application/vnd.intu.qbo', - 'qfx' => 'application/vnd.intu.qfx', - 'qps' => 'application/vnd.publishare-delta-tree', - 'qt' => 'video/quicktime', - 'qwd' => 'application/vnd.quark.quarkxpress', - 'qwt' => 'application/vnd.quark.quarkxpress', - 'qxb' => 'application/vnd.quark.quarkxpress', - 'qxd' => 'application/vnd.quark.quarkxpress', - 'qxl' => 'application/vnd.quark.quarkxpress', - 'qxt' => 'application/vnd.quark.quarkxpress', - 'ra' => 'audio/x-pn-realaudio', - 'ram' => 'audio/x-pn-realaudio', - 'rar' => 'application/x-rar-compressed', - 'ras' => 'image/x-cmu-raster', - 'rb' => 'text/plain', - 'rcprofile' => 'application/vnd.ipunplugged.rcprofile', - 'rdf' => 'application/rdf+xml', - 'rdz' => 'application/vnd.data-vision.rdz', - 'rep' => 'application/vnd.businessobjects', - 'res' => 'application/x-dtbresource+xml', - 'resx' => 'text/xml', - 'rgb' => 'image/x-rgb', - 'rif' => 'application/reginfo+xml', - 'rip' => 'audio/vnd.rip', - 'rl' => 'application/resource-lists+xml', - 'rlc' => 'image/vnd.fujixerox.edmics-rlc', - 'rld' => 'application/resource-lists-diff+xml', - 'rm' => 'application/vnd.rn-realmedia', - 'rmi' => 'audio/midi', - 'rmp' => 'audio/x-pn-realaudio-plugin', - 'rms' => 'application/vnd.jcp.javame.midlet-rms', - 'rnc' => 'application/relax-ng-compact-syntax', - 'roff' => 'text/troff', - 'rp9' => 'application/vnd.cloanto.rp9', - 'rpss' => 'application/vnd.nokia.radio-presets', - 'rpst' => 'application/vnd.nokia.radio-preset', - 'rq' => 'application/sparql-query', - 'rs' => 'application/rls-services+xml', - 'rsd' => 'application/rsd+xml', - 'rss' => 'application/rss+xml', - 'rtf' => 'application/rtf', - 'rtx' => 'text/richtext', - 's' => 'text/x-asm', - 'saf' => 'application/vnd.yamaha.smaf-audio', - 'sbml' => 'application/sbml+xml', - 'sc' => 'application/vnd.ibm.secure-container', - 'scd' => 'application/x-msschedule', - 'scm' => 'application/vnd.lotus-screencam', - 'scq' => 'application/scvp-cv-request', - 'scs' => 'application/scvp-cv-response', - 'scurl' => 'text/vnd.curl.scurl', - 'sda' => 'application/vnd.stardivision.draw', - 'sdc' => 'application/vnd.stardivision.calc', - 'sdd' => 'application/vnd.stardivision.impress', - 'sdkd' => 'application/vnd.solent.sdkm+xml', - 'sdkm' => 'application/vnd.solent.sdkm+xml', - 'sdp' => 'application/sdp', - 'sdw' => 'application/vnd.stardivision.writer', - 'see' => 'application/vnd.seemail', - 'seed' => 'application/vnd.fdsn.seed', - 'sema' => 'application/vnd.sema', - 'semd' => 'application/vnd.semd', - 'semf' => 'application/vnd.semf', - 'ser' => 'application/java-serialized-object', - 'setpay' => 'application/set-payment-initiation', - 'setreg' => 'application/set-registration-initiation', - 'sfd-hdstx' => 'application/vnd.hydrostatix.sof-data', - 'sfs' => 'application/vnd.spotfire.sfs', - 'sgl' => 'application/vnd.stardivision.writer-global', - 'sgm' => 'text/sgml', - 'sgml' => 'text/sgml', - 'sh' => 'application/x-sh', - 'shar' => 'application/x-shar', - 'shf' => 'application/shf+xml', - 'sig' => 'application/pgp-signature', - 'silo' => 'model/mesh', - 'sis' => 'application/vnd.symbian.install', - 'sisx' => 'application/vnd.symbian.install', - 'sit' => 'application/x-stuffit', - 'sitx' => 'application/x-stuffitx', - 'skd' => 'application/vnd.koan', - 'skm' => 'application/vnd.koan', - 'skp' => 'application/vnd.koan', - 'skt' => 'application/vnd.koan', - 'sldm' => 'application/vnd.ms-powerpoint.slide.macroenabled.12', - 'sldx' => 'application/vnd.openxmlformats-officedocument.presentationml.slide', - 'slt' => 'application/vnd.epson.salt', - 'sm' => 'application/vnd.stepmania.stepchart', - 'smf' => 'application/vnd.stardivision.math', - 'smi' => 'application/smil+xml', - 'smil' => 'application/smil+xml', - 'snd' => 'audio/basic', - 'snf' => 'application/x-font-snf', - 'so' => 'application/octet-stream', - 'spc' => 'application/x-pkcs7-certificates', - 'spf' => 'application/vnd.yamaha.smaf-phrase', - 'spl' => 'application/x-futuresplash', - 'spot' => 'text/vnd.in3d.spot', - 'spp' => 'application/scvp-vp-response', - 'spq' => 'application/scvp-vp-request', - 'spx' => 'audio/ogg', - 'src' => 'application/x-wais-source', - 'sru' => 'application/sru+xml', - 'srx' => 'application/sparql-results+xml', - 'sse' => 'application/vnd.kodak-descriptor', - 'ssf' => 'application/vnd.epson.ssf', - 'ssml' => 'application/ssml+xml', - 'st' => 'application/vnd.sailingtracker.track', - 'stc' => 'application/vnd.sun.xml.calc.template', - 'std' => 'application/vnd.sun.xml.draw.template', - 'stf' => 'application/vnd.wt.stf', - 'sti' => 'application/vnd.sun.xml.impress.template', - 'stk' => 'application/hyperstudio', - 'stl' => 'application/vnd.ms-pki.stl', - 'str' => 'application/vnd.pg.format', - 'stw' => 'application/vnd.sun.xml.writer.template', - 'sub' => 'image/vnd.dvb.subtitle', - 'sus' => 'application/vnd.sus-calendar', - 'susp' => 'application/vnd.sus-calendar', - 'sv4cpio' => 'application/x-sv4cpio', - 'sv4crc' => 'application/x-sv4crc', - 'svc' => 'application/vnd.dvb.service', - 'svd' => 'application/vnd.svd', - 'svg' => 'image/svg+xml', - 'svgz' => 'image/svg+xml', - 'swa' => 'application/x-director', - 'swf' => 'application/x-shockwave-flash', - 'swi' => 'application/vnd.aristanetworks.swi', - 'sxc' => 'application/vnd.sun.xml.calc', - 'sxd' => 'application/vnd.sun.xml.draw', - 'sxg' => 'application/vnd.sun.xml.writer.global', - 'sxi' => 'application/vnd.sun.xml.impress', - 'sxm' => 'application/vnd.sun.xml.math', - 'sxw' => 'application/vnd.sun.xml.writer', - 't' => 'text/troff', - 'tao' => 'application/vnd.tao.intent-module-archive', - 'tar' => 'application/x-tar', - 'tcap' => 'application/vnd.3gpp2.tcap', - 'tcl' => 'application/x-tcl', - 'teacher' => 'application/vnd.smart.teacher', - 'tei' => 'application/tei+xml', - 'teicorpus' => 'application/tei+xml', - 'tex' => 'application/x-tex', - 'texi' => 'application/x-texinfo', - 'texinfo' => 'application/x-texinfo', - 'text' => 'text/plain', - 'tfi' => 'application/thraud+xml', - 'tfm' => 'application/x-tex-tfm', - 'thmx' => 'application/vnd.ms-officetheme', - 'tif' => 'image/tiff', - 'tiff' => 'image/tiff', - 'tmo' => 'application/vnd.tmobile-livetv', - 'torrent' => 'application/x-bittorrent', - 'tpl' => 'application/vnd.groove-tool-template', - 'tpt' => 'application/vnd.trid.tpt', - 'tr' => 'text/troff', - 'tra' => 'application/vnd.trueapp', - 'trm' => 'application/x-msterminal', - 'tsd' => 'application/timestamped-data', - 'tsv' => 'text/tab-separated-values', - 'ttc' => 'application/x-font-ttf', - 'ttf' => 'application/x-font-ttf', - 'ttl' => 'text/turtle', - 'twd' => 'application/vnd.simtech-mindmapper', - 'twds' => 'application/vnd.simtech-mindmapper', - 'txd' => 'application/vnd.genomatix.tuxedo', - 'txf' => 'application/vnd.mobius.txf', - 'txt' => 'text/plain', - 'u32' => 'application/x-authorware-bin', - 'udeb' => 'application/x-debian-package', - 'ufd' => 'application/vnd.ufdl', - 'ufdl' => 'application/vnd.ufdl', - 'umj' => 'application/vnd.umajin', - 'unityweb' => 'application/vnd.unity', - 'uoml' => 'application/vnd.uoml+xml', - 'uri' => 'text/uri-list', - 'uris' => 'text/uri-list', - 'urls' => 'text/uri-list', - 'ustar' => 'application/x-ustar', - 'utz' => 'application/vnd.uiq.theme', - 'uu' => 'text/x-uuencode', - 'uva' => 'audio/vnd.dece.audio', - 'uvd' => 'application/vnd.dece.data', - 'uvf' => 'application/vnd.dece.data', - 'uvg' => 'image/vnd.dece.graphic', - 'uvh' => 'video/vnd.dece.hd', - 'uvi' => 'image/vnd.dece.graphic', - 'uvm' => 'video/vnd.dece.mobile', - 'uvp' => 'video/vnd.dece.pd', - 'uvs' => 'video/vnd.dece.sd', - 'uvt' => 'application/vnd.dece.ttml+xml', - 'uvu' => 'video/vnd.uvvu.mp4', - 'uvv' => 'video/vnd.dece.video', - 'uvva' => 'audio/vnd.dece.audio', - 'uvvd' => 'application/vnd.dece.data', - 'uvvf' => 'application/vnd.dece.data', - 'uvvg' => 'image/vnd.dece.graphic', - 'uvvh' => 'video/vnd.dece.hd', - 'uvvi' => 'image/vnd.dece.graphic', - 'uvvm' => 'video/vnd.dece.mobile', - 'uvvp' => 'video/vnd.dece.pd', - 'uvvs' => 'video/vnd.dece.sd', - 'uvvt' => 'application/vnd.dece.ttml+xml', - 'uvvu' => 'video/vnd.uvvu.mp4', - 'uvvv' => 'video/vnd.dece.video', - 'uvvx' => 'application/vnd.dece.unspecified', - 'uvx' => 'application/vnd.dece.unspecified', - 'vcd' => 'application/x-cdlink', - 'vcf' => 'text/x-vcard', - 'vcg' => 'application/vnd.groove-vcard', - 'vcs' => 'text/x-vcalendar', - 'vcx' => 'application/vnd.vcx', - 'vis' => 'application/vnd.visionary', - 'viv' => 'video/vnd.vivo', - 'vor' => 'application/vnd.stardivision.writer', - 'vox' => 'application/x-authorware-bin', - 'vrml' => 'model/vrml', - 'vsd' => 'application/vnd.visio', - 'vsf' => 'application/vnd.vsf', - 'vss' => 'application/vnd.visio', - 'vst' => 'application/vnd.visio', - 'vsw' => 'application/vnd.visio', - 'vtu' => 'model/vnd.vtu', - 'vxml' => 'application/voicexml+xml', - 'w3d' => 'application/x-director', - 'wad' => 'application/x-doom', - 'wav' => 'audio/x-wav', - 'wax' => 'audio/x-ms-wax', - 'wbmp' => 'image/vnd.wap.wbmp', - 'wbs' => 'application/vnd.criticaltools.wbs+xml', - 'wbxml' => 'application/vnd.wap.wbxml', - 'wcm' => 'application/vnd.ms-works', - 'wdb' => 'application/vnd.ms-works', - 'weba' => 'audio/webm', - 'webm' => 'video/webm', - 'webp' => 'image/webp', - 'wg' => 'application/vnd.pmi.widget', - 'wgt' => 'application/widget', - 'wks' => 'application/vnd.ms-works', - 'wm' => 'video/x-ms-wm', - 'wma' => 'audio/x-ms-wma', - 'wmd' => 'application/x-ms-wmd', - 'wmf' => 'application/x-msmetafile', - 'wml' => 'text/vnd.wap.wml', - 'wmlc' => 'application/vnd.wap.wmlc', - 'wmls' => 'text/vnd.wap.wmlscript', - 'wmlsc' => 'application/vnd.wap.wmlscriptc', - 'wmv' => 'video/x-ms-wmv', - 'wmx' => 'video/x-ms-wmx', - 'wmz' => 'application/x-ms-wmz', - 'woff' => 'application/x-font-woff', - 'wpd' => 'application/vnd.wordperfect', - 'wpl' => 'application/vnd.ms-wpl', - 'wps' => 'application/vnd.ms-works', - 'wqd' => 'application/vnd.wqd', - 'wri' => 'application/x-mswrite', - 'wrl' => 'model/vrml', - 'wsdl' => 'application/wsdl+xml', - 'wspolicy' => 'application/wspolicy+xml', - 'wtb' => 'application/vnd.webturbo', - 'wvx' => 'video/x-ms-wvx', - 'x32' => 'application/x-authorware-bin', - 'x3d' => 'application/vnd.hzn-3d-crossword', - 'xap' => 'application/x-silverlight-app', - 'xar' => 'application/vnd.xara', - 'xbap' => 'application/x-ms-xbap', - 'xbd' => 'application/vnd.fujixerox.docuworks.binder', - 'xbm' => 'image/x-xbitmap', - 'xdf' => 'application/xcap-diff+xml', - 'xdm' => 'application/vnd.syncml.dm+xml', - 'xdp' => 'application/vnd.adobe.xdp+xml', - 'xdssc' => 'application/dssc+xml', - 'xdw' => 'application/vnd.fujixerox.docuworks', - 'xenc' => 'application/xenc+xml', - 'xer' => 'application/patch-ops-error+xml', - 'xfdf' => 'application/vnd.adobe.xfdf', - 'xfdl' => 'application/vnd.xfdl', - 'xht' => 'application/xhtml+xml', - 'xhtml' => 'application/xhtml+xml', - 'xhvml' => 'application/xv+xml', - 'xif' => 'image/vnd.xiff', - 'xla' => 'application/vnd.ms-excel', - 'xlam' => 'application/vnd.ms-excel.addin.macroenabled.12', - 'xlc' => 'application/vnd.ms-excel', - 'xlm' => 'application/vnd.ms-excel', - 'xls' => 'application/vnd.ms-excel', - 'xlsb' => 'application/vnd.ms-excel.sheet.binary.macroenabled.12', - 'xlsm' => 'application/vnd.ms-excel.sheet.macroenabled.12', - 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', - 'xlt' => 'application/vnd.ms-excel', - 'xltm' => 'application/vnd.ms-excel.template.macroenabled.12', - 'xltx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.template', - 'xlw' => 'application/vnd.ms-excel', - 'xml' => 'application/xml', - 'xo' => 'application/vnd.olpc-sugar', - 'xop' => 'application/xop+xml', - 'xpi' => 'application/x-xpinstall', - 'xpm' => 'image/x-xpixmap', - 'xpr' => 'application/vnd.is-xpr', - 'xps' => 'application/vnd.ms-xpsdocument', - 'xpw' => 'application/vnd.intercon.formnet', - 'xpx' => 'application/vnd.intercon.formnet', - 'xsl' => 'application/xml', - 'xslt' => 'application/xslt+xml', - 'xsm' => 'application/vnd.syncml+xml', - 'xspf' => 'application/xspf+xml', - 'xul' => 'application/vnd.mozilla.xul+xml', - 'xvm' => 'application/xv+xml', - 'xvml' => 'application/xv+xml', - 'xwd' => 'image/x-xwindowdump', - 'xyz' => 'chemical/x-xyz', - 'yaml' => 'text/yaml', - 'yang' => 'application/yang', - 'yin' => 'application/yin+xml', - 'yml' => 'text/yaml', - 'zaz' => 'application/vnd.zzazz.deck+xml', - 'zip' => 'application/zip', - 'zir' => 'application/vnd.zul', - 'zirz' => 'application/vnd.zul', - 'zmm' => 'application/vnd.handheld-entertainment+xml' - ); - - /** - * Get a singleton instance of the class - * - * @return self - * @codeCoverageIgnore - */ - public static function getInstance() - { - if (!self::$instance) { - self::$instance = new self(); - } - - return self::$instance; - } - - /** - * Get a mimetype value from a file extension - * - * @param string $extension File extension - * - * @return string|null - * - */ - public function fromExtension($extension) - { - $extension = strtolower($extension); - - return isset($this->mimetypes[$extension]) - ? $this->mimetypes[$extension] - : null; - } - - /** - * Get a mimetype from a filename - * - * @param string $filename Filename to generate a mimetype from - * - * @return string|null - */ - public function fromFilename($filename) - { - return $this->fromExtension(pathinfo($filename, PATHINFO_EXTENSION)); - } -} diff --git a/core/vendor/guzzlehttp/guzzle/src/Pool.php b/core/vendor/guzzlehttp/guzzle/src/Pool.php deleted file mode 100644 index e95ab09..0000000 --- a/core/vendor/guzzlehttp/guzzle/src/Pool.php +++ /dev/null @@ -1,280 +0,0 @@ -client = $client; - $this->iter = $this->coerceIterable($requests); - $this->deferred = new Deferred(); - $this->promise = $this->deferred->promise(); - $this->poolSize = isset($options['pool_size']) - ? $options['pool_size'] : 25; - $this->eventListeners = $this->prepareListeners( - $options, - ['before', 'complete', 'error', 'end'] - ); - } - - /** - * Sends multiple requests in parallel and returns an array of responses - * and exceptions that uses the same ordering as the provided requests. - * - * IMPORTANT: This method keeps every request and response in memory, and - * as such, is NOT recommended when sending a large number or an - * indeterminate number of requests concurrently. - * - * @param ClientInterface $client Client used to send the requests - * @param array|\Iterator $requests Requests to send in parallel - * @param array $options Passes through the options available in - * {@see GuzzleHttp\Pool::__construct} - * - * @return BatchResults Returns a container for the results. - * @throws \InvalidArgumentException if the event format is incorrect. - */ - public static function batch( - ClientInterface $client, - $requests, - array $options = [] - ) { - $hash = new \SplObjectStorage(); - foreach ($requests as $request) { - $hash->attach($request); - } - - // In addition to the normally run events when requests complete, add - // and event to continuously track the results of transfers in the hash. - (new self($client, $requests, RequestEvents::convertEventArray( - $options, - ['end'], - [ - 'priority' => RequestEvents::LATE, - 'fn' => function (EndEvent $e) use ($hash) { - $hash[$e->getRequest()] = $e->getException() - ? $e->getException() - : $e->getResponse(); - } - ] - )))->wait(); - - return new BatchResults($hash); - } - - /** - * Creates a Pool and immediately sends the requests. - * - * @param ClientInterface $client Client used to send the requests - * @param array|\Iterator $requests Requests to send in parallel - * @param array $options Passes through the options available in - * {@see GuzzleHttp\Pool::__construct} - */ - public static function send( - ClientInterface $client, - $requests, - array $options = [] - ) { - (new self($client, $requests, $options))->wait(); - } - - public function wait() - { - if ($this->isRealized) { - return false; - } - - // Seed the pool with N number of requests. - for ($i = 0; $i < $this->poolSize; $i++) { - if (!$this->addNextRequest()) { - break; - } - } - - // Stop if the pool was cancelled while transferring requests. - if ($this->isRealized) { - return false; - } - - // Wait on any outstanding FutureResponse objects. - while ($response = array_pop($this->waitQueue)) { - try { - $response->wait(); - } catch (\Exception $e) { - // Eat exceptions because they should be handled asynchronously - } - } - - // Clean up no longer needed state. - $this->isRealized = true; - $this->waitQueue = $this->eventListeners = []; - $this->client = $this->iter = null; - $this->deferred->resolve(true); - - return true; - } - - /** - * {@inheritdoc} - * - * Attempt to cancel all outstanding requests (requests that are queued for - * dereferencing). Returns true if all outstanding requests can be - * cancelled. - * - * @return bool - */ - public function cancel() - { - if ($this->isRealized) { - return false; - } - - $success = $this->isRealized = true; - foreach ($this->waitQueue as $response) { - if (!$response->cancel()) { - $success = false; - } - } - - return $success; - } - - /** - * Returns a promise that is invoked when the pool completed. There will be - * no passed value. - * - * {@inheritdoc} - */ - public function then( - callable $onFulfilled = null, - callable $onRejected = null, - callable $onProgress = null - ) { - return $this->promise->then($onFulfilled, $onRejected, $onProgress); - } - - public function promise() - { - return $this->promise; - } - - private function coerceIterable($requests) - { - if ($requests instanceof \Iterator) { - return $requests; - } elseif (is_array($requests)) { - return new \ArrayIterator($requests); - } - - throw new \InvalidArgumentException('Expected Iterator or array. ' - . 'Found ' . Core::describeType($requests)); - } - - /** - * Adds the next request to pool and tracks what requests need to be - * dereferenced when completing the pool. - */ - private function addNextRequest() - { - if ($this->isRealized || !$this->iter || !$this->iter->valid()) { - return false; - } - - $request = $this->iter->current(); - $this->iter->next(); - - if (!($request instanceof RequestInterface)) { - throw new \InvalidArgumentException(sprintf( - 'All requests in the provided iterator must implement ' - . 'RequestInterface. Found %s', - Core::describeType($request) - )); - } - - // Be sure to use "lazy" futures, meaning they do not send right away. - $request->getConfig()->set('future', 'lazy'); - $this->attachListeners($request, $this->eventListeners); - $response = $this->client->send($request); - $hash = spl_object_hash($request); - $this->waitQueue[$hash] = $response; - - // Use this function for both resolution and rejection. - $fn = function ($value) use ($request, $hash) { - unset($this->waitQueue[$hash]); - $result = $value instanceof ResponseInterface - ? ['request' => $request, 'response' => $value, 'error' => null] - : ['request' => $request, 'response' => null, 'error' => $value]; - $this->deferred->progress($result); - $this->addNextRequest(); - }; - - $response->then($fn, $fn); - - return true; - } -} diff --git a/core/vendor/guzzlehttp/guzzle/src/Post/MultipartBody.php b/core/vendor/guzzlehttp/guzzle/src/Post/MultipartBody.php deleted file mode 100644 index 1149e62..0000000 --- a/core/vendor/guzzlehttp/guzzle/src/Post/MultipartBody.php +++ /dev/null @@ -1,109 +0,0 @@ -boundary = $boundary ?: uniqid(); - $this->stream = $this->createStream($fields, $files); - } - - /** - * Get the boundary - * - * @return string - */ - public function getBoundary() - { - return $this->boundary; - } - - public function isWritable() - { - return false; - } - - /** - * Get the string needed to transfer a POST field - */ - private function getFieldString($name, $value) - { - return sprintf( - "--%s\r\nContent-Disposition: form-data; name=\"%s\"\r\n\r\n%s\r\n", - $this->boundary, - $name, - $value - ); - } - - /** - * Get the headers needed before transferring the content of a POST file - */ - private function getFileHeaders(PostFileInterface $file) - { - $headers = ''; - foreach ($file->getHeaders() as $key => $value) { - $headers .= "{$key}: {$value}\r\n"; - } - - return "--{$this->boundary}\r\n" . trim($headers) . "\r\n\r\n"; - } - - /** - * Create the aggregate stream that will be used to upload the POST data - */ - protected function createStream(array $fields, array $files) - { - $stream = new AppendStream(); - - foreach ($fields as $name => $fieldValues) { - foreach ((array) $fieldValues as $value) { - $stream->addStream( - Stream::factory($this->getFieldString($name, $value)) - ); - } - } - - foreach ($files as $file) { - - if (!$file instanceof PostFileInterface) { - throw new \InvalidArgumentException('All POST fields must ' - . 'implement PostFieldInterface'); - } - - $stream->addStream( - Stream::factory($this->getFileHeaders($file)) - ); - $stream->addStream($file->getContent()); - $stream->addStream(Stream::factory("\r\n")); - } - - // Add the trailing boundary with CRLF - $stream->addStream(Stream::factory("--{$this->boundary}--\r\n")); - - return $stream; - } -} diff --git a/core/vendor/guzzlehttp/guzzle/src/Post/PostBody.php b/core/vendor/guzzlehttp/guzzle/src/Post/PostBody.php deleted file mode 100644 index ed14d1f..0000000 --- a/core/vendor/guzzlehttp/guzzle/src/Post/PostBody.php +++ /dev/null @@ -1,287 +0,0 @@ -files || $this->forceMultipart) { - $request->setHeader( - 'Content-Type', - 'multipart/form-data; boundary=' . $this->getBody()->getBoundary() - ); - } elseif ($this->fields && !$request->hasHeader('Content-Type')) { - $request->setHeader( - 'Content-Type', - 'application/x-www-form-urlencoded' - ); - } - - if ($size = $this->getSize()) { - $request->setHeader('Content-Length', $size); - } - } - - public function forceMultipartUpload($force) - { - $this->forceMultipart = $force; - } - - public function setAggregator(callable $aggregator) - { - $this->aggregator = $aggregator; - } - - public function setField($name, $value) - { - $this->fields[$name] = $value; - $this->mutate(); - } - - public function replaceFields(array $fields) - { - $this->fields = $fields; - $this->mutate(); - } - - public function getField($name) - { - return isset($this->fields[$name]) ? $this->fields[$name] : null; - } - - public function removeField($name) - { - unset($this->fields[$name]); - $this->mutate(); - } - - public function getFields($asString = false) - { - if (!$asString) { - return $this->fields; - } - - $query = new Query($this->fields); - $query->setEncodingType(Query::RFC1738); - $query->setAggregator($this->getAggregator()); - - return (string) $query; - } - - public function hasField($name) - { - return isset($this->fields[$name]); - } - - public function getFile($name) - { - foreach ($this->files as $file) { - if ($file->getName() == $name) { - return $file; - } - } - - return null; - } - - public function getFiles() - { - return $this->files; - } - - public function addFile(PostFileInterface $file) - { - $this->files[] = $file; - $this->mutate(); - } - - public function clearFiles() - { - $this->files = []; - $this->mutate(); - } - - /** - * Returns the numbers of fields + files - * - * @return int - */ - public function count() - { - return count($this->files) + count($this->fields); - } - - public function __toString() - { - return (string) $this->getBody(); - } - - public function getContents($maxLength = -1) - { - return $this->getBody()->getContents(); - } - - public function close() - { - $this->detach(); - } - - public function detach() - { - $this->detached = true; - $this->fields = $this->files = []; - - if ($this->body) { - $this->body->close(); - $this->body = null; - } - } - - public function attach($stream) - { - throw new CannotAttachException(); - } - - public function eof() - { - return $this->getBody()->eof(); - } - - public function tell() - { - return $this->body ? $this->body->tell() : 0; - } - - public function isSeekable() - { - return true; - } - - public function isReadable() - { - return true; - } - - public function isWritable() - { - return false; - } - - public function getSize() - { - return $this->getBody()->getSize(); - } - - public function seek($offset, $whence = SEEK_SET) - { - return $this->getBody()->seek($offset, $whence); - } - - public function read($length) - { - return $this->getBody()->read($length); - } - - public function write($string) - { - return false; - } - - public function getMetadata($key = null) - { - return $key ? null : []; - } - - /** - * Return a stream object that is built from the POST fields and files. - * - * If one has already been created, the previously created stream will be - * returned. - */ - private function getBody() - { - if ($this->body) { - return $this->body; - } elseif ($this->files || $this->forceMultipart) { - return $this->body = $this->createMultipart(); - } elseif ($this->fields) { - return $this->body = $this->createUrlEncoded(); - } else { - return $this->body = Stream::factory(); - } - } - - /** - * Get the aggregator used to join multi-valued field parameters - * - * @return callable - */ - final protected function getAggregator() - { - if (!$this->aggregator) { - $this->aggregator = Query::phpAggregator(); - } - - return $this->aggregator; - } - - /** - * Creates a multipart/form-data body stream - * - * @return MultipartBody - */ - private function createMultipart() - { - // Flatten the nested query string values using the correct aggregator - return new MultipartBody( - call_user_func($this->getAggregator(), $this->fields), - $this->files - ); - } - - /** - * Creates an application/x-www-form-urlencoded stream body - * - * @return StreamInterface - */ - private function createUrlEncoded() - { - return Stream::factory($this->getFields(true)); - } - - /** - * Get rid of any cached data - */ - private function mutate() - { - $this->body = null; - } -} diff --git a/core/vendor/guzzlehttp/guzzle/src/Post/PostBodyInterface.php b/core/vendor/guzzlehttp/guzzle/src/Post/PostBodyInterface.php deleted file mode 100644 index 81e4595..0000000 --- a/core/vendor/guzzlehttp/guzzle/src/Post/PostBodyInterface.php +++ /dev/null @@ -1,116 +0,0 @@ -headers = $headers; - $this->name = $name; - $this->prepareContent($content); - $this->prepareFilename($filename); - $this->prepareDefaultHeaders(); - } - - public function getName() - { - return $this->name; - } - - public function getFilename() - { - return $this->filename; - } - - public function getContent() - { - return $this->content; - } - - public function getHeaders() - { - return $this->headers; - } - - /** - * Prepares the contents of a POST file. - * - * @param mixed $content Content of the POST file - */ - private function prepareContent($content) - { - $this->content = $content; - - if (!($this->content instanceof StreamInterface)) { - $this->content = Stream::factory($this->content); - } elseif ($this->content instanceof MultipartBody) { - if (!$this->hasHeader('Content-Disposition')) { - $disposition = 'form-data; name="' . $this->name .'"'; - $this->headers['Content-Disposition'] = $disposition; - } - - if (!$this->hasHeader('Content-Type')) { - $this->headers['Content-Type'] = sprintf( - "multipart/form-data; boundary=%s", - $this->content->getBoundary() - ); - } - } - } - - /** - * Applies a file name to the POST file based on various checks. - * - * @param string|null $filename Filename to apply (or null to guess) - */ - private function prepareFilename($filename) - { - $this->filename = $filename; - - if (!$this->filename) { - $this->filename = $this->content->getMetadata('uri'); - } - - if (!$this->filename || substr($this->filename, 0, 6) === 'php://') { - $this->filename = $this->name; - } - } - - /** - * Applies default Content-Disposition and Content-Type headers if needed. - */ - private function prepareDefaultHeaders() - { - // Set a default content-disposition header if one was no provided - if (!$this->hasHeader('Content-Disposition')) { - $this->headers['Content-Disposition'] = sprintf( - 'form-data; name="%s"; filename="%s"', - $this->name, - basename($this->filename) - ); - } - - // Set a default Content-Type if one was not supplied - if (!$this->hasHeader('Content-Type')) { - $this->headers['Content-Type'] = Mimetypes::getInstance() - ->fromFilename($this->filename) ?: 'text/plain'; - } - } - - /** - * Check if a specific header exists on the POST file by name. - * - * @param string $name Case-insensitive header to check - * - * @return bool - */ - private function hasHeader($name) - { - return isset(array_change_key_case($this->headers)[strtolower($name)]); - } -} diff --git a/core/vendor/guzzlehttp/guzzle/src/Post/PostFileInterface.php b/core/vendor/guzzlehttp/guzzle/src/Post/PostFileInterface.php deleted file mode 100644 index 2e816c0..0000000 --- a/core/vendor/guzzlehttp/guzzle/src/Post/PostFileInterface.php +++ /dev/null @@ -1,41 +0,0 @@ -setEncodingType($urlEncoding); - } - - $qp->parseInto($q, $query, $urlEncoding); - - return $q; - } - - /** - * Convert the query string parameters to a query string string - * - * @return string - */ - public function __toString() - { - if (!$this->data) { - return ''; - } - - // The default aggregator is statically cached - static $defaultAggregator; - - if (!$this->aggregator) { - if (!$defaultAggregator) { - $defaultAggregator = self::phpAggregator(); - } - $this->aggregator = $defaultAggregator; - } - - $result = ''; - $aggregator = $this->aggregator; - $encoder = $this->encoding; - - foreach ($aggregator($this->data) as $key => $values) { - foreach ($values as $value) { - if ($result) { - $result .= '&'; - } - $result .= $encoder($key); - if ($value !== null) { - $result .= '=' . $encoder($value); - } - } - } - - return $result; - } - - /** - * Controls how multi-valued query string parameters are aggregated into a - * string. - * - * $query->setAggregator($query::duplicateAggregator()); - * - * @param callable $aggregator Callable used to convert a deeply nested - * array of query string variables into a flattened array of key value - * pairs. The callable accepts an array of query data and returns a - * flattened array of key value pairs where each value is an array of - * strings. - */ - public function setAggregator(callable $aggregator) - { - $this->aggregator = $aggregator; - } - - /** - * Specify how values are URL encoded - * - * @param string|bool $type One of 'RFC1738', 'RFC3986', or false to disable encoding - * - * @throws \InvalidArgumentException - */ - public function setEncodingType($type) - { - switch ($type) { - case self::RFC3986: - $this->encoding = 'rawurlencode'; - break; - case self::RFC1738: - $this->encoding = 'urlencode'; - break; - case false: - $this->encoding = function ($v) { return $v; }; - break; - default: - throw new \InvalidArgumentException('Invalid URL encoding type'); - } - } - - /** - * Query string aggregator that does not aggregate nested query string - * values and allows duplicates in the resulting array. - * - * Example: http://test.com?q=1&q=2 - * - * @return callable - */ - public static function duplicateAggregator() - { - return function (array $data) { - return self::walkQuery($data, '', function ($key, $prefix) { - return is_int($key) ? $prefix : "{$prefix}[{$key}]"; - }); - }; - } - - /** - * Aggregates nested query string variables using the same technique as - * ``http_build_query()``. - * - * @param bool $numericIndices Pass false to not include numeric indices - * when multi-values query string parameters are present. - * - * @return callable - */ - public static function phpAggregator($numericIndices = true) - { - return function (array $data) use ($numericIndices) { - return self::walkQuery( - $data, - '', - function ($key, $prefix) use ($numericIndices) { - return !$numericIndices && is_int($key) - ? "{$prefix}[]" - : "{$prefix}[{$key}]"; - } - ); - }; - } - - /** - * Easily create query aggregation functions by providing a key prefix - * function to this query string array walker. - * - * @param array $query Query string to walk - * @param string $keyPrefix Key prefix (start with '') - * @param callable $prefixer Function used to create a key prefix - * - * @return array - */ - public static function walkQuery(array $query, $keyPrefix, callable $prefixer) - { - $result = []; - foreach ($query as $key => $value) { - if ($keyPrefix) { - $key = $prefixer($key, $keyPrefix); - } - if (is_array($value)) { - $result += self::walkQuery($value, $key, $prefixer); - } elseif (isset($result[$key])) { - $result[$key][] = $value; - } else { - $result[$key] = array($value); - } - } - - return $result; - } -} diff --git a/core/vendor/guzzlehttp/guzzle/src/QueryParser.php b/core/vendor/guzzlehttp/guzzle/src/QueryParser.php deleted file mode 100644 index 90727cc..0000000 --- a/core/vendor/guzzlehttp/guzzle/src/QueryParser.php +++ /dev/null @@ -1,163 +0,0 @@ -duplicates = false; - $this->numericIndices = true; - $decoder = self::getDecoder($urlEncoding); - - foreach (explode('&', $str) as $kvp) { - - $parts = explode('=', $kvp, 2); - $key = $decoder($parts[0]); - $value = isset($parts[1]) ? $decoder($parts[1]) : null; - - // Special handling needs to be taken for PHP nested array syntax - if (strpos($key, '[') !== false) { - $this->parsePhpValue($key, $value, $result); - continue; - } - - if (!isset($result[$key])) { - $result[$key] = $value; - } else { - $this->duplicates = true; - if (!is_array($result[$key])) { - $result[$key] = [$result[$key]]; - } - $result[$key][] = $value; - } - } - - $query->replace($result); - - if (!$this->numericIndices) { - $query->setAggregator(Query::phpAggregator(false)); - } elseif ($this->duplicates) { - $query->setAggregator(Query::duplicateAggregator()); - } - } - - /** - * Returns a callable that is used to URL decode query keys and values. - * - * @param string|bool $type One of true, false, RFC3986, and RFC1738 - * - * @return callable|string - */ - private static function getDecoder($type) - { - if ($type === true) { - return function ($value) { - return rawurldecode(str_replace('+', ' ', $value)); - }; - } elseif ($type == Query::RFC3986) { - return 'rawurldecode'; - } elseif ($type == Query::RFC1738) { - return 'urldecode'; - } else { - return function ($str) { return $str; }; - } - } - - /** - * Parses a PHP style key value pair. - * - * @param string $key Key to parse (e.g., "foo[a][b]") - * @param string|null $value Value to set - * @param array $result Result to modify by reference - */ - private function parsePhpValue($key, $value, array &$result) - { - $node =& $result; - $keyBuffer = ''; - - for ($i = 0, $t = strlen($key); $i < $t; $i++) { - switch ($key[$i]) { - case '[': - if ($keyBuffer) { - $this->prepareNode($node, $keyBuffer); - $node =& $node[$keyBuffer]; - $keyBuffer = ''; - } - break; - case ']': - $k = $this->cleanKey($node, $keyBuffer); - $this->prepareNode($node, $k); - $node =& $node[$k]; - $keyBuffer = ''; - break; - default: - $keyBuffer .= $key[$i]; - break; - } - } - - if (isset($node)) { - $this->duplicates = true; - $node[] = $value; - } else { - $node = $value; - } - } - - /** - * Prepares a value in the array at the given key. - * - * If the key already exists, the key value is converted into an array. - * - * @param array $node Result node to modify - * @param string $key Key to add or modify in the node - */ - private function prepareNode(&$node, $key) - { - if (!isset($node[$key])) { - $node[$key] = null; - } elseif (!is_array($node[$key])) { - $node[$key] = [$node[$key]]; - } - } - - /** - * Returns the appropriate key based on the node and key. - */ - private function cleanKey($node, $key) - { - if ($key === '') { - $key = $node ? (string) count($node) : 0; - // Found a [] key, so track this to ensure that we disable numeric - // indexing of keys in the resolved query aggregator. - $this->numericIndices = false; - } - - return $key; - } -} diff --git a/core/vendor/guzzlehttp/guzzle/src/RequestFsm.php b/core/vendor/guzzlehttp/guzzle/src/RequestFsm.php deleted file mode 100644 index 82043ac..0000000 --- a/core/vendor/guzzlehttp/guzzle/src/RequestFsm.php +++ /dev/null @@ -1,214 +0,0 @@ - [ - 'success' => 'send', - 'intercept' => 'complete', - 'error' => 'error' - ], - // The complete and error events are handled using the "then" of - // the RingPHP request, so we exit the FSM. - 'send' => ['error' => 'error'], - 'complete' => [ - 'success' => 'end', - 'intercept' => 'before', - 'error' => 'error' - ], - 'error' => [ - 'success' => 'complete', - 'intercept' => 'before', - 'error' => 'end' - ], - 'end' => [] - ]; - - public function __construct( - callable $handler, - MessageFactoryInterface $messageFactory, - $maxTransitions = 200 - ) { - $this->mf = $messageFactory; - $this->maxTransitions = $maxTransitions; - $this->handler = $handler; - } - - /** - * Runs the state machine until a terminal state is entered or the - * optionally supplied $finalState is entered. - * - * @param Transaction $trans Transaction being transitioned. - * @param string $finalState The state to stop on. If unspecified, - * runs until a terminal state is found. - * - * @throws \Exception if a terminal state throws an exception. - */ - public function __invoke(Transaction $trans, $finalState = null) - { - $trans->_transitionCount = 1; - - if (!$trans->state) { - $trans->state = 'before'; - } - - while ($trans->state !== $finalState) { - - if (!isset($this->states[$trans->state])) { - throw new StateException("Invalid state: {$trans->state}"); - } elseif (++$trans->_transitionCount > $this->maxTransitions) { - throw new StateException('Too many state transitions were ' - . 'encountered ({$trans->_transitionCount}). This likely ' - . 'means that a combination of event listeners are in an ' - . 'infinite loop.'); - } - - $state = $this->states[$trans->state]; - - try { - /** @var callable $fn */ - $fn = [$this, $trans->state]; - if ($fn($trans)) { - // Handles transitioning to the "intercept" state. - if (isset($state['intercept'])) { - $trans->state = $state['intercept']; - continue; - } - throw new StateException('Invalid intercept state ' - . 'transition from ' . $trans->state); - } - - if (isset($state['success'])) { - // Transition to the success state - $trans->state = $state['success']; - } else { - // Break: this is a terminal state with no transition. - break; - } - - } catch (StateException $e) { - // State exceptions are thrown no matter what. - throw $e; - } catch (\Exception $e) { - $trans->exception = $e; - // Terminal error states throw the exception. - if (!isset($state['error'])) { - throw $e; - } - // Transition to the error state. - $trans->state = $state['error']; - } - } - } - - private function before(Transaction $trans) - { - $trans->request->getEmitter()->emit('before', new BeforeEvent($trans)); - - // When a response is set during the before event (i.e., a mock), then - // we don't need to send anything. Skip ahead to the complete event - // by returning to to go to the intercept state. - return (bool) $trans->response; - } - - private function send(Transaction $trans) - { - $fn = $this->handler; - $trans->response = FutureResponse::proxy( - $fn(RingBridge::prepareRingRequest($trans)), - function ($value) use ($trans) { - RingBridge::completeRingResponse($trans, $value, $this->mf, $this); - return $trans->response; - } - ); - } - - /** - * Emits the error event and ensures that the exception is set and is an - * instance of RequestException. If the error event is not intercepted, - * then the exception is thrown and we transition to the "end" event. This - * event also allows requests to be retried, and when retried, transitions - * to the "before" event. Otherwise, when no retries, and the exception is - * intercepted, transition to the "complete" event. - */ - private function error(Transaction $trans) - { - // Convert non-request exception to a wrapped exception - if (!($trans->exception instanceof RequestException)) { - $trans->exception = RequestException::wrapException( - $trans->request, $trans->exception - ); - } - - // Dispatch an event and allow interception - $event = new ErrorEvent($trans); - $trans->request->getEmitter()->emit('error', $event); - - if ($trans->exception) { - throw $trans->exception; - } - - $trans->exception = null; - - // Return true to transition to the 'before' state. False otherwise. - return $trans->state === 'before'; - } - - /** - * Emits a complete event, and if a request is marked for a retry during - * the complete event, then the "before" state is transitioned to. - */ - private function complete(Transaction $trans) - { - // Futures will have their own end events emitted when dereferenced. - if ($trans->response instanceof FutureInterface) { - return false; - } - - $trans->response->setEffectiveUrl($trans->request->getUrl()); - $trans->request->getEmitter()->emit('complete', new CompleteEvent($trans)); - - // Return true to transition to the 'before' state. False otherwise. - return $trans->state === 'before'; - } - - /** - * Emits the "end" event and throws an exception if one is present. - */ - private function end(Transaction $trans) - { - // Futures will have their own end events emitted when dereferenced, - // but still emit, even for futures, when an exception is present. - if (!$trans->exception && $trans->response instanceof FutureInterface) { - return; - } - - $trans->request->getEmitter()->emit('end', new EndEvent($trans)); - - // Throw exceptions in the terminal event if the exception was not - // handled by an "end" event listener. - if ($trans->exception) { - throw $trans->exception; - } - } -} diff --git a/core/vendor/guzzlehttp/guzzle/src/RingBridge.php b/core/vendor/guzzlehttp/guzzle/src/RingBridge.php deleted file mode 100644 index 12e3c70..0000000 --- a/core/vendor/guzzlehttp/guzzle/src/RingBridge.php +++ /dev/null @@ -1,170 +0,0 @@ -getConfig()->toArray(); - $url = $request->getUrl(); - // No need to calculate the query string twice (in URL and query). - $qs = ($pos = strpos($url, '?')) ? substr($url, $pos + 1) : null; - - return [ - 'scheme' => $request->getScheme(), - 'http_method' => $request->getMethod(), - 'url' => $url, - 'uri' => $request->getPath(), - 'headers' => $request->getHeaders(), - 'body' => $request->getBody(), - 'version' => $request->getProtocolVersion(), - 'client' => $options, - 'query_string' => $qs, - 'future' => isset($options['future']) ? $options['future'] : false - ]; - } - - /** - * Creates a Ring request from a request object AND prepares the callbacks. - * - * @param Transaction $trans Transaction to update. - * - * @return array Converted Guzzle Ring request. - */ - public static function prepareRingRequest(Transaction $trans) - { - // Clear out the transaction state when initiating. - $trans->exception = null; - $request = self::createRingRequest($trans->request); - - // Emit progress events if any progress listeners are registered. - if ($trans->request->getEmitter()->hasListeners('progress')) { - $emitter = $trans->request->getEmitter(); - $request['client']['progress'] = function ($a, $b, $c, $d) use ($trans, $emitter) { - $emitter->emit('progress', new ProgressEvent($trans, $a, $b, $c, $d)); - }; - } - - return $request; - } - - /** - * Handles the process of processing a response received from a ring - * handler. The created response is added to the transaction, and any - * necessary events are emitted based on the ring response. - * - * @param Transaction $trans Owns request and response. - * @param array $response Ring response array - * @param MessageFactoryInterface $messageFactory Creates response objects. - * @param callable $fsm Request FSM function. - */ - public static function completeRingResponse( - Transaction $trans, - array $response, - MessageFactoryInterface $messageFactory, - callable $fsm - ) { - $trans->state = 'complete'; - $trans->transferInfo = isset($response['transfer_stats']) - ? $response['transfer_stats'] : []; - - if (!empty($response['status'])) { - $options = []; - if (isset($response['version'])) { - $options['protocol_version'] = $response['version']; - } - if (isset($response['reason'])) { - $options['reason_phrase'] = $response['reason']; - } - $trans->response = $messageFactory->createResponse( - $response['status'], - isset($response['headers']) ? $response['headers'] : [], - isset($response['body']) ? $response['body'] : null, - $options - ); - if (isset($response['effective_url'])) { - $trans->response->setEffectiveUrl($response['effective_url']); - } - } elseif (empty($response['error'])) { - // When nothing was returned, then we need to add an error. - $response['error'] = self::getNoRingResponseException($trans->request); - } - - if (isset($response['error'])) { - $trans->state = 'error'; - $trans->exception = $response['error']; - } - - // Complete the lifecycle of the request. - $fsm($trans); - } - - /** - * Creates a Guzzle request object using a ring request array. - * - * @param array $request Ring request - * - * @return Request - * @throws \InvalidArgumentException for incomplete requests. - */ - public static function fromRingRequest(array $request) - { - $options = []; - if (isset($request['version'])) { - $options['protocol_version'] = $request['version']; - } - - if (!isset($request['http_method'])) { - throw new \InvalidArgumentException('No http_method'); - } - - return new Request( - $request['http_method'], - Core::url($request), - isset($request['headers']) ? $request['headers'] : [], - isset($request['body']) ? Stream::factory($request['body']) : null, - $options - ); - } - - /** - * Get an exception that can be used when a RingPHP handler does not - * populate a response. - * - * @param RequestInterface $request - * - * @return RequestException - */ - public static function getNoRingResponseException(RequestInterface $request) - { - $message = <<cookieJar = $cookieJar ?: new CookieJar(); - } - - public function getEvents() - { - // Fire the cookie plugin complete event before redirecting - return [ - 'before' => ['onBefore'], - 'complete' => ['onComplete', RequestEvents::REDIRECT_RESPONSE + 10] - ]; - } - - /** - * Get the cookie cookieJar - * - * @return CookieJarInterface - */ - public function getCookieJar() - { - return $this->cookieJar; - } - - public function onBefore(BeforeEvent $event) - { - $this->cookieJar->addCookieHeader($event->getRequest()); - } - - public function onComplete(CompleteEvent $event) - { - $this->cookieJar->extractCookies( - $event->getRequest(), - $event->getResponse() - ); - } -} diff --git a/core/vendor/guzzlehttp/guzzle/src/Subscriber/History.php b/core/vendor/guzzlehttp/guzzle/src/Subscriber/History.php deleted file mode 100644 index 5cf0611..0000000 --- a/core/vendor/guzzlehttp/guzzle/src/Subscriber/History.php +++ /dev/null @@ -1,172 +0,0 @@ -limit = $limit; - } - - public function getEvents() - { - return [ - 'complete' => ['onComplete', RequestEvents::EARLY], - 'error' => ['onError', RequestEvents::EARLY], - ]; - } - - /** - * Convert to a string that contains all request and response headers - * - * @return string - */ - public function __toString() - { - $lines = array(); - foreach ($this->transactions as $entry) { - $response = isset($entry['response']) ? $entry['response'] : ''; - $lines[] = '> ' . trim($entry['sent_request']) - . "\n\n< " . trim($response) . "\n"; - } - - return implode("\n", $lines); - } - - public function onComplete(CompleteEvent $event) - { - $this->add($event->getRequest(), $event->getResponse()); - } - - public function onError(ErrorEvent $event) - { - // Only track when no response is present, meaning this didn't ever - // emit a complete event - if (!$event->getResponse()) { - $this->add($event->getRequest()); - } - } - - /** - * Returns an Iterator that yields associative array values where each - * associative array contains the following key value pairs: - * - * - request: Representing the actual request that was received. - * - sent_request: A clone of the request that will not be mutated. - * - response: The response that was received (if available). - * - * @return \Iterator - */ - public function getIterator() - { - return new \ArrayIterator($this->transactions); - } - - /** - * Get all of the requests sent through the plugin. - * - * Requests can be modified after they are logged by the history - * subscriber. By default this method will return the actual request - * instances that were received. Pass true to this method if you wish to - * get copies of the requests that represent the request state when it was - * initially logged by the history subscriber. - * - * @param bool $asSent Set to true to get clones of the requests that have - * not been mutated since the request was received by - * the history subscriber. - * - * @return RequestInterface[] - */ - public function getRequests($asSent = false) - { - return array_map(function ($t) use ($asSent) { - return $asSent ? $t['sent_request'] : $t['request']; - }, $this->transactions); - } - - /** - * Get the number of requests in the history - * - * @return int - */ - public function count() - { - return count($this->transactions); - } - - /** - * Get the last request sent. - * - * Requests can be modified after they are logged by the history - * subscriber. By default this method will return the actual request - * instance that was received. Pass true to this method if you wish to get - * a copy of the request that represents the request state when it was - * initially logged by the history subscriber. - * - * @param bool $asSent Set to true to get a clone of the last request that - * has not been mutated since the request was received - * by the history subscriber. - * - * @return RequestInterface - */ - public function getLastRequest($asSent = false) - { - return $asSent - ? end($this->transactions)['sent_request'] - : end($this->transactions)['request']; - } - - /** - * Get the last response in the history - * - * @return ResponseInterface|null - */ - public function getLastResponse() - { - return end($this->transactions)['response']; - } - - /** - * Clears the history - */ - public function clear() - { - $this->transactions = array(); - } - - /** - * Add a request to the history - * - * @param RequestInterface $request Request to add - * @param ResponseInterface $response Response of the request - */ - private function add( - RequestInterface $request, - ResponseInterface $response = null - ) { - $this->transactions[] = [ - 'request' => $request, - 'sent_request' => clone $request, - 'response' => $response - ]; - if (count($this->transactions) > $this->limit) { - array_shift($this->transactions); - } - } -} diff --git a/core/vendor/guzzlehttp/guzzle/src/Subscriber/HttpError.php b/core/vendor/guzzlehttp/guzzle/src/Subscriber/HttpError.php deleted file mode 100644 index ed9de5b..0000000 --- a/core/vendor/guzzlehttp/guzzle/src/Subscriber/HttpError.php +++ /dev/null @@ -1,36 +0,0 @@ - ['onComplete', RequestEvents::VERIFY_RESPONSE]]; - } - - /** - * Throw a RequestException on an HTTP protocol error - * - * @param CompleteEvent $event Emitted event - * @throws RequestException - */ - public function onComplete(CompleteEvent $event) - { - $code = (string) $event->getResponse()->getStatusCode(); - // Throw an exception for an unsuccessful response - if ($code[0] >= 4) { - throw RequestException::create( - $event->getRequest(), - $event->getResponse() - ); - } - } -} diff --git a/core/vendor/guzzlehttp/guzzle/src/Subscriber/Mock.php b/core/vendor/guzzlehttp/guzzle/src/Subscriber/Mock.php deleted file mode 100644 index 39a3c44..0000000 --- a/core/vendor/guzzlehttp/guzzle/src/Subscriber/Mock.php +++ /dev/null @@ -1,132 +0,0 @@ -factory = new MessageFactory(); - $this->readBodies = $readBodies; - $this->addMultiple($items); - } - - public function getEvents() - { - // Fire the event last, after signing - return ['before' => ['onBefore', RequestEvents::SIGN_REQUEST - 10]]; - } - - /** - * @throws \OutOfBoundsException|\Exception - */ - public function onBefore(BeforeEvent $event) - { - if (!$item = array_shift($this->queue)) { - throw new \OutOfBoundsException('Mock queue is empty'); - } elseif ($item instanceof RequestException) { - throw $item; - } - - // Emulate reading a response body - $request = $event->getRequest(); - if ($this->readBodies && $request->getBody()) { - while (!$request->getBody()->eof()) { - $request->getBody()->read(8096); - } - } - - $event->intercept($item); - } - - public function count() - { - return count($this->queue); - } - - /** - * Add a response to the end of the queue - * - * @param string|ResponseInterface $response Response or path to response file - * - * @return self - * @throws \InvalidArgumentException if a string or Response is not passed - */ - public function addResponse($response) - { - if (is_string($response)) { - $response = file_exists($response) - ? $this->factory->fromMessage(file_get_contents($response)) - : $this->factory->fromMessage($response); - } elseif (!($response instanceof ResponseInterface)) { - throw new \InvalidArgumentException('Response must a message ' - . 'string, response object, or path to a file'); - } - - $this->queue[] = $response; - - return $this; - } - - /** - * Add an exception to the end of the queue - * - * @param RequestException $e Exception to throw when the request is executed - * - * @return self - */ - public function addException(RequestException $e) - { - $this->queue[] = $e; - - return $this; - } - - /** - * Add multiple items to the queue - * - * @param array $items Items to add - */ - public function addMultiple(array $items) - { - foreach ($items as $item) { - if ($item instanceof RequestException) { - $this->addException($item); - } else { - $this->addResponse($item); - } - } - } - - /** - * Clear the queue - */ - public function clearQueue() - { - $this->queue = []; - } -} diff --git a/core/vendor/guzzlehttp/guzzle/src/Subscriber/Prepare.php b/core/vendor/guzzlehttp/guzzle/src/Subscriber/Prepare.php deleted file mode 100644 index 472f603..0000000 --- a/core/vendor/guzzlehttp/guzzle/src/Subscriber/Prepare.php +++ /dev/null @@ -1,130 +0,0 @@ - ['onBefore', RequestEvents::PREPARE_REQUEST]]; - } - - public function onBefore(BeforeEvent $event) - { - $request = $event->getRequest(); - - // Set the appropriate Content-Type for a request if one is not set and - // there are form fields - if (!($body = $request->getBody())) { - return; - } - - $this->addContentLength($request, $body); - - if ($body instanceof PostBodyInterface) { - // Synchronize the POST body with the request's headers - $body->applyRequestHeaders($request); - } elseif (!$request->hasHeader('Content-Type')) { - $this->addContentType($request, $body); - } - - $this->addExpectHeader($request, $body); - } - - private function addContentType( - RequestInterface $request, - StreamInterface $body - ) { - if (!($uri = $body->getMetadata('uri'))) { - return; - } - - // Guess the content-type based on the stream's "uri" metadata value. - // The file extension is used to determine the appropriate mime-type. - if ($contentType = Mimetypes::getInstance()->fromFilename($uri)) { - $request->setHeader('Content-Type', $contentType); - } - } - - private function addContentLength( - RequestInterface $request, - StreamInterface $body - ) { - // Set the Content-Length header if it can be determined, and never - // send a Transfer-Encoding: chunked and Content-Length header in - // the same request. - if ($request->hasHeader('Content-Length')) { - // Remove transfer-encoding if content-length is set. - $request->removeHeader('Transfer-Encoding'); - return; - } - - if ($request->hasHeader('Transfer-Encoding')) { - return; - } - - if (null !== ($size = $body->getSize())) { - $request->setHeader('Content-Length', $size); - $request->removeHeader('Transfer-Encoding'); - } elseif ('1.1' == $request->getProtocolVersion()) { - // Use chunked Transfer-Encoding if there is no determinable - // content-length header and we're using HTTP/1.1. - $request->setHeader('Transfer-Encoding', 'chunked'); - $request->removeHeader('Content-Length'); - } - } - - private function addExpectHeader( - RequestInterface $request, - StreamInterface $body - ) { - // Determine if the Expect header should be used - if ($request->hasHeader('Expect')) { - return; - } - - $expect = $request->getConfig()['expect']; - - // Return if disabled or if you're not using HTTP/1.1 - if ($expect === false || $request->getProtocolVersion() !== '1.1') { - return; - } - - // The expect header is unconditionally enabled - if ($expect === true) { - $request->setHeader('Expect', '100-Continue'); - return; - } - - // By default, send the expect header when the payload is > 1mb - if ($expect === null) { - $expect = 1048576; - } - - // Always add if the body cannot be rewound, the size cannot be - // determined, or the size is greater than the cutoff threshold - $size = $body->getSize(); - if ($size === null || $size >= (int) $expect || !$body->isSeekable()) { - $request->setHeader('Expect', '100-Continue'); - } - } -} diff --git a/core/vendor/guzzlehttp/guzzle/src/Subscriber/Redirect.php b/core/vendor/guzzlehttp/guzzle/src/Subscriber/Redirect.php deleted file mode 100644 index 84f89d3..0000000 --- a/core/vendor/guzzlehttp/guzzle/src/Subscriber/Redirect.php +++ /dev/null @@ -1,156 +0,0 @@ - ['onComplete', RequestEvents::REDIRECT_RESPONSE]]; - } - - /** - * Rewind the entity body of the request if needed - * - * @param RequestInterface $redirectRequest - * @throws CouldNotRewindStreamException - */ - public static function rewindEntityBody(RequestInterface $redirectRequest) - { - // Rewind the entity body of the request if needed - if ($body = $redirectRequest->getBody()) { - // Only rewind the body if some of it has been read already, and - // throw an exception if the rewind fails - if ($body->tell() && !$body->seek(0)) { - throw new CouldNotRewindStreamException( - 'Unable to rewind the non-seekable request body after redirecting', - $redirectRequest - ); - } - } - } - - /** - * Called when a request receives a redirect response - * - * @param CompleteEvent $event Event emitted - * @throws TooManyRedirectsException - */ - public function onComplete(CompleteEvent $event) - { - $response = $event->getResponse(); - - if (substr($response->getStatusCode(), 0, 1) != '3' - || !$response->hasHeader('Location') - ) { - return; - } - - $request = $event->getRequest(); - $config = $request->getConfig(); - - // Increment the redirect and initialize the redirect state. - if ($redirectCount = $config['redirect_count']) { - $config['redirect_count'] = ++$redirectCount; - } else { - $config['redirect_scheme'] = $request->getScheme(); - $config['redirect_count'] = $redirectCount = 1; - } - - $max = $config->getPath('redirect/max') ?: 5; - - if ($redirectCount > $max) { - throw new TooManyRedirectsException( - "Will not follow more than {$redirectCount} redirects", - $request - ); - } - - $this->modifyRedirectRequest($request, $response); - $event->retry(); - } - - private function modifyRedirectRequest( - RequestInterface $request, - ResponseInterface $response - ) { - $config = $request->getConfig(); - - // Use a GET request if this is an entity enclosing request and we are - // not forcing RFC compliance, but rather emulating what all browsers - // would do. - $statusCode = $response->getStatusCode(); - if ($statusCode == 303 || - ($statusCode <= 302 && $request->getBody() && !$config->getPath('redirect/strict')) - ) { - $request->setMethod('GET'); - $request->setBody(null); - } - - $previousUrl = $request->getUrl(); - $this->setRedirectUrl($request, $response); - $this->rewindEntityBody($request); - - // Add the Referer header if it is told to do so and only - // add the header if we are not redirecting from https to http. - if ($config->getPath('redirect/referer') - && ($request->getScheme() == 'https' || $request->getScheme() == $config['redirect_scheme']) - ) { - $url = Url::fromString($previousUrl); - $url->setUsername(null); - $url->setPassword(null); - $request->setHeader('Referer', (string) $url); - } else { - $request->removeHeader('Referer'); - } - } - - /** - * Set the appropriate URL on the request based on the location header - * - * @param RequestInterface $request - * @param ResponseInterface $response - */ - private function setRedirectUrl( - RequestInterface $request, - ResponseInterface $response - ) { - $location = $response->getHeader('Location'); - $location = Url::fromString($location); - - // Combine location with the original URL if it is not absolute. - if (!$location->isAbsolute()) { - $originalUrl = Url::fromString($request->getUrl()); - // Remove query string parameters and just take what is present on - // the redirect Location header - $originalUrl->getQuery()->clear(); - $location = $originalUrl->combine($location); - } - - $request->setUrl($location); - } -} diff --git a/core/vendor/guzzlehttp/guzzle/src/ToArrayInterface.php b/core/vendor/guzzlehttp/guzzle/src/ToArrayInterface.php deleted file mode 100644 index d57c022..0000000 --- a/core/vendor/guzzlehttp/guzzle/src/ToArrayInterface.php +++ /dev/null @@ -1,15 +0,0 @@ -client = $client; - $this->request = $request; - } -} diff --git a/core/vendor/guzzlehttp/guzzle/src/UriTemplate.php b/core/vendor/guzzlehttp/guzzle/src/UriTemplate.php deleted file mode 100644 index 55dfeb5..0000000 --- a/core/vendor/guzzlehttp/guzzle/src/UriTemplate.php +++ /dev/null @@ -1,241 +0,0 @@ - array('prefix' => '', 'joiner' => ',', 'query' => false), - '+' => array('prefix' => '', 'joiner' => ',', 'query' => false), - '#' => array('prefix' => '#', 'joiner' => ',', 'query' => false), - '.' => array('prefix' => '.', 'joiner' => '.', 'query' => false), - '/' => array('prefix' => '/', 'joiner' => '/', 'query' => false), - ';' => array('prefix' => ';', 'joiner' => ';', 'query' => true), - '?' => array('prefix' => '?', 'joiner' => '&', 'query' => true), - '&' => array('prefix' => '&', 'joiner' => '&', 'query' => true) - ); - - /** @var array Delimiters */ - private static $delims = array(':', '/', '?', '#', '[', ']', '@', '!', '$', - '&', '\'', '(', ')', '*', '+', ',', ';', '='); - - /** @var array Percent encoded delimiters */ - private static $delimsPct = array('%3A', '%2F', '%3F', '%23', '%5B', '%5D', - '%40', '%21', '%24', '%26', '%27', '%28', '%29', '%2A', '%2B', '%2C', - '%3B', '%3D'); - - public function expand($template, array $variables) - { - if (false === strpos($template, '{')) { - return $template; - } - - $this->template = $template; - $this->variables = $variables; - - return preg_replace_callback( - '/\{([^\}]+)\}/', - [$this, 'expandMatch'], - $this->template - ); - } - - /** - * Parse an expression into parts - * - * @param string $expression Expression to parse - * - * @return array Returns an associative array of parts - */ - private function parseExpression($expression) - { - $result = array(); - - if (isset(self::$operatorHash[$expression[0]])) { - $result['operator'] = $expression[0]; - $expression = substr($expression, 1); - } else { - $result['operator'] = ''; - } - - foreach (explode(',', $expression) as $value) { - $value = trim($value); - $varspec = array(); - if ($colonPos = strpos($value, ':')) { - $varspec['value'] = substr($value, 0, $colonPos); - $varspec['modifier'] = ':'; - $varspec['position'] = (int) substr($value, $colonPos + 1); - } elseif (substr($value, -1) == '*') { - $varspec['modifier'] = '*'; - $varspec['value'] = substr($value, 0, -1); - } else { - $varspec['value'] = (string) $value; - $varspec['modifier'] = ''; - } - $result['values'][] = $varspec; - } - - return $result; - } - - /** - * Process an expansion - * - * @param array $matches Matches met in the preg_replace_callback - * - * @return string Returns the replacement string - */ - private function expandMatch(array $matches) - { - static $rfc1738to3986 = array('+' => '%20', '%7e' => '~'); - - $replacements = array(); - $parsed = self::parseExpression($matches[1]); - $prefix = self::$operatorHash[$parsed['operator']]['prefix']; - $joiner = self::$operatorHash[$parsed['operator']]['joiner']; - $useQuery = self::$operatorHash[$parsed['operator']]['query']; - - foreach ($parsed['values'] as $value) { - - if (!isset($this->variables[$value['value']])) { - continue; - } - - $variable = $this->variables[$value['value']]; - $actuallyUseQuery = $useQuery; - $expanded = ''; - - if (is_array($variable)) { - - $isAssoc = $this->isAssoc($variable); - $kvp = array(); - foreach ($variable as $key => $var) { - - if ($isAssoc) { - $key = rawurlencode($key); - $isNestedArray = is_array($var); - } else { - $isNestedArray = false; - } - - if (!$isNestedArray) { - $var = rawurlencode($var); - if ($parsed['operator'] == '+' || - $parsed['operator'] == '#' - ) { - $var = $this->decodeReserved($var); - } - } - - if ($value['modifier'] == '*') { - if ($isAssoc) { - if ($isNestedArray) { - // Nested arrays must allow for deeply nested - // structures. - $var = strtr( - http_build_query([$key => $var]), - $rfc1738to3986 - ); - } else { - $var = $key . '=' . $var; - } - } elseif ($key > 0 && $actuallyUseQuery) { - $var = $value['value'] . '=' . $var; - } - } - - $kvp[$key] = $var; - } - - if (empty($variable)) { - $actuallyUseQuery = false; - } elseif ($value['modifier'] == '*') { - $expanded = implode($joiner, $kvp); - if ($isAssoc) { - // Don't prepend the value name when using the explode - // modifier with an associative array. - $actuallyUseQuery = false; - } - } else { - if ($isAssoc) { - // When an associative array is encountered and the - // explode modifier is not set, then the result must be - // a comma separated list of keys followed by their - // respective values. - foreach ($kvp as $k => &$v) { - $v = $k . ',' . $v; - } - } - $expanded = implode(',', $kvp); - } - - } else { - if ($value['modifier'] == ':') { - $variable = substr($variable, 0, $value['position']); - } - $expanded = rawurlencode($variable); - if ($parsed['operator'] == '+' || $parsed['operator'] == '#') { - $expanded = $this->decodeReserved($expanded); - } - } - - if ($actuallyUseQuery) { - if (!$expanded && $joiner != '&') { - $expanded = $value['value']; - } else { - $expanded = $value['value'] . '=' . $expanded; - } - } - - $replacements[] = $expanded; - } - - $ret = implode($joiner, $replacements); - if ($ret && $prefix) { - return $prefix . $ret; - } - - return $ret; - } - - /** - * Determines if an array is associative. - * - * This makes the assumption that input arrays are sequences or hashes. - * This assumption is a tradeoff for accuracy in favor of speed, but it - * should work in almost every case where input is supplied for a URI - * template. - * - * @param array $array Array to check - * - * @return bool - */ - private function isAssoc(array $array) - { - return $array && array_keys($array)[0] !== 0; - } - - /** - * Removes percent encoding on reserved characters (used with + and # - * modifiers). - * - * @param string $string String to fix - * - * @return string - */ - private function decodeReserved($string) - { - return str_replace(self::$delimsPct, self::$delims, $string); - } -} diff --git a/core/vendor/guzzlehttp/guzzle/src/Url.php b/core/vendor/guzzlehttp/guzzle/src/Url.php deleted file mode 100644 index 95ec433..0000000 --- a/core/vendor/guzzlehttp/guzzle/src/Url.php +++ /dev/null @@ -1,595 +0,0 @@ - 80, 'https' => 443, 'ftp' => 21]; - private static $pathPattern = '/[^a-zA-Z0-9\-\._~!\$&\'\(\)\*\+,;=%:@\/]+|%(?![A-Fa-f0-9]{2})/'; - private static $queryPattern = '/[^a-zA-Z0-9\-\._~!\$\'\(\)\*\+,;%:@\/\?=&]+|%(?![A-Fa-f0-9]{2})/'; - /** @var Query|string Query part of the URL */ - private $query; - - /** - * Factory method to create a new URL from a URL string - * - * @param string $url Full URL used to create a Url object - * - * @return Url - * @throws \InvalidArgumentException - */ - public static function fromString($url) - { - static $defaults = ['scheme' => null, 'host' => null, - 'path' => null, 'port' => null, 'query' => null, - 'user' => null, 'pass' => null, 'fragment' => null]; - - if (false === ($parts = parse_url($url))) { - throw new \InvalidArgumentException('Unable to parse malformed ' - . 'url: ' . $url); - } - - $parts += $defaults; - - // Convert the query string into a Query object - if ($parts['query'] || 0 !== strlen($parts['query'])) { - $parts['query'] = Query::fromString($parts['query']); - } - - return new static($parts['scheme'], $parts['host'], $parts['user'], - $parts['pass'], $parts['port'], $parts['path'], $parts['query'], - $parts['fragment']); - } - - /** - * Build a URL from parse_url parts. The generated URL will be a relative - * URL if a scheme or host are not provided. - * - * @param array $parts Array of parse_url parts - * - * @return string - */ - public static function buildUrl(array $parts) - { - $url = $scheme = ''; - - if (!empty($parts['scheme'])) { - $scheme = $parts['scheme']; - $url .= $scheme . ':'; - } - - if (!empty($parts['host'])) { - $url .= '//'; - if (isset($parts['user'])) { - $url .= $parts['user']; - if (isset($parts['pass'])) { - $url .= ':' . $parts['pass']; - } - $url .= '@'; - } - - $url .= $parts['host']; - - // Only include the port if it is not the default port of the scheme - if (isset($parts['port']) && - (!isset(self::$defaultPorts[$scheme]) || - $parts['port'] != self::$defaultPorts[$scheme]) - ) { - $url .= ':' . $parts['port']; - } - } - - // Add the path component if present - if (isset($parts['path']) && strlen($parts['path'])) { - // Always ensure that the path begins with '/' if set and something - // is before the path - if (!empty($parts['host']) && $parts['path'][0] != '/') { - $url .= '/'; - } - $url .= $parts['path']; - } - - // Add the query string if present - if (isset($parts['query'])) { - $queryStr = (string) $parts['query']; - if ($queryStr || $queryStr === '0') { - $url .= '?' . $queryStr; - } - } - - // Ensure that # is only added to the url if fragment contains anything. - if (isset($parts['fragment'])) { - $url .= '#' . $parts['fragment']; - } - - return $url; - } - - /** - * Create a new URL from URL parts - * - * @param string $scheme Scheme of the URL - * @param string $host Host of the URL - * @param string $username Username of the URL - * @param string $password Password of the URL - * @param int $port Port of the URL - * @param string $path Path of the URL - * @param Query|array|string $query Query string of the URL - * @param string $fragment Fragment of the URL - */ - public function __construct( - $scheme, - $host, - $username = null, - $password = null, - $port = null, - $path = null, - Query $query = null, - $fragment = null - ) { - $this->scheme = $scheme; - $this->host = $host; - $this->port = $port; - $this->username = $username; - $this->password = $password; - $this->fragment = $fragment; - - if ($query) { - $this->setQuery($query); - } - - $this->setPath($path); - } - - /** - * Clone the URL - */ - public function __clone() - { - if ($this->query instanceof Query) { - $this->query = clone $this->query; - } - } - - /** - * Returns the URL as a URL string - * - * @return string - */ - public function __toString() - { - return static::buildUrl($this->getParts()); - } - - /** - * Get the parts of the URL as an array - * - * @return array - */ - public function getParts() - { - return array( - 'scheme' => $this->scheme, - 'user' => $this->username, - 'pass' => $this->password, - 'host' => $this->host, - 'port' => $this->port, - 'path' => $this->path, - 'query' => $this->query, - 'fragment' => $this->fragment, - ); - } - - /** - * Set the host of the request. - * - * @param string $host Host to set (e.g. www.yahoo.com, yahoo.com) - * - * @return Url - */ - public function setHost($host) - { - if (strpos($host, ':') === false) { - $this->host = $host; - } else { - list($host, $port) = explode(':', $host); - $this->host = $host; - $this->setPort($port); - } - } - - /** - * Get the host part of the URL - * - * @return string - */ - public function getHost() - { - return $this->host; - } - - /** - * Set the scheme part of the URL (http, https, ftp, etc.) - * - * @param string $scheme Scheme to set - */ - public function setScheme($scheme) - { - // Remove the default port if one is specified - if ($this->port - && isset(self::$defaultPorts[$this->scheme]) - && self::$defaultPorts[$this->scheme] == $this->port - ) { - $this->port = null; - } - - $this->scheme = $scheme; - } - - /** - * Get the scheme part of the URL - * - * @return string - */ - public function getScheme() - { - return $this->scheme; - } - - /** - * Set the port part of the URL - * - * @param int $port Port to set - */ - public function setPort($port) - { - $this->port = $port; - } - - /** - * Get the port part of the URl. - * - * If no port was set, this method will return the default port for the - * scheme of the URI. - * - * @return int|null - */ - public function getPort() - { - if ($this->port) { - return $this->port; - } elseif (isset(self::$defaultPorts[$this->scheme])) { - return self::$defaultPorts[$this->scheme]; - } - - return null; - } - - /** - * Set the path part of the URL. - * - * The provided URL is URL encoded as necessary. - * - * @param string $path Path string to set - */ - public function setPath($path) - { - $this->path = self::encodePath($path); - } - - /** - * Removes dot segments from a URL - * @link http://tools.ietf.org/html/rfc3986#section-5.2.4 - */ - public function removeDotSegments() - { - static $noopPaths = ['' => true, '/' => true, '*' => true]; - static $ignoreSegments = ['.' => true, '..' => true]; - - if (isset($noopPaths[$this->path])) { - return; - } - - $results = []; - $segments = $this->getPathSegments(); - foreach ($segments as $segment) { - if ($segment == '..') { - array_pop($results); - } elseif (!isset($ignoreSegments[$segment])) { - $results[] = $segment; - } - } - - $newPath = implode('/', $results); - - // Add the leading slash if necessary - if (substr($this->path, 0, 1) === '/' && - substr($newPath, 0, 1) !== '/' - ) { - $newPath = '/' . $newPath; - } - - // Add the trailing slash if necessary - if ($newPath != '/' && isset($ignoreSegments[end($segments)])) { - $newPath .= '/'; - } - - $this->path = $newPath; - } - - /** - * Add a relative path to the currently set path. - * - * @param string $relativePath Relative path to add - */ - public function addPath($relativePath) - { - if ($relativePath != '/' && - is_string($relativePath) && - strlen($relativePath) > 0 - ) { - // Add a leading slash if needed - if ($relativePath[0] !== '/' && - substr($this->path, -1, 1) !== '/' - ) { - $relativePath = '/' . $relativePath; - } - - $this->setPath($this->path . $relativePath); - } - } - - /** - * Get the path part of the URL - * - * @return string - */ - public function getPath() - { - return $this->path; - } - - /** - * Get the path segments of the URL as an array - * - * @return array - */ - public function getPathSegments() - { - return explode('/', $this->path); - } - - /** - * Set the password part of the URL - * - * @param string $password Password to set - */ - public function setPassword($password) - { - $this->password = $password; - } - - /** - * Get the password part of the URL - * - * @return null|string - */ - public function getPassword() - { - return $this->password; - } - - /** - * Set the username part of the URL - * - * @param string $username Username to set - */ - public function setUsername($username) - { - $this->username = $username; - } - - /** - * Get the username part of the URl - * - * @return null|string - */ - public function getUsername() - { - return $this->username; - } - - /** - * Get the query part of the URL as a Query object - * - * @return Query - */ - public function getQuery() - { - // Convert the query string to a query object if not already done. - if (!$this->query instanceof Query) { - $this->query = $this->query === null - ? new Query() - : Query::fromString($this->query); - } - - return $this->query; - } - - /** - * Set the query part of the URL. - * - * You may provide a query string as a string and pass $rawString as true - * to provide a query string that is not parsed until a call to getQuery() - * is made. Setting a raw query string will still encode invalid characters - * in a query string. - * - * @param Query|string|array $query Query string value to set. Can - * be a string that will be parsed into a Query object, an array - * of key value pairs, or a Query object. - * @param bool $rawString Set to true when providing a raw query string. - * - * @throws \InvalidArgumentException - */ - public function setQuery($query, $rawString = false) - { - if ($query instanceof Query) { - $this->query = $query; - } elseif (is_string($query)) { - if (!$rawString) { - $this->query = Query::fromString($query); - } else { - // Ensure the query does not have illegal characters. - $this->query = preg_replace_callback( - self::$queryPattern, - [__CLASS__, 'encodeMatch'], - $query - ); - } - - } elseif (is_array($query)) { - $this->query = new Query($query); - } else { - throw new \InvalidArgumentException('Query must be a Query, ' - . 'array, or string. Got ' . Core::describeType($query)); - } - } - - /** - * Get the fragment part of the URL - * - * @return null|string - */ - public function getFragment() - { - return $this->fragment; - } - - /** - * Set the fragment part of the URL - * - * @param string $fragment Fragment to set - */ - public function setFragment($fragment) - { - $this->fragment = $fragment; - } - - /** - * Check if this is an absolute URL - * - * @return bool - */ - public function isAbsolute() - { - return $this->scheme && $this->host; - } - - /** - * Combine the URL with another URL and return a new URL instance. - * - * Follows the rules specific in RFC 3986 section 5.4. - * - * @param string $url Relative URL to combine with - * - * @return Url - * @throws \InvalidArgumentException - * @link http://tools.ietf.org/html/rfc3986#section-5.4 - */ - public function combine($url) - { - $url = static::fromString($url); - - // Use the more absolute URL as the base URL - if (!$this->isAbsolute() && $url->isAbsolute()) { - $url = $url->combine($this); - } - - $parts = $url->getParts(); - - // Passing a URL with a scheme overrides everything - if ($parts['scheme']) { - return clone $url; - } - - // Setting a host overrides the entire rest of the URL - if ($parts['host']) { - return new static( - $this->scheme, - $parts['host'], - $parts['user'], - $parts['pass'], - $parts['port'], - $parts['path'], - $parts['query'] instanceof Query - ? clone $parts['query'] - : $parts['query'], - $parts['fragment'] - ); - } - - if (!$parts['path'] && $parts['path'] !== '0') { - // The relative URL has no path, so check if it is just a query - $path = $this->path ?: ''; - $query = $parts['query'] ?: $this->query; - } else { - $query = $parts['query']; - if ($parts['path'][0] == '/' || !$this->path) { - // Overwrite the existing path if the rel path starts with "/" - $path = $parts['path']; - } else { - // If the relative URL does not have a path or the base URL - // path does not end in a "/" then overwrite the existing path - // up to the last "/" - $path = substr($this->path, 0, strrpos($this->path, '/') + 1) . $parts['path']; - } - } - - $result = new self( - $this->scheme, - $this->host, - $this->username, - $this->password, - $this->port, - $path, - $query instanceof Query ? clone $query : $query, - $parts['fragment'] - ); - - if ($path) { - $result->removeDotSegments(); - } - - return $result; - } - - /** - * Encodes the path part of a URL without double-encoding percent-encoded - * key value pairs. - * - * @param string $path Path to encode - * - * @return string - */ - public static function encodePath($path) - { - static $cb = [__CLASS__, 'encodeMatch']; - return preg_replace_callback(self::$pathPattern, $cb, $path); - } - - private static function encodeMatch(array $match) - { - return rawurlencode($match[0]); - } -} diff --git a/core/vendor/guzzlehttp/guzzle/src/Utils.php b/core/vendor/guzzlehttp/guzzle/src/Utils.php deleted file mode 100644 index 285fe30..0000000 --- a/core/vendor/guzzlehttp/guzzle/src/Utils.php +++ /dev/null @@ -1,145 +0,0 @@ -expand($template, $variables); - } - - /** - * Wrapper for JSON decode that implements error detection with helpful - * error messages. - * - * @param string $json JSON data to parse - * @param bool $assoc When true, returned objects will be converted - * into associative arrays. - * @param int $depth User specified recursion depth. - * @param int $options Bitmask of JSON decode options. - * - * @return mixed - * @throws \InvalidArgumentException if the JSON cannot be parsed. - * @link http://www.php.net/manual/en/function.json-decode.php - */ - public static function jsonDecode($json, $assoc = false, $depth = 512, $options = 0) - { - static $jsonErrors = [ - JSON_ERROR_DEPTH => 'JSON_ERROR_DEPTH - Maximum stack depth exceeded', - JSON_ERROR_STATE_MISMATCH => 'JSON_ERROR_STATE_MISMATCH - Underflow or the modes mismatch', - JSON_ERROR_CTRL_CHAR => 'JSON_ERROR_CTRL_CHAR - Unexpected control character found', - JSON_ERROR_SYNTAX => 'JSON_ERROR_SYNTAX - Syntax error, malformed JSON', - JSON_ERROR_UTF8 => 'JSON_ERROR_UTF8 - Malformed UTF-8 characters, possibly incorrectly encoded' - ]; - - $data = \json_decode($json, $assoc, $depth, $options); - - if (JSON_ERROR_NONE !== json_last_error()) { - $last = json_last_error(); - throw new \InvalidArgumentException( - 'Unable to parse JSON data: ' - . (isset($jsonErrors[$last]) - ? $jsonErrors[$last] - : 'Unknown error') - ); - } - - return $data; - } -} diff --git a/core/vendor/guzzlehttp/guzzle/tests/BatchResultsTest.php b/core/vendor/guzzlehttp/guzzle/tests/BatchResultsTest.php deleted file mode 100644 index 080d44c..0000000 --- a/core/vendor/guzzlehttp/guzzle/tests/BatchResultsTest.php +++ /dev/null @@ -1,58 +0,0 @@ -assertCount(3, $batch); - $this->assertEquals([$a, $b, $c], $batch->getKeys()); - $this->assertEquals([$hash[$c]], $batch->getFailures()); - $this->assertEquals(['1', '2'], $batch->getSuccessful()); - $this->assertEquals('1', $batch->getResult($a)); - $this->assertNull($batch->getResult(new \stdClass())); - $this->assertTrue(isset($batch[0])); - $this->assertFalse(isset($batch[10])); - $this->assertEquals('1', $batch[0]); - $this->assertEquals('2', $batch[1]); - $this->assertNull($batch[100]); - $this->assertInstanceOf('Exception', $batch[2]); - - $results = iterator_to_array($batch); - $this->assertEquals(['1', '2', $hash[$c]], $results); - } - - /** - * @expectedException \RuntimeException - */ - public function testCannotSetByIndex() - { - $hash = new \SplObjectStorage(); - $batch = new BatchResults($hash); - $batch[10] = 'foo'; - } - - /** - * @expectedException \RuntimeException - */ - public function testCannotUnsetByIndex() - { - $hash = new \SplObjectStorage(); - $batch = new BatchResults($hash); - unset($batch[10]); - } -} diff --git a/core/vendor/guzzlehttp/guzzle/tests/ClientTest.php b/core/vendor/guzzlehttp/guzzle/tests/ClientTest.php deleted file mode 100644 index 48f1702..0000000 --- a/core/vendor/guzzlehttp/guzzle/tests/ClientTest.php +++ /dev/null @@ -1,585 +0,0 @@ -ma = function () { - throw new \RuntimeException('Should not have been called.'); - }; - } - - public function testProvidesDefaultUserAgent() - { - $ua = Client::getDefaultUserAgent(); - $this->assertEquals(1, preg_match('#^Guzzle/.+ curl/.+ PHP/.+$#', $ua)); - } - - public function testUsesDefaultDefaultOptions() - { - $client = new Client(); - $this->assertTrue($client->getDefaultOption('allow_redirects')); - $this->assertTrue($client->getDefaultOption('exceptions')); - $this->assertTrue($client->getDefaultOption('verify')); - } - - public function testUsesProvidedDefaultOptions() - { - $client = new Client([ - 'defaults' => [ - 'allow_redirects' => false, - 'query' => ['foo' => 'bar'] - ] - ]); - $this->assertFalse($client->getDefaultOption('allow_redirects')); - $this->assertTrue($client->getDefaultOption('exceptions')); - $this->assertTrue($client->getDefaultOption('verify')); - $this->assertEquals(['foo' => 'bar'], $client->getDefaultOption('query')); - } - - public function testCanSpecifyBaseUrl() - { - $this->assertSame('', (new Client())->getBaseUrl()); - $this->assertEquals('http://foo', (new Client([ - 'base_url' => 'http://foo' - ]))->getBaseUrl()); - } - - public function testCanSpecifyBaseUrlUriTemplate() - { - $client = new Client(['base_url' => ['http://foo.com/{var}/', ['var' => 'baz']]]); - $this->assertEquals('http://foo.com/baz/', $client->getBaseUrl()); - } - - /** - * @expectedException \Exception - * @expectedExceptionMessage Foo - */ - public function testCanSpecifyHandler() - { - $client = new Client(['handler' => function () { - throw new \Exception('Foo'); - }]); - $client->get('http://httpbin.org'); - } - - /** - * @expectedException \Exception - * @expectedExceptionMessage Foo - */ - public function testCanSpecifyHandlerAsAdapter() - { - $client = new Client(['adapter' => function () { - throw new \Exception('Foo'); - }]); - $client->get('http://httpbin.org'); - } - - /** - * @expectedException \Exception - * @expectedExceptionMessage Foo - */ - public function testCanSpecifyMessageFactory() - { - $factory = $this->getMockBuilder('GuzzleHttp\Message\MessageFactoryInterface') - ->setMethods(['createRequest']) - ->getMockForAbstractClass(); - $factory->expects($this->once()) - ->method('createRequest') - ->will($this->throwException(new \Exception('Foo'))); - $client = new Client(['message_factory' => $factory]); - $client->get(); - } - - public function testCanSpecifyEmitter() - { - $emitter = $this->getMockBuilder('GuzzleHttp\Event\EmitterInterface') - ->setMethods(['listeners']) - ->getMockForAbstractClass(); - $emitter->expects($this->once()) - ->method('listeners') - ->will($this->returnValue('foo')); - - $client = new Client(['emitter' => $emitter]); - $this->assertEquals('foo', $client->getEmitter()->listeners()); - } - - public function testAddsDefaultUserAgentHeaderWithDefaultOptions() - { - $client = new Client(['defaults' => ['allow_redirects' => false]]); - $this->assertFalse($client->getDefaultOption('allow_redirects')); - $this->assertEquals( - ['User-Agent' => Client::getDefaultUserAgent()], - $client->getDefaultOption('headers') - ); - } - - public function testAddsDefaultUserAgentHeaderWithoutDefaultOptions() - { - $client = new Client(); - $this->assertEquals( - ['User-Agent' => Client::getDefaultUserAgent()], - $client->getDefaultOption('headers') - ); - } - - private function getRequestClient() - { - $client = $this->getMockBuilder('GuzzleHttp\Client') - ->setMethods(['send']) - ->getMock(); - $client->expects($this->once()) - ->method('send') - ->will($this->returnArgument(0)); - - return $client; - } - - public function requestMethodProvider() - { - return [ - ['GET', false], - ['HEAD', false], - ['DELETE', false], - ['OPTIONS', false], - ['POST', 'foo'], - ['PUT', 'foo'], - ['PATCH', 'foo'] - ]; - } - - /** - * @dataProvider requestMethodProvider - */ - public function testClientProvidesMethodShortcut($method, $body) - { - $client = $this->getRequestClient(); - if ($body) { - $request = $client->{$method}('http://foo.com', [ - 'headers' => ['X-Baz' => 'Bar'], - 'body' => $body, - 'query' => ['a' => 'b'] - ]); - } else { - $request = $client->{$method}('http://foo.com', [ - 'headers' => ['X-Baz' => 'Bar'], - 'query' => ['a' => 'b'] - ]); - } - $this->assertEquals($method, $request->getMethod()); - $this->assertEquals('Bar', $request->getHeader('X-Baz')); - $this->assertEquals('a=b', $request->getQuery()); - if ($body) { - $this->assertEquals($body, $request->getBody()); - } - } - - public function testClientMergesDefaultOptionsWithRequestOptions() - { - $f = $this->getMockBuilder('GuzzleHttp\Message\MessageFactoryInterface') - ->setMethods(array('createRequest')) - ->getMockForAbstractClass(); - - $o = null; - // Intercept the creation - $f->expects($this->once()) - ->method('createRequest') - ->will($this->returnCallback( - function ($method, $url, array $options = []) use (&$o) { - $o = $options; - return (new MessageFactory())->createRequest($method, $url, $options); - } - )); - - $client = new Client([ - 'message_factory' => $f, - 'defaults' => [ - 'headers' => ['Foo' => 'Bar'], - 'query' => ['baz' => 'bam'], - 'exceptions' => false - ] - ]); - - $request = $client->createRequest('GET', 'http://foo.com?a=b', [ - 'headers' => ['Hi' => 'there', '1' => 'one'], - 'allow_redirects' => false, - 'query' => ['t' => 1] - ]); - - $this->assertFalse($o['allow_redirects']); - $this->assertFalse($o['exceptions']); - $this->assertEquals('Bar', $request->getHeader('Foo')); - $this->assertEquals('there', $request->getHeader('Hi')); - $this->assertEquals('one', $request->getHeader('1')); - $this->assertEquals('a=b&baz=bam&t=1', $request->getQuery()); - } - - public function testClientMergesDefaultHeadersCaseInsensitively() - { - $client = new Client(['defaults' => ['headers' => ['Foo' => 'Bar']]]); - $request = $client->createRequest('GET', 'http://foo.com?a=b', [ - 'headers' => ['foo' => 'custom', 'user-agent' => 'test'] - ]); - $this->assertEquals('test', $request->getHeader('User-Agent')); - $this->assertEquals('custom', $request->getHeader('Foo')); - } - - public function testDoesNotOverwriteExistingUA() - { - $client = new Client(['defaults' => [ - 'headers' => ['User-Agent' => 'test'] - ]]); - $this->assertEquals( - ['User-Agent' => 'test'], - $client->getDefaultOption('headers') - ); - } - - public function testUsesBaseUrlWhenNoUrlIsSet() - { - $client = new Client(['base_url' => 'http://www.foo.com/baz?bam=bar']); - $this->assertEquals( - 'http://www.foo.com/baz?bam=bar', - $client->createRequest('GET')->getUrl() - ); - } - - public function testUsesBaseUrlCombinedWithProvidedUrl() - { - $client = new Client(['base_url' => 'http://www.foo.com/baz?bam=bar']); - $this->assertEquals( - 'http://www.foo.com/bar/bam', - $client->createRequest('GET', 'bar/bam')->getUrl() - ); - } - - public function testUsesBaseUrlCombinedWithProvidedUrlViaUriTemplate() - { - $client = new Client(['base_url' => 'http://www.foo.com/baz?bam=bar']); - $this->assertEquals( - 'http://www.foo.com/bar/123', - $client->createRequest('GET', ['bar/{bam}', ['bam' => '123']])->getUrl() - ); - } - - public function testSettingAbsoluteUrlOverridesBaseUrl() - { - $client = new Client(['base_url' => 'http://www.foo.com/baz?bam=bar']); - $this->assertEquals( - 'http://www.foo.com/foo', - $client->createRequest('GET', '/foo')->getUrl() - ); - } - - public function testSettingAbsoluteUriTemplateOverridesBaseUrl() - { - $client = new Client(['base_url' => 'http://www.foo.com/baz?bam=bar']); - $this->assertEquals( - 'http://goo.com/1', - $client->createRequest( - 'GET', - ['http://goo.com/{bar}', ['bar' => '1']] - )->getUrl() - ); - } - - public function testCanSetRelativeUrlStartingWithHttp() - { - $client = new Client(['base_url' => 'http://www.foo.com']); - $this->assertEquals( - 'http://www.foo.com/httpfoo', - $client->createRequest('GET', 'httpfoo')->getUrl() - ); - } - - public function testClientSendsRequests() - { - $mock = new MockHandler(['status' => 200, 'headers' => []]); - $client = new Client(['handler' => $mock]); - $response = $client->get('http://test.com'); - $this->assertEquals(200, $response->getStatusCode()); - $this->assertEquals('http://test.com', $response->getEffectiveUrl()); - } - - public function testSendingRequestCanBeIntercepted() - { - $response = new Response(200); - $client = new Client(['handler' => $this->ma]); - $client->getEmitter()->on( - 'before', - function (BeforeEvent $e) use ($response) { - $e->intercept($response); - } - ); - $this->assertSame($response, $client->get('http://test.com')); - $this->assertEquals('http://test.com', $response->getEffectiveUrl()); - } - - /** - * @expectedException \GuzzleHttp\Exception\RequestException - * @expectedExceptionMessage Argument 1 passed to GuzzleHttp\Message\FutureResponse::proxy() must implement interface GuzzleHttp\Ring\Future\FutureInterface - */ - public function testEnsuresResponseIsPresentAfterSending() - { - $handler = function () {}; - $client = new Client(['handler' => $handler]); - $client->get('http://httpbin.org'); - } - - /** - * @expectedException \GuzzleHttp\Exception\RequestException - * @expectedExceptionMessage Waiting did not resolve future - */ - public function testEnsuresResponseIsPresentAfterDereferencing() - { - $deferred = new Deferred(); - $handler = new MockHandler(function () use ($deferred) { - return new FutureArray( - $deferred->promise(), - function () {} - ); - }); - $client = new Client(['handler' => $handler]); - $response = $client->get('http://httpbin.org'); - $response->wait(); - } - - public function testClientHandlesErrorsDuringBeforeSend() - { - $client = new Client(); - $client->getEmitter()->on('before', function ($e) { - throw new \Exception('foo'); - }); - $client->getEmitter()->on('error', function (ErrorEvent $e) { - $e->intercept(new Response(200)); - }); - $this->assertEquals( - 200, - $client->get('http://test.com')->getStatusCode() - ); - } - - /** - * @expectedException \GuzzleHttp\Exception\RequestException - * @expectedExceptionMessage foo - */ - public function testClientHandlesErrorsDuringBeforeSendAndThrowsIfUnhandled() - { - $client = new Client(); - $client->getEmitter()->on('before', function (BeforeEvent $e) { - throw new RequestException('foo', $e->getRequest()); - }); - $client->get('http://httpbin.org'); - } - - /** - * @expectedException \GuzzleHttp\Exception\RequestException - * @expectedExceptionMessage foo - */ - public function testClientWrapsExceptions() - { - $client = new Client(); - $client->getEmitter()->on('before', function (BeforeEvent $e) { - throw new \Exception('foo'); - }); - $client->get('http://httpbin.org'); - } - - public function testCanInjectResponseForFutureError() - { - $calledFuture = false; - $deferred = new Deferred(); - $future = new FutureArray( - $deferred->promise(), - function () use ($deferred, &$calledFuture) { - $calledFuture = true; - $deferred->resolve(['error' => new \Exception('Noo!')]); - } - ); - $mock = new MockHandler($future); - $client = new Client(['handler' => $mock]); - $called = 0; - $response = $client->get('http://localhost:123/foo', [ - 'future' => true, - 'events' => [ - 'error' => function (ErrorEvent $e) use (&$called) { - $called++; - $e->intercept(new Response(200)); - } - ] - ]); - $this->assertEquals(0, $called); - $this->assertInstanceOf('GuzzleHttp\Message\FutureResponse', $response); - $this->assertEquals(200, $response->getStatusCode()); - $this->assertTrue($calledFuture); - $this->assertEquals(1, $called); - } - - public function testCanReturnFutureResults() - { - $called = false; - $deferred = new Deferred(); - $future = new FutureArray( - $deferred->promise(), - function () use ($deferred, &$called) { - $called = true; - $deferred->resolve(['status' => 201, 'headers' => []]); - } - ); - $mock = new MockHandler($future); - $client = new Client(['handler' => $mock]); - $response = $client->get('http://localhost:123/foo', ['future' => true]); - $this->assertFalse($called); - $this->assertInstanceOf('GuzzleHttp\Message\FutureResponse', $response); - $this->assertEquals(201, $response->getStatusCode()); - $this->assertTrue($called); - } - - public function testThrowsExceptionsWhenDereferenced() - { - $calledFuture = false; - $deferred = new Deferred(); - $future = new FutureArray( - $deferred->promise(), - function () use ($deferred, &$calledFuture) { - $calledFuture = true; - $deferred->resolve(['error' => new \Exception('Noop!')]); - } - ); - $client = new Client(['handler' => new MockHandler($future)]); - try { - $res = $client->get('http://localhost:123/foo', ['future' => true]); - $res->wait(); - $this->fail('Did not throw'); - } catch (RequestException $e) { - $this->assertEquals(1, $calledFuture); - } - } - - /** - * @expectedExceptionMessage Noo! - * @expectedException \GuzzleHttp\Exception\RequestException - */ - public function testThrowsExceptionsSynchronously() - { - $client = new Client([ - 'handler' => new MockHandler(['error' => new \Exception('Noo!')]) - ]); - $client->get('http://localhost:123/foo'); - } - - public function testCanSetDefaultValues() - { - $client = new Client(['foo' => 'bar']); - $client->setDefaultOption('headers/foo', 'bar'); - $this->assertNull($client->getDefaultOption('foo')); - $this->assertEquals('bar', $client->getDefaultOption('headers/foo')); - } - - public function testSendsAllInParallel() - { - $client = new Client(); - $client->getEmitter()->attach(new Mock([ - new Response(200), - new Response(201), - new Response(202), - ])); - $history = new History(); - $client->getEmitter()->attach($history); - - $requests = [ - $client->createRequest('GET', 'http://test.com'), - $client->createRequest('POST', 'http://test.com'), - $client->createRequest('PUT', 'http://test.com') - ]; - - $client->sendAll($requests); - $requests = array_map(function($r) { - return $r->getMethod(); - }, $history->getRequests()); - $this->assertContains('GET', $requests); - $this->assertContains('POST', $requests); - $this->assertContains('PUT', $requests); - } - - public function testCanDisableAuthPerRequest() - { - $client = new Client(['defaults' => ['auth' => 'foo']]); - $request = $client->createRequest('GET', 'http://test.com'); - $this->assertEquals('foo', $request->getConfig()['auth']); - $request = $client->createRequest('GET', 'http://test.com', ['auth' => null]); - $this->assertFalse($request->getConfig()->hasKey('auth')); - } - - public function testUsesProxyEnvironmentVariables() - { - $http = getenv('HTTP_PROXY'); - $https = getenv('HTTPS_PROXY'); - - $client = new Client(); - $this->assertNull($client->getDefaultOption('proxy')); - - putenv('HTTP_PROXY=127.0.0.1'); - $client = new Client(); - $this->assertEquals( - ['http' => '127.0.0.1'], - $client->getDefaultOption('proxy') - ); - - putenv('HTTPS_PROXY=127.0.0.2'); - $client = new Client(); - $this->assertEquals( - ['http' => '127.0.0.1', 'https' => '127.0.0.2'], - $client->getDefaultOption('proxy') - ); - - putenv("HTTP_PROXY=$http"); - putenv("HTTPS_PROXY=$https"); - } - - public function testReturnsFutureForErrorWhenRequested() - { - $client = new Client(['handler' => new MockHandler(['status' => 404])]); - $request = $client->createRequest('GET', 'http://localhost:123/foo', [ - 'future' => true - ]); - $res = $client->send($request); - $this->assertInstanceOf('GuzzleHttp\Message\FutureResponse', $res); - try { - $res->wait(); - $this->fail('did not throw'); - } catch (RequestException $e) { - $this->assertContains('404', $e->getMessage()); - } - } - - public function testReturnsFutureForResponseWhenRequested() - { - $client = new Client(['handler' => new MockHandler(['status' => 200])]); - $request = $client->createRequest('GET', 'http://localhost:123/foo', [ - 'future' => true - ]); - $res = $client->send($request); - $this->assertInstanceOf('GuzzleHttp\Message\FutureResponse', $res); - $this->assertEquals(200, $res->getStatusCode()); - } -} diff --git a/core/vendor/guzzlehttp/guzzle/tests/CollectionTest.php b/core/vendor/guzzlehttp/guzzle/tests/CollectionTest.php deleted file mode 100644 index d137947..0000000 --- a/core/vendor/guzzlehttp/guzzle/tests/CollectionTest.php +++ /dev/null @@ -1,416 +0,0 @@ -coll = new Collection(); - } - - public function testConstructorCanBeCalledWithNoParams() - { - $this->coll = new Collection(); - $p = $this->coll->toArray(); - $this->assertEmpty($p, '-> Collection must be empty when no data is passed'); - } - - public function testConstructorCanBeCalledWithParams() - { - $testData = array( - 'test' => 'value', - 'test_2' => 'value2' - ); - $this->coll = new Collection($testData); - $this->assertEquals($this->coll->toArray(), $testData); - $this->assertEquals($this->coll->toArray(), $this->coll->toArray()); - } - - public function testImplementsIteratorAggregate() - { - $this->coll->set('key', 'value'); - $this->assertInstanceOf('ArrayIterator', $this->coll->getIterator()); - $this->assertEquals(1, count($this->coll)); - $total = 0; - foreach ($this->coll as $key => $value) { - $this->assertEquals('key', $key); - $this->assertEquals('value', $value); - $total++; - } - $this->assertEquals(1, $total); - } - - public function testCanAddValuesToExistingKeysByUsingArray() - { - $this->coll->add('test', 'value1'); - $this->assertEquals($this->coll->toArray(), array('test' => 'value1')); - $this->coll->add('test', 'value2'); - $this->assertEquals($this->coll->toArray(), array('test' => array('value1', 'value2'))); - $this->coll->add('test', 'value3'); - $this->assertEquals($this->coll->toArray(), array('test' => array('value1', 'value2', 'value3'))); - } - - public function testHandlesMergingInDisparateDataSources() - { - $params = array( - 'test' => 'value1', - 'test2' => 'value2', - 'test3' => array('value3', 'value4') - ); - $this->coll->merge($params); - $this->assertEquals($this->coll->toArray(), $params); - $this->coll->merge(new Collection(['test4' => 'hi'])); - $this->assertEquals( - $this->coll->toArray(), - $params + ['test4' => 'hi'] - ); - } - - public function testCanClearAllDataOrSpecificKeys() - { - $this->coll->merge(array( - 'test' => 'value1', - 'test2' => 'value2' - )); - - // Clear a specific parameter by name - $this->coll->remove('test'); - - $this->assertEquals($this->coll->toArray(), array( - 'test2' => 'value2' - )); - - // Clear all parameters - $this->coll->clear(); - - $this->assertEquals($this->coll->toArray(), array()); - } - - public function testProvidesKeys() - { - $this->assertEquals(array(), $this->coll->getKeys()); - $this->coll->merge(array( - 'test1' => 'value1', - 'test2' => 'value2' - )); - $this->assertEquals(array('test1', 'test2'), $this->coll->getKeys()); - // Returns the cached array previously returned - $this->assertEquals(array('test1', 'test2'), $this->coll->getKeys()); - $this->coll->remove('test1'); - $this->assertEquals(array('test2'), $this->coll->getKeys()); - $this->coll->add('test3', 'value3'); - $this->assertEquals(array('test2', 'test3'), $this->coll->getKeys()); - } - - public function testChecksIfHasKey() - { - $this->assertFalse($this->coll->hasKey('test')); - $this->coll->add('test', 'value'); - $this->assertEquals(true, $this->coll->hasKey('test')); - $this->coll->add('test2', 'value2'); - $this->assertEquals(true, $this->coll->hasKey('test')); - $this->assertEquals(true, $this->coll->hasKey('test2')); - $this->assertFalse($this->coll->hasKey('testing')); - $this->assertEquals(false, $this->coll->hasKey('AB-C', 'junk')); - } - - public function testChecksIfHasValue() - { - $this->assertFalse($this->coll->hasValue('value')); - $this->coll->add('test', 'value'); - $this->assertEquals('test', $this->coll->hasValue('value')); - $this->coll->add('test2', 'value2'); - $this->assertEquals('test', $this->coll->hasValue('value')); - $this->assertEquals('test2', $this->coll->hasValue('value2')); - $this->assertFalse($this->coll->hasValue('val')); - } - - public function testImplementsCount() - { - $data = new Collection(); - $this->assertEquals(0, $data->count()); - $data->add('key', 'value'); - $this->assertEquals(1, count($data)); - $data->add('key', 'value2'); - $this->assertEquals(1, count($data)); - $data->add('key_2', 'value3'); - $this->assertEquals(2, count($data)); - } - - public function testAddParamsByMerging() - { - $params = array( - 'test' => 'value1', - 'test2' => 'value2', - 'test3' => array('value3', 'value4') - ); - - // Add some parameters - $this->coll->merge($params); - - // Add more parameters by merging them in - $this->coll->merge(array( - 'test' => 'another', - 'different_key' => 'new value' - )); - - $this->assertEquals(array( - 'test' => array('value1', 'another'), - 'test2' => 'value2', - 'test3' => array('value3', 'value4'), - 'different_key' => 'new value' - ), $this->coll->toArray()); - } - - public function testAllowsFunctionalFilter() - { - $this->coll->merge(array( - 'fruit' => 'apple', - 'number' => 'ten', - 'prepositions' => array('about', 'above', 'across', 'after'), - 'same_number' => 'ten' - )); - - $filtered = $this->coll->filter(function ($key, $value) { - return $value == 'ten'; - }); - - $this->assertNotSame($filtered, $this->coll); - - $this->assertEquals(array( - 'number' => 'ten', - 'same_number' => 'ten' - ), $filtered->toArray()); - } - - public function testAllowsFunctionalMapping() - { - $this->coll->merge(array( - 'number_1' => 1, - 'number_2' => 2, - 'number_3' => 3 - )); - - $mapped = $this->coll->map(function ($key, $value) { - return $value * $value; - }); - - $this->assertNotSame($mapped, $this->coll); - - $this->assertEquals(array( - 'number_1' => 1, - 'number_2' => 4, - 'number_3' => 9 - ), $mapped->toArray()); - } - - public function testImplementsArrayAccess() - { - $this->coll->merge(array( - 'k1' => 'v1', - 'k2' => 'v2' - )); - - $this->assertTrue($this->coll->offsetExists('k1')); - $this->assertFalse($this->coll->offsetExists('Krull')); - - $this->coll->offsetSet('k3', 'v3'); - $this->assertEquals('v3', $this->coll->offsetGet('k3')); - $this->assertEquals('v3', $this->coll->get('k3')); - - $this->coll->offsetUnset('k1'); - $this->assertFalse($this->coll->offsetExists('k1')); - } - - public function testCanReplaceAllData() - { - $this->coll->replace(array('a' => '123')); - $this->assertEquals(array('a' => '123'), $this->coll->toArray()); - } - - public function testPreparesFromConfig() - { - $c = Collection::fromConfig(array( - 'a' => '123', - 'base_url' => 'http://www.test.com/' - ), array( - 'a' => 'xyz', - 'b' => 'lol' - ), array('a')); - - $this->assertInstanceOf('GuzzleHttp\Collection', $c); - $this->assertEquals(array( - 'a' => '123', - 'b' => 'lol', - 'base_url' => 'http://www.test.com/' - ), $c->toArray()); - - try { - $c = Collection::fromConfig(array(), array(), array('a')); - $this->fail('Exception not throw when missing config'); - } catch (\InvalidArgumentException $e) { - } - } - - function falseyDataProvider() - { - return array( - array(false, false), - array(null, null), - array('', ''), - array(array(), array()), - array(0, 0), - ); - } - - /** - * @dataProvider falseyDataProvider - */ - public function testReturnsCorrectData($a, $b) - { - $c = new Collection(array('value' => $a)); - $this->assertSame($b, $c->get('value')); - } - - public function testRetrievesNestedKeysUsingPath() - { - $data = array( - 'foo' => 'bar', - 'baz' => array( - 'mesa' => array( - 'jar' => 'jar' - ) - ) - ); - $collection = new Collection($data); - $this->assertEquals('bar', $collection->getPath('foo')); - $this->assertEquals('jar', $collection->getPath('baz/mesa/jar')); - $this->assertNull($collection->getPath('wewewf')); - $this->assertNull($collection->getPath('baz/mesa/jar/jar')); - } - - public function testFalseyKeysStillDescend() - { - $collection = new Collection(array( - '0' => array( - 'a' => 'jar' - ), - 1 => 'other' - )); - $this->assertEquals('jar', $collection->getPath('0/a')); - $this->assertEquals('other', $collection->getPath('1')); - } - - public function getPathProvider() - { - $data = array( - 'foo' => 'bar', - 'baz' => array( - 'mesa' => array( - 'jar' => 'jar', - 'array' => array('a', 'b', 'c') - ), - 'bar' => array( - 'baz' => 'bam', - 'array' => array('d', 'e', 'f') - ) - ), - 'bam' => array( - array('foo' => 1), - array('foo' => 2), - array('array' => array('h', 'i')) - ) - ); - $c = new Collection($data); - - return array( - // Simple path selectors - array($c, 'foo', 'bar'), - array($c, 'baz', $data['baz']), - array($c, 'bam', $data['bam']), - array($c, 'baz/mesa', $data['baz']['mesa']), - array($c, 'baz/mesa/jar', 'jar'), - // Does not barf on missing keys - array($c, 'fefwfw', null), - array($c, 'baz/mesa/array', $data['baz']['mesa']['array']) - ); - } - - /** - * @dataProvider getPathProvider - */ - public function testGetPath(Collection $c, $path, $expected, $separator = '/') - { - $this->assertEquals($expected, $c->getPath($path, $separator)); - } - - public function testOverridesSettings() - { - $c = new Collection(array('foo' => 1, 'baz' => 2, 'bar' => 3)); - $c->overwriteWith(array('foo' => 10, 'bar' => 300)); - $this->assertEquals(array('foo' => 10, 'baz' => 2, 'bar' => 300), $c->toArray()); - } - - public function testOverwriteWithCollection() - { - $c = new Collection(array('foo' => 1, 'baz' => 2, 'bar' => 3)); - $b = new Collection(array('foo' => 10, 'bar' => 300)); - $c->overwriteWith($b); - $this->assertEquals(array('foo' => 10, 'baz' => 2, 'bar' => 300), $c->toArray()); - } - - public function testOverwriteWithTraversable() - { - $c = new Collection(array('foo' => 1, 'baz' => 2, 'bar' => 3)); - $b = new Collection(array('foo' => 10, 'bar' => 300)); - $c->overwriteWith($b->getIterator()); - $this->assertEquals(array('foo' => 10, 'baz' => 2, 'bar' => 300), $c->toArray()); - } - - public function testCanSetNestedPathValueThatDoesNotExist() - { - $c = new Collection(array()); - $c->setPath('foo/bar/baz/123', 'hi'); - $this->assertEquals('hi', $c['foo']['bar']['baz']['123']); - } - - public function testCanSetNestedPathValueThatExists() - { - $c = new Collection(array('foo' => array('bar' => 'test'))); - $c->setPath('foo/bar', 'hi'); - $this->assertEquals('hi', $c['foo']['bar']); - } - - /** - * @expectedException \RuntimeException - */ - public function testVerifiesNestedPathIsValidAtExactLevel() - { - $c = new Collection(array('foo' => 'bar')); - $c->setPath('foo/bar', 'hi'); - $this->assertEquals('hi', $c['foo']['bar']); - } - - /** - * @expectedException \RuntimeException - */ - public function testVerifiesThatNestedPathIsValidAtAnyLevel() - { - $c = new Collection(array('foo' => 'bar')); - $c->setPath('foo/bar/baz', 'test'); - } - - public function testCanAppendToNestedPathValues() - { - $c = new Collection(); - $c->setPath('foo/bar/[]', 'a'); - $c->setPath('foo/bar/[]', 'b'); - $this->assertEquals(['a', 'b'], $c['foo']['bar']); - } -} diff --git a/core/vendor/guzzlehttp/guzzle/tests/Cookie/CookieJarTest.php b/core/vendor/guzzlehttp/guzzle/tests/Cookie/CookieJarTest.php deleted file mode 100644 index 1360419..0000000 --- a/core/vendor/guzzlehttp/guzzle/tests/Cookie/CookieJarTest.php +++ /dev/null @@ -1,339 +0,0 @@ -jar = new CookieJar(); - } - - protected function getTestCookies() - { - return [ - new SetCookie(['Name' => 'foo', 'Value' => 'bar', 'Domain' => 'foo.com', 'Path' => '/', 'Discard' => true]), - new SetCookie(['Name' => 'test', 'Value' => '123', 'Domain' => 'baz.com', 'Path' => '/foo', 'Expires' => 2]), - new SetCookie(['Name' => 'you', 'Value' => '123', 'Domain' => 'bar.com', 'Path' => '/boo', 'Expires' => time() + 1000]) - ]; - } - - public function testQuotesBadCookieValues() - { - $this->assertEquals('foo', CookieJar::getCookieValue('foo')); - $this->assertEquals('"foo,bar"', CookieJar::getCookieValue('foo,bar')); - } - - public function testCreatesFromArray() - { - $jar = CookieJar::fromArray([ - 'foo' => 'bar', - 'baz' => 'bam' - ], 'example.com'); - $this->assertCount(2, $jar); - } - - /** - * Provides test data for cookie cookieJar retrieval - */ - public function getCookiesDataProvider() - { - return [ - [['foo', 'baz', 'test', 'muppet', 'googoo'], '', '', '', false], - [['foo', 'baz', 'muppet', 'googoo'], '', '', '', true], - [['googoo'], 'www.example.com', '', '', false], - [['muppet', 'googoo'], 'test.y.example.com', '', '', false], - [['foo', 'baz'], 'example.com', '', '', false], - [['muppet'], 'x.y.example.com', '/acme/', '', false], - [['muppet'], 'x.y.example.com', '/acme/test/', '', false], - [['googoo'], 'x.y.example.com', '/test/acme/test/', '', false], - [['foo', 'baz'], 'example.com', '', '', false], - [['baz'], 'example.com', '', 'baz', false], - ]; - } - - public function testStoresAndRetrievesCookies() - { - $cookies = $this->getTestCookies(); - foreach ($cookies as $cookie) { - $this->assertTrue($this->jar->setCookie($cookie)); - } - - $this->assertEquals(3, count($this->jar)); - $this->assertEquals(3, count($this->jar->getIterator())); - $this->assertEquals($cookies, $this->jar->getIterator()->getArrayCopy()); - } - - public function testRemovesTemporaryCookies() - { - $cookies = $this->getTestCookies(); - foreach ($this->getTestCookies() as $cookie) { - $this->jar->setCookie($cookie); - } - $this->jar->clearSessionCookies(); - $this->assertEquals( - [$cookies[1], $cookies[2]], - $this->jar->getIterator()->getArrayCopy() - ); - } - - public function testRemovesSelectively() - { - foreach ($this->getTestCookies() as $cookie) { - $this->jar->setCookie($cookie); - } - - // Remove foo.com cookies - $this->jar->clear('foo.com'); - $this->assertEquals(2, count($this->jar)); - // Try again, removing no further cookies - $this->jar->clear('foo.com'); - $this->assertEquals(2, count($this->jar)); - - // Remove bar.com cookies with path of /boo - $this->jar->clear('bar.com', '/boo'); - $this->assertEquals(1, count($this->jar)); - - // Remove cookie by name - $this->jar->clear(null, null, 'test'); - $this->assertEquals(0, count($this->jar)); - } - - public function testDoesNotAddIncompleteCookies() - { - $this->assertEquals(false, $this->jar->setCookie(new SetCookie())); - $this->assertFalse($this->jar->setCookie(new SetCookie(array( - 'Name' => 'foo' - )))); - $this->assertFalse($this->jar->setCookie(new SetCookie(array( - 'Name' => false - )))); - $this->assertFalse($this->jar->setCookie(new SetCookie(array( - 'Name' => true - )))); - $this->assertFalse($this->jar->setCookie(new SetCookie(array( - 'Name' => 'foo', - 'Domain' => 'foo.com' - )))); - } - - public function testDoesAddValidCookies() - { - $this->assertTrue($this->jar->setCookie(new SetCookie(array( - 'Name' => 'foo', - 'Domain' => 'foo.com', - 'Value' => 0 - )))); - $this->assertTrue($this->jar->setCookie(new SetCookie(array( - 'Name' => 'foo', - 'Domain' => 'foo.com', - 'Value' => 0.0 - )))); - $this->assertTrue($this->jar->setCookie(new SetCookie(array( - 'Name' => 'foo', - 'Domain' => 'foo.com', - 'Value' => '0' - )))); - } - - public function testOverwritesCookiesThatAreOlderOrDiscardable() - { - $t = time() + 1000; - $data = array( - 'Name' => 'foo', - 'Value' => 'bar', - 'Domain' => '.example.com', - 'Path' => '/', - 'Max-Age' => '86400', - 'Secure' => true, - 'Discard' => true, - 'Expires' => $t - ); - - // Make sure that the discard cookie is overridden with the non-discard - $this->assertTrue($this->jar->setCookie(new SetCookie($data))); - $this->assertEquals(1, count($this->jar)); - - $data['Discard'] = false; - $this->assertTrue($this->jar->setCookie(new SetCookie($data))); - $this->assertEquals(1, count($this->jar)); - - $c = $this->jar->getIterator()->getArrayCopy(); - $this->assertEquals(false, $c[0]->getDiscard()); - - // Make sure it doesn't duplicate the cookie - $this->jar->setCookie(new SetCookie($data)); - $this->assertEquals(1, count($this->jar)); - - // Make sure the more future-ful expiration date supersede the other - $data['Expires'] = time() + 2000; - $this->assertTrue($this->jar->setCookie(new SetCookie($data))); - $this->assertEquals(1, count($this->jar)); - $c = $this->jar->getIterator()->getArrayCopy(); - $this->assertNotEquals($t, $c[0]->getExpires()); - } - - public function testOverwritesCookiesThatHaveChanged() - { - $t = time() + 1000; - $data = array( - 'Name' => 'foo', - 'Value' => 'bar', - 'Domain' => '.example.com', - 'Path' => '/', - 'Max-Age' => '86400', - 'Secure' => true, - 'Discard' => true, - 'Expires' => $t - ); - - // Make sure that the discard cookie is overridden with the non-discard - $this->assertTrue($this->jar->setCookie(new SetCookie($data))); - - $data['Value'] = 'boo'; - $this->assertTrue($this->jar->setCookie(new SetCookie($data))); - $this->assertEquals(1, count($this->jar)); - - // Changing the value plus a parameter also must overwrite the existing one - $data['Value'] = 'zoo'; - $data['Secure'] = false; - $this->assertTrue($this->jar->setCookie(new SetCookie($data))); - $this->assertEquals(1, count($this->jar)); - - $c = $this->jar->getIterator()->getArrayCopy(); - $this->assertEquals('zoo', $c[0]->getValue()); - } - - public function testAddsCookiesFromResponseWithRequest() - { - $response = new Response(200, array( - 'Set-Cookie' => "fpc=d=.Hm.yh4.1XmJWjJfs4orLQzKzPImxklQoxXSHOZATHUSEFciRueW_7704iYUtsXNEXq0M92Px2glMdWypmJ7HIQl6XIUvrZimWjQ3vIdeuRbI.FNQMAfcxu_XN1zSx7l.AcPdKL6guHc2V7hIQFhnjRW0rxm2oHY1P4bGQxFNz7f.tHm12ZD3DbdMDiDy7TBXsuP4DM-&v=2; expires=Fri, 02-Mar-2019 02:17:40 GMT;" - )); - $request = new Request('GET', 'http://www.example.com'); - $this->jar->extractCookies($request, $response); - $this->assertEquals(1, count($this->jar)); - } - - public function getMatchingCookiesDataProvider() - { - return array( - array('https://example.com', 'foo=bar; baz=foobar'), - array('http://example.com', ''), - array('https://example.com:8912', 'foo=bar; baz=foobar'), - array('https://foo.example.com', 'foo=bar; baz=foobar'), - array('http://foo.example.com/test/acme/', 'googoo=gaga') - ); - } - - /** - * @dataProvider getMatchingCookiesDataProvider - */ - public function testReturnsCookiesMatchingRequests($url, $cookies) - { - $bag = [ - new SetCookie([ - 'Name' => 'foo', - 'Value' => 'bar', - 'Domain' => 'example.com', - 'Path' => '/', - 'Max-Age' => '86400', - 'Secure' => true - ]), - new SetCookie([ - 'Name' => 'baz', - 'Value' => 'foobar', - 'Domain' => 'example.com', - 'Path' => '/', - 'Max-Age' => '86400', - 'Secure' => true - ]), - new SetCookie([ - 'Name' => 'test', - 'Value' => '123', - 'Domain' => 'www.foobar.com', - 'Path' => '/path/', - 'Discard' => true - ]), - new SetCookie([ - 'Name' => 'muppet', - 'Value' => 'cookie_monster', - 'Domain' => '.y.example.com', - 'Path' => '/acme/', - 'Expires' => time() + 86400 - ]), - new SetCookie([ - 'Name' => 'googoo', - 'Value' => 'gaga', - 'Domain' => '.example.com', - 'Path' => '/test/acme/', - 'Max-Age' => 1500 - ]) - ]; - - foreach ($bag as $cookie) { - $this->jar->setCookie($cookie); - } - - $request = new Request('GET', $url); - $this->jar->addCookieHeader($request); - $this->assertEquals($cookies, $request->getHeader('Cookie')); - } - - /** - * @expectedException \RuntimeException - * @expectedExceptionMessage Invalid cookie: Cookie name must not cannot invalid characters: - */ - public function testThrowsExceptionWithStrictMode() - { - $a = new CookieJar(true); - $a->setCookie(new SetCookie(['Name' => "abc\n", 'Value' => 'foo', 'Domain' => 'bar'])); - } - - public function testDeletesCookiesByName() - { - $cookies = $this->getTestCookies(); - $cookies[] = new SetCookie([ - 'Name' => 'other', - 'Value' => '123', - 'Domain' => 'bar.com', - 'Path' => '/boo', - 'Expires' => time() + 1000 - ]); - $jar = new CookieJar(); - foreach ($cookies as $cookie) { - $jar->setCookie($cookie); - } - $this->assertCount(4, $jar); - $jar->clear('bar.com', '/boo', 'other'); - $this->assertCount(3, $jar); - $names = array_map(function (SetCookie $c) { - return $c->getName(); - }, $jar->getIterator()->getArrayCopy()); - $this->assertEquals(['foo', 'test', 'you'], $names); - } - - public function testCanConvertToAndLoadFromArray() - { - $jar = new CookieJar(true); - foreach ($this->getTestCookies() as $cookie) { - $jar->setCookie($cookie); - } - $this->assertCount(3, $jar); - $arr = $jar->toArray(); - $this->assertCount(3, $arr); - $newCookieJar = new CookieJar(false, $arr); - $this->assertCount(3, $newCookieJar); - $this->assertSame($jar->toArray(), $newCookieJar->toArray()); - } -} diff --git a/core/vendor/guzzlehttp/guzzle/tests/Cookie/FileCookieJarTest.php b/core/vendor/guzzlehttp/guzzle/tests/Cookie/FileCookieJarTest.php deleted file mode 100644 index 1d11337..0000000 --- a/core/vendor/guzzlehttp/guzzle/tests/Cookie/FileCookieJarTest.php +++ /dev/null @@ -1,71 +0,0 @@ -file = tempnam('/tmp', 'file-cookies'); - } - - /** - * @expectedException \RuntimeException - */ - public function testValidatesCookieFile() - { - file_put_contents($this->file, 'true'); - new FileCookieJar($this->file); - } - - public function testLoadsFromFileFile() - { - $jar = new FileCookieJar($this->file); - $this->assertEquals([], $jar->getIterator()->getArrayCopy()); - unlink($this->file); - } - - public function testPersistsToFileFile() - { - $jar = new FileCookieJar($this->file); - $jar->setCookie(new SetCookie([ - 'Name' => 'foo', - 'Value' => 'bar', - 'Domain' => 'foo.com', - 'Expires' => time() + 1000 - ])); - $jar->setCookie(new SetCookie([ - 'Name' => 'baz', - 'Value' => 'bar', - 'Domain' => 'foo.com', - 'Expires' => time() + 1000 - ])); - $jar->setCookie(new SetCookie([ - 'Name' => 'boo', - 'Value' => 'bar', - 'Domain' => 'foo.com', - ])); - - $this->assertEquals(3, count($jar)); - unset($jar); - - // Make sure it wrote to the file - $contents = file_get_contents($this->file); - $this->assertNotEmpty($contents); - - // Load the cookieJar from the file - $jar = new FileCookieJar($this->file); - - // Weeds out temporary and session cookies - $this->assertEquals(2, count($jar)); - unset($jar); - unlink($this->file); - } -} diff --git a/core/vendor/guzzlehttp/guzzle/tests/Cookie/SessionCookieJarTest.php b/core/vendor/guzzlehttp/guzzle/tests/Cookie/SessionCookieJarTest.php deleted file mode 100644 index ccc6d4e..0000000 --- a/core/vendor/guzzlehttp/guzzle/tests/Cookie/SessionCookieJarTest.php +++ /dev/null @@ -1,76 +0,0 @@ -sessionVar = 'sessionKey'; - - if (!isset($_SESSION)) { - $_SESSION = array(); - } - } - - /** - * @expectedException \RuntimeException - */ - public function testValidatesCookieSession() - { - $_SESSION[$this->sessionVar] = 'true'; - new SessionCookieJar($this->sessionVar); - } - - public function testLoadsFromSession() - { - $jar = new SessionCookieJar($this->sessionVar); - $this->assertEquals([], $jar->getIterator()->getArrayCopy()); - unset($_SESSION[$this->sessionVar]); - } - - public function testPersistsToSession() - { - $jar = new SessionCookieJar($this->sessionVar); - $jar->setCookie(new SetCookie([ - 'Name' => 'foo', - 'Value' => 'bar', - 'Domain' => 'foo.com', - 'Expires' => time() + 1000 - ])); - $jar->setCookie(new SetCookie([ - 'Name' => 'baz', - 'Value' => 'bar', - 'Domain' => 'foo.com', - 'Expires' => time() + 1000 - ])); - $jar->setCookie(new SetCookie([ - 'Name' => 'boo', - 'Value' => 'bar', - 'Domain' => 'foo.com', - ])); - - $this->assertEquals(3, count($jar)); - unset($jar); - - // Make sure it wrote to the sessionVar in $_SESSION - $contents = $_SESSION[$this->sessionVar]; - $this->assertNotEmpty($contents); - - // Load the cookieJar from the file - $jar = new SessionCookieJar($this->sessionVar); - - // Weeds out temporary and session cookies - $this->assertEquals(2, count($jar)); - unset($jar); - unset($_SESSION[$this->sessionVar]); - } -} diff --git a/core/vendor/guzzlehttp/guzzle/tests/Cookie/SetCookieTest.php b/core/vendor/guzzlehttp/guzzle/tests/Cookie/SetCookieTest.php deleted file mode 100644 index 3ddd082..0000000 --- a/core/vendor/guzzlehttp/guzzle/tests/Cookie/SetCookieTest.php +++ /dev/null @@ -1,364 +0,0 @@ -assertEquals('/', $cookie->getPath()); - } - - public function testConvertsDateTimeMaxAgeToUnixTimestamp() - { - $cookie = new SetCookie(['Expires' => 'November 20, 1984']); - $this->assertInternalType('integer', $cookie->getExpires()); - } - - public function testAddsExpiresBasedOnMaxAge() - { - $t = time(); - $cookie = new SetCookie(['Max-Age' => 100]); - $this->assertEquals($t + 100, $cookie->getExpires()); - } - - public function testHoldsValues() - { - $t = time(); - $data = array( - 'Name' => 'foo', - 'Value' => 'baz', - 'Path' => '/bar', - 'Domain' => 'baz.com', - 'Expires' => $t, - 'Max-Age' => 100, - 'Secure' => true, - 'Discard' => true, - 'HttpOnly' => true, - 'foo' => 'baz', - 'bar' => 'bam' - ); - - $cookie = new SetCookie($data); - $this->assertEquals($data, $cookie->toArray()); - - $this->assertEquals('foo', $cookie->getName()); - $this->assertEquals('baz', $cookie->getValue()); - $this->assertEquals('baz.com', $cookie->getDomain()); - $this->assertEquals('/bar', $cookie->getPath()); - $this->assertEquals($t, $cookie->getExpires()); - $this->assertEquals(100, $cookie->getMaxAge()); - $this->assertTrue($cookie->getSecure()); - $this->assertTrue($cookie->getDiscard()); - $this->assertTrue($cookie->getHttpOnly()); - $this->assertEquals('baz', $cookie->toArray()['foo']); - $this->assertEquals('bam', $cookie->toArray()['bar']); - - $cookie->setName('a'); - $cookie->setValue('b'); - $cookie->setPath('c'); - $cookie->setDomain('bar.com'); - $cookie->setExpires(10); - $cookie->setMaxAge(200); - $cookie->setSecure(false); - $cookie->setHttpOnly(false); - $cookie->setDiscard(false); - - $this->assertEquals('a', $cookie->getName()); - $this->assertEquals('b', $cookie->getValue()); - $this->assertEquals('c', $cookie->getPath()); - $this->assertEquals('bar.com', $cookie->getDomain()); - $this->assertEquals(10, $cookie->getExpires()); - $this->assertEquals(200, $cookie->getMaxAge()); - $this->assertFalse($cookie->getSecure()); - $this->assertFalse($cookie->getDiscard()); - $this->assertFalse($cookie->getHttpOnly()); - } - - public function testDeterminesIfExpired() - { - $c = new SetCookie(); - $c->setExpires(10); - $this->assertTrue($c->isExpired()); - $c->setExpires(time() + 10000); - $this->assertFalse($c->isExpired()); - } - - public function testMatchesDomain() - { - $cookie = new SetCookie(); - $this->assertTrue($cookie->matchesDomain('baz.com')); - - $cookie->setDomain('baz.com'); - $this->assertTrue($cookie->matchesDomain('baz.com')); - $this->assertFalse($cookie->matchesDomain('bar.com')); - - $cookie->setDomain('.baz.com'); - $this->assertTrue($cookie->matchesDomain('.baz.com')); - $this->assertTrue($cookie->matchesDomain('foo.baz.com')); - $this->assertFalse($cookie->matchesDomain('baz.bar.com')); - $this->assertTrue($cookie->matchesDomain('baz.com')); - - $cookie->setDomain('.127.0.0.1'); - $this->assertTrue($cookie->matchesDomain('127.0.0.1')); - - $cookie->setDomain('127.0.0.1'); - $this->assertTrue($cookie->matchesDomain('127.0.0.1')); - - $cookie->setDomain('.com.'); - $this->assertFalse($cookie->matchesDomain('baz.com')); - - $cookie->setDomain('.local'); - $this->assertTrue($cookie->matchesDomain('example.local')); - } - - public function testMatchesPath() - { - $cookie = new SetCookie(); - $this->assertTrue($cookie->matchesPath('/foo')); - - $cookie->setPath('/foo'); - $this->assertTrue($cookie->matchesPath('/foo')); - $this->assertTrue($cookie->matchesPath('/foo/bar')); - $this->assertFalse($cookie->matchesPath('/bar')); - } - - public function cookieValidateProvider() - { - return array( - array('foo', 'baz', 'bar', true), - array('0', '0', '0', true), - array('', 'baz', 'bar', 'The cookie name must not be empty'), - array('foo', '', 'bar', 'The cookie value must not be empty'), - array('foo', 'baz', '', 'The cookie domain must not be empty'), - array("foo\r", 'baz', '0', 'Cookie name must not cannot invalid characters: =,; \t\r\n\013\014'), - ); - } - - /** - * @dataProvider cookieValidateProvider - */ - public function testValidatesCookies($name, $value, $domain, $result) - { - $cookie = new SetCookie(array( - 'Name' => $name, - 'Value' => $value, - 'Domain' => $domain - )); - $this->assertSame($result, $cookie->validate()); - } - - public function testDoesNotMatchIp() - { - $cookie = new SetCookie(['Domain' => '192.168.16.']); - $this->assertFalse($cookie->matchesDomain('192.168.16.121')); - } - - public function testConvertsToString() - { - $t = 1382916008; - $cookie = new SetCookie([ - 'Name' => 'test', - 'Value' => '123', - 'Domain' => 'foo.com', - 'Expires' => $t, - 'Path' => '/abc', - 'HttpOnly' => true, - 'Secure' => true - ]); - $this->assertEquals( - 'test=123; Domain=foo.com; Path=/abc; Expires=Sun, 27 Oct 2013 23:20:08 GMT; Secure; HttpOnly', - (string) $cookie - ); - } - - /** - * Provides the parsed information from a cookie - * - * @return array - */ - public function cookieParserDataProvider() - { - return array( - array( - 'ASIHTTPRequestTestCookie=This+is+the+value; expires=Sat, 26-Jul-2008 17:00:42 GMT; path=/tests; domain=allseeing-i.com; PHPSESSID=6c951590e7a9359bcedde25cda73e43c; path=/";', - array( - 'Domain' => 'allseeing-i.com', - 'Path' => '/', - 'PHPSESSID' => '6c951590e7a9359bcedde25cda73e43c', - 'Max-Age' => NULL, - 'Expires' => 'Sat, 26-Jul-2008 17:00:42 GMT', - 'Secure' => NULL, - 'Discard' => NULL, - 'Name' => 'ASIHTTPRequestTestCookie', - 'Value' => 'This+is+the+value', - 'HttpOnly' => false - ) - ), - array('', []), - array('foo', []), - // Test setting a blank value for a cookie - array(array( - 'foo=', 'foo =', 'foo =;', 'foo= ;', 'foo =', 'foo= '), - array( - 'Name' => 'foo', - 'Value' => '', - 'Discard' => null, - 'Domain' => null, - 'Expires' => null, - 'Max-Age' => null, - 'Path' => '/', - 'Secure' => null, - 'HttpOnly' => false - ) - ), - // Test setting a value and removing quotes - array(array( - 'foo=1', 'foo =1', 'foo =1;', 'foo=1 ;', 'foo =1', 'foo= 1', 'foo = 1 ;', 'foo="1"', 'foo="1";', 'foo= "1";'), - array( - 'Name' => 'foo', - 'Value' => '1', - 'Discard' => null, - 'Domain' => null, - 'Expires' => null, - 'Max-Age' => null, - 'Path' => '/', - 'Secure' => null, - 'HttpOnly' => false - ) - ), - // Some of the following tests are based on http://framework.zend.com/svn/framework/standard/trunk/tests/Zend/Http/CookieTest.php - array( - 'justacookie=foo; domain=example.com', - array( - 'Name' => 'justacookie', - 'Value' => 'foo', - 'Domain' => 'example.com', - 'Discard' => null, - 'Expires' => null, - 'Max-Age' => null, - 'Path' => '/', - 'Secure' => null, - 'HttpOnly' => false - ) - ), - array( - 'expires=tomorrow; secure; path=/Space Out/; expires=Tue, 21-Nov-2006 08:33:44 GMT; domain=.example.com', - array( - 'Name' => 'expires', - 'Value' => 'tomorrow', - 'Domain' => '.example.com', - 'Path' => '/Space Out/', - 'Expires' => 'Tue, 21-Nov-2006 08:33:44 GMT', - 'Discard' => null, - 'Secure' => true, - 'Max-Age' => null, - 'HttpOnly' => false - ) - ), - array( - 'domain=unittests; expires=Tue, 21-Nov-2006 08:33:44 GMT; domain=example.com; path=/some value/', - array( - 'Name' => 'domain', - 'Value' => 'unittests', - 'Domain' => 'example.com', - 'Path' => '/some value/', - 'Expires' => 'Tue, 21-Nov-2006 08:33:44 GMT', - 'Secure' => false, - 'Discard' => null, - 'Max-Age' => null, - 'HttpOnly' => false - ) - ), - array( - 'path=indexAction; path=/; domain=.foo.com; expires=Tue, 21-Nov-2006 08:33:44 GMT', - array( - 'Name' => 'path', - 'Value' => 'indexAction', - 'Domain' => '.foo.com', - 'Path' => '/', - 'Expires' => 'Tue, 21-Nov-2006 08:33:44 GMT', - 'Secure' => false, - 'Discard' => null, - 'Max-Age' => null, - 'HttpOnly' => false - ) - ), - array( - 'secure=sha1; secure; SECURE; domain=some.really.deep.domain.com; version=1; Max-Age=86400', - array( - 'Name' => 'secure', - 'Value' => 'sha1', - 'Domain' => 'some.really.deep.domain.com', - 'Path' => '/', - 'Secure' => true, - 'Discard' => null, - 'Expires' => time() + 86400, - 'Max-Age' => 86400, - 'HttpOnly' => false, - 'version' => '1' - ) - ), - array( - 'PHPSESSID=123456789+abcd%2Cef; secure; discard; domain=.localdomain; path=/foo/baz; expires=Tue, 21-Nov-2006 08:33:44 GMT;', - array( - 'Name' => 'PHPSESSID', - 'Value' => '123456789+abcd%2Cef', - 'Domain' => '.localdomain', - 'Path' => '/foo/baz', - 'Expires' => 'Tue, 21-Nov-2006 08:33:44 GMT', - 'Secure' => true, - 'Discard' => true, - 'Max-Age' => null, - 'HttpOnly' => false - ) - ), - ); - } - - /** - * @dataProvider cookieParserDataProvider - */ - public function testParseCookie($cookie, $parsed) - { - foreach ((array) $cookie as $v) { - $c = SetCookie::fromString($v); - $p = $c->toArray(); - - if (isset($p['Expires'])) { - // Remove expires values from the assertion if they are relatively equal - if (abs($p['Expires'] != strtotime($parsed['Expires'])) < 40) { - unset($p['Expires']); - unset($parsed['Expires']); - } - } - - if (!empty($parsed)) { - foreach ($parsed as $key => $value) { - $this->assertEquals($parsed[$key], $p[$key], 'Comparing ' . $key . ' ' . var_export($value, true) . ' : ' . var_export($parsed, true) . ' | ' . var_export($p, true)); - } - foreach ($p as $key => $value) { - $this->assertEquals($p[$key], $parsed[$key], 'Comparing ' . $key . ' ' . var_export($value, true) . ' : ' . var_export($parsed, true) . ' | ' . var_export($p, true)); - } - } else { - $this->assertEquals([ - 'Name' => null, - 'Value' => null, - 'Domain' => null, - 'Path' => '/', - 'Max-Age' => null, - 'Expires' => null, - 'Secure' => false, - 'Discard' => false, - 'HttpOnly' => false, - ], $p); - } - } - } -} diff --git a/core/vendor/guzzlehttp/guzzle/tests/Event/AbstractEventTest.php b/core/vendor/guzzlehttp/guzzle/tests/Event/AbstractEventTest.php deleted file mode 100644 index b8c06f1..0000000 --- a/core/vendor/guzzlehttp/guzzle/tests/Event/AbstractEventTest.php +++ /dev/null @@ -1,14 +0,0 @@ -getMockBuilder('GuzzleHttp\Event\AbstractEvent') - ->getMockForAbstractClass(); - $this->assertFalse($e->isPropagationStopped()); - $e->stopPropagation(); - $this->assertTrue($e->isPropagationStopped()); - } -} diff --git a/core/vendor/guzzlehttp/guzzle/tests/Event/AbstractRequestEventTest.php b/core/vendor/guzzlehttp/guzzle/tests/Event/AbstractRequestEventTest.php deleted file mode 100644 index 50536c5..0000000 --- a/core/vendor/guzzlehttp/guzzle/tests/Event/AbstractRequestEventTest.php +++ /dev/null @@ -1,33 +0,0 @@ -getMockBuilder('GuzzleHttp\Event\AbstractRequestEvent') - ->setConstructorArgs([$t]) - ->getMockForAbstractClass(); - $this->assertSame($t->client, $e->getClient()); - $this->assertSame($t->request, $e->getRequest()); - } - - public function testHasTransaction() - { - $t = new Transaction(new Client(), new Request('GET', '/')); - $e = $this->getMockBuilder('GuzzleHttp\Event\AbstractRequestEvent') - ->setConstructorArgs([$t]) - ->getMockForAbstractClass(); - $r = new \ReflectionMethod($e, 'getTransaction'); - $r->setAccessible(true); - $this->assertSame($t, $r->invoke($e)); - } -} diff --git a/core/vendor/guzzlehttp/guzzle/tests/Event/AbstractRetryableEventTest.php b/core/vendor/guzzlehttp/guzzle/tests/Event/AbstractRetryableEventTest.php deleted file mode 100644 index dcc874c..0000000 --- a/core/vendor/guzzlehttp/guzzle/tests/Event/AbstractRetryableEventTest.php +++ /dev/null @@ -1,37 +0,0 @@ -transferInfo = ['foo' => 'bar']; - $e = $this->getMockBuilder('GuzzleHttp\Event\AbstractRetryableEvent') - ->setConstructorArgs([$t]) - ->getMockForAbstractClass(); - $e->retry(); - $this->assertTrue($e->isPropagationStopped()); - $this->assertEquals('before', $t->state); - } - - public function testCanRetryAfterDelay() - { - $t = new Transaction(new Client(), new Request('GET', '/')); - $t->transferInfo = ['foo' => 'bar']; - $e = $this->getMockBuilder('GuzzleHttp\Event\AbstractRetryableEvent') - ->setConstructorArgs([$t]) - ->getMockForAbstractClass(); - $e->retry(10); - $this->assertTrue($e->isPropagationStopped()); - $this->assertEquals('before', $t->state); - $this->assertEquals(10, $t->request->getConfig()->get('delay')); - } -} diff --git a/core/vendor/guzzlehttp/guzzle/tests/Event/AbstractTransferEventTest.php b/core/vendor/guzzlehttp/guzzle/tests/Event/AbstractTransferEventTest.php deleted file mode 100644 index ca3b5ba..0000000 --- a/core/vendor/guzzlehttp/guzzle/tests/Event/AbstractTransferEventTest.php +++ /dev/null @@ -1,49 +0,0 @@ -transferInfo = ['foo' => 'bar']; - $e = $this->getMockBuilder('GuzzleHttp\Event\AbstractTransferEvent') - ->setConstructorArgs([$t]) - ->getMockForAbstractClass(); - $this->assertNull($e->getTransferInfo('baz')); - $this->assertEquals('bar', $e->getTransferInfo('foo')); - $this->assertEquals($t->transferInfo, $e->getTransferInfo()); - } - - public function testHasResponse() - { - $t = new Transaction(new Client(), new Request('GET', '/')); - $t->response = new Response(200); - $e = $this->getMockBuilder('GuzzleHttp\Event\AbstractTransferEvent') - ->setConstructorArgs([$t]) - ->getMockForAbstractClass(); - $this->assertTrue($e->hasResponse()); - $this->assertSame($t->response, $e->getResponse()); - } - - public function testCanInterceptWithResponse() - { - $t = new Transaction(new Client(), new Request('GET', '/')); - $r = new Response(200); - $e = $this->getMockBuilder('GuzzleHttp\Event\AbstractTransferEvent') - ->setConstructorArgs([$t]) - ->getMockForAbstractClass(); - $e->intercept($r); - $this->assertSame($t->response, $r); - $this->assertSame($t->response, $e->getResponse()); - $this->assertTrue($e->isPropagationStopped()); - } -} diff --git a/core/vendor/guzzlehttp/guzzle/tests/Event/BeforeEventTest.php b/core/vendor/guzzlehttp/guzzle/tests/Event/BeforeEventTest.php deleted file mode 100644 index 469e4e2..0000000 --- a/core/vendor/guzzlehttp/guzzle/tests/Event/BeforeEventTest.php +++ /dev/null @@ -1,26 +0,0 @@ -exception = new \Exception('foo'); - $e = new BeforeEvent($t); - $response = new Response(200); - $e->intercept($response); - $this->assertTrue($e->isPropagationStopped()); - $this->assertSame($t->response, $response); - $this->assertNull($t->exception); - } -} diff --git a/core/vendor/guzzlehttp/guzzle/tests/Event/EmitterTest.php b/core/vendor/guzzlehttp/guzzle/tests/Event/EmitterTest.php deleted file mode 100644 index 5b7061b..0000000 --- a/core/vendor/guzzlehttp/guzzle/tests/Event/EmitterTest.php +++ /dev/null @@ -1,363 +0,0 @@ -emitter = new Emitter(); - $this->listener = new TestEventListener(); - } - - protected function tearDown() - { - $this->emitter = null; - $this->listener = null; - } - - public function testInitialState() - { - $this->assertEquals(array(), $this->emitter->listeners()); - } - - public function testAddListener() - { - $this->emitter->on('pre.foo', array($this->listener, 'preFoo')); - $this->emitter->on('post.foo', array($this->listener, 'postFoo')); - $this->assertTrue($this->emitter->hasListeners(self::preFoo)); - $this->assertTrue($this->emitter->hasListeners(self::preFoo)); - $this->assertCount(1, $this->emitter->listeners(self::postFoo)); - $this->assertCount(1, $this->emitter->listeners(self::postFoo)); - $this->assertCount(2, $this->emitter->listeners()); - } - - public function testGetListenersSortsByPriority() - { - $listener1 = new TestEventListener(); - $listener2 = new TestEventListener(); - $listener3 = new TestEventListener(); - $listener1->name = '1'; - $listener2->name = '2'; - $listener3->name = '3'; - - $this->emitter->on('pre.foo', array($listener1, 'preFoo'), -10); - $this->emitter->on('pre.foo', array($listener2, 'preFoo'), 10); - $this->emitter->on('pre.foo', array($listener3, 'preFoo')); - - $expected = array( - array($listener2, 'preFoo'), - array($listener3, 'preFoo'), - array($listener1, 'preFoo'), - ); - - $this->assertSame($expected, $this->emitter->listeners('pre.foo')); - } - - public function testGetAllListenersSortsByPriority() - { - $listener1 = new TestEventListener(); - $listener2 = new TestEventListener(); - $listener3 = new TestEventListener(); - $listener4 = new TestEventListener(); - $listener5 = new TestEventListener(); - $listener6 = new TestEventListener(); - - $this->emitter->on('pre.foo', [$listener1, 'preFoo'], -10); - $this->emitter->on('pre.foo', [$listener2, 'preFoo']); - $this->emitter->on('pre.foo', [$listener3, 'preFoo'], 10); - $this->emitter->on('post.foo', [$listener4, 'preFoo'], -10); - $this->emitter->on('post.foo', [$listener5, 'preFoo']); - $this->emitter->on('post.foo', [$listener6, 'preFoo'], 10); - - $expected = [ - 'pre.foo' => [[$listener3, 'preFoo'], [$listener2, 'preFoo'], [$listener1, 'preFoo']], - 'post.foo' => [[$listener6, 'preFoo'], [$listener5, 'preFoo'], [$listener4, 'preFoo']], - ]; - - $this->assertSame($expected, $this->emitter->listeners()); - } - - public function testDispatch() - { - $this->emitter->on('pre.foo', array($this->listener, 'preFoo')); - $this->emitter->on('post.foo', array($this->listener, 'postFoo')); - $this->emitter->emit(self::preFoo, $this->getEvent()); - $this->assertTrue($this->listener->preFooInvoked); - $this->assertFalse($this->listener->postFooInvoked); - $this->assertInstanceOf('GuzzleHttp\Event\EventInterface', $this->emitter->emit(self::preFoo, $this->getEvent())); - $event = $this->getEvent(); - $return = $this->emitter->emit(self::preFoo, $event); - $this->assertSame($event, $return); - } - - public function testDispatchForClosure() - { - $invoked = 0; - $listener = function () use (&$invoked) { - $invoked++; - }; - $this->emitter->on('pre.foo', $listener); - $this->emitter->on('post.foo', $listener); - $this->emitter->emit(self::preFoo, $this->getEvent()); - $this->assertEquals(1, $invoked); - } - - public function testStopEventPropagation() - { - $otherListener = new TestEventListener(); - - // postFoo() stops the propagation, so only one listener should - // be executed - // Manually set priority to enforce $this->listener to be called first - $this->emitter->on('post.foo', array($this->listener, 'postFoo'), 10); - $this->emitter->on('post.foo', array($otherListener, 'preFoo')); - $this->emitter->emit(self::postFoo, $this->getEvent()); - $this->assertTrue($this->listener->postFooInvoked); - $this->assertFalse($otherListener->postFooInvoked); - } - - public function testDispatchByPriority() - { - $invoked = array(); - $listener1 = function () use (&$invoked) { - $invoked[] = '1'; - }; - $listener2 = function () use (&$invoked) { - $invoked[] = '2'; - }; - $listener3 = function () use (&$invoked) { - $invoked[] = '3'; - }; - $this->emitter->on('pre.foo', $listener1, -10); - $this->emitter->on('pre.foo', $listener2); - $this->emitter->on('pre.foo', $listener3, 10); - $this->emitter->emit(self::preFoo, $this->getEvent()); - $this->assertEquals(array('3', '2', '1'), $invoked); - } - - public function testRemoveListener() - { - $this->emitter->on('pre.bar', [$this->listener, 'preFoo']); - $this->assertNotEmpty($this->emitter->listeners(self::preBar)); - $this->emitter->removeListener('pre.bar', [$this->listener, 'preFoo']); - $this->assertEmpty($this->emitter->listeners(self::preBar)); - $this->emitter->removeListener('notExists', [$this->listener, 'preFoo']); - } - - public function testAddSubscriber() - { - $eventSubscriber = new TestEventSubscriber(); - $this->emitter->attach($eventSubscriber); - $this->assertNotEmpty($this->emitter->listeners(self::preFoo)); - $this->assertNotEmpty($this->emitter->listeners(self::postFoo)); - } - - public function testAddSubscriberWithMultiple() - { - $eventSubscriber = new TestEventSubscriberWithMultiple(); - $this->emitter->attach($eventSubscriber); - $listeners = $this->emitter->listeners('pre.foo'); - $this->assertNotEmpty($this->emitter->listeners(self::preFoo)); - $this->assertCount(2, $listeners); - } - - public function testAddSubscriberWithPriorities() - { - $eventSubscriber = new TestEventSubscriber(); - $this->emitter->attach($eventSubscriber); - - $eventSubscriber = new TestEventSubscriberWithPriorities(); - $this->emitter->attach($eventSubscriber); - - $listeners = $this->emitter->listeners('pre.foo'); - $this->assertNotEmpty($this->emitter->listeners(self::preFoo)); - $this->assertCount(2, $listeners); - $this->assertInstanceOf('GuzzleHttp\Tests\Event\TestEventSubscriberWithPriorities', $listeners[0][0]); - } - - public function testdetach() - { - $eventSubscriber = new TestEventSubscriber(); - $this->emitter->attach($eventSubscriber); - $this->assertNotEmpty($this->emitter->listeners(self::preFoo)); - $this->assertNotEmpty($this->emitter->listeners(self::postFoo)); - $this->emitter->detach($eventSubscriber); - $this->assertEmpty($this->emitter->listeners(self::preFoo)); - $this->assertEmpty($this->emitter->listeners(self::postFoo)); - } - - public function testdetachWithPriorities() - { - $eventSubscriber = new TestEventSubscriberWithPriorities(); - $this->emitter->attach($eventSubscriber); - $this->assertNotEmpty($this->emitter->listeners(self::preFoo)); - $this->assertNotEmpty($this->emitter->listeners(self::postFoo)); - $this->emitter->detach($eventSubscriber); - $this->assertEmpty($this->emitter->listeners(self::preFoo)); - $this->assertEmpty($this->emitter->listeners(self::postFoo)); - } - - public function testEventReceivesEventNameAsArgument() - { - $listener = new TestWithDispatcher(); - $this->emitter->on('test', array($listener, 'foo')); - $this->assertNull($listener->name); - $this->emitter->emit('test', $this->getEvent()); - $this->assertEquals('test', $listener->name); - } - - /** - * @see https://bugs.php.net/bug.php?id=62976 - * - * This bug affects: - * - The PHP 5.3 branch for versions < 5.3.18 - * - The PHP 5.4 branch for versions < 5.4.8 - * - The PHP 5.5 branch is not affected - */ - public function testWorkaroundForPhpBug62976() - { - $dispatcher = new Emitter(); - $dispatcher->on('bug.62976', new CallableClass()); - $dispatcher->removeListener('bug.62976', function () {}); - $this->assertNotEmpty($dispatcher->listeners('bug.62976')); - } - - public function testRegistersEventsOnce() - { - $this->emitter->once('pre.foo', array($this->listener, 'preFoo')); - $this->emitter->on('pre.foo', array($this->listener, 'preFoo')); - $this->assertCount(2, $this->emitter->listeners(self::preFoo)); - $this->emitter->emit(self::preFoo, $this->getEvent()); - $this->assertTrue($this->listener->preFooInvoked); - $this->assertCount(1, $this->emitter->listeners(self::preFoo)); - } - - public function testReturnsEmptyArrayForNonExistentEvent() - { - $this->assertEquals([], $this->emitter->listeners('doesnotexist')); - } - - public function testCanAddFirstAndLastListeners() - { - $b = ''; - $this->emitter->on('foo', function () use (&$b) { $b .= 'a'; }, 'first'); // 1 - $this->emitter->on('foo', function () use (&$b) { $b .= 'b'; }, 'last'); // 0 - $this->emitter->on('foo', function () use (&$b) { $b .= 'c'; }, 'first'); // 2 - $this->emitter->on('foo', function () use (&$b) { $b .= 'd'; }, 'first'); // 3 - $this->emitter->on('foo', function () use (&$b) { $b .= 'e'; }, 'first'); // 4 - $this->emitter->on('foo', function () use (&$b) { $b .= 'f'; }); // 0 - $this->emitter->emit('foo', $this->getEvent()); - $this->assertEquals('edcabf', $b); - } - - /** - * @return \GuzzleHttp\Event\EventInterface - */ - private function getEvent() - { - return $this->getMockBuilder('GuzzleHttp\Event\AbstractEvent') - ->getMockForAbstractClass(); - } -} - -class CallableClass -{ - public function __invoke() - { - } -} - -class TestEventListener -{ - public $preFooInvoked = false; - public $postFooInvoked = false; - - /* Listener methods */ - - public function preFoo(EventInterface $e) - { - $this->preFooInvoked = true; - } - - public function postFoo(EventInterface $e) - { - $this->postFooInvoked = true; - - $e->stopPropagation(); - } - - /** - * @expectedException \PHPUnit_Framework_Error_Deprecated - */ - public function testHasDeprecatedAddListener() - { - $emitter = new Emitter(); - $emitter->addListener('foo', function () {}); - } - - /** - * @expectedException \PHPUnit_Framework_Error_Deprecated - */ - public function testHasDeprecatedAddSubscriber() - { - $emitter = new Emitter(); - $emitter->addSubscriber('foo', new TestEventSubscriber()); - } -} - -class TestWithDispatcher -{ - public $name; - - public function foo(EventInterface $e, $name) - { - $this->name = $name; - } -} - -class TestEventSubscriber extends TestEventListener implements SubscriberInterface -{ - public function getEvents() - { - return [ - 'pre.foo' => ['preFoo'], - 'post.foo' => ['postFoo'] - ]; - } -} - -class TestEventSubscriberWithPriorities extends TestEventListener implements SubscriberInterface -{ - public function getEvents() - { - return [ - 'pre.foo' => ['preFoo', 10], - 'post.foo' => ['postFoo'] - ]; - } -} - -class TestEventSubscriberWithMultiple extends TestEventListener implements SubscriberInterface -{ - public function getEvents() - { - return ['pre.foo' => [['preFoo', 10],['preFoo', 20]]]; - } -} diff --git a/core/vendor/guzzlehttp/guzzle/tests/Event/ErrorEventTest.php b/core/vendor/guzzlehttp/guzzle/tests/Event/ErrorEventTest.php deleted file mode 100644 index e91b7f0..0000000 --- a/core/vendor/guzzlehttp/guzzle/tests/Event/ErrorEventTest.php +++ /dev/null @@ -1,23 +0,0 @@ -request); - $t->exception = $except; - $e = new ErrorEvent($t); - $this->assertSame($e->getException(), $t->exception); - } -} diff --git a/core/vendor/guzzlehttp/guzzle/tests/Event/HasEmitterTraitTest.php b/core/vendor/guzzlehttp/guzzle/tests/Event/HasEmitterTraitTest.php deleted file mode 100644 index 4709918..0000000 --- a/core/vendor/guzzlehttp/guzzle/tests/Event/HasEmitterTraitTest.php +++ /dev/null @@ -1,27 +0,0 @@ -getMockBuilder('GuzzleHttp\Tests\Event\AbstractHasEmitter') - ->getMockForAbstractClass(); - - $result = $mock->getEmitter(); - $this->assertInstanceOf('GuzzleHttp\Event\EmitterInterface', $result); - $result2 = $mock->getEmitter(); - $this->assertSame($result, $result2); - } -} diff --git a/core/vendor/guzzlehttp/guzzle/tests/Event/ListenerAttacherTraitTest.php b/core/vendor/guzzlehttp/guzzle/tests/Event/ListenerAttacherTraitTest.php deleted file mode 100644 index c066788..0000000 --- a/core/vendor/guzzlehttp/guzzle/tests/Event/ListenerAttacherTraitTest.php +++ /dev/null @@ -1,92 +0,0 @@ -listeners = $this->prepareListeners($args, ['foo', 'bar']); - $this->attachListeners($this, $this->listeners); - } -} - -class ListenerAttacherTraitTest extends \PHPUnit_Framework_TestCase -{ - public function testRegistersEvents() - { - $fn = function () {}; - $o = new ObjectWithEvents([ - 'foo' => $fn, - 'bar' => $fn, - ]); - - $this->assertEquals([ - ['name' => 'foo', 'fn' => $fn, 'priority' => 0, 'once' => false], - ['name' => 'bar', 'fn' => $fn, 'priority' => 0, 'once' => false], - ], $o->listeners); - - $this->assertCount(1, $o->getEmitter()->listeners('foo')); - $this->assertCount(1, $o->getEmitter()->listeners('bar')); - } - - public function testRegistersEventsWithPriorities() - { - $fn = function () {}; - $o = new ObjectWithEvents([ - 'foo' => ['fn' => $fn, 'priority' => 99, 'once' => true], - 'bar' => ['fn' => $fn, 'priority' => 50], - ]); - - $this->assertEquals([ - ['name' => 'foo', 'fn' => $fn, 'priority' => 99, 'once' => true], - ['name' => 'bar', 'fn' => $fn, 'priority' => 50, 'once' => false], - ], $o->listeners); - } - - public function testRegistersMultipleEvents() - { - $fn = function () {}; - $eventArray = [['fn' => $fn], ['fn' => $fn]]; - $o = new ObjectWithEvents([ - 'foo' => $eventArray, - 'bar' => $eventArray, - ]); - - $this->assertEquals([ - ['name' => 'foo', 'fn' => $fn, 'priority' => 0, 'once' => false], - ['name' => 'foo', 'fn' => $fn, 'priority' => 0, 'once' => false], - ['name' => 'bar', 'fn' => $fn, 'priority' => 0, 'once' => false], - ['name' => 'bar', 'fn' => $fn, 'priority' => 0, 'once' => false], - ], $o->listeners); - - $this->assertCount(2, $o->getEmitter()->listeners('foo')); - $this->assertCount(2, $o->getEmitter()->listeners('bar')); - } - - public function testRegistersEventsWithOnce() - { - $called = 0; - $fn = function () use (&$called) { $called++; }; - $o = new ObjectWithEvents(['foo' => ['fn' => $fn, 'once' => true]]); - $ev = $this->getMock('GuzzleHttp\Event\EventInterface'); - $o->getEmitter()->emit('foo', $ev); - $o->getEmitter()->emit('foo', $ev); - $this->assertEquals(1, $called); - } - - /** - * @expectedException \InvalidArgumentException - */ - public function testValidatesEvents() - { - $o = new ObjectWithEvents(['foo' => 'bar']); - } -} diff --git a/core/vendor/guzzlehttp/guzzle/tests/Event/ProgressEventTest.php b/core/vendor/guzzlehttp/guzzle/tests/Event/ProgressEventTest.php deleted file mode 100644 index 664f8b6..0000000 --- a/core/vendor/guzzlehttp/guzzle/tests/Event/ProgressEventTest.php +++ /dev/null @@ -1,25 +0,0 @@ -assertSame($t->request, $p->getRequest()); - $this->assertSame($t->client, $p->getClient()); - $this->assertEquals(2, $p->downloadSize); - $this->assertEquals(1, $p->downloaded); - $this->assertEquals(3, $p->uploadSize); - $this->assertEquals(0, $p->uploaded); - } -} diff --git a/core/vendor/guzzlehttp/guzzle/tests/Event/RequestEventsTest.php b/core/vendor/guzzlehttp/guzzle/tests/Event/RequestEventsTest.php deleted file mode 100644 index b3b9666..0000000 --- a/core/vendor/guzzlehttp/guzzle/tests/Event/RequestEventsTest.php +++ /dev/null @@ -1,74 +0,0 @@ - [$cb]]], - [ - ['complete' => $cb], - ['complete'], - $cb, - ['complete' => [$cb, $cb]] - ], - [ - ['prepare' => []], - ['error', 'foo'], - $cb, - [ - 'prepare' => [], - 'error' => [$cb], - 'foo' => [$cb] - ] - ], - [ - ['prepare' => []], - ['prepare'], - $cb, - [ - 'prepare' => [$cb] - ] - ], - [ - ['prepare' => ['fn' => $cb]], - ['prepare'], $cb, - [ - 'prepare' => [ - ['fn' => $cb], - $cb - ] - ] - ], - ]; - } - - /** - * @dataProvider prepareEventProvider - */ - public function testConvertsEventArrays( - array $in, - array $events, - $add, - array $out - ) { - $result = RequestEvents::convertEventArray($in, $events, $add); - $this->assertEquals($out, $result); - } - - /** - * @expectedException \InvalidArgumentException - */ - public function testValidatesEventFormat() - { - RequestEvents::convertEventArray(['foo' => false], ['foo'], []); - } -} diff --git a/core/vendor/guzzlehttp/guzzle/tests/Exception/ParseExceptionTest.php b/core/vendor/guzzlehttp/guzzle/tests/Exception/ParseExceptionTest.php deleted file mode 100644 index 4ff9bfb..0000000 --- a/core/vendor/guzzlehttp/guzzle/tests/Exception/ParseExceptionTest.php +++ /dev/null @@ -1,20 +0,0 @@ -assertSame($res, $e->getResponse()); - $this->assertEquals('foo', $e->getMessage()); - } -} diff --git a/core/vendor/guzzlehttp/guzzle/tests/Exception/RequestExceptionTest.php b/core/vendor/guzzlehttp/guzzle/tests/Exception/RequestExceptionTest.php deleted file mode 100644 index bea9077..0000000 --- a/core/vendor/guzzlehttp/guzzle/tests/Exception/RequestExceptionTest.php +++ /dev/null @@ -1,83 +0,0 @@ -assertSame($req, $e->getRequest()); - $this->assertSame($res, $e->getResponse()); - $this->assertTrue($e->hasResponse()); - $this->assertEquals('foo', $e->getMessage()); - } - - public function testCreatesGenerateException() - { - $e = RequestException::create(new Request('GET', '/')); - $this->assertEquals('Error completing request', $e->getMessage()); - $this->assertInstanceOf('GuzzleHttp\Exception\RequestException', $e); - } - - public function testCreatesClientErrorResponseException() - { - $e = RequestException::create(new Request('GET', '/'), new Response(400)); - $this->assertEquals( - 'Client error response [url] / [status code] 400 [reason phrase] Bad Request', - $e->getMessage() - ); - $this->assertInstanceOf('GuzzleHttp\Exception\ClientException', $e); - } - - public function testCreatesServerErrorResponseException() - { - $e = RequestException::create(new Request('GET', '/'), new Response(500)); - $this->assertEquals( - 'Server error response [url] / [status code] 500 [reason phrase] Internal Server Error', - $e->getMessage() - ); - $this->assertInstanceOf('GuzzleHttp\Exception\ServerException', $e); - } - - public function testCreatesGenericErrorResponseException() - { - $e = RequestException::create(new Request('GET', '/'), new Response(600)); - $this->assertEquals( - 'Unsuccessful response [url] / [status code] 600 [reason phrase] ', - $e->getMessage() - ); - $this->assertInstanceOf('GuzzleHttp\Exception\RequestException', $e); - } - - public function testHasStatusCodeAsExceptionCode() { - $e = RequestException::create(new Request('GET', '/'), new Response(442)); - $this->assertEquals(442, $e->getCode()); - } - - public function testWrapsRequestExceptions() - { - $e = new \Exception('foo'); - $r = new Request('GET', 'http://www.oo.com'); - $ex = RequestException::wrapException($r, $e); - $this->assertInstanceOf('GuzzleHttp\Exception\RequestException', $ex); - $this->assertSame($e, $ex->getPrevious()); - } - - public function testWrapsConnectExceptions() - { - $e = new ConnectException('foo'); - $r = new Request('GET', 'http://www.oo.com'); - $ex = RequestException::wrapException($r, $e); - $this->assertInstanceOf('GuzzleHttp\Exception\ConnectException', $ex); - } -} diff --git a/core/vendor/guzzlehttp/guzzle/tests/Exception/XmlParseExceptionTest.php b/core/vendor/guzzlehttp/guzzle/tests/Exception/XmlParseExceptionTest.php deleted file mode 100644 index 51b9742..0000000 --- a/core/vendor/guzzlehttp/guzzle/tests/Exception/XmlParseExceptionTest.php +++ /dev/null @@ -1,19 +0,0 @@ -assertSame($error, $e->getError()); - $this->assertEquals('foo', $e->getMessage()); - } -} diff --git a/core/vendor/guzzlehttp/guzzle/tests/IntegrationTest.php b/core/vendor/guzzlehttp/guzzle/tests/IntegrationTest.php deleted file mode 100644 index 0e91ff9..0000000 --- a/core/vendor/guzzlehttp/guzzle/tests/IntegrationTest.php +++ /dev/null @@ -1,73 +0,0 @@ -createRequest( - 'GET', - Server::$url, - [ - 'timeout' => 1, - 'connect_timeout' => 1, - 'proxy' => 'http://127.0.0.1:123/foo' - ] - ); - - $events = []; - $fn = function(AbstractTransferEvent $event) use (&$events) { - $events[] = [ - get_class($event), - $event->hasResponse(), - $event->getResponse() - ]; - }; - - $pool = new Pool($c, [$r], [ - 'error' => $fn, - 'end' => $fn - ]); - - $pool->wait(); - - $this->assertCount(2, $events); - $this->assertEquals('GuzzleHttp\Event\ErrorEvent', $events[0][0]); - $this->assertFalse($events[0][1]); - $this->assertNull($events[0][2]); - - $this->assertEquals('GuzzleHttp\Event\EndEvent', $events[1][0]); - $this->assertFalse($events[1][1]); - $this->assertNull($events[1][2]); - } - - /** - * @issue https://github.com/guzzle/guzzle/issues/866 - */ - public function testProperyGetsTransferStats() - { - $transfer = []; - Server::enqueue([new Response(200)]); - $c = new Client(); - $response = $c->get(Server::$url . '/foo', [ - 'events' => [ - 'end' => function (EndEvent $e) use (&$transfer) { - $transfer = $e->getTransferInfo(); - } - ] - ]); - $this->assertEquals(Server::$url . '/foo', $response->getEffectiveUrl()); - $this->assertNotEmpty($transfer); - $this->assertArrayHasKey('url', $transfer); - } -} diff --git a/core/vendor/guzzlehttp/guzzle/tests/Message/AbstractMessageTest.php b/core/vendor/guzzlehttp/guzzle/tests/Message/AbstractMessageTest.php deleted file mode 100644 index f02a576..0000000 --- a/core/vendor/guzzlehttp/guzzle/tests/Message/AbstractMessageTest.php +++ /dev/null @@ -1,269 +0,0 @@ -assertEquals(1.1, $m->getProtocolVersion()); - } - - public function testHasHeaders() - { - $m = new Request('GET', 'http://foo.com'); - $this->assertFalse($m->hasHeader('foo')); - $m->addHeader('foo', 'bar'); - $this->assertTrue($m->hasHeader('foo')); - } - - public function testInitializesMessageWithProtocolVersionOption() - { - $m = new Request('GET', '/', [], null, [ - 'protocol_version' => '10' - ]); - $this->assertEquals(10, $m->getProtocolVersion()); - } - - public function testHasBody() - { - $m = new Request('GET', 'http://foo.com'); - $this->assertNull($m->getBody()); - $s = Stream::factory('test'); - $m->setBody($s); - $this->assertSame($s, $m->getBody()); - $this->assertFalse($m->hasHeader('Content-Length')); - } - - public function testCanRemoveBodyBySettingToNullAndRemovesCommonBodyHeaders() - { - $m = new Request('GET', 'http://foo.com'); - $m->setBody(Stream::factory('foo')); - $m->setHeader('Content-Length', 3); - $m->setHeader('Transfer-Encoding', 'chunked'); - $m->setBody(null); - $this->assertNull($m->getBody()); - $this->assertFalse($m->hasHeader('Content-Length')); - $this->assertFalse($m->hasHeader('Transfer-Encoding')); - } - - public function testCastsToString() - { - $m = new Request('GET', 'http://foo.com'); - $m->setHeader('foo', 'bar'); - $m->setBody(Stream::factory('baz')); - $this->assertEquals("GET / HTTP/1.1\r\nHost: foo.com\r\nfoo: bar\r\n\r\nbaz", (string) $m); - } - - public function parseParamsProvider() - { - $res1 = array( - array( - '', - 'rel' => 'front', - 'type' => 'image/jpeg', - ), - array( - '', - 'rel' => 'back', - 'type' => 'image/jpeg', - ), - ); - - return array( - array( - '; rel="front"; type="image/jpeg", ; rel=back; type="image/jpeg"', - $res1 - ), - array( - '; rel="front"; type="image/jpeg",; rel=back; type="image/jpeg"', - $res1 - ), - array( - 'foo="baz"; bar=123, boo, test="123", foobar="foo;bar"', - array( - array('foo' => 'baz', 'bar' => '123'), - array('boo'), - array('test' => '123'), - array('foobar' => 'foo;bar') - ) - ), - array( - '; rel="side"; type="image/jpeg",; rel=side; type="image/jpeg"', - array( - array('', 'rel' => 'side', 'type' => 'image/jpeg'), - array('', 'rel' => 'side', 'type' => 'image/jpeg') - ) - ), - array( - '', - array() - ) - ); - } - - /** - * @dataProvider parseParamsProvider - */ - public function testParseParams($header, $result) - { - $request = new Request('GET', '/', ['foo' => $header]); - $this->assertEquals($result, Request::parseHeader($request, 'foo')); - } - - public function testAddsHeadersWhenNotPresent() - { - $h = new Request('GET', 'http://foo.com'); - $h->addHeader('foo', 'bar'); - $this->assertInternalType('string', $h->getHeader('foo')); - $this->assertEquals('bar', $h->getHeader('foo')); - } - - public function testAddsHeadersWhenPresentSameCase() - { - $h = new Request('GET', 'http://foo.com'); - $h->addHeader('foo', 'bar'); - $h->addHeader('foo', 'baz'); - $this->assertEquals('bar, baz', $h->getHeader('foo')); - $this->assertEquals(['bar', 'baz'], $h->getHeaderAsArray('foo')); - } - - public function testAddsMultipleHeaders() - { - $h = new Request('GET', 'http://foo.com'); - $h->addHeaders([ - 'foo' => ' bar', - 'baz' => [' bam ', 'boo'] - ]); - $this->assertEquals([ - 'foo' => ['bar'], - 'baz' => ['bam', 'boo'], - 'Host' => ['foo.com'] - ], $h->getHeaders()); - } - - public function testAddsHeadersWhenPresentDifferentCase() - { - $h = new Request('GET', 'http://foo.com'); - $h->addHeader('Foo', 'bar'); - $h->addHeader('fOO', 'baz'); - $this->assertEquals('bar, baz', $h->getHeader('foo')); - } - - public function testAddsHeadersWithArray() - { - $h = new Request('GET', 'http://foo.com'); - $h->addHeader('Foo', ['bar', 'baz']); - $this->assertEquals('bar, baz', $h->getHeader('foo')); - } - - public function testGetHeadersReturnsAnArrayOfOverTheWireHeaderValues() - { - $h = new Request('GET', 'http://foo.com'); - $h->addHeader('foo', 'bar'); - $h->addHeader('Foo', 'baz'); - $h->addHeader('boO', 'test'); - $result = $h->getHeaders(); - $this->assertInternalType('array', $result); - $this->assertArrayHasKey('Foo', $result); - $this->assertArrayNotHasKey('foo', $result); - $this->assertArrayHasKey('boO', $result); - $this->assertEquals(['bar', 'baz'], $result['Foo']); - $this->assertEquals(['test'], $result['boO']); - } - - public function testSetHeaderOverwritesExistingValues() - { - $h = new Request('GET', 'http://foo.com'); - $h->setHeader('foo', 'bar'); - $this->assertEquals('bar', $h->getHeader('foo')); - $h->setHeader('Foo', 'baz'); - $this->assertEquals('baz', $h->getHeader('foo')); - $this->assertArrayHasKey('Foo', $h->getHeaders()); - } - - public function testSetHeaderOverwritesExistingValuesUsingHeaderArray() - { - $h = new Request('GET', 'http://foo.com'); - $h->setHeader('foo', ['bar']); - $this->assertEquals('bar', $h->getHeader('foo')); - } - - public function testSetHeaderOverwritesExistingValuesUsingArray() - { - $h = new Request('GET', 'http://foo.com'); - $h->setHeader('foo', ['bar']); - $this->assertEquals('bar', $h->getHeader('foo')); - } - - public function testSetHeadersOverwritesAllHeaders() - { - $h = new Request('GET', 'http://foo.com'); - $h->setHeader('foo', 'bar'); - $h->setHeaders(['foo' => 'a', 'boo' => 'b']); - $this->assertEquals(['foo' => ['a'], 'boo' => ['b']], $h->getHeaders()); - } - - public function testChecksIfCaseInsensitiveHeaderIsPresent() - { - $h = new Request('GET', 'http://foo.com'); - $h->setHeader('foo', 'bar'); - $this->assertTrue($h->hasHeader('foo')); - $this->assertTrue($h->hasHeader('Foo')); - $h->setHeader('fOo', 'bar'); - $this->assertTrue($h->hasHeader('Foo')); - } - - public function testRemovesHeaders() - { - $h = new Request('GET', 'http://foo.com'); - $h->setHeader('foo', 'bar'); - $h->removeHeader('foo'); - $this->assertFalse($h->hasHeader('foo')); - $h->setHeader('Foo', 'bar'); - $h->removeHeader('FOO'); - $this->assertFalse($h->hasHeader('foo')); - } - - public function testReturnsCorrectTypeWhenMissing() - { - $h = new Request('GET', 'http://foo.com'); - $this->assertInternalType('string', $h->getHeader('foo')); - $this->assertInternalType('array', $h->getHeaderAsArray('foo')); - } - - public function testSetsIntegersAndFloatsAsHeaders() - { - $h = new Request('GET', 'http://foo.com'); - $h->setHeader('foo', 10); - $h->setHeader('bar', 10.5); - $h->addHeader('foo', 10); - $h->addHeader('bar', 10.5); - $this->assertSame('10, 10', $h->getHeader('foo')); - $this->assertSame('10.5, 10.5', $h->getHeader('bar')); - } - - public function testGetsResponseStartLine() - { - $m = new Response(200); - $this->assertEquals('HTTP/1.1 200 OK', Response::getStartLine($m)); - } - - /** - * @expectedException \InvalidArgumentException - */ - public function testThrowsWhenMessageIsUnknown() - { - $m = $this->getMockBuilder('GuzzleHttp\Message\AbstractMessage') - ->getMockForAbstractClass(); - AbstractMessage::getStartLine($m); - } -} diff --git a/core/vendor/guzzlehttp/guzzle/tests/Message/FutureResponseTest.php b/core/vendor/guzzlehttp/guzzle/tests/Message/FutureResponseTest.php deleted file mode 100644 index 771631d..0000000 --- a/core/vendor/guzzlehttp/guzzle/tests/Message/FutureResponseTest.php +++ /dev/null @@ -1,160 +0,0 @@ -foo; - } - - public function testDoesTheSameAsResponseWhenDereferenced() - { - $str = Stream::factory('foo'); - $response = new Response(200, ['Foo' => 'bar'], $str); - $future = MockTest::createFuture(function () use ($response) { - return $response; - }); - $this->assertFalse($this->readAttribute($future, 'isRealized')); - $this->assertEquals(200, $future->getStatusCode()); - $this->assertTrue($this->readAttribute($future, 'isRealized')); - // Deref again does nothing. - $future->wait(); - $this->assertTrue($this->readAttribute($future, 'isRealized')); - $this->assertEquals('bar', $future->getHeader('Foo')); - $this->assertEquals(['bar'], $future->getHeaderAsarray('Foo')); - $this->assertSame($response->getHeaders(), $future->getHeaders()); - $this->assertSame( - $response->getBody(), - $future->getBody() - ); - $this->assertSame( - $response->getProtocolVersion(), - $future->getProtocolVersion() - ); - $this->assertSame( - $response->getEffectiveUrl(), - $future->getEffectiveUrl() - ); - $future->setEffectiveUrl('foo'); - $this->assertEquals('foo', $response->getEffectiveUrl()); - $this->assertSame( - $response->getReasonPhrase(), - $future->getReasonPhrase() - ); - - $this->assertTrue($future->hasHeader('foo')); - - $future->removeHeader('Foo'); - $this->assertFalse($future->hasHeader('foo')); - $this->assertFalse($response->hasHeader('foo')); - - $future->setBody(Stream::factory('true')); - $this->assertEquals('true', (string) $response->getBody()); - $this->assertTrue($future->json()); - $this->assertSame((string) $response, (string) $future); - - $future->setBody(Stream::factory('c')); - $this->assertEquals('c', (string) $future->xml()->b); - - $future->addHeader('a', 'b'); - $this->assertEquals('b', $future->getHeader('a')); - - $future->addHeaders(['a' => '2']); - $this->assertEquals('b, 2', $future->getHeader('a')); - - $future->setHeader('a', '2'); - $this->assertEquals('2', $future->getHeader('a')); - - $future->setHeaders(['a' => '3']); - $this->assertEquals(['a' => ['3']], $future->getHeaders()); - } - - public function testCanDereferenceManually() - { - $response = new Response(200, ['Foo' => 'bar']); - $future = MockTest::createFuture(function () use ($response) { - return $response; - }); - $this->assertSame($response, $future->wait()); - $this->assertTrue($this->readAttribute($future, 'isRealized')); - } - - public function testCanCancel() - { - $c = false; - $deferred = new Deferred(); - $future = new FutureResponse( - $deferred->promise(), - function () {}, - function () use (&$c) { - $c = true; - return true; - } - ); - - $this->assertFalse($this->readAttribute($future, 'isRealized')); - $future->cancel(); - $this->assertTrue($this->readAttribute($future, 'isRealized')); - $future->cancel(); - } - - public function testCanCancelButReturnsFalseForNoCancelFunction() - { - $future = MockTest::createFuture(function () {}); - $future->cancel(); - $this->assertTrue($this->readAttribute($future, 'isRealized')); - } - - /** - * @expectedException \GuzzleHttp\Ring\Exception\CancelledFutureAccessException - */ - public function testAccessingCancelledResponseThrows() - { - $future = MockTest::createFuture(function () {}); - $future->cancel(); - $future->getStatusCode(); - } - - public function testExceptionInToStringTriggersError() - { - $future = MockTest::createFuture(function () { - throw new \Exception('foo'); - }); - $err = ''; - set_error_handler(function () use (&$err) { - $err = func_get_args()[1]; - }); - echo $future; - restore_error_handler(); - $this->assertContains('foo', $err); - } - - public function testProxiesSetters() - { - $str = Stream::factory('foo'); - $response = new Response(200, ['Foo' => 'bar'], $str); - $future = MockTest::createFuture(function () use ($response) { - return $response; - }); - - $future->setStatusCode(202); - $this->assertEquals(202, $future->getStatusCode()); - $this->assertEquals(202, $response->getStatusCode()); - - $future->setReasonPhrase('foo'); - $this->assertEquals('foo', $future->getReasonPhrase()); - $this->assertEquals('foo', $response->getReasonPhrase()); - } -} diff --git a/core/vendor/guzzlehttp/guzzle/tests/Message/MessageFactoryTest.php b/core/vendor/guzzlehttp/guzzle/tests/Message/MessageFactoryTest.php deleted file mode 100644 index 3e1fd3d..0000000 --- a/core/vendor/guzzlehttp/guzzle/tests/Message/MessageFactoryTest.php +++ /dev/null @@ -1,601 +0,0 @@ -createResponse(200, ['foo' => 'bar'], 'test', [ - 'protocol_version' => 1.0 - ]); - $this->assertEquals(200, $response->getStatusCode()); - $this->assertEquals(['foo' => ['bar']], $response->getHeaders()); - $this->assertEquals('test', $response->getBody()); - $this->assertEquals(1.0, $response->getProtocolVersion()); - } - - public function testCreatesRequestFromMessage() - { - $f = new MessageFactory(); - $req = $f->fromMessage("GET / HTTP/1.1\r\nBaz: foo\r\n\r\n"); - $this->assertEquals('GET', $req->getMethod()); - $this->assertEquals('/', $req->getPath()); - $this->assertEquals('foo', $req->getHeader('Baz')); - $this->assertNull($req->getBody()); - } - - public function testCreatesRequestFromMessageWithBody() - { - $req = (new MessageFactory())->fromMessage("GET / HTTP/1.1\r\nBaz: foo\r\n\r\ntest"); - $this->assertEquals('test', $req->getBody()); - } - - public function testCreatesRequestWithPostBody() - { - $req = (new MessageFactory())->createRequest('GET', 'http://www.foo.com', ['body' => ['abc' => '123']]); - $this->assertEquals('abc=123', $req->getBody()); - } - - public function testCreatesRequestWithPostBodyScalars() - { - $req = (new MessageFactory())->createRequest( - 'GET', - 'http://www.foo.com', - ['body' => [ - 'abc' => true, - '123' => false, - 'foo' => null, - 'baz' => 10, - 'bam' => 1.5, - 'boo' => [1]] - ] - ); - $this->assertEquals( - 'abc=1&123=&foo&baz=10&bam=1.5&boo%5B0%5D=1', - (string) $req->getBody() - ); - } - - public function testCreatesRequestWithPostBodyAndPostFiles() - { - $pf = fopen(__FILE__, 'r'); - $pfi = new PostFile('ghi', 'abc', __FILE__); - $req = (new MessageFactory())->createRequest('GET', 'http://www.foo.com', [ - 'body' => [ - 'abc' => '123', - 'def' => $pf, - 'ghi' => $pfi - ] - ]); - $this->assertInstanceOf('GuzzleHttp\Post\PostBody', $req->getBody()); - $s = (string) $req; - $this->assertContains('testCreatesRequestWithPostBodyAndPostFiles', $s); - $this->assertContains('multipart/form-data', $s); - $this->assertTrue(in_array($pfi, $req->getBody()->getFiles(), true)); - } - - public function testCreatesResponseFromMessage() - { - $response = (new MessageFactory())->fromMessage("HTTP/1.1 200 OK\r\nContent-Length: 4\r\n\r\ntest"); - $this->assertEquals(200, $response->getStatusCode()); - $this->assertEquals('OK', $response->getReasonPhrase()); - $this->assertEquals('4', $response->getHeader('Content-Length')); - $this->assertEquals('test', $response->getBody(true)); - } - - public function testCanCreateHeadResponses() - { - $response = (new MessageFactory())->fromMessage("HTTP/1.1 200 OK\r\nContent-Length: 4\r\n\r\n"); - $this->assertEquals(200, $response->getStatusCode()); - $this->assertEquals('OK', $response->getReasonPhrase()); - $this->assertEquals(null, $response->getBody()); - $this->assertEquals('4', $response->getHeader('Content-Length')); - } - - /** - * @expectedException \InvalidArgumentException - */ - public function testFactoryRequiresMessageForRequest() - { - (new MessageFactory())->fromMessage(''); - } - - /** - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage foo - */ - public function testValidatesOptionsAreImplemented() - { - (new MessageFactory())->createRequest('GET', 'http://test.com', ['foo' => 'bar']); - } - - public function testOptionsAddsRequestOptions() - { - $request = (new MessageFactory())->createRequest( - 'GET', 'http://test.com', ['config' => ['baz' => 'bar']] - ); - $this->assertEquals('bar', $request->getConfig()->get('baz')); - } - - public function testCanDisableRedirects() - { - $request = (new MessageFactory())->createRequest('GET', '/', ['allow_redirects' => false]); - $this->assertEmpty($request->getEmitter()->listeners('complete')); - } - - /** - * @expectedException \InvalidArgumentException - */ - public function testValidatesRedirects() - { - (new MessageFactory())->createRequest('GET', '/', ['allow_redirects' => []]); - } - - public function testCanEnableStrictRedirectsAndSpecifyMax() - { - $request = (new MessageFactory())->createRequest('GET', '/', [ - 'allow_redirects' => ['max' => 10, 'strict' => true] - ]); - $this->assertTrue($request->getConfig()['redirect']['strict']); - $this->assertEquals(10, $request->getConfig()['redirect']['max']); - } - - public function testCanAddCookiesFromHash() - { - $request = (new MessageFactory())->createRequest('GET', 'http://www.test.com/', [ - 'cookies' => ['Foo' => 'Bar'] - ]); - $cookies = null; - foreach ($request->getEmitter()->listeners('before') as $l) { - if ($l[0] instanceof Cookie) { - $cookies = $l[0]; - break; - } - } - if (!$cookies) { - $this->fail('Did not add cookie listener'); - } else { - $this->assertCount(1, $cookies->getCookieJar()); - } - } - - public function testAddsCookieUsingTrue() - { - $factory = new MessageFactory(); - $request1 = $factory->createRequest('GET', '/', ['cookies' => true]); - $request2 = $factory->createRequest('GET', '/', ['cookies' => true]); - $listeners = function ($r) { - return array_filter($r->getEmitter()->listeners('before'), function ($l) { - return $l[0] instanceof Cookie; - }); - }; - $this->assertSame($listeners($request1), $listeners($request2)); - } - - public function testAddsCookieFromCookieJar() - { - $jar = new CookieJar(); - $request = (new MessageFactory())->createRequest('GET', '/', ['cookies' => $jar]); - foreach ($request->getEmitter()->listeners('before') as $l) { - if ($l[0] instanceof Cookie) { - $this->assertSame($jar, $l[0]->getCookieJar()); - } - } - } - - /** - * @expectedException \InvalidArgumentException - */ - public function testValidatesCookies() - { - (new MessageFactory())->createRequest('GET', '/', ['cookies' => 'baz']); - } - - public function testCanAddQuery() - { - $request = (new MessageFactory())->createRequest('GET', 'http://foo.com', [ - 'query' => ['Foo' => 'Bar'] - ]); - $this->assertEquals('Bar', $request->getQuery()->get('Foo')); - } - - /** - * @expectedException \InvalidArgumentException - */ - public function testValidatesQuery() - { - (new MessageFactory())->createRequest('GET', 'http://foo.com', [ - 'query' => 'foo' - ]); - } - - public function testCanSetDefaultQuery() - { - $request = (new MessageFactory())->createRequest('GET', 'http://foo.com?test=abc', [ - 'query' => ['Foo' => 'Bar', 'test' => 'def'] - ]); - $this->assertEquals('Bar', $request->getQuery()->get('Foo')); - $this->assertEquals('abc', $request->getQuery()->get('test')); - } - - public function testCanSetDefaultQueryWithObject() - { - $request = (new MessageFactory)->createRequest( - 'GET', - 'http://foo.com?test=abc', [ - 'query' => new Query(['Foo' => 'Bar', 'test' => 'def']) - ] - ); - $this->assertEquals('Bar', $request->getQuery()->get('Foo')); - $this->assertEquals('abc', $request->getQuery()->get('test')); - } - - public function testCanAddBasicAuth() - { - $request = (new MessageFactory())->createRequest('GET', 'http://foo.com', [ - 'auth' => ['michael', 'test'] - ]); - $this->assertTrue($request->hasHeader('Authorization')); - } - - public function testCanAddDigestAuth() - { - $request = (new MessageFactory())->createRequest('GET', 'http://foo.com', [ - 'auth' => ['michael', 'test', 'digest'] - ]); - $this->assertEquals('michael:test', $request->getConfig()->getPath('curl/' . CURLOPT_USERPWD)); - $this->assertEquals(CURLAUTH_DIGEST, $request->getConfig()->getPath('curl/' . CURLOPT_HTTPAUTH)); - } - - public function testCanDisableAuth() - { - $request = (new MessageFactory())->createRequest('GET', 'http://foo.com', [ - 'auth' => false - ]); - $this->assertFalse($request->hasHeader('Authorization')); - } - - public function testCanSetCustomAuth() - { - $request = (new MessageFactory())->createRequest('GET', 'http://foo.com', [ - 'auth' => 'foo' - ]); - $this->assertEquals('foo', $request->getConfig()['auth']); - } - - public function testCanAddEvents() - { - $foo = null; - $client = new Client(); - $client->getEmitter()->attach(new Mock([new Response(200)])); - $client->get('http://test.com', [ - 'events' => [ - 'before' => function () use (&$foo) { $foo = true; } - ] - ]); - $this->assertTrue($foo); - } - - public function testCanAddEventsWithPriority() - { - $foo = null; - $client = new Client(); - $client->getEmitter()->attach(new Mock(array(new Response(200)))); - $request = $client->createRequest('GET', 'http://test.com', [ - 'events' => [ - 'before' => [ - 'fn' => function () use (&$foo) { $foo = true; }, - 'priority' => 123 - ] - ] - ]); - $client->send($request); - $this->assertTrue($foo); - $l = $this->readAttribute($request->getEmitter(), 'listeners'); - $this->assertArrayHasKey(123, $l['before']); - } - - public function testCanAddEventsOnce() - { - $foo = 0; - $client = new Client(); - $client->getEmitter()->attach(new Mock([ - new Response(200), - new Response(200), - ])); - $fn = function () use (&$foo) { ++$foo; }; - $request = $client->createRequest('GET', 'http://test.com', [ - 'events' => ['before' => ['fn' => $fn, 'once' => true]] - ]); - $client->send($request); - $this->assertEquals(1, $foo); - $client->send($request); - $this->assertEquals(1, $foo); - } - - /** - * @expectedException \InvalidArgumentException - */ - public function testValidatesEventContainsFn() - { - $client = new Client(['base_url' => 'http://test.com']); - $client->createRequest('GET', '/', ['events' => ['before' => ['foo' => 'bar']]]); - } - - /** - * @expectedException \InvalidArgumentException - */ - public function testValidatesEventIsArray() - { - $client = new Client(['base_url' => 'http://test.com']); - $client->createRequest('GET', '/', ['events' => ['before' => '123']]); - } - - public function testCanAddSubscribers() - { - $mock = new Mock([new Response(200)]); - $client = new Client(); - $client->getEmitter()->attach($mock); - $request = $client->get('http://test.com', ['subscribers' => [$mock]]); - } - - public function testCanDisableExceptions() - { - $client = new Client(); - $this->assertEquals(500, $client->get('http://test.com', [ - 'subscribers' => [new Mock([new Response(500)])], - 'exceptions' => false - ])->getStatusCode()); - } - - public function testCanChangeSaveToLocation() - { - $saveTo = Stream::factory(); - $request = (new MessageFactory())->createRequest('GET', '/', ['save_to' => $saveTo]); - $this->assertSame($saveTo, $request->getConfig()->get('save_to')); - } - - public function testCanSetProxy() - { - $request = (new MessageFactory())->createRequest('GET', '/', ['proxy' => '192.168.16.121']); - $this->assertEquals('192.168.16.121', $request->getConfig()->get('proxy')); - } - - public function testCanSetHeadersOption() - { - $request = (new MessageFactory())->createRequest('GET', '/', ['headers' => ['Foo' => 'Bar']]); - $this->assertEquals('Bar', (string) $request->getHeader('Foo')); - } - - public function testCanSetHeaders() - { - $request = (new MessageFactory())->createRequest('GET', '/', [ - 'headers' => ['Foo' => ['Baz', 'Bar'], 'Test' => '123'] - ]); - $this->assertEquals('Baz, Bar', $request->getHeader('Foo')); - $this->assertEquals('123', $request->getHeader('Test')); - } - - public function testCanSetTimeoutOption() - { - $request = (new MessageFactory())->createRequest('GET', '/', ['timeout' => 1.5]); - $this->assertEquals(1.5, $request->getConfig()->get('timeout')); - } - - public function testCanSetConnectTimeoutOption() - { - $request = (new MessageFactory())->createRequest('GET', '/', ['connect_timeout' => 1.5]); - $this->assertEquals(1.5, $request->getConfig()->get('connect_timeout')); - } - - public function testCanSetDebug() - { - $request = (new MessageFactory())->createRequest('GET', '/', ['debug' => true]); - $this->assertTrue($request->getConfig()->get('debug')); - } - - public function testCanSetVerifyToOff() - { - $request = (new MessageFactory())->createRequest('GET', '/', ['verify' => false]); - $this->assertFalse($request->getConfig()->get('verify')); - } - - public function testCanSetVerifyToOn() - { - $request = (new MessageFactory())->createRequest('GET', '/', ['verify' => true]); - $this->assertTrue($request->getConfig()->get('verify')); - } - - public function testCanSetVerifyToPath() - { - $request = (new MessageFactory())->createRequest('GET', '/', ['verify' => '/foo.pem']); - $this->assertEquals('/foo.pem', $request->getConfig()->get('verify')); - } - - public function inputValidation() - { - return array_map(function ($option) { return array($option); }, array( - 'headers', 'events', 'subscribers', 'params' - )); - } - - /** - * @dataProvider inputValidation - * @expectedException \InvalidArgumentException - */ - public function testValidatesInput($option) - { - (new MessageFactory())->createRequest('GET', '/', [$option => 'foo']); - } - - public function testCanAddSslKey() - { - $request = (new MessageFactory())->createRequest('GET', '/', ['ssl_key' => '/foo.pem']); - $this->assertEquals('/foo.pem', $request->getConfig()->get('ssl_key')); - } - - public function testCanAddSslKeyPassword() - { - $request = (new MessageFactory())->createRequest('GET', '/', ['ssl_key' => ['/foo.pem', 'bar']]); - $this->assertEquals(['/foo.pem', 'bar'], $request->getConfig()->get('ssl_key')); - } - - public function testCanAddSslCert() - { - $request = (new MessageFactory())->createRequest('GET', '/', ['cert' => '/foo.pem']); - $this->assertEquals('/foo.pem', $request->getConfig()->get('cert')); - } - - public function testCanAddSslCertPassword() - { - $request = (new MessageFactory())->createRequest('GET', '/', ['cert' => ['/foo.pem', 'bar']]); - $this->assertEquals(['/foo.pem', 'bar'], $request->getConfig()->get('cert')); - } - - public function testCreatesBodyWithoutZeroString() - { - $request = (new MessageFactory())->createRequest('PUT', 'http://test.com', ['body' => '0']); - $this->assertSame('0', (string) $request->getBody()); - } - - public function testCanSetProtocolVersion() - { - $request = (new MessageFactory())->createRequest('GET', 'http://t.com', ['version' => 1.0]); - $this->assertEquals(1.0, $request->getProtocolVersion()); - } - - public function testCanAddJsonData() - { - $request = (new MessageFactory())->createRequest('PUT', 'http://f.com', [ - 'json' => ['foo' => 'bar'] - ]); - $this->assertEquals( - 'application/json', - $request->getHeader('Content-Type') - ); - $this->assertEquals('{"foo":"bar"}', (string) $request->getBody()); - } - - public function testCanAddJsonDataToAPostRequest() - { - $request = (new MessageFactory())->createRequest('POST', 'http://f.com', [ - 'json' => ['foo' => 'bar'] - ]); - $this->assertEquals( - 'application/json', - $request->getHeader('Content-Type') - ); - $this->assertEquals('{"foo":"bar"}', (string) $request->getBody()); - } - - public function testCanAddJsonDataAndNotOverwriteContentType() - { - $request = (new MessageFactory())->createRequest('PUT', 'http://f.com', [ - 'headers' => ['Content-Type' => 'foo'], - 'json' => null - ]); - $this->assertEquals('foo', $request->getHeader('Content-Type')); - $this->assertEquals('null', (string) $request->getBody()); - } - - public function testCanUseCustomRequestOptions() - { - $c = false; - $f = new MessageFactory([ - 'foo' => function (RequestInterface $request, $value) use (&$c) { - $c = true; - $this->assertEquals('bar', $value); - } - ]); - - $f->createRequest('PUT', 'http://f.com', [ - 'headers' => ['Content-Type' => 'foo'], - 'foo' => 'bar' - ]); - - $this->assertTrue($c); - } - - /** - * @ticket https://github.com/guzzle/guzzle/issues/706 - */ - public function testDoesNotApplyPostBodyRightAway() - { - $request = (new MessageFactory())->createRequest('POST', 'http://f.cn', [ - 'body' => ['foo' => ['bar', 'baz']] - ]); - $this->assertEquals('', $request->getHeader('Content-Type')); - $this->assertEquals('', $request->getHeader('Content-Length')); - $request->getBody()->setAggregator(Query::duplicateAggregator()); - $request->getBody()->applyRequestHeaders($request); - $this->assertEquals('foo=bar&foo=baz', $request->getBody()); - } - - public function testCanForceMultipartUploadWithContentType() - { - $client = new Client(); - $client->getEmitter()->attach(new Mock([new Response(200)])); - $history = new History(); - $client->getEmitter()->attach($history); - $client->post('http://foo.com', [ - 'headers' => ['Content-Type' => 'multipart/form-data'], - 'body' => ['foo' => 'bar'] - ]); - $this->assertContains( - 'multipart/form-data; boundary=', - $history->getLastRequest()->getHeader('Content-Type') - ); - $this->assertContains( - "Content-Disposition: form-data; name=\"foo\"\r\n\r\nbar", - (string) $history->getLastRequest()->getBody() - ); - } - - public function testDecodeDoesNotForceAcceptHeader() - { - $request = (new MessageFactory())->createRequest('POST', 'http://f.cn', [ - 'decode_content' => true - ]); - $this->assertEquals('', $request->getHeader('Accept-Encoding')); - $this->assertTrue($request->getConfig()->get('decode_content')); - } - - public function testDecodeCanAddAcceptHeader() - { - $request = (new MessageFactory())->createRequest('POST', 'http://f.cn', [ - 'decode_content' => 'gzip' - ]); - $this->assertEquals('gzip', $request->getHeader('Accept-Encoding')); - $this->assertTrue($request->getConfig()->get('decode_content')); - } - - public function testCanDisableDecoding() - { - $request = (new MessageFactory())->createRequest('POST', 'http://f.cn', [ - 'decode_content' => false - ]); - $this->assertEquals('', $request->getHeader('Accept-Encoding')); - $this->assertNull($request->getConfig()->get('decode_content')); - } -} - -class ExtendedFactory extends MessageFactory -{ - protected function add_foo() {} -} diff --git a/core/vendor/guzzlehttp/guzzle/tests/Message/MessageParserTest.php b/core/vendor/guzzlehttp/guzzle/tests/Message/MessageParserTest.php deleted file mode 100644 index 0bcc943..0000000 --- a/core/vendor/guzzlehttp/guzzle/tests/Message/MessageParserTest.php +++ /dev/null @@ -1,276 +0,0 @@ -compareRequestResults($parts, $parser->parseRequest($message)); - } - - /** - * @dataProvider responseProvider - */ - public function testParsesResponses($message, $parts) - { - $parser = new MessageParser(); - $this->compareResponseResults($parts, $parser->parseResponse($message)); - } - - public function testParsesRequestsWithMissingProtocol() - { - $parser = new MessageParser(); - $parts = $parser->parseRequest("GET /\r\nHost: Foo.com\r\n\r\n"); - $this->assertEquals('GET', $parts['method']); - $this->assertEquals('HTTP', $parts['protocol']); - $this->assertEquals('1.1', $parts['protocol_version']); - } - - public function testParsesRequestsWithMissingVersion() - { - $parser = new MessageParser(); - $parts = $parser->parseRequest("GET / HTTP\r\nHost: Foo.com\r\n\r\n"); - $this->assertEquals('GET', $parts['method']); - $this->assertEquals('HTTP', $parts['protocol']); - $this->assertEquals('1.1', $parts['protocol_version']); - } - - public function testParsesResponsesWithMissingReasonPhrase() - { - $parser = new MessageParser(); - $parts = $parser->parseResponse("HTTP/1.1 200\r\n\r\n"); - $this->assertEquals('200', $parts['code']); - $this->assertEquals('', $parts['reason_phrase']); - $this->assertEquals('HTTP', $parts['protocol']); - $this->assertEquals('1.1', $parts['protocol_version']); - } - - public function requestProvider() - { - $auth = base64_encode('michael:foo'); - - return array( - - // Empty request - array('', false), - - // Converts casing of request. Does not require host header. - array("GET / HTTP/1.1\r\n\r\n", array( - 'method' => 'GET', - 'protocol' => 'HTTP', - 'protocol_version' => '1.1', - 'request_url' => array( - 'scheme' => 'http', - 'host' => '', - 'port' => '', - 'path' => '/', - 'query' => '' - ), - 'headers' => array(), - 'body' => '' - )), - // Path and query string, multiple header values per header and case sensitive storage - array("HEAD /path?query=foo HTTP/1.0\r\nHost: example.com\r\nX-Foo: foo\r\nx-foo: Bar\r\nX-Foo: foo\r\nX-Foo: Baz\r\n\r\n", array( - 'method' => 'HEAD', - 'protocol' => 'HTTP', - 'protocol_version' => '1.0', - 'request_url' => array( - 'scheme' => 'http', - 'host' => 'example.com', - 'port' => '', - 'path' => '/path', - 'query' => 'query=foo' - ), - 'headers' => array( - 'Host' => 'example.com', - 'X-Foo' => array('foo', 'foo', 'Baz'), - 'x-foo' => 'Bar' - ), - 'body' => '' - )), - // Includes a body - array("PUT / HTTP/1.0\r\nhost: example.com:443\r\nContent-Length: 4\r\n\r\ntest", array( - 'method' => 'PUT', - 'protocol' => 'HTTP', - 'protocol_version' => '1.0', - 'request_url' => array( - 'scheme' => 'https', - 'host' => 'example.com', - 'port' => '443', - 'path' => '/', - 'query' => '' - ), - 'headers' => array( - 'host' => 'example.com:443', - 'Content-Length' => '4' - ), - 'body' => 'test' - )), - // Includes Authorization headers - array("GET / HTTP/1.1\r\nHost: example.com:8080\r\nAuthorization: Basic {$auth}\r\n\r\n", array( - 'method' => 'GET', - 'protocol' => 'HTTP', - 'protocol_version' => '1.1', - 'request_url' => array( - 'scheme' => 'http', - 'host' => 'example.com', - 'port' => '8080', - 'path' => '/', - 'query' => '' - ), - 'headers' => array( - 'Host' => 'example.com:8080', - 'Authorization' => "Basic {$auth}" - ), - 'body' => '' - )), - // Include authorization header - array("GET / HTTP/1.1\r\nHost: example.com:8080\r\nauthorization: Basic {$auth}\r\n\r\n", array( - 'method' => 'GET', - 'protocol' => 'HTTP', - 'protocol_version' => '1.1', - 'request_url' => array( - 'scheme' => 'http', - 'host' => 'example.com', - 'port' => '8080', - 'path' => '/', - 'query' => '' - ), - 'headers' => array( - 'Host' => 'example.com:8080', - 'authorization' => "Basic {$auth}" - ), - 'body' => '' - )), - ); - } - - public function responseProvider() - { - return array( - // Empty request - array('', false), - - array("HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n", array( - 'protocol' => 'HTTP', - 'protocol_version' => '1.1', - 'code' => '200', - 'reason_phrase' => 'OK', - 'headers' => array( - 'Content-Length' => 0 - ), - 'body' => '' - )), - array("HTTP/1.0 400 Bad Request\r\nContent-Length: 0\r\n\r\n", array( - 'protocol' => 'HTTP', - 'protocol_version' => '1.0', - 'code' => '400', - 'reason_phrase' => 'Bad Request', - 'headers' => array( - 'Content-Length' => 0 - ), - 'body' => '' - )), - array("HTTP/1.0 100 Continue\r\n\r\n", array( - 'protocol' => 'HTTP', - 'protocol_version' => '1.0', - 'code' => '100', - 'reason_phrase' => 'Continue', - 'headers' => array(), - 'body' => '' - )), - array("HTTP/1.1 204 No Content\r\nX-Foo: foo\r\nx-foo: Bar\r\nX-Foo: foo\r\n\r\n", array( - 'protocol' => 'HTTP', - 'protocol_version' => '1.1', - 'code' => '204', - 'reason_phrase' => 'No Content', - 'headers' => array( - 'X-Foo' => array('foo', 'foo'), - 'x-foo' => 'Bar' - ), - 'body' => '' - )), - array("HTTP/1.1 200 Ok that is great!\r\nContent-Length: 4\r\n\r\nTest", array( - 'protocol' => 'HTTP', - 'protocol_version' => '1.1', - 'code' => '200', - 'reason_phrase' => 'Ok that is great!', - 'headers' => array( - 'Content-Length' => 4 - ), - 'body' => 'Test' - )), - ); - } - - public function compareRequestResults($result, $expected) - { - if (!$result) { - $this->assertFalse($expected); - return; - } - - $this->assertEquals($result['method'], $expected['method']); - $this->assertEquals($result['protocol'], $expected['protocol']); - $this->assertEquals($result['protocol_version'], $expected['protocol_version']); - $this->assertEquals($result['request_url'], $expected['request_url']); - $this->assertEquals($result['body'], $expected['body']); - $this->compareHttpHeaders($result['headers'], $expected['headers']); - } - - public function compareResponseResults($result, $expected) - { - if (!$result) { - $this->assertFalse($expected); - return; - } - - $this->assertEquals($result['protocol'], $expected['protocol']); - $this->assertEquals($result['protocol_version'], $expected['protocol_version']); - $this->assertEquals($result['code'], $expected['code']); - $this->assertEquals($result['reason_phrase'], $expected['reason_phrase']); - $this->assertEquals($result['body'], $expected['body']); - $this->compareHttpHeaders($result['headers'], $expected['headers']); - } - - protected function normalizeHeaders($headers) - { - $normalized = array(); - foreach ($headers as $key => $value) { - $key = strtolower($key); - if (!isset($normalized[$key])) { - $normalized[$key] = $value; - } elseif (!is_array($normalized[$key])) { - $normalized[$key] = array($value); - } else { - $normalized[$key][] = $value; - } - } - - foreach ($normalized as $key => &$value) { - if (is_array($value)) { - sort($value); - } - } - - return $normalized; - } - - public function compareHttpHeaders($result, $expected) - { - // Aggregate all headers case-insensitively - $result = $this->normalizeHeaders($result); - $expected = $this->normalizeHeaders($expected); - $this->assertEquals($result, $expected); - } -} diff --git a/core/vendor/guzzlehttp/guzzle/tests/Message/RequestTest.php b/core/vendor/guzzlehttp/guzzle/tests/Message/RequestTest.php deleted file mode 100644 index a6241a4..0000000 --- a/core/vendor/guzzlehttp/guzzle/tests/Message/RequestTest.php +++ /dev/null @@ -1,132 +0,0 @@ - '123'], Stream::factory('foo')); - $this->assertEquals('PUT', $r->getMethod()); - $this->assertEquals('/test', $r->getUrl()); - $this->assertEquals('123', $r->getHeader('test')); - $this->assertEquals('foo', $r->getBody()); - } - - public function testConstructorInitializesMessageWithProtocolVersion() - { - $r = new Request('GET', '', [], null, ['protocol_version' => 10]); - $this->assertEquals(10, $r->getProtocolVersion()); - } - - public function testConstructorInitializesMessageWithEmitter() - { - $e = new Emitter(); - $r = new Request('GET', '', [], null, ['emitter' => $e]); - $this->assertSame($r->getEmitter(), $e); - } - - public function testCloneIsDeep() - { - $r = new Request('GET', '/test', ['foo' => 'baz'], Stream::factory('foo')); - $r2 = clone $r; - - $this->assertNotSame($r->getEmitter(), $r2->getEmitter()); - $this->assertEquals('foo', $r2->getBody()); - - $r->getConfig()->set('test', 123); - $this->assertFalse($r2->getConfig()->hasKey('test')); - - $r->setPath('/abc'); - $this->assertEquals('/test', $r2->getPath()); - } - - public function testCastsToString() - { - $r = new Request('GET', 'http://test.com/test', ['foo' => 'baz'], Stream::factory('body')); - $s = explode("\r\n", (string) $r); - $this->assertEquals("GET /test HTTP/1.1", $s[0]); - $this->assertContains('Host: test.com', $s); - $this->assertContains('foo: baz', $s); - $this->assertContains('', $s); - $this->assertContains('body', $s); - } - - public function testSettingUrlOverridesHostHeaders() - { - $r = new Request('GET', 'http://test.com/test'); - $r->setUrl('https://baz.com/bar'); - $this->assertEquals('baz.com', $r->getHost()); - $this->assertEquals('baz.com', $r->getHeader('Host')); - $this->assertEquals('/bar', $r->getPath()); - $this->assertEquals('https', $r->getScheme()); - } - - public function testQueryIsMutable() - { - $r = new Request('GET', 'http://www.foo.com?baz=bar'); - $this->assertEquals('baz=bar', $r->getQuery()); - $this->assertInstanceOf('GuzzleHttp\Query', $r->getQuery()); - $r->getQuery()->set('hi', 'there'); - $this->assertEquals('/?baz=bar&hi=there', $r->getResource()); - } - - public function testQueryCanChange() - { - $r = new Request('GET', 'http://www.foo.com?baz=bar'); - $r->setQuery(new Query(['foo' => 'bar'])); - $this->assertEquals('foo=bar', $r->getQuery()); - } - - public function testCanChangeMethod() - { - $r = new Request('GET', 'http://www.foo.com'); - $r->setMethod('put'); - $this->assertEquals('PUT', $r->getMethod()); - } - - public function testCanChangeSchemeWithPort() - { - $r = new Request('GET', 'http://www.foo.com:80'); - $r->setScheme('https'); - $this->assertEquals('https://www.foo.com', $r->getUrl()); - } - - public function testCanChangeScheme() - { - $r = new Request('GET', 'http://www.foo.com'); - $r->setScheme('https'); - $this->assertEquals('https://www.foo.com', $r->getUrl()); - } - - public function testCanChangeHost() - { - $r = new Request('GET', 'http://www.foo.com:222'); - $r->setHost('goo'); - $this->assertEquals('http://goo:222', $r->getUrl()); - $this->assertEquals('goo:222', $r->getHeader('host')); - $r->setHost('goo:80'); - $this->assertEquals('http://goo', $r->getUrl()); - $this->assertEquals('goo', $r->getHeader('host')); - } - - public function testCanChangePort() - { - $r = new Request('GET', 'http://www.foo.com:222'); - $this->assertSame(222, $r->getPort()); - $this->assertEquals('www.foo.com', $r->getHost()); - $this->assertEquals('www.foo.com:222', $r->getHeader('host')); - $r->setPort(80); - $this->assertSame(80, $r->getPort()); - $this->assertEquals('www.foo.com', $r->getHost()); - $this->assertEquals('www.foo.com', $r->getHeader('host')); - } -} diff --git a/core/vendor/guzzlehttp/guzzle/tests/Message/ResponseTest.php b/core/vendor/guzzlehttp/guzzle/tests/Message/ResponseTest.php deleted file mode 100644 index bbae24a..0000000 --- a/core/vendor/guzzlehttp/guzzle/tests/Message/ResponseTest.php +++ /dev/null @@ -1,120 +0,0 @@ - 'hi!']); - $this->assertEquals(999, $response->getStatusCode()); - $this->assertEquals('hi!', $response->getReasonPhrase()); - } - - public function testConvertsToString() - { - $response = new Response(200); - $this->assertEquals("HTTP/1.1 200 OK\r\n\r\n", (string) $response); - // Add another header - $response = new Response(200, ['X-Test' => 'Guzzle']); - $this->assertEquals("HTTP/1.1 200 OK\r\nX-Test: Guzzle\r\n\r\n", (string) $response); - $response = new Response(200, ['Content-Length' => 4], Stream::factory('test')); - $this->assertEquals("HTTP/1.1 200 OK\r\nContent-Length: 4\r\n\r\ntest", (string) $response); - } - - public function testConvertsToStringAndSeeksToByteZero() - { - $response = new Response(200); - $s = Stream::factory('foo'); - $s->read(1); - $response->setBody($s); - $this->assertEquals("HTTP/1.1 200 OK\r\n\r\nfoo", (string) $response); - } - - public function testParsesJsonResponses() - { - $json = '{"foo": "bar"}'; - $response = new Response(200, [], Stream::factory($json)); - $this->assertEquals(['foo' => 'bar'], $response->json()); - $this->assertEquals(json_decode($json), $response->json(['object' => true])); - - $response = new Response(200); - $this->assertEquals(null, $response->json()); - } - - /** - * @expectedException \GuzzleHttp\Exception\ParseException - * @expectedExceptionMessage Unable to parse JSON data: JSON_ERROR_SYNTAX - Syntax error, malformed JSON - */ - public function testThrowsExceptionWhenFailsToParseJsonResponse() - { - $response = new Response(200, [], Stream::factory('{"foo": "')); - $response->json(); - } - - public function testParsesXmlResponses() - { - $response = new Response(200, [], Stream::factory('bar')); - $this->assertEquals('bar', (string) $response->xml()->foo); - // Always return a SimpleXMLElement from the xml method - $response = new Response(200); - $this->assertEmpty((string) $response->xml()->foo); - } - - /** - * @expectedException \GuzzleHttp\Exception\XmlParseException - * @expectedExceptionMessage Unable to parse response body into XML: String could not be parsed as XML - */ - public function testThrowsExceptionWhenFailsToParseXmlResponse() - { - $response = new Response(200, [], Stream::factory('xml(); - } catch (XmlParseException $e) { - $xmlParseError = $e->getError(); - $this->assertInstanceOf('\LibXMLError', $xmlParseError); - $this->assertContains("Couldn't find end of Start Tag abc line 1", $xmlParseError->message); - throw $e; - } - } - - public function testHasEffectiveUrl() - { - $r = new Response(200); - $this->assertNull($r->getEffectiveUrl()); - $r->setEffectiveUrl('http://www.test.com'); - $this->assertEquals('http://www.test.com', $r->getEffectiveUrl()); - } - - public function testPreventsComplexExternalEntities() - { - $xml = ']>&test;'; - $response = new Response(200, [], Stream::factory($xml)); - - $oldCwd = getcwd(); - chdir(__DIR__); - try { - $xml = $response->xml(); - chdir($oldCwd); - $this->markTestIncomplete('Did not throw the expected exception! XML resolved as: ' . $xml->asXML()); - } catch (\Exception $e) { - chdir($oldCwd); - } - } - - public function testStatusAndReasonAreMutable() - { - $response = new Response(200); - $response->setStatusCode(201); - $this->assertEquals(201, $response->getStatusCode()); - $response->setReasonPhrase('Foo'); - $this->assertEquals('Foo', $response->getReasonPhrase()); - } -} diff --git a/core/vendor/guzzlehttp/guzzle/tests/MimetypesTest.php b/core/vendor/guzzlehttp/guzzle/tests/MimetypesTest.php deleted file mode 100644 index a18ec38..0000000 --- a/core/vendor/guzzlehttp/guzzle/tests/MimetypesTest.php +++ /dev/null @@ -1,31 +0,0 @@ -assertEquals('text/x-php', Mimetypes::getInstance()->fromExtension('php')); - } - - public function testGetsFromFilename() - { - $this->assertEquals('text/x-php', Mimetypes::getInstance()->fromFilename(__FILE__)); - } - - public function testGetsFromCaseInsensitiveFilename() - { - $this->assertEquals('text/x-php', Mimetypes::getInstance()->fromFilename(strtoupper(__FILE__))); - } - - public function testReturnsNullWhenNoMatchFound() - { - $this->assertNull(Mimetypes::getInstance()->fromExtension('foobar')); - } -} diff --git a/core/vendor/guzzlehttp/guzzle/tests/PoolTest.php b/core/vendor/guzzlehttp/guzzle/tests/PoolTest.php deleted file mode 100644 index 788a0f8..0000000 --- a/core/vendor/guzzlehttp/guzzle/tests/PoolTest.php +++ /dev/null @@ -1,231 +0,0 @@ - 10]); - $this->assertSame($c, $this->readAttribute($p, 'client')); - $this->assertEquals(10, $this->readAttribute($p, 'poolSize')); - } - - /** - * @expectedException \InvalidArgumentException - */ - public function testValidatesEachElement() - { - $c = new Client(); - $requests = ['foo']; - $p = new Pool($c, new \ArrayIterator($requests)); - $p->wait(); - } - - public function testSendsAndRealizesFuture() - { - $c = $this->getClient(); - $p = new Pool($c, [$c->createRequest('GET', 'http://foo.com')]); - $this->assertTrue($p->wait()); - $this->assertFalse($p->wait()); - $this->assertTrue($this->readAttribute($p, 'isRealized')); - $this->assertFalse($p->cancel()); - } - - public function testSendsManyRequestsInCappedPool() - { - $c = $this->getClient(); - $p = new Pool($c, [$c->createRequest('GET', 'http://foo.com')]); - $this->assertTrue($p->wait()); - $this->assertFalse($p->wait()); - } - - public function testSendsRequestsThatHaveNotBeenRealized() - { - $c = $this->getClient(); - $p = new Pool($c, [$c->createRequest('GET', 'http://foo.com')]); - $this->assertTrue($p->wait()); - $this->assertFalse($p->wait()); - $this->assertFalse($p->cancel()); - } - - public function testCancelsInFlightRequests() - { - $c = $this->getClient(); - $h = new History(); - $c->getEmitter()->attach($h); - $p = new Pool($c, [ - $c->createRequest('GET', 'http://foo.com'), - $c->createRequest('GET', 'http://foo.com', [ - 'events' => [ - 'before' => [ - 'fn' => function () use (&$p) { - $this->assertTrue($p->cancel()); - }, - 'priority' => RequestEvents::EARLY - ] - ] - ]) - ]); - ob_start(); - $p->wait(); - $contents = ob_get_clean(); - $this->assertEquals(1, count($h)); - $this->assertEquals('Cancelling', $contents); - } - - private function getClient() - { - $deferred = new Deferred(); - $future = new FutureArray( - $deferred->promise(), - function() use ($deferred) { - $deferred->resolve(['status' => 200, 'headers' => []]); - }, function () { - echo 'Cancelling'; - } - ); - - return new Client(['handler' => new MockHandler($future)]); - } - - public function testBatchesRequests() - { - $client = new Client(['handler' => function () { - throw new \RuntimeException('No network access'); - }]); - - $responses = [ - new Response(301, ['Location' => 'http://foo.com/bar']), - new Response(200), - new Response(200), - new Response(404) - ]; - - $client->getEmitter()->attach(new Mock($responses)); - $requests = [ - $client->createRequest('GET', 'http://foo.com/baz'), - $client->createRequest('HEAD', 'http://httpbin.org/get'), - $client->createRequest('PUT', 'http://httpbin.org/put'), - ]; - - $a = $b = $c = $d = 0; - $result = Pool::batch($client, $requests, [ - 'before' => function (BeforeEvent $e) use (&$a) { $a++; }, - 'complete' => function (CompleteEvent $e) use (&$b) { $b++; }, - 'error' => function (ErrorEvent $e) use (&$c) { $c++; }, - 'end' => function (EndEvent $e) use (&$d) { $d++; } - ]); - - $this->assertEquals(4, $a); - $this->assertEquals(2, $b); - $this->assertEquals(1, $c); - $this->assertEquals(3, $d); - $this->assertCount(3, $result); - $this->assertInstanceOf('GuzzleHttp\BatchResults', $result); - - // The first result is actually the second (redirect) response. - $this->assertSame($responses[1], $result[0]); - // The second result is a 1:1 request:response map - $this->assertSame($responses[2], $result[1]); - // The third entry is the 404 RequestException - $this->assertSame($responses[3], $result[2]->getResponse()); - } - - /** - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage Each event listener must be a callable or - */ - public function testBatchValidatesTheEventFormat() - { - $client = new Client(); - $requests = [$client->createRequest('GET', 'http://foo.com/baz')]; - Pool::batch($client, $requests, ['complete' => 'foo']); - } - - public function testEmitsProgress() - { - $client = new Client(['handler' => function () { - throw new \RuntimeException('No network access'); - }]); - - $responses = [new Response(200), new Response(404)]; - $client->getEmitter()->attach(new Mock($responses)); - $requests = [ - $client->createRequest('GET', 'http://foo.com/baz'), - $client->createRequest('HEAD', 'http://httpbin.org/get') - ]; - - $pool = new Pool($client, $requests); - $count = 0; - $thenned = null; - $pool->then( - function ($value) use (&$thenned) { - $thenned = $value; - }, - null, - function ($result) use (&$count, $requests) { - $this->assertSame($requests[$count], $result['request']); - if ($count == 0) { - $this->assertNull($result['error']); - $this->assertEquals(200, $result['response']->getStatusCode()); - } else { - $this->assertInstanceOf( - 'GuzzleHttp\Exception\ClientException', - $result['error'] - ); - } - $count++; - } - ); - - $pool->wait(); - $this->assertEquals(2, $count); - $this->assertEquals(true, $thenned); - } - - public function testDoesNotThrowInErrorEvent() - { - $client = new Client(); - $responses = [new Response(404)]; - $client->getEmitter()->attach(new Mock($responses)); - $requests = [$client->createRequest('GET', 'http://foo.com/baz')]; - $result = Pool::batch($client, $requests); - $this->assertCount(1, $result); - $this->assertInstanceOf('GuzzleHttp\Exception\ClientException', $result[0]); - } - - public function testHasSendMethod() - { - $client = new Client(); - $responses = [new Response(404)]; - $history = new History(); - $client->getEmitter()->attach($history); - $client->getEmitter()->attach(new Mock($responses)); - $requests = [$client->createRequest('GET', 'http://foo.com/baz')]; - Pool::send($client, $requests); - $this->assertCount(1, $history); - } -} diff --git a/core/vendor/guzzlehttp/guzzle/tests/Post/MultipartBodyTest.php b/core/vendor/guzzlehttp/guzzle/tests/Post/MultipartBodyTest.php deleted file mode 100644 index 4b3b391..0000000 --- a/core/vendor/guzzlehttp/guzzle/tests/Post/MultipartBodyTest.php +++ /dev/null @@ -1,120 +0,0 @@ - 'bar'], [ - new PostFile('foo', 'abc', 'foo.txt') - ], 'abcdef'); - } - - public function testConstructorAddsFieldsAndFiles() - { - $b = $this->getTestBody(); - $this->assertEquals('abcdef', $b->getBoundary()); - $c = (string) $b; - $this->assertContains("--abcdef\r\nContent-Disposition: form-data; name=\"foo\"\r\n\r\nbar\r\n", $c); - $this->assertContains("--abcdef\r\nContent-Disposition: form-data; name=\"foo\"; filename=\"foo.txt\"\r\n" - . "Content-Type: text/plain\r\n\r\nabc\r\n--abcdef--", $c); - } - - public function testDoesNotModifyFieldFormat() - { - $m = new MultipartBody(['foo+baz' => 'bar+bam %20 boo'], [ - new PostFile('foo+bar', 'abc %20 123', 'foo.txt') - ], 'abcdef'); - $this->assertContains('name="foo+baz"', (string) $m); - $this->assertContains('name="foo+bar"', (string) $m); - $this->assertContains('bar+bam %20 boo', (string) $m); - $this->assertContains('abc %20 123', (string) $m); - } - - /** - * @expectedException \InvalidArgumentException - */ - public function testConstructorValidatesFiles() - { - new MultipartBody([], ['bar']); - } - - public function testConstructorCanCreateBoundary() - { - $b = new MultipartBody(); - $this->assertNotNull($b->getBoundary()); - } - - public function testWrapsStreamMethods() - { - $b = $this->getTestBody(); - $this->assertFalse($b->write('foo')); - $this->assertFalse($b->isWritable()); - $this->assertTrue($b->isReadable()); - $this->assertTrue($b->isSeekable()); - $this->assertEquals(0, $b->tell()); - } - - public function testCanDetachFieldsAndFiles() - { - $b = $this->getTestBody(); - $b->detach(); - $b->close(); - $this->assertEquals('', (string) $b); - } - - public function testIsSeekableReturnsTrueIfAllAreSeekable() - { - $s = $this->getMockBuilder('GuzzleHttp\Stream\StreamInterface') - ->setMethods(['isSeekable', 'isReadable']) - ->getMockForAbstractClass(); - $s->expects($this->once()) - ->method('isSeekable') - ->will($this->returnValue(false)); - $s->expects($this->once()) - ->method('isReadable') - ->will($this->returnValue(true)); - $p = new PostFile('foo', $s, 'foo.php'); - $b = new MultipartBody([], [$p]); - $this->assertFalse($b->isSeekable()); - $this->assertFalse($b->seek(10)); - } - - public function testReadsFromBuffer() - { - $b = $this->getTestBody(); - $c = $b->read(1); - $c .= $b->read(1); - $c .= $b->read(1); - $c .= $b->read(1); - $c .= $b->read(1); - $this->assertEquals('--abc', $c); - } - - public function testCalculatesSize() - { - $b = $this->getTestBody(); - $this->assertEquals(strlen($b), $b->getSize()); - } - - public function testCalculatesSizeAndReturnsNullForUnknown() - { - $s = $this->getMockBuilder('GuzzleHttp\Stream\StreamInterface') - ->setMethods(['getSize', 'isReadable']) - ->getMockForAbstractClass(); - $s->expects($this->once()) - ->method('getSize') - ->will($this->returnValue(null)); - $s->expects($this->once()) - ->method('isReadable') - ->will($this->returnValue(true)); - $b = new MultipartBody([], [new PostFile('foo', $s, 'foo.php')]); - $this->assertNull($b->getSize()); - } -} diff --git a/core/vendor/guzzlehttp/guzzle/tests/Post/PostBodyTest.php b/core/vendor/guzzlehttp/guzzle/tests/Post/PostBodyTest.php deleted file mode 100644 index 308f5e0..0000000 --- a/core/vendor/guzzlehttp/guzzle/tests/Post/PostBodyTest.php +++ /dev/null @@ -1,256 +0,0 @@ -assertTrue($b->isSeekable()); - $this->assertTrue($b->isReadable()); - $this->assertFalse($b->isWritable()); - $this->assertFalse($b->write('foo')); - } - - public function testApplyingWithNothingDoesNothing() - { - $b = new PostBody(); - $m = new Request('POST', '/'); - $b->applyRequestHeaders($m); - $this->assertFalse($m->hasHeader('Content-Length')); - $this->assertFalse($m->hasHeader('Content-Type')); - } - - public function testCanForceMultipartUploadsWhenApplying() - { - $b = new PostBody(); - $b->forceMultipartUpload(true); - $m = new Request('POST', '/'); - $b->applyRequestHeaders($m); - $this->assertContains( - 'multipart/form-data', - $m->getHeader('Content-Type') - ); - } - - public function testApplyingWithFilesAddsMultipartUpload() - { - $b = new PostBody(); - $p = new PostFile('foo', fopen(__FILE__, 'r')); - $b->addFile($p); - $this->assertEquals([$p], $b->getFiles()); - $this->assertNull($b->getFile('missing')); - $this->assertSame($p, $b->getFile('foo')); - $m = new Request('POST', '/'); - $b->applyRequestHeaders($m); - $this->assertContains( - 'multipart/form-data', - $m->getHeader('Content-Type') - ); - $this->assertTrue($m->hasHeader('Content-Length')); - } - - public function testApplyingWithFieldsAddsMultipartUpload() - { - $b = new PostBody(); - $b->setField('foo', 'bar'); - $this->assertEquals(['foo' => 'bar'], $b->getFields()); - $m = new Request('POST', '/'); - $b->applyRequestHeaders($m); - $this->assertContains( - 'application/x-www-form', - $m->getHeader('Content-Type') - ); - $this->assertTrue($m->hasHeader('Content-Length')); - } - - public function testMultipartWithNestedFields() - { - $b = new PostBody(); - $b->setField('foo', ['bar' => 'baz']); - $b->forceMultipartUpload(true); - $this->assertEquals(['foo' => ['bar' => 'baz']], $b->getFields()); - $m = new Request('POST', '/'); - $b->applyRequestHeaders($m); - $this->assertContains( - 'multipart/form-data', - $m->getHeader('Content-Type') - ); - $this->assertTrue($m->hasHeader('Content-Length')); - $contents = $b->getContents(); - $this->assertContains('name="foo[bar]"', $contents); - $this->assertNotContains('name="foo"', $contents); - } - - public function testCountProvidesFieldsAndFiles() - { - $b = new PostBody(); - $b->setField('foo', 'bar'); - $b->addFile(new PostFile('foo', fopen(__FILE__, 'r'))); - $this->assertEquals(2, count($b)); - $b->clearFiles(); - $b->removeField('foo'); - $this->assertEquals(0, count($b)); - $this->assertEquals([], $b->getFiles()); - $this->assertEquals([], $b->getFields()); - } - - public function testHasFields() - { - $b = new PostBody(); - $b->setField('foo', 'bar'); - $b->setField('baz', '123'); - $this->assertEquals('bar', $b->getField('foo')); - $this->assertEquals('123', $b->getField('baz')); - $this->assertNull($b->getField('ahh')); - $this->assertTrue($b->hasField('foo')); - $this->assertFalse($b->hasField('test')); - $b->replaceFields(['abc' => '123']); - $this->assertFalse($b->hasField('foo')); - $this->assertTrue($b->hasField('abc')); - } - - public function testConvertsFieldsToQueryStyleBody() - { - $b = new PostBody(); - $b->setField('foo', 'bar'); - $b->setField('baz', '123'); - $this->assertEquals('foo=bar&baz=123', $b); - $this->assertEquals(15, $b->getSize()); - $b->seek(0); - $this->assertEquals('foo=bar&baz=123', $b->getContents()); - $b->seek(0); - $this->assertEquals('foo=bar&baz=123', $b->read(1000)); - $this->assertEquals(15, $b->tell()); - $this->assertTrue($b->eof()); - } - - public function testCanSpecifyQueryAggregator() - { - $b = new PostBody(); - $b->setField('foo', ['baz', 'bar']); - $this->assertEquals('foo%5B0%5D=baz&foo%5B1%5D=bar', (string) $b); - $b = new PostBody(); - $b->setField('foo', ['baz', 'bar']); - $agg = Query::duplicateAggregator(); - $b->setAggregator($agg); - $this->assertEquals('foo=baz&foo=bar', (string) $b); - } - - public function testDetachesAndCloses() - { - $b = new PostBody(); - $b->setField('foo', 'bar'); - $b->detach(); - $b->close(); - $this->assertEquals('', $b->read(10)); - } - - public function testDetachesWhenBodyIsPresent() - { - $b = new PostBody(); - $b->setField('foo', 'bar'); - $b->getContents(); - $b->detach(); - } - - public function testFlushAndMetadataPlaceholders() - { - $b = new PostBody(); - $this->assertEquals([], $b->getMetadata()); - $this->assertNull($b->getMetadata('foo')); - } - - public function testCreatesMultipartUploadWithMultiFields() - { - $b = new PostBody(); - $b->setField('testing', ['baz', 'bar']); - $b->setField('other', 'hi'); - $b->setField('third', 'there'); - $b->addFile(new PostFile('foo', fopen(__FILE__, 'r'))); - $s = (string) $b; - $this->assertContains(file_get_contents(__FILE__), $s); - $this->assertContains('testing=bar', $s); - $this->assertContains( - 'Content-Disposition: form-data; name="third"', - $s - ); - $this->assertContains( - 'Content-Disposition: form-data; name="other"', - $s - ); - } - - public function testMultipartWithBase64Fields() - { - $b = new PostBody(); - $b->setField('foo64', '/xA2JhWEqPcgyLRDdir9WSRi/khpb2Lh3ooqv+5VYoc='); - $b->forceMultipartUpload(true); - $this->assertEquals( - ['foo64' => '/xA2JhWEqPcgyLRDdir9WSRi/khpb2Lh3ooqv+5VYoc='], - $b->getFields() - ); - $m = new Request('POST', '/'); - $b->applyRequestHeaders($m); - $this->assertContains( - 'multipart/form-data', - $m->getHeader('Content-Type') - ); - $this->assertTrue($m->hasHeader('Content-Length')); - $contents = $b->getContents(); - $this->assertContains('name="foo64"', $contents); - $this->assertContains( - '/xA2JhWEqPcgyLRDdir9WSRi/khpb2Lh3ooqv+5VYoc=', - $contents - ); - } - - public function testMultipartWithAmpersandInValue() - { - $b = new PostBody(); - $b->setField('a', 'b&c=d'); - $b->forceMultipartUpload(true); - $this->assertEquals(['a' => 'b&c=d'], $b->getFields()); - $m = new Request('POST', '/'); - $b->applyRequestHeaders($m); - $this->assertContains( - 'multipart/form-data', - $m->getHeader('Content-Type') - ); - $this->assertTrue($m->hasHeader('Content-Length')); - $contents = $b->getContents(); - $this->assertContains('name="a"', $contents); - $this->assertContains('b&c=d', $contents); - } - - /** - * @expectedException \GuzzleHttp\Stream\Exception\CannotAttachException - */ - public function testCannotAttach() - { - $b = new PostBody(); - $b->attach('foo'); - } - - public function testDoesNotOverwriteExistingHeaderForUrlencoded() - { - $m = new Request('POST', 'http://foo.com', [ - 'content-type' => 'application/x-www-form-urlencoded; charset=utf-8' - ]); - $b = new PostBody(); - $b->setField('foo', 'bar'); - $b->applyRequestHeaders($m); - $this->assertEquals( - 'application/x-www-form-urlencoded; charset=utf-8', - $m->getHeader('Content-Type') - ); - } -} diff --git a/core/vendor/guzzlehttp/guzzle/tests/Post/PostFileTest.php b/core/vendor/guzzlehttp/guzzle/tests/Post/PostFileTest.php deleted file mode 100644 index 800cee5..0000000 --- a/core/vendor/guzzlehttp/guzzle/tests/Post/PostFileTest.php +++ /dev/null @@ -1,61 +0,0 @@ -assertInstanceOf('GuzzleHttp\Post\PostFileInterface', $p); - $this->assertEquals('hi', $p->getContent()); - $this->assertEquals('foo', $p->getName()); - $this->assertEquals('/path/to/test.php', $p->getFilename()); - $this->assertEquals( - 'form-data; name="foo"; filename="test.php"', - $p->getHeaders()['Content-Disposition'] - ); - } - - public function testGetsFilenameFromMetadata() - { - $p = new PostFile('foo', fopen(__FILE__, 'r')); - $this->assertEquals(__FILE__, $p->getFilename()); - } - - public function testDefaultsToNameWhenNoFilenameExists() - { - $p = new PostFile('foo', 'bar'); - $this->assertEquals('foo', $p->getFilename()); - } - - public function testCreatesFromMultipartFormData() - { - $mp = new MultipartBody([], [], 'baz'); - $p = new PostFile('foo', $mp); - $this->assertEquals( - 'form-data; name="foo"', - $p->getHeaders()['Content-Disposition'] - ); - $this->assertEquals( - 'multipart/form-data; boundary=baz', - $p->getHeaders()['Content-Type'] - ); - } - - public function testCanAddHeaders() - { - $p = new PostFile('foo', Stream::factory('hi'), 'test.php', [ - 'X-Foo' => '123', - 'Content-Disposition' => 'bar' - ]); - $this->assertEquals('bar', $p->getHeaders()['Content-Disposition']); - $this->assertEquals('123', $p->getHeaders()['X-Foo']); - } -} diff --git a/core/vendor/guzzlehttp/guzzle/tests/QueryParserTest.php b/core/vendor/guzzlehttp/guzzle/tests/QueryParserTest.php deleted file mode 100644 index e9075a8..0000000 --- a/core/vendor/guzzlehttp/guzzle/tests/QueryParserTest.php +++ /dev/null @@ -1,80 +0,0 @@ - ['a', 'b']]], - // Can parse multi-valued items that use numeric indices - ['q[0]=a&q[1]=b', ['q' => ['a', 'b']]], - // Can parse duplicates and does not include numeric indices - ['q[]=a&q[]=b', ['q' => ['a', 'b']]], - // Ensures that the value of "q" is an array even though one value - ['q[]=a', ['q' => ['a']]], - // Does not modify "." to "_" like PHP's parse_str() - ['q.a=a&q.b=b', ['q.a' => 'a', 'q.b' => 'b']], - // Can decode %20 to " " - ['q%20a=a%20b', ['q a' => 'a b']], - // Can parse funky strings with no values by assigning each to null - ['q&a', ['q' => null, 'a' => null]], - // Does not strip trailing equal signs - ['data=abc=', ['data' => 'abc=']], - // Can store duplicates without affecting other values - ['foo=a&foo=b&?µ=c', ['foo' => ['a', 'b'], '?µ' => 'c']], - // Sets value to null when no "=" is present - ['foo', ['foo' => null]], - // Preserves "0" keys. - ['0', ['0' => null]], - // Sets the value to an empty string when "=" is present - ['0=', ['0' => '']], - // Preserves falsey keys - ['var=0', ['var' => '0']], - // Can deeply nest and store duplicate PHP values - ['a[b][c]=1&a[b][c]=2', [ - 'a' => ['b' => ['c' => ['1', '2']]] - ]], - // Can parse PHP style arrays - ['a[b]=c&a[d]=e', ['a' => ['b' => 'c', 'd' => 'e']]], - // Ensure it doesn't leave things behind with repeated values - // Can parse mult-values items - ['q=a&q=b&q=c', ['q' => ['a', 'b', 'c']]], - ]; - } - - /** - * @dataProvider parseQueryProvider - */ - public function testParsesQueries($input, $output) - { - $query = Query::fromString($input); - $this->assertEquals($output, $query->toArray()); - // Normalize the input and output - $query->setEncodingType(false); - $this->assertEquals(rawurldecode($input), (string) $query); - } - - public function testConvertsPlusSymbolsToSpacesByDefault() - { - $query = Query::fromString('var=foo+bar', true); - $this->assertEquals('foo bar', $query->get('var')); - } - - public function testCanControlDecodingType() - { - $qp = new QueryParser(); - $q = new Query(); - $qp->parseInto($q, 'var=foo+bar', Query::RFC3986); - $this->assertEquals('foo+bar', $q->get('var')); - $qp->parseInto($q, 'var=foo+bar', Query::RFC1738); - $this->assertEquals('foo bar', $q->get('var')); - } -} diff --git a/core/vendor/guzzlehttp/guzzle/tests/QueryTest.php b/core/vendor/guzzlehttp/guzzle/tests/QueryTest.php deleted file mode 100644 index 8b9d344..0000000 --- a/core/vendor/guzzlehttp/guzzle/tests/QueryTest.php +++ /dev/null @@ -1,171 +0,0 @@ - 'baz', 'bar' => 'bam boozle']); - $this->assertEquals('foo=baz&bar=bam%20boozle', (string) $q); - } - - public function testCanDisableUrlEncoding() - { - $q = new Query(['bar' => 'bam boozle']); - $q->setEncodingType(false); - $this->assertEquals('bar=bam boozle', (string) $q); - } - - public function testCanSpecifyRfc1783UrlEncodingType() - { - $q = new Query(['bar abc' => 'bam boozle']); - $q->setEncodingType(Query::RFC1738); - $this->assertEquals('bar+abc=bam+boozle', (string) $q); - } - - public function testCanSpecifyRfc3986UrlEncodingType() - { - $q = new Query(['bar abc' => 'bam boozle', 'ሴ' => 'hi']); - $q->setEncodingType(Query::RFC3986); - $this->assertEquals('bar%20abc=bam%20boozle&%E1%88%B4=hi', (string) $q); - } - - /** - * @expectedException \InvalidArgumentException - */ - public function testValidatesEncodingType() - { - (new Query(['bar' => 'bam boozle']))->setEncodingType('foo'); - } - - public function testAggregatesMultipleValues() - { - $q = new Query(['foo' => ['bar', 'baz']]); - $this->assertEquals('foo%5B0%5D=bar&foo%5B1%5D=baz', (string) $q); - } - - public function testCanSetAggregator() - { - $q = new Query(['foo' => ['bar', 'baz']]); - $q->setAggregator(function (array $data) { - return ['foo' => ['barANDbaz']]; - }); - $this->assertEquals('foo=barANDbaz', (string) $q); - } - - public function testAllowsMultipleValuesPerKey() - { - $q = new Query(); - $q->add('facet', 'size'); - $q->add('facet', 'width'); - $q->add('facet.field', 'foo'); - // Use the duplicate aggregator - $q->setAggregator($q::duplicateAggregator()); - $this->assertEquals('facet=size&facet=width&facet.field=foo', (string) $q); - } - - public function testAllowsZeroValues() - { - $query = new Query(array( - 'foo' => 0, - 'baz' => '0', - 'bar' => null, - 'boo' => false - )); - $this->assertEquals('foo=0&baz=0&bar&boo=', (string) $query); - } - - private $encodeData = [ - 't' => [ - 'v1' => ['a', '1'], - 'v2' => 'b', - 'v3' => ['v4' => 'c', 'v5' => 'd'] - ] - ]; - - public function testEncodesDuplicateAggregator() - { - $agg = Query::duplicateAggregator(); - $result = $agg($this->encodeData); - $this->assertEquals(array( - 't[v1]' => ['a', '1'], - 't[v2]' => ['b'], - 't[v3][v4]' => ['c'], - 't[v3][v5]' => ['d'], - ), $result); - } - - public function testDuplicateEncodesNoNumericIndices() - { - $agg = Query::duplicateAggregator(); - $result = $agg($this->encodeData); - $this->assertEquals(array( - 't[v1]' => ['a', '1'], - 't[v2]' => ['b'], - 't[v3][v4]' => ['c'], - 't[v3][v5]' => ['d'], - ), $result); - } - - public function testEncodesPhpAggregator() - { - $agg = Query::phpAggregator(); - $result = $agg($this->encodeData); - $this->assertEquals(array( - 't[v1][0]' => ['a'], - 't[v1][1]' => ['1'], - 't[v2]' => ['b'], - 't[v3][v4]' => ['c'], - 't[v3][v5]' => ['d'], - ), $result); - } - - public function testPhpEncodesNoNumericIndices() - { - $agg = Query::phpAggregator(false); - $result = $agg($this->encodeData); - $this->assertEquals(array( - 't[v1][]' => ['a', '1'], - 't[v2]' => ['b'], - 't[v3][v4]' => ['c'], - 't[v3][v5]' => ['d'], - ), $result); - } - - public function testCanDisableUrlEncodingDecoding() - { - $q = Query::fromString('foo=bar+baz boo%20', false); - $this->assertEquals('bar+baz boo%20', $q['foo']); - $this->assertEquals('foo=bar+baz boo%20', (string) $q); - } - - public function testCanChangeUrlEncodingDecodingToRfc1738() - { - $q = Query::fromString('foo=bar+baz', Query::RFC1738); - $this->assertEquals('bar baz', $q['foo']); - $this->assertEquals('foo=bar+baz', (string) $q); - } - - public function testCanChangeUrlEncodingDecodingToRfc3986() - { - $q = Query::fromString('foo=bar%20baz', Query::RFC3986); - $this->assertEquals('bar baz', $q['foo']); - $this->assertEquals('foo=bar%20baz', (string) $q); - } - - public function testQueryStringsAllowSlashButDoesNotDecodeWhenDisable() - { - $q = Query::fromString('foo=bar%2Fbaz&bam=boo%20boo', Query::RFC3986); - $q->setEncodingType(false); - $this->assertEquals('foo=bar/baz&bam=boo boo', (string) $q); - } - - public function testQueryStringsAllowDecodingEncodingCompletelyDisabled() - { - $q = Query::fromString('foo=bar%2Fbaz&bam=boo boo!', false); - $this->assertEquals('foo=bar%2Fbaz&bam=boo boo!', (string) $q); - } -} diff --git a/core/vendor/guzzlehttp/guzzle/tests/RequestFsmTest.php b/core/vendor/guzzlehttp/guzzle/tests/RequestFsmTest.php deleted file mode 100644 index 86dc270..0000000 --- a/core/vendor/guzzlehttp/guzzle/tests/RequestFsmTest.php +++ /dev/null @@ -1,192 +0,0 @@ -mf = new MessageFactory(); - } - - public function testEmitsBeforeEventInTransition() - { - $fsm = new RequestFsm(function () {}, $this->mf); - $t = new Transaction(new Client(), new Request('GET', 'http://foo.com')); - $c = false; - $t->request->getEmitter()->on('before', function (BeforeEvent $e) use (&$c) { - $c = true; - }); - $fsm($t, 'send'); - $this->assertTrue($c); - } - - public function testEmitsCompleteEventInTransition() - { - $fsm = new RequestFsm(function () {}, $this->mf); - $t = new Transaction(new Client(), new Request('GET', 'http://foo.com')); - $t->response = new Response(200); - $t->state = 'complete'; - $c = false; - $t->request->getEmitter()->on('complete', function (CompleteEvent $e) use (&$c) { - $c = true; - }); - $fsm($t, 'end'); - $this->assertTrue($c); - } - - public function testDoesNotEmitCompleteForFuture() - { - $fsm = new RequestFsm(function () {}, $this->mf); - $t = new Transaction(new Client(), new Request('GET', 'http://foo.com')); - $deferred = new Deferred(); - $t->response = new FutureResponse($deferred->promise()); - $t->state = 'complete'; - $c = false; - $t->request->getEmitter()->on('complete', function (CompleteEvent $e) use (&$c) { - $c = true; - }); - $fsm($t, 'end'); - $this->assertFalse($c); - } - - public function testDoesNotEmitEndForFuture() - { - $fsm = new RequestFsm(function () {}, $this->mf); - $t = new Transaction(new Client(), new Request('GET', 'http://foo.com')); - $deferred = new Deferred(); - $t->response = new FutureResponse($deferred->promise()); - $t->state = 'end'; - $c = false; - $t->request->getEmitter()->on('end', function (EndEvent $e) use (&$c) { - $c = true; - }); - $fsm($t); - $this->assertFalse($c); - } - - public function testTransitionsThroughSuccessfulTransfer() - { - $client = new Client(); - $client->getEmitter()->attach(new Mock([new Response(200)])); - $request = $client->createRequest('GET', 'http://ewfewwef.com'); - $this->addListeners($request, $calls); - $client->send($request); - $this->assertEquals(['before', 'complete', 'end'], $calls); - } - - public function testTransitionsThroughErrorsInBefore() - { - $fsm = new RequestFsm(function () {}, $this->mf); - $client = new Client(); - $request = $client->createRequest('GET', 'http://ewfewwef.com'); - $t = new Transaction($client, $request); - $calls = []; - $this->addListeners($t->request, $calls); - $t->request->getEmitter()->on('before', function (BeforeEvent $e) { - throw new \Exception('foo'); - }); - try { - $fsm($t, 'send'); - $this->fail('did not throw'); - } catch (RequestException $e) { - $this->assertContains('foo', $t->exception->getMessage()); - $this->assertEquals(['before', 'error', 'end'], $calls); - } - } - - public function testTransitionsThroughErrorsInComplete() - { - $client = new Client(); - $client->getEmitter()->attach(new Mock([new Response(200)])); - $request = $client->createRequest('GET', 'http://ewfewwef.com'); - $this->addListeners($request, $calls); - $request->getEmitter()->once('complete', function (CompleteEvent $e) { - throw new \Exception('foo'); - }); - try { - $client->send($request); - $this->fail('did not throw'); - } catch (RequestException $e) { - $this->assertContains('foo', $e->getMessage()); - $this->assertEquals(['before', 'complete', 'error', 'end'], $calls); - } - } - - public function testTransitionsThroughErrorInterception() - { - $fsm = new RequestFsm(function () {}, $this->mf); - $client = new Client(); - $request = $client->createRequest('GET', 'http://ewfewwef.com'); - $t = new Transaction($client, $request); - $calls = []; - $this->addListeners($t->request, $calls); - $t->request->getEmitter()->on('error', function (ErrorEvent $e) { - $e->intercept(new Response(200)); - }); - $fsm($t, 'send'); - $t->response = new Response(404); - $t->state = 'complete'; - $fsm($t); - $this->assertEquals(200, $t->response->getStatusCode()); - $this->assertNull($t->exception); - $this->assertEquals(['before', 'complete', 'error', 'complete', 'end'], $calls); - } - - private function addListeners(RequestInterface $request, &$calls) - { - $request->getEmitter()->on('before', function (BeforeEvent $e) use (&$calls) { - $calls[] = 'before'; - }, RequestEvents::EARLY); - $request->getEmitter()->on('complete', function (CompleteEvent $e) use (&$calls) { - $calls[] = 'complete'; - }, RequestEvents::EARLY); - $request->getEmitter()->on('error', function (ErrorEvent $e) use (&$calls) { - $calls[] = 'error'; - }, RequestEvents::EARLY); - $request->getEmitter()->on('end', function (EndEvent $e) use (&$calls) { - $calls[] = 'end'; - }, RequestEvents::EARLY); - } - - /** - * @expectedException \GuzzleHttp\Exception\RequestException - * @expectedExceptionMessage Too many state transitions - */ - public function testDetectsInfiniteLoops() - { - $client = new Client([ - 'fsm' => $fsm = new RequestFsm( - function () {}, - new MessageFactory(), - 3 - ) - ]); - $request = $client->createRequest('GET', 'http://foo.com:123'); - $request->getEmitter()->on('before', function () { - throw new \Exception('foo'); - }); - $request->getEmitter()->on('error', function ($e) { - $e->retry(); - }); - $client->send($request); - } -} diff --git a/core/vendor/guzzlehttp/guzzle/tests/RingBridgeTest.php b/core/vendor/guzzlehttp/guzzle/tests/RingBridgeTest.php deleted file mode 100644 index 19af077..0000000 --- a/core/vendor/guzzlehttp/guzzle/tests/RingBridgeTest.php +++ /dev/null @@ -1,213 +0,0 @@ - 'hello' - ], $stream); - $request->getConfig()->set('foo', 'bar'); - $trans = new Transaction(new Client(), $request); - $factory = new MessageFactory(); - $fsm = new RequestFsm(function () {}, new MessageFactory()); - $r = RingBridge::prepareRingRequest($trans, $factory, $fsm); - $this->assertEquals('http', $r['scheme']); - $this->assertEquals('1.1', $r['version']); - $this->assertEquals('GET', $r['http_method']); - $this->assertEquals('http://httpbin.org/get?a=b', $r['url']); - $this->assertEquals('/get', $r['uri']); - $this->assertEquals('a=b', $r['query_string']); - $this->assertEquals([ - 'Host' => ['httpbin.org'], - 'test' => ['hello'] - ], $r['headers']); - $this->assertSame($stream, $r['body']); - $this->assertEquals(['foo' => 'bar'], $r['client']); - $this->assertFalse($r['future']); - } - - public function testCreatesRingRequestsWithNullQueryString() - { - $request = new Request('GET', 'http://httpbin.org'); - $trans = new Transaction(new Client(), $request); - $factory = new MessageFactory(); - $fsm = new RequestFsm(function () {}, new MessageFactory()); - $r = RingBridge::prepareRingRequest($trans, $factory, $fsm); - $this->assertNull($r['query_string']); - $this->assertEquals('/', $r['uri']); - $this->assertEquals(['Host' => ['httpbin.org']], $r['headers']); - $this->assertNull($r['body']); - $this->assertEquals([], $r['client']); - } - - public function testAddsProgress() - { - Server::enqueue([new Response(200)]); - $client = new Client(['base_url' => Server::$url]); - $request = $client->createRequest('GET'); - $called = false; - $request->getEmitter()->on( - 'progress', - function (ProgressEvent $e) use (&$called) { - $called = true; - } - ); - $this->assertEquals(200, $client->send($request)->getStatusCode()); - $this->assertTrue($called); - } - - public function testGetsResponseProtocolVersionAndEffectiveUrlAndReason() - { - $client = new Client([ - 'handler' => new MockHandler([ - 'status' => 200, - 'reason' => 'test', - 'headers' => [], - 'version' => '1.0', - 'effective_url' => 'http://foo.com' - ]) - ]); - $request = $client->createRequest('GET', 'http://foo.com'); - $response = $client->send($request); - $this->assertEquals('1.0', $response->getProtocolVersion()); - $this->assertEquals('http://foo.com', $response->getEffectiveUrl()); - $this->assertEquals('test', $response->getReasonPhrase()); - } - - public function testGetsStreamFromResponse() - { - $res = fopen('php://temp', 'r+'); - fwrite($res, 'foo'); - rewind($res); - $client = new Client([ - 'handler' => new MockHandler([ - 'status' => 200, - 'headers' => [], - 'body' => $res - ]) - ]); - $request = $client->createRequest('GET', 'http://foo.com'); - $response = $client->send($request); - $this->assertEquals('foo', (string) $response->getBody()); - } - - public function testEmitsCompleteEventOnSuccess() - { - $c = false; - $trans = new Transaction(new Client(), new Request('GET', 'http://f.co')); - $trans->request->getEmitter()->on('complete', function () use (&$c) { - $c = true; - }); - $f = new MessageFactory(); - $res = ['status' => 200, 'headers' => []]; - $fsm = new RequestFsm(function () {}, new MessageFactory()); - RingBridge::completeRingResponse($trans, $res, $f, $fsm); - $this->assertInstanceOf( - 'GuzzleHttp\Message\ResponseInterface', - $trans->response - ); - $this->assertTrue($c); - } - - public function testEmitsErrorEventOnError() - { - $client = new Client(['base_url' => 'http://127.0.0.1:123']); - $request = $client->createRequest('GET'); - $called = false; - $request->getEmitter()->on('error', function () use (&$called) { - $called = true; - }); - $request->getConfig()['timeout'] = 0.001; - $request->getConfig()['connect_timeout'] = 0.001; - try { - $client->send($request); - $this->fail('did not throw'); - } catch (RequestException $e) { - $this->assertSame($request, $e->getRequest()); - $this->assertContains('cURL error', $e->getMessage()); - $this->assertTrue($called); - } - } - - /** - * @expectedException \InvalidArgumentException - */ - public function testValidatesRingRequest() - { - RingBridge::fromRingRequest([]); - } - - public function testCreatesRequestFromRing() - { - $request = RingBridge::fromRingRequest([ - 'http_method' => 'GET', - 'uri' => '/', - 'headers' => [ - 'foo' => ['bar'], - 'host' => ['foo.com'] - ], - 'body' => 'test', - 'version' => '1.0' - ]); - $this->assertEquals('GET', $request->getMethod()); - $this->assertEquals('http://foo.com/', $request->getUrl()); - $this->assertEquals('1.0', $request->getProtocolVersion()); - $this->assertEquals('test', (string) $request->getBody()); - $this->assertEquals('bar', $request->getHeader('foo')); - } - - public function testCanInterceptException() - { - $client = new Client(['base_url' => 'http://127.0.0.1:123']); - $request = $client->createRequest('GET'); - $called = false; - $request->getEmitter()->on( - 'error', - function (ErrorEvent $e) use (&$called) { - $called = true; - $e->intercept(new Response(200)); - } - ); - $request->getConfig()['timeout'] = 0.001; - $request->getConfig()['connect_timeout'] = 0.001; - $this->assertEquals(200, $client->send($request)->getStatusCode()); - $this->assertTrue($called); - } - - public function testCreatesLongException() - { - $r = new Request('GET', 'http://www.google.com'); - $e = RingBridge::getNoRingResponseException($r); - $this->assertInstanceOf('GuzzleHttp\Exception\RequestException', $e); - $this->assertSame($r, $e->getRequest()); - } - - public function testEnsuresResponseOrExceptionWhenCompletingResponse() - { - $trans = new Transaction(new Client(), new Request('GET', 'http://f.co')); - $f = new MessageFactory(); - $fsm = new RequestFsm(function () {}, new MessageFactory()); - try { - RingBridge::completeRingResponse($trans, [], $f, $fsm); - } catch (RequestException $e) { - $this->assertSame($trans->request, $e->getRequest()); - $this->assertContains('RingPHP', $e->getMessage()); - } - } -} diff --git a/core/vendor/guzzlehttp/guzzle/tests/Server.php b/core/vendor/guzzlehttp/guzzle/tests/Server.php deleted file mode 100644 index 1de20e3..0000000 --- a/core/vendor/guzzlehttp/guzzle/tests/Server.php +++ /dev/null @@ -1,107 +0,0 @@ -fromMessage($response); - } elseif (!($response instanceof ResponseInterface)) { - throw new \Exception('Responses must be strings or Responses'); - } - $data[] = self::convertResponse($response); - } - - TestServer::enqueue($data); - } - - /** - * Get all of the received requests - * - * @param bool $hydrate Set to TRUE to turn the messages into - * actual {@see RequestInterface} objects. If $hydrate is FALSE, - * requests will be returned as strings. - * - * @return array - * @throws \RuntimeException - */ - public static function received($hydrate = false) - { - $response = TestServer::received(); - - if ($hydrate) { - $c = new Client(); - $factory = new MessageFactory(); - $response = array_map(function($message) use ($factory, $c) { - return RingBridge::fromRingRequest($message); - }, $response); - } - - return $response; - } - - public static function flush() - { - TestServer::flush(); - } - - public static function stop() - { - TestServer::stop(); - } - - public static function wait($maxTries = 5) - { - TestServer::wait($maxTries); - } - - public static function start() - { - TestServer::start(); - } - - private static function convertResponse(Response $response) - { - $headers = array_map(function ($h) { - return implode(', ', $h); - }, $response->getHeaders()); - - return [ - 'status' => $response->getStatusCode(), - 'reason' => $response->getReasonPhrase(), - 'headers' => $headers, - 'body' => base64_encode((string) $response->getBody()) - ]; - } -} diff --git a/core/vendor/guzzlehttp/guzzle/tests/Subscriber/CookieTest.php b/core/vendor/guzzlehttp/guzzle/tests/Subscriber/CookieTest.php deleted file mode 100644 index bc17e2d..0000000 --- a/core/vendor/guzzlehttp/guzzle/tests/Subscriber/CookieTest.php +++ /dev/null @@ -1,74 +0,0 @@ -getMockBuilder('GuzzleHttp\Cookie\CookieJar') - ->setMethods(array('extractCookies')) - ->getMock(); - - $mock->expects($this->exactly(1)) - ->method('extractCookies') - ->with($request, $response); - - $plugin = new Cookie($mock); - $t = new Transaction(new Client(), $request); - $t->response = $response; - $plugin->onComplete(new CompleteEvent($t)); - } - - public function testProvidesCookieJar() - { - $jar = new CookieJar(); - $plugin = new Cookie($jar); - $this->assertSame($jar, $plugin->getCookieJar()); - } - - public function testCookiesAreExtractedFromRedirectResponses() - { - $jar = new CookieJar(); - $cookie = new Cookie($jar); - $history = new History(); - $mock = new Mock([ - "HTTP/1.1 302 Moved Temporarily\r\n" . - "Set-Cookie: test=583551; Domain=www.foo.com; Expires=Wednesday, 23-Mar-2050 19:49:45 GMT; Path=/\r\n" . - "Location: /redirect\r\n\r\n", - "HTTP/1.1 200 OK\r\n" . - "Content-Length: 0\r\n\r\n", - "HTTP/1.1 200 OK\r\n" . - "Content-Length: 0\r\n\r\n" - ]); - $client = new Client(['base_url' => 'http://www.foo.com']); - $client->getEmitter()->attach($cookie); - $client->getEmitter()->attach($mock); - $client->getEmitter()->attach($history); - - $client->get(); - $request = $client->createRequest('GET', '/'); - $client->send($request); - - $this->assertEquals('test=583551', $request->getHeader('Cookie')); - $requests = $history->getRequests(); - // Confirm subsequent requests have the cookie. - $this->assertEquals('test=583551', $requests[2]->getHeader('Cookie')); - // Confirm the redirected request has the cookie. - $this->assertEquals('test=583551', $requests[1]->getHeader('Cookie')); - } -} diff --git a/core/vendor/guzzlehttp/guzzle/tests/Subscriber/HistoryTest.php b/core/vendor/guzzlehttp/guzzle/tests/Subscriber/HistoryTest.php deleted file mode 100644 index d28e301..0000000 --- a/core/vendor/guzzlehttp/guzzle/tests/Subscriber/HistoryTest.php +++ /dev/null @@ -1,140 +0,0 @@ -response = $response; - $e = new RequestException('foo', $request, $response); - $ev = new ErrorEvent($t, $e); - $h = new History(2); - $h->onError($ev); - // Only tracks when no response is present - $this->assertEquals([], $h->getRequests()); - } - - public function testLogsConnectionErrors() - { - $request = new Request('GET', '/'); - $t = new Transaction(new Client(), $request); - $e = new RequestException('foo', $request); - $ev = new ErrorEvent($t, $e); - $h = new History(); - $h->onError($ev); - $this->assertEquals([$request], $h->getRequests()); - } - - public function testMaintainsLimitValue() - { - $request = new Request('GET', '/'); - $response = new Response(200); - $t = new Transaction(new Client(), $request); - $t->response = $response; - $ev = new CompleteEvent($t); - $h = new History(2); - $h->onComplete($ev); - $h->onComplete($ev); - $h->onComplete($ev); - $this->assertEquals(2, count($h)); - $this->assertSame($request, $h->getLastRequest()); - $this->assertSame($response, $h->getLastResponse()); - foreach ($h as $trans) { - $this->assertInstanceOf('GuzzleHttp\Message\RequestInterface', $trans['request']); - $this->assertInstanceOf('GuzzleHttp\Message\ResponseInterface', $trans['response']); - } - return $h; - } - - /** - * @depends testMaintainsLimitValue - */ - public function testClearsHistory($h) - { - $this->assertEquals(2, count($h)); - $h->clear(); - $this->assertEquals(0, count($h)); - } - - public function testWorksWithMock() - { - $client = new Client(['base_url' => 'http://localhost/']); - $h = new History(); - $client->getEmitter()->attach($h); - $mock = new Mock([new Response(200), new Response(201), new Response(202)]); - $client->getEmitter()->attach($mock); - $request = $client->createRequest('GET', '/'); - $client->send($request); - $request->setMethod('PUT'); - $client->send($request); - $request->setMethod('POST'); - $client->send($request); - $this->assertEquals(3, count($h)); - - $result = implode("\n", array_map(function ($line) { - return strpos($line, 'User-Agent') === 0 - ? 'User-Agent:' - : trim($line); - }, explode("\n", $h))); - - $this->assertEquals("> GET / HTTP/1.1 -Host: localhost -User-Agent: - -< HTTP/1.1 200 OK - -> PUT / HTTP/1.1 -Host: localhost -User-Agent: - -< HTTP/1.1 201 Created - -> POST / HTTP/1.1 -Host: localhost -User-Agent: - -< HTTP/1.1 202 Accepted -", $result); - } - - public function testCanCastToString() - { - $client = new Client(['base_url' => 'http://localhost/']); - $h = new History(); - $client->getEmitter()->attach($h); - - $mock = new Mock(array( - new Response(301, array('Location' => '/redirect1', 'Content-Length' => 0)), - new Response(307, array('Location' => '/redirect2', 'Content-Length' => 0)), - new Response(200, array('Content-Length' => '2'), Stream::factory('HI')) - )); - - $client->getEmitter()->attach($mock); - $request = $client->createRequest('GET', '/'); - $client->send($request); - $this->assertEquals(3, count($h)); - - $h = str_replace("\r", '', $h); - $this->assertContains("> GET / HTTP/1.1\nHost: localhost\nUser-Agent:", $h); - $this->assertContains("< HTTP/1.1 301 Moved Permanently\nLocation: /redirect1", $h); - $this->assertContains("< HTTP/1.1 307 Temporary Redirect\nLocation: /redirect2", $h); - $this->assertContains("< HTTP/1.1 200 OK\nContent-Length: 2\n\nHI", $h); - } -} diff --git a/core/vendor/guzzlehttp/guzzle/tests/Subscriber/HttpErrorTest.php b/core/vendor/guzzlehttp/guzzle/tests/Subscriber/HttpErrorTest.php deleted file mode 100644 index b026634..0000000 --- a/core/vendor/guzzlehttp/guzzle/tests/Subscriber/HttpErrorTest.php +++ /dev/null @@ -1,60 +0,0 @@ -getEvent(); - $event->intercept(new Response(200)); - (new HttpError())->onComplete($event); - } - - /** - * @expectedException \GuzzleHttp\Exception\ClientException - */ - public function testThrowsClientExceptionOnFailure() - { - $event = $this->getEvent(); - $event->intercept(new Response(403)); - (new HttpError())->onComplete($event); - } - - /** - * @expectedException \GuzzleHttp\Exception\ServerException - */ - public function testThrowsServerExceptionOnFailure() - { - $event = $this->getEvent(); - $event->intercept(new Response(500)); - (new HttpError())->onComplete($event); - } - - private function getEvent() - { - return new CompleteEvent(new Transaction(new Client(), new Request('PUT', '/'))); - } - - /** - * @expectedException \GuzzleHttp\Exception\ClientException - */ - public function testFullTransaction() - { - $client = new Client(); - $client->getEmitter()->attach(new Mock([ - new Response(403) - ])); - $client->get('http://httpbin.org'); - } -} diff --git a/core/vendor/guzzlehttp/guzzle/tests/Subscriber/MockTest.php b/core/vendor/guzzlehttp/guzzle/tests/Subscriber/MockTest.php deleted file mode 100644 index 5e82093..0000000 --- a/core/vendor/guzzlehttp/guzzle/tests/Subscriber/MockTest.php +++ /dev/null @@ -1,192 +0,0 @@ -promise(), - function () use ($deferred, $wait) { - $deferred->resolve($wait()); - }, - $cancel - ); - } - - public function testDescribesSubscribedEvents() - { - $mock = new Mock(); - $this->assertInternalType('array', $mock->getEvents()); - } - - public function testIsCountable() - { - $plugin = new Mock(); - $plugin->addResponse((new MessageFactory())->fromMessage("HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n")); - $this->assertEquals(1, count($plugin)); - } - - public function testCanClearQueue() - { - $plugin = new Mock(); - $plugin->addResponse((new MessageFactory())->fromMessage("HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n")); - $plugin->clearQueue(); - $this->assertEquals(0, count($plugin)); - } - - public function testRetrievesResponsesFromFiles() - { - $tmp = tempnam('/tmp', 'tfile'); - file_put_contents($tmp, "HTTP/1.1 201 OK\r\nContent-Length: 0\r\n\r\n"); - $plugin = new Mock(); - $plugin->addResponse($tmp); - unlink($tmp); - $this->assertEquals(1, count($plugin)); - $q = $this->readAttribute($plugin, 'queue'); - $this->assertEquals(201, $q[0]->getStatusCode()); - } - - /** - * @expectedException \InvalidArgumentException - */ - public function testThrowsExceptionWhenInvalidResponse() - { - (new Mock())->addResponse(false); - } - - public function testAddsMockResponseToRequestFromClient() - { - $response = new Response(200); - $t = new Transaction(new Client(), new Request('GET', '/')); - $m = new Mock([$response]); - $ev = new BeforeEvent($t); - $m->onBefore($ev); - $this->assertSame($response, $t->response); - } - - /** - * @expectedException \OutOfBoundsException - */ - public function testUpdateThrowsExceptionWhenEmpty() - { - $p = new Mock(); - $ev = new BeforeEvent(new Transaction(new Client(), new Request('GET', '/'))); - $p->onBefore($ev); - } - - public function testReadsBodiesFromMockedRequests() - { - $m = new Mock([new Response(200)]); - $client = new Client(['base_url' => 'http://test.com']); - $client->getEmitter()->attach($m); - $body = Stream::factory('foo'); - $client->put('/', ['body' => $body]); - $this->assertEquals(3, $body->tell()); - } - - public function testCanMockBadRequestExceptions() - { - $client = new Client(['base_url' => 'http://test.com']); - $request = $client->createRequest('GET', '/'); - $ex = new RequestException('foo', $request); - $mock = new Mock([$ex]); - $this->assertCount(1, $mock); - $request->getEmitter()->attach($mock); - - try { - $client->send($request); - $this->fail('Did not dequeue an exception'); - } catch (RequestException $e) { - $this->assertSame($e, $ex); - $this->assertSame($request, $ex->getRequest()); - } - } - - public function testCanMockFutureResponses() - { - $client = new Client(['base_url' => 'http://test.com']); - $request = $client->createRequest('GET', '/', ['future' => true]); - $response = new Response(200); - $future = self::createFuture(function () use ($response) { - return $response; - }); - $mock = new Mock([$future]); - $this->assertCount(1, $mock); - $request->getEmitter()->attach($mock); - $res = $client->send($request); - $this->assertSame($future, $res); - $this->assertFalse($this->readAttribute($res, 'isRealized')); - $this->assertSame($response, $res->wait()); - } - - public function testCanMockExceptionFutureResponses() - { - $client = new Client(['base_url' => 'http://test.com']); - $request = $client->createRequest('GET', '/', ['future' => true]); - $future = self::createFuture(function () use ($request) { - throw new RequestException('foo', $request); - }); - - $mock = new Mock([$future]); - $request->getEmitter()->attach($mock); - $response = $client->send($request); - $this->assertSame($future, $response); - $this->assertFalse($this->readAttribute($response, 'isRealized')); - - try { - $response->wait(); - $this->fail('Did not throw'); - } catch (RequestException $e) { - $this->assertContains('foo', $e->getMessage()); - } - } - - public function testCanMockFailedFutureResponses() - { - $client = new Client(['base_url' => 'http://test.com']); - $request = $client->createRequest('GET', '/', ['future' => true]); - - // The first mock will be a mocked future response. - $future = self::createFuture(function () use ($client) { - // When dereferenced, we will set a mocked response and send - // another request. - $client->get('http://httpbin.org', ['events' => [ - 'before' => function (BeforeEvent $e) { - $e->intercept(new Response(404)); - } - ]]); - }); - - $mock = new Mock([$future]); - $request->getEmitter()->attach($mock); - $response = $client->send($request); - $this->assertSame($future, $response); - $this->assertFalse($this->readAttribute($response, 'isRealized')); - - try { - $response->wait(); - $this->fail('Did not throw'); - } catch (RequestException $e) { - $this->assertEquals(404, $e->getResponse()->getStatusCode()); - } - } -} diff --git a/core/vendor/guzzlehttp/guzzle/tests/Subscriber/PrepareTest.php b/core/vendor/guzzlehttp/guzzle/tests/Subscriber/PrepareTest.php deleted file mode 100644 index d07fdb4..0000000 --- a/core/vendor/guzzlehttp/guzzle/tests/Subscriber/PrepareTest.php +++ /dev/null @@ -1,213 +0,0 @@ -getTrans(); - $s->onBefore(new BeforeEvent($t)); - $this->assertFalse($t->request->hasHeader('Expect')); - } - - public function testAppliesPostBody() - { - $s = new Prepare(); - $t = $this->getTrans(); - $p = $this->getMockBuilder('GuzzleHttp\Post\PostBody') - ->setMethods(['applyRequestHeaders']) - ->getMockForAbstractClass(); - $p->expects($this->once()) - ->method('applyRequestHeaders'); - $t->request->setBody($p); - $s->onBefore(new BeforeEvent($t)); - } - - public function testAddsExpectHeaderWithTrue() - { - $s = new Prepare(); - $t = $this->getTrans(); - $t->request->getConfig()->set('expect', true); - $t->request->setBody(Stream::factory('foo')); - $s->onBefore(new BeforeEvent($t)); - $this->assertEquals('100-Continue', $t->request->getHeader('Expect')); - } - - public function testAddsExpectHeaderBySize() - { - $s = new Prepare(); - $t = $this->getTrans(); - $t->request->getConfig()->set('expect', 2); - $t->request->setBody(Stream::factory('foo')); - $s->onBefore(new BeforeEvent($t)); - $this->assertTrue($t->request->hasHeader('Expect')); - } - - public function testDoesNotModifyExpectHeaderIfPresent() - { - $s = new Prepare(); - $t = $this->getTrans(); - $t->request->setHeader('Expect', 'foo'); - $t->request->setBody(Stream::factory('foo')); - $s->onBefore(new BeforeEvent($t)); - $this->assertEquals('foo', $t->request->getHeader('Expect')); - } - - public function testDoesAddExpectHeaderWhenSetToFalse() - { - $s = new Prepare(); - $t = $this->getTrans(); - $t->request->getConfig()->set('expect', false); - $t->request->setBody(Stream::factory('foo')); - $s->onBefore(new BeforeEvent($t)); - $this->assertFalse($t->request->hasHeader('Expect')); - } - - public function testDoesNotAddExpectHeaderBySize() - { - $s = new Prepare(); - $t = $this->getTrans(); - $t->request->getConfig()->set('expect', 10); - $t->request->setBody(Stream::factory('foo')); - $s->onBefore(new BeforeEvent($t)); - $this->assertFalse($t->request->hasHeader('Expect')); - } - - public function testAddsExpectHeaderForNonSeekable() - { - $s = new Prepare(); - $t = $this->getTrans(); - $t->request->setBody(new NoSeekStream(Stream::factory('foo'))); - $s->onBefore(new BeforeEvent($t)); - $this->assertTrue($t->request->hasHeader('Expect')); - } - - public function testRemovesContentLengthWhenSendingWithChunked() - { - $s = new Prepare(); - $t = $this->getTrans(); - $t->request->setBody(Stream::factory('foo')); - $t->request->setHeader('Transfer-Encoding', 'chunked'); - $s->onBefore(new BeforeEvent($t)); - $this->assertFalse($t->request->hasHeader('Content-Length')); - } - - public function testUsesProvidedContentLengthAndRemovesXferEncoding() - { - $s = new Prepare(); - $t = $this->getTrans(); - $t->request->setBody(Stream::factory('foo')); - $t->request->setHeader('Content-Length', '3'); - $t->request->setHeader('Transfer-Encoding', 'chunked'); - $s->onBefore(new BeforeEvent($t)); - $this->assertEquals(3, $t->request->getHeader('Content-Length')); - $this->assertFalse($t->request->hasHeader('Transfer-Encoding')); - } - - public function testSetsContentTypeIfPossibleFromStream() - { - $body = $this->getMockBody(); - $sub = new Prepare(); - $t = $this->getTrans(); - $t->request->setBody($body); - $sub->onBefore(new BeforeEvent($t)); - $this->assertEquals( - 'image/jpeg', - $t->request->getHeader('Content-Type') - ); - $this->assertEquals(4, $t->request->getHeader('Content-Length')); - } - - public function testDoesNotOverwriteExistingContentType() - { - $s = new Prepare(); - $t = $this->getTrans(); - $t->request->setBody($this->getMockBody()); - $t->request->setHeader('Content-Type', 'foo/baz'); - $s->onBefore(new BeforeEvent($t)); - $this->assertEquals( - 'foo/baz', - $t->request->getHeader('Content-Type') - ); - } - - public function testSetsContentLengthIfPossible() - { - $s = new Prepare(); - $t = $this->getTrans(); - $t->request->setBody($this->getMockBody()); - $s->onBefore(new BeforeEvent($t)); - $this->assertEquals(4, $t->request->getHeader('Content-Length')); - } - - public function testSetsTransferEncodingChunkedIfNeeded() - { - $r = new Request('PUT', '/'); - $s = $this->getMockBuilder('GuzzleHttp\Stream\StreamInterface') - ->setMethods(['getSize']) - ->getMockForAbstractClass(); - $s->expects($this->exactly(2)) - ->method('getSize') - ->will($this->returnValue(null)); - $r->setBody($s); - $t = $this->getTrans($r); - $s = new Prepare(); - $s->onBefore(new BeforeEvent($t)); - $this->assertEquals('chunked', $r->getHeader('Transfer-Encoding')); - } - - public function testContentLengthIntegrationTest() - { - Server::flush(); - Server::enqueue([new Response(200)]); - $client = new Client(['base_url' => Server::$url]); - $this->assertEquals(200, $client->put('/', [ - 'body' => 'test' - ])->getStatusCode()); - $request = Server::received(true)[0]; - $this->assertEquals('PUT', $request->getMethod()); - $this->assertEquals('4', $request->getHeader('Content-Length')); - $this->assertEquals('test', (string) $request->getBody()); - } - - private function getTrans($request = null) - { - return new Transaction( - new Client(), - $request ?: new Request('PUT', '/') - ); - } - - /** - * @return \GuzzleHttp\Stream\StreamInterface - */ - private function getMockBody() - { - $s = $this->getMockBuilder('GuzzleHttp\Stream\MetadataStreamInterface') - ->setMethods(['getMetadata', 'getSize']) - ->getMockForAbstractClass(); - $s->expects($this->any()) - ->method('getMetadata') - ->with('uri') - ->will($this->returnValue('/foo/baz/bar.jpg')); - $s->expects($this->exactly(2)) - ->method('getSize') - ->will($this->returnValue(4)); - - return $s; - } -} diff --git a/core/vendor/guzzlehttp/guzzle/tests/Subscriber/RedirectTest.php b/core/vendor/guzzlehttp/guzzle/tests/Subscriber/RedirectTest.php deleted file mode 100644 index 168b605..0000000 --- a/core/vendor/guzzlehttp/guzzle/tests/Subscriber/RedirectTest.php +++ /dev/null @@ -1,269 +0,0 @@ -addMultiple([ - "HTTP/1.1 301 Moved Permanently\r\nLocation: /redirect1\r\nContent-Length: 0\r\n\r\n", - "HTTP/1.1 301 Moved Permanently\r\nLocation: /redirect2\r\nContent-Length: 0\r\n\r\n", - "HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n", - ]); - - $client = new Client(['base_url' => 'http://test.com']); - $client->getEmitter()->attach($history); - $client->getEmitter()->attach($mock); - - $request = $client->createRequest('GET', '/foo'); - // Ensure "end" is called only once - $called = 0; - $request->getEmitter()->on('end', function () use (&$called) { - $called++; - }); - $response = $client->send($request); - - $this->assertEquals(200, $response->getStatusCode()); - $this->assertContains('/redirect2', $response->getEffectiveUrl()); - - // Ensure that two requests were sent - $requests = $history->getRequests(true); - - $this->assertEquals('/foo', $requests[0]->getPath()); - $this->assertEquals('GET', $requests[0]->getMethod()); - $this->assertEquals('/redirect1', $requests[1]->getPath()); - $this->assertEquals('GET', $requests[1]->getMethod()); - $this->assertEquals('/redirect2', $requests[2]->getPath()); - $this->assertEquals('GET', $requests[2]->getMethod()); - - $this->assertEquals(1, $called); - } - - /** - * @expectedException \GuzzleHttp\Exception\TooManyRedirectsException - * @expectedExceptionMessage Will not follow more than - */ - public function testCanLimitNumberOfRedirects() - { - $mock = new Mock([ - "HTTP/1.1 301 Moved Permanently\r\nLocation: /redirect1\r\nContent-Length: 0\r\n\r\n", - "HTTP/1.1 301 Moved Permanently\r\nLocation: /redirect2\r\nContent-Length: 0\r\n\r\n", - "HTTP/1.1 301 Moved Permanently\r\nLocation: /redirect3\r\nContent-Length: 0\r\n\r\n", - "HTTP/1.1 301 Moved Permanently\r\nLocation: /redirect4\r\nContent-Length: 0\r\n\r\n", - "HTTP/1.1 301 Moved Permanently\r\nLocation: /redirect5\r\nContent-Length: 0\r\n\r\n", - "HTTP/1.1 301 Moved Permanently\r\nLocation: /redirect6\r\nContent-Length: 0\r\n\r\n" - ]); - $client = new Client(); - $client->getEmitter()->attach($mock); - $client->get('http://www.example.com/foo'); - } - - public function testDefaultBehaviorIsToRedirectWithGetForEntityEnclosingRequests() - { - $h = new History(); - $mock = new Mock([ - "HTTP/1.1 301 Moved Permanently\r\nLocation: /redirect\r\nContent-Length: 0\r\n\r\n", - "HTTP/1.1 301 Moved Permanently\r\nLocation: /redirect\r\nContent-Length: 0\r\n\r\n", - "HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n", - ]); - $client = new Client(); - $client->getEmitter()->attach($mock); - $client->getEmitter()->attach($h); - $client->post('http://test.com/foo', [ - 'headers' => ['X-Baz' => 'bar'], - 'body' => 'testing' - ]); - - $requests = $h->getRequests(true); - $this->assertEquals('POST', $requests[0]->getMethod()); - $this->assertEquals('GET', $requests[1]->getMethod()); - $this->assertEquals('bar', (string) $requests[1]->getHeader('X-Baz')); - $this->assertEquals('GET', $requests[2]->getMethod()); - } - - public function testCanRedirectWithStrictRfcCompliance() - { - $h = new History(); - $mock = new Mock([ - "HTTP/1.1 301 Moved Permanently\r\nLocation: /redirect\r\nContent-Length: 0\r\n\r\n", - "HTTP/1.1 301 Moved Permanently\r\nLocation: /redirect\r\nContent-Length: 0\r\n\r\n", - "HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n", - ]); - $client = new Client(['base_url' => 'http://test.com']); - $client->getEmitter()->attach($mock); - $client->getEmitter()->attach($h); - $client->post('/foo', [ - 'headers' => ['X-Baz' => 'bar'], - 'body' => 'testing', - 'allow_redirects' => ['max' => 10, 'strict' => true] - ]); - - $requests = $h->getRequests(true); - $this->assertEquals('POST', $requests[0]->getMethod()); - $this->assertEquals('POST', $requests[1]->getMethod()); - $this->assertEquals('bar', (string) $requests[1]->getHeader('X-Baz')); - $this->assertEquals('POST', $requests[2]->getMethod()); - } - - public function testRewindsStreamWhenRedirectingIfNeeded() - { - $h = new History(); - $mock = new Mock([ - "HTTP/1.1 301 Moved Permanently\r\nLocation: /redirect\r\nContent-Length: 0\r\n\r\n", - "HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n", - ]); - $client = new Client(['base_url' => 'http://test.com']); - $client->getEmitter()->attach($mock); - $client->getEmitter()->attach($h); - - $body = $this->getMockBuilder('GuzzleHttp\Stream\StreamInterface') - ->setMethods(['seek', 'read', 'eof', 'tell']) - ->getMockForAbstractClass(); - $body->expects($this->once())->method('tell')->will($this->returnValue(1)); - $body->expects($this->once())->method('seek')->will($this->returnValue(true)); - $body->expects($this->any())->method('eof')->will($this->returnValue(true)); - $body->expects($this->any())->method('read')->will($this->returnValue('foo')); - $client->post('/foo', [ - 'body' => $body, - 'allow_redirects' => ['max' => 5, 'strict' => true] - ]); - } - - /** - * @expectedException \GuzzleHttp\Exception\CouldNotRewindStreamException - * @expectedExceptionMessage Unable to rewind the non-seekable request body after redirecting - */ - public function testThrowsExceptionWhenStreamCannotBeRewound() - { - $h = new History(); - $mock = new Mock([ - "HTTP/1.1 301 Moved Permanently\r\nLocation: /redirect\r\nContent-Length: 0\r\n\r\n", - "HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n", - ]); - $client = new Client(); - $client->getEmitter()->attach($mock); - $client->getEmitter()->attach($h); - - $body = $this->getMockBuilder('GuzzleHttp\Stream\StreamInterface') - ->setMethods(['seek', 'read', 'eof', 'tell']) - ->getMockForAbstractClass(); - $body->expects($this->once())->method('tell')->will($this->returnValue(1)); - $body->expects($this->once())->method('seek')->will($this->returnValue(false)); - $body->expects($this->any())->method('eof')->will($this->returnValue(true)); - $body->expects($this->any())->method('read')->will($this->returnValue('foo')); - $client->post('http://example.com/foo', [ - 'body' => $body, - 'allow_redirects' => ['max' => 10, 'strict' => true] - ]); - } - - public function testRedirectsCanBeDisabledPerRequest() - { - $client = new Client(['base_url' => 'http://test.com']); - $client->getEmitter()->attach(new Mock([ - "HTTP/1.1 301 Moved Permanently\r\nLocation: /redirect\r\nContent-Length: 0\r\n\r\n", - "HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n", - ])); - $response = $client->put('/', ['body' => 'test', 'allow_redirects' => false]); - $this->assertEquals(301, $response->getStatusCode()); - } - - public function testCanRedirectWithNoLeadingSlashAndQuery() - { - $h = new History(); - $client = new Client(['base_url' => 'http://www.foo.com']); - $client->getEmitter()->attach(new Mock([ - "HTTP/1.1 301 Moved Permanently\r\nLocation: /redirect?foo=bar\r\nContent-Length: 0\r\n\r\n", - "HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n", - ])); - $client->getEmitter()->attach($h); - $client->get('?foo=bar'); - $requests = $h->getRequests(true); - $this->assertEquals('http://www.foo.com?foo=bar', $requests[0]->getUrl()); - $this->assertEquals('http://www.foo.com/redirect?foo=bar', $requests[1]->getUrl()); - } - - public function testHandlesRedirectsWithSpacesProperly() - { - $client = new Client(['base_url' => 'http://www.foo.com']); - $client->getEmitter()->attach(new Mock([ - "HTTP/1.1 301 Moved Permanently\r\nLocation: /redirect 1\r\nContent-Length: 0\r\n\r\n", - "HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n" - ])); - $h = new History(); - $client->getEmitter()->attach($h); - $client->get('/foo'); - $reqs = $h->getRequests(true); - $this->assertEquals('/redirect%201', $reqs[1]->getResource()); - } - - public function testAddsRefererWhenPossible() - { - $client = new Client(['base_url' => 'http://www.foo.com']); - $client->getEmitter()->attach(new Mock([ - "HTTP/1.1 301 Moved Permanently\r\nLocation: /bar\r\nContent-Length: 0\r\n\r\n", - "HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n" - ])); - $h = new History(); - $client->getEmitter()->attach($h); - $client->get('/foo', ['allow_redirects' => ['max' => 5, 'referer' => true]]); - $reqs = $h->getRequests(true); - $this->assertEquals('http://www.foo.com/foo', $reqs[1]->getHeader('Referer')); - } - - public function testDoesNotAddRefererWhenChangingProtocols() - { - $client = new Client(['base_url' => 'https://www.foo.com']); - $client->getEmitter()->attach(new Mock([ - "HTTP/1.1 301 Moved Permanently\r\n" - . "Location: http://www.foo.com/foo\r\n" - . "Content-Length: 0\r\n\r\n", - "HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n" - ])); - $h = new History(); - $client->getEmitter()->attach($h); - $client->get('/foo', ['allow_redirects' => ['max' => 5, 'referer' => true]]); - $reqs = $h->getRequests(true); - $this->assertFalse($reqs[1]->hasHeader('Referer')); - } - - public function testRedirectsWithGetOn303() - { - $h = new History(); - $mock = new Mock([ - "HTTP/1.1 303 Moved Permanently\r\nLocation: /redirect\r\nContent-Length: 0\r\n\r\n", - "HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n", - ]); - $client = new Client(); - $client->getEmitter()->attach($mock); - $client->getEmitter()->attach($h); - $client->post('http://test.com/foo', ['body' => 'testing']); - $requests = $h->getRequests(true); - $this->assertEquals('POST', $requests[0]->getMethod()); - $this->assertEquals('GET', $requests[1]->getMethod()); - } - - public function testRelativeLinkBasedLatestRequest() - { - $client = new Client(['base_url' => 'http://www.foo.com']); - $client->getEmitter()->attach(new Mock([ - "HTTP/1.1 301 Moved Permanently\r\nLocation: http://www.bar.com\r\nContent-Length: 0\r\n\r\n", - "HTTP/1.1 301 Moved Permanently\r\nLocation: /redirect\r\nContent-Length: 0\r\n\r\n", - "HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n" - ])); - $response = $client->get('/'); - $this->assertEquals( - 'http://www.bar.com/redirect', - $response->getEffectiveUrl() - ); - } -} diff --git a/core/vendor/guzzlehttp/guzzle/tests/TransactionTest.php b/core/vendor/guzzlehttp/guzzle/tests/TransactionTest.php deleted file mode 100644 index 42965b1..0000000 --- a/core/vendor/guzzlehttp/guzzle/tests/TransactionTest.php +++ /dev/null @@ -1,22 +0,0 @@ -assertSame($client, $t->client); - $this->assertSame($request, $t->request); - $response = new Response(200); - $t->response = $response; - $this->assertSame($response, $t->response); - } -} diff --git a/core/vendor/guzzlehttp/guzzle/tests/UriTemplateTest.php b/core/vendor/guzzlehttp/guzzle/tests/UriTemplateTest.php deleted file mode 100644 index 3f7a7f0..0000000 --- a/core/vendor/guzzlehttp/guzzle/tests/UriTemplateTest.php +++ /dev/null @@ -1,202 +0,0 @@ - 'value', - 'hello' => 'Hello World!', - 'empty' => '', - 'path' => '/foo/bar', - 'x' => '1024', - 'y' => '768', - 'null' => null, - 'list' => array('red', 'green', 'blue'), - 'keys' => array( - "semi" => ';', - "dot" => '.', - "comma" => ',' - ), - 'empty_keys' => array(), - ); - - return array_map(function ($t) use ($params) { - $t[] = $params; - return $t; - }, array( - array('foo', 'foo'), - array('{var}', 'value'), - array('{hello}', 'Hello%20World%21'), - array('{+var}', 'value'), - array('{+hello}', 'Hello%20World!'), - array('{+path}/here', '/foo/bar/here'), - array('here?ref={+path}', 'here?ref=/foo/bar'), - array('X{#var}', 'X#value'), - array('X{#hello}', 'X#Hello%20World!'), - array('map?{x,y}', 'map?1024,768'), - array('{x,hello,y}', '1024,Hello%20World%21,768'), - array('{+x,hello,y}', '1024,Hello%20World!,768'), - array('{+path,x}/here', '/foo/bar,1024/here'), - array('{#x,hello,y}', '#1024,Hello%20World!,768'), - array('{#path,x}/here', '#/foo/bar,1024/here'), - array('X{.var}', 'X.value'), - array('X{.x,y}', 'X.1024.768'), - array('{/var}', '/value'), - array('{/var,x}/here', '/value/1024/here'), - array('{;x,y}', ';x=1024;y=768'), - array('{;x,y,empty}', ';x=1024;y=768;empty'), - array('{?x,y}', '?x=1024&y=768'), - array('{?x,y,empty}', '?x=1024&y=768&empty='), - array('?fixed=yes{&x}', '?fixed=yes&x=1024'), - array('{&x,y,empty}', '&x=1024&y=768&empty='), - array('{var:3}', 'val'), - array('{var:30}', 'value'), - array('{list}', 'red,green,blue'), - array('{list*}', 'red,green,blue'), - array('{keys}', 'semi,%3B,dot,.,comma,%2C'), - array('{keys*}', 'semi=%3B,dot=.,comma=%2C'), - array('{+path:6}/here', '/foo/b/here'), - array('{+list}', 'red,green,blue'), - array('{+list*}', 'red,green,blue'), - array('{+keys}', 'semi,;,dot,.,comma,,'), - array('{+keys*}', 'semi=;,dot=.,comma=,'), - array('{#path:6}/here', '#/foo/b/here'), - array('{#list}', '#red,green,blue'), - array('{#list*}', '#red,green,blue'), - array('{#keys}', '#semi,;,dot,.,comma,,'), - array('{#keys*}', '#semi=;,dot=.,comma=,'), - array('X{.var:3}', 'X.val'), - array('X{.list}', 'X.red,green,blue'), - array('X{.list*}', 'X.red.green.blue'), - array('X{.keys}', 'X.semi,%3B,dot,.,comma,%2C'), - array('X{.keys*}', 'X.semi=%3B.dot=..comma=%2C'), - array('{/var:1,var}', '/v/value'), - array('{/list}', '/red,green,blue'), - array('{/list*}', '/red/green/blue'), - array('{/list*,path:4}', '/red/green/blue/%2Ffoo'), - array('{/keys}', '/semi,%3B,dot,.,comma,%2C'), - array('{/keys*}', '/semi=%3B/dot=./comma=%2C'), - array('{;hello:5}', ';hello=Hello'), - array('{;list}', ';list=red,green,blue'), - array('{;list*}', ';list=red;list=green;list=blue'), - array('{;keys}', ';keys=semi,%3B,dot,.,comma,%2C'), - array('{;keys*}', ';semi=%3B;dot=.;comma=%2C'), - array('{?var:3}', '?var=val'), - array('{?list}', '?list=red,green,blue'), - array('{?list*}', '?list=red&list=green&list=blue'), - array('{?keys}', '?keys=semi,%3B,dot,.,comma,%2C'), - array('{?keys*}', '?semi=%3B&dot=.&comma=%2C'), - array('{&var:3}', '&var=val'), - array('{&list}', '&list=red,green,blue'), - array('{&list*}', '&list=red&list=green&list=blue'), - array('{&keys}', '&keys=semi,%3B,dot,.,comma,%2C'), - array('{&keys*}', '&semi=%3B&dot=.&comma=%2C'), - array('{.null}', ''), - array('{.null,var}', '.value'), - array('X{.empty_keys*}', 'X'), - array('X{.empty_keys}', 'X'), - // Test that missing expansions are skipped - array('test{&missing*}', 'test'), - // Test that multiple expansions can be set - array('http://{var}/{var:2}{?keys*}', 'http://value/va?semi=%3B&dot=.&comma=%2C'), - // Test more complex query string stuff - array('http://www.test.com{+path}{?var,keys*}', 'http://www.test.com/foo/bar?var=value&semi=%3B&dot=.&comma=%2C') - )); - } - - /** - * @dataProvider templateProvider - */ - public function testExpandsUriTemplates($template, $expansion, $params) - { - $uri = new UriTemplate($template); - $this->assertEquals($expansion, $uri->expand($template, $params)); - } - - public function expressionProvider() - { - return array( - array( - '{+var*}', array( - 'operator' => '+', - 'values' => array( - array('value' => 'var', 'modifier' => '*') - ) - ), - ), - array( - '{?keys,var,val}', array( - 'operator' => '?', - 'values' => array( - array('value' => 'keys', 'modifier' => ''), - array('value' => 'var', 'modifier' => ''), - array('value' => 'val', 'modifier' => '') - ) - ), - ), - array( - '{+x,hello,y}', array( - 'operator' => '+', - 'values' => array( - array('value' => 'x', 'modifier' => ''), - array('value' => 'hello', 'modifier' => ''), - array('value' => 'y', 'modifier' => '') - ) - ) - ) - ); - } - - /** - * @dataProvider expressionProvider - */ - public function testParsesExpressions($exp, $data) - { - $template = new UriTemplate($exp); - - // Access the config object - $class = new \ReflectionClass($template); - $method = $class->getMethod('parseExpression'); - $method->setAccessible(true); - - $exp = substr($exp, 1, -1); - $this->assertEquals($data, $method->invokeArgs($template, array($exp))); - } - - /** - * @ticket https://github.com/guzzle/guzzle/issues/90 - */ - public function testAllowsNestedArrayExpansion() - { - $template = new UriTemplate(); - - $result = $template->expand('http://example.com{+path}{/segments}{?query,data*,foo*}', array( - 'path' => '/foo/bar', - 'segments' => array('one', 'two'), - 'query' => 'test', - 'data' => array( - 'more' => array('fun', 'ice cream') - ), - 'foo' => array( - 'baz' => array( - 'bar' => 'fizz', - 'test' => 'buzz' - ), - 'bam' => 'boo' - ) - )); - - $this->assertEquals('http://example.com/foo/bar/one,two?query=test&more%5B0%5D=fun&more%5B1%5D=ice%20cream&baz%5Bbar%5D=fizz&baz%5Btest%5D=buzz&bam=boo', $result); - } -} diff --git a/core/vendor/guzzlehttp/guzzle/tests/UrlTest.php b/core/vendor/guzzlehttp/guzzle/tests/UrlTest.php deleted file mode 100644 index efd374c..0000000 --- a/core/vendor/guzzlehttp/guzzle/tests/UrlTest.php +++ /dev/null @@ -1,356 +0,0 @@ -assertEquals('', (string) $url); - } - - public function testPortIsDeterminedFromScheme() - { - $this->assertEquals(80, Url::fromString('http://www.test.com/')->getPort()); - $this->assertEquals(443, Url::fromString('https://www.test.com/')->getPort()); - $this->assertEquals(21, Url::fromString('ftp://www.test.com/')->getPort()); - $this->assertEquals(8192, Url::fromString('http://www.test.com:8192/')->getPort()); - $this->assertEquals(null, Url::fromString('foo://www.test.com/')->getPort()); - } - - public function testRemovesDefaultPortWhenSettingScheme() - { - $url = Url::fromString('http://www.test.com/'); - $url->setPort(80); - $url->setScheme('https'); - $this->assertEquals(443, $url->getPort()); - } - - public function testCloneCreatesNewInternalObjects() - { - $u1 = Url::fromString('http://www.test.com/'); - $u2 = clone $u1; - $this->assertNotSame($u1->getQuery(), $u2->getQuery()); - } - - public function testValidatesUrlPartsInFactory() - { - $url = Url::fromString('/index.php'); - $this->assertEquals('/index.php', (string) $url); - $this->assertFalse($url->isAbsolute()); - - $url = 'http://michael:test@test.com:80/path/123?q=abc#test'; - $u = Url::fromString($url); - $this->assertEquals('http://michael:test@test.com/path/123?q=abc#test', (string) $u); - $this->assertTrue($u->isAbsolute()); - } - - public function testAllowsFalsyUrlParts() - { - $url = Url::fromString('http://a:50/0?0#0'); - $this->assertSame('a', $url->getHost()); - $this->assertEquals(50, $url->getPort()); - $this->assertSame('/0', $url->getPath()); - $this->assertEquals('0', (string) $url->getQuery()); - $this->assertSame('0', $url->getFragment()); - $this->assertEquals('http://a:50/0?0#0', (string) $url); - - $url = Url::fromString(''); - $this->assertSame('', (string) $url); - - $url = Url::fromString('0'); - $this->assertSame('0', (string) $url); - } - - public function testBuildsRelativeUrlsWithFalsyParts() - { - $url = Url::buildUrl(['path' => '/0']); - $this->assertSame('/0', $url); - - $url = Url::buildUrl(['path' => '0']); - $this->assertSame('0', $url); - - $url = Url::buildUrl(['host' => '', 'path' => '0']); - $this->assertSame('0', $url); - } - - public function testUrlStoresParts() - { - $url = Url::fromString('http://test:pass@www.test.com:8081/path/path2/?a=1&b=2#fragment'); - $this->assertEquals('http', $url->getScheme()); - $this->assertEquals('test', $url->getUsername()); - $this->assertEquals('pass', $url->getPassword()); - $this->assertEquals('www.test.com', $url->getHost()); - $this->assertEquals(8081, $url->getPort()); - $this->assertEquals('/path/path2/', $url->getPath()); - $this->assertEquals('fragment', $url->getFragment()); - $this->assertEquals('a=1&b=2', (string) $url->getQuery()); - - $this->assertEquals(array( - 'fragment' => 'fragment', - 'host' => 'www.test.com', - 'pass' => 'pass', - 'path' => '/path/path2/', - 'port' => 8081, - 'query' => 'a=1&b=2', - 'scheme' => 'http', - 'user' => 'test' - ), $url->getParts()); - } - - public function testHandlesPathsCorrectly() - { - $url = Url::fromString('http://www.test.com'); - $this->assertEquals('', $url->getPath()); - $url->setPath('test'); - $this->assertEquals('test', $url->getPath()); - - $url->setPath('/test/123/abc'); - $this->assertEquals(array('', 'test', '123', 'abc'), $url->getPathSegments()); - - $parts = parse_url('http://www.test.com/test'); - $parts['path'] = ''; - $this->assertEquals('http://www.test.com', Url::buildUrl($parts)); - $parts['path'] = 'test'; - $this->assertEquals('http://www.test.com/test', Url::buildUrl($parts)); - } - - public function testAddsQueryIfPresent() - { - $this->assertEquals('?foo=bar', Url::buildUrl(array( - 'query' => 'foo=bar' - ))); - } - - public function testAddsToPath() - { - // Does nothing here - $url = Url::fromString('http://e.com/base?a=1'); - $url->addPath(false); - $this->assertEquals('http://e.com/base?a=1', $url); - $url = Url::fromString('http://e.com/base?a=1'); - $url->addPath(''); - $this->assertEquals('http://e.com/base?a=1', $url); - $url = Url::fromString('http://e.com/base?a=1'); - $url->addPath('/'); - $this->assertEquals('http://e.com/base?a=1', $url); - $url = Url::fromString('http://e.com/base'); - $url->addPath('0'); - $this->assertEquals('http://e.com/base/0', $url); - - $url = Url::fromString('http://e.com/base?a=1'); - $url->addPath('relative'); - $this->assertEquals('http://e.com/base/relative?a=1', $url); - $url = Url::fromString('http://e.com/base?a=1'); - $url->addPath('/relative'); - $this->assertEquals('http://e.com/base/relative?a=1', $url); - } - - /** - * URL combination data provider - * - * @return array - */ - public function urlCombineDataProvider() - { - return [ - // Specific test cases - ['http://www.example.com/', 'http://www.example.com/', 'http://www.example.com/'], - ['http://www.example.com/path', '/absolute', 'http://www.example.com/absolute'], - ['http://www.example.com/path', '/absolute?q=2', 'http://www.example.com/absolute?q=2'], - ['http://www.example.com/', '?q=1', 'http://www.example.com/?q=1'], - ['http://www.example.com/path', 'http://test.com', 'http://test.com'], - ['http://www.example.com:8080/path', 'http://test.com', 'http://test.com'], - ['http://www.example.com:8080/path', '?q=2#abc', 'http://www.example.com:8080/path?q=2#abc'], - ['http://www.example.com/path', 'http://u:a@www.example.com/', 'http://u:a@www.example.com/'], - ['/path?q=2', 'http://www.test.com/', 'http://www.test.com/path?q=2'], - ['http://api.flickr.com/services/', 'http://www.flickr.com/services/oauth/access_token', 'http://www.flickr.com/services/oauth/access_token'], - ['https://www.example.com/path', '//foo.com/abc', 'https://foo.com/abc'], - ['https://www.example.com/0/', 'relative/foo', 'https://www.example.com/0/relative/foo'], - ['', '0', '0'], - // RFC 3986 test cases - [self::RFC3986_BASE, 'g:h', 'g:h'], - [self::RFC3986_BASE, 'g', 'http://a/b/c/g'], - [self::RFC3986_BASE, './g', 'http://a/b/c/g'], - [self::RFC3986_BASE, 'g/', 'http://a/b/c/g/'], - [self::RFC3986_BASE, '/g', 'http://a/g'], - [self::RFC3986_BASE, '//g', 'http://g'], - [self::RFC3986_BASE, '?y', 'http://a/b/c/d;p?y'], - [self::RFC3986_BASE, 'g?y', 'http://a/b/c/g?y'], - [self::RFC3986_BASE, '#s', 'http://a/b/c/d;p?q#s'], - [self::RFC3986_BASE, 'g#s', 'http://a/b/c/g#s'], - [self::RFC3986_BASE, 'g?y#s', 'http://a/b/c/g?y#s'], - [self::RFC3986_BASE, ';x', 'http://a/b/c/;x'], - [self::RFC3986_BASE, 'g;x', 'http://a/b/c/g;x'], - [self::RFC3986_BASE, 'g;x?y#s', 'http://a/b/c/g;x?y#s'], - [self::RFC3986_BASE, '', self::RFC3986_BASE], - [self::RFC3986_BASE, '.', 'http://a/b/c/'], - [self::RFC3986_BASE, './', 'http://a/b/c/'], - [self::RFC3986_BASE, '..', 'http://a/b/'], - [self::RFC3986_BASE, '../', 'http://a/b/'], - [self::RFC3986_BASE, '../g', 'http://a/b/g'], - [self::RFC3986_BASE, '../..', 'http://a/'], - [self::RFC3986_BASE, '../../', 'http://a/'], - [self::RFC3986_BASE, '../../g', 'http://a/g'], - [self::RFC3986_BASE, '../../../g', 'http://a/g'], - [self::RFC3986_BASE, '../../../../g', 'http://a/g'], - [self::RFC3986_BASE, '/./g', 'http://a/g'], - [self::RFC3986_BASE, '/../g', 'http://a/g'], - [self::RFC3986_BASE, 'g.', 'http://a/b/c/g.'], - [self::RFC3986_BASE, '.g', 'http://a/b/c/.g'], - [self::RFC3986_BASE, 'g..', 'http://a/b/c/g..'], - [self::RFC3986_BASE, '..g', 'http://a/b/c/..g'], - [self::RFC3986_BASE, './../g', 'http://a/b/g'], - [self::RFC3986_BASE, 'foo////g', 'http://a/b/c/foo////g'], - [self::RFC3986_BASE, './g/.', 'http://a/b/c/g/'], - [self::RFC3986_BASE, 'g/./h', 'http://a/b/c/g/h'], - [self::RFC3986_BASE, 'g/../h', 'http://a/b/c/h'], - [self::RFC3986_BASE, 'g;x=1/./y', 'http://a/b/c/g;x=1/y'], - [self::RFC3986_BASE, 'g;x=1/../y', 'http://a/b/c/y'], - [self::RFC3986_BASE, 'http:g', 'http:g'], - ]; - } - - /** - * @dataProvider urlCombineDataProvider - */ - public function testCombinesUrls($a, $b, $c) - { - $this->assertEquals($c, (string) Url::fromString($a)->combine($b)); - } - - public function testHasGettersAndSetters() - { - $url = Url::fromString('http://www.test.com/'); - $url->setHost('example.com'); - $this->assertEquals('example.com', $url->getHost()); - $url->setPort(8080); - $this->assertEquals('8080', $url->getPort()); - $url->setPath('/foo/bar'); - $this->assertEquals('/foo/bar', $url->getPath()); - $url->setPassword('a'); - $this->assertEquals('a', $url->getPassword()); - $url->setUsername('b'); - $this->assertEquals('b', $url->getUsername()); - $url->setFragment('abc'); - $this->assertEquals('abc', $url->getFragment()); - $url->setScheme('https'); - $this->assertEquals('https', $url->getScheme()); - $url->setQuery('a=123'); - $this->assertEquals('a=123', (string) $url->getQuery()); - $this->assertEquals( - 'https://b:a@example.com:8080/foo/bar?a=123#abc', - (string) $url - ); - $url->setQuery(new Query(['b' => 'boo'])); - $this->assertEquals('b=boo', $url->getQuery()); - $this->assertEquals( - 'https://b:a@example.com:8080/foo/bar?b=boo#abc', - (string) $url - ); - - $url->setQuery('a%20=bar!', true); - $this->assertEquals( - 'https://b:a@example.com:8080/foo/bar?a%20=bar!#abc', - (string) $url - ); - } - - public function testSetQueryAcceptsArray() - { - $url = Url::fromString('http://www.test.com'); - $url->setQuery(array('a' => 'b')); - $this->assertEquals('http://www.test.com?a=b', (string) $url); - } - - /** - * @expectedException \InvalidArgumentException - */ - public function testQueryMustBeValid() - { - $url = Url::fromString('http://www.test.com'); - $url->setQuery(false); - } - - public function testDefersParsingAndEncodingQueryUntilNecessary() - { - $url = Url::fromString('http://www.test.com'); - // Note that invalid characters are encoded. - $url->setQuery('foo#bar/', true); - $this->assertEquals('http://www.test.com?foo%23bar/', (string) $url); - $this->assertInternalType('string', $this->readAttribute($url, 'query')); - $this->assertEquals('foo%23bar%2F', (string) $url->getQuery()); - $this->assertInstanceOf('GuzzleHttp\Query', $this->readAttribute($url, 'query')); - } - - public function urlProvider() - { - return array( - array('/foo/..', '/'), - array('//foo//..', '//foo/'), - array('/foo//', '/foo//'), - array('/foo/../..', '/'), - array('/foo/../.', '/'), - array('/./foo/..', '/'), - array('/./foo', '/foo'), - array('/./foo/', '/foo/'), - array('*', '*'), - array('/foo', '/foo'), - array('/abc/123/../foo/', '/abc/foo/'), - array('/a/b/c/./../../g', '/a/g'), - array('/b/c/./../../g', '/g'), - array('/b/c/./../../g', '/g'), - array('/c/./../../g', '/g'), - array('/./../../g', '/g'), - array('foo', 'foo'), - ); - } - - /** - * @dataProvider urlProvider - */ - public function testRemoveDotSegments($path, $result) - { - $url = Url::fromString('http://www.example.com'); - $url->setPath($path); - $url->removeDotSegments(); - $this->assertEquals($result, $url->getPath()); - } - - public function testSettingHostWithPortModifiesPort() - { - $url = Url::fromString('http://www.example.com'); - $url->setHost('foo:8983'); - $this->assertEquals('foo', $url->getHost()); - $this->assertEquals(8983, $url->getPort()); - } - - /** - * @expectedException \InvalidArgumentException - */ - public function testValidatesUrlCanBeParsed() - { - Url::fromString('foo:////'); - } - - public function testConvertsSpecialCharsInPathWhenCastingToString() - { - $url = Url::fromString('http://foo.com/baz bar?a=b'); - $url->addPath('?'); - $this->assertEquals('http://foo.com/baz%20bar/%3F?a=b', (string) $url); - } - - public function testCorrectlyEncodesPathWithoutDoubleEncoding() - { - $url = Url::fromString('http://foo.com/baz%20 bar:boo/baz!'); - $this->assertEquals('/baz%20%20bar:boo/baz!', $url->getPath()); - } -} diff --git a/core/vendor/guzzlehttp/guzzle/tests/UtilsTest.php b/core/vendor/guzzlehttp/guzzle/tests/UtilsTest.php deleted file mode 100644 index d9bdc07..0000000 --- a/core/vendor/guzzlehttp/guzzle/tests/UtilsTest.php +++ /dev/null @@ -1,34 +0,0 @@ -assertEquals( - 'foo/123', - Utils::uriTemplate('foo/{bar}', ['bar' => '123']) - ); - } - - public function noBodyProvider() - { - return [['get'], ['head'], ['delete']]; - } - - public function testJsonDecodes() - { - $this->assertTrue(Utils::jsonDecode('true')); - } - - /** - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage Unable to parse JSON data: JSON_ERROR_SYNTAX - Syntax error, malformed JSON - */ - public function testJsonDecodesWithErrorMessages() - { - Utils::jsonDecode('!narf!'); - } -} diff --git a/core/vendor/guzzlehttp/guzzle/tests/bootstrap.php b/core/vendor/guzzlehttp/guzzle/tests/bootstrap.php deleted file mode 100644 index 8713f96..0000000 --- a/core/vendor/guzzlehttp/guzzle/tests/bootstrap.php +++ /dev/null @@ -1,11 +0,0 @@ - Server::$url]); - -$t = microtime(true); -for ($i = 0; $i < $total; $i++) { - $client->get('/guzzle-server/perf'); -} -$totalTime = microtime(true) - $t; -$perRequest = ($totalTime / $total) * 1000; -printf("Serial: %f (%f ms / request) %d total\n", - $totalTime, $perRequest, $total); - -// Create a generator used to yield batches of requests -$reqs = function () use ($client, $total) { - for ($i = 0; $i < $total; $i++) { - yield $client->createRequest('GET', '/guzzle-server/perf'); - } -}; - -$t = microtime(true); -Pool::send($client, $reqs(), ['parallel' => $parallel]); -$totalTime = microtime(true) - $t; -$perRequest = ($totalTime / $total) * 1000; -printf("Batch: %f (%f ms / request) %d total with %d in parallel\n", - $totalTime, $perRequest, $total, $parallel); - -$handler = new CurlMultiHandler(['max_handles' => $parallel]); -$client = new Client(['handler' => $handler, 'base_url' => Server::$url]); -$t = microtime(true); -for ($i = 0; $i < $total; $i++) { - $client->get('/guzzle-server/perf'); -} -unset($client); -$totalTime = microtime(true) - $t; -$perRequest = ($totalTime / $total) * 1000; -printf("Future: %f (%f ms / request) %d total\n", - $totalTime, $perRequest, $total); diff --git a/core/vendor/guzzlehttp/ringphp/.gitignore b/core/vendor/guzzlehttp/ringphp/.gitignore deleted file mode 100644 index 290a945..0000000 --- a/core/vendor/guzzlehttp/ringphp/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -vendor -build/artifacts/ -composer.lock -docs/_build/ diff --git a/core/vendor/guzzlehttp/ringphp/.travis.yml b/core/vendor/guzzlehttp/ringphp/.travis.yml deleted file mode 100644 index 0befb17..0000000 --- a/core/vendor/guzzlehttp/ringphp/.travis.yml +++ /dev/null @@ -1,21 +0,0 @@ -language: php - -php: - - 5.4 - - 5.5 - - 5.6 - - hhvm - -before_script: - - composer self-update - - composer install --no-interaction --prefer-source --dev - - ~/.nvm/nvm.sh install v0.6.14 - - ~/.nvm/nvm.sh run v0.6.14 - -script: - - make test - -matrix: - allow_failures: - - php: hhvm - fast_finish: true diff --git a/core/vendor/guzzlehttp/ringphp/CHANGELOG.md b/core/vendor/guzzlehttp/ringphp/CHANGELOG.md deleted file mode 100644 index ee3ce79..0000000 --- a/core/vendor/guzzlehttp/ringphp/CHANGELOG.md +++ /dev/null @@ -1,22 +0,0 @@ -# CHANGELOG - -## 1.0.3 - 2014-11-03 - -* Setting the `header` stream option as a string to be compatible with GAE. -* Header parsing now ensures that header order is maintained in the parsed - message. - -## 1.0.2 - 2014-10-28 - -* Now correctly honoring a `version` option is supplied in a request. - See https://github.com/guzzle/RingPHP/pull/8 - -## 1.0.1 - 2014-10-26 - -* Fixed a header parsing issue with the `CurlHandler` and `CurlMultiHandler` - that caused cURL requests with multiple responses to merge repsonses together - (e.g., requests with digest authentication). - -## 1.0.0 - 2014-10-12 - -* Initial release. diff --git a/core/vendor/guzzlehttp/ringphp/LICENSE b/core/vendor/guzzlehttp/ringphp/LICENSE deleted file mode 100644 index 71d3b78..0000000 --- a/core/vendor/guzzlehttp/ringphp/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2014 Michael Dowling, https://github.com/mtdowling - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/core/vendor/guzzlehttp/ringphp/Makefile b/core/vendor/guzzlehttp/ringphp/Makefile deleted file mode 100644 index 21c812e..0000000 --- a/core/vendor/guzzlehttp/ringphp/Makefile +++ /dev/null @@ -1,46 +0,0 @@ -all: clean coverage docs - -docs: - cd docs && make html - -view-docs: - open docs/_build/html/index.html - -start-server: stop-server - node tests/Client/server.js &> /dev/null & - -stop-server: - @PID=$(shell ps axo pid,command \ - | grep 'tests/Client/server.js' \ - | grep -v grep \ - | cut -f 1 -d " "\ - ) && [ -n "$$PID" ] && kill $$PID || true - -test: start-server - vendor/bin/phpunit $(TEST) - $(MAKE) stop-server - -coverage: start-server - vendor/bin/phpunit --coverage-html=build/artifacts/coverage $(TEST) - $(MAKE) stop-server - -view-coverage: - open build/artifacts/coverage/index.html - -clean: - rm -rf build/artifacts/* - cd docs && make clean - -tag: - $(if $(TAG),,$(error TAG is not defined. Pass via "make tag TAG=4.2.1")) - @echo Tagging $(TAG) - chag update -m '$(TAG) ()' - git add -A - git commit -m '$(TAG) release' - chag tag - -perf: start-server - php tests/perf.php - $(MAKE) stop-server - -.PHONY: docs diff --git a/core/vendor/guzzlehttp/ringphp/README.rst b/core/vendor/guzzlehttp/ringphp/README.rst deleted file mode 100644 index 10374e8..0000000 --- a/core/vendor/guzzlehttp/ringphp/README.rst +++ /dev/null @@ -1,46 +0,0 @@ -======= -RingPHP -======= - -Provides a simple API and specification that abstracts away the details of HTTP -into a single PHP function. RingPHP be used to power HTTP clients and servers -through a PHP function that accepts a request hash and returns a response hash -that is fulfilled using a `promise `_, -allowing RingPHP to support both synchronous and asynchronous workflows. - -By abstracting the implementation details of different HTTP clients and -servers, RingPHP allows you to utilize pluggable HTTP clients and servers -without tying your application to a specific implementation. - -.. code-block:: php - - 'GET', - 'uri' => '/', - 'headers' => [ - 'host' => ['www.google.com'], - 'x-foo' => ['baz'] - ] - ]); - - $response->then(function (array $response) { - echo $response['status']; - }); - - $response->wait(); - -RingPHP is inspired by Clojure's `Ring `_, -which, in turn, was inspired by Python's WSGI and Ruby's Rack. RingPHP is -utilized as the handler layer in `Guzzle `_ 5.0+ to send -HTTP requests. - -Documentation -------------- - -See http://ringphp.readthedocs.org/ for the full online documentation. diff --git a/core/vendor/guzzlehttp/ringphp/composer.json b/core/vendor/guzzlehttp/ringphp/composer.json deleted file mode 100644 index 2d8849f..0000000 --- a/core/vendor/guzzlehttp/ringphp/composer.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "guzzlehttp/ringphp", - "license": "MIT", - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - } - ], - "require": { - "php": ">=5.4.0", - "guzzlehttp/streams": "~3.0", - "react/promise": "~2.0" - }, - "require-dev": { - "ext-curl": "*", - "phpunit/phpunit": "~4.0" - }, - "suggest": { - "ext-curl": "Guzzle will use specific adapters if cURL is present" - }, - "autoload": { - "psr-4": { - "GuzzleHttp\\Ring\\": "src/" - } - }, - "autoload-dev": { - "psr-4": { - "GuzzleHttp\\Tests\\Ring\\": "tests/" - } - }, - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - } -} diff --git a/core/vendor/guzzlehttp/ringphp/docs/Makefile b/core/vendor/guzzlehttp/ringphp/docs/Makefile deleted file mode 100644 index 51270aa..0000000 --- a/core/vendor/guzzlehttp/ringphp/docs/Makefile +++ /dev/null @@ -1,153 +0,0 @@ -# Makefile for Sphinx documentation -# - -# You can set these variables from the command line. -SPHINXOPTS = -SPHINXBUILD = sphinx-build -PAPER = -BUILDDIR = _build - -# Internal variables. -PAPEROPT_a4 = -D latex_paper_size=a4 -PAPEROPT_letter = -D latex_paper_size=letter -ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . -# the i18n builder cannot share the environment and doctrees with the others -I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . - -.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext - -help: - @echo "Please use \`make ' where is one of" - @echo " html to make standalone HTML files" - @echo " dirhtml to make HTML files named index.html in directories" - @echo " singlehtml to make a single large HTML file" - @echo " pickle to make pickle files" - @echo " json to make JSON files" - @echo " htmlhelp to make HTML files and a HTML help project" - @echo " qthelp to make HTML files and a qthelp project" - @echo " devhelp to make HTML files and a Devhelp project" - @echo " epub to make an epub" - @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" - @echo " latexpdf to make LaTeX files and run them through pdflatex" - @echo " text to make text files" - @echo " man to make manual pages" - @echo " texinfo to make Texinfo files" - @echo " info to make Texinfo files and run them through makeinfo" - @echo " gettext to make PO message catalogs" - @echo " changes to make an overview of all changed/added/deprecated items" - @echo " linkcheck to check all external links for integrity" - @echo " doctest to run all doctests embedded in the documentation (if enabled)" - -clean: - -rm -rf $(BUILDDIR)/* - -html: - $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html - @echo - @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." - -dirhtml: - $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml - @echo - @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." - -singlehtml: - $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml - @echo - @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." - -pickle: - $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle - @echo - @echo "Build finished; now you can process the pickle files." - -json: - $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json - @echo - @echo "Build finished; now you can process the JSON files." - -htmlhelp: - $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp - @echo - @echo "Build finished; now you can run HTML Help Workshop with the" \ - ".hhp project file in $(BUILDDIR)/htmlhelp." - -qthelp: - $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp - @echo - @echo "Build finished; now you can run "qcollectiongenerator" with the" \ - ".qhcp project file in $(BUILDDIR)/qthelp, like this:" - @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/GuzzleRing.qhcp" - @echo "To view the help file:" - @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/GuzzleRing.qhc" - -devhelp: - $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp - @echo - @echo "Build finished." - @echo "To view the help file:" - @echo "# mkdir -p $$HOME/.local/share/devhelp/GuzzleRing" - @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/GuzzleRing" - @echo "# devhelp" - -epub: - $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub - @echo - @echo "Build finished. The epub file is in $(BUILDDIR)/epub." - -latex: - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo - @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." - @echo "Run \`make' in that directory to run these through (pdf)latex" \ - "(use \`make latexpdf' here to do that automatically)." - -latexpdf: - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo "Running LaTeX files through pdflatex..." - $(MAKE) -C $(BUILDDIR)/latex all-pdf - @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." - -text: - $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text - @echo - @echo "Build finished. The text files are in $(BUILDDIR)/text." - -man: - $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man - @echo - @echo "Build finished. The manual pages are in $(BUILDDIR)/man." - -texinfo: - $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo - @echo - @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." - @echo "Run \`make' in that directory to run these through makeinfo" \ - "(use \`make info' here to do that automatically)." - -info: - $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo - @echo "Running Texinfo files through makeinfo..." - make -C $(BUILDDIR)/texinfo info - @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." - -gettext: - $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale - @echo - @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." - -changes: - $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes - @echo - @echo "The overview file is in $(BUILDDIR)/changes." - -linkcheck: - $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck - @echo - @echo "Link check complete; look for any errors in the above output " \ - "or in $(BUILDDIR)/linkcheck/output.txt." - -doctest: - $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest - @echo "Testing of doctests in the sources finished, look at the " \ - "results in $(BUILDDIR)/doctest/output.txt." diff --git a/core/vendor/guzzlehttp/ringphp/docs/client_handlers.rst b/core/vendor/guzzlehttp/ringphp/docs/client_handlers.rst deleted file mode 100644 index 3151f00..0000000 --- a/core/vendor/guzzlehttp/ringphp/docs/client_handlers.rst +++ /dev/null @@ -1,173 +0,0 @@ -=============== -Client Handlers -=============== - -Client handlers accept a request array and return a future response array that -can be used synchronously as an array or asynchronously using a promise. - -Built-In Handlers ------------------ - -RingPHP comes with three built-in client handlers. - -Stream Handler -~~~~~~~~~~~~~~ - -The ``GuzzleHttp\Ring\Client\StreamHandler`` uses PHP's -`http stream wrapper `_ to send -requests. - -.. note:: - - This handler cannot send requests concurrently. - -You can provide an associative array of custom stream context options to the -StreamHandler using the ``stream_context`` key of the ``client`` request -option. - -.. code-block:: php - - use GuzzleHttp\Ring\Client\StreamHandler; - - $response = $handler([ - 'http_method' => 'GET', - 'uri' => '/', - 'headers' => ['host' => ['httpbin.org']], - 'client' => [ - 'stream_context' => [ - 'http' => [ - 'request_fulluri' => true, - 'method' => 'HEAD' - ], - 'socket' => [ - 'bindto' => '127.0.0.1:0' - ], - 'ssl' => [ - 'verify_peer' => false - ] - ] - ] - ]); - - // Even though it's already completed, you can still use a promise - $response->then(function ($response) { - echo $response['status']; // 200 - }); - - // Or access the response using the future interface - echo $response['status']; // 200 - -cURL Handler -~~~~~~~~~~~~ - -The ``GuzzleHttp\Ring\Client\CurlHandler`` can be used with PHP 5.5+ to send -requests using cURL easy handles. This handler is great for sending requests -one at a time because the execute and select loop is implemented in C code -which executes faster and consumes less memory than using PHP's -``curl_multi_*`` interface. - -.. note:: - - This handler cannot send requests concurrently. - -When using the CurlHandler, custom curl options can be specified as an -associative array of `cURL option constants `_ -mapping to values in the ``client`` option of a requst using the **curl** key. - -.. code-block:: php - - use GuzzleHttp\Ring\Client\CurlHandler; - - $handler = new CurlHandler(); - - $request = [ - 'http_method' => 'GET', - 'headers' => ['host' => [Server::$host]], - 'client' => ['curl' => [CURLOPT_LOW_SPEED_LIMIT => 10]] - ]; - - $response = $handler($request); - - // The response can be used directly as an array. - echo $response['status']; // 200 - - // Or, it can be used as a promise (that has already fulfilled). - $response->then(function ($response) { - echo $response['status']; // 200 - }); - -cURL Multi Handler -~~~~~~~~~~~~~~~~~~ - -The ``GuzzleHttp\Ring\Client\CurlMultiHandler`` transfers requests using -cURL's `multi API `_. The -``CurlMultiHandler`` is great for sending requests concurrently. - -.. code-block:: php - - use GuzzleHttp\Ring\Client\CurlMultiHandler; - - $handler = new CurlMultiHandler(); - - $request = [ - 'http_method' => 'GET', - 'headers' => ['host' => [Server::$host]] - ]; - - // this call returns a future array immediately. - $response = $handler($request); - - // Ideally, you should use the promise API to not block. - $response - ->then(function ($response) { - // Got the response at some point in the future - echo $response['status']; // 200 - // Don't break the chain - return $response; - })->then(function ($response) { - // ... - }); - - // If you really need to block, then you can use the response as an - // associative array. This will block until it has completed. - echo $response['status']; // 200 - -Just like the ``CurlHandler``, the ``CurlMultiHandler`` accepts custom curl -option in the ``curl`` key of the ``client`` request option. - -Mock Handler -~~~~~~~~~~~~ - -The ``GuzzleHttp\Ring\Client\MockHandler`` is used to return mock responses. -When constructed, the handler can be configured to return the same response -array over and over, a future response, or a the evaluation of a callback -function. - -.. code-block:: php - - use GuzzleHttp\Ring\Client\MockHandler; - - // Return a canned response. - $mock = new MockHandler(['status' => 200]); - $response = $mock([]); - assert(200 == $response['status']); - assert([] == $response['headers']); - -Implementing Handlers ---------------------- - -Client handlers are just PHP callables (functions or classes that have the -``__invoke`` magic method). The callable accepts a request array and MUST -return an instance of ``GuzzleHttp\Ring\Future\FutureArrayInterface`` so that -the response can be used by both blocking and non-blocking consumers. - -Handlers need to follow a few simple rules: - -1. Do not throw exceptions. If an error is encountered, return an array that - contains the ``error`` key that maps to an ``\Exception`` value. -2. If the request has a ``delay`` client option, then the handler should only - send the request after the specified delay time in seconds. Blocking - handlers may find it convenient to just let the - ``GuzzleHttp\Ring\Core::doSleep($request)`` function handle this for them. -3. Always return an instance of ``GuzzleHttp\Ring\Future\FutureArrayInterface``. -4. Complete any outstanding requests when the handler is destructed. diff --git a/core/vendor/guzzlehttp/ringphp/docs/client_middleware.rst b/core/vendor/guzzlehttp/ringphp/docs/client_middleware.rst deleted file mode 100644 index 7c52c8a..0000000 --- a/core/vendor/guzzlehttp/ringphp/docs/client_middleware.rst +++ /dev/null @@ -1,165 +0,0 @@ -================= -Client Middleware -================= - -Middleware intercepts requests before they are sent over the wire and can be -used to add functionality to handlers. - -Modifying Requests ------------------- - -Let's say you wanted to modify requests before they are sent over the wire -so that they always add specific headers. This can be accomplished by creating -a function that accepts a handler and returns a new function that adds the -composed behavior. - -.. code-block:: php - - use GuzzleHttp\Ring\Client\CurlHandler; - - $handler = new CurlHandler(); - - $addHeaderHandler = function (callable $handler, array $headers = []) { - return function (array $request) use ($handler, $headers) { - // Add our custom headers - foreach ($headers as $key => $value) { - $request['headers'][$key] = $value; - } - - // Send the request using the handler and return the response. - return $handler($request); - } - }; - - // Create a new handler that adds headers to each request. - $handler = $addHeaderHandler($handler, [ - 'X-AddMe' => 'hello', - 'Authorization' => 'Basic xyz' - ]); - - $response = $handler([ - 'http_method' => 'GET', - 'headers' => ['Host' => ['httpbin.org'] - ]); - -Modifying Responses -------------------- - -You can change a response as it's returned from a middleware. Remember that -responses returned from an handler (including middleware) must implement -``GuzzleHttp\Ring\Future\FutureArrayInterface``. In order to be a good citizen, -you should not expect that the responses returned through your middleware will -be completed synchronously. Instead, you should use the -``GuzzleHttp\Ring\Core::proxy()`` function to modify the response when the -underlying promise is resolved. This function is a helper function that makes it -easy to create a new instance of ``FutureArrayInterface`` that wraps an existing -``FutureArrayInterface`` object. - -Let's say you wanted to add headers to a response as they are returned from -your middleware, but you want to make sure you aren't causing future -responses to be dereferenced right away. You can achieve this by modifying the -incoming request and using the ``Core::proxy`` function. - -.. code-block:: php - - use GuzzleHttp\Ring\Core; - use GuzzleHttp\Ring\Client\CurlHandler; - - $handler = new CurlHandler(); - - $responseHeaderHandler = function (callable $handler, array $headers) { - return function (array $request) use ($handler, $headers) { - // Send the request using the wrapped handler. - return Core::proxy($handler($request), function ($response) use ($headers) { - // Add the headers to the response when it is available. - foreach ($headers as $key => $value) { - $response['headers'][$key] = (array) $value; - } - // Note that you can return a regular response array when using - // the proxy method. - return $response; - }); - } - }; - - // Create a new handler that adds headers to each response. - $handler = $responseHeaderHandler($handler, ['X-Header' => 'hello!']); - - $response = $handler([ - 'http_method' => 'GET', - 'headers' => ['Host' => ['httpbin.org'] - ]); - - assert($response['headers']['X-Header'] == 'hello!'); - -Built-In Middleware -------------------- - -RingPHP comes with a few basic client middlewares that modify requests -and responses. - -Streaming Middleware -~~~~~~~~~~~~~~~~~~~~ - -If you want to send all requests with the ``streaming`` option to a specific -handler but other requests to a different handler, then use the streaming -middleware. - -.. code-block:: php - - use GuzzleHttp\Ring\Client\CurlHandler; - use GuzzleHttp\Ring\Client\StreamHandler; - use GuzzleHttp\Ring\Client\Middleware; - - $defaultHandler = new CurlHandler(); - $streamingHandler = new StreamHandler(); - $streamingHandler = Middleware::wrapStreaming( - $defaultHandler, - $streamingHandler - ); - - // Send the request using the streaming handler. - $response = $streamingHandler([ - 'http_method' => 'GET', - 'headers' => ['Host' => ['www.google.com'], - 'stream' => true - ]); - - // Send the request using the default handler. - $response = $streamingHandler([ - 'http_method' => 'GET', - 'headers' => ['Host' => ['www.google.com'] - ]); - -Future Middleware -~~~~~~~~~~~~~~~~~ - -If you want to send all requests with the ``future`` option to a specific -handler but other requests to a different handler, then use the future -middleware. - -.. code-block:: php - - use GuzzleHttp\Ring\Client\CurlHandler; - use GuzzleHttp\Ring\Client\CurlMultiHandler; - use GuzzleHttp\Ring\Client\Middleware; - - $defaultHandler = new CurlHandler(); - $futureHandler = new CurlMultiHandler(); - $futureHandler = Middleware::wrapFuture( - $defaultHandler, - $futureHandler - ); - - // Send the request using the blocking CurlHandler. - $response = $futureHandler([ - 'http_method' => 'GET', - 'headers' => ['Host' => ['www.google.com'] - ]); - - // Send the request using the non-blocking CurlMultiHandler. - $response = $futureHandler([ - 'http_method' => 'GET', - 'headers' => ['Host' => ['www.google.com'], - 'future' => true - ]); diff --git a/core/vendor/guzzlehttp/ringphp/docs/conf.py b/core/vendor/guzzlehttp/ringphp/docs/conf.py deleted file mode 100644 index c6404aa..0000000 --- a/core/vendor/guzzlehttp/ringphp/docs/conf.py +++ /dev/null @@ -1,23 +0,0 @@ -import sys, os -import sphinx_rtd_theme -from sphinx.highlighting import lexers -from pygments.lexers.web import PhpLexer - - -lexers['php'] = PhpLexer(startinline=True, linenos=1) -lexers['php-annotations'] = PhpLexer(startinline=True, linenos=1) -primary_domain = 'php' - -extensions = [] -templates_path = ['_templates'] -source_suffix = '.rst' -master_doc = 'index' -project = u'RingPHP' -copyright = u'2014, Michael Dowling' -version = '1.0.0-alpha' -exclude_patterns = ['_build'] - -html_title = "RingPHP" -html_short_title = "RingPHP" -html_theme = "sphinx_rtd_theme" -html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] diff --git a/core/vendor/guzzlehttp/ringphp/docs/futures.rst b/core/vendor/guzzlehttp/ringphp/docs/futures.rst deleted file mode 100644 index af29cb3..0000000 --- a/core/vendor/guzzlehttp/ringphp/docs/futures.rst +++ /dev/null @@ -1,164 +0,0 @@ -======= -Futures -======= - -Futures represent a computation that may have not yet completed. RingPHP -uses hybrid of futures and promises to provide a consistent API that can be -used for both blocking and non-blocking consumers. - -Promises --------- - -You can get the result of a future when it is ready using the promise interface -of a future. Futures expose a promise API via a ``then()`` method that utilizes -`React's promise library `_. You should -use this API when you do not wish to block. - -.. code-block:: php - - use GuzzleHttp\Ring\Client\CurlMultiHandler; - - $request = [ - 'http_method' => 'GET', - 'uri' => '/', - 'headers' => ['host' => ['httpbin.org']] - ]; - - $response = $handler($request); - - // Use the then() method to use the promise API of the future. - $response->then(function ($response) { - echo $response['status']; - }); - -You can get the promise used by a future, an instance of -``React\Promise\PromiseInterface``, by calling the ``promise()`` method. - -.. code-block:: php - - $response = $handler($request); - $promise = $response->promise(); - $promise->then(function ($response) { - echo $response['status']; - }); - -This promise value can be used with React's -`aggregate promise functions `_. - -Waiting -------- - -You can wait on a future to complete and retrieve the value, or *dereference* -the future, using the ``wait()`` method. Calling the ``wait()`` method of a -future will block until the result is available. The result is then returned or -an exception is thrown if and exception was encountered while waiting on the -the result. Subsequent calls to dereference a future will return the previously -completed result or throw the previously encountered exception. Futures can be -cancelled, which stops the computation if possible. - -.. code-block:: php - - use GuzzleHttp\Ring\Client\CurlMultiHandler; - - $response = $handler([ - 'http_method' => 'GET', - 'uri' => '/', - 'headers' => ['host' => ['httpbin.org']] - ]); - - // You can explicitly call block to wait on a result. - $realizedResponse = $response->wait(); - - // Future responses can be used like a regular PHP array. - echo $response['status']; - -In addition to explicitly calling the ``wait()`` function, using a future like -a normal value will implicitly trigger the ``wait()`` function. - -Future Responses ----------------- - -RingPHP uses futures to return asynchronous responses immediately. Client -handlers always return future responses that implement -``GuzzleHttp\Ring\Future\ArrayFutureInterface``. These future responses act -just like normal PHP associative arrays for blocking access and provide a -promise interface for non-blocking access. - -.. code-block:: php - - use GuzzleHttp\Ring\Client\CurlMultiHandler; - - $handler = new CurlMultiHandler(); - - $request = [ - 'http_method' => 'GET', - 'uri' => '/', - 'headers' => ['Host' => ['www.google.com']] - ]; - - $response = $handler($request); - - // Use the promise API for non-blocking access to the response. The actual - // response value will be delivered to the promise. - $response->then(function ($response) { - echo $response['status']; - }); - - // You can wait (block) until the future is completed. - $response->wait(); - - // This will implicitly call wait(), and will block too! - $response['status']; - -.. important:: - - Futures that are not completed by the time the underlying handler is - destructed will be completed when the handler is shutting down. - -Cancelling ----------- - -Futures can be cancelled if they have not already been dereferenced. - -RingPHP futures are typically implemented with the -``GuzzleHttp\Ring\Future\BaseFutureTrait``. This trait provides the cancellation -functionality that should be common to most implementations. Cancelling a -future response will try to prevent the request from sending over the wire. - -When a future is cancelled, the cancellation function is invoked and performs -the actual work needed to cancel the request from sending if possible -(e.g., telling an event loop to stop sending a request or to close a socket). -If no cancellation function is provided, then a request cannot be cancelled. If -a cancel function is provided, then it should accept the future as an argument -and return true if the future was successfully cancelled or false if it could -not be cancelled. - -Wrapping an existing Promise ----------------------------- - -You can easily create a future from any existing promise using the -``GuzzleHttp\Ring\Future\FutureValue`` class. This class's constructor -accepts a promise as the first argument, a wait function as the second -argument, and a cancellation function as the third argument. The dereference -function is used to force the promise to resolve (for example, manually ticking -an event loop). The cancel function is optional and is used to tell the thing -that created the promise that it can stop computing the result (for example, -telling an event loop to stop transferring a request). - -.. code-block:: php - - use GuzzleHttp\Ring\Future\FutureValue; - use React\Promise\Deferred; - - $deferred = new Deferred(); - $promise = $deferred->promise(); - - $f = new FutureValue( - $promise, - function () use ($deferred) { - // This function is responsible for blocking and resolving the - // promise. Here we pass in a reference to the deferred so that - // it can be resolved or rejected. - $deferred->resolve('foo'); - } - ); diff --git a/core/vendor/guzzlehttp/ringphp/docs/index.rst b/core/vendor/guzzlehttp/ringphp/docs/index.rst deleted file mode 100644 index 3ac5447..0000000 --- a/core/vendor/guzzlehttp/ringphp/docs/index.rst +++ /dev/null @@ -1,50 +0,0 @@ -======= -RingPHP -======= - -Provides a simple API and specification that abstracts away the details of HTTP -into a single PHP function. RingPHP be used to power HTTP clients and servers -through a PHP function that accepts a request hash and returns a response hash -that is fulfilled using a `promise `_, -allowing RingPHP to support both synchronous and asynchronous workflows. - -By abstracting the implementation details of different HTTP clients and -servers, RingPHP allows you to utilize pluggable HTTP clients and servers -without tying your application to a specific implementation. - -.. toctree:: - :maxdepth: 2 - - spec - futures - client_middleware - client_handlers - testing - -.. code-block:: php - - 'GET', - 'uri' => '/', - 'headers' => [ - 'host' => ['www.google.com'], - 'x-foo' => ['baz'] - ] - ]); - - $response->then(function (array $response) { - echo $response['status']; - }); - - $response->wait(); - -RingPHP is inspired by Clojure's `Ring `_, -which, in turn, was inspired by Python's WSGI and Ruby's Rack. RingPHP is -utilized as the handler layer in `Guzzle `_ 5.0+ to send -HTTP requests. diff --git a/core/vendor/guzzlehttp/ringphp/docs/requirements.txt b/core/vendor/guzzlehttp/ringphp/docs/requirements.txt deleted file mode 100644 index 483a4e9..0000000 --- a/core/vendor/guzzlehttp/ringphp/docs/requirements.txt +++ /dev/null @@ -1 +0,0 @@ -sphinx_rtd_theme diff --git a/core/vendor/guzzlehttp/ringphp/docs/spec.rst b/core/vendor/guzzlehttp/ringphp/docs/spec.rst deleted file mode 100644 index bc91078..0000000 --- a/core/vendor/guzzlehttp/ringphp/docs/spec.rst +++ /dev/null @@ -1,311 +0,0 @@ -============= -Specification -============= - -RingPHP applications consist of handlers, requests, responses, and -middleware. - -Handlers --------- - -Handlers are implemented as a PHP ``callable`` that accept a request array -and return a response array (``GuzzleHttp\Ring\Future\FutureArrayInterface``). - -For example: - -.. code-block:: php - - use GuzzleHttp\Ring\Future\CompletedFutureArray; - - $mockHandler = function (array $request) { - return new CompletedFutureArray([ - 'status' => 200, - 'headers' => ['X-Foo' => ['Bar']], - 'body' => 'Hello!' - ]); - }; - -This handler returns the same response each time it is invoked. All RingPHP -handlers must return a ``GuzzleHttp\Ring\Future\FutureArrayInterface``. Use -``GuzzleHttp\Ring\Future\CompletedFutureArray`` when returning a response that -has already completed. - -Requests --------- - -A request array is a PHP associative array that contains the configuration -settings need to send a request. - -.. code-block:: php - - $request = [ - 'http_method' => 'GET', - 'scheme' => 'http', - 'uri' => '/', - 'body' => 'hello!', - 'client' => ['timeout' => 1.0], - 'headers' => [ - 'host' => ['httpbin.org'], - 'X-Foo' => ['baz', 'bar'] - ] - ]; - -The request array contains the following key value pairs: - -request_method - (string, required) The HTTP request method, must be all caps corresponding - to a HTTP request method, such as ``GET`` or ``POST``. - -scheme - (string) The transport protocol, must be one of ``http`` or ``https``. - Defaults to ``http``. - -uri - (string, required) The request URI excluding the query string. Must - start with "/". - -query_string - (string) The query string, if present (e.g., ``foo=bar``). - -version - (string) HTTP protocol version. Defaults to ``1.1``. - -headers - (required, array) Associative array of headers. Each key represents the - header name. Each value contains an array of strings where each entry of - the array SHOULD be sent over the wire on a separate header line. - -body - (string, fopen resource, ``Iterator``, ``GuzzleHttp\Stream\StreamInterface``) - The body of the request, if present. Can be a string, resource returned - from fopen, an ``Iterator`` that yields chunks of data, an object that - implemented ``__toString``, or a ``GuzzleHttp\Stream\StreamInterface``. - -future - (bool, string) Controls the asynchronous behavior of a response. - - Set to ``true`` or omit the ``future`` option to *request* that a request - will be completed asynchronously. Keep in mind that your request might not - necessarily be completed asynchronously based on the handler you are using. - Set the ``future`` option to ``false`` to request that a synchronous - response be provided. - - You can provide a string value to specify fine-tuned future behaviors that - may be specific to the underlying handlers you are using. There are, - however, some common future options that handlers should implement if - possible. - - lazy - Requests that the handler does not open and send the request - immediately, but rather only opens and sends the request once the - future is dereferenced. This option is often useful for sending a large - number of requests concurrently to allow handlers to take better - advantage of non-blocking transfers by first building up a pool of - requests. - - If an handler does not implement or understand a provided string value, - then the request MUST be treated as if the user provided ``true`` rather - than the string value. - - Future responses created by asynchronous handlers MUST attempt to complete - any outstanding future responses when they are destructed. Asynchronous - handlers MAY choose to automatically complete responses when the number - of outstanding requests reaches an handler-specific threshold. - -Client Specific Options -~~~~~~~~~~~~~~~~~~~~~~~ - -The following options are only used in ring client handlers. - -.. _client-options: - -client - (array) Associative array of client specific transfer options. The - ``client`` request key value pair can contain the following keys: - - cert - (string, array) Set to a string to specify the path to a file - containing a PEM formatted SSL client side certificate. If a password - is required, then set ``cert`` to an array containing the path to the - PEM file in the first array element followed by the certificate - password in the second array element. - - connect_timeout - (float) Float describing the number of seconds to wait while trying to - connect to a server. Use ``0`` to wait indefinitely (the default - behavior). - - debug - (bool, fopen() resource) Set to true or set to a PHP stream returned by - fopen() to enable debug output with the handler used to send a request. - If set to ``true``, the output is written to PHP's STDOUT. If a PHP - ``fopen`` resource handle is provided, the output is written to the - stream. - - "Debug output" is handler specific: different handlers will yield - different output and various various level of detail. For example, when - using cURL to transfer requests, cURL's `CURLOPT_VERBOSE `_ - will be used. When using the PHP stream wrapper, `stream notifications `_ - will be emitted. - - decode_content - (bool) Specify whether or not ``Content-Encoding`` responses - (gzip, deflate, etc.) are automatically decoded. Set to ``true`` to - automatically decode encoded responses. Set to ``false`` to not decode - responses. By default, content is *not* decoded automatically. - - delay - (int) The number of milliseconds to delay before sending the request. - This is often used for delaying before retrying a request. Handlers - SHOULD implement this if possible, but it is not a strict requirement. - - progress - (function) Defines a function to invoke when transfer progress is made. - The function accepts the following arguments: - - 1. The total number of bytes expected to be downloaded - 2. The number of bytes downloaded so far - 3. The number of bytes expected to be uploaded - 4. The number of bytes uploaded so far - - proxy - (string, array) Pass a string to specify an HTTP proxy, or an - associative array to specify different proxies for different protocols - where the scheme is the key and the value is the proxy address. - - .. code-block:: php - - $request = [ - 'http_method' => 'GET', - 'headers' => ['host' => ['httpbin.org']], - 'client' => [ - // Use different proxies for different URI schemes. - 'proxy' => [ - 'http' => 'http://proxy.example.com:5100', - 'https' => 'https://proxy.example.com:6100' - ] - ] - ]; - - ssl_key - (string, array) Specify the path to a file containing a private SSL key - in PEM format. If a password is required, then set to an array - containing the path to the SSL key in the first array element followed - by the password required for the certificate in the second element. - - save_to - (string, fopen resource, ``GuzzleHttp\Stream\StreamInterface``) - Specifies where the body of the response is downloaded. Pass a string to - open a local file on disk and save the output to the file. Pass an fopen - resource to save the output to a PHP stream resource. Pass a - ``GuzzleHttp\Stream\StreamInterface`` to save the output to a Guzzle - StreamInterface. Omitting this option will typically save the body of a - response to a PHP temp stream. - - stream - (bool) Set to true to stream a response rather than download it all - up-front. This option will only be utilized when the corresponding - handler supports it. - - timeout - (float) Float describing the timeout of the request in seconds. Use 0 to - wait indefinitely (the default behavior). - - verify - (bool, string) Describes the SSL certificate verification behavior of a - request. Set to true to enable SSL certificate verification using the - system CA bundle when available (the default). Set to false to disable - certificate verification (this is insecure!). Set to a string to provide - the path to a CA bundle on disk to enable verification using a custom - certificate. - - version - (string) HTTP protocol version to use with the request. - -Server Specific Options -~~~~~~~~~~~~~~~~~~~~~~~ - -The following options are only used in ring server handlers. - -server_port - (integer) The port on which the request is being handled. This is only - used with ring servers, and is required. - -server_name - (string) The resolved server name, or the server IP address. Required when - using a Ring server. - -remote_addr - (string) The IP address of the client or the last proxy that sent the - request. Required when using a Ring server. - -Responses ---------- - -A response is an array-like object that implements -``GuzzleHttp\Ring\Future\FutureArrayInterface``. Responses contain the -following key value pairs: - -body - (string, fopen resource, ``Iterator``, ``GuzzleHttp\Stream\StreamInterface``) - The body of the response, if present. Can be a string, resource returned - from fopen, an ``Iterator`` that yields chunks of data, an object that - implemented ``__toString``, or a ``GuzzleHttp\Stream\StreamInterface``. - -effective_url - (string) The URL that returned the resulting response. - -error - (``\Exception``) Contains an exception describing any errors that were - encountered during the transfer. - -headers - (Required, array) Associative array of headers. Each key represents the - header name. Each value contains an array of strings where each entry of - the array is a header line. The headers array MAY be an empty array in the - event an error occurred before a response was received. - -reason - (string) Optional reason phrase. This option should be provided when the - reason phrase does not match the typical reason phrase associated with the - ``status`` code. See `RFC 7231 `_ - for a list of HTTP reason phrases mapped to status codes. - -status - (Required, integer) The HTTP status code. The status code MAY be set to - ``null`` in the event an error occurred before a response was received - (e.g., a networking error). - -transfer_stats - (array) Provides an associative array of arbitrary transfer statistics if - provided by the underlying handler. - -version - (string) HTTP protocol version. Defaults to ``1.1``. - -Middleware ----------- - -Ring middleware augments the functionality of handlers by invoking them in the -process of generating responses. Middleware is typically implemented as a -higher-order function that takes one or more handlers as arguments followed by -an optional associative array of options as the last argument, returning a new -handler with the desired compound behavior. - -Here's an example of a middleware that adds a Content-Type header to each -request. - -.. code-block:: php - - use GuzzleHttp\Ring\Client\CurlHandler; - use GuzzleHttp\Ring\Core; - - $contentTypeHandler = function(callable $handler, $contentType) { - return function (array $request) use ($handler, $contentType) { - return $handler(Core::setHeader('Content-Type', $contentType)); - }; - }; - - $baseHandler = new CurlHandler(); - $wrappedHandler = $contentTypeHandler($baseHandler, 'text/html'); - $response = $wrappedHandler([/** request hash **/]); diff --git a/core/vendor/guzzlehttp/ringphp/docs/testing.rst b/core/vendor/guzzlehttp/ringphp/docs/testing.rst deleted file mode 100644 index 9df2562..0000000 --- a/core/vendor/guzzlehttp/ringphp/docs/testing.rst +++ /dev/null @@ -1,74 +0,0 @@ -======= -Testing -======= - -RingPHP tests client handlers using `PHPUnit `_ and a -built-in node.js web server. - -Running Tests -------------- - -First, install the dependencies using `Composer `_. - - composer.phar install - -Next, run the unit tests using ``Make``. - - make test - -The tests are also run on Travis-CI on each commit: https://travis-ci.org/guzzle/guzzle-ring - -Test Server ------------ - -Testing client handlers usually involves actually sending HTTP requests. -RingPHP provides a node.js web server that returns canned responses and -keep a list of the requests that have been received. The server can then -be queried to get a list of the requests that were sent by the client so that -you can ensure that the client serialized and transferred requests as intended. - -The server keeps a list of queued responses and returns responses that are -popped off of the queue as HTTP requests are received. When there are not -more responses to serve, the server returns a 500 error response. - -The test server uses the ``GuzzleHttp\Tests\Ring\Client\Server`` class to -control the server. - -.. code-block:: php - - use GuzzleHttp\Ring\Client\StreamHandler; - use GuzzleHttp\Tests\Ring\Client\Server; - - // First return a 200 followed by a 404 response. - Server::enqueue([ - ['status' => 200], - ['status' => 404] - ]); - - $handler = new StreamHandler(); - - $response = $handler([ - 'http_method' => 'GET', - 'headers' => ['host' => [Server::$host]], - 'uri' => '/' - ]); - - assert(200 == $response['status']); - - $response = $handler([ - 'http_method' => 'HEAD', - 'headers' => ['host' => [Server::$host]], - 'uri' => '/' - ]); - - assert(404 == $response['status']); - -After requests have been sent, you can get a list of the requests as they -were sent over the wire to ensure they were sent correctly. - -.. code-block:: php - - $received = Server::received(); - - assert('GET' == $received[0]['http_method']); - assert('HEAD' == $received[1]['http_method']); diff --git a/core/vendor/guzzlehttp/ringphp/phpunit.xml.dist b/core/vendor/guzzlehttp/ringphp/phpunit.xml.dist deleted file mode 100644 index 1d19290..0000000 --- a/core/vendor/guzzlehttp/ringphp/phpunit.xml.dist +++ /dev/null @@ -1,14 +0,0 @@ - - - - - tests - - - - - src - - - diff --git a/core/vendor/guzzlehttp/ringphp/src/Client/ClientUtils.php b/core/vendor/guzzlehttp/ringphp/src/Client/ClientUtils.php deleted file mode 100644 index 2acf92e..0000000 --- a/core/vendor/guzzlehttp/ringphp/src/Client/ClientUtils.php +++ /dev/null @@ -1,74 +0,0 @@ -getDefaultOptions($request, $headers); - $this->applyMethod($request, $options); - - if (isset($request['client'])) { - $this->applyHandlerOptions($request, $options); - } - - $this->applyHeaders($request, $options); - unset($options['_headers']); - - // Add handler options from the request's configuration options - if (isset($request['client']['curl'])) { - $options = $this->applyCustomCurlOptions( - $request['client']['curl'], - $options - ); - } - - if (!$handle) { - $handle = curl_init(); - } - - $body = $this->getOutputBody($request, $options); - curl_setopt_array($handle, $options); - - return [$handle, &$headers, $body]; - } - - /** - * Creates a response hash from a cURL result. - * - * @param callable $handler Handler that was used. - * @param array $request Request that sent. - * @param array $response Response hash to update. - * @param array $headers Headers received during transfer. - * @param resource $body Body fopen response. - * - * @return array - */ - public static function createResponse( - callable $handler, - array $request, - array $response, - array $headers, - $body - ) { - if (isset($response['transfer_stats']['url'])) { - $response['effective_url'] = $response['transfer_stats']['url']; - } - - if (!empty($headers)) { - $startLine = explode(' ', array_shift($headers), 3); - $headerList = Core::headersFromLines($headers); - $response['headers'] = $headerList; - $response['status'] = isset($startLine[1]) ? (int) $startLine[1] : null; - $response['reason'] = isset($startLine[2]) ? $startLine[2] : null; - $response['body'] = $body; - Core::rewindBody($response); - } - - return !empty($response['curl']['errno']) || !isset($response['status']) - ? self::createErrorResponse($handler, $request, $response) - : $response; - } - - private static function createErrorResponse( - callable $handler, - array $request, - array $response - ) { - static $connectionErrors = [ - CURLE_OPERATION_TIMEOUTED => true, - CURLE_COULDNT_RESOLVE_HOST => true, - CURLE_COULDNT_CONNECT => true, - CURLE_SSL_CONNECT_ERROR => true, - CURLE_GOT_NOTHING => true, - ]; - - // Retry when nothing is present or when curl failed to rewind. - if (!isset($response['err_message']) - && (empty($response['curl']['errno']) - || $response['curl']['errno'] == 65) - ) { - return self::retryFailedRewind($handler, $request, $response); - } - - $message = isset($response['err_message']) - ? $response['err_message'] - : sprintf('cURL error %s: %s', - $response['curl']['errno'], - isset($response['curl']['error']) - ? $response['curl']['error'] - : 'See http://curl.haxx.se/libcurl/c/libcurl-errors.html'); - - $error = isset($response['curl']['errno']) - && isset($connectionErrors[$response['curl']['errno']]) - ? new ConnectException($message) - : new RingException($message); - - return $response + [ - 'status' => null, - 'reason' => null, - 'body' => null, - 'headers' => [], - 'error' => $error, - ]; - } - - private function getOutputBody(array $request, array &$options) - { - // Determine where the body of the response (if any) will be streamed. - if (isset($options[CURLOPT_WRITEFUNCTION])) { - return $request['client']['save_to']; - } - - if (isset($options[CURLOPT_FILE])) { - return $options[CURLOPT_FILE]; - } - - if ($request['http_method'] != 'HEAD') { - // Create a default body if one was not provided - return $options[CURLOPT_FILE] = fopen('php://temp', 'w+'); - } - - return null; - } - - private function getDefaultOptions(array $request, array &$headers) - { - $url = Core::url($request); - $startingResponse = false; - - $options = [ - '_headers' => $request['headers'], - CURLOPT_CUSTOMREQUEST => $request['http_method'], - CURLOPT_URL => $url, - CURLOPT_RETURNTRANSFER => false, - CURLOPT_HEADER => false, - CURLOPT_CONNECTTIMEOUT => 150, - CURLOPT_HEADERFUNCTION => function ($ch, $h) use (&$headers, &$startingResponse) { - $value = trim($h); - if ($value === '') { - $startingResponse = true; - } elseif ($startingResponse) { - $startingResponse = false; - $headers = [$value]; - } else { - $headers[] = $value; - } - return strlen($h); - }, - ]; - - if (isset($request['version'])) { - $options[CURLOPT_HTTP_VERSION] = $request['version'] == 1.1 ? CURL_HTTP_VERSION_1_1 : CURL_HTTP_VERSION_1_0; - } - - if (defined('CURLOPT_PROTOCOLS')) { - $options[CURLOPT_PROTOCOLS] = CURLPROTO_HTTP | CURLPROTO_HTTPS; - } - - return $options; - } - - private function applyMethod(array $request, array &$options) - { - if (isset($request['body'])) { - $this->applyBody($request, $options); - return; - } - - switch ($request['http_method']) { - case 'PUT': - case 'POST': - // See http://tools.ietf.org/html/rfc7230#section-3.3.2 - if (!Core::hasHeader($request, 'Content-Length')) { - $options[CURLOPT_HTTPHEADER][] = 'Content-Length: 0'; - } - break; - case 'HEAD': - $options[CURLOPT_NOBODY] = true; - unset( - $options[CURLOPT_WRITEFUNCTION], - $options[CURLOPT_READFUNCTION], - $options[CURLOPT_FILE], - $options[CURLOPT_INFILE] - ); - } - } - - private function applyBody(array $request, array &$options) - { - $contentLength = Core::firstHeader($request, 'Content-Length'); - $size = $contentLength !== null ? (int) $contentLength : null; - - // Send the body as a string if the size is less than 1MB OR if the - // [client][curl][body_as_string] request value is set. - if (($size !== null && $size < 1000000) || - isset($request['client']['curl']['body_as_string']) || - is_string($request['body']) - ) { - $options[CURLOPT_POSTFIELDS] = Core::body($request); - // Don't duplicate the Content-Length header - $this->removeHeader('Content-Length', $options); - $this->removeHeader('Transfer-Encoding', $options); - } else { - $options[CURLOPT_UPLOAD] = true; - if ($size !== null) { - // Let cURL handle setting the Content-Length header - $options[CURLOPT_INFILESIZE] = $size; - $this->removeHeader('Content-Length', $options); - } - $this->addStreamingBody($request, $options); - } - - // If the Expect header is not present, prevent curl from adding it - if (!Core::hasHeader($request, 'Expect')) { - $options[CURLOPT_HTTPHEADER][] = 'Expect:'; - } - - // cURL sometimes adds a content-type by default. Prevent this. - if (!Core::hasHeader($request, 'Content-Type')) { - $options[CURLOPT_HTTPHEADER][] = 'Content-Type:'; - } - } - - private function addStreamingBody(array $request, array &$options) - { - $body = $request['body']; - - if ($body instanceof StreamInterface) { - $options[CURLOPT_READFUNCTION] = function ($ch, $fd, $length) use ($body) { - return (string) $body->read($length); - }; - if (!isset($options[CURLOPT_INFILESIZE])) { - if ($size = $body->getSize()) { - $options[CURLOPT_INFILESIZE] = $size; - } - } - } elseif (is_resource($body)) { - $options[CURLOPT_INFILE] = $body; - } elseif ($body instanceof \Iterator) { - $buf = ''; - $options[CURLOPT_READFUNCTION] = function ($ch, $fd, $length) use ($body, &$buf) { - if ($body->valid()) { - $buf .= $body->current(); - $body->next(); - } - $result = (string) substr($buf, 0, $length); - $buf = substr($buf, $length); - return $result; - }; - } else { - throw new \InvalidArgumentException('Invalid request body provided'); - } - } - - private function applyHeaders(array $request, array &$options) - { - foreach ($options['_headers'] as $name => $values) { - foreach ($values as $value) { - $options[CURLOPT_HTTPHEADER][] = "$name: $value"; - } - } - - // Remove the Accept header if one was not set - if (!Core::hasHeader($request, 'Accept')) { - $options[CURLOPT_HTTPHEADER][] = 'Accept:'; - } - } - - /** - * Takes an array of curl options specified in the 'curl' option of a - * request's configuration array and maps them to CURLOPT_* options. - * - * This method is only called when a request has a 'curl' config setting. - * - * @param array $config Configuration array of custom curl option - * @param array $options Array of existing curl options - * - * @return array Returns a new array of curl options - */ - private function applyCustomCurlOptions(array $config, array $options) - { - $curlOptions = []; - foreach ($config as $key => $value) { - if (is_int($key)) { - $curlOptions[$key] = $value; - } - } - - return $curlOptions + $options; - } - - /** - * Remove a header from the options array. - * - * @param string $name Case-insensitive header to remove - * @param array $options Array of options to modify - */ - private function removeHeader($name, array &$options) - { - foreach (array_keys($options['_headers']) as $key) { - if (!strcasecmp($key, $name)) { - unset($options['_headers'][$key]); - return; - } - } - } - - /** - * Applies an array of request client options to a the options array. - * - * This method uses a large switch rather than double-dispatch to save on - * high overhead of calling functions in PHP. - */ - private function applyHandlerOptions(array $request, array &$options) - { - foreach ($request['client'] as $key => $value) { - switch ($key) { - // Violating PSR-4 to provide more room. - case 'verify': - - if ($value === false) { - unset($options[CURLOPT_CAINFO]); - $options[CURLOPT_SSL_VERIFYHOST] = 0; - $options[CURLOPT_SSL_VERIFYPEER] = false; - continue; - } - - $options[CURLOPT_SSL_VERIFYHOST] = 2; - $options[CURLOPT_SSL_VERIFYPEER] = true; - - if (is_string($value)) { - $options[CURLOPT_CAINFO] = $value; - if (!file_exists($value)) { - throw new \InvalidArgumentException( - "SSL CA bundle not found: $value" - ); - } - } - break; - - case 'decode_content': - - if ($value === false) { - continue; - } - - $accept = Core::firstHeader($request, 'Accept-Encoding'); - if ($accept) { - $options[CURLOPT_ENCODING] = $accept; - } else { - $options[CURLOPT_ENCODING] = ''; - // Don't let curl send the header over the wire - $options[CURLOPT_HTTPHEADER][] = 'Accept-Encoding:'; - } - break; - - case 'save_to': - - if (is_string($value)) { - $value = new LazyOpenStream($value, 'w+'); - } - - if ($value instanceof StreamInterface) { - $options[CURLOPT_WRITEFUNCTION] = - function ($ch, $write) use ($value) { - return $value->write($write); - }; - } elseif (is_resource($value)) { - $options[CURLOPT_FILE] = $value; - } else { - throw new \InvalidArgumentException('save_to must be a ' - . 'GuzzleHttp\Stream\StreamInterface or resource'); - } - break; - - case 'timeout': - - $options[CURLOPT_TIMEOUT_MS] = $value * 1000; - break; - - case 'connect_timeout': - - $options[CURLOPT_CONNECTTIMEOUT_MS] = $value * 1000; - break; - - case 'proxy': - - if (!is_array($value)) { - $options[CURLOPT_PROXY] = $value; - } elseif (isset($request['scheme'])) { - $scheme = $request['scheme']; - if (isset($value[$scheme])) { - $options[CURLOPT_PROXY] = $value[$scheme]; - } - } - break; - - case 'cert': - - if (is_array($value)) { - $options[CURLOPT_SSLCERTPASSWD] = $value[1]; - $value = $value[0]; - } - - if (!file_exists($value)) { - throw new \InvalidArgumentException( - "SSL certificate not found: {$value}" - ); - } - - $options[CURLOPT_SSLCERT] = $value; - break; - - case 'ssl_key': - - if (is_array($value)) { - $options[CURLOPT_SSLKEYPASSWD] = $value[1]; - $value = $value[0]; - } - - if (!file_exists($value)) { - throw new \InvalidArgumentException( - "SSL private key not found: {$value}" - ); - } - - $options[CURLOPT_SSLKEY] = $value; - break; - - case 'progress': - - if (!is_callable($value)) { - throw new \InvalidArgumentException( - 'progress client option must be callable' - ); - } - - $options[CURLOPT_NOPROGRESS] = false; - $options[CURLOPT_PROGRESSFUNCTION] = - function () use ($value) { - $args = func_get_args(); - // PHP 5.5 pushed the handle onto the start of the args - if (is_resource($args[0])) { - array_shift($args); - } - call_user_func_array($value, $args); - }; - break; - - case 'debug': - - if ($value) { - $options[CURLOPT_STDERR] = Core::getDebugResource($value); - $options[CURLOPT_VERBOSE] = true; - } - break; - } - } - } - - /** - * This function ensures that a response was set on a transaction. If one - * was not set, then the request is retried if possible. This error - * typically means you are sending a payload, curl encountered a - * "Connection died, retrying a fresh connect" error, tried to rewind the - * stream, and then encountered a "necessary data rewind wasn't possible" - * error, causing the request to be sent through curl_multi_info_read() - * without an error status. - */ - private static function retryFailedRewind( - callable $handler, - array $request, - array $response - ) { - // If there is no body, then there is some other kind of issue. This - // is weird and should probably never happen. - if (!isset($request['body'])) { - $response['err_message'] = 'No response was received for a request ' - . 'with no body. This could mean that you are saturating your ' - . 'network.'; - return self::createErrorResponse($handler, $request, $response); - } - - if (!Core::rewindBody($request)) { - $response['err_message'] = 'The connection unexpectedly failed ' - . 'without providing an error. The request would have been ' - . 'retried, but attempting to rewind the request body failed.'; - return self::createErrorResponse($handler, $request, $response); - } - - // Retry no more than 3 times before giving up. - if (!isset($request['curl']['retries'])) { - $request['curl']['retries'] = 1; - } elseif ($request['curl']['retries'] == 2) { - $response['err_message'] = 'The cURL request was retried 3 times ' - . 'and did no succeed. cURL was unable to rewind the body of ' - . 'the request and subsequent retries resulted in the same ' - . 'error. Turn on the debug option to see what went wrong. ' - . 'See https://bugs.php.net/bug.php?id=47204 for more information.'; - return self::createErrorResponse($handler, $request, $response); - } else { - $request['curl']['retries']++; - } - - return $handler($request); - } -} diff --git a/core/vendor/guzzlehttp/ringphp/src/Client/CurlHandler.php b/core/vendor/guzzlehttp/ringphp/src/Client/CurlHandler.php deleted file mode 100644 index d0323d8..0000000 --- a/core/vendor/guzzlehttp/ringphp/src/Client/CurlHandler.php +++ /dev/null @@ -1,117 +0,0 @@ -handles = $this->ownedHandles = []; - $this->factory = isset($options['handle_factory']) - ? $options['handle_factory'] - : new CurlFactory(); - $this->maxHandles = isset($options['max_handles']) - ? $options['max_handles'] - : 5; - } - - public function __destruct() - { - foreach ($this->handles as $handle) { - if (is_resource($handle)) { - curl_close($handle); - } - } - } - - public function __invoke(array $request) - { - $factory = $this->factory; - - // Ensure headers are by reference. They're updated elsewhere. - $result = $factory($request, $this->checkoutEasyHandle()); - $h = $result[0]; - $hd =& $result[1]; - $bd = $result[2]; - Core::doSleep($request); - curl_exec($h); - $response = ['transfer_stats' => curl_getinfo($h)]; - $response['curl']['error'] = curl_error($h); - $response['curl']['errno'] = curl_errno($h); - $this->releaseEasyHandle($h); - - return new CompletedFutureArray( - CurlFactory::createResponse($this, $request, $response, $hd, $bd) - ); - } - - private function checkoutEasyHandle() - { - // Find an unused handle in the cache - if (false !== ($key = array_search(false, $this->ownedHandles, true))) { - $this->ownedHandles[$key] = true; - return $this->handles[$key]; - } - - // Add a new handle - $handle = curl_init(); - $id = (int) $handle; - $this->handles[$id] = $handle; - $this->ownedHandles[$id] = true; - - return $handle; - } - - private function releaseEasyHandle($handle) - { - $id = (int) $handle; - if (count($this->ownedHandles) > $this->maxHandles) { - curl_close($this->handles[$id]); - unset($this->handles[$id], $this->ownedHandles[$id]); - } else { - // curl_reset doesn't clear these out for some reason - static $unsetValues = [ - CURLOPT_HEADERFUNCTION => null, - CURLOPT_WRITEFUNCTION => null, - CURLOPT_READFUNCTION => null, - CURLOPT_PROGRESSFUNCTION => null, - ]; - curl_setopt_array($handle, $unsetValues); - curl_reset($handle); - $this->ownedHandles[$id] = false; - } - } -} diff --git a/core/vendor/guzzlehttp/ringphp/src/Client/CurlMultiHandler.php b/core/vendor/guzzlehttp/ringphp/src/Client/CurlMultiHandler.php deleted file mode 100644 index 8335aac..0000000 --- a/core/vendor/guzzlehttp/ringphp/src/Client/CurlMultiHandler.php +++ /dev/null @@ -1,239 +0,0 @@ -mh = isset($options['mh']) - ? $options['mh'] : curl_multi_init(); - $this->factory = isset($options['handle_factory']) - ? $options['handle_factory'] : new CurlFactory(); - $this->selectTimeout = isset($options['select_timeout']) - ? $options['select_timeout'] : 1; - $this->maxHandles = isset($options['max_handles']) - ? $options['max_handles'] : 100; - } - - public function __destruct() - { - // Finish any open connections before terminating the script. - if ($this->handles) { - $this->execute(); - } - - if ($this->mh) { - curl_multi_close($this->mh); - $this->mh = null; - } - } - - public function __invoke(array $request) - { - $factory = $this->factory; - $result = $factory($request); - $entry = [ - 'request' => $request, - 'response' => [], - 'handle' => $result[0], - 'headers' => &$result[1], - 'body' => $result[2], - 'deferred' => new Deferred(), - ]; - - $id = (int) $result[0]; - - $future = new FutureArray( - $entry['deferred']->promise(), - [$this, 'execute'], - function () use ($id) { - return $this->cancel($id); - } - ); - - $this->addRequest($entry); - - // Transfer outstanding requests if there are too many open handles. - if (count($this->handles) >= $this->maxHandles) { - $this->execute(); - } - - return $future; - } - - /** - * Runs until all outstanding connections have completed. - */ - public function execute() - { - do { - - if ($this->active && - curl_multi_select($this->mh, $this->selectTimeout) === -1 - ) { - // Perform a usleep if a select returns -1. - // See: https://bugs.php.net/bug.php?id=61141 - usleep(250); - } - - // Add any delayed futures if needed. - if ($this->delays) { - $this->addDelays(); - } - - do { - $mrc = curl_multi_exec($this->mh, $this->active); - } while ($mrc === CURLM_CALL_MULTI_PERFORM); - - $this->processMessages(); - - // If there are delays but no transfers, then sleep for a bit. - if (!$this->active && $this->delays) { - usleep(500); - } - - } while ($this->active || $this->handles); - } - - private function addRequest(array &$entry) - { - $id = (int) $entry['handle']; - $this->handles[$id] = $entry; - - // If the request is a delay, then add the reques to the curl multi - // pool only after the specified delay. - if (isset($entry['request']['client']['delay'])) { - $this->delays[$id] = microtime(true) + ($entry['request']['client']['delay'] / 1000); - } elseif (empty($entry['request']['future'])) { - curl_multi_add_handle($this->mh, $entry['handle']); - } else { - curl_multi_add_handle($this->mh, $entry['handle']); - // "lazy" futures are only sent once the pool has many requests. - if ($entry['request']['future'] !== 'lazy') { - do { - $mrc = curl_multi_exec($this->mh, $this->active); - } while ($mrc === CURLM_CALL_MULTI_PERFORM); - $this->processMessages(); - } - } - } - - private function removeProcessed($id) - { - if (isset($this->handles[$id])) { - curl_multi_remove_handle( - $this->mh, - $this->handles[$id]['handle'] - ); - curl_close($this->handles[$id]['handle']); - unset($this->handles[$id], $this->delays[$id]); - } - } - - /** - * Cancels a handle from sending and removes references to it. - * - * @param int $id Handle ID to cancel and remove. - * - * @return bool True on success, false on failure. - */ - private function cancel($id) - { - // Cannot cancel if it has been processed. - if (!isset($this->handles[$id])) { - return false; - } - - $handle = $this->handles[$id]['handle']; - unset($this->delays[$id], $this->handles[$id]); - curl_multi_remove_handle($this->mh, $handle); - curl_close($handle); - - return true; - } - - private function addDelays() - { - $currentTime = microtime(true); - - foreach ($this->delays as $id => $delay) { - if ($currentTime >= $delay) { - unset($this->delays[$id]); - curl_multi_add_handle( - $this->mh, - $this->handles[$id]['handle'] - ); - } - } - } - - private function processMessages() - { - while ($done = curl_multi_info_read($this->mh)) { - $id = (int) $done['handle']; - - if (!isset($this->handles[$id])) { - // Probably was cancelled. - continue; - } - - $entry = $this->handles[$id]; - $entry['response']['transfer_stats'] = curl_getinfo($done['handle']); - - if ($done['result'] !== CURLM_OK) { - $entry['response']['curl']['errno'] = $done['result']; - if (function_exists('curl_strerror')) { - $entry['response']['curl']['error'] = curl_strerror($done['result']); - } - } - - $result = CurlFactory::createResponse( - $this, - $entry['request'], - $entry['response'], - $entry['headers'], - $entry['body'] - ); - - $this->removeProcessed($id); - $entry['deferred']->resolve($result); - } - } -} diff --git a/core/vendor/guzzlehttp/ringphp/src/Client/Middleware.php b/core/vendor/guzzlehttp/ringphp/src/Client/Middleware.php deleted file mode 100644 index 6fa7318..0000000 --- a/core/vendor/guzzlehttp/ringphp/src/Client/Middleware.php +++ /dev/null @@ -1,58 +0,0 @@ -result = $result; - } - - public function __invoke(array $request) - { - Core::doSleep($request); - $response = is_callable($this->result) - ? call_user_func($this->result, $request) - : $this->result; - - if (is_array($response)) { - $response = new CompletedFutureArray($response + [ - 'status' => null, - 'body' => null, - 'headers' => [], - 'reason' => null, - 'effective_url' => null, - ]); - } elseif (!$response instanceof FutureArrayInterface) { - throw new \InvalidArgumentException( - 'Response must be an array or FutureArrayInterface. Found ' - . Core::describeType($request) - ); - } - - return $response; - } -} diff --git a/core/vendor/guzzlehttp/ringphp/src/Client/StreamHandler.php b/core/vendor/guzzlehttp/ringphp/src/Client/StreamHandler.php deleted file mode 100644 index 3a18ec6..0000000 --- a/core/vendor/guzzlehttp/ringphp/src/Client/StreamHandler.php +++ /dev/null @@ -1,400 +0,0 @@ -options = $options; - } - - public function __invoke(array $request) - { - $url = Core::url($request); - Core::doSleep($request); - - try { - // Does not support the expect header. - $request = Core::removeHeader($request, 'Expect'); - $stream = $this->createStream($url, $request, $headers); - return $this->createResponse($request, $url, $headers, $stream); - } catch (RingException $e) { - return $this->createErrorResponse($url, $e); - } - } - - private function createResponse(array $request, $url, array $hdrs, $stream) - { - $parts = explode(' ', array_shift($hdrs), 3); - $response = [ - 'status' => $parts[1], - 'reason' => isset($parts[2]) ? $parts[2] : null, - 'headers' => Core::headersFromLines($hdrs), - 'effective_url' => $url, - ]; - - $stream = $this->checkDecode($request, $response, $stream); - - // If not streaming, then drain the response into a stream. - if (empty($request['client']['stream'])) { - $dest = isset($request['client']['save_to']) - ? $request['client']['save_to'] - : fopen('php://temp', 'r+'); - $stream = $this->drain($stream, $dest); - } - - $response['body'] = $stream; - - return new CompletedFutureArray($response); - } - - private function checkDecode(array $request, array $response, $stream) - { - // Automatically decode responses when instructed. - if (!empty($request['client']['decode_content'])) { - switch (Core::firstHeader($response, 'Content-Encoding', true)) { - case 'gzip': - case 'deflate': - $stream = new InflateStream(Stream::factory($stream)); - break; - } - } - - return $stream; - } - - /** - * Drains the stream into the "save_to" client option. - * - * @param resource $stream - * @param string|resource|StreamInterface $dest - * - * @return Stream - * @throws \RuntimeException when the save_to option is invalid. - */ - private function drain($stream, $dest) - { - if (is_resource($stream)) { - if (!is_resource($dest)) { - $stream = Stream::factory($stream); - } else { - stream_copy_to_stream($stream, $dest); - fclose($stream); - rewind($dest); - return $dest; - } - } - - // Stream the response into the destination stream - $dest = is_string($dest) - ? new Stream(Utils::open($dest, 'r+')) - : Stream::factory($dest); - - Utils::copyToStream($stream, $dest); - $dest->seek(0); - $stream->close(); - - return $dest; - } - - /** - * Creates an error response for the given stream. - * - * @param string $url - * @param RingException $e - * - * @return array - */ - private function createErrorResponse($url, RingException $e) - { - // Determine if the error was a networking error. - $message = $e->getMessage(); - - // This list can probably get more comprehensive. - if (strpos($message, 'getaddrinfo') // DNS lookup failed - || strpos($message, 'Connection refused') - ) { - $e = new ConnectException($e->getMessage(), 0, $e); - } - - return [ - 'status' => null, - 'body' => null, - 'headers' => [], - 'effective_url' => $url, - 'error' => $e - ]; - } - - /** - * Create a resource and check to ensure it was created successfully - * - * @param callable $callback Callable that returns stream resource - * - * @return resource - * @throws \RuntimeException on error - */ - private function createResource(callable $callback) - { - // Turn off error reporting while we try to initiate the request - $level = error_reporting(0); - $resource = call_user_func($callback); - error_reporting($level); - - // If the resource could not be created, then grab the last error and - // throw an exception. - if (!is_resource($resource)) { - $message = 'Error creating resource: '; - foreach ((array) error_get_last() as $key => $value) { - $message .= "[{$key}] {$value} "; - } - throw new RingException(trim($message)); - } - - return $resource; - } - - private function createStream( - $url, - array $request, - &$http_response_header - ) { - static $methods; - if (!$methods) { - $methods = array_flip(get_class_methods(__CLASS__)); - } - - // HTTP/1.1 streams using the PHP stream wrapper require a - // Connection: close header - if ((!isset($request['version']) || $request['version'] == '1.1') - && !Core::hasHeader($request, 'Connection') - ) { - $request['headers']['Connection'] = ['close']; - } - - // Ensure SSL is verified by default - if (!isset($request['client']['verify'])) { - $request['client']['verify'] = true; - } - - $params = []; - $options = $this->getDefaultOptions($request); - - if (isset($request['client'])) { - foreach ($request['client'] as $key => $value) { - $method = "add_{$key}"; - if (isset($methods[$method])) { - $this->{$method}($request, $options, $value, $params); - } - } - } - - return $this->createStreamResource( - $url, - $request, - $options, - $this->createContext($request, $options, $params), - $http_response_header - ); - } - - private function getDefaultOptions(array $request) - { - $headers = ""; - foreach ($request['headers'] as $name => $value) { - foreach ((array) $value as $val) { - $headers .= "$name: $val\r\n"; - } - } - - $context = [ - 'http' => [ - 'method' => $request['http_method'], - 'header' => $headers, - 'protocol_version' => isset($request['version']) ? $request['version'] : 1.1, - 'ignore_errors' => true, - 'follow_location' => 0, - ], - ]; - - $body = Core::body($request); - if (isset($body)) { - $context['http']['content'] = $body; - // Prevent the HTTP handler from adding a Content-Type header. - if (!Core::hasHeader($request, 'Content-Type')) { - $context['http']['header'] .= "Content-Type:\r\n"; - } - } - - $context['http']['header'] = rtrim($context['http']['header']); - - return $context; - } - - private function add_proxy(array $request, &$options, $value, &$params) - { - if (!is_array($value)) { - $options['http']['proxy'] = $value; - } else { - $scheme = isset($request['scheme']) ? $request['scheme'] : 'http'; - if (isset($value[$scheme])) { - $options['http']['proxy'] = $value[$scheme]; - } - } - } - - private function add_timeout(array $request, &$options, $value, &$params) - { - $options['http']['timeout'] = $value; - } - - private function add_verify(array $request, &$options, $value, &$params) - { - if ($value === true) { - // PHP 5.6 or greater will find the system cert by default. When - // < 5.6, use the Guzzle bundled cacert. - if (PHP_VERSION_ID < 50600) { - $options['ssl']['cafile'] = ClientUtils::getDefaultCaBundle(); - } - } elseif (is_string($value)) { - $options['ssl']['cafile'] = $value; - if (!file_exists($value)) { - throw new RingException("SSL CA bundle not found: $value"); - } - } elseif ($value === false) { - $options['ssl']['verify_peer'] = false; - return; - } else { - throw new RingException('Invalid verify request option'); - } - - $options['ssl']['verify_peer'] = true; - $options['ssl']['allow_self_signed'] = true; - } - - private function add_cert(array $request, &$options, $value, &$params) - { - if (is_array($value)) { - $options['ssl']['passphrase'] = $value[1]; - $value = $value[0]; - } - - if (!file_exists($value)) { - throw new RingException("SSL certificate not found: {$value}"); - } - - $options['ssl']['local_cert'] = $value; - } - - private function add_progress(array $request, &$options, $value, &$params) - { - $fn = function ($code, $_, $_, $_, $transferred, $total) use ($value) { - if ($code == STREAM_NOTIFY_PROGRESS) { - $value($total, $transferred, null, null); - } - }; - - // Wrap the existing function if needed. - $params['notification'] = isset($params['notification']) - ? Core::callArray([$params['notification'], $fn]) - : $fn; - } - - private function add_debug(array $request, &$options, $value, &$params) - { - static $map = [ - STREAM_NOTIFY_CONNECT => 'CONNECT', - STREAM_NOTIFY_AUTH_REQUIRED => 'AUTH_REQUIRED', - STREAM_NOTIFY_AUTH_RESULT => 'AUTH_RESULT', - STREAM_NOTIFY_MIME_TYPE_IS => 'MIME_TYPE_IS', - STREAM_NOTIFY_FILE_SIZE_IS => 'FILE_SIZE_IS', - STREAM_NOTIFY_REDIRECTED => 'REDIRECTED', - STREAM_NOTIFY_PROGRESS => 'PROGRESS', - STREAM_NOTIFY_FAILURE => 'FAILURE', - STREAM_NOTIFY_COMPLETED => 'COMPLETED', - STREAM_NOTIFY_RESOLVE => 'RESOLVE', - ]; - - static $args = ['severity', 'message', 'message_code', - 'bytes_transferred', 'bytes_max']; - - $value = Core::getDebugResource($value); - $ident = $request['http_method'] . ' ' . Core::url($request); - $fn = function () use ($ident, $value, $map, $args) { - $passed = func_get_args(); - $code = array_shift($passed); - fprintf($value, '<%s> [%s] ', $ident, $map[$code]); - foreach (array_filter($passed) as $i => $v) { - fwrite($value, $args[$i] . ': "' . $v . '" '); - } - fwrite($value, "\n"); - }; - - // Wrap the existing function if needed. - $params['notification'] = isset($params['notification']) - ? Core::callArray([$params['notification'], $fn]) - : $fn; - } - - private function applyCustomOptions(array $request, array &$options) - { - if (!isset($request['client']['stream_context'])) { - return; - } - - if (!is_array($request['client']['stream_context'])) { - throw new RingException('stream_context must be an array'); - } - - $options = array_replace_recursive( - $options, - $request['client']['stream_context'] - ); - } - - private function createContext(array $request, array $options, array $params) - { - $this->applyCustomOptions($request, $options); - return $this->createResource( - function () use ($request, $options, $params) { - return stream_context_create($options, $params); - }, - $request, - $options - ); - } - - private function createStreamResource( - $url, - array $request, - array $options, - $context, - &$http_response_header - ) { - return $this->createResource( - function () use ($url, &$http_response_header, $context) { - if (false === strpos($url, 'http')) { - trigger_error("URL is invalid: {$url}", E_USER_WARNING); - return null; - } - return fopen($url, 'r', null, $context); - }, - $request, - $options - ); - } -} diff --git a/core/vendor/guzzlehttp/ringphp/src/Core.php b/core/vendor/guzzlehttp/ringphp/src/Core.php deleted file mode 100644 index dd7d1a0..0000000 --- a/core/vendor/guzzlehttp/ringphp/src/Core.php +++ /dev/null @@ -1,364 +0,0 @@ - $value) { - if (!strcasecmp($name, $header)) { - $result = array_merge($result, $value); - } - } - } - - return $result; - } - - /** - * Gets a header value from a message as a string or null - * - * This method searches through the "headers" key of a message for a header - * using a case-insensitive search. The lines of the header are imploded - * using commas into a single string return value. - * - * @param array $message Request or response hash. - * @param string $header Header to retrieve - * - * @return string|null Returns the header string if found, or null if not. - */ - public static function header($message, $header) - { - $match = self::headerLines($message, $header); - return $match ? implode(', ', $match) : null; - } - - /** - * Returns the first header value from a message as a string or null. If - * a header line contains multiple values separated by a comma, then this - * function will return the first value in the list. - * - * @param array $message Request or response hash. - * @param string $header Header to retrieve - * - * @return string|null Returns the value as a string if found. - */ - public static function firstHeader($message, $header) - { - if (!empty($message['headers'])) { - foreach ($message['headers'] as $name => $value) { - if (!strcasecmp($name, $header)) { - // Return the match itself if it is a single value. - $pos = strpos($value[0], ','); - return $pos ? substr($value[0], 0, $pos) : $value[0]; - } - } - } - - return null; - } - - /** - * Returns true if a message has the provided case-insensitive header. - * - * @param array $message Request or response hash. - * @param string $header Header to check - * - * @return bool - */ - public static function hasHeader($message, $header) - { - if (!empty($message['headers'])) { - foreach ($message['headers'] as $name => $value) { - if (!strcasecmp($name, $header)) { - return true; - } - } - } - - return false; - } - - /** - * Parses an array of header lines into an associative array of headers. - * - * @param array $lines Header lines array of strings in the following - * format: "Name: Value" - * @return array - */ - public static function headersFromLines($lines) - { - $headers = []; - - foreach ($lines as $line) { - $parts = explode(':', $line, 2); - $headers[trim($parts[0])][] = isset($parts[1]) - ? trim($parts[1]) - : null; - } - - return $headers; - } - - /** - * Removes a header from a message using a case-insensitive comparison. - * - * @param array $message Message that contains 'headers' - * @param string $header Header to remove - * - * @return array - */ - public static function removeHeader(array $message, $header) - { - if (isset($message['headers'])) { - foreach (array_keys($message['headers']) as $key) { - if (!strcasecmp($header, $key)) { - unset($message['headers'][$key]); - } - } - } - - return $message; - } - - /** - * Replaces any existing case insensitive headers with the given value. - * - * @param array $message Message that contains 'headers' - * @param string $header Header to set. - * @param array $value Value to set. - * - * @return array - */ - public static function setHeader(array $message, $header, array $value) - { - $message = self::removeHeader($message, $header); - $message['headers'][$header] = $value; - - return $message; - } - - /** - * Creates a URL string from a request. - * - * If the "url" key is present on the request, it is returned, otherwise - * the url is built up based on the scheme, host, uri, and query_string - * request values. - * - * @param array $request Request to get the URL from - * - * @return string Returns the request URL as a string. - * @throws \InvalidArgumentException if no Host header is present. - */ - public static function url(array $request) - { - if (isset($request['url'])) { - return $request['url']; - } - - $uri = (isset($request['scheme']) - ? $request['scheme'] : 'http') . '://'; - - if ($host = self::header($request, 'host')) { - $uri .= $host; - } else { - throw new \InvalidArgumentException('No Host header was provided'); - } - - if (isset($request['uri'])) { - $uri .= $request['uri']; - } - - if (isset($request['query_string'])) { - $uri .= '?' . $request['query_string']; - } - - return $uri; - } - - /** - * Reads the body of a message into a string. - * - * @param array|FutureArrayInterface $message Array containing a "body" key - * - * @return null|string Returns the body as a string or null if not set. - * @throws \InvalidArgumentException if a request body is invalid. - */ - public static function body($message) - { - if (!isset($message['body'])) { - return null; - } - - if ($message['body'] instanceof StreamInterface) { - return (string) $message['body']; - } - - switch (gettype($message['body'])) { - case 'string': - return $message['body']; - case 'resource': - return stream_get_contents($message['body']); - case 'object': - if ($message['body'] instanceof \Iterator) { - return implode('', iterator_to_array($message['body'])); - } elseif (method_exists($message['body'], '__toString')) { - return (string) $message['body']; - } - default: - throw new \InvalidArgumentException('Invalid request body: ' - . self::describeType($message['body'])); - } - } - - /** - * Rewind the body of the provided message if possible. - * - * @param array $message Message that contains a 'body' field. - * - * @return bool Returns true on success, false on failure - */ - public static function rewindBody($message) - { - if ($message['body'] instanceof StreamInterface) { - return $message['body']->seek(0); - } - - if ($message['body'] instanceof \Generator) { - return false; - } - - if ($message['body'] instanceof \Iterator) { - $message['body']->rewind(); - return true; - } - - if (is_resource($message['body'])) { - return rewind($message['body']); - } - - return is_string($message['body']) - || (is_object($message['body']) - && method_exists($message['body'], '__toString')); - } - - /** - * Debug function used to describe the provided value type and class. - * - * @param mixed $input - * - * @return string Returns a string containing the type of the variable and - * if a class is provided, the class name. - */ - public static function describeType($input) - { - switch (gettype($input)) { - case 'object': - return 'object(' . get_class($input) . ')'; - case 'array': - return 'array(' . count($input) . ')'; - default: - ob_start(); - var_dump($input); - // normalize float vs double - return str_replace('double(', 'float(', rtrim(ob_get_clean())); - } - } - - /** - * Sleep for the specified amount of time specified in the request's - * ['client']['delay'] option if present. - * - * This function should only be used when a non-blocking sleep is not - * possible. - * - * @param array $request Request to sleep - */ - public static function doSleep(array $request) - { - if (isset($request['client']['delay'])) { - usleep($request['client']['delay'] * 1000); - } - } - - /** - * Returns a proxied future that modifies the dereferenced value of another - * future using a promise. - * - * @param FutureArrayInterface $future Future to wrap with a new future - * @param callable $onFulfilled Invoked when the future fulfilled - * @param callable $onRejected Invoked when the future rejected - * @param callable $onProgress Invoked when the future progresses - * - * @return FutureArray - */ - public static function proxy( - FutureArrayInterface $future, - callable $onFulfilled = null, - callable $onRejected = null, - callable $onProgress = null - ) { - return new FutureArray( - $future->then($onFulfilled, $onRejected, $onProgress), - [$future, 'wait'], - [$future, 'cancel'] - ); - } - - /** - * Returns a debug stream based on the provided variable. - * - * @param mixed $value Optional value - * - * @return resource - */ - public static function getDebugResource($value = null) - { - if (is_resource($value)) { - return $value; - } elseif (defined('STDOUT')) { - return STDOUT; - } else { - return fopen('php://output', 'w'); - } - } -} diff --git a/core/vendor/guzzlehttp/ringphp/src/Exception/CancelledException.php b/core/vendor/guzzlehttp/ringphp/src/Exception/CancelledException.php deleted file mode 100644 index 95b353a..0000000 --- a/core/vendor/guzzlehttp/ringphp/src/Exception/CancelledException.php +++ /dev/null @@ -1,7 +0,0 @@ -wrappedPromise = $promise; - $this->waitfn = $wait; - $this->cancelfn = $cancel; - } - - public function wait() - { - if (!$this->isRealized) { - $this->addShadow(); - if (!$this->isRealized && $this->waitfn) { - $this->invokeWait(); - } - if (!$this->isRealized) { - $this->error = new RingException('Waiting did not resolve future'); - } - } - - if ($this->error) { - throw $this->error; - } - - return $this->result; - } - - public function promise() - { - return $this->wrappedPromise; - } - - public function then( - callable $onFulfilled = null, - callable $onRejected = null, - callable $onProgress = null - ) { - return $this->wrappedPromise->then($onFulfilled, $onRejected, $onProgress); - } - - public function cancel() - { - if (!$this->isRealized) { - $cancelfn = $this->cancelfn; - $this->waitfn = $this->cancelfn = null; - $this->isRealized = true; - $this->error = new CancelledFutureAccessException(); - if ($cancelfn) { - $cancelfn($this); - } - } - } - - private function addShadow() - { - // Get the result and error when the promise is resolved. Note that - // calling this function might trigger the resolution immediately. - $this->wrappedPromise->then( - function ($value) { - $this->isRealized = true; - $this->result = $value; - $this->waitfn = $this->cancelfn = null; - }, - function ($error) { - $this->isRealized = true; - $this->error = $error; - $this->waitfn = $this->cancelfn = null; - } - ); - } - - private function invokeWait() - { - try { - $wait = $this->waitfn; - $this->waitfn = null; - $wait(); - } catch (\Exception $e) { - // Defer can throw to reject. - $this->error = $e; - $this->isRealized = true; - } - } -} diff --git a/core/vendor/guzzlehttp/ringphp/src/Future/CompletedFutureArray.php b/core/vendor/guzzlehttp/ringphp/src/Future/CompletedFutureArray.php deleted file mode 100644 index 0a90c93..0000000 --- a/core/vendor/guzzlehttp/ringphp/src/Future/CompletedFutureArray.php +++ /dev/null @@ -1,43 +0,0 @@ -result[$offset]); - } - - public function offsetGet($offset) - { - return $this->result[$offset]; - } - - public function offsetSet($offset, $value) - { - $this->result[$offset] = $value; - } - - public function offsetUnset($offset) - { - unset($this->result[$offset]); - } - - public function count() - { - return count($this->result); - } - - public function getIterator() - { - return new \ArrayIterator($this->result); - } -} diff --git a/core/vendor/guzzlehttp/ringphp/src/Future/CompletedFutureValue.php b/core/vendor/guzzlehttp/ringphp/src/Future/CompletedFutureValue.php deleted file mode 100644 index 0d25af7..0000000 --- a/core/vendor/guzzlehttp/ringphp/src/Future/CompletedFutureValue.php +++ /dev/null @@ -1,57 +0,0 @@ -result = $result; - $this->error = $e; - } - - public function wait() - { - if ($this->error) { - throw $this->error; - } - - return $this->result; - } - - public function cancel() {} - - public function promise() - { - if (!$this->cachedPromise) { - $this->cachedPromise = $this->error - ? new RejectedPromise($this->error) - : new FulfilledPromise($this->result); - } - - return $this->cachedPromise; - } - - public function then( - callable $onFulfilled = null, - callable $onRejected = null, - callable $onProgress = null - ) { - return $this->promise()->then($onFulfilled, $onRejected, $onProgress); - } -} diff --git a/core/vendor/guzzlehttp/ringphp/src/Future/FutureArray.php b/core/vendor/guzzlehttp/ringphp/src/Future/FutureArray.php deleted file mode 100644 index 3d64c96..0000000 --- a/core/vendor/guzzlehttp/ringphp/src/Future/FutureArray.php +++ /dev/null @@ -1,40 +0,0 @@ -_value[$offset]); - } - - public function offsetGet($offset) - { - return $this->_value[$offset]; - } - - public function offsetSet($offset, $value) - { - $this->_value[$offset] = $value; - } - - public function offsetUnset($offset) - { - unset($this->_value[$offset]); - } - - public function count() - { - return count($this->_value); - } - - public function getIterator() - { - return new \ArrayIterator($this->_value); - } -} diff --git a/core/vendor/guzzlehttp/ringphp/src/Future/FutureArrayInterface.php b/core/vendor/guzzlehttp/ringphp/src/Future/FutureArrayInterface.php deleted file mode 100644 index 58f5f73..0000000 --- a/core/vendor/guzzlehttp/ringphp/src/Future/FutureArrayInterface.php +++ /dev/null @@ -1,11 +0,0 @@ -_value = $this->wait(); - } -} diff --git a/core/vendor/guzzlehttp/ringphp/tests/Client/CurlFactoryTest.php b/core/vendor/guzzlehttp/ringphp/tests/Client/CurlFactoryTest.php deleted file mode 100644 index 0f787c9..0000000 --- a/core/vendor/guzzlehttp/ringphp/tests/Client/CurlFactoryTest.php +++ /dev/null @@ -1,792 +0,0 @@ - 200, - 'headers' => [ - 'Foo' => ['Bar'], - 'Baz' => ['bam'], - 'Content-Length' => [2], - ], - 'body' => 'hi', - ]]); - - $stream = Stream::factory(); - - $request = [ - 'http_method' => 'PUT', - 'headers' => [ - 'host' => [Server::$url], - 'Hi' => [' 123'], - ], - 'body' => 'testing', - 'client' => ['save_to' => $stream], - ]; - - $f = new CurlFactory(); - $result = $f($request); - $this->assertInternalType('array', $result); - $this->assertCount(3, $result); - $this->assertInternalType('resource', $result[0]); - $this->assertInternalType('array', $result[1]); - $this->assertSame($stream, $result[2]); - curl_close($result[0]); - - $this->assertEquals('PUT', $_SERVER['_curl'][CURLOPT_CUSTOMREQUEST]); - $this->assertEquals( - 'http://http://127.0.0.1:8125/', - $_SERVER['_curl'][CURLOPT_URL] - ); - // Sends via post fields when the request is small enough - $this->assertEquals('testing', $_SERVER['_curl'][CURLOPT_POSTFIELDS]); - $this->assertEquals(0, $_SERVER['_curl'][CURLOPT_RETURNTRANSFER]); - $this->assertEquals(0, $_SERVER['_curl'][CURLOPT_HEADER]); - $this->assertEquals(150, $_SERVER['_curl'][CURLOPT_CONNECTTIMEOUT]); - $this->assertInstanceOf('Closure', $_SERVER['_curl'][CURLOPT_HEADERFUNCTION]); - - if (defined('CURLOPT_PROTOCOLS')) { - $this->assertEquals( - CURLPROTO_HTTP | CURLPROTO_HTTPS, - $_SERVER['_curl'][CURLOPT_PROTOCOLS] - ); - } - - $this->assertContains('Expect:', $_SERVER['_curl'][CURLOPT_HTTPHEADER]); - $this->assertContains('Accept:', $_SERVER['_curl'][CURLOPT_HTTPHEADER]); - $this->assertContains('Content-Type:', $_SERVER['_curl'][CURLOPT_HTTPHEADER]); - $this->assertContains('Hi: 123', $_SERVER['_curl'][CURLOPT_HTTPHEADER]); - $this->assertContains('host: http://127.0.0.1:8125/', $_SERVER['_curl'][CURLOPT_HTTPHEADER]); - } - - public function testSendsHeadRequests() - { - Server::flush(); - Server::enqueue([['status' => 200]]); - $a = new CurlMultiHandler(); - $response = $a([ - 'http_method' => 'HEAD', - 'headers' => ['host' => [Server::$host]], - ]); - $response->wait(); - $this->assertEquals(true, $_SERVER['_curl'][CURLOPT_NOBODY]); - $checks = [CURLOPT_WRITEFUNCTION, CURLOPT_READFUNCTION, CURLOPT_FILE, CURLOPT_INFILE]; - foreach ($checks as $check) { - $this->assertArrayNotHasKey($check, $_SERVER['_curl']); - } - $this->assertEquals('HEAD', Server::received()[0]['http_method']); - } - - public function testCanAddCustomCurlOptions() - { - Server::flush(); - Server::enqueue([['status' => 200]]); - $a = new CurlMultiHandler(); - $a([ - 'http_method' => 'GET', - 'headers' => ['host' => [Server::$host]], - 'client' => ['curl' => [CURLOPT_LOW_SPEED_LIMIT => 10]], - ]); - $this->assertEquals(10, $_SERVER['_curl'][CURLOPT_LOW_SPEED_LIMIT]); - } - - /** - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage SSL CA bundle not found: /does/not/exist - */ - public function testValidatesVerify() - { - $f = new CurlFactory(); - $f([ - 'http_method' => 'GET', - 'headers' => ['host' => ['foo.com']], - 'client' => ['verify' => '/does/not/exist'], - ]); - } - - public function testCanSetVerifyToFile() - { - $f = new CurlFactory(); - $f([ - 'http_method' => 'GET', - 'headers' => ['host' => ['foo.com']], - 'client' => ['verify' => __FILE__], - ]); - $this->assertEquals(__FILE__, $_SERVER['_curl'][CURLOPT_CAINFO]); - $this->assertEquals(2, $_SERVER['_curl'][CURLOPT_SSL_VERIFYHOST]); - $this->assertEquals(true, $_SERVER['_curl'][CURLOPT_SSL_VERIFYPEER]); - } - - public function testAddsVerifyAsTrue() - { - $f = new CurlFactory(); - $f([ - 'http_method' => 'GET', - 'headers' => ['host' => ['foo.com']], - 'client' => ['verify' => true], - ]); - $this->assertEquals(2, $_SERVER['_curl'][CURLOPT_SSL_VERIFYHOST]); - $this->assertEquals(true, $_SERVER['_curl'][CURLOPT_SSL_VERIFYPEER]); - $this->assertArrayNotHasKey(CURLOPT_CAINFO, $_SERVER['_curl']); - } - - public function testCanDisableVerify() - { - $f = new CurlFactory(); - $f([ - 'http_method' => 'GET', - 'headers' => ['host' => ['foo.com']], - 'client' => ['verify' => false], - ]); - $this->assertEquals(0, $_SERVER['_curl'][CURLOPT_SSL_VERIFYHOST]); - $this->assertEquals(false, $_SERVER['_curl'][CURLOPT_SSL_VERIFYPEER]); - } - - public function testAddsProxy() - { - $f = new CurlFactory(); - $f([ - 'http_method' => 'GET', - 'headers' => ['host' => ['foo.com']], - 'client' => ['proxy' => 'http://bar.com'], - ]); - $this->assertEquals('http://bar.com', $_SERVER['_curl'][CURLOPT_PROXY]); - } - - public function testAddsViaScheme() - { - $f = new CurlFactory(); - $f([ - 'http_method' => 'GET', - 'scheme' => 'http', - 'headers' => ['host' => ['foo.com']], - 'client' => [ - 'proxy' => ['http' => 'http://bar.com', 'https' => 'https://t'], - ], - ]); - $this->assertEquals('http://bar.com', $_SERVER['_curl'][CURLOPT_PROXY]); - } - - /** - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage SSL private key not found: /does/not/exist - */ - public function testValidatesSslKey() - { - $f = new CurlFactory(); - $f([ - 'http_method' => 'GET', - 'headers' => ['host' => ['foo.com']], - 'client' => ['ssl_key' => '/does/not/exist'], - ]); - } - - public function testAddsSslKey() - { - $f = new CurlFactory(); - $f([ - 'http_method' => 'GET', - 'headers' => ['host' => ['foo.com']], - 'client' => ['ssl_key' => __FILE__], - ]); - $this->assertEquals(__FILE__, $_SERVER['_curl'][CURLOPT_SSLKEY]); - } - - public function testAddsSslKeyWithPassword() - { - $f = new CurlFactory(); - $f([ - 'http_method' => 'GET', - 'headers' => ['host' => ['foo.com']], - 'client' => ['ssl_key' => [__FILE__, 'test']], - ]); - $this->assertEquals(__FILE__, $_SERVER['_curl'][CURLOPT_SSLKEY]); - $this->assertEquals('test', $_SERVER['_curl'][CURLOPT_SSLKEYPASSWD]); - } - - /** - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage SSL certificate not found: /does/not/exist - */ - public function testValidatesCert() - { - $f = new CurlFactory(); - $f([ - 'http_method' => 'GET', - 'headers' => ['host' => ['foo.com']], - 'client' => ['cert' => '/does/not/exist'], - ]); - } - - public function testAddsCert() - { - $f = new CurlFactory(); - $f([ - 'http_method' => 'GET', - 'headers' => ['host' => ['foo.com']], - 'client' => ['cert' => __FILE__], - ]); - $this->assertEquals(__FILE__, $_SERVER['_curl'][CURLOPT_SSLCERT]); - } - - public function testAddsCertWithPassword() - { - $f = new CurlFactory(); - $f([ - 'http_method' => 'GET', - 'headers' => ['host' => ['foo.com']], - 'client' => ['cert' => [__FILE__, 'test']], - ]); - $this->assertEquals(__FILE__, $_SERVER['_curl'][CURLOPT_SSLCERT]); - $this->assertEquals('test', $_SERVER['_curl'][CURLOPT_SSLCERTPASSWD]); - } - - /** - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage progress client option must be callable - */ - public function testValidatesProgress() - { - $f = new CurlFactory(); - $f([ - 'http_method' => 'GET', - 'headers' => ['host' => ['foo.com']], - 'client' => ['progress' => 'foo'], - ]); - } - - public function testEmitsDebugInfoToStream() - { - $res = fopen('php://memory', 'r+'); - Server::flush(); - Server::enqueue([['status' => 200]]); - $a = new CurlMultiHandler(); - $response = $a([ - 'http_method' => 'HEAD', - 'headers' => ['host' => [Server::$host]], - 'client' => ['debug' => $res], - ]); - $response->wait(); - rewind($res); - $output = str_replace("\r", '', stream_get_contents($res)); - $this->assertContains( - "> HEAD / HTTP/1.1\nhost: 127.0.0.1:8125\n\n", - $output - ); - $this->assertContains("< HTTP/1.1 200", $output); - fclose($res); - } - - public function testEmitsProgressToFunction() - { - Server::flush(); - Server::enqueue([['status' => 200]]); - $a = new CurlMultiHandler(); - $called = []; - $response = $a([ - 'http_method' => 'HEAD', - 'headers' => ['host' => [Server::$host]], - 'client' => [ - 'progress' => function () use (&$called) { - $called[] = func_get_args(); - }, - ], - ]); - $response->wait(); - $this->assertNotEmpty($called); - foreach ($called as $call) { - $this->assertCount(4, $call); - } - } - - private function addDecodeResponse($withEncoding = true) - { - $content = gzencode('test'); - $response = [ - 'status' => 200, - 'reason' => 'OK', - 'headers' => ['Content-Length' => [strlen($content)]], - 'body' => $content, - ]; - - if ($withEncoding) { - $response['headers']['Content-Encoding'] = ['gzip']; - } - - Server::flush(); - Server::enqueue([$response]); - - return $content; - } - - public function testDecodesGzippedResponses() - { - $this->addDecodeResponse(); - $handler = new CurlMultiHandler(); - $response = $handler([ - 'http_method' => 'GET', - 'headers' => ['host' => [Server::$host]], - 'client' => ['decode_content' => true], - ]); - $response->wait(); - $this->assertEquals('test', Core::body($response)); - $this->assertEquals('', $_SERVER['_curl'][CURLOPT_ENCODING]); - $sent = Server::received()[0]; - $this->assertNull(Core::header($sent, 'Accept-Encoding')); - } - - public function testDecodesGzippedResponsesWithHeader() - { - $this->addDecodeResponse(); - $handler = new CurlMultiHandler(); - $response = $handler([ - 'http_method' => 'GET', - 'headers' => [ - 'host' => [Server::$host], - 'Accept-Encoding' => ['gzip'], - ], - 'client' => ['decode_content' => true], - ]); - $response->wait(); - $this->assertEquals('gzip', $_SERVER['_curl'][CURLOPT_ENCODING]); - $sent = Server::received()[0]; - $this->assertEquals('gzip', Core::header($sent, 'Accept-Encoding')); - $this->assertEquals('test', Core::body($response)); - } - - public function testDoesNotForceDecode() - { - $content = $this->addDecodeResponse(); - $handler = new CurlMultiHandler(); - $response = $handler([ - 'http_method' => 'GET', - 'headers' => ['host' => [Server::$host]], - 'client' => ['decode_content' => false], - ]); - $response->wait(); - $sent = Server::received()[0]; - $this->assertNull(Core::header($sent, 'Accept-Encoding')); - $this->assertEquals($content, Core::body($response)); - } - - public function testProtocolVersion() - { - Server::flush(); - Server::enqueue([['status' => 200]]); - $a = new CurlMultiHandler(); - $a([ - 'http_method' => 'GET', - 'headers' => ['host' => [Server::$host]], - 'version' => 1.0, - ]); - $this->assertEquals(CURL_HTTP_VERSION_1_0, $_SERVER['_curl'][CURLOPT_HTTP_VERSION]); - } - - /** - * @expectedException \InvalidArgumentException - */ - public function testValidatesSaveTo() - { - $handler = new CurlMultiHandler(); - $handler([ - 'http_method' => 'GET', - 'headers' => ['host' => [Server::$host]], - 'client' => ['save_to' => true], - ]); - } - - public function testSavesToStream() - { - $stream = fopen('php://memory', 'r+'); - $this->addDecodeResponse(); - $handler = new CurlMultiHandler(); - $response = $handler([ - 'http_method' => 'GET', - 'headers' => ['host' => [Server::$host]], - 'client' => [ - 'decode_content' => true, - 'save_to' => $stream, - ], - ]); - $response->wait(); - rewind($stream); - $this->assertEquals('test', stream_get_contents($stream)); - } - - public function testSavesToGuzzleStream() - { - $stream = Stream::factory(); - $this->addDecodeResponse(); - $handler = new CurlMultiHandler(); - $response = $handler([ - 'http_method' => 'GET', - 'headers' => ['host' => [Server::$host]], - 'client' => [ - 'decode_content' => true, - 'save_to' => $stream, - ], - ]); - $response->wait(); - $this->assertEquals('test', (string) $stream); - } - - public function testSavesToFileOnDisk() - { - $tmpfile = tempnam(sys_get_temp_dir(), 'testfile'); - $this->addDecodeResponse(); - $handler = new CurlMultiHandler(); - $response = $handler([ - 'http_method' => 'GET', - 'headers' => ['host' => [Server::$host]], - 'client' => [ - 'decode_content' => true, - 'save_to' => $tmpfile, - ], - ]); - $response->wait(); - $this->assertEquals('test', file_get_contents($tmpfile)); - unlink($tmpfile); - } - - /** - * @expectedException \InvalidArgumentException - */ - public function testValidatesBody() - { - $handler = new CurlMultiHandler(); - $handler([ - 'http_method' => 'GET', - 'headers' => ['host' => [Server::$host]], - 'body' => false, - ]); - } - - public function testAddsLargePayloadFromStreamWithNoSizeUsingChunked() - { - $stream = Stream::factory('foo'); - $stream = FnStream::decorate($stream, [ - 'getSize' => function () { - return null; - } - ]); - $this->addDecodeResponse(); - $handler = new CurlMultiHandler(); - $response = $handler([ - 'http_method' => 'GET', - 'headers' => ['host' => [Server::$host]], - 'body' => $stream, - ]); - $response->wait(); - $sent = Server::received()[0]; - $this->assertEquals('chunked', Core::header($sent, 'Transfer-Encoding')); - $this->assertNull(Core::header($sent, 'Content-Length')); - $this->assertEquals('foo', $sent['body']); - } - - public function testAddsPayloadFromIterator() - { - $iter = new \ArrayIterator(['f', 'o', 'o']); - $this->addDecodeResponse(); - $handler = new CurlMultiHandler(); - $response = $handler([ - 'http_method' => 'GET', - 'headers' => ['host' => [Server::$host]], - 'body' => $iter, - ]); - $response->wait(); - $sent = Server::received()[0]; - $this->assertEquals('chunked', Core::header($sent, 'Transfer-Encoding')); - $this->assertNull(Core::header($sent, 'Content-Length')); - $this->assertEquals('foo', $sent['body']); - } - - public function testAddsPayloadFromResource() - { - $res = fopen('php://memory', 'r+'); - $data = str_repeat('.', 1000000); - fwrite($res, $data); - rewind($res); - $this->addDecodeResponse(); - $handler = new CurlMultiHandler(); - $response = $handler([ - 'http_method' => 'GET', - 'headers' => [ - 'host' => [Server::$host], - 'content-length' => [1000000], - ], - 'body' => $res, - ]); - $response->wait(); - $sent = Server::received()[0]; - $this->assertNull(Core::header($sent, 'Transfer-Encoding')); - $this->assertEquals(1000000, Core::header($sent, 'Content-Length')); - $this->assertEquals($data, $sent['body']); - } - - public function testAddsContentLengthFromStream() - { - $stream = Stream::factory('foo'); - $this->addDecodeResponse(); - $handler = new CurlMultiHandler(); - $response = $handler([ - 'http_method' => 'GET', - 'headers' => ['host' => [Server::$host]], - 'body' => $stream, - ]); - $response->wait(); - $sent = Server::received()[0]; - $this->assertEquals(3, Core::header($sent, 'Content-Length')); - $this->assertNull(Core::header($sent, 'Transfer-Encoding')); - $this->assertEquals('foo', $sent['body']); - } - - public function testDoesNotAddMultipleContentLengthHeaders() - { - $this->addDecodeResponse(); - $handler = new CurlMultiHandler(); - $response = $handler([ - 'http_method' => 'GET', - 'headers' => [ - 'host' => [Server::$host], - 'content-length' => [3], - ], - 'body' => 'foo', - ]); - $response->wait(); - $sent = Server::received()[0]; - $this->assertEquals(3, Core::header($sent, 'Content-Length')); - $this->assertNull(Core::header($sent, 'Transfer-Encoding')); - $this->assertEquals('foo', $sent['body']); - } - - public function testSendsPostWithNoBodyOrDefaultContentType() - { - Server::flush(); - Server::enqueue([['status' => 200]]); - $handler = new CurlMultiHandler(); - $response = $handler([ - 'http_method' => 'POST', - 'uri' => '/', - 'headers' => ['host' => [Server::$host]], - ]); - $response->wait(); - $received = Server::received()[0]; - $this->assertEquals('POST', $received['http_method']); - $this->assertNull(Core::header($received, 'content-type')); - $this->assertSame('0', Core::firstHeader($received, 'content-length')); - } - - public function testFailsWhenNoResponseAndNoBody() - { - $res = CurlFactory::createResponse(function () {}, [], [], [], null); - $this->assertInstanceOf('GuzzleHttp\Ring\Exception\RingException', $res['error']); - $this->assertContains( - 'No response was received for a request with no body', - $res['error']->getMessage() - ); - } - - public function testFailsWhenCannotRewindRetry() - { - $res = CurlFactory::createResponse(function () {}, [ - 'body' => new NoSeekStream(Stream::factory('foo')) - ], [], [], null); - $this->assertInstanceOf('GuzzleHttp\Ring\Exception\RingException', $res['error']); - $this->assertContains( - 'rewind the request body failed', - $res['error']->getMessage() - ); - } - - public function testRetriesWhenBodyCanBeRewound() - { - $callHandler = $called = false; - $res = CurlFactory::createResponse(function () use (&$callHandler) { - $callHandler = true; - return ['status' => 200]; - }, [ - 'body' => FnStream::decorate(Stream::factory('test'), [ - 'seek' => function () use (&$called) { - $called = true; - return true; - } - ]) - ], [], [], null); - - $this->assertTrue($callHandler); - $this->assertTrue($called); - $this->assertEquals('200', $res['status']); - } - - public function testFailsWhenRetryMoreThanThreeTimes() - { - $call = 0; - $mock = new MockHandler(function (array $request) use (&$mock, &$call) { - $call++; - return CurlFactory::createResponse($mock, $request, [], [], null); - }); - $response = $mock([ - 'http_method' => 'GET', - 'body' => 'test', - ]); - $this->assertEquals(3, $call); - $this->assertArrayHasKey('error', $response); - $this->assertContains( - 'The cURL request was retried 3 times', - $response['error']->getMessage() - ); - } - - public function testHandles100Continue() - { - Server::flush(); - Server::enqueue([ - [ - 'status' => '200', - 'reason' => 'OK', - 'headers' => [ - 'Test' => ['Hello'], - 'Content-Length' => ['4'], - ], - 'body' => 'test', - ], - ]); - - $request = [ - 'http_method' => 'PUT', - 'headers' => [ - 'Host' => [Server::$host], - 'Expect' => ['100-Continue'], - ], - 'body' => 'test', - ]; - - $handler = new CurlMultiHandler(); - $response = $handler($request)->wait(); - $this->assertEquals(200, $response['status']); - $this->assertEquals('OK', $response['reason']); - $this->assertEquals(['Hello'], $response['headers']['Test']); - $this->assertEquals(['4'], $response['headers']['Content-Length']); - $this->assertEquals('test', Core::body($response)); - } - - public function testCreatesConnectException() - { - $m = new \ReflectionMethod('GuzzleHttp\Ring\Client\CurlFactory', 'createErrorResponse'); - $m->setAccessible(true); - $response = $m->invoke( - null, - function () {}, - [], - [ - 'err_message' => 'foo', - 'curl' => [ - 'errno' => CURLE_COULDNT_CONNECT, - ] - ] - ); - $this->assertInstanceOf('GuzzleHttp\Ring\Exception\ConnectException', $response['error']); - } - - public function testParsesLastResponseOnly() - { - $response1 = [ - 'status' => 301, - 'headers' => [ - 'Content-Length' => ['0'], - 'Location' => ['/foo'] - ] - ]; - - $response2 = [ - 'status' => 200, - 'headers' => [ - 'Content-Length' => ['0'], - 'Foo' => ['bar'] - ] - ]; - - Server::flush(); - Server::enqueue([$response1, $response2]); - - $a = new CurlMultiHandler(); - $response = $a([ - 'http_method' => 'GET', - 'headers' => ['Host' => [Server::$host]], - 'client' => [ - 'curl' => [ - CURLOPT_FOLLOWLOCATION => true - ] - ] - ])->wait(); - - $this->assertEquals(1, $response['transfer_stats']['redirect_count']); - $this->assertEquals('http://127.0.0.1:8125/foo', $response['effective_url']); - $this->assertEquals(['bar'], $response['headers']['Foo']); - $this->assertEquals(200, $response['status']); - $this->assertFalse(Core::hasHeader($response, 'Location')); - } - - public function testMaintainsMultiHeaderOrder() - { - Server::flush(); - Server::enqueue([ - [ - 'status' => 200, - 'headers' => [ - 'Content-Length' => ['0'], - 'Foo' => ['a', 'b'], - 'foo' => ['c', 'd'], - ] - ] - ]); - - $a = new CurlMultiHandler(); - $response = $a([ - 'http_method' => 'GET', - 'headers' => ['Host' => [Server::$host]] - ])->wait(); - - $this->assertEquals( - ['a', 'b', 'c', 'd'], - Core::headerLines($response, 'Foo') - ); - } -} - -} diff --git a/core/vendor/guzzlehttp/ringphp/tests/Client/CurlHandlerTest.php b/core/vendor/guzzlehttp/ringphp/tests/Client/CurlHandlerTest.php deleted file mode 100644 index ba03b8c..0000000 --- a/core/vendor/guzzlehttp/ringphp/tests/Client/CurlHandlerTest.php +++ /dev/null @@ -1,96 +0,0 @@ -markTestSkipped('curl_reset() is not available'); - } - } - - protected function getHandler($factory = null, $options = []) - { - return new CurlHandler($options); - } - - public function testCanSetMaxHandles() - { - $a = new CurlHandler(['max_handles' => 10]); - $this->assertEquals(10, $this->readAttribute($a, 'maxHandles')); - } - - public function testCreatesCurlErrors() - { - $handler = new CurlHandler(); - $response = $handler([ - 'http_method' => 'GET', - 'uri' => '/', - 'headers' => ['host' => ['localhost:123']], - 'client' => ['timeout' => 0.001, 'connect_timeout' => 0.001], - ]); - $this->assertNull($response['status']); - $this->assertNull($response['reason']); - $this->assertEquals([], $response['headers']); - $this->assertInstanceOf( - 'GuzzleHttp\Ring\Exception\RingException', - $response['error'] - ); - - $this->assertEquals( - 1, - preg_match('/^cURL error \d+: .*$/', $response['error']->getMessage()) - ); - } - - public function testReleasesAdditionalEasyHandles() - { - Server::flush(); - $response = [ - 'status' => 200, - 'headers' => ['Content-Length' => [4]], - 'body' => 'test', - ]; - - Server::enqueue([$response, $response, $response, $response]); - $a = new CurlHandler(['max_handles' => 2]); - - $fn = function () use (&$calls, $a, &$fn) { - if (++$calls < 4) { - $a([ - 'http_method' => 'GET', - 'headers' => ['host' => [Server::$host]], - 'client' => ['progress' => $fn], - ]); - } - }; - - $request = [ - 'http_method' => 'GET', - 'headers' => ['host' => [Server::$host]], - 'client' => [ - 'progress' => $fn, - ], - ]; - - $a($request); - $this->assertCount(2, $this->readAttribute($a, 'handles')); - } - - public function testReusesHandles() - { - Server::flush(); - $response = ['status' => 200]; - Server::enqueue([$response, $response]); - $a = new CurlHandler(); - $request = [ - 'http_method' => 'GET', - 'headers' => ['host' => [Server::$host]], - ]; - $a($request); - $a($request); - } -} diff --git a/core/vendor/guzzlehttp/ringphp/tests/Client/CurlMultiHandlerTest.php b/core/vendor/guzzlehttp/ringphp/tests/Client/CurlMultiHandlerTest.php deleted file mode 100644 index 9228f1c..0000000 --- a/core/vendor/guzzlehttp/ringphp/tests/Client/CurlMultiHandlerTest.php +++ /dev/null @@ -1,165 +0,0 @@ - 200]]); - $a = new CurlMultiHandler(); - $response = $a([ - 'http_method' => 'GET', - 'headers' => ['host' => [Server::$host]], - ]); - $this->assertInstanceOf('GuzzleHttp\Ring\Future\FutureArray', $response); - $this->assertEquals(200, $response['status']); - $this->assertArrayHasKey('transfer_stats', $response); - $realUrl = trim($response['transfer_stats']['url'], '/'); - $this->assertEquals(trim(Server::$url, '/'), $realUrl); - $this->assertArrayHasKey('effective_url', $response); - $this->assertEquals( - trim(Server::$url, '/'), - trim($response['effective_url'], '/') - ); - } - - public function testCreatesErrorResponses() - { - $url = 'http://localhost:123/'; - $a = new CurlMultiHandler(); - $response = $a([ - 'http_method' => 'GET', - 'headers' => ['host' => ['localhost:123']], - ]); - $this->assertInstanceOf('GuzzleHttp\Ring\Future\FutureArray', $response); - $this->assertNull($response['status']); - $this->assertNull($response['reason']); - $this->assertEquals([], $response['headers']); - $this->assertArrayHasKey('error', $response); - $this->assertContains('cURL error ', $response['error']->getMessage()); - $this->assertArrayHasKey('transfer_stats', $response); - $this->assertEquals( - trim($url, '/'), - trim($response['transfer_stats']['url'], '/') - ); - $this->assertArrayHasKey('effective_url', $response); - $this->assertEquals( - trim($url, '/'), - trim($response['effective_url'], '/') - ); - } - - public function testSendsFuturesWhenDestructed() - { - Server::enqueue([['status' => 200]]); - $a = new CurlMultiHandler(); - $response = $a([ - 'http_method' => 'GET', - 'headers' => ['host' => [Server::$host]], - ]); - $this->assertInstanceOf('GuzzleHttp\Ring\Future\FutureArray', $response); - $a->__destruct(); - $this->assertEquals(200, $response['status']); - } - - public function testCanSetMaxHandles() - { - $a = new CurlMultiHandler(['max_handles' => 2]); - $this->assertEquals(2, $this->readAttribute($a, 'maxHandles')); - } - - public function testCanSetSelectTimeout() - { - $a = new CurlMultiHandler(['select_timeout' => 2]); - $this->assertEquals(2, $this->readAttribute($a, 'selectTimeout')); - } - - public function testSendsFuturesWhenMaxHandlesIsReached() - { - $request = [ - 'http_method' => 'PUT', - 'headers' => ['host' => [Server::$host]], - 'future' => 'lazy', // passing this to control the test - ]; - $response = ['status' => 200]; - Server::flush(); - Server::enqueue([$response, $response, $response]); - $a = new CurlMultiHandler(['max_handles' => 3]); - for ($i = 0; $i < 5; $i++) { - $responses[] = $a($request); - } - $this->assertCount(3, Server::received()); - $responses[3]->cancel(); - $responses[4]->cancel(); - } - - public function testCanCancel() - { - Server::flush(); - $response = ['status' => 200]; - Server::enqueue(array_fill_keys(range(0, 10), $response)); - $a = new CurlMultiHandler(); - $responses = []; - - for ($i = 0; $i < 10; $i++) { - $response = $a([ - 'http_method' => 'GET', - 'headers' => ['host' => [Server::$host]], - 'future' => 'lazy', - ]); - $response->cancel(); - $responses[] = $response; - } - - $this->assertCount(0, Server::received()); - - foreach ($responses as $response) { - $this->assertTrue($this->readAttribute($response, 'isRealized')); - } - } - - public function testCannotCancelFinished() - { - Server::flush(); - Server::enqueue([['status' => 200]]); - $a = new CurlMultiHandler(); - $response = $a([ - 'http_method' => 'GET', - 'headers' => ['host' => [Server::$host]], - ]); - $response->wait(); - $response->cancel(); - } - - public function testDelaysInParallel() - { - Server::flush(); - Server::enqueue([['status' => 200]]); - $a = new CurlMultiHandler(); - $expected = microtime(true) + (100 / 1000); - $response = $a([ - 'http_method' => 'GET', - 'headers' => ['host' => [Server::$host]], - 'client' => ['delay' => 100], - ]); - $response->wait(); - $this->assertGreaterThanOrEqual($expected, microtime(true)); - } - - public function testSendsNonLazyFutures() - { - $request = [ - 'http_method' => 'GET', - 'headers' => ['host' => [Server::$host]], - 'future' => true, - ]; - Server::flush(); - Server::enqueue([['status' => 202]]); - $a = new CurlMultiHandler(); - $response = $a($request); - $this->assertInstanceOf('GuzzleHttp\Ring\Future\FutureArray', $response); - $this->assertEquals(202, $response['status']); - } -} diff --git a/core/vendor/guzzlehttp/ringphp/tests/Client/MiddlewareTest.php b/core/vendor/guzzlehttp/ringphp/tests/Client/MiddlewareTest.php deleted file mode 100644 index a47bb30..0000000 --- a/core/vendor/guzzlehttp/ringphp/tests/Client/MiddlewareTest.php +++ /dev/null @@ -1,65 +0,0 @@ - 200]); - $calledA = false; - $a = function (array $req) use (&$calledA, $future) { - $calledA = true; - return $future; - }; - $calledB = false; - $b = function (array $req) use (&$calledB) { $calledB = true; }; - $s = Middleware::wrapFuture($a, $b); - $s([]); - $this->assertTrue($calledA); - $this->assertFalse($calledB); - } - - public function testFutureCallsStreamingHandler() - { - $future = new CompletedFutureArray(['status' => 200]); - $calledA = false; - $a = function (array $req) use (&$calledA) { $calledA = true; }; - $calledB = false; - $b = function (array $req) use (&$calledB, $future) { - $calledB = true; - return $future; - }; - $s = Middleware::wrapFuture($a, $b); - $result = $s(['client' => ['future' => true]]); - $this->assertFalse($calledA); - $this->assertTrue($calledB); - $this->assertSame($future, $result); - } - - public function testStreamingCallsDefaultHandler() - { - $calledA = false; - $a = function (array $req) use (&$calledA) { $calledA = true; }; - $calledB = false; - $b = function (array $req) use (&$calledB) { $calledB = true; }; - $s = Middleware::wrapStreaming($a, $b); - $s([]); - $this->assertTrue($calledA); - $this->assertFalse($calledB); - } - - public function testStreamingCallsStreamingHandler() - { - $calledA = false; - $a = function (array $req) use (&$calledA) { $calledA = true; }; - $calledB = false; - $b = function (array $req) use (&$calledB) { $calledB = true; }; - $s = Middleware::wrapStreaming($a, $b); - $s(['client' => ['stream' => true]]); - $this->assertFalse($calledA); - $this->assertTrue($calledB); - } -} diff --git a/core/vendor/guzzlehttp/ringphp/tests/Client/MockHandlerTest.php b/core/vendor/guzzlehttp/ringphp/tests/Client/MockHandlerTest.php deleted file mode 100644 index 26bcd6c..0000000 --- a/core/vendor/guzzlehttp/ringphp/tests/Client/MockHandlerTest.php +++ /dev/null @@ -1,86 +0,0 @@ - 200]); - $response = $mock([]); - $this->assertEquals(200, $response['status']); - $this->assertEquals([], $response['headers']); - $this->assertNull($response['body']); - $this->assertNull($response['reason']); - $this->assertNull($response['effective_url']); - } - - public function testReturnsFutures() - { - $deferred = new Deferred(); - $future = new FutureArray( - $deferred->promise(), - function () use ($deferred) { - $deferred->resolve(['status' => 200]); - } - ); - $mock = new MockHandler($future); - $response = $mock([]); - $this->assertInstanceOf('GuzzleHttp\Ring\Future\FutureArray', $response); - $this->assertEquals(200, $response['status']); - } - - public function testReturnsFuturesWithThenCall() - { - $deferred = new Deferred(); - $future = new FutureArray( - $deferred->promise(), - function () use ($deferred) { - $deferred->resolve(['status' => 200]); - } - ); - $mock = new MockHandler($future); - $response = $mock([]); - $this->assertInstanceOf('GuzzleHttp\Ring\Future\FutureArray', $response); - $this->assertEquals(200, $response['status']); - $req = null; - $promise = $response->then(function ($value) use (&$req) { - $req = $value; - $this->assertEquals(200, $req['status']); - }); - $this->assertInstanceOf('React\Promise\PromiseInterface', $promise); - $this->assertEquals(200, $req['status']); - } - - public function testReturnsFuturesAndProxiesCancel() - { - $c = null; - $deferred = new Deferred(); - $future = new FutureArray( - $deferred->promise(), - function () {}, - function () use (&$c) { - $c = true; - return true; - } - ); - $mock = new MockHandler($future); - $response = $mock([]); - $this->assertInstanceOf('GuzzleHttp\Ring\Future\FutureArray', $response); - $response->cancel(); - $this->assertTrue($c); - } - - /** - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage Response must be an array or FutureArrayInterface. Found - */ - public function testEnsuresMockIsValid() - { - $mock = new MockHandler('foo'); - $mock([]); - } -} diff --git a/core/vendor/guzzlehttp/ringphp/tests/Client/Server.php b/core/vendor/guzzlehttp/ringphp/tests/Client/Server.php deleted file mode 100644 index 14665a5..0000000 --- a/core/vendor/guzzlehttp/ringphp/tests/Client/Server.php +++ /dev/null @@ -1,183 +0,0 @@ - [], 'reason' => '', 'body' => '']; - $data[] = $response; - } - - self::send('PUT', '/guzzle-server/responses', json_encode($data)); - } - - /** - * Get all of the received requests as a RingPHP request structure. - * - * @return array - * @throws \RuntimeException - */ - public static function received() - { - if (!self::$started) { - return []; - } - - $response = self::send('GET', '/guzzle-server/requests'); - $body = Core::body($response); - $result = json_decode($body, true); - if ($result === false) { - throw new \RuntimeException('Error decoding response: ' - . json_last_error()); - } - - foreach ($result as &$res) { - if (isset($res['uri'])) { - $res['resource'] = $res['uri']; - } - if (isset($res['query_string'])) { - $res['resource'] .= '?' . $res['query_string']; - } - if (!isset($res['resource'])) { - $res['resource'] = ''; - } - // Ensure that headers are all arrays - if (isset($res['headers'])) { - foreach ($res['headers'] as &$h) { - $h = (array) $h; - } - unset($h); - } - } - - unset($res); - return $result; - } - - /** - * Stop running the node.js server - */ - public static function stop() - { - if (self::$started) { - self::send('DELETE', '/guzzle-server'); - } - - self::$started = false; - } - - public static function wait($maxTries = 20) - { - $tries = 0; - while (!self::isListening() && ++$tries < $maxTries) { - usleep(100000); - } - - if (!self::isListening()) { - throw new \RuntimeException('Unable to contact node.js server'); - } - } - - public static function start() - { - if (self::$started) { - return; - } - - try { - self::wait(); - } catch (\Exception $e) { - exec('node ' . __DIR__ . \DIRECTORY_SEPARATOR . 'server.js ' - . self::$port . ' >> /tmp/server.log 2>&1 &'); - self::wait(); - } - - self::$started = true; - } - - private static function isListening() - { - $response = self::send('GET', '/guzzle-server/perf', null, [ - 'connect_timeout' => 1, - 'timeout' => 1 - ]); - - return !isset($response['error']); - } - - private static function send( - $method, - $path, - $body = null, - array $client = [] - ) { - $handler = new StreamHandler(); - - $request = [ - 'http_method' => $method, - 'uri' => $path, - 'request_port' => 8125, - 'headers' => ['host' => ['127.0.0.1:8125']], - 'body' => $body, - 'client' => $client, - ]; - - if ($body) { - $request['headers']['content-length'] = [strlen($body)]; - } - - return $handler($request); - } -} diff --git a/core/vendor/guzzlehttp/ringphp/tests/Client/StreamHandlerTest.php b/core/vendor/guzzlehttp/ringphp/tests/Client/StreamHandlerTest.php deleted file mode 100644 index 8f63e29..0000000 --- a/core/vendor/guzzlehttp/ringphp/tests/Client/StreamHandlerTest.php +++ /dev/null @@ -1,476 +0,0 @@ -queueRes(); - $handler = new StreamHandler(); - $response = $handler([ - 'http_method' => 'GET', - 'uri' => '/', - 'headers' => [ - 'host' => [Server::$host], - 'Foo' => ['Bar'], - ], - ]); - - $this->assertEquals(200, $response['status']); - $this->assertEquals('OK', $response['reason']); - $this->assertEquals(['Bar'], $response['headers']['Foo']); - $this->assertEquals(['8'], $response['headers']['Content-Length']); - $this->assertEquals('hi there', Core::body($response)); - - $sent = Server::received()[0]; - $this->assertEquals('GET', $sent['http_method']); - $this->assertEquals('/', $sent['resource']); - $this->assertEquals(['127.0.0.1:8125'], $sent['headers']['host']); - $this->assertEquals('Bar', Core::header($sent, 'foo')); - } - - public function testAddsErrorToResponse() - { - $handler = new StreamHandler(); - $result = $handler([ - 'http_method' => 'GET', - 'headers' => ['host' => ['localhost:123']], - 'client' => ['timeout' => 0.01], - ]); - - $this->assertNull($result['status']); - $this->assertNull($result['body']); - $this->assertEquals([], $result['headers']); - $this->assertInstanceOf( - 'GuzzleHttp\Ring\Exception\RingException', - $result['error'] - ); - } - - public function testEnsuresTheHttpProtocol() - { - $handler = new StreamHandler(); - $result = $handler([ - 'http_method' => 'GET', - 'url' => 'ftp://localhost:123', - ]); - $this->assertArrayHasKey('error', $result); - $this->assertContains( - 'URL is invalid: ftp://localhost:123', - $result['error']->getMessage() - ); - } - - public function testStreamAttributeKeepsStreamOpen() - { - $this->queueRes(); - $handler = new StreamHandler(); - $response = $handler([ - 'http_method' => 'PUT', - 'uri' => '/foo', - 'query_string' => 'baz=bar', - 'headers' => [ - 'host' => [Server::$host], - 'Foo' => ['Bar'], - ], - 'body' => 'test', - 'client' => ['stream' => true], - ]); - - $this->assertEquals(200, $response['status']); - $this->assertEquals('OK', $response['reason']); - $this->assertEquals('8', Core::header($response, 'Content-Length')); - $body = $response['body']; - $this->assertTrue(is_resource($body)); - $this->assertEquals('http', stream_get_meta_data($body)['wrapper_type']); - $this->assertEquals('hi there', stream_get_contents($body)); - fclose($body); - $sent = Server::received()[0]; - $this->assertEquals('PUT', $sent['http_method']); - $this->assertEquals('/foo', $sent['uri']); - $this->assertEquals('baz=bar', $sent['query_string']); - $this->assertEquals('/foo?baz=bar', $sent['resource']); - $this->assertEquals('127.0.0.1:8125', Core::header($sent, 'host')); - $this->assertEquals('Bar', Core::header($sent, 'foo')); - } - - public function testDrainsResponseIntoTempStream() - { - $this->queueRes(); - $handler = new StreamHandler(); - $response = $handler([ - 'http_method' => 'GET', - 'uri' => '/', - 'headers' => ['host' => [Server::$host]], - ]); - $body = $response['body']; - $this->assertEquals('php://temp', stream_get_meta_data($body)['uri']); - $this->assertEquals('hi', fread($body, 2)); - fclose($body); - } - - public function testDrainsResponseIntoSaveToBody() - { - $r = fopen('php://temp', 'r+'); - $this->queueRes(); - $handler = new StreamHandler(); - $response = $handler([ - 'http_method' => 'GET', - 'uri' => '/', - 'headers' => ['host' => [Server::$host]], - 'client' => ['save_to' => $r], - ]); - $body = $response['body']; - $this->assertEquals('php://temp', stream_get_meta_data($body)['uri']); - $this->assertEquals('hi', fread($body, 2)); - $this->assertEquals(' there', stream_get_contents($r)); - fclose($r); - } - - public function testDrainsResponseIntoSaveToBodyAtPath() - { - $tmpfname = tempnam('/tmp', 'save_to_path'); - $this->queueRes(); - $handler = new StreamHandler(); - $response = $handler([ - 'http_method' => 'GET', - 'uri' => '/', - 'headers' => ['host' => [Server::$host]], - 'client' => ['save_to' => $tmpfname], - ]); - $body = $response['body']; - $this->assertInstanceOf('GuzzleHttp\Stream\StreamInterface', $body); - $this->assertEquals($tmpfname, $body->getMetadata('uri')); - $this->assertEquals('hi', $body->read(2)); - $body->close(); - unlink($tmpfname); - } - - public function testAutomaticallyDecompressGzip() - { - Server::flush(); - $content = gzencode('test'); - Server::enqueue([ - [ - 'status' => 200, - 'reason' => 'OK', - 'headers' => [ - 'Content-Encoding' => ['gzip'], - 'Content-Length' => [strlen($content)], - ], - 'body' => $content, - ], - ]); - - $handler = new StreamHandler(); - $response = $handler([ - 'http_method' => 'GET', - 'headers' => ['host' => [Server::$host]], - 'uri' => '/', - 'client' => ['decode_content' => true], - ]); - $this->assertEquals('test', Core::body($response)); - } - - public function testDoesNotForceGzipDecode() - { - Server::flush(); - $content = gzencode('test'); - Server::enqueue([ - [ - 'status' => 200, - 'reason' => 'OK', - 'headers' => [ - 'Content-Encoding' => ['gzip'], - 'Content-Length' => [strlen($content)], - ], - 'body' => $content, - ], - ]); - - $handler = new StreamHandler(); - $response = $handler([ - 'http_method' => 'GET', - 'headers' => ['host' => [Server::$host]], - 'uri' => '/', - 'client' => ['stream' => true, 'decode_content' => false], - ]); - $this->assertSame($content, Core::body($response)); - } - - public function testProtocolVersion() - { - $this->queueRes(); - $handler = new StreamHandler(); - $handler([ - 'http_method' => 'GET', - 'uri' => '/', - 'headers' => ['host' => [Server::$host]], - 'version' => 1.0, - ]); - - $this->assertEquals(1.0, Server::received()[0]['version']); - } - - protected function getSendResult(array $opts) - { - $this->queueRes(); - $handler = new StreamHandler(); - $opts['stream'] = true; - return $handler([ - 'http_method' => 'GET', - 'uri' => '/', - 'headers' => ['host' => [Server::$host]], - 'client' => $opts, - ]); - } - - public function testAddsProxy() - { - $res = $this->getSendResult(['stream' => true, 'proxy' => '127.0.0.1:8125']); - $opts = stream_context_get_options($res['body']); - $this->assertEquals('127.0.0.1:8125', $opts['http']['proxy']); - } - - public function testAddsTimeout() - { - $res = $this->getSendResult(['stream' => true, 'timeout' => 200]); - $opts = stream_context_get_options($res['body']); - $this->assertEquals(200, $opts['http']['timeout']); - } - - public function testVerifiesVerifyIsValidIfPath() - { - $res = $this->getSendResult(['verify' => '/does/not/exist']); - $this->assertContains( - 'SSL CA bundle not found: /does/not/exist', - (string) $res['error'] - ); - } - - public function testVerifyCanBeDisabled() - { - $res = $this->getSendResult(['verify' => false]); - $this->assertArrayNotHasKey('error', $res); - } - - public function testVerifiesCertIfValidPath() - { - $res = $this->getSendResult(['cert' => '/does/not/exist']); - $this->assertContains( - 'SSL certificate not found: /does/not/exist', - (string) $res['error'] - ); - } - - public function testVerifyCanBeSetToPath() - { - $path = $path = ClientUtils::getDefaultCaBundle(); - $res = $this->getSendResult(['verify' => $path]); - $this->assertArrayNotHasKey('error', $res); - $opts = stream_context_get_options($res['body']); - $this->assertEquals(true, $opts['ssl']['verify_peer']); - $this->assertEquals($path, $opts['ssl']['cafile']); - $this->assertTrue(file_exists($opts['ssl']['cafile'])); - } - - public function testUsesSystemDefaultBundle() - { - $path = $path = ClientUtils::getDefaultCaBundle(); - $res = $this->getSendResult(['verify' => true]); - $this->assertArrayNotHasKey('error', $res); - $opts = stream_context_get_options($res['body']); - if (PHP_VERSION_ID < 50600) { - $this->assertEquals($path, $opts['ssl']['cafile']); - } - } - - public function testEnsuresVerifyOptionIsValid() - { - $res = $this->getSendResult(['verify' => 10]); - $this->assertContains( - 'Invalid verify request option', - (string) $res['error'] - ); - } - - public function testCanSetPasswordWhenSettingCert() - { - $path = __FILE__; - $res = $this->getSendResult(['cert' => [$path, 'foo']]); - $opts = stream_context_get_options($res['body']); - $this->assertEquals($path, $opts['ssl']['local_cert']); - $this->assertEquals('foo', $opts['ssl']['passphrase']); - } - - public function testDebugAttributeWritesToStream() - { - $this->queueRes(); - $f = fopen('php://temp', 'w+'); - $this->getSendResult(['debug' => $f]); - fseek($f, 0); - $contents = stream_get_contents($f); - $this->assertContains(' [CONNECT]', $contents); - $this->assertContains(' [FILE_SIZE_IS]', $contents); - $this->assertContains(' [PROGRESS]', $contents); - } - - public function testDebugAttributeWritesStreamInfoToBuffer() - { - $called = false; - $this->queueRes(); - $buffer = fopen('php://temp', 'r+'); - $this->getSendResult([ - 'progress' => function () use (&$called) { $called = true; }, - 'debug' => $buffer, - ]); - fseek($buffer, 0); - $contents = stream_get_contents($buffer); - $this->assertContains(' [CONNECT]', $contents); - $this->assertContains(' [FILE_SIZE_IS] message: "Content-Length: 8"', $contents); - $this->assertContains(' [PROGRESS] bytes_max: "8"', $contents); - $this->assertTrue($called); - } - - public function testEmitsProgressInformation() - { - $called = []; - $this->queueRes(); - $this->getSendResult([ - 'progress' => function () use (&$called) { - $called[] = func_get_args(); - }, - ]); - $this->assertNotEmpty($called); - $this->assertEquals(8, $called[0][0]); - $this->assertEquals(0, $called[0][1]); - } - - public function testEmitsProgressInformationAndDebugInformation() - { - $called = []; - $this->queueRes(); - $buffer = fopen('php://memory', 'w+'); - $this->getSendResult([ - 'debug' => $buffer, - 'progress' => function () use (&$called) { - $called[] = func_get_args(); - }, - ]); - $this->assertNotEmpty($called); - $this->assertEquals(8, $called[0][0]); - $this->assertEquals(0, $called[0][1]); - rewind($buffer); - $this->assertNotEmpty(stream_get_contents($buffer)); - fclose($buffer); - } - - public function testAddsProxyByProtocol() - { - $url = str_replace('http', 'tcp', Server::$url); - $res = $this->getSendResult(['proxy' => ['http' => $url]]); - $opts = stream_context_get_options($res['body']); - $this->assertEquals($url, $opts['http']['proxy']); - } - - public function testPerformsShallowMergeOfCustomContextOptions() - { - $res = $this->getSendResult([ - 'stream_context' => [ - 'http' => [ - 'request_fulluri' => true, - 'method' => 'HEAD', - ], - 'socket' => [ - 'bindto' => '127.0.0.1:0', - ], - 'ssl' => [ - 'verify_peer' => false, - ], - ], - ]); - - $opts = stream_context_get_options($res['body']); - $this->assertEquals('HEAD', $opts['http']['method']); - $this->assertTrue($opts['http']['request_fulluri']); - $this->assertFalse($opts['ssl']['verify_peer']); - $this->assertEquals('127.0.0.1:0', $opts['socket']['bindto']); - } - - public function testEnsuresThatStreamContextIsAnArray() - { - $res = $this->getSendResult(['stream_context' => 'foo']); - $this->assertContains( - 'stream_context must be an array', - (string) $res['error'] - ); - } - - public function testDoesNotAddContentTypeByDefault() - { - $this->queueRes(); - $handler = new StreamHandler(); - $handler([ - 'http_method' => 'PUT', - 'uri' => '/', - 'headers' => ['host' => [Server::$host], 'content-length' => [3]], - 'body' => 'foo', - ]); - $req = Server::received()[0]; - $this->assertEquals('', Core::header($req, 'Content-Type')); - $this->assertEquals(3, Core::header($req, 'Content-Length')); - } - - private function queueRes() - { - Server::flush(); - Server::enqueue([ - [ - 'status' => 200, - 'reason' => 'OK', - 'headers' => [ - 'Foo' => ['Bar'], - 'Content-Length' => [8], - ], - 'body' => 'hi there', - ], - ]); - } - - public function testSupports100Continue() - { - Server::flush(); - Server::enqueue([ - [ - 'status' => '200', - 'reason' => 'OK', - 'headers' => [ - 'Test' => ['Hello'], - 'Content-Length' => ['4'], - ], - 'body' => 'test', - ], - ]); - - $request = [ - 'http_method' => 'PUT', - 'headers' => [ - 'Host' => [Server::$host], - 'Expect' => ['100-Continue'], - ], - 'body' => 'test', - ]; - - $handler = new StreamHandler(); - $response = $handler($request); - $this->assertEquals(200, $response['status']); - $this->assertEquals('OK', $response['reason']); - $this->assertEquals(['Hello'], $response['headers']['Test']); - $this->assertEquals(['4'], $response['headers']['Content-Length']); - $this->assertEquals('test', Core::body($response)); - } -} diff --git a/core/vendor/guzzlehttp/ringphp/tests/Client/server.js b/core/vendor/guzzlehttp/ringphp/tests/Client/server.js deleted file mode 100644 index 5642c0f..0000000 --- a/core/vendor/guzzlehttp/ringphp/tests/Client/server.js +++ /dev/null @@ -1,161 +0,0 @@ -/** - * Guzzle node.js test server to return queued responses to HTTP requests and - * expose a RESTful API for enqueueing responses and retrieving the requests - * that have been received. - * - * - Delete all requests that have been received: - * > DELETE /guzzle-server/requests - * > Host: 127.0.0.1:8125 - * - * - Enqueue responses - * > PUT /guzzle-server/responses - * > Host: 127.0.0.1:8125 - * > - * > [{'status': 200, 'reason': 'OK', 'headers': {}, 'body': '' }] - * - * - Get the received requests - * > GET /guzzle-server/requests - * > Host: 127.0.0.1:8125 - * - * < HTTP/1.1 200 OK - * < - * < [{'http_method': 'GET', 'uri': '/', 'headers': {}, 'body': 'string'}] - * - * - Shutdown the server - * > DELETE /guzzle-server - * > Host: 127.0.0.1:8125 - * - * @package Guzzle PHP - * @license See the LICENSE file that was distributed with this source code. - */ - -var http = require('http'); -var url = require('url'); - -/** - * Guzzle node.js server - * @class - */ -var GuzzleServer = function(port, log) { - - this.port = port; - this.log = log; - this.responses = []; - this.requests = []; - var that = this; - - var controlRequest = function(request, req, res) { - if (req.url == '/guzzle-server/perf') { - res.writeHead(200, 'OK', {'Content-Length': 16}); - res.end('Body of response'); - } else if (req.method == 'DELETE') { - if (req.url == '/guzzle-server/requests') { - // Clear the received requests - that.requests = []; - res.writeHead(200, 'OK', { 'Content-Length': 0 }); - res.end(); - if (that.log) { - console.log('Flushing requests'); - } - } else if (req.url == '/guzzle-server') { - // Shutdown the server - res.writeHead(200, 'OK', { 'Content-Length': 0, 'Connection': 'close' }); - res.end(); - if (that.log) { - console.log('Shutting down'); - } - that.server.close(); - } - } else if (req.method == 'GET') { - if (req.url === '/guzzle-server/requests') { - if (that.log) { - console.log('Sending received requests'); - } - // Get received requests - var body = JSON.stringify(that.requests); - res.writeHead(200, 'OK', { 'Content-Length': body.length }); - res.end(body); - } - } else if (req.method == 'PUT' && req.url == '/guzzle-server/responses') { - if (that.log) { - console.log('Adding responses...'); - } - if (!request.body) { - if (that.log) { - console.log('No response data was provided'); - } - res.writeHead(400, 'NO RESPONSES IN REQUEST', { 'Content-Length': 0 }); - } else { - that.responses = eval('(' + request.body + ')'); - for (var i = 0; i < that.responses.length; i++) { - if (that.responses[i].body) { - that.responses[i].body = new Buffer(that.responses[i].body, 'base64'); - } - } - if (that.log) { - console.log(that.responses); - } - res.writeHead(200, 'OK', { 'Content-Length': 0 }); - } - res.end(); - } - }; - - var receivedRequest = function(request, req, res) { - if (req.url.indexOf('/guzzle-server') === 0) { - controlRequest(request, req, res); - } else if (req.url.indexOf('/guzzle-server') == -1 && !that.responses.length) { - res.writeHead(500); - res.end('No responses in queue'); - } else { - if (that.log) { - console.log('Returning response from queue and adding request'); - } - that.requests.push(request); - var response = that.responses.shift(); - res.writeHead(response.status, response.reason, response.headers); - res.end(response.body); - } - }; - - this.start = function() { - - that.server = http.createServer(function(req, res) { - - var parts = url.parse(req.url, false); - var request = { - http_method: req.method, - scheme: parts.scheme, - uri: parts.pathname, - query_string: parts.query, - headers: req.headers, - version: req.httpVersion, - body: '' - }; - - // Receive each chunk of the request body - req.addListener('data', function(chunk) { - request.body += chunk; - }); - - // Called when the request completes - req.addListener('end', function() { - receivedRequest(request, req, res); - }); - }); - - that.server.listen(this.port, '127.0.0.1'); - - if (this.log) { - console.log('Server running at http://127.0.0.1:8125/'); - } - }; -}; - -// Get the port from the arguments -port = process.argv.length >= 3 ? process.argv[2] : 8125; -log = process.argv.length >= 4 ? process.argv[3] : false; - -// Start the server -server = new GuzzleServer(port, log); -server.start(); diff --git a/core/vendor/guzzlehttp/ringphp/tests/CoreTest.php b/core/vendor/guzzlehttp/ringphp/tests/CoreTest.php deleted file mode 100644 index 49522f2..0000000 --- a/core/vendor/guzzlehttp/ringphp/tests/CoreTest.php +++ /dev/null @@ -1,336 +0,0 @@ -assertNull(Core::header([], 'Foo')); - $this->assertNull(Core::firstHeader([], 'Foo')); - } - - public function testChecksIfHasHeader() - { - $message = [ - 'headers' => [ - 'Foo' => ['Bar', 'Baz'], - 'foo' => ['hello'], - 'bar' => ['1'] - ] - ]; - $this->assertTrue(Core::hasHeader($message, 'Foo')); - $this->assertTrue(Core::hasHeader($message, 'foo')); - $this->assertTrue(Core::hasHeader($message, 'FoO')); - $this->assertTrue(Core::hasHeader($message, 'bar')); - $this->assertFalse(Core::hasHeader($message, 'barr')); - } - - public function testReturnsFirstHeaderWhenSimple() - { - $this->assertEquals('Bar', Core::firstHeader([ - 'headers' => ['Foo' => ['Bar', 'Baz']], - ], 'Foo')); - } - - public function testReturnsFirstHeaderWhenMultiplePerLine() - { - $this->assertEquals('Bar', Core::firstHeader([ - 'headers' => ['Foo' => ['Bar, Baz']], - ], 'Foo')); - } - - public function testExtractsCaseInsensitiveHeader() - { - $this->assertEquals( - 'hello', - Core::header(['headers' => ['foo' => ['hello']]], 'FoO') - ); - } - - public function testExtractsCaseInsensitiveHeaderLines() - { - $this->assertEquals( - ['a', 'b', 'c', 'd'], - Core::headerLines([ - 'headers' => [ - 'foo' => ['a', 'b'], - 'Foo' => ['c', 'd'] - ] - ], 'foo') - ); - } - - public function testExtractsHeaderLines() - { - $this->assertEquals( - ['bar', 'baz'], - Core::headerLines([ - 'headers' => [ - 'Foo' => ['bar', 'baz'], - ], - ], 'Foo') - ); - } - - public function testExtractsHeaderAsString() - { - $this->assertEquals( - 'bar, baz', - Core::header([ - 'headers' => [ - 'Foo' => ['bar', 'baz'], - ], - ], 'Foo', true) - ); - } - - public function testReturnsNullWhenHeaderNotFound() - { - $this->assertNull(Core::header(['headers' => []], 'Foo')); - } - - public function testRemovesHeaders() - { - $message = [ - 'headers' => [ - 'foo' => ['bar'], - 'Foo' => ['bam'], - 'baz' => ['123'], - ], - ]; - - $this->assertSame($message, Core::removeHeader($message, 'bam')); - $this->assertEquals([ - 'headers' => ['baz' => ['123']], - ], Core::removeHeader($message, 'foo')); - } - - public function testCreatesUrl() - { - $req = [ - 'scheme' => 'http', - 'headers' => ['host' => ['foo.com']], - 'uri' => '/', - ]; - - $this->assertEquals('http://foo.com/', Core::url($req)); - } - - /** - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage No Host header was provided - */ - public function testEnsuresHostIsAvailableWhenCreatingUrls() - { - Core::url([]); - } - - public function testCreatesUrlWithQueryString() - { - $req = [ - 'scheme' => 'http', - 'headers' => ['host' => ['foo.com']], - 'uri' => '/', - 'query_string' => 'foo=baz', - ]; - - $this->assertEquals('http://foo.com/?foo=baz', Core::url($req)); - } - - public function testUsesUrlIfSet() - { - $req = ['url' => 'http://foo.com']; - $this->assertEquals('http://foo.com', Core::url($req)); - } - - public function testReturnsNullWhenNoBody() - { - $this->assertNull(Core::body([])); - } - - public function testReturnsStreamAsString() - { - $this->assertEquals( - 'foo', - Core::body(['body' => Stream::factory('foo')]) - ); - } - - public function testReturnsString() - { - $this->assertEquals('foo', Core::body(['body' => 'foo'])); - } - - public function testReturnsResourceContent() - { - $r = fopen('php://memory', 'w+'); - fwrite($r, 'foo'); - rewind($r); - $this->assertEquals('foo', Core::body(['body' => $r])); - fclose($r); - } - - public function testReturnsIteratorContent() - { - $a = new \ArrayIterator(['a', 'b', 'cd', '']); - $this->assertEquals('abcd', Core::body(['body' => $a])); - } - - public function testReturnsObjectToString() - { - $this->assertEquals('foo', Core::body(['body' => new StrClass])); - } - - /** - * @expectedException \InvalidArgumentException - */ - public function testEnsuresBodyIsValid() - { - Core::body(['body' => false]); - } - - public function testParsesHeadersFromLines() - { - $lines = ['Foo: bar', 'Foo: baz', 'Abc: 123', 'Def: a, b']; - $this->assertEquals([ - 'Foo' => ['bar', 'baz'], - 'Abc' => ['123'], - 'Def' => ['a, b'], - ], Core::headersFromLines($lines)); - } - - public function testParsesHeadersFromLinesWithMultipleLines() - { - $lines = ['Foo: bar', 'Foo: baz', 'Foo: 123']; - $this->assertEquals([ - 'Foo' => ['bar', 'baz', '123'], - ], Core::headersFromLines($lines)); - } - - public function testCreatesArrayCallFunctions() - { - $called = []; - $a = function ($a, $b) use (&$called) { - $called['a'] = func_get_args(); - }; - $b = function ($a, $b) use (&$called) { - $called['b'] = func_get_args(); - }; - $c = Core::callArray([$a, $b]); - $c(1, 2); - $this->assertEquals([1, 2], $called['a']); - $this->assertEquals([1, 2], $called['b']); - } - - public function testRewindsGuzzleStreams() - { - $str = Stream::factory('foo'); - $this->assertTrue(Core::rewindBody(['body' => $str])); - } - - public function testRewindsStreams() - { - $str = Stream::factory('foo')->detach(); - $this->assertTrue(Core::rewindBody(['body' => $str])); - } - - public function testRewindsIterators() - { - $iter = new \ArrayIterator(['foo']); - $this->assertTrue(Core::rewindBody(['body' => $iter])); - } - - public function testRewindsStrings() - { - $this->assertTrue(Core::rewindBody(['body' => 'hi'])); - } - - public function testRewindsToStrings() - { - $this->assertTrue(Core::rewindBody(['body' => new StrClass()])); - } - - public function typeProvider() - { - return [ - ['foo', 'string(3) "foo"'], - [true, 'bool(true)'], - [false, 'bool(false)'], - [10, 'int(10)'], - [1.0, 'float(1)'], - [new StrClass(), 'object(GuzzleHttp\Tests\Ring\StrClass)'], - [['foo'], 'array(1)'] - ]; - } - - /** - * @dataProvider typeProvider - */ - public function testDescribesType($input, $output) - { - $this->assertEquals($output, Core::describeType($input)); - } - - public function testDoesSleep() - { - $t = microtime(true); - $expected = $t + (100 / 1000); - Core::doSleep(['client' => ['delay' => 100]]); - $this->assertGreaterThanOrEqual($expected, microtime(true)); - } - - public function testProxiesFuture() - { - $f = new CompletedFutureArray(['status' => 200]); - $res = null; - $proxied = Core::proxy($f, function ($value) use (&$res) { - $value['foo'] = 'bar'; - $res = $value; - return $value; - }); - $this->assertNotSame($f, $proxied); - $this->assertEquals(200, $f->wait()['status']); - $this->assertArrayNotHasKey('foo', $f->wait()); - $this->assertEquals('bar', $proxied->wait()['foo']); - $this->assertEquals(200, $proxied->wait()['status']); - } - - public function testProxiesDeferredFuture() - { - $d = new Deferred(); - $f = new FutureArray($d->promise()); - $f2 = Core::proxy($f); - $d->resolve(['foo' => 'bar']); - $this->assertEquals('bar', $f['foo']); - $this->assertEquals('bar', $f2['foo']); - } - - public function testProxiesDeferredFutureFailure() - { - $d = new Deferred(); - $f = new FutureArray($d->promise()); - $f2 = Core::proxy($f); - $d->reject(new \Exception('foo')); - try { - $f2['hello?']; - $this->fail('did not throw'); - } catch (\Exception $e) { - $this->assertEquals('foo', $e->getMessage()); - } - - } -} - -final class StrClass -{ - public function __toString() - { - return 'foo'; - } -} diff --git a/core/vendor/guzzlehttp/ringphp/tests/Future/CompletedFutureArrayTest.php b/core/vendor/guzzlehttp/ringphp/tests/Future/CompletedFutureArrayTest.php deleted file mode 100644 index 82d7efb..0000000 --- a/core/vendor/guzzlehttp/ringphp/tests/Future/CompletedFutureArrayTest.php +++ /dev/null @@ -1,21 +0,0 @@ - 'bar']); - $this->assertEquals('bar', $f['foo']); - $this->assertFalse(isset($f['baz'])); - $f['abc'] = '123'; - $this->assertTrue(isset($f['abc'])); - $this->assertEquals(['foo' => 'bar', 'abc' => '123'], iterator_to_array($f)); - $this->assertEquals(2, count($f)); - unset($f['abc']); - $this->assertEquals(1, count($f)); - $this->assertEquals(['foo' => 'bar'], iterator_to_array($f)); - } -} diff --git a/core/vendor/guzzlehttp/ringphp/tests/Future/CompletedFutureValueTest.php b/core/vendor/guzzlehttp/ringphp/tests/Future/CompletedFutureValueTest.php deleted file mode 100644 index 6ded40d..0000000 --- a/core/vendor/guzzlehttp/ringphp/tests/Future/CompletedFutureValueTest.php +++ /dev/null @@ -1,46 +0,0 @@ -assertEquals('hi', $f->wait()); - $f->cancel(); - - $a = null; - $f->then(function ($v) use (&$a) { - $a = $v; - }); - $this->assertSame('hi', $a); - } - - public function testThrows() - { - $ex = new \Exception('foo'); - $f = new CompletedFutureValue(null, $ex); - $f->cancel(); - try { - $f->wait(); - $this->fail('did not throw'); - } catch (\Exception $e) { - $this->assertSame($e, $ex); - } - } - - public function testMarksAsCancelled() - { - $ex = new CancelledFutureAccessException(); - $f = new CompletedFutureValue(null, $ex); - try { - $f->wait(); - $this->fail('did not throw'); - } catch (\Exception $e) { - $this->assertSame($e, $ex); - } - } -} diff --git a/core/vendor/guzzlehttp/ringphp/tests/Future/FutureArrayTest.php b/core/vendor/guzzlehttp/ringphp/tests/Future/FutureArrayTest.php deleted file mode 100644 index 0e09f5a..0000000 --- a/core/vendor/guzzlehttp/ringphp/tests/Future/FutureArrayTest.php +++ /dev/null @@ -1,56 +0,0 @@ -promise(), - function () use (&$c, $deferred) { - $c = true; - $deferred->resolve(['status' => 200]); - } - ); - $this->assertFalse($c); - $this->assertFalse($this->readAttribute($f, 'isRealized')); - $this->assertEquals(200, $f['status']); - $this->assertTrue($c); - } - - public function testActsLikeArray() - { - $deferred = new Deferred(); - $f = new FutureArray( - $deferred->promise(), - function () use (&$c, $deferred) { - $deferred->resolve(['status' => 200]); - } - ); - - $this->assertTrue(isset($f['status'])); - $this->assertEquals(200, $f['status']); - $this->assertEquals(['status' => 200], $f->wait()); - $this->assertEquals(1, count($f)); - $f['baz'] = 10; - $this->assertEquals(10, $f['baz']); - unset($f['baz']); - $this->assertFalse(isset($f['baz'])); - $this->assertEquals(['status' => 200], iterator_to_array($f)); - } - - /** - * @expectedException \RuntimeException - */ - public function testThrowsWhenAccessingInvalidProperty() - { - $deferred = new Deferred(); - $f = new FutureArray($deferred->promise(), function () {}); - $f->foo; - } -} diff --git a/core/vendor/guzzlehttp/ringphp/tests/Future/FutureValueTest.php b/core/vendor/guzzlehttp/ringphp/tests/Future/FutureValueTest.php deleted file mode 100644 index d59c543..0000000 --- a/core/vendor/guzzlehttp/ringphp/tests/Future/FutureValueTest.php +++ /dev/null @@ -1,109 +0,0 @@ -promise(), - function () use ($deferred, &$called) { - $called++; - $deferred->resolve('foo'); - } - ); - - $this->assertEquals('foo', $f->wait()); - $this->assertEquals(1, $called); - $this->assertEquals('foo', $f->wait()); - $this->assertEquals(1, $called); - $f->cancel(); - $this->assertTrue($this->readAttribute($f, 'isRealized')); - } - - /** - * @expectedException \GuzzleHttp\Ring\Exception\CancelledFutureAccessException - */ - public function testThrowsWhenAccessingCancelled() - { - $f = new FutureValue( - (new Deferred())->promise(), - function () {}, - function () { return true; } - ); - $f->cancel(); - $f->wait(); - } - - /** - * @expectedException \OutOfBoundsException - */ - public function testThrowsWhenDerefFailure() - { - $called = false; - $deferred = new Deferred(); - $f = new FutureValue( - $deferred->promise(), - function () use(&$called) { - $called = true; - } - ); - $deferred->reject(new \OutOfBoundsException()); - $f->wait(); - $this->assertFalse($called); - } - - /** - * @expectedException \GuzzleHttp\Ring\Exception\RingException - * @expectedExceptionMessage Waiting did not resolve future - */ - public function testThrowsWhenDerefDoesNotResolve() - { - $deferred = new Deferred(); - $f = new FutureValue( - $deferred->promise(), - function () use(&$called) { - $called = true; - } - ); - $f->wait(); - } - - public function testThrowingCancelledFutureAccessExceptionCancels() - { - $deferred = new Deferred(); - $f = new FutureValue( - $deferred->promise(), - function () use ($deferred) { - throw new CancelledFutureAccessException(); - } - ); - try { - $f->wait(); - $this->fail('did not throw'); - } catch (CancelledFutureAccessException $e) {} - } - - /** - * @expectedException \Exception - * @expectedExceptionMessage foo - */ - public function testThrowingExceptionInDerefMarksAsFailed() - { - $deferred = new Deferred(); - $f = new FutureValue( - $deferred->promise(), - function () { - throw new \Exception('foo'); - } - ); - $f->wait(); - } -} diff --git a/core/vendor/guzzlehttp/ringphp/tests/bootstrap.php b/core/vendor/guzzlehttp/ringphp/tests/bootstrap.php deleted file mode 100644 index 017610f..0000000 --- a/core/vendor/guzzlehttp/ringphp/tests/bootstrap.php +++ /dev/null @@ -1,11 +0,0 @@ - - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/core/vendor/guzzlehttp/streams/Makefile b/core/vendor/guzzlehttp/streams/Makefile deleted file mode 100644 index f4d4284..0000000 --- a/core/vendor/guzzlehttp/streams/Makefile +++ /dev/null @@ -1,19 +0,0 @@ -all: clean coverage - -release: tag - git push origin --tags - -tag: - chag tag --sign --debug CHANGELOG.rst - -test: - vendor/bin/phpunit - -coverage: - vendor/bin/phpunit --coverage-html=artifacts/coverage - -view-coverage: - open artifacts/coverage/index.html - -clean: - rm -rf artifacts/* diff --git a/core/vendor/guzzlehttp/streams/README.rst b/core/vendor/guzzlehttp/streams/README.rst deleted file mode 100644 index baff63b..0000000 --- a/core/vendor/guzzlehttp/streams/README.rst +++ /dev/null @@ -1,36 +0,0 @@ -============== -Guzzle Streams -============== - -Provides a simple abstraction over streams of data. - -This library is used in `Guzzle 5 `_, and is -(currently) compatible with the WIP PSR-7. - -Installation -============ - -This package can be installed easily using `Composer `_. -Simply add the following to the composer.json file at the root of your project: - -.. code-block:: javascript - - { - "require": { - "guzzlehttp/streams": "~3.0" - } - } - -Then install your dependencies using ``composer.phar install``. - -Documentation -============= - -The documentation for this package can be found on the main Guzzle website at -http://docs.guzzlephp.org/en/guzzle4/streams.html. - -Testing -======= - -This library is tested using PHPUnit. You'll need to install the dependencies -using `Composer `_ then run ``make test``. diff --git a/core/vendor/guzzlehttp/streams/composer.json b/core/vendor/guzzlehttp/streams/composer.json deleted file mode 100644 index 6d70343..0000000 --- a/core/vendor/guzzlehttp/streams/composer.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "name": "guzzlehttp/streams", - "description": "Provides a simple abstraction over streams of data", - "homepage": "http://guzzlephp.org/", - "keywords": ["stream", "guzzle"], - "license": "MIT", - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - } - ], - "require": { - "php": ">=5.4.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.0" - }, - "autoload": { - "psr-4": { "GuzzleHttp\\Stream\\": "src/" } - }, - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - } -} diff --git a/core/vendor/guzzlehttp/streams/phpunit.xml.dist b/core/vendor/guzzlehttp/streams/phpunit.xml.dist deleted file mode 100644 index 6e758c1..0000000 --- a/core/vendor/guzzlehttp/streams/phpunit.xml.dist +++ /dev/null @@ -1,17 +0,0 @@ - - - - - tests - - - - - src - - src/functions.php - - - - diff --git a/core/vendor/guzzlehttp/streams/src/AppendStream.php b/core/vendor/guzzlehttp/streams/src/AppendStream.php deleted file mode 100644 index 94bda71..0000000 --- a/core/vendor/guzzlehttp/streams/src/AppendStream.php +++ /dev/null @@ -1,220 +0,0 @@ -addStream($stream); - } - } - - public function __toString() - { - try { - $this->seek(0); - return $this->getContents(); - } catch (\Exception $e) { - return ''; - } - } - - /** - * Add a stream to the AppendStream - * - * @param StreamInterface $stream Stream to append. Must be readable. - * - * @throws \InvalidArgumentException if the stream is not readable - */ - public function addStream(StreamInterface $stream) - { - if (!$stream->isReadable()) { - throw new \InvalidArgumentException('Each stream must be readable'); - } - - // The stream is only seekable if all streams are seekable - if (!$stream->isSeekable()) { - $this->seekable = false; - } - - $this->streams[] = $stream; - } - - public function getContents() - { - return Utils::copyToString($this); - } - - /** - * Closes each attached stream. - * - * {@inheritdoc} - */ - public function close() - { - $this->pos = $this->current = 0; - - foreach ($this->streams as $stream) { - $stream->close(); - } - - $this->streams = []; - } - - /** - * Detaches each attached stream - * - * {@inheritdoc} - */ - public function detach() - { - $this->close(); - $this->detached = true; - } - - public function attach($stream) - { - throw new CannotAttachException(); - } - - public function tell() - { - return $this->pos; - } - - /** - * Tries to calculate the size by adding the size of each stream. - * - * If any of the streams do not return a valid number, then the size of the - * append stream cannot be determined and null is returned. - * - * {@inheritdoc} - */ - public function getSize() - { - $size = 0; - - foreach ($this->streams as $stream) { - $s = $stream->getSize(); - if ($s === null) { - return null; - } - $size += $s; - } - - return $size; - } - - public function eof() - { - return !$this->streams || - ($this->current >= count($this->streams) - 1 && - $this->streams[$this->current]->eof()); - } - - /** - * Attempts to seek to the given position. Only supports SEEK_SET. - * - * {@inheritdoc} - */ - public function seek($offset, $whence = SEEK_SET) - { - if (!$this->seekable || $whence !== SEEK_SET) { - return false; - } - - $success = true; - $this->pos = $this->current = 0; - - // Rewind each stream - foreach ($this->streams as $stream) { - if (!$stream->seek(0)) { - $success = false; - } - } - - if (!$success) { - return false; - } - - // Seek to the actual position by reading from each stream - while ($this->pos < $offset && !$this->eof()) { - $this->read(min(8096, $offset - $this->pos)); - } - - return $this->pos == $offset; - } - - /** - * Reads from all of the appended streams until the length is met or EOF. - * - * {@inheritdoc} - */ - public function read($length) - { - $buffer = ''; - $total = count($this->streams) - 1; - $remaining = $length; - - while ($remaining > 0) { - // Progress to the next stream if needed. - if ($this->streams[$this->current]->eof()) { - if ($this->current == $total) { - break; - } - $this->current++; - } - $buffer .= $this->streams[$this->current]->read($remaining); - $remaining = $length - strlen($buffer); - } - - $this->pos += strlen($buffer); - - return $buffer; - } - - public function isReadable() - { - return true; - } - - public function isWritable() - { - return false; - } - - public function isSeekable() - { - return $this->seekable; - } - - public function write($string) - { - return false; - } - - public function getMetadata($key = null) - { - return $key ? null : []; - } -} diff --git a/core/vendor/guzzlehttp/streams/src/AsyncReadStream.php b/core/vendor/guzzlehttp/streams/src/AsyncReadStream.php deleted file mode 100644 index 25ad960..0000000 --- a/core/vendor/guzzlehttp/streams/src/AsyncReadStream.php +++ /dev/null @@ -1,207 +0,0 @@ -isReadable() || !$buffer->isWritable()) { - throw new \InvalidArgumentException( - 'Buffer must be readable and writable' - ); - } - - if (isset($config['size'])) { - $this->size = $config['size']; - } - - static $callables = ['pump', 'drain']; - foreach ($callables as $check) { - if (isset($config[$check])) { - if (!is_callable($config[$check])) { - throw new \InvalidArgumentException( - $check . ' must be callable' - ); - } - $this->{$check} = $config[$check]; - } - } - - $this->hwm = $buffer->getMetadata('hwm'); - - // Cannot drain when there's no high water mark. - if ($this->hwm === null) { - $this->drain = null; - } - - $this->stream = $buffer; - } - - /** - * Factory method used to create new async stream and an underlying buffer - * if no buffer is provided. - * - * This function accepts the same options as AsyncReadStream::__construct, - * but added the following key value pairs: - * - * - buffer: (StreamInterface) Buffer used to buffer data. If none is - * provided, a default buffer is created. - * - hwm: (int) High water mark to use if a buffer is created on your - * behalf. - * - max_buffer: (int) If provided, wraps the utilized buffer in a - * DroppingStream decorator to ensure that buffer does not exceed a given - * length. When exceeded, the stream will begin dropping data. Set the - * max_buffer to 0, to use a NullStream which does not store data. - * - write: (callable) A function that is invoked when data is written - * to the underlying buffer. The function accepts the buffer as the first - * argument, and the data being written as the second. The function MUST - * return the number of bytes that were written or false to let writers - * know to slow down. - * - drain: (callable) See constructor documentation. - * - pump: (callable) See constructor documentation. - * - * @param array $options Associative array of options. - * - * @return array Returns an array containing the buffer used to buffer - * data, followed by the ready to use AsyncReadStream object. - */ - public static function create(array $options = []) - { - $maxBuffer = isset($options['max_buffer']) - ? $options['max_buffer'] - : null; - - if ($maxBuffer === 0) { - $buffer = new NullStream(); - } elseif (isset($options['buffer'])) { - $buffer = $options['buffer']; - } else { - $hwm = isset($options['hwm']) ? $options['hwm'] : 16384; - $buffer = new BufferStream($hwm); - } - - if ($maxBuffer > 0) { - $buffer = new DroppingStream($buffer, $options['max_buffer']); - } - - // Call the on_write callback if an on_write function was provided. - if (isset($options['write'])) { - $onWrite = $options['write']; - $buffer = FnStream::decorate($buffer, [ - 'write' => function ($string) use ($buffer, $onWrite) { - $result = $buffer->write($string); - $onWrite($buffer, $string); - return $result; - } - ]); - } - - return [$buffer, new self($buffer, $options)]; - } - - public function getSize() - { - return $this->size; - } - - public function isWritable() - { - return false; - } - - public function write($string) - { - return false; - } - - public function read($length) - { - if (!$this->needsDrain && $this->drain) { - $this->needsDrain = $this->stream->getSize() >= $this->hwm; - } - - $result = $this->stream->read($length); - - // If we need to drain, then drain when the buffer is empty. - if ($this->needsDrain && $this->stream->getSize() === 0) { - $this->needsDrain = false; - $drainFn = $this->drain; - $drainFn($this->stream); - } - - $resultLen = strlen($result); - - // If a pump was provided, the buffer is still open, and not enough - // data was given, then block until the data is provided. - if ($this->pump && $resultLen < $length) { - $pumpFn = $this->pump; - $result .= $pumpFn($length - $resultLen); - } - - return $result; - } -} diff --git a/core/vendor/guzzlehttp/streams/src/BufferStream.php b/core/vendor/guzzlehttp/streams/src/BufferStream.php deleted file mode 100644 index 0fffbd6..0000000 --- a/core/vendor/guzzlehttp/streams/src/BufferStream.php +++ /dev/null @@ -1,138 +0,0 @@ -hwm = $hwm; - } - - public function __toString() - { - return $this->getContents(); - } - - public function getContents() - { - $buffer = $this->buffer; - $this->buffer = ''; - - return $buffer; - } - - public function close() - { - $this->buffer = ''; - } - - public function detach() - { - $this->close(); - } - - public function attach($stream) - { - throw new CannotAttachException(); - } - - public function getSize() - { - return strlen($this->buffer); - } - - public function isReadable() - { - return true; - } - - public function isWritable() - { - return true; - } - - public function isSeekable() - { - return false; - } - - public function seek($offset, $whence = SEEK_SET) - { - return false; - } - - public function eof() - { - return strlen($this->buffer) === 0; - } - - public function tell() - { - return false; - } - - /** - * Reads data from the buffer. - */ - public function read($length) - { - $currentLength = strlen($this->buffer); - - if ($length >= $currentLength) { - // No need to slice the buffer because we don't have enough data. - $result = $this->buffer; - $this->buffer = ''; - } else { - // Slice up the result to provide a subset of the buffer. - $result = substr($this->buffer, 0, $length); - $this->buffer = substr($this->buffer, $length); - } - - return $result; - } - - /** - * Writes data to the buffer. - */ - public function write($string) - { - $this->buffer .= $string; - - if (strlen($this->buffer) >= $this->hwm) { - return false; - } - - return strlen($string); - } - - public function getMetadata($key = null) - { - if ($key == 'hwm') { - return $this->hwm; - } - - return $key ? null : []; - } -} diff --git a/core/vendor/guzzlehttp/streams/src/CachingStream.php b/core/vendor/guzzlehttp/streams/src/CachingStream.php deleted file mode 100644 index 60bb905..0000000 --- a/core/vendor/guzzlehttp/streams/src/CachingStream.php +++ /dev/null @@ -1,122 +0,0 @@ -remoteStream = $stream; - $this->stream = $target ?: new Stream(fopen('php://temp', 'r+')); - } - - public function getSize() - { - return max($this->stream->getSize(), $this->remoteStream->getSize()); - } - - /** - * {@inheritdoc} - * @throws SeekException When seeking with SEEK_END or when seeking - * past the total size of the buffer stream - */ - public function seek($offset, $whence = SEEK_SET) - { - if ($whence == SEEK_SET) { - $byte = $offset; - } elseif ($whence == SEEK_CUR) { - $byte = $offset + $this->tell(); - } else { - return false; - } - - // You cannot skip ahead past where you've read from the remote stream - if ($byte > $this->stream->getSize()) { - throw new SeekException( - $this, - $byte, - sprintf('Cannot seek to byte %d when the buffered stream only' - . ' contains %d bytes', $byte, $this->stream->getSize()) - ); - } - - return $this->stream->seek($byte); - } - - public function read($length) - { - // Perform a regular read on any previously read data from the buffer - $data = $this->stream->read($length); - $remaining = $length - strlen($data); - - // More data was requested so read from the remote stream - if ($remaining) { - // If data was written to the buffer in a position that would have - // been filled from the remote stream, then we must skip bytes on - // the remote stream to emulate overwriting bytes from that - // position. This mimics the behavior of other PHP stream wrappers. - $remoteData = $this->remoteStream->read( - $remaining + $this->skipReadBytes - ); - - if ($this->skipReadBytes) { - $len = strlen($remoteData); - $remoteData = substr($remoteData, $this->skipReadBytes); - $this->skipReadBytes = max(0, $this->skipReadBytes - $len); - } - - $data .= $remoteData; - $this->stream->write($remoteData); - } - - return $data; - } - - public function write($string) - { - // When appending to the end of the currently read stream, you'll want - // to skip bytes from being read from the remote stream to emulate - // other stream wrappers. Basically replacing bytes of data of a fixed - // length. - $overflow = (strlen($string) + $this->tell()) - $this->remoteStream->tell(); - if ($overflow > 0) { - $this->skipReadBytes += $overflow; - } - - return $this->stream->write($string); - } - - public function eof() - { - return $this->stream->eof() && $this->remoteStream->eof(); - } - - /** - * Close both the remote stream and buffer stream - */ - public function close() - { - $this->remoteStream->close() && $this->stream->close(); - } -} diff --git a/core/vendor/guzzlehttp/streams/src/DroppingStream.php b/core/vendor/guzzlehttp/streams/src/DroppingStream.php deleted file mode 100644 index 56ee80c..0000000 --- a/core/vendor/guzzlehttp/streams/src/DroppingStream.php +++ /dev/null @@ -1,42 +0,0 @@ -stream = $stream; - $this->maxLength = $maxLength; - } - - public function write($string) - { - $diff = $this->maxLength - $this->stream->getSize(); - - // Begin returning false when the underlying stream is too large. - if ($diff <= 0) { - return false; - } - - // Write the stream or a subset of the stream if needed. - if (strlen($string) < $diff) { - return $this->stream->write($string); - } - - $this->stream->write(substr($string, 0, $diff)); - - return false; - } -} diff --git a/core/vendor/guzzlehttp/streams/src/Exception/CannotAttachException.php b/core/vendor/guzzlehttp/streams/src/Exception/CannotAttachException.php deleted file mode 100644 index e631b9f..0000000 --- a/core/vendor/guzzlehttp/streams/src/Exception/CannotAttachException.php +++ /dev/null @@ -1,4 +0,0 @@ -stream = $stream; - $msg = $msg ?: 'Could not seek the stream to position ' . $pos; - parent::__construct($msg); - } - - /** - * @return StreamInterface - */ - public function getStream() - { - return $this->stream; - } -} diff --git a/core/vendor/guzzlehttp/streams/src/FnStream.php b/core/vendor/guzzlehttp/streams/src/FnStream.php deleted file mode 100644 index 6b5872d..0000000 --- a/core/vendor/guzzlehttp/streams/src/FnStream.php +++ /dev/null @@ -1,147 +0,0 @@ -methods = $methods; - - // Create the functions on the class - foreach ($methods as $name => $fn) { - $this->{'_fn_' . $name} = $fn; - } - } - - /** - * Lazily determine which methods are not implemented. - * @throws \BadMethodCallException - */ - public function __get($name) - { - throw new \BadMethodCallException(str_replace('_fn_', '', $name) - . '() is not implemented in the FnStream'); - } - - /** - * The close method is called on the underlying stream only if possible. - */ - public function __destruct() - { - if (isset($this->_fn_close)) { - call_user_func($this->_fn_close); - } - } - - /** - * Adds custom functionality to an underlying stream by intercepting - * specific method calls. - * - * @param StreamInterface $stream Stream to decorate - * @param array $methods Hash of method name to a closure - * - * @return FnStream - */ - public static function decorate(StreamInterface $stream, array $methods) - { - // If any of the required methods were not provided, then simply - // proxy to the decorated stream. - foreach (array_diff(self::$slots, array_keys($methods)) as $diff) { - $methods[$diff] = [$stream, $diff]; - } - - return new self($methods); - } - - public function __toString() - { - return call_user_func($this->_fn___toString); - } - - public function close() - { - return call_user_func($this->_fn_close); - } - - public function detach() - { - return call_user_func($this->_fn_detach); - } - - public function attach($stream) - { - return call_user_func($this->_fn_attach, $stream); - } - - public function getSize() - { - return call_user_func($this->_fn_getSize); - } - - public function tell() - { - return call_user_func($this->_fn_tell); - } - - public function eof() - { - return call_user_func($this->_fn_eof); - } - - public function isSeekable() - { - return call_user_func($this->_fn_isSeekable); - } - - public function seek($offset, $whence = SEEK_SET) - { - return call_user_func($this->_fn_seek, $offset, $whence); - } - - public function isWritable() - { - return call_user_func($this->_fn_isWritable); - } - - public function write($string) - { - return call_user_func($this->_fn_write, $string); - } - - public function isReadable() - { - return call_user_func($this->_fn_isReadable); - } - - public function read($length) - { - return call_user_func($this->_fn_read, $length); - } - - public function getContents() - { - return call_user_func($this->_fn_getContents); - } - - public function getMetadata($key = null) - { - return call_user_func($this->_fn_getMetadata, $key); - } -} diff --git a/core/vendor/guzzlehttp/streams/src/GuzzleStreamWrapper.php b/core/vendor/guzzlehttp/streams/src/GuzzleStreamWrapper.php deleted file mode 100644 index 4d049a6..0000000 --- a/core/vendor/guzzlehttp/streams/src/GuzzleStreamWrapper.php +++ /dev/null @@ -1,117 +0,0 @@ -isReadable()) { - $mode = $stream->isWritable() ? 'r+' : 'r'; - } elseif ($stream->isWritable()) { - $mode = 'w'; - } else { - throw new \InvalidArgumentException('The stream must be readable, ' - . 'writable, or both.'); - } - - return fopen('guzzle://stream', $mode, null, stream_context_create([ - 'guzzle' => ['stream' => $stream] - ])); - } - - /** - * Registers the stream wrapper if needed - */ - public static function register() - { - if (!in_array('guzzle', stream_get_wrappers())) { - stream_wrapper_register('guzzle', __CLASS__); - } - } - - public function stream_open($path, $mode, $options, &$opened_path) - { - $options = stream_context_get_options($this->context); - - if (!isset($options['guzzle']['stream'])) { - return false; - } - - $this->mode = $mode; - $this->stream = $options['guzzle']['stream']; - - return true; - } - - public function stream_read($count) - { - return $this->stream->read($count); - } - - public function stream_write($data) - { - return (int) $this->stream->write($data); - } - - public function stream_tell() - { - return $this->stream->tell(); - } - - public function stream_eof() - { - return $this->stream->eof(); - } - - public function stream_seek($offset, $whence) - { - return $this->stream->seek($offset, $whence); - } - - public function stream_stat() - { - static $modeMap = [ - 'r' => 33060, - 'r+' => 33206, - 'w' => 33188 - ]; - - return [ - 'dev' => 0, - 'ino' => 0, - 'mode' => $modeMap[$this->mode], - 'nlink' => 0, - 'uid' => 0, - 'gid' => 0, - 'rdev' => 0, - 'size' => $this->stream->getSize() ?: 0, - 'atime' => 0, - 'mtime' => 0, - 'ctime' => 0, - 'blksize' => 0, - 'blocks' => 0 - ]; - } -} diff --git a/core/vendor/guzzlehttp/streams/src/InflateStream.php b/core/vendor/guzzlehttp/streams/src/InflateStream.php deleted file mode 100644 index 978af21..0000000 --- a/core/vendor/guzzlehttp/streams/src/InflateStream.php +++ /dev/null @@ -1,27 +0,0 @@ -stream = new Stream($resource); - } -} diff --git a/core/vendor/guzzlehttp/streams/src/LazyOpenStream.php b/core/vendor/guzzlehttp/streams/src/LazyOpenStream.php deleted file mode 100644 index 6242ee7..0000000 --- a/core/vendor/guzzlehttp/streams/src/LazyOpenStream.php +++ /dev/null @@ -1,37 +0,0 @@ -filename = $filename; - $this->mode = $mode; - } - - /** - * Creates the underlying stream lazily when required. - * - * @return StreamInterface - */ - protected function createStream() - { - return Stream::factory(Utils::open($this->filename, $this->mode)); - } -} diff --git a/core/vendor/guzzlehttp/streams/src/LimitStream.php b/core/vendor/guzzlehttp/streams/src/LimitStream.php deleted file mode 100644 index e9fad98..0000000 --- a/core/vendor/guzzlehttp/streams/src/LimitStream.php +++ /dev/null @@ -1,161 +0,0 @@ -stream = $stream; - $this->setLimit($limit); - $this->setOffset($offset); - } - - public function eof() - { - // Always return true if the underlying stream is EOF - if ($this->stream->eof()) { - return true; - } - - // No limit and the underlying stream is not at EOF - if ($this->limit == -1) { - return false; - } - - $tell = $this->stream->tell(); - if ($tell === false) { - return false; - } - - return $tell >= $this->offset + $this->limit; - } - - /** - * Returns the size of the limited subset of data - * {@inheritdoc} - */ - public function getSize() - { - if (null === ($length = $this->stream->getSize())) { - return null; - } elseif ($this->limit == -1) { - return $length - $this->offset; - } else { - return min($this->limit, $length - $this->offset); - } - } - - /** - * Allow for a bounded seek on the read limited stream - * {@inheritdoc} - */ - public function seek($offset, $whence = SEEK_SET) - { - if ($whence !== SEEK_SET || $offset < 0) { - return false; - } - - $offset += $this->offset; - - if ($this->limit !== -1) { - if ($offset > $this->offset + $this->limit) { - $offset = $this->offset + $this->limit; - } - } - - return $this->stream->seek($offset); - } - - /** - * Give a relative tell() - * {@inheritdoc} - */ - public function tell() - { - return $this->stream->tell() - $this->offset; - } - - /** - * Set the offset to start limiting from - * - * @param int $offset Offset to seek to and begin byte limiting from - * - * @return self - * @throws SeekException - */ - public function setOffset($offset) - { - $current = $this->stream->tell(); - - if ($current !== $offset) { - // If the stream cannot seek to the offset position, then read to it - if (!$this->stream->seek($offset)) { - if ($current > $offset) { - throw new SeekException($this, $offset); - } else { - $this->stream->read($offset - $current); - } - } - } - - $this->offset = $offset; - - return $this; - } - - /** - * Set the limit of bytes that the decorator allows to be read from the - * stream. - * - * @param int $limit Number of bytes to allow to be read from the stream. - * Use -1 for no limit. - * @return self - */ - public function setLimit($limit) - { - $this->limit = $limit; - - return $this; - } - - public function read($length) - { - if ($this->limit == -1) { - return $this->stream->read($length); - } - - // Check if the current position is less than the total allowed - // bytes + original offset - $remaining = ($this->offset + $this->limit) - $this->stream->tell(); - if ($remaining > 0) { - // Only return the amount of requested data, ensuring that the byte - // limit is not exceeded - return $this->stream->read(min($remaining, $length)); - } else { - return false; - } - } -} diff --git a/core/vendor/guzzlehttp/streams/src/MetadataStreamInterface.php b/core/vendor/guzzlehttp/streams/src/MetadataStreamInterface.php deleted file mode 100644 index c1433ad..0000000 --- a/core/vendor/guzzlehttp/streams/src/MetadataStreamInterface.php +++ /dev/null @@ -1,11 +0,0 @@ -stream->attach($stream); - } -} diff --git a/core/vendor/guzzlehttp/streams/src/NullStream.php b/core/vendor/guzzlehttp/streams/src/NullStream.php deleted file mode 100644 index 41ee776..0000000 --- a/core/vendor/guzzlehttp/streams/src/NullStream.php +++ /dev/null @@ -1,78 +0,0 @@ -source = $source; - $this->size = isset($options['size']) ? $options['size'] : null; - $this->metadata = isset($options['metadata']) ? $options['metadata'] : []; - $this->buffer = new BufferStream(); - } - - public function __toString() - { - return Utils::copyToString($this); - } - - public function close() - { - $this->detach(); - } - - public function detach() - { - $this->tellPos = false; - $this->source = null; - } - - public function attach($stream) - { - throw new CannotAttachException(); - } - - public function getSize() - { - return $this->size; - } - - public function tell() - { - return $this->tellPos; - } - - public function eof() - { - return !$this->source; - } - - public function isSeekable() - { - return false; - } - - public function seek($offset, $whence = SEEK_SET) - { - return false; - } - - public function isWritable() - { - return false; - } - - public function write($string) - { - return false; - } - - public function isReadable() - { - return true; - } - - public function read($length) - { - $data = $this->buffer->read($length); - $readLen = strlen($data); - $this->tellPos += $readLen; - $remaining = $length - $readLen; - - if ($remaining) { - $this->pump($remaining); - $data .= $this->buffer->read($remaining); - $this->tellPos += strlen($data) - $readLen; - } - - return $data; - } - - public function getContents() - { - $result = ''; - while (!$this->eof()) { - $result .= $this->read(1000000); - } - - return $result; - } - - public function getMetadata($key = null) - { - if (!$key) { - return $this->metadata; - } - - return isset($this->metadata[$key]) ? $this->metadata[$key] : null; - } - - private function pump($length) - { - if ($this->source) { - do { - $data = call_user_func($this->source, $length); - if ($data === false || $data === null) { - $this->source = null; - return; - } - $this->buffer->write($data); - $length -= strlen($data); - } while ($length > 0); - } - } -} diff --git a/core/vendor/guzzlehttp/streams/src/Stream.php b/core/vendor/guzzlehttp/streams/src/Stream.php deleted file mode 100644 index 7adbc5e..0000000 --- a/core/vendor/guzzlehttp/streams/src/Stream.php +++ /dev/null @@ -1,261 +0,0 @@ - [ - 'r' => true, 'w+' => true, 'r+' => true, 'x+' => true, 'c+' => true, - 'rb' => true, 'w+b' => true, 'r+b' => true, 'x+b' => true, - 'c+b' => true, 'rt' => true, 'w+t' => true, 'r+t' => true, - 'x+t' => true, 'c+t' => true, 'a+' => true - ], - 'write' => [ - 'w' => true, 'w+' => true, 'rw' => true, 'r+' => true, 'x+' => true, - 'c+' => true, 'wb' => true, 'w+b' => true, 'r+b' => true, - 'x+b' => true, 'c+b' => true, 'w+t' => true, 'r+t' => true, - 'x+t' => true, 'c+t' => true, 'a' => true, 'a+' => true - ] - ]; - - /** - * Create a new stream based on the input type. - * - * This factory accepts the same associative array of options as described - * in the constructor. - * - * @param resource|string|StreamInterface $resource Entity body data - * @param array $options Additional options - * - * @return Stream - * @throws \InvalidArgumentException if the $resource arg is not valid. - */ - public static function factory($resource = '', array $options = []) - { - $type = gettype($resource); - - if ($type == 'string') { - $stream = fopen('php://temp', 'r+'); - if ($resource !== '') { - fwrite($stream, $resource); - fseek($stream, 0); - } - return new self($stream, $options); - } - - if ($type == 'resource') { - return new self($resource, $options); - } - - if ($resource instanceof StreamInterface) { - return $resource; - } - - if ($type == 'object' && method_exists($resource, '__toString')) { - return self::factory((string) $resource, $options); - } - - if (is_callable($resource)) { - return new PumpStream($resource, $options); - } - - if ($resource instanceof \Iterator) { - return new PumpStream(function () use ($resource) { - if (!$resource->valid()) { - return false; - } - $result = $resource->current(); - $resource->next(); - return $result; - }, $options); - } - - throw new \InvalidArgumentException('Invalid resource type: ' . $type); - } - - /** - * This constructor accepts an associative array of options. - * - * - size: (int) If a read stream would otherwise have an indeterminate - * size, but the size is known due to foreknownledge, then you can - * provide that size, in bytes. - * - metadata: (array) Any additional metadata to return when the metadata - * of the stream is accessed. - * - * @param resource $stream Stream resource to wrap. - * @param array $options Associative array of options. - * - * @throws \InvalidArgumentException if the stream is not a stream resource - */ - public function __construct($stream, $options = []) - { - if (!is_resource($stream)) { - throw new \InvalidArgumentException('Stream must be a resource'); - } - - if (isset($options['size'])) { - $this->size = $options['size']; - } - - $this->customMetadata = isset($options['metadata']) - ? $options['metadata'] - : []; - - $this->attach($stream); - } - - /** - * Closes the stream when the destructed - */ - public function __destruct() - { - $this->close(); - } - - public function __toString() - { - if (!$this->stream) { - return ''; - } - - $this->seek(0); - - return (string) stream_get_contents($this->stream); - } - - public function getContents() - { - return $this->stream ? stream_get_contents($this->stream) : ''; - } - - public function close() - { - if (is_resource($this->stream)) { - fclose($this->stream); - } - - $this->detach(); - } - - public function detach() - { - $result = $this->stream; - $this->stream = $this->size = $this->uri = null; - $this->readable = $this->writable = $this->seekable = false; - - return $result; - } - - public function attach($stream) - { - $this->stream = $stream; - $meta = stream_get_meta_data($this->stream); - $this->seekable = $meta['seekable']; - $this->readable = isset(self::$readWriteHash['read'][$meta['mode']]); - $this->writable = isset(self::$readWriteHash['write'][$meta['mode']]); - $this->uri = $this->getMetadata('uri'); - } - - public function getSize() - { - if ($this->size !== null) { - return $this->size; - } - - if (!$this->stream) { - return null; - } - - // Clear the stat cache if the stream has a URI - if ($this->uri) { - clearstatcache(true, $this->uri); - } - - $stats = fstat($this->stream); - if (isset($stats['size'])) { - $this->size = $stats['size']; - return $this->size; - } - - return null; - } - - public function isReadable() - { - return $this->readable; - } - - public function isWritable() - { - return $this->writable; - } - - public function isSeekable() - { - return $this->seekable; - } - - public function eof() - { - return !$this->stream || feof($this->stream); - } - - public function tell() - { - return $this->stream ? ftell($this->stream) : false; - } - - public function setSize($size) - { - $this->size = $size; - - return $this; - } - - public function seek($offset, $whence = SEEK_SET) - { - return $this->seekable - ? fseek($this->stream, $offset, $whence) === 0 - : false; - } - - public function read($length) - { - return $this->readable ? fread($this->stream, $length) : false; - } - - public function write($string) - { - // We can't know the size after writing anything - $this->size = null; - - return $this->writable ? fwrite($this->stream, $string) : false; - } - - public function getMetadata($key = null) - { - if (!$this->stream) { - return $key ? null : []; - } elseif (!$key) { - return $this->customMetadata + stream_get_meta_data($this->stream); - } elseif (isset($this->customMetadata[$key])) { - return $this->customMetadata[$key]; - } - - $meta = stream_get_meta_data($this->stream); - - return isset($meta[$key]) ? $meta[$key] : null; - } -} diff --git a/core/vendor/guzzlehttp/streams/src/StreamDecoratorTrait.php b/core/vendor/guzzlehttp/streams/src/StreamDecoratorTrait.php deleted file mode 100644 index 39c19c5..0000000 --- a/core/vendor/guzzlehttp/streams/src/StreamDecoratorTrait.php +++ /dev/null @@ -1,143 +0,0 @@ -stream = $stream; - } - - /** - * Magic method used to create a new stream if streams are not added in - * the constructor of a decorator (e.g., LazyOpenStream). - */ - public function __get($name) - { - if ($name == 'stream') { - $this->stream = $this->createStream(); - return $this->stream; - } - - throw new \UnexpectedValueException("$name not found on class"); - } - - public function __toString() - { - try { - $this->seek(0); - return $this->getContents(); - } catch (\Exception $e) { - // Really, PHP? https://bugs.php.net/bug.php?id=53648 - trigger_error('StreamDecorator::__toString exception: ' - . (string) $e, E_USER_ERROR); - return ''; - } - } - - public function getContents() - { - return Utils::copyToString($this); - } - - /** - * Allow decorators to implement custom methods - * - * @param string $method Missing method name - * @param array $args Method arguments - * - * @return mixed - */ - public function __call($method, array $args) - { - $result = call_user_func_array(array($this->stream, $method), $args); - - // Always return the wrapped object if the result is a return $this - return $result === $this->stream ? $this : $result; - } - - public function close() - { - $this->stream->close(); - } - - public function getMetadata($key = null) - { - return $this->stream->getMetadata($key); - } - - public function detach() - { - return $this->stream->detach(); - } - - public function attach($stream) - { - throw new CannotAttachException(); - } - - public function getSize() - { - return $this->stream->getSize(); - } - - public function eof() - { - return $this->stream->eof(); - } - - public function tell() - { - return $this->stream->tell(); - } - - public function isReadable() - { - return $this->stream->isReadable(); - } - - public function isWritable() - { - return $this->stream->isWritable(); - } - - public function isSeekable() - { - return $this->stream->isSeekable(); - } - - public function seek($offset, $whence = SEEK_SET) - { - return $this->stream->seek($offset, $whence); - } - - public function read($length) - { - return $this->stream->read($length); - } - - public function write($string) - { - return $this->stream->write($string); - } - - /** - * Implement in subclasses to dynamically create streams when requested. - * - * @return StreamInterface - * @throws \BadMethodCallException - */ - protected function createStream() - { - throw new \BadMethodCallException('createStream() not implemented in ' - . get_class($this)); - } -} diff --git a/core/vendor/guzzlehttp/streams/src/StreamInterface.php b/core/vendor/guzzlehttp/streams/src/StreamInterface.php deleted file mode 100644 index fd19c6f..0000000 --- a/core/vendor/guzzlehttp/streams/src/StreamInterface.php +++ /dev/null @@ -1,159 +0,0 @@ -eof()) { - $buf = $stream->read(1048576); - if ($buf === false) { - break; - } - $buffer .= $buf; - } - return $buffer; - } - - $len = 0; - while (!$stream->eof() && $len < $maxLen) { - $buf = $stream->read($maxLen - $len); - if ($buf === false) { - break; - } - $buffer .= $buf; - $len = strlen($buffer); - } - - return $buffer; - } - - /** - * Copy the contents of a stream into another stream until the given number - * of bytes have been read. - * - * @param StreamInterface $source Stream to read from - * @param StreamInterface $dest Stream to write to - * @param int $maxLen Maximum number of bytes to read. Pass -1 - * to read the entire stream. - */ - public static function copyToStream( - StreamInterface $source, - StreamInterface $dest, - $maxLen = -1 - ) { - if ($maxLen === -1) { - while (!$source->eof()) { - if (!$dest->write($source->read(1048576))) { - break; - } - } - return; - } - - $bytes = 0; - while (!$source->eof()) { - $buf = $source->read($maxLen - $bytes); - if (!($len = strlen($buf))) { - break; - } - $bytes += $len; - $dest->write($buf); - if ($bytes == $maxLen) { - break; - } - } - } - - /** - * Calculate a hash of a Stream - * - * @param StreamInterface $stream Stream to calculate the hash for - * @param string $algo Hash algorithm (e.g. md5, crc32, etc) - * @param bool $rawOutput Whether or not to use raw output - * - * @return string Returns the hash of the stream - * @throws SeekException - */ - public static function hash( - StreamInterface $stream, - $algo, - $rawOutput = false - ) { - $pos = $stream->tell(); - - if ($pos > 0 && !$stream->seek(0)) { - throw new SeekException($stream); - } - - $ctx = hash_init($algo); - while (!$stream->eof()) { - hash_update($ctx, $stream->read(1048576)); - } - - $out = hash_final($ctx, (bool) $rawOutput); - $stream->seek($pos); - - return $out; - } - - /** - * Read a line from the stream up to the maximum allowed buffer length - * - * @param StreamInterface $stream Stream to read from - * @param int $maxLength Maximum buffer length - * - * @return string|bool - */ - public static function readline(StreamInterface $stream, $maxLength = null) - { - $buffer = ''; - $size = 0; - - while (!$stream->eof()) { - if (false === ($byte = $stream->read(1))) { - return $buffer; - } - $buffer .= $byte; - // Break when a new line is found or the max length - 1 is reached - if ($byte == PHP_EOL || ++$size == $maxLength - 1) { - break; - } - } - - return $buffer; - } - - /** - * Alias of GuzzleHttp\Stream\Stream::factory. - * - * @param mixed $resource Resource to create - * @param array $options Associative array of stream options defined in - * {@see \GuzzleHttp\Stream\Stream::__construct} - * - * @return StreamInterface - * - * @see GuzzleHttp\Stream\Stream::factory - * @see GuzzleHttp\Stream\Stream::__construct - */ - public static function create($resource, array $options = []) - { - return Stream::factory($resource, $options); - } -} diff --git a/core/vendor/guzzlehttp/streams/tests/AppendStreamTest.php b/core/vendor/guzzlehttp/streams/tests/AppendStreamTest.php deleted file mode 100644 index 78798d9..0000000 --- a/core/vendor/guzzlehttp/streams/tests/AppendStreamTest.php +++ /dev/null @@ -1,178 +0,0 @@ -getMockBuilder('GuzzleHttp\Stream\StreamInterface') - ->setMethods(['isReadable']) - ->getMockForAbstractClass(); - $s->expects($this->once()) - ->method('isReadable') - ->will($this->returnValue(false)); - $a->addStream($s); - } - - public function testValidatesSeekType() - { - $a = new AppendStream(); - $this->assertFalse($a->seek(100, SEEK_CUR)); - } - - public function testTriesToRewindOnSeek() - { - $a = new AppendStream(); - $s = $this->getMockBuilder('GuzzleHttp\Stream\StreamInterface') - ->setMethods(['isReadable', 'seek', 'isSeekable']) - ->getMockForAbstractClass(); - $s->expects($this->once()) - ->method('isReadable') - ->will($this->returnValue(true)); - $s->expects($this->once()) - ->method('isSeekable') - ->will($this->returnValue(true)); - $s->expects($this->once()) - ->method('seek') - ->will($this->returnValue(false)); - $a->addStream($s); - $this->assertFalse($a->seek(10)); - } - - public function testSeeksToPositionByReading() - { - $a = new AppendStream([ - Stream::factory('foo'), - Stream::factory('bar'), - Stream::factory('baz'), - ]); - - $this->assertTrue($a->seek(3)); - $this->assertEquals(3, $a->tell()); - $this->assertEquals('bar', $a->read(3)); - $a->seek(6); - $this->assertEquals(6, $a->tell()); - $this->assertEquals('baz', $a->read(3)); - } - - public function testDetachesEachStream() - { - $s1 = Stream::factory('foo'); - $s2 = Stream::factory('foo'); - $a = new AppendStream([$s1, $s2]); - $this->assertSame('foofoo', (string) $a); - $a->detach(); - $this->assertSame('', (string) $a); - $this->assertSame(0, $a->getSize()); - } - - public function testClosesEachStream() - { - $s1 = Stream::factory('foo'); - $a = new AppendStream([$s1]); - $a->close(); - $this->assertSame('', (string) $a); - } - - public function testIsNotWritable() - { - $a = new AppendStream([Stream::factory('foo')]); - $this->assertFalse($a->isWritable()); - $this->assertTrue($a->isSeekable()); - $this->assertTrue($a->isReadable()); - $this->assertFalse($a->write('foo')); - } - - public function testDoesNotNeedStreams() - { - $a = new AppendStream(); - $this->assertEquals('', (string) $a); - } - - public function testCanReadFromMultipleStreams() - { - $a = new AppendStream([ - Stream::factory('foo'), - Stream::factory('bar'), - Stream::factory('baz'), - ]); - $this->assertFalse($a->eof()); - $this->assertSame(0, $a->tell()); - $this->assertEquals('foo', $a->read(3)); - $this->assertEquals('bar', $a->read(3)); - $this->assertEquals('baz', $a->read(3)); - $this->assertTrue($a->eof()); - $this->assertSame(9, $a->tell()); - $this->assertEquals('foobarbaz', (string) $a); - } - - public function testCanDetermineSizeFromMultipleStreams() - { - $a = new AppendStream([ - Stream::factory('foo'), - Stream::factory('bar') - ]); - $this->assertEquals(6, $a->getSize()); - - $s = $this->getMockBuilder('GuzzleHttp\Stream\StreamInterface') - ->setMethods(['isSeekable', 'isReadable']) - ->getMockForAbstractClass(); - $s->expects($this->once()) - ->method('isSeekable') - ->will($this->returnValue(null)); - $s->expects($this->once()) - ->method('isReadable') - ->will($this->returnValue(true)); - $a->addStream($s); - $this->assertNull($a->getSize()); - } - - public function testCatchesExceptionsWhenCastingToString() - { - $s = $this->getMockBuilder('GuzzleHttp\Stream\StreamInterface') - ->setMethods(['read', 'isReadable', 'eof']) - ->getMockForAbstractClass(); - $s->expects($this->once()) - ->method('read') - ->will($this->throwException(new \RuntimeException('foo'))); - $s->expects($this->once()) - ->method('isReadable') - ->will($this->returnValue(true)); - $s->expects($this->any()) - ->method('eof') - ->will($this->returnValue(false)); - $a = new AppendStream([$s]); - $this->assertFalse($a->eof()); - $this->assertSame('', (string) $a); - } - - public function testCanDetach() - { - $s = new AppendStream(); - $s->detach(); - } - - public function testReturnsEmptyMetadata() - { - $s = new AppendStream(); - $this->assertEquals([], $s->getMetadata()); - $this->assertNull($s->getMetadata('foo')); - } - - /** - * @expectedException \GuzzleHttp\Stream\Exception\CannotAttachException - */ - public function testCannotAttach() - { - $p = new AppendStream(); - $p->attach('a'); - } -} diff --git a/core/vendor/guzzlehttp/streams/tests/AsyncReadStreamTest.php b/core/vendor/guzzlehttp/streams/tests/AsyncReadStreamTest.php deleted file mode 100644 index 8c78995..0000000 --- a/core/vendor/guzzlehttp/streams/tests/AsyncReadStreamTest.php +++ /dev/null @@ -1,186 +0,0 @@ - function () { return false; }] - )); - } - - /** - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage Buffer must be readable and writable - */ - public function testValidatesWritableBuffer() - { - new AsyncReadStream(FnStream::decorate( - Stream::factory(), - ['isWritable' => function () { return false; }] - )); - } - - public function testValidatesHwmMetadata() - { - $a = new AsyncReadStream(Stream::factory(), [ - 'drain' => function() {} - ]); - $this->assertNull($this->readAttribute($a, 'drain')); - } - - /** - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage pump must be callable - */ - public function testValidatesPumpIsCallable() - { - new AsyncReadStream(new BufferStream(), ['pump' => true]); - } - - /** - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage drain must be callable - */ - public function testValidatesDrainIsCallable() - { - new AsyncReadStream(new BufferStream(), ['drain' => true]); - } - - public function testCanInitialize() - { - $buffer = new BufferStream(); - $a = new AsyncReadStream($buffer, [ - 'size' => 10, - 'drain' => function () {}, - 'pump' => function () {}, - ]); - $this->assertSame($buffer, $this->readAttribute($a, 'stream')); - $this->assertTrue(is_callable($this->readAttribute($a, 'drain'))); - $this->assertTrue(is_callable($this->readAttribute($a, 'pump'))); - $this->assertTrue($a->isReadable()); - $this->assertFalse($a->isSeekable()); - $this->assertFalse($a->isWritable()); - $this->assertFalse($a->write('foo')); - $this->assertEquals(10, $a->getSize()); - } - - public function testReadsFromBufferWithNoDrainOrPump() - { - $buffer = new BufferStream(); - $a = new AsyncReadStream($buffer); - $buffer->write('foo'); - $this->assertNull($a->getSize()); - $this->assertEquals('foo', $a->read(10)); - $this->assertEquals('', $a->read(10)); - } - - public function testCallsPumpForMoreDataWhenRequested() - { - $called = 0; - $buffer = new BufferStream(); - $a = new AsyncReadStream($buffer, [ - 'pump' => function ($size) use (&$called) { - $called++; - return str_repeat('.', $size); - } - ]); - $buffer->write('foobar'); - $this->assertEquals('foo', $a->read(3)); - $this->assertEquals(0, $called); - $this->assertEquals('bar.....', $a->read(8)); - $this->assertEquals(1, $called); - $this->assertEquals('..', $a->read(2)); - $this->assertEquals(2, $called); - } - - public function testCallsDrainWhenNeeded() - { - $called = 0; - $buffer = new BufferStream(5); - $a = new AsyncReadStream($buffer, [ - 'drain' => function (BufferStream $b) use (&$called, $buffer) { - $this->assertSame($b, $buffer); - $called++; - } - ]); - - $buffer->write('foobar'); - $this->assertEquals(6, $buffer->getSize()); - $this->assertEquals(0, $called); - - $a->read(3); - $this->assertTrue($this->readAttribute($a, 'needsDrain')); - $this->assertEquals(3, $buffer->getSize()); - $this->assertEquals(0, $called); - - $a->read(3); - $this->assertEquals(0, $buffer->getSize()); - $this->assertFalse($this->readAttribute($a, 'needsDrain')); - $this->assertEquals(1, $called); - } - - public function testCreatesBufferWithNoConfig() - { - list($buffer, $async) = AsyncReadStream::create(); - $this->assertInstanceOf('GuzzleHttp\Stream\BufferStream', $buffer); - $this->assertInstanceOf('GuzzleHttp\Stream\AsyncReadStream', $async); - } - - public function testCreatesBufferWithSpecifiedBuffer() - { - $buf = new BufferStream(); - list($buffer, $async) = AsyncReadStream::create(['buffer' => $buf]); - $this->assertSame($buf, $buffer); - $this->assertInstanceOf('GuzzleHttp\Stream\AsyncReadStream', $async); - } - - public function testCreatesNullStream() - { - list($buffer, $async) = AsyncReadStream::create(['max_buffer' => 0]); - $this->assertInstanceOf('GuzzleHttp\Stream\NullStream', $buffer); - $this->assertInstanceOf('GuzzleHttp\Stream\AsyncReadStream', $async); - } - - public function testCreatesDroppingStream() - { - list($buffer, $async) = AsyncReadStream::create(['max_buffer' => 5]); - $this->assertInstanceOf('GuzzleHttp\Stream\DroppingStream', $buffer); - $this->assertInstanceOf('GuzzleHttp\Stream\AsyncReadStream', $async); - $buffer->write('12345678910'); - $this->assertEquals(5, $buffer->getSize()); - } - - public function testCreatesOnWriteStream() - { - $c = 0; - $b = new BufferStream(); - list($buffer, $async) = AsyncReadStream::create([ - 'buffer' => $b, - 'write' => function (BufferStream $buf, $data) use (&$c, $b) { - $this->assertSame($buf, $b); - $this->assertEquals('foo', $data); - $c++; - } - ]); - $this->assertInstanceOf('GuzzleHttp\Stream\FnStream', $buffer); - $this->assertInstanceOf('GuzzleHttp\Stream\AsyncReadStream', $async); - $this->assertEquals(0, $c); - $this->assertEquals(3, $buffer->write('foo')); - $this->assertEquals(1, $c); - $this->assertEquals(3, $buffer->write('foo')); - $this->assertEquals(2, $c); - $this->assertEquals('foofoo', (string) $buffer); - } -} diff --git a/core/vendor/guzzlehttp/streams/tests/BufferStreamTest.php b/core/vendor/guzzlehttp/streams/tests/BufferStreamTest.php deleted file mode 100644 index f9bfea2..0000000 --- a/core/vendor/guzzlehttp/streams/tests/BufferStreamTest.php +++ /dev/null @@ -1,69 +0,0 @@ -assertTrue($b->isReadable()); - $this->assertTrue($b->isWritable()); - $this->assertFalse($b->isSeekable()); - $this->assertEquals(null, $b->getMetadata('foo')); - $this->assertEquals(10, $b->getMetadata('hwm')); - $this->assertEquals([], $b->getMetadata()); - } - - public function testRemovesReadDataFromBuffer() - { - $b = new BufferStream(); - $this->assertEquals(3, $b->write('foo')); - $this->assertEquals(3, $b->getSize()); - $this->assertFalse($b->eof()); - $this->assertEquals('foo', $b->read(10)); - $this->assertTrue($b->eof()); - $this->assertEquals('', $b->read(10)); - } - - public function testCanCastToStringOrGetContents() - { - $b = new BufferStream(); - $b->write('foo'); - $b->write('baz'); - $this->assertEquals('foo', $b->read(3)); - $b->write('bar'); - $this->assertEquals('bazbar', (string) $b); - $this->assertFalse($b->tell()); - } - - public function testDetachClearsBuffer() - { - $b = new BufferStream(); - $b->write('foo'); - $b->detach(); - $this->assertEquals(0, $b->tell()); - $this->assertTrue($b->eof()); - $this->assertEquals(3, $b->write('abc')); - $this->assertEquals('abc', $b->read(10)); - } - - public function testExceedingHighwaterMarkReturnsFalseButStillBuffers() - { - $b = new BufferStream(5); - $this->assertEquals(3, $b->write('hi ')); - $this->assertFalse($b->write('hello')); - $this->assertEquals('hi hello', (string) $b); - $this->assertEquals(4, $b->write('test')); - } - - /** - * @expectedException \GuzzleHttp\Stream\Exception\CannotAttachException - */ - public function testCannotAttach() - { - $p = new BufferStream(); - $p->attach('a'); - } -} diff --git a/core/vendor/guzzlehttp/streams/tests/CachingStreamTest.php b/core/vendor/guzzlehttp/streams/tests/CachingStreamTest.php deleted file mode 100644 index ea969b3..0000000 --- a/core/vendor/guzzlehttp/streams/tests/CachingStreamTest.php +++ /dev/null @@ -1,136 +0,0 @@ -decorated = Stream::factory('testing'); - $this->body = new CachingStream($this->decorated); - } - - public function tearDown() - { - $this->decorated->close(); - $this->body->close(); - } - - public function testUsesRemoteSizeIfPossible() - { - $body = Stream::factory('test'); - $caching = new CachingStream($body); - $this->assertEquals(4, $caching->getSize()); - } - - /** - * @expectedException \RuntimeException - * @expectedExceptionMessage Cannot seek to byte 10 - */ - public function testCannotSeekPastWhatHasBeenRead() - { - $this->body->seek(10); - } - - public function testCannotUseSeekEnd() - { - $this->assertFalse($this->body->seek(2, SEEK_END)); - } - - public function testRewindUsesSeek() - { - $a = Stream::factory('foo'); - $d = $this->getMockBuilder('GuzzleHttp\Stream\CachingStream') - ->setMethods(array('seek')) - ->setConstructorArgs(array($a)) - ->getMock(); - $d->expects($this->once()) - ->method('seek') - ->with(0) - ->will($this->returnValue(true)); - $d->seek(0); - } - - public function testCanSeekToReadBytes() - { - $this->assertEquals('te', $this->body->read(2)); - $this->body->seek(0); - $this->assertEquals('test', $this->body->read(4)); - $this->assertEquals(4, $this->body->tell()); - $this->body->seek(2); - $this->assertEquals(2, $this->body->tell()); - $this->body->seek(2, SEEK_CUR); - $this->assertEquals(4, $this->body->tell()); - $this->assertEquals('ing', $this->body->read(3)); - } - - public function testWritesToBufferStream() - { - $this->body->read(2); - $this->body->write('hi'); - $this->body->seek(0); - $this->assertEquals('tehiing', (string) $this->body); - } - - public function testSkipsOverwrittenBytes() - { - $decorated = Stream::factory( - implode("\n", array_map(function ($n) { - return str_pad($n, 4, '0', STR_PAD_LEFT); - }, range(0, 25))) - ); - - $body = new CachingStream($decorated); - - $this->assertEquals("0000\n", Utils::readline($body)); - $this->assertEquals("0001\n", Utils::readline($body)); - // Write over part of the body yet to be read, so skip some bytes - $this->assertEquals(5, $body->write("TEST\n")); - $this->assertEquals(5, $this->readAttribute($body, 'skipReadBytes')); - // Read, which skips bytes, then reads - $this->assertEquals("0003\n", Utils::readline($body)); - $this->assertEquals(0, $this->readAttribute($body, 'skipReadBytes')); - $this->assertEquals("0004\n", Utils::readline($body)); - $this->assertEquals("0005\n", Utils::readline($body)); - - // Overwrite part of the cached body (so don't skip any bytes) - $body->seek(5); - $this->assertEquals(5, $body->write("ABCD\n")); - $this->assertEquals(0, $this->readAttribute($body, 'skipReadBytes')); - $this->assertEquals("TEST\n", Utils::readline($body)); - $this->assertEquals("0003\n", Utils::readline($body)); - $this->assertEquals("0004\n", Utils::readline($body)); - $this->assertEquals("0005\n", Utils::readline($body)); - $this->assertEquals("0006\n", Utils::readline($body)); - $this->assertEquals(5, $body->write("1234\n")); - $this->assertEquals(5, $this->readAttribute($body, 'skipReadBytes')); - - // Seek to 0 and ensure the overwritten bit is replaced - $body->seek(0); - $this->assertEquals("0000\nABCD\nTEST\n0003\n0004\n0005\n0006\n1234\n0008\n0009\n", $body->read(50)); - - // Ensure that casting it to a string does not include the bit that was overwritten - $this->assertContains("0000\nABCD\nTEST\n0003\n0004\n0005\n0006\n1234\n0008\n0009\n", (string) $body); - } - - public function testClosesBothStreams() - { - $s = fopen('php://temp', 'r'); - $a = Stream::factory($s); - $d = new CachingStream($a); - $d->close(); - $this->assertFalse(is_resource($s)); - } -} diff --git a/core/vendor/guzzlehttp/streams/tests/DroppingStreamTest.php b/core/vendor/guzzlehttp/streams/tests/DroppingStreamTest.php deleted file mode 100644 index bb2cb22..0000000 --- a/core/vendor/guzzlehttp/streams/tests/DroppingStreamTest.php +++ /dev/null @@ -1,26 +0,0 @@ -assertEquals(3, $drop->write('hel')); - $this->assertFalse($drop->write('lo')); - $this->assertEquals(5, $drop->getSize()); - $this->assertEquals('hello', $drop->read(5)); - $this->assertEquals(0, $drop->getSize()); - $drop->write('12345678910'); - $this->assertEquals(5, $stream->getSize()); - $this->assertEquals(5, $drop->getSize()); - $this->assertEquals('12345', (string) $drop); - $this->assertEquals(0, $drop->getSize()); - $drop->write('hello'); - $this->assertFalse($drop->write('test')); - } -} diff --git a/core/vendor/guzzlehttp/streams/tests/Exception/SeekExceptionTest.php b/core/vendor/guzzlehttp/streams/tests/Exception/SeekExceptionTest.php deleted file mode 100644 index fd8cd1a..0000000 --- a/core/vendor/guzzlehttp/streams/tests/Exception/SeekExceptionTest.php +++ /dev/null @@ -1,16 +0,0 @@ -assertSame($s, $e->getStream()); - $this->assertContains('10', $e->getMessage()); - } -} diff --git a/core/vendor/guzzlehttp/streams/tests/FnStreamTest.php b/core/vendor/guzzlehttp/streams/tests/FnStreamTest.php deleted file mode 100644 index 6cc336b..0000000 --- a/core/vendor/guzzlehttp/streams/tests/FnStreamTest.php +++ /dev/null @@ -1,89 +0,0 @@ -seek(1); - } - - public function testProxiesToFunction() - { - $s = new FnStream([ - 'read' => function ($len) { - $this->assertEquals(3, $len); - return 'foo'; - } - ]); - - $this->assertEquals('foo', $s->read(3)); - } - - public function testCanCloseOnDestruct() - { - $called = false; - $s = new FnStream([ - 'close' => function () use (&$called) { - $called = true; - } - ]); - unset($s); - $this->assertTrue($called); - } - - public function testDoesNotRequireClose() - { - $s = new FnStream([]); - unset($s); - } - - public function testDecoratesStream() - { - $a = Stream::factory('foo'); - $b = FnStream::decorate($a, []); - $this->assertEquals(3, $b->getSize()); - $this->assertEquals($b->isWritable(), true); - $this->assertEquals($b->isReadable(), true); - $this->assertEquals($b->isSeekable(), true); - $this->assertEquals($b->read(3), 'foo'); - $this->assertEquals($b->tell(), 3); - $this->assertEquals($a->tell(), 3); - $this->assertEquals($b->eof(), true); - $this->assertEquals($a->eof(), true); - $b->seek(0); - $this->assertEquals('foo', (string) $b); - $b->seek(0); - $this->assertEquals('foo', $b->getContents()); - $this->assertEquals($a->getMetadata(), $b->getMetadata()); - $b->seek(0, SEEK_END); - $b->write('bar'); - $this->assertEquals('foobar', (string) $b); - $this->assertInternalType('resource', $b->detach()); - $b->close(); - } - - public function testDecoratesWithCustomizations() - { - $called = false; - $a = Stream::factory('foo'); - $b = FnStream::decorate($a, [ - 'read' => function ($len) use (&$called, $a) { - $called = true; - return $a->read($len); - } - ]); - $this->assertEquals('foo', $b->read(3)); - $this->assertTrue($called); - } -} diff --git a/core/vendor/guzzlehttp/streams/tests/GuzzleStreamWrapperTest.php b/core/vendor/guzzlehttp/streams/tests/GuzzleStreamWrapperTest.php deleted file mode 100644 index 33c3ecc..0000000 --- a/core/vendor/guzzlehttp/streams/tests/GuzzleStreamWrapperTest.php +++ /dev/null @@ -1,99 +0,0 @@ -assertSame('foo', fread($handle, 3)); - $this->assertSame(3, ftell($handle)); - $this->assertSame(3, fwrite($handle, 'bar')); - $this->assertSame(0, fseek($handle, 0)); - $this->assertSame('foobar', fread($handle, 6)); - $this->assertTrue(feof($handle)); - - // This fails on HHVM for some reason - if (!defined('HHVM_VERSION')) { - $this->assertEquals([ - 'dev' => 0, - 'ino' => 0, - 'mode' => 33206, - 'nlink' => 0, - 'uid' => 0, - 'gid' => 0, - 'rdev' => 0, - 'size' => 6, - 'atime' => 0, - 'mtime' => 0, - 'ctime' => 0, - 'blksize' => 0, - 'blocks' => 0, - 0 => 0, - 1 => 0, - 2 => 33206, - 3 => 0, - 4 => 0, - 5 => 0, - 6 => 0, - 7 => 6, - 8 => 0, - 9 => 0, - 10 => 0, - 11 => 0, - 12 => 0, - ], fstat($handle)); - } - - $this->assertTrue(fclose($handle)); - $this->assertSame('foobar', (string) $stream); - } - - /** - * @expectedException \InvalidArgumentException - */ - public function testValidatesStream() - { - $stream = $this->getMockBuilder('GuzzleHttp\Stream\StreamInterface') - ->setMethods(['isReadable', 'isWritable']) - ->getMockForAbstractClass(); - $stream->expects($this->once()) - ->method('isReadable') - ->will($this->returnValue(false)); - $stream->expects($this->once()) - ->method('isWritable') - ->will($this->returnValue(false)); - GuzzleStreamWrapper::getResource($stream); - } - - /** - * @expectedException \PHPUnit_Framework_Error_Warning - */ - public function testReturnsFalseWhenStreamDoesNotExist() - { - fopen('guzzle://foo', 'r'); - } - - public function testCanOpenReadonlyStream() - { - $stream = $this->getMockBuilder('GuzzleHttp\Stream\StreamInterface') - ->setMethods(['isReadable', 'isWritable']) - ->getMockForAbstractClass(); - $stream->expects($this->once()) - ->method('isReadable') - ->will($this->returnValue(false)); - $stream->expects($this->once()) - ->method('isWritable') - ->will($this->returnValue(true)); - $r = GuzzleStreamWrapper::getResource($stream); - $this->assertInternalType('resource', $r); - fclose($r); - } -} diff --git a/core/vendor/guzzlehttp/streams/tests/InflateStreamTest.php b/core/vendor/guzzlehttp/streams/tests/InflateStreamTest.php deleted file mode 100644 index ead9356..0000000 --- a/core/vendor/guzzlehttp/streams/tests/InflateStreamTest.php +++ /dev/null @@ -1,16 +0,0 @@ -assertEquals('test', (string) $b); - } -} diff --git a/core/vendor/guzzlehttp/streams/tests/LazyOpenStreamTest.php b/core/vendor/guzzlehttp/streams/tests/LazyOpenStreamTest.php deleted file mode 100644 index 79e0078..0000000 --- a/core/vendor/guzzlehttp/streams/tests/LazyOpenStreamTest.php +++ /dev/null @@ -1,64 +0,0 @@ -fname = tempnam('/tmp', 'tfile'); - - if (file_exists($this->fname)) { - unlink($this->fname); - } - } - - public function tearDown() - { - if (file_exists($this->fname)) { - unlink($this->fname); - } - } - - public function testOpensLazily() - { - $l = new LazyOpenStream($this->fname, 'w+'); - $l->write('foo'); - $this->assertInternalType('array', $l->getMetadata()); - $this->assertFileExists($this->fname); - $this->assertEquals('foo', file_get_contents($this->fname)); - $this->assertEquals('foo', (string) $l); - } - - public function testProxiesToFile() - { - file_put_contents($this->fname, 'foo'); - $l = new LazyOpenStream($this->fname, 'r'); - $this->assertEquals('foo', $l->read(4)); - $this->assertTrue($l->eof()); - $this->assertEquals(3, $l->tell()); - $this->assertTrue($l->isReadable()); - $this->assertTrue($l->isSeekable()); - $this->assertFalse($l->isWritable()); - $l->seek(1); - $this->assertEquals('oo', $l->getContents()); - $this->assertEquals('foo', (string) $l); - $this->assertEquals(3, $l->getSize()); - $this->assertInternalType('array', $l->getMetadata()); - $l->close(); - } - - public function testDetachesUnderlyingStream() - { - file_put_contents($this->fname, 'foo'); - $l = new LazyOpenStream($this->fname, 'r'); - $r = $l->detach(); - $this->assertInternalType('resource', $r); - fseek($r, 0); - $this->assertEquals('foo', stream_get_contents($r)); - fclose($r); - } -} diff --git a/core/vendor/guzzlehttp/streams/tests/LimitStreamTest.php b/core/vendor/guzzlehttp/streams/tests/LimitStreamTest.php deleted file mode 100644 index efb1dc5..0000000 --- a/core/vendor/guzzlehttp/streams/tests/LimitStreamTest.php +++ /dev/null @@ -1,133 +0,0 @@ -decorated = Stream::factory(fopen(__FILE__, 'r')); - $this->body = new LimitStream($this->decorated, 10, 3); - } - - public function testReturnsSubset() - { - $body = new LimitStream(Stream::factory('foo'), -1, 1); - $this->assertEquals('oo', (string) $body); - $this->assertTrue($body->eof()); - $body->seek(0); - $this->assertFalse($body->eof()); - $this->assertEquals('oo', $body->read(100)); - $this->assertTrue($body->eof()); - } - - public function testReturnsSubsetWhenCastToString() - { - $body = Stream::factory('foo_baz_bar'); - $limited = new LimitStream($body, 3, 4); - $this->assertEquals('baz', (string) $limited); - } - - public function testReturnsSubsetOfEmptyBodyWhenCastToString() - { - $body = Stream::factory(''); - $limited = new LimitStream($body, 0, 10); - $this->assertEquals('', (string) $limited); - } - - public function testSeeksWhenConstructed() - { - $this->assertEquals(0, $this->body->tell()); - $this->assertEquals(3, $this->decorated->tell()); - } - - public function testAllowsBoundedSeek() - { - $this->assertEquals(true, $this->body->seek(100)); - $this->assertEquals(10, $this->body->tell()); - $this->assertEquals(13, $this->decorated->tell()); - $this->assertEquals(true, $this->body->seek(0)); - $this->assertEquals(0, $this->body->tell()); - $this->assertEquals(3, $this->decorated->tell()); - $this->assertEquals(false, $this->body->seek(-10)); - $this->assertEquals(0, $this->body->tell()); - $this->assertEquals(3, $this->decorated->tell()); - $this->assertEquals(true, $this->body->seek(5)); - $this->assertEquals(5, $this->body->tell()); - $this->assertEquals(8, $this->decorated->tell()); - $this->assertEquals(false, $this->body->seek(1000, SEEK_END)); - } - - public function testReadsOnlySubsetOfData() - { - $data = $this->body->read(100); - $this->assertEquals(10, strlen($data)); - $this->assertFalse($this->body->read(1000)); - - $this->body->setOffset(10); - $newData = $this->body->read(100); - $this->assertEquals(10, strlen($newData)); - $this->assertNotSame($data, $newData); - } - - /** - * @expectedException \GuzzleHttp\Stream\Exception\SeekException - * @expectedExceptionMessage Could not seek the stream to position 2 - */ - public function testThrowsWhenCurrentGreaterThanOffsetSeek() - { - $a = Stream::factory('foo_bar'); - $b = new NoSeekStream($a); - $c = new LimitStream($b); - $a->getContents(); - $c->setOffset(2); - } - - public function testClaimsConsumedWhenReadLimitIsReached() - { - $this->assertFalse($this->body->eof()); - $this->body->read(1000); - $this->assertTrue($this->body->eof()); - } - - public function testContentLengthIsBounded() - { - $this->assertEquals(10, $this->body->getSize()); - } - - public function testGetContentsIsBasedOnSubset() - { - $body = new LimitStream(Stream::factory('foobazbar'), 3, 3); - $this->assertEquals('baz', $body->getContents()); - } - - public function testReturnsNullIfSizeCannotBeDetermined() - { - $a = new FnStream([ - 'getSize' => function () { return null; }, - 'tell' => function () { return 0; }, - ]); - $b = new LimitStream($a); - $this->assertNull($b->getSize()); - } - - public function testLengthLessOffsetWhenNoLimitSize() - { - $a = Stream::factory('foo_bar'); - $b = new LimitStream($a, -1, 4); - $this->assertEquals(3, $b->getSize()); - } -} diff --git a/core/vendor/guzzlehttp/streams/tests/NoSeekStreamTest.php b/core/vendor/guzzlehttp/streams/tests/NoSeekStreamTest.php deleted file mode 100644 index 21b7c6d..0000000 --- a/core/vendor/guzzlehttp/streams/tests/NoSeekStreamTest.php +++ /dev/null @@ -1,41 +0,0 @@ -getMockBuilder('GuzzleHttp\Stream\StreamInterface') - ->setMethods(['isSeekable', 'seek']) - ->getMockForAbstractClass(); - $s->expects($this->never())->method('seek'); - $s->expects($this->never())->method('isSeekable'); - $wrapped = new NoSeekStream($s); - $this->assertFalse($wrapped->isSeekable()); - $this->assertFalse($wrapped->seek(2)); - } - - public function testHandlesClose() - { - $s = Stream::factory('foo'); - $wrapped = new NoSeekStream($s); - $wrapped->close(); - $this->assertFalse($wrapped->write('foo')); - } - - public function testCanAttach() - { - $s1 = Stream::factory('foo'); - $s2 = Stream::factory('bar'); - $wrapped = new NoSeekStream($s1); - $wrapped->attach($s2->detach()); - $this->assertEquals('bar', (string) $wrapped); - } -} diff --git a/core/vendor/guzzlehttp/streams/tests/NullStreamTest.php b/core/vendor/guzzlehttp/streams/tests/NullStreamTest.php deleted file mode 100644 index 8e41431..0000000 --- a/core/vendor/guzzlehttp/streams/tests/NullStreamTest.php +++ /dev/null @@ -1,39 +0,0 @@ -assertEquals('', $b->read(10)); - $this->assertEquals(4, $b->write('test')); - $this->assertEquals('', (string) $b); - $this->assertNull($b->getMetadata('a')); - $this->assertEquals([], $b->getMetadata()); - $this->assertEquals(0, $b->getSize()); - $this->assertEquals('', $b->getContents()); - $this->assertEquals(0, $b->tell()); - - $this->assertTrue($b->isReadable()); - $this->assertTrue($b->isWritable()); - $this->assertTrue($b->isSeekable()); - $this->assertFalse($b->seek(10)); - - $this->assertTrue($b->eof()); - $b->detach(); - $this->assertTrue($b->eof()); - $b->close(); - } - - /** - * @expectedException \GuzzleHttp\Stream\Exception\CannotAttachException - */ - public function testCannotAttach() - { - $p = new NullStream(); - $p->attach('a'); - } -} diff --git a/core/vendor/guzzlehttp/streams/tests/PumpStreamTest.php b/core/vendor/guzzlehttp/streams/tests/PumpStreamTest.php deleted file mode 100644 index 2d20ce9..0000000 --- a/core/vendor/guzzlehttp/streams/tests/PumpStreamTest.php +++ /dev/null @@ -1,77 +0,0 @@ - ['foo' => 'bar'], - 'size' => 100 - ]); - - $this->assertEquals('bar', $p->getMetadata('foo')); - $this->assertEquals(['foo' => 'bar'], $p->getMetadata()); - $this->assertEquals(100, $p->getSize()); - } - - public function testCanReadFromCallable() - { - $p = Stream::factory(function ($size) { - return 'a'; - }); - $this->assertEquals('a', $p->read(1)); - $this->assertEquals(1, $p->tell()); - $this->assertEquals('aaaaa', $p->read(5)); - $this->assertEquals(6, $p->tell()); - } - - public function testStoresExcessDataInBuffer() - { - $called = []; - $p = Stream::factory(function ($size) use (&$called) { - $called[] = $size; - return 'abcdef'; - }); - $this->assertEquals('a', $p->read(1)); - $this->assertEquals('b', $p->read(1)); - $this->assertEquals('cdef', $p->read(4)); - $this->assertEquals('abcdefabc', $p->read(9)); - $this->assertEquals([1, 9, 3], $called); - } - - public function testInifiniteStreamWrappedInLimitStream() - { - $p = Stream::factory(function () { return 'a'; }); - $s = new LimitStream($p, 5); - $this->assertEquals('aaaaa', (string) $s); - } - - public function testDescribesCapabilities() - { - $p = Stream::factory(function () {}); - $this->assertTrue($p->isReadable()); - $this->assertFalse($p->isSeekable()); - $this->assertFalse($p->isWritable()); - $this->assertNull($p->getSize()); - $this->assertFalse($p->write('aa')); - $this->assertEquals('', $p->getContents()); - $this->assertEquals('', (string) $p); - $p->close(); - $this->assertEquals('', $p->read(10)); - $this->assertTrue($p->eof()); - } - - /** - * @expectedException \GuzzleHttp\Stream\Exception\CannotAttachException - */ - public function testCannotAttach() - { - $p = Stream::factory(function () {}); - $p->attach('a'); - } -} diff --git a/core/vendor/guzzlehttp/streams/tests/StreamDecoratorTraitTest.php b/core/vendor/guzzlehttp/streams/tests/StreamDecoratorTraitTest.php deleted file mode 100644 index 2ba79ad..0000000 --- a/core/vendor/guzzlehttp/streams/tests/StreamDecoratorTraitTest.php +++ /dev/null @@ -1,147 +0,0 @@ -c = fopen('php://temp', 'r+'); - fwrite($this->c, 'foo'); - fseek($this->c, 0); - $this->a = Stream::factory($this->c); - $this->b = new Str($this->a); - } - - public function testCatchesExceptionsWhenCastingToString() - { - $s = $this->getMockBuilder('GuzzleHttp\Stream\StreamInterface') - ->setMethods(['read']) - ->getMockForAbstractClass(); - $s->expects($this->once()) - ->method('read') - ->will($this->throwException(new \Exception('foo'))); - $msg = ''; - set_error_handler(function ($errNo, $str) use (&$msg) { $msg = $str; }); - echo new Str($s); - restore_error_handler(); - $this->assertContains('foo', $msg); - } - - public function testToString() - { - $this->assertEquals('foo', (string) $this->b); - } - - public function testHasSize() - { - $this->assertEquals(3, $this->b->getSize()); - $this->assertSame($this->b, $this->b->setSize(2)); - $this->assertEquals(2, $this->b->getSize()); - } - - public function testReads() - { - $this->assertEquals('foo', $this->b->read(10)); - } - - public function testCheckMethods() - { - $this->assertEquals($this->a->isReadable(), $this->b->isReadable()); - $this->assertEquals($this->a->isWritable(), $this->b->isWritable()); - $this->assertEquals($this->a->isSeekable(), $this->b->isSeekable()); - } - - public function testSeeksAndTells() - { - $this->assertTrue($this->b->seek(1)); - $this->assertEquals(1, $this->a->tell()); - $this->assertEquals(1, $this->b->tell()); - $this->assertTrue($this->b->seek(0)); - $this->assertEquals(0, $this->a->tell()); - $this->assertEquals(0, $this->b->tell()); - $this->assertTrue($this->b->seek(0, SEEK_END)); - $this->assertEquals(3, $this->a->tell()); - $this->assertEquals(3, $this->b->tell()); - } - - public function testGetsContents() - { - $this->assertEquals('foo', $this->b->getContents()); - $this->assertEquals('', $this->b->getContents()); - $this->b->seek(1); - $this->assertEquals('oo', $this->b->getContents(1)); - } - - public function testCloses() - { - $this->b->close(); - $this->assertFalse(is_resource($this->c)); - } - - public function testDetaches() - { - $this->b->detach(); - $this->assertFalse($this->b->isReadable()); - } - - /** - * @expectedException \GuzzleHttp\Stream\Exception\CannotAttachException - */ - public function testCannotAttachByDefault() - { - $this->b->attach('a'); - } - - public function testWrapsMetadata() - { - $this->assertSame($this->b->getMetadata(), $this->a->getMetadata()); - $this->assertSame($this->b->getMetadata('uri'), $this->a->getMetadata('uri')); - } - - public function testWrapsWrites() - { - $this->b->seek(0, SEEK_END); - $this->b->write('foo'); - $this->assertEquals('foofoo', (string) $this->a); - } - - /** - * @expectedException \UnexpectedValueException - */ - public function testThrowsWithInvalidGetter() - { - $this->b->foo; - } - - /** - * @expectedException \BadMethodCallException - */ - public function testThrowsWhenGetterNotImplemented() - { - $s = new BadStream(); - $s->stream; - } -} - -class BadStream -{ - use StreamDecoratorTrait; - - public function __construct() {} -} diff --git a/core/vendor/guzzlehttp/streams/tests/StreamTest.php b/core/vendor/guzzlehttp/streams/tests/StreamTest.php deleted file mode 100644 index 2985bfb..0000000 --- a/core/vendor/guzzlehttp/streams/tests/StreamTest.php +++ /dev/null @@ -1,252 +0,0 @@ -assertTrue($stream->isReadable()); - $this->assertTrue($stream->isWritable()); - $this->assertTrue($stream->isSeekable()); - $this->assertEquals('php://temp', $stream->getMetadata('uri')); - $this->assertInternalType('array', $stream->getMetadata()); - $this->assertEquals(4, $stream->getSize()); - $this->assertFalse($stream->eof()); - $stream->close(); - } - - public function testStreamClosesHandleOnDestruct() - { - $handle = fopen('php://temp', 'r'); - $stream = new Stream($handle); - unset($stream); - $this->assertFalse(is_resource($handle)); - } - - public function testConvertsToString() - { - $handle = fopen('php://temp', 'w+'); - fwrite($handle, 'data'); - $stream = new Stream($handle); - $this->assertEquals('data', (string) $stream); - $this->assertEquals('data', (string) $stream); - $stream->close(); - } - - public function testGetsContents() - { - $handle = fopen('php://temp', 'w+'); - fwrite($handle, 'data'); - $stream = new Stream($handle); - $this->assertEquals('', $stream->getContents()); - $stream->seek(0); - $this->assertEquals('data', $stream->getContents()); - $this->assertEquals('', $stream->getContents()); - } - - public function testChecksEof() - { - $handle = fopen('php://temp', 'w+'); - fwrite($handle, 'data'); - $stream = new Stream($handle); - $this->assertFalse($stream->eof()); - $stream->read(4); - $this->assertTrue($stream->eof()); - $stream->close(); - } - - public function testAllowsSettingManualSize() - { - $handle = fopen('php://temp', 'w+'); - fwrite($handle, 'data'); - $stream = new Stream($handle); - $stream->setSize(10); - $this->assertEquals(10, $stream->getSize()); - $stream->close(); - } - - public function testGetSize() - { - $size = filesize(__FILE__); - $handle = fopen(__FILE__, 'r'); - $stream = new Stream($handle); - $this->assertEquals($size, $stream->getSize()); - // Load from cache - $this->assertEquals($size, $stream->getSize()); - $stream->close(); - } - - public function testEnsuresSizeIsConsistent() - { - $h = fopen('php://temp', 'w+'); - $this->assertEquals(3, fwrite($h, 'foo')); - $stream = new Stream($h); - $this->assertEquals(3, $stream->getSize()); - $this->assertEquals(4, $stream->write('test')); - $this->assertEquals(7, $stream->getSize()); - $this->assertEquals(7, $stream->getSize()); - $stream->close(); - } - - public function testProvidesStreamPosition() - { - $handle = fopen('php://temp', 'w+'); - $stream = new Stream($handle); - $this->assertEquals(0, $stream->tell()); - $stream->write('foo'); - $this->assertEquals(3, $stream->tell()); - $stream->seek(1); - $this->assertEquals(1, $stream->tell()); - $this->assertSame(ftell($handle), $stream->tell()); - $stream->close(); - } - - public function testKeepsPositionOfResource() - { - $h = fopen(__FILE__, 'r'); - fseek($h, 10); - $stream = Stream::factory($h); - $this->assertEquals(10, $stream->tell()); - $stream->close(); - } - - public function testCanDetachAndAttachStream() - { - $r = fopen('php://temp', 'w+'); - $stream = new Stream($r); - $stream->write('foo'); - $this->assertTrue($stream->isReadable()); - $this->assertSame($r, $stream->detach()); - $this->assertNull($stream->detach()); - - $this->assertFalse($stream->isReadable()); - $this->assertFalse($stream->read(10)); - $this->assertFalse($stream->isWritable()); - $this->assertFalse($stream->write('bar')); - $this->assertFalse($stream->isSeekable()); - $this->assertFalse($stream->seek(10)); - $this->assertFalse($stream->tell()); - $this->assertTrue($stream->eof()); - $this->assertNull($stream->getSize()); - $this->assertSame('', (string) $stream); - $this->assertSame('', $stream->getContents()); - - $stream->attach($r); - $stream->seek(0); - $this->assertEquals('foo', $stream->getContents()); - $this->assertTrue($stream->isReadable()); - $this->assertTrue($stream->isWritable()); - $this->assertTrue($stream->isSeekable()); - - $stream->close(); - } - - public function testCloseClearProperties() - { - $handle = fopen('php://temp', 'r+'); - $stream = new Stream($handle); - $stream->close(); - - $this->assertEmpty($stream->getMetadata()); - $this->assertFalse($stream->isSeekable()); - $this->assertFalse($stream->isReadable()); - $this->assertFalse($stream->isWritable()); - $this->assertNull($stream->getSize()); - } - - public function testCreatesWithFactory() - { - $stream = Stream::factory('foo'); - $this->assertInstanceOf('GuzzleHttp\Stream\Stream', $stream); - $this->assertEquals('foo', $stream->getContents()); - $stream->close(); - } - - public function testFactoryCreatesFromEmptyString() - { - $s = Stream::factory(); - $this->assertInstanceOf('GuzzleHttp\Stream\Stream', $s); - } - - public function testFactoryCreatesFromResource() - { - $r = fopen(__FILE__, 'r'); - $s = Stream::factory($r); - $this->assertInstanceOf('GuzzleHttp\Stream\Stream', $s); - $this->assertSame(file_get_contents(__FILE__), (string) $s); - } - - public function testFactoryCreatesFromObjectWithToString() - { - $r = new HasToString(); - $s = Stream::factory($r); - $this->assertInstanceOf('GuzzleHttp\Stream\Stream', $s); - $this->assertEquals('foo', (string) $s); - } - - public function testCreatePassesThrough() - { - $s = Stream::factory('foo'); - $this->assertSame($s, Stream::factory($s)); - } - - /** - * @expectedException \InvalidArgumentException - */ - public function testThrowsExceptionForUnknown() - { - Stream::factory(new \stdClass()); - } - - public function testReturnsCustomMetadata() - { - $s = Stream::factory('foo', ['metadata' => ['hwm' => 3]]); - $this->assertEquals(3, $s->getMetadata('hwm')); - $this->assertArrayHasKey('hwm', $s->getMetadata()); - } - - public function testCanSetSize() - { - $s = Stream::factory('', ['size' => 10]); - $this->assertEquals(10, $s->getSize()); - } - - public function testCanCreateIteratorBasedStream() - { - $a = new \ArrayIterator(['foo', 'bar', '123']); - $p = Stream::factory($a); - $this->assertInstanceOf('GuzzleHttp\Stream\PumpStream', $p); - $this->assertEquals('foo', $p->read(3)); - $this->assertFalse($p->eof()); - $this->assertEquals('b', $p->read(1)); - $this->assertEquals('a', $p->read(1)); - $this->assertEquals('r12', $p->read(3)); - $this->assertFalse($p->eof()); - $this->assertEquals('3', $p->getContents()); - $this->assertTrue($p->eof()); - $this->assertEquals(9, $p->tell()); - } -} - -class HasToString -{ - public function __toString() { - return 'foo'; - } -} diff --git a/core/vendor/guzzlehttp/streams/tests/UtilsTest.php b/core/vendor/guzzlehttp/streams/tests/UtilsTest.php deleted file mode 100644 index 6e3e3b2..0000000 --- a/core/vendor/guzzlehttp/streams/tests/UtilsTest.php +++ /dev/null @@ -1,155 +0,0 @@ -assertEquals('foobaz', Utils::copyToString($s)); - $s->seek(0); - $this->assertEquals('foo', Utils::copyToString($s, 3)); - $this->assertEquals('baz', Utils::copyToString($s, 3)); - $this->assertEquals('', Utils::copyToString($s)); - } - - public function testCopiesToStringStopsWhenReadFails() - { - $s1 = Stream::factory('foobaz'); - $s1 = FnStream::decorate($s1, [ - 'read' => function () { - return false; - } - ]); - $result = Utils::copyToString($s1); - $this->assertEquals('', $result); - } - - public function testCopiesToStream() - { - $s1 = Stream::factory('foobaz'); - $s2 = Stream::factory(''); - Utils::copyToStream($s1, $s2); - $this->assertEquals('foobaz', (string) $s2); - $s2 = Stream::factory(''); - $s1->seek(0); - Utils::copyToStream($s1, $s2, 3); - $this->assertEquals('foo', (string) $s2); - Utils::copyToStream($s1, $s2, 3); - $this->assertEquals('foobaz', (string) $s2); - } - - public function testStopsCopyToStreamWhenWriteFails() - { - $s1 = Stream::factory('foobaz'); - $s2 = Stream::factory(''); - $s2 = FnStream::decorate($s2, ['write' => function () { return 0; }]); - Utils::copyToStream($s1, $s2); - $this->assertEquals('', (string) $s2); - } - - public function testStopsCopyToSteamWhenWriteFailsWithMaxLen() - { - $s1 = Stream::factory('foobaz'); - $s2 = Stream::factory(''); - $s2 = FnStream::decorate($s2, ['write' => function () { return 0; }]); - Utils::copyToStream($s1, $s2, 10); - $this->assertEquals('', (string) $s2); - } - - public function testStopsCopyToSteamWhenReadFailsWithMaxLen() - { - $s1 = Stream::factory('foobaz'); - $s1 = FnStream::decorate($s1, ['read' => function () { return ''; }]); - $s2 = Stream::factory(''); - Utils::copyToStream($s1, $s2, 10); - $this->assertEquals('', (string) $s2); - } - - public function testReadsLines() - { - $s = Stream::factory("foo\nbaz\nbar"); - $this->assertEquals("foo\n", Utils::readline($s)); - $this->assertEquals("baz\n", Utils::readline($s)); - $this->assertEquals("bar", Utils::readline($s)); - } - - public function testReadsLinesUpToMaxLength() - { - $s = Stream::factory("12345\n"); - $this->assertEquals("123", Utils::readline($s, 4)); - $this->assertEquals("45\n", Utils::readline($s)); - } - - public function testReadsLineUntilFalseReturnedFromRead() - { - $s = $this->getMockBuilder('GuzzleHttp\Stream\Stream') - ->setMethods(['read', 'eof']) - ->disableOriginalConstructor() - ->getMock(); - $s->expects($this->exactly(2)) - ->method('read') - ->will($this->returnCallback(function () { - static $c = false; - if ($c) { - return false; - } - $c = true; - return 'h'; - })); - $s->expects($this->exactly(2)) - ->method('eof') - ->will($this->returnValue(false)); - $this->assertEquals("h", Utils::readline($s)); - } - - public function testCalculatesHash() - { - $s = Stream::factory('foobazbar'); - $this->assertEquals(md5('foobazbar'), Utils::hash($s, 'md5')); - } - - /** - * @expectedException \GuzzleHttp\Stream\Exception\SeekException - */ - public function testCalculatesHashThrowsWhenSeekFails() - { - $s = new NoSeekStream(Stream::factory('foobazbar')); - $s->read(2); - Utils::hash($s, 'md5'); - } - - public function testCalculatesHashSeeksToOriginalPosition() - { - $s = Stream::factory('foobazbar'); - $s->seek(4); - $this->assertEquals(md5('foobazbar'), Utils::hash($s, 'md5')); - $this->assertEquals(4, $s->tell()); - } - - public function testOpensFilesSuccessfully() - { - $r = Utils::open(__FILE__, 'r'); - $this->assertInternalType('resource', $r); - fclose($r); - } - - /** - * @expectedException \RuntimeException - * @expectedExceptionMessage Unable to open /path/to/does/not/exist using mode r - */ - public function testThrowsExceptionNotWarning() - { - Utils::open('/path/to/does/not/exist', 'r'); - } - - public function testProxiesToFactory() - { - $this->assertEquals('foo', (string) Utils::create('foo')); - } -} diff --git a/core/vendor/mikey179/vfsStream/.coveralls.yml b/core/vendor/mikey179/vfsStream/.coveralls.yml deleted file mode 100644 index f5485b0..0000000 --- a/core/vendor/mikey179/vfsStream/.coveralls.yml +++ /dev/null @@ -1,3 +0,0 @@ -src_dir: src/main/php -coverage_clover: docs/phpunit/clover.xml -json_path: docs/phpunit/coveralls-upload.json \ No newline at end of file diff --git a/core/vendor/mikey179/vfsStream/.gitignore b/core/vendor/mikey179/vfsStream/.gitignore deleted file mode 100644 index 76e2ab0..0000000 --- a/core/vendor/mikey179/vfsStream/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -/composer.lock -/docs -/nbproject -/vendor diff --git a/core/vendor/mikey179/vfsStream/.travis.yml b/core/vendor/mikey179/vfsStream/.travis.yml deleted file mode 100644 index 4d30fdd..0000000 --- a/core/vendor/mikey179/vfsStream/.travis.yml +++ /dev/null @@ -1,24 +0,0 @@ -language: php - -php: - - hhvm - - hhvm-nightly - - 5.6 - - 5.3 - - 5.4 - - 5.5 - -matrix: - allow_failures: - - php: hhvm - - php: hhvm-nightly - -install: - - composer install - - composer require satooshi/php-coveralls:dev-master - -script: - - vendor/bin/phpunit --coverage-text - -after_script: - - vendor/bin/coveralls diff --git a/core/vendor/mikey179/vfsStream/CHANGELOG.md b/core/vendor/mikey179/vfsStream/CHANGELOG.md deleted file mode 100644 index 93f0566..0000000 --- a/core/vendor/mikey179/vfsStream/CHANGELOG.md +++ /dev/null @@ -1,182 +0,0 @@ -1.4.0 (2014-09-14) ------------------- - - * implemented #85: Added support for emulating block devices in the virtual filesystem, feature provided by Harris Borawski - * fixed #68: Unlink a non-existing file now triggers a PHP warning - - -1.3.0 (2014-07-21) ------------------- - - * implemented #79: possibility to mock large files without large memory footprint, see https://github.com/mikey179/vfsStream/wiki/MockingLargeFiles - * implemented #67: added partial support for text-mode translation flag (i.e., no actual translation of line endings takes place) so it no longer throws an exception (provided by Anthon Pang) - * fixed issue #74: issue with trailing windows path separators (provided by Sebastian Krüger) - * fixed issue #50: difference between real file system and vfs with `RecursiveDirectoryIterator` - * fixed issue #80: touch with no arguments for modification and access time behave incorrect - * deprecated `org\bovigo\vfs\vfsStreamFile::readUntilEnd()` - * deprecated `org\bovigo\vfs\vfsStreamFile::getBytesRead()` - - -1.2.0 (2013-04-01) ------------------- - - * implemented issue #34: provide `url()` method on all `vfsStreamContent` instances - * added `org\bovigo\vfs\vfsStreamContent::url()` - * added `org\bovigo\vfs\vfsStreamContent::path()` - * fixed issue #40: flock implementation doesn't work correctly, patch provided by Kamil Dziedzic - * fixed issue #49: call to member function on a non-object when trying to delete a file one above root where a file with same name in root exists - * fixed issue #51: `unlink()` must consider permissions of directory where file is inside, not of the file to unlink itself - * fixed issue #52: `chmod()`, `chown()` and `chgrp()` must consider permissions of directory where file/directory is inside - * fixed issue #53: `chmod()`, `chown()` and `chgrp()` must consider current user and current owner of file/directoy to change - - -1.1.0 (2012-08-25) ------------------- - - * implemented issue #11: add support for `streamWrapper::stream_metadata()` vfsStream now supports `touch()`, `chown()`, `chgrp()` and `chmod()` - * implemented issue #33: add support for `stream_truncate()` (provided by https://github.com/nikcorg) - * implemented issue #35: size limit (quota) for VFS - - -1.0.0 (2012-05-15) ------------------- - - * raised requirement for PHP version to 5.3.0 - * migrated codebase to use namespaces - * changed distribution from PEAR to Composer - * implemented issue #30: support "c" mode for `fopen()` - * fixed issue #31: prohibit aquiring locks when already locked / release lock on `fclose()` - * fixed issue #32: problems when subfolder has same name as folder - * fixed issue #36: `vfsStreamWrapper::stream_open()` should return false while trying to open existing non-writable file, patch provided by Alexander Peresypkin - - -0.11.2 (2012-01-14) -------------------- - - * fixed issue #29: set permissions properly when using `vfsStream::copyFromFileSystem()`, patch provided by predakanga - * fixed failing tests under PHP > 5.3.2 - - -0.11.1 (2011-12-04) -------------------- - - * fixed issue #28: `mkdir()` overwrites existing directories/files - - -0.11.0 (2011-11-29) -------------------- - - * implemented issue #20: `vfsStream::create()` removes old structure - * implemented issue #4: possibility to copy structure from existing file system - * fixed issue #23: `unlink()` should not remove any directory - * fixed issue #25: `vfsStreamDirectory::hasChild()` gives false positives for nested paths, patch provided by Andrew Coulton - * fixed issue #26: opening a file for reading only should not update its modification time, reported and initial patch provided by Ludovic Chabant - - -0.10.1 (2011-08-22) -------------------- - - * fixed issue #16: replace `vfsStreamContent` to `vfsStreamContainer` for autocompletion - * fixed issue #17: `vfsStream::create()` has issues with numeric directories, patch provided by mathieuk - - -0.10.0 (2011-07-22) -------------------- - - * added new method `vfsStreamContainer::hasChildren()` and `vfsStreamDirectory::hasChildren()` - * implemented issue #14: less verbose way to initialize vfsStream - * implemented issue #13: remove deprecated method `vfsStreamContent::setFilemtime()` - * implemented issue #6: locking meachanism for files - * ensured that `stream_set_blocking()`, `stream_set_timeout()` and `stream_set_write_buffer()` on vfsStream urls have the same behaviour with PHP 5.2 and 5.3 - * implemented issue #10: method to print directory structure - - -0.9.0 (2011-07-13) ------------------- - - * implemented feature request issue #7: add support for `fileatime()` and `filectime()` - * fixed issue #3: add support for `streamWrapper::stream_cast()` - * fixed issue #9: resolve path not called everywhere its needed - * deprecated `vfsStreamAbstractContent::setFilemtime()`, use `vfsStreamAbstractContent::lastModified()` instead, will be removed with 0.10.0 - - -0.8.0 (2010-10-08) ------------------- - - * implemented enhancement #6: use `vfsStream::umask()` to influence initial file mode for files and directories - * implemented enhancement #19: support of .. in the url, patch provided by Guislain Duthieuw - * fixed issue #18: `getChild()` returns NULL when child's name contains parent name - * fixed bug with incomplete error message when accessing non-existing files on root level - - -0.7.0 (2010-06-08) ------------------- - - * added new `vfsStream::setup()` method to simplify vfsStream usage - * fixed issue #15: `mkdir()` creates a subfolder in a folder without permissions - - -0.6.0 (2010-02-15) ------------------- - - * added support for `$mode` param when opening files, implements enhancement #7 and fixes issue #13 - * `vfsStreamWrapper::stream_open()` now evaluates `$options` for `STREAM_REPORT_ERRORS` - - -0.5.0 (2010-01-25) ------------------- - - * added support for `rename()`, patch provided by Benoit Aubuchon - * added support for . as directory alias so that `vfs://foo/.` resolves to `vfs://foo`, can be used as workaround for bug #8 - - -0.4.0 (2009-07-13) ------------------- - - * added support for file modes, users and groups (with restrictions, see http://code.google.com/p/bovigo/wiki/vfsStreamDocsKnownIssues) - * fixed bug #5: `vfsStreamDirectory::addChild()` does not replace child with same name - * fixed bug with `is_writable()` because of missing `stat()` fields, patch provided by Sergey Galkin - - -0.3.2 (2009-02-16) ------------------- - - * support trailing slashes on directories in vfsStream urls, patch provided by Gabriel Birke - * fixed bug #4: vfsstream can only be read once, reported by Christoph Bloemer - * enabled multiple iterations at the same time over the same directory - - -0.3.1 (2008-02-18) ------------------- - - * fixed path/directory separator issues under linux systems - * fixed uid/gid issues under linux systems - - -0.3.0 (2008-01-02) ------------------- - - * added support for `rmdir()` - * added `vfsStream::newDirectory()`, dropped `vfsStreamDirectory::ceate()` - * added new interface `vfsStreamContainer` - * added `vfsStreamContent::at()` which allows code like `$file = vfsStream::newFile('file.txt.')->withContent('foo')->at($otherDir);` - * added `vfsStreamContent::lastModified()`, made `vfsStreamContent::setFilemtime()` an alias for this - * moved from Stubbles development environment to bovigo - * refactorings to reduce crap index of various methods - - -0.2.0 (2007-12-29) ------------------- - - * moved `vfsStreamWrapper::PROTOCOL` to `vfsStream::SCHEME` - * added new `vfsStream::url()` method to assist in creating correct vfsStream urls - * added `vfsStream::path()` method as opposite to `vfsStream::url()` - * a call to `vfsStreamWrapper::register()` will now reset the root to null, implemented on request from David Zuelke - * added support for `is_readable()`, `is_dir()`, `is_file()` - * added `vfsStream::newFile()` to be able to do `$file = vfsStream::newFile("foo.txt")->withContent("bar");` - - -0.1.0 (2007-12-14) ------------------- - - * Initial release. diff --git a/core/vendor/mikey179/vfsStream/LICENSE b/core/vendor/mikey179/vfsStream/LICENSE deleted file mode 100644 index d8d73a0..0000000 --- a/core/vendor/mikey179/vfsStream/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2007-2014, Frank Kleine -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - -* Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -* Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -* Neither the name of Stubbles nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS -IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER -OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/core/vendor/mikey179/vfsStream/composer.json b/core/vendor/mikey179/vfsStream/composer.json deleted file mode 100644 index d924856..0000000 --- a/core/vendor/mikey179/vfsStream/composer.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "mikey179/vfsStream", - "type": "library", - "homepage": "http://vfs.bovigo.org/", - "license": "BSD", - "require": { - "php": ">=5.3.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.2" - }, - "autoload": { - "psr-0": { "org\\bovigo\\vfs\\": "src/main/php" } - }, - "extra": { - "branch-alias": { - "dev-master": "1.4.x-dev" - } - } -} \ No newline at end of file diff --git a/core/vendor/mikey179/vfsStream/examples/Example.php b/core/vendor/mikey179/vfsStream/examples/Example.php deleted file mode 100644 index a12caee..0000000 --- a/core/vendor/mikey179/vfsStream/examples/Example.php +++ /dev/null @@ -1,54 +0,0 @@ -id = $id; - } - - /** - * sets the directory - * - * @param string $directory - */ - public function setDirectory($directory) - { - $this->directory = $directory . DIRECTORY_SEPARATOR . $this->id; - if (file_exists($this->directory) === false) { - mkdir($this->directory, 0700, true); - } - } - - // more source code here... -} -?> \ No newline at end of file diff --git a/core/vendor/mikey179/vfsStream/examples/ExampleTestCaseOldWay.php b/core/vendor/mikey179/vfsStream/examples/ExampleTestCaseOldWay.php deleted file mode 100644 index 4ecb9d8..0000000 --- a/core/vendor/mikey179/vfsStream/examples/ExampleTestCaseOldWay.php +++ /dev/null @@ -1,48 +0,0 @@ -assertFalse(file_exists(__DIR__ . '/id')); - $example->setDirectory(__DIR__); - $this->assertTrue(file_exists(__DIR__ . '/id')); - } -} -?> \ No newline at end of file diff --git a/core/vendor/mikey179/vfsStream/examples/ExampleTestCaseWithVfsStream.php b/core/vendor/mikey179/vfsStream/examples/ExampleTestCaseWithVfsStream.php deleted file mode 100644 index 97c8a37..0000000 --- a/core/vendor/mikey179/vfsStream/examples/ExampleTestCaseWithVfsStream.php +++ /dev/null @@ -1,47 +0,0 @@ -root = vfsStream::setup('exampleDir'); - } - - /** - * @test - */ - public function directoryIsCreated() - { - $example = new Example('id'); - $this->assertFalse($this->root->hasChild('id')); - $example->setDirectory(vfsStream::url('exampleDir')); - $this->assertTrue($this->root->hasChild('id')); - } -} -?> \ No newline at end of file diff --git a/core/vendor/mikey179/vfsStream/examples/FailureExample.php b/core/vendor/mikey179/vfsStream/examples/FailureExample.php deleted file mode 100644 index 472468b..0000000 --- a/core/vendor/mikey179/vfsStream/examples/FailureExample.php +++ /dev/null @@ -1,50 +0,0 @@ -filename = $filename; - } - - /** - * sets the directory - * - * @param string $directory - */ - public function writeData($data) - { - $bytes = @file_put_contents($this->filename, $data); - if (false === $bytes) { - return 'could not write data'; - } - - return 'ok'; - } - - // more source code here... -} -?> \ No newline at end of file diff --git a/core/vendor/mikey179/vfsStream/examples/FailureExampleTestCase.php b/core/vendor/mikey179/vfsStream/examples/FailureExampleTestCase.php deleted file mode 100644 index e212305..0000000 --- a/core/vendor/mikey179/vfsStream/examples/FailureExampleTestCase.php +++ /dev/null @@ -1,58 +0,0 @@ -root = vfsStream::setup('exampleDir'); - } - - /** - * @test - */ - public function returnsOkOnNoFailure() - { - $example = new FailureExample(vfsStream::url('exampleDir/test.txt')); - $this->assertSame('ok', $example->writeData('testdata')); - $this->assertTrue($this->root->hasChild('test.txt')); - $this->assertSame('testdata', $this->root->getChild('test.txt')->getContent()); - } - - /** - * @test - */ - public function returnsErrorMessageIfWritingToFileFails() - { - $file = vfsStream::newFile('test.txt', 0000) - ->withContent('notoverwritten') - ->at($this->root); - $example = new FailureExample(vfsStream::url('exampleDir/test.txt')); - $this->assertSame('could not write data', $example->writeData('testdata')); - $this->assertTrue($this->root->hasChild('test.txt')); - $this->assertSame('notoverwritten', $this->root->getChild('test.txt')->getContent()); - } -} -?> \ No newline at end of file diff --git a/core/vendor/mikey179/vfsStream/examples/FileModeExampleTestCaseOldWay.php b/core/vendor/mikey179/vfsStream/examples/FileModeExampleTestCaseOldWay.php deleted file mode 100644 index 9f99671..0000000 --- a/core/vendor/mikey179/vfsStream/examples/FileModeExampleTestCaseOldWay.php +++ /dev/null @@ -1,67 +0,0 @@ -setDirectory(__DIR__); - if (DIRECTORY_SEPARATOR === '\\') { - // can not really test on windows, filemode from mkdir() is ignored - $this->assertEquals(40777, decoct(fileperms(__DIR__ . '/id'))); - } else { - $this->assertEquals(40700, decoct(fileperms(__DIR__ . '/id'))); - } - } - - /** - * test correct file mode for created directory - */ - public function testDirectoryHasCorrectDifferentFilePermissions() - { - $example = new FilemodeExample('id', 0755); - $example->setDirectory(__DIR__); - if (DIRECTORY_SEPARATOR === '\\') { - // can not really test on windows, filemode from mkdir() is ignored - $this->assertEquals(40777, decoct(fileperms(__DIR__ . '/id'))); - } else { - $this->assertEquals(40755, decoct(fileperms(__DIR__ . '/id'))); - } - } -} -?> \ No newline at end of file diff --git a/core/vendor/mikey179/vfsStream/examples/FilePermissionsExample.php b/core/vendor/mikey179/vfsStream/examples/FilePermissionsExample.php deleted file mode 100644 index 6258a5d..0000000 --- a/core/vendor/mikey179/vfsStream/examples/FilePermissionsExample.php +++ /dev/null @@ -1,29 +0,0 @@ - \ No newline at end of file diff --git a/core/vendor/mikey179/vfsStream/examples/FilePermissionsExampleTestCase.php b/core/vendor/mikey179/vfsStream/examples/FilePermissionsExampleTestCase.php deleted file mode 100644 index 6646636..0000000 --- a/core/vendor/mikey179/vfsStream/examples/FilePermissionsExampleTestCase.php +++ /dev/null @@ -1,44 +0,0 @@ -writeConfig(array('foo' => 'bar'), - vfsStream::url('exampleDir/writable.ini') - ); - - // assertions here - } - - /** - * @test - */ - public function directoryNotWritable() - { - vfsStream::setup('exampleDir', 0444); - $example = new FilePermissionsExample(); - $example->writeConfig(array('foo' => 'bar'), - vfsStream::url('exampleDir/notWritable.ini') - ); - } -} -?> \ No newline at end of file diff --git a/core/vendor/mikey179/vfsStream/examples/FilemodeExample.php b/core/vendor/mikey179/vfsStream/examples/FilemodeExample.php deleted file mode 100644 index c2ac364..0000000 --- a/core/vendor/mikey179/vfsStream/examples/FilemodeExample.php +++ /dev/null @@ -1,62 +0,0 @@ -id = $id; - $this->fileMode = $fileMode; - } - - /** - * sets the directory - * - * @param string $directory - */ - public function setDirectory($directory) - { - $this->directory = $directory . DIRECTORY_SEPARATOR . $this->id; - if (file_exists($this->directory) === false) { - mkdir($this->directory, $this->fileMode, true); - } - } - - // more source code here... -} -?> \ No newline at end of file diff --git a/core/vendor/mikey179/vfsStream/examples/FilemodeExampleTestCaseWithVfsStream.php b/core/vendor/mikey179/vfsStream/examples/FilemodeExampleTestCaseWithVfsStream.php deleted file mode 100644 index 675a2c7..0000000 --- a/core/vendor/mikey179/vfsStream/examples/FilemodeExampleTestCaseWithVfsStream.php +++ /dev/null @@ -1,53 +0,0 @@ -root = vfsStream::setup('exampleDir'); - } - - /** - * test that the directory is created - */ - public function testDirectoryIsCreatedWithDefaultPermissions() - { - $example = new FilemodeExample('id'); - $example->setDirectory(vfsStream::url('exampleDir')); - $this->assertEquals(0700, $this->root->getChild('id')->getPermissions()); - } - - /** - * test that the directory is created - */ - public function testDirectoryIsCreatedWithGivenPermissions() - { - $example = new FilemodeExample('id', 0755); - $example->setDirectory(vfsStream::url('exampleDir')); - $this->assertEquals(0755, $this->root->getChild('id')->getPermissions()); - } -} -?> \ No newline at end of file diff --git a/core/vendor/mikey179/vfsStream/examples/bootstrap.php b/core/vendor/mikey179/vfsStream/examples/bootstrap.php deleted file mode 100644 index 998c43d..0000000 --- a/core/vendor/mikey179/vfsStream/examples/bootstrap.php +++ /dev/null @@ -1,3 +0,0 @@ - \ No newline at end of file diff --git a/core/vendor/mikey179/vfsStream/phpdoc.dist.xml b/core/vendor/mikey179/vfsStream/phpdoc.dist.xml deleted file mode 100644 index 9cc2797..0000000 --- a/core/vendor/mikey179/vfsStream/phpdoc.dist.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - vfsStream API Doc - - docs/api - org\bovigo\vfs - - - docs/api - - - src/main/php - - \ No newline at end of file diff --git a/core/vendor/mikey179/vfsStream/phpunit.xml.dist b/core/vendor/mikey179/vfsStream/phpunit.xml.dist deleted file mode 100644 index d6919d2..0000000 --- a/core/vendor/mikey179/vfsStream/phpunit.xml.dist +++ /dev/null @@ -1,43 +0,0 @@ - - - - - ./src/test/php - - - - - - src/main/php - - - - - - - - - - - - - - \ No newline at end of file diff --git a/core/vendor/mikey179/vfsStream/readme.md b/core/vendor/mikey179/vfsStream/readme.md deleted file mode 100644 index 9eb78c5..0000000 --- a/core/vendor/mikey179/vfsStream/readme.md +++ /dev/null @@ -1,5 +0,0 @@ -For more information have a look in the [wiki](https://github.com/mikey179/vfsStream/wiki). - -[![Build Status](https://secure.travis-ci.org/mikey179/vfsStream.png)](http://travis-ci.org/mikey179/vfsStream) [![Coverage Status](https://coveralls.io/repos/mikey179/vfsStream/badge.png?branch=master)](https://coveralls.io/r/mikey179/vfsStream?branch=master) - -[![Latest Stable Version](https://poser.pugx.org/mikey179/vfsStream/version.png)](https://packagist.org/packages/mikey179/vfsStream) [![Latest Unstable Version](https://poser.pugx.org/mikey179/vfsStream/v/unstable.png)](//packagist.org/packages/mikey179/vfsStream) diff --git a/core/vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/DotDirectory.php b/core/vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/DotDirectory.php deleted file mode 100644 index e9bc215..0000000 --- a/core/vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/DotDirectory.php +++ /dev/null @@ -1,36 +0,0 @@ - \ No newline at end of file diff --git a/core/vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/Quota.php b/core/vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/Quota.php deleted file mode 100644 index b86ad8c..0000000 --- a/core/vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/Quota.php +++ /dev/null @@ -1,87 +0,0 @@ -amount = $amount; - } - - /** - * create with unlimited space - * - * @return Quota - */ - public static function unlimited() - { - return new self(self::UNLIMITED); - } - - /** - * checks if a quota is set - * - * @return bool - */ - public function isLimited() - { - return self::UNLIMITED < $this->amount; - } - - /** - * checks if given used space exceeda quota limit - * - * - * @param int $usedSpace - * @return int - */ - public function spaceLeft($usedSpace) - { - if (self::UNLIMITED === $this->amount) { - return $usedSpace; - } - - if ($usedSpace >= $this->amount) { - return 0; - } - - $spaceLeft = $this->amount - $usedSpace; - if (0 >= $spaceLeft) { - return 0; - } - - return $spaceLeft; - } -} -?> \ No newline at end of file diff --git a/core/vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/content/FileContent.php b/core/vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/content/FileContent.php deleted file mode 100644 index de649a8..0000000 --- a/core/vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/content/FileContent.php +++ /dev/null @@ -1,71 +0,0 @@ -size = $size; - } - - /** - * create large file with given size in kilobyte - * - * @param int $kilobyte - * @return LargeFileContent - */ - public static function withKilobytes($kilobyte) - { - return new self($kilobyte * 1024); - } - - /** - * create large file with given size in megabyte - * - * @param int $megabyte - * @return LargeFileContent - */ - public static function withMegabytes($megabyte) - { - return self::withKilobytes($megabyte * 1024); - } - - /** - * create large file with given size in gigabyte - * - * @param int $gigabyte - * @return LargeFileContent - */ - public static function withGigabytes($gigabyte) - { - return self::withMegabytes($gigabyte * 1024); - } - - /** - * returns actual content - * - * @return string - */ - public function content() - { - return $this->doRead(0, $this->size); - } - - /** - * returns size of content - * - * @return int - */ - public function size() - { - return $this->size; - } - - /** - * actual reading of given byte count starting at given offset - * - * @param int $offset - * @param int $count - */ - protected function doRead($offset, $count) - { - if (($offset + $count) > $this->size) { - $count = $this->size - $offset; - } - - $result = ''; - for ($i = 0; $i < $count; $i++) { - if (isset($this->content[$i + $offset])) { - $result .= $this->content[$i + $offset]; - } else { - $result .= ' '; - } - } - - return $result; - } - - /** - * actual writing of data with specified length at given offset - * - * @param string $data - * @param int $offset - * @param int $length - */ - protected function doWrite($data, $offset, $length) - { - for ($i = 0; $i < $length; $i++) { - $this->content[$i + $offset] = $data{$i}; - } - - if ($offset >= $this->size) { - $this->size += $length; - } elseif (($offset + $length) > $this->size) { - $this->size = $offset + $length; - } - } - - /** - * Truncates a file to a given length - * - * @param int $size length to truncate file to - * @return bool - */ - public function truncate($size) - { - $this->size = $size; - foreach (array_filter(array_keys($this->content), - function($pos) use ($size) - { - return $pos >= $size; - } - ) as $removePos) { - unset($this->content[$removePos]); - } - - return true; - } -} diff --git a/core/vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/content/SeekableFileContent.php b/core/vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/content/SeekableFileContent.php deleted file mode 100644 index e748000..0000000 --- a/core/vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/content/SeekableFileContent.php +++ /dev/null @@ -1,129 +0,0 @@ -doRead($this->offset, $count); - $this->offset += $count; - return $data; - } - - /** - * actual reading of given byte count starting at given offset - * - * @param int $offset - * @param int $count - */ - protected abstract function doRead($offset, $count); - - /** - * seeks to the given offset - * - * @param int $offset - * @param int $whence - * @return bool - */ - public function seek($offset, $whence) - { - switch ($whence) { - case SEEK_CUR: - $this->offset += $offset; - return true; - - case SEEK_END: - $this->offset = $this->size() + $offset; - return true; - - case SEEK_SET: - $this->offset = $offset; - return true; - - default: - return false; - } - - return false; - } - - /** - * checks whether pointer is at end of file - * - * @return bool - */ - public function eof() - { - return $this->size() <= $this->offset; - } - - /** - * writes an amount of data - * - * @param string $data - * @return amount of written bytes - */ - public function write($data) - { - $dataLength = strlen($data); - $this->doWrite($data, $this->offset, $dataLength); - $this->offset += $dataLength; - return $dataLength; - } - - /** - * actual writing of data with specified length at given offset - * - * @param string $data - * @param int $offset - * @param int $length - */ - protected abstract function doWrite($data, $offset, $length); - - /** - * for backwards compatibility with vfsStreamFile::bytesRead() - * - * @return int - * @deprecated - */ - public function bytesRead() - { - return $this->offset; - } - - /** - * for backwards compatibility with vfsStreamFile::readUntilEnd() - * - * @return string - * @deprecated - */ - public function readUntilEnd() - { - return substr($this->content(), $this->offset); - } -} diff --git a/core/vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/content/StringBasedFileContent.php b/core/vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/content/StringBasedFileContent.php deleted file mode 100644 index 58bd214..0000000 --- a/core/vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/content/StringBasedFileContent.php +++ /dev/null @@ -1,97 +0,0 @@ -content = $content; - } - - /** - * returns actual content - * - * @return string - */ - public function content() - { - return $this->content; - } - - /** - * returns size of content - * - * @return int - */ - public function size() - { - return strlen($this->content); - } - - /** - * actual reading of length starting at given offset - * - * @param int $offset - * @param int $count - */ - protected function doRead($offset, $count) - { - return substr($this->content, $offset, $count); - } - - /** - * actual writing of data with specified length at given offset - * - * @param string $data - * @param int $offset - * @param int $length - */ - protected function doWrite($data, $offset, $length) - { - $this->content = substr($this->content, 0, $offset) - . $data - . substr($this->content, $offset + $length); - } - - /** - * Truncates a file to a given length - * - * @param int $size length to truncate file to - * @return bool - */ - public function truncate($size) - { - if ($size > $this->size()) { - // Pad with null-chars if we're "truncating up" - $this->content .= str_repeat("\0", $size - $this->size()); - } else { - $this->content = substr($this->content, 0, $size); - } - - return true; - } -} \ No newline at end of file diff --git a/core/vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/vfsStream.php b/core/vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/vfsStream.php deleted file mode 100644 index a41c24f..0000000 --- a/core/vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/vfsStream.php +++ /dev/null @@ -1,444 +0,0 @@ - - * array('Core' = array('AbstractFactory' => array('test.php' => 'some text content', - * 'other.php' => 'Some more text content', - * 'Invalid.csv' => 'Something else', - * ), - * 'AnEmptyFolder' => array(), - * 'badlocation.php' => 'some bad content', - * ) - * ) - * - * the resulting directory tree will look like this: - *
    -     * root
    -     * \- Core
    -     *  |- badlocation.php
    -     *  |- AbstractFactory
    -     *  | |- test.php
    -     *  | |- other.php
    -     *  | \- Invalid.csv
    -     *  \- AnEmptyFolder
    -     * 
    - * Arrays will become directories with their key as directory name, and - * strings becomes files with their key as file name and their value as file - * content. - * - * @param string $rootDirName name of root directory - * @param int $permissions file permissions of root directory - * @param array $structure directory structure to add under root directory - * @return \org\bovigo\vfs\vfsStreamDirectory - * @since 0.7.0 - * @see https://github.com/mikey179/vfsStream/issues/14 - * @see https://github.com/mikey179/vfsStream/issues/20 - */ - public static function setup($rootDirName = 'root', $permissions = null, array $structure = array()) - { - vfsStreamWrapper::register(); - return self::create($structure, vfsStreamWrapper::setRoot(self::newDirectory($rootDirName, $permissions))); - } - - /** - * creates vfsStream directory structure from an array and adds it to given base dir - * - * Assumed $structure contains an array like this: - * - * array('Core' = array('AbstractFactory' => array('test.php' => 'some text content', - * 'other.php' => 'Some more text content', - * 'Invalid.csv' => 'Something else', - * ), - * 'AnEmptyFolder' => array(), - * 'badlocation.php' => 'some bad content', - * ) - * ) - * - * the resulting directory tree will look like this: - *
    -     * baseDir
    -     * \- Core
    -     *  |- badlocation.php
    -     *  |- AbstractFactory
    -     *  | |- test.php
    -     *  | |- other.php
    -     *  | \- Invalid.csv
    -     *  \- AnEmptyFolder
    -     * 
    - * Arrays will become directories with their key as directory name, and - * strings becomes files with their key as file name and their value as file - * content. - * - * If no baseDir is given it will try to add the structure to the existing - * root directory without replacing existing childs except those with equal - * names. - * - * @param array $structure directory structure to add under root directory - * @param vfsStreamDirectory $baseDir base directory to add structure to - * @return vfsStreamDirectory - * @throws \InvalidArgumentException - * @since 0.10.0 - * @see https://github.com/mikey179/vfsStream/issues/14 - * @see https://github.com/mikey179/vfsStream/issues/20 - */ - public static function create(array $structure, vfsStreamDirectory $baseDir = null) - { - if (null === $baseDir) { - $baseDir = vfsStreamWrapper::getRoot(); - } - - if (null === $baseDir) { - throw new \InvalidArgumentException('No baseDir given and no root directory set.'); - } - - return self::addStructure($structure, $baseDir); - } - - /** - * helper method to create subdirectories recursively - * - * @param array $structure subdirectory structure to add - * @param vfsStreamDirectory $baseDir directory to add the structure to - * @return vfsStreamDirectory - */ - protected static function addStructure(array $structure, vfsStreamDirectory $baseDir) - { - foreach ($structure as $name => $data) { - $name = (string) $name; - if (is_array($data) === true) { - self::addStructure($data, self::newDirectory($name)->at($baseDir)); - } elseif (is_string($data) === true) { - $matches = null; - preg_match('/^\[(.*)\]$/', $name, $matches); - if ($matches !== array()) { - self::newBlock($matches[1])->withContent($data)->at($baseDir); - } else { - self::newFile($name)->withContent($data)->at($baseDir); - } - } - } - - return $baseDir; - } - - /** - * copies the file system structure from given path into the base dir - * - * If no baseDir is given it will try to add the structure to the existing - * root directory without replacing existing childs except those with equal - * names. - * File permissions are copied as well. - * Please note that file contents will only be copied if their file size - * does not exceed the given $maxFileSize which is 1024 KB. - * - * @param string $path path to copy the structure from - * @param vfsStreamDirectory $baseDir directory to add the structure to - * @param int $maxFileSize maximum file size of files to copy content from - * @return vfsStreamDirectory - * @throws \InvalidArgumentException - * @since 0.11.0 - * @see https://github.com/mikey179/vfsStream/issues/4 - */ - public static function copyFromFileSystem($path, vfsStreamDirectory $baseDir = null, $maxFileSize = 1048576) - { - if (null === $baseDir) { - $baseDir = vfsStreamWrapper::getRoot(); - } - - if (null === $baseDir) { - throw new \InvalidArgumentException('No baseDir given and no root directory set.'); - } - - $dir = new \DirectoryIterator($path); - foreach ($dir as $fileinfo) { - if ($fileinfo->isFile() === true) { - if ($fileinfo->getSize() <= $maxFileSize) { - $content = file_get_contents($fileinfo->getPathname()); - } else { - $content = ''; - } - - self::newFile($fileinfo->getFilename(), - octdec(substr(sprintf('%o', $fileinfo->getPerms()), -4)) - ) - ->withContent($content) - ->at($baseDir); - } elseif ($fileinfo->isDir() === true && $fileinfo->isDot() === false) { - self::copyFromFileSystem($fileinfo->getPathname(), - self::newDirectory($fileinfo->getFilename(), - octdec(substr(sprintf('%o', $fileinfo->getPerms()), -4)) - ) - ->at($baseDir), - $maxFileSize - ); - } - } - - return $baseDir; - } - - /** - * returns a new file with given name - * - * @param string $name name of file to create - * @param int $permissions permissions of file to create - * @return vfsStreamFile - */ - public static function newFile($name, $permissions = null) - { - return new vfsStreamFile($name, $permissions); - } - - /** - * returns a new directory with given name - * - * If the name contains slashes, a new directory structure will be created. - * The returned directory will always be the parent directory of this - * directory structure. - * - * @param string $name name of directory to create - * @param int $permissions permissions of directory to create - * @return vfsStreamDirectory - */ - public static function newDirectory($name, $permissions = null) - { - if ('/' === $name{0}) { - $name = substr($name, 1); - } - - $firstSlash = strpos($name, '/'); - if (false === $firstSlash) { - return new vfsStreamDirectory($name, $permissions); - } - - $ownName = substr($name, 0, $firstSlash); - $subDirs = substr($name, $firstSlash + 1); - $directory = new vfsStreamDirectory($ownName, $permissions); - self::newDirectory($subDirs, $permissions)->at($directory); - return $directory; - } - - /** - * returns a new block with the given name - * - * @param string $name name of the block device - * @param int $permissions permissions of block to create - * @return vfsStreamBlock - */ - public static function newBlock($name, $permissions = null) - { - return new vfsStreamBlock($name, $permissions); - } - - /** - * returns current user - * - * If the system does not support posix_getuid() the current user will be root (0). - * - * @return int - */ - public static function getCurrentUser() - { - return function_exists('posix_getuid') ? posix_getuid() : self::OWNER_ROOT; - } - - /** - * returns current group - * - * If the system does not support posix_getgid() the current group will be root (0). - * - * @return int - */ - public static function getCurrentGroup() - { - return function_exists('posix_getgid') ? posix_getgid() : self::GROUP_ROOT; - } - - /** - * use visitor to inspect a content structure - * - * If the given content is null it will fall back to use the current root - * directory of the stream wrapper. - * - * Returns given visitor for method chaining comfort. - * - * @param vfsStreamVisitor $visitor the visitor who inspects - * @param vfsStreamContent $content directory structure to inspect - * @return vfsStreamVisitor - * @throws \InvalidArgumentException - * @since 0.10.0 - * @see https://github.com/mikey179/vfsStream/issues/10 - */ - public static function inspect(vfsStreamVisitor $visitor, vfsStreamContent $content = null) - { - if (null !== $content) { - return $visitor->visit($content); - } - - $root = vfsStreamWrapper::getRoot(); - if (null === $root) { - throw new \InvalidArgumentException('No content given and no root directory set.'); - } - - return $visitor->visitDirectory($root); - } - - /** - * sets quota to given amount of bytes - * - * @param int $bytes - * @since 1.1.0 - */ - public static function setQuota($bytes) - { - vfsStreamWrapper::setQuota(new Quota($bytes)); - } - - /** - * checks if vfsStream lists dotfiles in directory listings - * - * @return bool - * @since 1.3.0 - */ - public static function useDotfiles() - { - return self::$dotFiles; - } - - /** - * disable dotfiles in directory listings - * - * @since 1.3.0 - */ - public static function disableDotfiles() - { - self::$dotFiles = false; - } - - /** - * enable dotfiles in directory listings - * - * @since 1.3.0 - */ - public static function enableDotfiles() - { - self::$dotFiles = true; - } -} -?> diff --git a/core/vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/vfsStreamAbstractContent.php b/core/vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/vfsStreamAbstractContent.php deleted file mode 100644 index 5ec4352..0000000 --- a/core/vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/vfsStreamAbstractContent.php +++ /dev/null @@ -1,419 +0,0 @@ -name = $name; - $time = time(); - if (null === $permissions) { - $permissions = $this->getDefaultPermissions() & ~vfsStream::umask(); - } - - $this->lastAccessed = $time; - $this->lastAttributeModified = $time; - $this->lastModified = $time; - $this->permissions = $permissions; - $this->user = vfsStream::getCurrentUser(); - $this->group = vfsStream::getCurrentGroup(); - } - - /** - * returns default permissions for concrete implementation - * - * @return int - * @since 0.8.0 - */ - protected abstract function getDefaultPermissions(); - - /** - * returns the file name of the content - * - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * renames the content - * - * @param string $newName - */ - public function rename($newName) - { - $this->name = $newName; - } - - /** - * checks whether the container can be applied to given name - * - * @param string $name - * @return bool - */ - public function appliesTo($name) - { - if ($name === $this->name) { - return true; - } - - $segment_name = $this->name.'/'; - return (strncmp($segment_name, $name, strlen($segment_name)) == 0); - } - - /** - * returns the type of the container - * - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * sets the last modification time of the stream content - * - * @param int $filemtime - * @return vfsStreamContent - */ - public function lastModified($filemtime) - { - $this->lastModified = $filemtime; - return $this; - } - - /** - * returns the last modification time of the stream content - * - * @return int - */ - public function filemtime() - { - return $this->lastModified; - } - - /** - * sets last access time of the stream content - * - * @param int $fileatime - * @return vfsStreamContent - * @since 0.9 - */ - public function lastAccessed($fileatime) - { - $this->lastAccessed = $fileatime; - return $this; - } - - /** - * returns the last access time of the stream content - * - * @return int - * @since 0.9 - */ - public function fileatime() - { - return $this->lastAccessed; - } - - /** - * sets the last attribute modification time of the stream content - * - * @param int $filectime - * @return vfsStreamContent - * @since 0.9 - */ - public function lastAttributeModified($filectime) - { - $this->lastAttributeModified = $filectime; - return $this; - } - - /** - * returns the last attribute modification time of the stream content - * - * @return int - * @since 0.9 - */ - public function filectime() - { - return $this->lastAttributeModified; - } - - /** - * adds content to given container - * - * @param vfsStreamContainer $container - * @return vfsStreamContent - */ - public function at(vfsStreamContainer $container) - { - $container->addChild($this); - return $this; - } - - /** - * change file mode to given permissions - * - * @param int $permissions - * @return vfsStreamContent - */ - public function chmod($permissions) - { - $this->permissions = $permissions; - $this->lastAttributeModified = time(); - clearstatcache(); - return $this; - } - - /** - * returns permissions - * - * @return int - */ - public function getPermissions() - { - return $this->permissions; - } - - /** - * checks whether content is readable - * - * @param int $user id of user to check for - * @param int $group id of group to check for - * @return bool - */ - public function isReadable($user, $group) - { - if ($this->user === $user) { - $check = 0400; - } elseif ($this->group === $group) { - $check = 0040; - } else { - $check = 0004; - } - - return (bool) ($this->permissions & $check); - } - - /** - * checks whether content is writable - * - * @param int $user id of user to check for - * @param int $group id of group to check for - * @return bool - */ - public function isWritable($user, $group) - { - if ($this->user === $user) { - $check = 0200; - } elseif ($this->group === $group) { - $check = 0020; - } else { - $check = 0002; - } - - return (bool) ($this->permissions & $check); - } - - /** - * checks whether content is executable - * - * @param int $user id of user to check for - * @param int $group id of group to check for - * @return bool - */ - public function isExecutable($user, $group) - { - if ($this->user === $user) { - $check = 0100; - } elseif ($this->group === $group) { - $check = 0010; - } else { - $check = 0001; - } - - return (bool) ($this->permissions & $check); - } - - /** - * change owner of file to given user - * - * @param int $user - * @return vfsStreamContent - */ - public function chown($user) - { - $this->user = $user; - $this->lastAttributeModified = time(); - return $this; - } - - /** - * checks whether file is owned by given user - * - * @param int $user - * @return bool - */ - public function isOwnedByUser($user) - { - return $this->user === $user; - } - - /** - * returns owner of file - * - * @return int - */ - public function getUser() - { - return $this->user; - } - - /** - * change owner group of file to given group - * - * @param int $group - * @return vfsStreamContent - */ - public function chgrp($group) - { - $this->group = $group; - $this->lastAttributeModified = time(); - return $this; - } - - /** - * checks whether file is owned by group - * - * @param int $group - * @return bool - */ - public function isOwnedByGroup($group) - { - return $this->group === $group; - } - - /** - * returns owner group of file - * - * @return int - */ - public function getGroup() - { - return $this->group; - } - - /** - * sets parent path - * - * @param string $parentPath - * @internal only to be set by parent - * @since 1.2.0 - */ - public function setParentPath($parentPath) - { - $this->parentPath = $parentPath; - } - - /** - * returns path to this content - * - * @return string - * @since 1.2.0 - */ - public function path() - { - if (null === $this->parentPath) { - return $this->name; - } - - return $this->parentPath . '/' . $this->name; - } - - /** - * returns complete vfsStream url for this content - * - * @return string - * @since 1.2.0 - */ - public function url() - { - return vfsStream::url($this->path()); - } -} -?> \ No newline at end of file diff --git a/core/vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/vfsStreamBlock.php b/core/vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/vfsStreamBlock.php deleted file mode 100644 index 128a96a..0000000 --- a/core/vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/vfsStreamBlock.php +++ /dev/null @@ -1,34 +0,0 @@ -type = vfsStreamContent::TYPE_BLOCK; - } -} diff --git a/core/vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/vfsStreamContainer.php b/core/vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/vfsStreamContainer.php deleted file mode 100644 index e27a581..0000000 --- a/core/vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/vfsStreamContainer.php +++ /dev/null @@ -1,62 +0,0 @@ - \ No newline at end of file diff --git a/core/vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/vfsStreamContainerIterator.php b/core/vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/vfsStreamContainerIterator.php deleted file mode 100644 index 83943dc..0000000 --- a/core/vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/vfsStreamContainerIterator.php +++ /dev/null @@ -1,94 +0,0 @@ -children = $children; - if (vfsStream::useDotfiles()) { - array_unshift($this->children, new DotDirectory('.'), new DotDirectory('..')); - } - - reset($this->children); - } - - /** - * resets children pointer - */ - public function rewind() - { - reset($this->children); - } - - /** - * returns the current child - * - * @return vfsStreamContent - */ - public function current() - { - $child = current($this->children); - if (false === $child) { - return null; - } - - return $child; - } - - /** - * returns the name of the current child - * - * @return string - */ - public function key() - { - $child = current($this->children); - if (false === $child) { - return null; - } - - return $child->getName(); - } - - /** - * iterates to next child - */ - public function next() - { - next($this->children); - } - - /** - * checks if the current value is valid - * - * @return bool - */ - public function valid() - { - return (false !== current($this->children)); - } -} -?> \ No newline at end of file diff --git a/core/vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/vfsStreamContent.php b/core/vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/vfsStreamContent.php deleted file mode 100644 index efcccce..0000000 --- a/core/vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/vfsStreamContent.php +++ /dev/null @@ -1,214 +0,0 @@ - diff --git a/core/vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/vfsStreamDirectory.php b/core/vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/vfsStreamDirectory.php deleted file mode 100644 index e17c835..0000000 --- a/core/vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/vfsStreamDirectory.php +++ /dev/null @@ -1,267 +0,0 @@ -type = vfsStreamContent::TYPE_DIR; - parent::__construct($name, $permissions); - } - - /** - * returns default permissions for concrete implementation - * - * @return int - * @since 0.8.0 - */ - protected function getDefaultPermissions() - { - return 0777; - } - - /** - * returns size of directory - * - * The size of a directory is always 0 bytes. To calculate the summarized - * size of all children in the directory use sizeSummarized(). - * - * @return int - */ - public function size() - { - return 0; - } - - /** - * returns summarized size of directory and its children - * - * @return int - */ - public function sizeSummarized() - { - $size = 0; - foreach ($this->children as $child) { - if ($child->getType() === vfsStreamContent::TYPE_DIR) { - $size += $child->sizeSummarized(); - } else { - $size += $child->size(); - } - } - - return $size; - } - - /** - * renames the content - * - * @param string $newName - * @throws vfsStreamException - */ - public function rename($newName) - { - if (strstr($newName, '/') !== false) { - throw new vfsStreamException('Directory name can not contain /.'); - } - - parent::rename($newName); - } - - - /** - * sets parent path - * - * @param string $parentPath - * @internal only to be set by parent - * @since 1.2.0 - */ - public function setParentPath($parentPath) - { - parent::setParentPath($parentPath); - foreach ($this->children as $child) { - $child->setParentPath($this->path()); - } - } - - /** - * adds child to the directory - * - * @param vfsStreamContent $child - */ - public function addChild(vfsStreamContent $child) - { - $child->setParentPath($this->path()); - $this->children[$child->getName()] = $child; - $this->updateModifications(); - } - - /** - * removes child from the directory - * - * @param string $name - * @return bool - */ - public function removeChild($name) - { - foreach ($this->children as $key => $child) { - if ($child->appliesTo($name)) { - $child->setParentPath(null); - unset($this->children[$key]); - $this->updateModifications(); - return true; - } - } - - return false; - } - - /** - * updates internal timestamps - */ - protected function updateModifications() - { - $time = time(); - $this->lastAttributeModified = $time; - $this->lastModified = $time; - } - - /** - * checks whether the container contains a child with the given name - * - * @param string $name - * @return bool - */ - public function hasChild($name) - { - return ($this->getChild($name) !== null); - } - - /** - * returns the child with the given name - * - * @param string $name - * @return vfsStreamContent - */ - public function getChild($name) - { - $childName = $this->getRealChildName($name); - foreach ($this->children as $child) { - if ($child->getName() === $childName) { - return $child; - } - - if ($child->appliesTo($childName) === true && $child->hasChild($childName) === true) { - return $child->getChild($childName); - } - } - - return null; - } - - /** - * helper method to detect the real child name - * - * @param string $name - * @return string - */ - protected function getRealChildName($name) - { - if ($this->appliesTo($name) === true) { - return self::getChildName($name, $this->name); - } - - return $name; - } - - /** - * helper method to calculate the child name - * - * @param string $name - * @param string $ownName - * @return string - */ - protected static function getChildName($name, $ownName) - { - if ($name === $ownName) { - return $name; - } - - return substr($name, strlen($ownName) + 1); - } - - /** - * checks whether directory contains any children - * - * @return bool - * @since 0.10.0 - */ - public function hasChildren() - { - return (count($this->children) > 0); - } - - /** - * returns a list of children for this directory - * - * @return vfsStreamContent[] - */ - public function getChildren() - { - return array_values($this->children); - } - - /** - * returns iterator for the children - * - * @return vfsStreamContainerIterator - */ - public function getIterator() - { - return new vfsStreamContainerIterator($this->children); - } - - /** - * checks whether dir is a dot dir - * - * @return bool - */ - public function isDot() - { - if ('.' === $this->name || '..' === $this->name) { - return true; - } - - return false; - } -} -?> \ No newline at end of file diff --git a/core/vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/vfsStreamException.php b/core/vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/vfsStreamException.php deleted file mode 100644 index aa79d64..0000000 --- a/core/vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/vfsStreamException.php +++ /dev/null @@ -1,20 +0,0 @@ - \ No newline at end of file diff --git a/core/vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/vfsStreamFile.php b/core/vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/vfsStreamFile.php deleted file mode 100644 index 7e5f065..0000000 --- a/core/vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/vfsStreamFile.php +++ /dev/null @@ -1,394 +0,0 @@ -content = new StringBasedFileContent(null); - $this->type = vfsStreamContent::TYPE_FILE; - parent::__construct($name, $permissions); - } - - /** - * returns default permissions for concrete implementation - * - * @return int - * @since 0.8.0 - */ - protected function getDefaultPermissions() - { - return 0666; - } - - /** - * checks whether the container can be applied to given name - * - * @param string $name - * @return bool - */ - public function appliesTo($name) - { - return ($name === $this->name); - } - - /** - * alias for withContent() - * - * @param string $content - * @return vfsStreamFile - * @see withContent() - */ - public function setContent($content) - { - return $this->withContent($content); - } - - /** - * sets the contents of the file - * - * Setting content with this method does not change the time when the file - * was last modified. - * - * @param string]FileContent $content - * @return vfsStreamFile - * @throws \InvalidArgumentException - */ - public function withContent($content) - { - if (is_string($content)) { - $this->content = new StringBasedFileContent($content); - } elseif ($content instanceof FileContent) { - $this->content = $content; - } else { - throw new \InvalidArgumentException('Given content must either be a string or an instance of org\bovigo\vfs\content\FileContent'); - } - - return $this; - } - - /** - * returns the contents of the file - * - * Getting content does not change the time when the file - * was last accessed. - * - * @return string - */ - public function getContent() - { - return $this->content->content(); - } - - /** - * simply open the file - * - * @since 0.9 - */ - public function open() - { - $this->content->seek(0, SEEK_SET); - $this->lastAccessed = time(); - } - - /** - * open file and set pointer to end of file - * - * @since 0.9 - */ - public function openForAppend() - { - $this->content->seek(0, SEEK_END); - $this->lastAccessed = time(); - } - - /** - * open file and truncate content - * - * @since 0.9 - */ - public function openWithTruncate() - { - $this->open(); - $this->content->truncate(0); - $time = time(); - $this->lastAccessed = $time; - $this->lastModified = $time; - } - - /** - * reads the given amount of bytes from content - * - * Using this method changes the time when the file was last accessed. - * - * @param int $count - * @return string - */ - public function read($count) - { - $this->lastAccessed = time(); - return $this->content->read($count); - } - - /** - * returns the content until its end from current offset - * - * Using this method changes the time when the file was last accessed. - * - * @return string - * @deprecated since 1.3.0 - */ - public function readUntilEnd() - { - $this->lastAccessed = time(); - return $this->content->readUntilEnd(); - } - - /** - * writes an amount of data - * - * Using this method changes the time when the file was last modified. - * - * @param string $data - * @return amount of written bytes - */ - public function write($data) - { - $this->lastModified = time(); - return $this->content->write($data); - } - - /** - * Truncates a file to a given length - * - * @param int $size length to truncate file to - * @return bool - * @since 1.1.0 - */ - public function truncate($size) - { - $this->content->truncate($size); - $this->lastModified = time(); - return true; - } - - /** - * checks whether pointer is at end of file - * - * @return bool - */ - public function eof() - { - return $this->content->eof(); - } - - /** - * returns the current position within the file - * - * @return int - * @deprecated since 1.3.0 - */ - public function getBytesRead() - { - return $this->content->bytesRead(); - } - - /** - * seeks to the given offset - * - * @param int $offset - * @param int $whence - * @return bool - */ - public function seek($offset, $whence) - { - return $this->content->seek($offset, $whence); - } - - /** - * returns size of content - * - * @return int - */ - public function size() - { - return $this->content->size(); - } - - - /** - * locks file for - * - * @param resource|vfsStreamWrapper $resource - * @param int $operation - * @return bool - * @since 0.10.0 - * @see https://github.com/mikey179/vfsStream/issues/6 - * @see https://github.com/mikey179/vfsStream/issues/40 - */ - public function lock($resource, $operation) - { - if ((LOCK_NB & $operation) == LOCK_NB) { - $operation = $operation - LOCK_NB; - } - - // call to lock file on the same file handler firstly releases the lock - $this->unlock($resource); - - if (LOCK_EX === $operation) { - if ($this->isLocked()) { - return false; - } - - $this->setExclusiveLock($resource); - } elseif(LOCK_SH === $operation) { - if ($this->hasExclusiveLock()) { - return false; - } - - $this->addSharedLock($resource); - } - - return true; - } - - /** - * Removes lock from file acquired by given resource - * - * @param resource|vfsStreamWrapper $resource - * @see https://github.com/mikey179/vfsStream/issues/40 - */ - public function unlock($resource) { - if ($this->hasExclusiveLock($resource)) { - $this->exclusiveLock = null; - } - if ($this->hasSharedLock($resource)) { - unset($this->sharedLock[$this->getResourceId($resource)]); - } - } - - /** - * Set exlusive lock on file by given resource - * - * @param resource|vfsStreamWrapper $resource - * @see https://github.com/mikey179/vfsStream/issues/40 - */ - protected function setExclusiveLock($resource) { - $this->exclusiveLock = $this->getResourceId($resource); - } - - /** - * Add shared lock on file by given resource - * - * @param resource|vfsStreamWrapper $resource - * @see https://github.com/mikey179/vfsStream/issues/40 - */ - protected function addSharedLock($resource) { - $this->sharedLock[$this->getResourceId($resource)] = true; - } - - /** - * checks whether file is locked - * - * @param resource|vfsStreamWrapper $resource - * @return bool - * @since 0.10.0 - * @see https://github.com/mikey179/vfsStream/issues/6 - * @see https://github.com/mikey179/vfsStream/issues/40 - */ - public function isLocked($resource = null) - { - return $this->hasSharedLock($resource) || $this->hasExclusiveLock($resource); - } - - /** - * checks whether file is locked in shared mode - * - * @param resource|vfsStreamWrapper $resource - * @return bool - * @since 0.10.0 - * @see https://github.com/mikey179/vfsStream/issues/6 - * @see https://github.com/mikey179/vfsStream/issues/40 - */ - public function hasSharedLock($resource = null) - { - if (null !== $resource) { - return isset($this->sharedLock[$this->getResourceId($resource)]); - } - - return !empty($this->sharedLock); - } - - /** - * Returns unique resource id - * - * @param resource|vfsStreamWrapper $resource - * @return string - * @see https://github.com/mikey179/vfsStream/issues/40 - */ - public function getResourceId($resource) { - if (is_resource($resource)) { - $data = stream_get_meta_data($resource); - $resource = $data['wrapper_data']; - } - - return spl_object_hash($resource); - } - - /** - * checks whether file is locked in exclusive mode - * - * @param resource|vfsStreamWrapper $resource - * @return bool - * @since 0.10.0 - * @see https://github.com/mikey179/vfsStream/issues/6 - * @see https://github.com/mikey179/vfsStream/issues/40 - */ - public function hasExclusiveLock($resource = null) - { - if (null !== $resource) { - return $this->exclusiveLock === $this->getResourceId($resource); - } - - return null !== $this->exclusiveLock; - } -} diff --git a/core/vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/vfsStreamWrapper.php b/core/vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/vfsStreamWrapper.php deleted file mode 100644 index c059e6a..0000000 --- a/core/vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/vfsStreamWrapper.php +++ /dev/null @@ -1,981 +0,0 @@ -getName() === $path) { - return self::$root; - } - - if ($this->isInRoot($path) && self::$root->hasChild($path) === true) { - return self::$root->getChild($path); - } - - return null; - } - - /** - * helper method to detect whether given path is in root path - * - * @param string $path - * @return bool - */ - private function isInRoot($path) - { - return substr($path, 0, strlen(self::$root->getName())) === self::$root->getName(); - } - - /** - * returns content for given path but only when it is of given type - * - * @param string $path - * @param int $type - * @return vfsStreamContent - */ - protected function getContentOfType($path, $type) - { - $content = $this->getContent($path); - if (null !== $content && $content->getType() === $type) { - return $content; - } - - return null; - } - - /** - * splits path into its dirname and the basename - * - * @param string $path - * @return string[] - */ - protected function splitPath($path) - { - $lastSlashPos = strrpos($path, '/'); - if (false === $lastSlashPos) { - return array('dirname' => '', 'basename' => $path); - } - - return array('dirname' => substr($path, 0, $lastSlashPos), - 'basename' => substr($path, $lastSlashPos + 1) - ); - } - - /** - * helper method to resolve a path from /foo/bar/. to /foo/bar - * - * @param string $path - * @return string - */ - protected function resolvePath($path) - { - $newPath = array(); - foreach (explode('/', $path) as $pathPart) { - if ('.' !== $pathPart) { - if ('..' !== $pathPart) { - $newPath[] = $pathPart; - } else { - array_pop($newPath); - } - } - } - - return implode('/', $newPath); - } - - /** - * open the stream - * - * @param string $path the path to open - * @param string $mode mode for opening - * @param string $options options for opening - * @param string $opened_path full path that was actually opened - * @return bool - */ - public function stream_open($path, $mode, $options, $opened_path) - { - $extended = ((strstr($mode, '+') !== false) ? (true) : (false)); - $mode = str_replace(array('t', 'b', '+'), '', $mode); - if (in_array($mode, array('r', 'w', 'a', 'x', 'c')) === false) { - if (($options & STREAM_REPORT_ERRORS) === STREAM_REPORT_ERRORS) { - trigger_error('Illegal mode ' . $mode . ', use r, w, a, x or c, flavoured with t, b and/or +', E_USER_WARNING); - } - - return false; - } - - $this->mode = $this->calculateMode($mode, $extended); - $path = $this->resolvePath(vfsStream::path($path)); - $this->content = $this->getContentOfType($path, vfsStreamContent::TYPE_FILE); - if (null !== $this->content) { - if (self::WRITE === $mode) { - if (($options & STREAM_REPORT_ERRORS) === STREAM_REPORT_ERRORS) { - trigger_error('File ' . $path . ' already exists, can not open with mode x', E_USER_WARNING); - } - - return false; - } - - if ( - (self::TRUNCATE === $mode || self::APPEND === $mode) && - $this->content->isWritable(vfsStream::getCurrentUser(), vfsStream::getCurrentGroup()) === false - ) { - return false; - } - - if (self::TRUNCATE === $mode) { - $this->content->openWithTruncate(); - } elseif (self::APPEND === $mode) { - $this->content->openForAppend(); - } else { - if (!$this->content->isReadable(vfsStream::getCurrentUser(), vfsStream::getCurrentGroup())) { - if (($options & STREAM_REPORT_ERRORS) === STREAM_REPORT_ERRORS) { - trigger_error('Permission denied', E_USER_WARNING); - } - return false; - } - $this->content->open(); - } - - return true; - } - - $content = $this->createFile($path, $mode, $options); - if (false === $content) { - return false; - } - - $this->content = $content; - return true; - } - - /** - * creates a file at given path - * - * @param string $path the path to open - * @param string $mode mode for opening - * @param string $options options for opening - * @return bool - */ - private function createFile($path, $mode = null, $options = null) - { - $names = $this->splitPath($path); - if (empty($names['dirname']) === true) { - if (($options & STREAM_REPORT_ERRORS) === STREAM_REPORT_ERRORS) { - trigger_error('File ' . $names['basename'] . ' does not exist', E_USER_WARNING); - } - - return false; - } - - $dir = $this->getContentOfType($names['dirname'], vfsStreamContent::TYPE_DIR); - if (null === $dir) { - if (($options & STREAM_REPORT_ERRORS) === STREAM_REPORT_ERRORS) { - trigger_error('Directory ' . $names['dirname'] . ' does not exist', E_USER_WARNING); - } - - return false; - } elseif ($dir->hasChild($names['basename']) === true) { - if (($options & STREAM_REPORT_ERRORS) === STREAM_REPORT_ERRORS) { - trigger_error('Directory ' . $names['dirname'] . ' already contains a director named ' . $names['basename'], E_USER_WARNING); - } - - return false; - } - - if (self::READ === $mode) { - if (($options & STREAM_REPORT_ERRORS) === STREAM_REPORT_ERRORS) { - trigger_error('Can not open non-existing file ' . $path . ' for reading', E_USER_WARNING); - } - - return false; - } - - if ($dir->isWritable(vfsStream::getCurrentUser(), vfsStream::getCurrentGroup()) === false) { - if (($options & STREAM_REPORT_ERRORS) === STREAM_REPORT_ERRORS) { - trigger_error('Can not create new file in non-writable path ' . $names['dirname'], E_USER_WARNING); - } - - return false; - } - - return vfsStream::newFile($names['basename'])->at($dir); - } - - /** - * calculates the file mode - * - * @param string $mode opening mode: r, w, a or x - * @param bool $extended true if + was set with opening mode - * @return int - */ - protected function calculateMode($mode, $extended) - { - if (true === $extended) { - return self::ALL; - } - - if (self::READ === $mode) { - return self::READONLY; - } - - return self::WRITEONLY; - } - - /** - * closes the stream - * - * @see https://github.com/mikey179/vfsStream/issues/40 - */ - public function stream_close() - { - $this->content->lock($this, LOCK_UN); - } - - /** - * read the stream up to $count bytes - * - * @param int $count amount of bytes to read - * @return string - */ - public function stream_read($count) - { - if (self::WRITEONLY === $this->mode) { - return ''; - } - - if ($this->content->isReadable(vfsStream::getCurrentUser(), vfsStream::getCurrentGroup()) === false) { - return ''; - } - - return $this->content->read($count); - } - - /** - * writes data into the stream - * - * @param string $data - * @return int amount of bytes written - */ - public function stream_write($data) - { - if (self::READONLY === $this->mode) { - return 0; - } - - if ($this->content->isWritable(vfsStream::getCurrentUser(), vfsStream::getCurrentGroup()) === false) { - return 0; - } - - if (self::$quota->isLimited()) { - $data = substr($data, 0, self::$quota->spaceLeft(self::$root->sizeSummarized())); - } - - return $this->content->write($data); - } - - /** - * truncates a file to a given length - * - * @param int $size length to truncate file to - * @return bool - * @since 1.1.0 - */ - public function stream_truncate($size) - { - if (self::READONLY === $this->mode) { - return false; - } - - if ($this->content->isWritable(vfsStream::getCurrentUser(), vfsStream::getCurrentGroup()) === false) { - return false; - } - - if ($this->content->getType() !== vfsStreamContent::TYPE_FILE) { - return false; - } - - if (self::$quota->isLimited() && $this->content->size() < $size) { - $maxSize = self::$quota->spaceLeft(self::$root->sizeSummarized()); - if (0 === $maxSize) { - return false; - } - - if ($size > $maxSize) { - $size = $maxSize; - } - } - - return $this->content->truncate($size); - } - - /** - * sets metadata like owner, user or permissions - * - * @param string $path - * @param int $option - * @param mixed $var - * @return bool - * @since 1.1.0 - */ - public function stream_metadata($path, $option, $var) - { - $path = $this->resolvePath(vfsStream::path($path)); - $content = $this->getContent($path); - switch ($option) { - case STREAM_META_TOUCH: - if (null === $content) { - $content = $this->createFile($path); - } - - $currentTime = time(); - $content->lastModified(((isset($var[0])) ? ($var[0]) : ($currentTime))) - ->lastAccessed(((isset($var[1])) ? ($var[1]) : ($currentTime))); - return true; - - case STREAM_META_OWNER_NAME: - return false; - - case STREAM_META_OWNER: - if (null === $content) { - return false; - } - - return $this->doPermChange($path, - $content, - function() use ($content, $var) - { - $content->chown($var); - } - ); - - case STREAM_META_GROUP_NAME: - return false; - - case STREAM_META_GROUP: - if (null === $content) { - return false; - } - - return $this->doPermChange($path, - $content, - function() use ($content, $var) - { - $content->chgrp($var); - } - ); - - case STREAM_META_ACCESS: - if (null === $content) { - return false; - } - - return $this->doPermChange($path, - $content, - function() use ($content, $var) - { - $content->chmod($var); - } - ); - - default: - return false; - } - } - - /** - * executes given permission change when necessary rights allow such a change - * - * @param string $path - * @param vfsStreamAbstractContent $content - * @param \Closure $change - * @return bool - */ - private function doPermChange($path, vfsStreamAbstractContent $content, \Closure $change) - { - if (!$content->isOwnedByUser(vfsStream::getCurrentUser())) { - return false; - } - - if (self::$root->getName() !== $path) { - $names = $this->splitPath($path); - $parent = $this->getContent($names['dirname']); - if (!$parent->isWritable(vfsStream::getCurrentUser(), vfsStream::getCurrentGroup())) { - return false; - } - } - - $change(); - return true; - } - - /** - * checks whether stream is at end of file - * - * @return bool - */ - public function stream_eof() - { - return $this->content->eof(); - } - - /** - * returns the current position of the stream - * - * @return int - */ - public function stream_tell() - { - return $this->content->getBytesRead(); - } - - /** - * seeks to the given offset - * - * @param int $offset - * @param int $whence - * @return bool - */ - public function stream_seek($offset, $whence) - { - return $this->content->seek($offset, $whence); - } - - /** - * flushes unstored data into storage - * - * @return bool - */ - public function stream_flush() - { - return true; - } - - /** - * returns status of stream - * - * @return array - */ - public function stream_stat() - { - $fileStat = array('dev' => 0, - 'ino' => 0, - 'mode' => $this->content->getType() | $this->content->getPermissions(), - 'nlink' => 0, - 'uid' => $this->content->getUser(), - 'gid' => $this->content->getGroup(), - 'rdev' => 0, - 'size' => $this->content->size(), - 'atime' => $this->content->fileatime(), - 'mtime' => $this->content->filemtime(), - 'ctime' => $this->content->filectime(), - 'blksize' => -1, - 'blocks' => -1 - ); - return array_merge(array_values($fileStat), $fileStat); - } - - /** - * retrieve the underlaying resource - * - * Please note that this method always returns false as there is no - * underlaying resource to return. - * - * @param int $cast_as - * @since 0.9.0 - * @see https://github.com/mikey179/vfsStream/issues/3 - * @return bool - */ - public function stream_cast($cast_as) - { - return false; - } - - /** - * set lock status for stream - * - * @param int $operation - * @return bool - * @since 0.10.0 - * @see https://github.com/mikey179/vfsStream/issues/6 - * @see https://github.com/mikey179/vfsStream/issues/31 - * @see https://github.com/mikey179/vfsStream/issues/40 - */ - public function stream_lock($operation) - { - if ((LOCK_NB & $operation) == LOCK_NB) { - $operation = $operation - LOCK_NB; - } - - return $this->content->lock($this, $operation); - } - - /** - * sets options on the stream - * - * @param int $option key of option to set - * @param int $arg1 - * @param int $arg2 - * @return bool - * @since 0.10.0 - * @see https://github.com/mikey179/vfsStream/issues/15 - * @see http://www.php.net/manual/streamwrapper.stream-set-option.php - */ - public function stream_set_option($option, $arg1, $arg2) - { - switch ($option) { - case STREAM_OPTION_BLOCKING: - // break omitted - - case STREAM_OPTION_READ_TIMEOUT: - // break omitted - - case STREAM_OPTION_WRITE_BUFFER: - // break omitted - - default: - // nothing to do here - } - - return false; - } - - /** - * remove the data under the given path - * - * @param string $path - * @return bool - */ - public function unlink($path) - { - $realPath = $this->resolvePath(vfsStream::path($path)); - $content = $this->getContent($realPath); - if (null === $content) { - trigger_error('unlink(' . $path . '): No such file or directory', E_USER_WARNING); - return false; - } - - if ($content->getType() !== vfsStreamContent::TYPE_FILE) { - trigger_error('unlink(' . $path . '): Operation not permitted', E_USER_WARNING); - return false; - } - - return $this->doUnlink($realPath); - } - - /** - * removes a path - * - * @param string $path - * @return bool - */ - protected function doUnlink($path) - { - if (self::$root->getName() === $path) { - // delete root? very brave. :) - self::$root = null; - clearstatcache(); - return true; - } - - $names = $this->splitPath($path); - $content = $this->getContent($names['dirname']); - if (!$content->isWritable(vfsStream::getCurrentUser(), vfsStream::getCurrentGroup())) { - return false; - } - - clearstatcache(); - return $content->removeChild($names['basename']); - } - - /** - * rename from one path to another - * - * @param string $path_from - * @param string $path_to - * @return bool - * @author Benoit Aubuchon - */ - public function rename($path_from, $path_to) - { - $srcRealPath = $this->resolvePath(vfsStream::path($path_from)); - $dstRealPath = $this->resolvePath(vfsStream::path($path_to)); - $srcContent = $this->getContent($srcRealPath); - if (null == $srcContent) { - trigger_error(' No such file or directory', E_USER_WARNING); - return false; - } - $dstNames = $this->splitPath($dstRealPath); - $dstParentContent = $this->getContent($dstNames['dirname']); - if (null == $dstParentContent) { - trigger_error('No such file or directory', E_USER_WARNING); - return false; - } - if (!$dstParentContent->isWritable(vfsStream::getCurrentUser(), vfsStream::getCurrentGroup())) { - trigger_error('Permission denied', E_USER_WARNING); - return false; - } - if ($dstParentContent->getType() !== vfsStreamContent::TYPE_DIR) { - trigger_error('Target is not a directory', E_USER_WARNING); - return false; - } - - // remove old source first, so we can rename later - // (renaming first would lead to not being able to remove the old path) - if (!$this->doUnlink($srcRealPath)) { - return false; - } - - $dstContent = $srcContent; - // Renaming the filename - $dstContent->rename($dstNames['basename']); - // Copying to the destination - $dstParentContent->addChild($dstContent); - return true; - } - - /** - * creates a new directory - * - * @param string $path - * @param int $mode - * @param int $options - * @return bool - */ - public function mkdir($path, $mode, $options) - { - $umask = vfsStream::umask(); - if (0 < $umask) { - $permissions = $mode & ~$umask; - } else { - $permissions = $mode; - } - - $path = $this->resolvePath(vfsStream::path($path)); - if (null !== $this->getContent($path)) { - trigger_error('mkdir(): Path vfs://' . $path . ' exists', E_USER_WARNING); - return false; - } - - if (null === self::$root) { - self::$root = vfsStream::newDirectory($path, $permissions); - return true; - } - - $maxDepth = count(explode('/', $path)); - $names = $this->splitPath($path); - $newDirs = $names['basename']; - $dir = null; - $i = 0; - while ($dir === null && $i < $maxDepth) { - $dir = $this->getContent($names['dirname']); - $names = $this->splitPath($names['dirname']); - if (null == $dir) { - $newDirs = $names['basename'] . '/' . $newDirs; - } - - $i++; - } - - if (null === $dir - || $dir->getType() !== vfsStreamContent::TYPE_DIR - || $dir->isWritable(vfsStream::getCurrentUser(), vfsStream::getCurrentGroup()) === false) { - return false; - } - - $recursive = ((STREAM_MKDIR_RECURSIVE & $options) !== 0) ? (true) : (false); - if (strpos($newDirs, '/') !== false && false === $recursive) { - return false; - } - - vfsStream::newDirectory($newDirs, $permissions)->at($dir); - return true; - } - - /** - * removes a directory - * - * @param string $path - * @param int $options - * @return bool - * @todo consider $options with STREAM_MKDIR_RECURSIVE - */ - public function rmdir($path, $options) - { - $path = $this->resolvePath(vfsStream::path($path)); - $child = $this->getContentOfType($path, vfsStreamContent::TYPE_DIR); - if (null === $child) { - return false; - } - - // can only remove empty directories - if (count($child->getChildren()) > 0) { - return false; - } - - if (self::$root->getName() === $path) { - // delete root? very brave. :) - self::$root = null; - clearstatcache(); - return true; - } - - $names = $this->splitPath($path); - $dir = $this->getContentOfType($names['dirname'], vfsStreamContent::TYPE_DIR); - if ($dir->isWritable(vfsStream::getCurrentUser(), vfsStream::getCurrentGroup()) === false) { - return false; - } - - clearstatcache(); - return $dir->removeChild($child->getName()); - } - - /** - * opens a directory - * - * @param string $path - * @param int $options - * @return bool - */ - public function dir_opendir($path, $options) - { - $path = $this->resolvePath(vfsStream::path($path)); - $this->dir = $this->getContentOfType($path, vfsStreamContent::TYPE_DIR); - if (null === $this->dir || $this->dir->isReadable(vfsStream::getCurrentUser(), vfsStream::getCurrentGroup()) === false) { - return false; - } - - $this->dirIterator = $this->dir->getIterator(); - return true; - } - - /** - * reads directory contents - * - * @return string - */ - public function dir_readdir() - { - $dir = $this->dirIterator->current(); - if (null === $dir) { - return false; - } - - $this->dirIterator->next(); - return $dir->getName(); - } - - /** - * reset directory iteration - * - * @return bool - */ - public function dir_rewinddir() - { - return $this->dirIterator->rewind(); - } - - /** - * closes directory - * - * @return bool - */ - public function dir_closedir() - { - $this->dirIterator = null; - return true; - } - - /** - * returns status of url - * - * @param string $path path of url to return status for - * @param int $flags flags set by the stream API - * @return array - */ - public function url_stat($path, $flags) - { - $content = $this->getContent($this->resolvePath(vfsStream::path($path))); - if (null === $content) { - if (($flags & STREAM_URL_STAT_QUIET) != STREAM_URL_STAT_QUIET) { - trigger_error(' No such file or directory: ' . $path, E_USER_WARNING); - } - - return false; - - } - - $fileStat = array('dev' => 0, - 'ino' => 0, - 'mode' => $content->getType() | $content->getPermissions(), - 'nlink' => 0, - 'uid' => $content->getUser(), - 'gid' => $content->getGroup(), - 'rdev' => 0, - 'size' => $content->size(), - 'atime' => $content->fileatime(), - 'mtime' => $content->filemtime(), - 'ctime' => $content->filectime(), - 'blksize' => -1, - 'blocks' => -1 - ); - return array_merge(array_values($fileStat), $fileStat); - } -} -?> diff --git a/core/vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/visitor/vfsStreamAbstractVisitor.php b/core/vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/visitor/vfsStreamAbstractVisitor.php deleted file mode 100644 index 4f8c286..0000000 --- a/core/vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/visitor/vfsStreamAbstractVisitor.php +++ /dev/null @@ -1,65 +0,0 @@ -getType()) { - case vfsStreamContent::TYPE_BLOCK: - $this->visitBlockDevice($content); - break; - - case vfsStreamContent::TYPE_FILE: - $this->visitFile($content); - break; - - case vfsStreamContent::TYPE_DIR: - if (!$content->isDot()) { - $this->visitDirectory($content); - } - - break; - - default: - throw new \InvalidArgumentException('Unknown content type ' . $content->getType() . ' for ' . $content->getName()); - } - - return $this; - } - - /** - * visit a block device and process it - * - * @param vfsStreamBlock $block - * @return vfsStreamVisitor - */ - public function visitBlockDevice(vfsStreamBlock $block) - { - return $this->visitFile($block); - } -} -?> diff --git a/core/vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/visitor/vfsStreamPrintVisitor.php b/core/vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/visitor/vfsStreamPrintVisitor.php deleted file mode 100644 index 4175485..0000000 --- a/core/vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/visitor/vfsStreamPrintVisitor.php +++ /dev/null @@ -1,108 +0,0 @@ -out = $out; - } - - /** - * visit a file and process it - * - * @param vfsStreamFile $file - * @return vfsStreamPrintVisitor - */ - public function visitFile(vfsStreamFile $file) - { - $this->printContent($file->getName()); - return $this; - } - - /** - * visit a block device and process it - * - * @param vfsStreamBlock $block - * @return vfsStreamPrintVisitor - */ - public function visitBlockDevice(vfsStreamBlock $block) - { - $name = '[' . $block->getName() . ']'; - $this->printContent($name); - return $this; - } - - /** - * visit a directory and process it - * - * @param vfsStreamDirectory $dir - * @return vfsStreamPrintVisitor - */ - public function visitDirectory(vfsStreamDirectory $dir) - { - $this->printContent($dir->getName()); - $this->depth++; - foreach ($dir as $child) { - $this->visit($child); - } - - $this->depth--; - return $this; - } - - /** - * helper method to print the content - * - * @param string $name - */ - protected function printContent($name) - { - fwrite($this->out, str_repeat(' ', $this->depth) . '- ' . $name . "\n"); - } -} -?> diff --git a/core/vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/visitor/vfsStreamStructureVisitor.php b/core/vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/visitor/vfsStreamStructureVisitor.php deleted file mode 100644 index 957e5df..0000000 --- a/core/vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/visitor/vfsStreamStructureVisitor.php +++ /dev/null @@ -1,112 +0,0 @@ -reset(); - } - - /** - * visit a file and process it - * - * @param vfsStreamFile $file - * @return vfsStreamStructureVisitor - */ - public function visitFile(vfsStreamFile $file) - { - $this->current[$file->getName()] = $file->getContent(); - return $this; - } - - /** - * visit a block device and process it - * - * @param vfsStreamBlock $block - * @return vfsStreamStructureVisitor - */ - public function visitBlockDevice(vfsStreamBlock $block) - { - $this->current['[' . $block->getName() . ']'] = $block->getContent(); - return $this; - } - - /** - * visit a directory and process it - * - * @param vfsStreamDirectory $dir - * @return vfsStreamStructureVisitor - */ - public function visitDirectory(vfsStreamDirectory $dir) - { - $this->current[$dir->getName()] = array(); - $tmp =& $this->current; - $this->current =& $tmp[$dir->getName()]; - foreach ($dir as $child) { - $this->visit($child); - } - - $this->current =& $tmp; - return $this; - } - - /** - * returns structure of visited contents - * - * @return array - * @api - */ - public function getStructure() - { - return $this->structure; - } - - /** - * resets structure so visitor could be reused - * - * @return vfsStreamStructureVisitor - */ - public function reset() - { - $this->structure = array(); - $this->current =& $this->structure; - return $this; - } -} -?> diff --git a/core/vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/visitor/vfsStreamVisitor.php b/core/vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/visitor/vfsStreamVisitor.php deleted file mode 100644 index 89e4374..0000000 --- a/core/vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/visitor/vfsStreamVisitor.php +++ /dev/null @@ -1,56 +0,0 @@ - diff --git a/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/DirectoryIterationTestCase.php b/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/DirectoryIterationTestCase.php deleted file mode 100644 index 4f30b03..0000000 --- a/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/DirectoryIterationTestCase.php +++ /dev/null @@ -1,318 +0,0 @@ -assertEquals($expectedCount, - $actualCount, - 'Directory foo contains ' . $expectedCount . ' children, but got ' . $actualCount . ' children while iterating over directory contents' - ); - } - - /** - * @param \Closure $dotFilesSwitch - * @param string[] $expectedDirectories - * @test - * @dataProvider provideSwitchWithExpectations - */ - public function directoryIteration(\Closure $dotFilesSwitch, array $expectedDirectories) - { - $dotFilesSwitch(); - $dir = dir($this->fooURL); - $i = 0; - while (false !== ($entry = $dir->read())) { - $i++; - $this->assertTrue(in_array($entry, $expectedDirectories)); - } - - $this->assertDirectoryCount(count($expectedDirectories), $i); - $dir->rewind(); - $i = 0; - while (false !== ($entry = $dir->read())) { - $i++; - $this->assertTrue(in_array($entry, $expectedDirectories)); - } - - $this->assertDirectoryCount(count($expectedDirectories), $i); - $dir->close(); - } - - /** - * @param \Closure $dotFilesSwitch - * @param string[] $expectedDirectories - * @test - * @dataProvider provideSwitchWithExpectations - */ - public function directoryIterationWithDot(\Closure $dotFilesSwitch, array $expectedDirectories) - { - $dotFilesSwitch(); - $dir = dir($this->fooURL . '/.'); - $i = 0; - while (false !== ($entry = $dir->read())) { - $i++; - $this->assertTrue(in_array($entry, $expectedDirectories)); - } - - $this->assertDirectoryCount(count($expectedDirectories), $i); - $dir->rewind(); - $i = 0; - while (false !== ($entry = $dir->read())) { - $i++; - $this->assertTrue(in_array($entry, $expectedDirectories)); - } - - $this->assertDirectoryCount(count($expectedDirectories), $i); - $dir->close(); - } - - /** - * assure that a directory iteration works as expected - * - * @param \Closure $dotFilesSwitch - * @param string[] $expectedDirectories - * @test - * @dataProvider provideSwitchWithExpectations - * @group regression - * @group bug_2 - */ - public function directoryIterationWithOpenDir_Bug_2(\Closure $dotFilesSwitch, array $expectedDirectories) - { - $dotFilesSwitch(); - $handle = opendir($this->fooURL); - $i = 0; - while (false !== ($entry = readdir($handle))) { - $i++; - $this->assertTrue(in_array($entry, $expectedDirectories)); - } - - $this->assertDirectoryCount(count($expectedDirectories), $i); - - rewinddir($handle); - $i = 0; - while (false !== ($entry = readdir($handle))) { - $i++; - $this->assertTrue(in_array($entry, $expectedDirectories)); - } - - $this->assertDirectoryCount(count($expectedDirectories), $i); - closedir($handle); - } - - /** - * assure that a directory iteration works as expected - * - * @author Christoph Bloemer - * @param \Closure $dotFilesSwitch - * @param string[] $expectedDirectories - * @test - * @dataProvider provideSwitchWithExpectations - * @group regression - * @group bug_4 - */ - public function directoryIteration_Bug_4(\Closure $dotFilesSwitch, array $expectedDirectories) - { - $dotFilesSwitch(); - $dir = $this->fooURL; - $list1 = array(); - if ($handle = opendir($dir)) { - while (false !== ($listItem = readdir($handle))) { - if ('.' != $listItem && '..' != $listItem) { - if (is_file($dir . '/' . $listItem) === true) { - $list1[] = 'File:[' . $listItem . ']'; - } elseif (is_dir($dir . '/' . $listItem) === true) { - $list1[] = 'Folder:[' . $listItem . ']'; - } - } - } - - closedir($handle); - } - - $list2 = array(); - if ($handle = opendir($dir)) { - while (false !== ($listItem = readdir($handle))) { - if ('.' != $listItem && '..' != $listItem) { - if (is_file($dir . '/' . $listItem) === true) { - $list2[] = 'File:[' . $listItem . ']'; - } elseif (is_dir($dir . '/' . $listItem) === true) { - $list2[] = 'Folder:[' . $listItem . ']'; - } - } - } - - closedir($handle); - } - - $this->assertEquals($list1, $list2); - $this->assertEquals(2, count($list1)); - $this->assertEquals(2, count($list2)); - } - - /** - * assure that a directory iteration works as expected - * - * @param \Closure $dotFilesSwitch - * @param string[] $expectedDirectories - * @test - * @dataProvider provideSwitchWithExpectations - */ - public function directoryIterationShouldBeIndependent(\Closure $dotFilesSwitch, array $expectedDirectories) - { - $dotFilesSwitch(); - $list1 = array(); - $list2 = array(); - $handle1 = opendir($this->fooURL); - if (false !== ($listItem = readdir($handle1))) { - $list1[] = $listItem; - } - - $handle2 = opendir($this->fooURL); - if (false !== ($listItem = readdir($handle2))) { - $list2[] = $listItem; - } - - if (false !== ($listItem = readdir($handle1))) { - $list1[] = $listItem; - } - - if (false !== ($listItem = readdir($handle2))) { - $list2[] = $listItem; - } - - closedir($handle1); - closedir($handle2); - $this->assertEquals($list1, $list2); - $this->assertEquals(2, count($list1)); - $this->assertEquals(2, count($list2)); - } - - /** - * @test - * @group issue_50 - */ - public function recursiveDirectoryIterationWithDotsEnabled() - { - vfsStream::enableDotfiles(); - vfsStream::setup(); - $structure = array( - 'Core' => array( - 'AbstractFactory' => array( - 'test.php' => 'some text content', - 'other.php' => 'Some more text content', - 'Invalid.csv' => 'Something else', - ), - 'AnEmptyFolder' => array(), - 'badlocation.php' => 'some bad content', - ) - ); - $root = vfsStream::create($structure); - $rootPath = vfsStream::url($root->getName()); - - $iterator = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($rootPath), - \RecursiveIteratorIterator::CHILD_FIRST); - $pathes = array(); - foreach ($iterator as $fullFileName => $fileSPLObject) { - $pathes[] = $fullFileName; - } - - $this->assertEquals(array('vfs://root'.DIRECTORY_SEPARATOR.'.', - 'vfs://root'.DIRECTORY_SEPARATOR.'..', - 'vfs://root'.DIRECTORY_SEPARATOR.'Core'.DIRECTORY_SEPARATOR.'.', - 'vfs://root'.DIRECTORY_SEPARATOR.'Core'.DIRECTORY_SEPARATOR.'..', - 'vfs://root'.DIRECTORY_SEPARATOR.'Core'.DIRECTORY_SEPARATOR.'AbstractFactory'.DIRECTORY_SEPARATOR.'.', - 'vfs://root'.DIRECTORY_SEPARATOR.'Core'.DIRECTORY_SEPARATOR.'AbstractFactory'.DIRECTORY_SEPARATOR.'..', - 'vfs://root'.DIRECTORY_SEPARATOR.'Core'.DIRECTORY_SEPARATOR.'AbstractFactory'.DIRECTORY_SEPARATOR.'test.php', - 'vfs://root'.DIRECTORY_SEPARATOR.'Core'.DIRECTORY_SEPARATOR.'AbstractFactory'.DIRECTORY_SEPARATOR.'other.php', - 'vfs://root'.DIRECTORY_SEPARATOR.'Core'.DIRECTORY_SEPARATOR.'AbstractFactory'.DIRECTORY_SEPARATOR.'Invalid.csv', - 'vfs://root'.DIRECTORY_SEPARATOR.'Core'.DIRECTORY_SEPARATOR.'AbstractFactory', - 'vfs://root'.DIRECTORY_SEPARATOR.'Core'.DIRECTORY_SEPARATOR.'AnEmptyFolder'.DIRECTORY_SEPARATOR.'.', - 'vfs://root'.DIRECTORY_SEPARATOR.'Core'.DIRECTORY_SEPARATOR.'AnEmptyFolder'.DIRECTORY_SEPARATOR.'..', - 'vfs://root'.DIRECTORY_SEPARATOR.'Core'.DIRECTORY_SEPARATOR.'AnEmptyFolder', - 'vfs://root'.DIRECTORY_SEPARATOR.'Core'.DIRECTORY_SEPARATOR.'badlocation.php', - 'vfs://root'.DIRECTORY_SEPARATOR.'Core' - ), - $pathes - ); - } - - /** - * @test - * @group issue_50 - */ - public function recursiveDirectoryIterationWithDotsDisabled() - { - vfsStream::disableDotfiles(); - vfsStream::setup(); - $structure = array( - 'Core' => array( - 'AbstractFactory' => array( - 'test.php' => 'some text content', - 'other.php' => 'Some more text content', - 'Invalid.csv' => 'Something else', - ), - 'AnEmptyFolder' => array(), - 'badlocation.php' => 'some bad content', - ) - ); - $root = vfsStream::create($structure); - $rootPath = vfsStream::url($root->getName()); - - $iterator = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($rootPath), - \RecursiveIteratorIterator::CHILD_FIRST); - $pathes = array(); - foreach ($iterator as $fullFileName => $fileSPLObject) { - $pathes[] = $fullFileName; - } - - $this->assertEquals(array('vfs://root'.DIRECTORY_SEPARATOR.'Core'.DIRECTORY_SEPARATOR.'AbstractFactory'.DIRECTORY_SEPARATOR.'test.php', - 'vfs://root'.DIRECTORY_SEPARATOR.'Core'.DIRECTORY_SEPARATOR.'AbstractFactory'.DIRECTORY_SEPARATOR.'other.php', - 'vfs://root'.DIRECTORY_SEPARATOR.'Core'.DIRECTORY_SEPARATOR.'AbstractFactory'.DIRECTORY_SEPARATOR.'Invalid.csv', - 'vfs://root'.DIRECTORY_SEPARATOR.'Core'.DIRECTORY_SEPARATOR.'AbstractFactory', - 'vfs://root'.DIRECTORY_SEPARATOR.'Core'.DIRECTORY_SEPARATOR.'AnEmptyFolder', - 'vfs://root'.DIRECTORY_SEPARATOR.'Core'.DIRECTORY_SEPARATOR.'badlocation.php', - 'vfs://root'.DIRECTORY_SEPARATOR.'Core' - ), - $pathes - ); - } -} \ No newline at end of file diff --git a/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/PermissionsTestCase.php b/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/PermissionsTestCase.php deleted file mode 100644 index b3d9f21..0000000 --- a/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/PermissionsTestCase.php +++ /dev/null @@ -1,92 +0,0 @@ - array('test.file' => '')); - $this->root = vfsStream::setup('root', null, $structure); - } - - /** - * @test - * @group issue_52 - */ - public function canNotChangePermissionWhenDirectoryNotWriteable() - { - $this->root->getChild('test_directory')->chmod(0444); - $this->assertFalse(@chmod(vfsStream::url('root/test_directory/test.file'), 0777)); - } - - /** - * @test - * @group issue_53 - */ - public function canNotChangePermissionWhenFileNotOwned() - { - $this->root->getChild('test_directory')->getChild('test.file')->chown(vfsStream::OWNER_USER_1); - $this->assertFalse(@chmod(vfsStream::url('root/test_directory/test.file'), 0777)); - } - - /** - * @test - * @group issue_52 - */ - public function canNotChangeOwnerWhenDirectoryNotWriteable() - { - $this->root->getChild('test_directory')->chmod(0444); - $this->assertFalse(@chown(vfsStream::url('root/test_directory/test.file'), vfsStream::OWNER_USER_2)); - } - - /** - * @test - * @group issue_53 - */ - public function canNotChangeOwnerWhenFileNotOwned() - { - $this->root->getChild('test_directory')->getChild('test.file')->chown(vfsStream::OWNER_USER_1); - $this->assertFalse(@chown(vfsStream::url('root/test_directory/test.file'), vfsStream::OWNER_USER_2)); - } - - /** - * @test - * @group issue_52 - */ - public function canNotChangeGroupWhenDirectoryNotWriteable() - { - $this->root->getChild('test_directory')->chmod(0444); - $this->assertFalse(@chgrp(vfsStream::url('root/test_directory/test.file'), vfsStream::GROUP_USER_2)); - } - - /** - * @test - * @group issue_53 - */ - public function canNotChangeGroupWhenFileNotOwned() - { - $this->root->getChild('test_directory')->getChild('test.file')->chown(vfsStream::OWNER_USER_1); - $this->assertFalse(@chgrp(vfsStream::url('root/test_directory/test.file'), vfsStream::GROUP_USER_2)); - } -} -?> \ No newline at end of file diff --git a/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/QuotaTestCase.php b/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/QuotaTestCase.php deleted file mode 100644 index 7007183..0000000 --- a/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/QuotaTestCase.php +++ /dev/null @@ -1,81 +0,0 @@ -quota = new Quota(10); - } - - /** - * @test - */ - public function unlimitedQuotaIsNotLimited() - { - $this->assertFalse(Quota::unlimited()->isLimited()); - } - - /** - * @test - */ - public function limitedQuotaIsLimited() - { - $this->assertTrue($this->quota->isLimited()); - } - - /** - * @test - */ - public function unlimitedQuotaHasAlwaysSpaceLeft() - { - $this->assertEquals(303, Quota::unlimited()->spaceLeft(303)); - } - - /** - * @test - */ - public function hasNoSpaceLeftWhenUsedSpaceIsLargerThanQuota() - { - $this->assertEquals(0, $this->quota->spaceLeft(11)); - } - - /** - * @test - */ - public function hasNoSpaceLeftWhenUsedSpaceIsEqualToQuota() - { - $this->assertEquals(0, $this->quota->spaceLeft(10)); - } - - /** - * @test - */ - public function hasSpaceLeftWhenUsedSpaceIsLowerThanQuota() - { - $this->assertEquals(1, $this->quota->spaceLeft(9)); - } -} -?> \ No newline at end of file diff --git a/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/UnlinkTestCase.php b/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/UnlinkTestCase.php deleted file mode 100644 index 4f9fb17..0000000 --- a/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/UnlinkTestCase.php +++ /dev/null @@ -1,58 +0,0 @@ - array('test.file' => '')); - $root = vfsStream::setup('root', null, $structure); - $root->getChild('test_directory')->chmod(0777); - $root->getChild('test_directory')->getChild('test.file')->chmod(0444); - $this->assertTrue(@unlink(vfsStream::url('root/test_directory/test.file'))); - } - - /** - * @test - * @group issue_51 - */ - public function canNotRemoveWritableFileFromNonWritableDirectory() - { - $structure = array('test_directory' => array('test.file' => '')); - $root = vfsStream::setup('root', null, $structure); - $root->getChild('test_directory')->chmod(0444); - $root->getChild('test_directory')->getChild('test.file')->chmod(0777); - $this->assertFalse(@unlink(vfsStream::url('root/test_directory/test.file'))); - } - - /** - * @test - * @since 1.4.0 - * @group issue_68 - */ - public function unlinkNonExistingFileTriggersError() - { - vfsStream::setup(); - try { - $this->assertFalse(unlink('vfs://root/foo.txt')); - } catch (\PHPUnit_Framework_Error $fe) { - $this->assertEquals('unlink(vfs://root/foo.txt): No such file or directory', $fe->getMessage()); - } - } -} diff --git a/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/content/LargeFileContentTestCase.php b/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/content/LargeFileContentTestCase.php deleted file mode 100644 index c7a7458..0000000 --- a/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/content/LargeFileContentTestCase.php +++ /dev/null @@ -1,225 +0,0 @@ -largeFileContent = new LargeFileContent(100); - } - - /** - * @test - */ - public function hasSizeOriginallyGiven() - { - $this->assertEquals(100, $this->largeFileContent->size()); - } - - /** - * @test - */ - public function contentIsFilledUpWithSpacesIfNoDataWritten() - { - $this->assertEquals( - str_repeat(' ', 100), - $this->largeFileContent->content() - ); - } - - /** - * @test - */ - public function readReturnsSpacesWhenNothingWrittenAtOffset() - { - $this->assertEquals( - str_repeat(' ', 10), - $this->largeFileContent->read(10) - ); - } - - /** - * @test - */ - public function readReturnsContentFilledWithSpaces() - { - $this->largeFileContent->write('foobarbaz'); - $this->largeFileContent->seek(0, SEEK_SET); - $this->assertEquals( - 'foobarbaz ', - $this->largeFileContent->read(10) - ); - } - - /** - * @test - */ - public function writesDataAtStartWhenOffsetNotMoved() - { - $this->assertEquals(9, $this->largeFileContent->write('foobarbaz')); - $this->assertEquals( - 'foobarbaz' . str_repeat(' ', 91), - $this->largeFileContent->content() - ); - } - - /** - * @test - */ - public function writeDataAtStartDoesNotIncreaseSize() - { - $this->assertEquals(9, $this->largeFileContent->write('foobarbaz')); - $this->assertEquals(100, $this->largeFileContent->size()); - } - - /** - * @test - */ - public function writesDataAtOffsetWhenOffsetMoved() - { - $this->largeFileContent->seek(50, SEEK_SET); - $this->assertEquals(9, $this->largeFileContent->write('foobarbaz')); - $this->assertEquals( - str_repeat(' ', 50) . 'foobarbaz' . str_repeat(' ', 41), - $this->largeFileContent->content() - ); - } - - /** - * @test - */ - public function writeDataInBetweenDoesNotIncreaseSize() - { - $this->largeFileContent->seek(50, SEEK_SET); - $this->assertEquals(9, $this->largeFileContent->write('foobarbaz')); - $this->assertEquals(100, $this->largeFileContent->size()); - } - - /** - * @test - */ - public function writesDataOverEndWhenOffsetAndDataLengthLargerThanSize() - { - $this->largeFileContent->seek(95, SEEK_SET); - $this->assertEquals(9, $this->largeFileContent->write('foobarbaz')); - $this->assertEquals( - str_repeat(' ', 95) . 'foobarbaz', - $this->largeFileContent->content() - ); - } - - /** - * @test - */ - public function writeDataOverLastOffsetIncreasesSize() - { - $this->largeFileContent->seek(95, SEEK_SET); - $this->assertEquals(9, $this->largeFileContent->write('foobarbaz')); - $this->assertEquals(104, $this->largeFileContent->size()); - } - - /** - * @test - */ - public function writesDataAfterEndWhenOffsetAfterEnd() - { - $this->largeFileContent->seek(0, SEEK_END); - $this->assertEquals(9, $this->largeFileContent->write('foobarbaz')); - $this->assertEquals( - str_repeat(' ', 100) . 'foobarbaz', - $this->largeFileContent->content() - ); - } - - /** - * @test - */ - public function writeDataAfterLastOffsetIncreasesSize() - { - $this->largeFileContent->seek(0, SEEK_END); - $this->assertEquals(9, $this->largeFileContent->write('foobarbaz')); - $this->assertEquals(109, $this->largeFileContent->size()); - } - - /** - * @test - */ - public function truncateReducesSize() - { - $this->assertTrue($this->largeFileContent->truncate(50)); - $this->assertEquals(50, $this->largeFileContent->size()); - } - - /** - * @test - */ - public function truncateRemovesWrittenContentAfterOffset() - { - $this->largeFileContent->seek(45, SEEK_SET); - $this->largeFileContent->write('foobarbaz'); - $this->assertTrue($this->largeFileContent->truncate(50)); - $this->assertEquals( - str_repeat(' ', 45) . 'fooba', - $this->largeFileContent->content() - ); - } - - /** - * @test - */ - public function createInstanceWithKilobytes() - { - $this->assertEquals( - 100 * 1024, - LargeFileContent::withKilobytes(100) - ->size() - ); - } - - /** - * @test - */ - public function createInstanceWithMegabytes() - { - $this->assertEquals( - 100 * 1024 * 1024, - LargeFileContent::withMegabytes(100) - ->size() - ); - } - - /** - * @test - */ - public function createInstanceWithGigabytes() - { - $this->assertEquals( - 100 * 1024 * 1024 * 1024, - LargeFileContent::withGigabytes(100) - ->size() - ); - } -} diff --git a/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/content/StringBasedFileContentTestCase.php b/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/content/StringBasedFileContentTestCase.php deleted file mode 100644 index d0e15ed..0000000 --- a/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/content/StringBasedFileContentTestCase.php +++ /dev/null @@ -1,230 +0,0 @@ -stringBasedFileContent = new StringBasedFileContent('foobarbaz'); - } - - /** - * @test - */ - public function hasContentOriginallySet() - { - $this->assertEquals('foobarbaz', $this->stringBasedFileContent->content()); - } - - /** - * @test - */ - public function hasNotReachedEofAfterCreation() - { - $this->assertFalse($this->stringBasedFileContent->eof()); - } - - /** - * @test - */ - public function sizeEqualsLengthOfGivenString() - { - $this->assertEquals(9, $this->stringBasedFileContent->size()); - } - - /** - * @test - */ - public function readReturnsSubstringWithRequestedLength() - { - $this->assertEquals('foo', $this->stringBasedFileContent->read(3)); - } - - /** - * @test - */ - public function readMovesOffset() - { - $this->assertEquals('foo', $this->stringBasedFileContent->read(3)); - $this->assertEquals('bar', $this->stringBasedFileContent->read(3)); - $this->assertEquals('baz', $this->stringBasedFileContent->read(3)); - } - - /** - * @test - */ - public function reaMoreThanSizeReturnsWholeContent() - { - $this->assertEquals('foobarbaz', $this->stringBasedFileContent->read(10)); - } - - /** - * @test - */ - public function readAfterEndReturnsEmptyString() - { - $this->stringBasedFileContent->read(9); - $this->assertEquals('', $this->stringBasedFileContent->read(3)); - } - - /** - * @test - */ - public function readDoesNotChangeSize() - { - $this->stringBasedFileContent->read(3); - $this->assertEquals(9, $this->stringBasedFileContent->size()); - } - - /** - * @test - */ - public function readLessThenSizeDoesNotReachEof() - { - $this->stringBasedFileContent->read(3); - $this->assertFalse($this->stringBasedFileContent->eof()); - } - - /** - * @test - */ - public function readSizeReachesEof() - { - $this->stringBasedFileContent->read(9); - $this->assertTrue($this->stringBasedFileContent->eof()); - } - - /** - * @test - */ - public function readMoreThanSizeReachesEof() - { - $this->stringBasedFileContent->read(10); - $this->assertTrue($this->stringBasedFileContent->eof()); - } - - /** - * @test - */ - public function seekWithInvalidOptionReturnsFalse() - { - $this->assertFalse($this->stringBasedFileContent->seek(0, 55)); - } - - /** - * @test - */ - public function canSeekToGivenOffset() - { - $this->assertTrue($this->stringBasedFileContent->seek(5, SEEK_SET)); - $this->assertEquals('rbaz', $this->stringBasedFileContent->read(10)); - } - - /** - * @test - */ - public function canSeekFromCurrentOffset() - { - $this->assertTrue($this->stringBasedFileContent->seek(5, SEEK_SET)); - $this->assertTrue($this->stringBasedFileContent->seek(2, SEEK_CUR)); - $this->assertEquals('az', $this->stringBasedFileContent->read(10)); - } - - /** - * @test - */ - public function canSeekToEnd() - { - $this->assertTrue($this->stringBasedFileContent->seek(0, SEEK_END)); - $this->assertEquals('', $this->stringBasedFileContent->read(10)); - } - - /** - * @test - */ - public function writeOverwritesExistingContentWhenOffsetNotAtEof() - { - $this->assertEquals(3, $this->stringBasedFileContent->write('bar')); - $this->assertEquals('barbarbaz', $this->stringBasedFileContent->content()); - } - - /** - * @test - */ - public function writeAppendsContentWhenOffsetAtEof() - { - $this->assertTrue($this->stringBasedFileContent->seek(0, SEEK_END)); - $this->assertEquals(3, $this->stringBasedFileContent->write('bar')); - $this->assertEquals('foobarbazbar', $this->stringBasedFileContent->content()); - } - - /** - * @test - * @group issue_33 - * @since 1.1.0 - */ - public function truncateRemovesSuperflouosContent() - { - $this->assertTrue($this->stringBasedFileContent->truncate(6)); - $this->assertEquals('foobar', $this->stringBasedFileContent->content()); - } - - /** - * @test - * @group issue_33 - * @since 1.1.0 - */ - public function truncateDecreasesSize() - { - $this->assertTrue($this->stringBasedFileContent->truncate(6)); - $this->assertEquals(6, $this->stringBasedFileContent->size()); - } - - /** - * @test - * @group issue_33 - * @since 1.1.0 - */ - public function truncateToGreaterSizeAddsZeroBytes() - { - $this->assertTrue($this->stringBasedFileContent->truncate(25)); - $this->assertEquals( - "foobarbaz\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", - $this->stringBasedFileContent->content() - ); - } - - /** - * @test - * @group issue_33 - * @since 1.1.0 - */ - public function truncateToGreaterSizeIncreasesSize() - { - $this->assertTrue($this->stringBasedFileContent->truncate(25)); - $this->assertEquals(25, $this->stringBasedFileContent->size()); - } -} diff --git a/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/proxy/vfsStreamWrapperRecordingProxy.php b/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/proxy/vfsStreamWrapperRecordingProxy.php deleted file mode 100644 index 899931d..0000000 --- a/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/proxy/vfsStreamWrapperRecordingProxy.php +++ /dev/null @@ -1,326 +0,0 @@ - - */ - public static function getMethodCalls($path) - { - if (isset(self::$calledMethods[$path]) === true) { - return self::$calledMethods[$path]; - } - - return array(); - } - - /** - * helper method for setting up vfsStream with the proxy - * - * @param string $rootDirName optional name of root directory - * @param int $permissions optional file permissions of root directory - * @return vfsStreamDirectory - * @throws vfsStreamException - */ - public static function setup($rootDirName = 'root', $permissions = null) - { - self::$root = vfsStream::newDirectory($rootDirName, $permissions); - if (true === self::$registered) { - return self::$root; - } - - if (@stream_wrapper_register(vfsStream::SCHEME, __CLASS__) === false) { - throw new vfsStreamException('A handler has already been registered for the ' . vfsStream::SCHEME . ' protocol.'); - } - - self::$registered = true; - return self::$root; - } - - /** - * open the stream - * - * @param string $path the path to open - * @param string $mode mode for opening - * @param string $options options for opening - * @param string $opened_path full path that was actually opened - * @return bool - */ - public function stream_open($path, $mode, $options, $opened_path) - { - $this->path = $path; - self::recordMethodCall('stream_open', $this->path); - return parent::stream_open($path, $mode, $options, $opened_path); - } - - /** - * closes the stream - */ - public function stream_close() - { - self::recordMethodCall('stream_close', $this->path); - return parent::stream_close(); - } - - /** - * read the stream up to $count bytes - * - * @param int $count amount of bytes to read - * @return string - */ - public function stream_read($count) - { - self::recordMethodCall('stream_read', $this->path); - return parent::stream_read($count); - } - - /** - * writes data into the stream - * - * @param string $data - * @return int amount of bytes written - */ - public function stream_write($data) - { - self::recordMethodCall('stream_write', $this->path); - return parent::stream_write($data); - } - - /** - * checks whether stream is at end of file - * - * @return bool - */ - public function stream_eof() - { - self::recordMethodCall('stream_eof', $this->path); - return parent::stream_eof(); - } - - /** - * returns the current position of the stream - * - * @return int - */ - public function stream_tell() - { - self::recordMethodCall('stream_tell', $this->path); - return parent::stream_tell(); - } - - /** - * seeks to the given offset - * - * @param int $offset - * @param int $whence - * @return bool - */ - public function stream_seek($offset, $whence) - { - self::recordMethodCall('stream_seek', $this->path); - return parent::stream_seek($offset, $whence); - } - - /** - * flushes unstored data into storage - * - * @return bool - */ - public function stream_flush() - { - self::recordMethodCall('stream_flush', $this->path); - return parent::stream_flush(); - } - - /** - * returns status of stream - * - * @return array - */ - public function stream_stat() - { - self::recordMethodCall('stream_stat', $this->path); - return parent::stream_stat(); - } - - /** - * retrieve the underlaying resource - * - * @param int $cast_as - * @return bool - */ - public function stream_cast($cast_as) - { - self::recordMethodCall('stream_cast', $this->path); - return parent::stream_cast($cast_as); - } - - /** - * set lock status for stream - * - * @param int $operation - * @return bool - */ - public function stream_lock($operation) - { - self::recordMethodCall('stream_link', $this->path); - return parent::stream_lock($operation); - } - - /** - * remove the data under the given path - * - * @param string $path - * @return bool - */ - public function unlink($path) - { - self::recordMethodCall('unlink', $path); - return parent::unlink($path); - } - - /** - * rename from one path to another - * - * @param string $path_from - * @param string $path_to - * @return bool - */ - public function rename($path_from, $path_to) - { - self::recordMethodCall('rename', $path_from); - return parent::rename($path_from, $path_to); - } - - /** - * creates a new directory - * - * @param string $path - * @param int $mode - * @param int $options - * @return bool - */ - public function mkdir($path, $mode, $options) - { - self::recordMethodCall('mkdir', $path); - return parent::mkdir($path, $mode, $options); - } - - /** - * removes a directory - * - * @param string $path - * @param int $options - * @return bool - */ - public function rmdir($path, $options) - { - self::recordMethodCall('rmdir', $path); - return parent::rmdir($path, $options); - } - - /** - * opens a directory - * - * @param string $path - * @param int $options - * @return bool - */ - public function dir_opendir($path, $options) - { - $this->path = $path; - self::recordMethodCall('dir_opendir', $this->path); - return parent::dir_opendir($path, $options); - } - - /** - * reads directory contents - * - * @return string - */ - public function dir_readdir() - { - self::recordMethodCall('dir_readdir', $this->path); - return parent::dir_readdir(); - } - - /** - * reset directory iteration - * - * @return bool - */ - public function dir_rewinddir() - { - self::recordMethodCall('dir_rewinddir', $this->path); - return parent::dir_rewinddir(); - } - - /** - * closes directory - * - * @return bool - */ - public function dir_closedir() - { - self::recordMethodCall('dir_closedir', $this->path); - return parent::dir_closedir(); - } - - /** - * returns status of url - * - * @param string $path path of url to return status for - * @param int $flags flags set by the stream API - * @return array - */ - public function url_stat($path, $flags) - { - self::recordMethodCall('url_stat', $path); - return parent::url_stat($path, $flags); - } -} -?> \ No newline at end of file diff --git a/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamAbstractContentTestCase.php b/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamAbstractContentTestCase.php deleted file mode 100644 index 9bb6079..0000000 --- a/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamAbstractContentTestCase.php +++ /dev/null @@ -1,1054 +0,0 @@ -assertFalse($abstractContent->isReadable(vfsStream::getCurrentUser(), - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isReadable(-1, - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isReadable(-1, - -1 - ) - ); - $this->assertFalse($abstractContent->isWritable(vfsStream::getCurrentUser(), - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isWritable(-1, - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isWritable(-1, - -1 - ) - ); - $this->assertFalse($abstractContent->isExecutable(vfsStream::getCurrentUser(), - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isExecutable(-1, - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isExecutable(-1, - -1 - ) - ); - } - - /** - * @test - * @group permissions - * @group bug_15 - */ - public function executePermissionsForUser() - { - $abstractContent = new TestvfsStreamAbstractContent('foo', 0100); - $this->assertFalse($abstractContent->isReadable(vfsStream::getCurrentUser(), - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isReadable(-1, - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isReadable(-1, - -1 - ) - ); - $this->assertFalse($abstractContent->isWritable(vfsStream::getCurrentUser(), - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isWritable(-1, - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isWritable(-1, - -1 - ) - ); - $this->assertTrue($abstractContent->isExecutable(vfsStream::getCurrentUser(), - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isExecutable(-1, - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isExecutable(-1, - -1 - ) - ); - } - - /** - * @test - * @group permissions - * @group bug_15 - */ - public function executePermissionsForGroup() - { - $abstractContent = new TestvfsStreamAbstractContent('foo', 0010); - $this->assertFalse($abstractContent->isReadable(vfsStream::getCurrentUser(), - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isReadable(-1, - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isReadable(-1, - -1 - ) - ); - $this->assertFalse($abstractContent->isWritable(vfsStream::getCurrentUser(), - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isWritable(-1, - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isWritable(-1, - -1 - ) - ); - $this->assertFalse($abstractContent->isExecutable(vfsStream::getCurrentUser(), - vfsStream::getCurrentGroup() - ) - ); - $this->assertTrue($abstractContent->isExecutable(-1, - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isExecutable(-1, - -1 - ) - ); - } - - /** - * @test - * @group permissions - * @group bug_15 - */ - public function executePermissionsForOther() - { - $abstractContent = new TestvfsStreamAbstractContent('foo', 0001); - $this->assertFalse($abstractContent->isReadable(vfsStream::getCurrentUser(), - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isReadable(-1, - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isReadable(-1, - -1 - ) - ); - $this->assertFalse($abstractContent->isWritable(vfsStream::getCurrentUser(), - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isWritable(-1, - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isWritable(-1, - -1 - ) - ); - $this->assertFalse($abstractContent->isExecutable(vfsStream::getCurrentUser(), - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isExecutable(-1, - vfsStream::getCurrentGroup() - ) - ); - $this->assertTrue($abstractContent->isExecutable(-1, - -1 - ) - ); - } - - /** - * @test - * @group permissions - * @group bug_15 - */ - public function writePermissionsForUser() - { - $abstractContent = new TestvfsStreamAbstractContent('foo', 0200); - $this->assertFalse($abstractContent->isReadable(vfsStream::getCurrentUser(), - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isReadable(-1, - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isReadable(-1, - -1 - ) - ); - $this->assertTrue($abstractContent->isWritable(vfsStream::getCurrentUser(), - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isWritable(-1, - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isWritable(-1, - -1 - ) - ); - $this->assertFalse($abstractContent->isExecutable(vfsStream::getCurrentUser(), - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isExecutable(-1, - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isExecutable(-1, - -1 - ) - ); - } - - /** - * @test - * @group permissions - * @group bug_15 - */ - public function writePermissionsForGroup() - { - $abstractContent = new TestvfsStreamAbstractContent('foo', 0020); - $this->assertFalse($abstractContent->isReadable(vfsStream::getCurrentUser(), - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isReadable(-1, - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isReadable(-1, - -1 - ) - ); - $this->assertFalse($abstractContent->isWritable(vfsStream::getCurrentUser(), - vfsStream::getCurrentGroup() - ) - ); - $this->assertTrue($abstractContent->isWritable(-1, - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isWritable(-1, - -1 - ) - ); - $this->assertFalse($abstractContent->isExecutable(vfsStream::getCurrentUser(), - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isExecutable(-1, - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isExecutable(-1, - -1 - ) - ); - } - - /** - * @test - * @group permissions - * @group bug_15 - */ - public function writePermissionsForOther() - { - $abstractContent = new TestvfsStreamAbstractContent('foo', 0002); - $this->assertFalse($abstractContent->isReadable(vfsStream::getCurrentUser(), - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isReadable(-1, - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isReadable(-1, - -1 - ) - ); - $this->assertFalse($abstractContent->isWritable(vfsStream::getCurrentUser(), - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isWritable(-1, - vfsStream::getCurrentGroup() - ) - ); - $this->assertTrue($abstractContent->isWritable(-1, - -1 - ) - ); - $this->assertFalse($abstractContent->isExecutable(vfsStream::getCurrentUser(), - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isExecutable(-1, - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isExecutable(-1, - -1 - ) - ); - } - - /** - * @test - * @group permissions - * @group bug_15 - */ - public function executeAndWritePermissionsForUser() - { - $abstractContent = new TestvfsStreamAbstractContent('foo', 0300); - $this->assertFalse($abstractContent->isReadable(vfsStream::getCurrentUser(), - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isReadable(-1, - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isReadable(-1, - -1 - ) - ); - $this->assertTrue($abstractContent->isWritable(vfsStream::getCurrentUser(), - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isWritable(-1, - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isWritable(-1, - -1 - ) - ); - $this->assertTrue($abstractContent->isExecutable(vfsStream::getCurrentUser(), - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isExecutable(-1, - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isExecutable(-1, - -1 - ) - ); - } - - /** - * @test - * @group permissions - * @group bug_15 - */ - public function executeAndWritePermissionsForGroup() - { - $abstractContent = new TestvfsStreamAbstractContent('foo', 0030); - $this->assertFalse($abstractContent->isReadable(vfsStream::getCurrentUser(), - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isReadable(-1, - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isReadable(-1, - -1 - ) - ); - $this->assertFalse($abstractContent->isWritable(vfsStream::getCurrentUser(), - vfsStream::getCurrentGroup() - ) - ); - $this->assertTrue($abstractContent->isWritable(-1, - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isWritable(-1, - -1 - ) - ); - $this->assertFalse($abstractContent->isExecutable(vfsStream::getCurrentUser(), - vfsStream::getCurrentGroup() - ) - ); - $this->assertTrue($abstractContent->isExecutable(-1, - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isExecutable(-1, - -1 - ) - ); - } - - /** - * @test - * @group permissions - * @group bug_15 - */ - public function executeAndWritePermissionsForOther() - { - $abstractContent = new TestvfsStreamAbstractContent('foo', 0003); - $this->assertFalse($abstractContent->isReadable(vfsStream::getCurrentUser(), - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isReadable(-1, - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isReadable(-1, - -1 - ) - ); - $this->assertFalse($abstractContent->isWritable(vfsStream::getCurrentUser(), - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isWritable(-1, - vfsStream::getCurrentGroup() - ) - ); - $this->assertTrue($abstractContent->isWritable(-1, - -1 - ) - ); - $this->assertFalse($abstractContent->isExecutable(vfsStream::getCurrentUser(), - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isExecutable(-1, - vfsStream::getCurrentGroup() - ) - ); - $this->assertTrue($abstractContent->isExecutable(-1, - -1 - ) - ); - } - - /** - * @test - * @group permissions - * @group bug_15 - */ - public function readPermissionsForUser() - { - $abstractContent = new TestvfsStreamAbstractContent('foo', 0400); - $this->assertTrue($abstractContent->isReadable(vfsStream::getCurrentUser(), - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isReadable(-1, - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isReadable(-1, - -1 - ) - ); - $this->assertFalse($abstractContent->isWritable(vfsStream::getCurrentUser(), - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isWritable(-1, - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isWritable(-1, - -1 - ) - ); - $this->assertFalse($abstractContent->isExecutable(vfsStream::getCurrentUser(), - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isExecutable(-1, - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isExecutable(-1, - -1 - ) - ); - } - - /** - * @test - * @group permissions - * @group bug_15 - */ - public function readPermissionsForGroup() - { - $abstractContent = new TestvfsStreamAbstractContent('foo', 0040); - $this->assertFalse($abstractContent->isReadable(vfsStream::getCurrentUser(), - vfsStream::getCurrentGroup() - ) - ); - $this->assertTrue($abstractContent->isReadable(-1, - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isReadable(-1, - -1 - ) - ); - $this->assertFalse($abstractContent->isWritable(vfsStream::getCurrentUser(), - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isWritable(-1, - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isWritable(-1, - -1 - ) - ); - $this->assertFalse($abstractContent->isExecutable(vfsStream::getCurrentUser(), - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isExecutable(-1, - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isExecutable(-1, - -1 - ) - ); - } - - /** - * @test - * @group permissions - * @group bug_15 - */ - public function readPermissionsForOther() - { - $abstractContent = new TestvfsStreamAbstractContent('foo', 0004); - $this->assertFalse($abstractContent->isReadable(vfsStream::getCurrentUser(), - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isReadable(-1, - vfsStream::getCurrentGroup() - ) - ); - $this->assertTrue($abstractContent->isReadable(-1, - -1 - ) - ); - $this->assertFalse($abstractContent->isWritable(vfsStream::getCurrentUser(), - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isWritable(-1, - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isWritable(-1, - -1 - ) - ); - $this->assertFalse($abstractContent->isExecutable(vfsStream::getCurrentUser(), - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isExecutable(-1, - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isExecutable(-1, - -1 - ) - ); - } - - /** - * @test - * @group permissions - * @group bug_15 - */ - public function readAndExecutePermissionsForUser() - { - $abstractContent = new TestvfsStreamAbstractContent('foo', 0500); - $this->assertTrue($abstractContent->isReadable(vfsStream::getCurrentUser(), - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isReadable(-1, - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isReadable(-1, - -1 - ) - ); - $this->assertFalse($abstractContent->isWritable(vfsStream::getCurrentUser(), - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isWritable(-1, - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isWritable(-1, - -1 - ) - ); - $this->assertTrue($abstractContent->isExecutable(vfsStream::getCurrentUser(), - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isExecutable(-1, - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isExecutable(-1, - -1 - ) - ); - } - - /** - * @test - * @group permissions - * @group bug_15 - */ - public function readAndExecutePermissionsForGroup() - { - $abstractContent = new TestvfsStreamAbstractContent('foo', 0050); - $this->assertFalse($abstractContent->isReadable(vfsStream::getCurrentUser(), - vfsStream::getCurrentGroup() - ) - ); - $this->assertTrue($abstractContent->isReadable(-1, - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isReadable(-1, - -1 - ) - ); - $this->assertFalse($abstractContent->isWritable(vfsStream::getCurrentUser(), - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isWritable(-1, - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isWritable(-1, - -1 - ) - ); - $this->assertFalse($abstractContent->isExecutable(vfsStream::getCurrentUser(), - vfsStream::getCurrentGroup() - ) - ); - $this->assertTrue($abstractContent->isExecutable(-1, - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isExecutable(-1, - -1 - ) - ); - } - - /** - * @test - * @group permissions - * @group bug_15 - */ - public function readAndExecutePermissionsForOther() - { - $abstractContent = new TestvfsStreamAbstractContent('foo', 0005); - $this->assertFalse($abstractContent->isReadable(vfsStream::getCurrentUser(), - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isReadable(-1, - vfsStream::getCurrentGroup() - ) - ); - $this->assertTrue($abstractContent->isReadable(-1, - -1 - ) - ); - $this->assertFalse($abstractContent->isWritable(vfsStream::getCurrentUser(), - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isWritable(-1, - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isWritable(-1, - -1 - ) - ); - $this->assertFalse($abstractContent->isExecutable(vfsStream::getCurrentUser(), - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isExecutable(-1, - vfsStream::getCurrentGroup() - ) - ); - $this->assertTrue($abstractContent->isExecutable(-1, - -1 - ) - ); - } - - /** - * @test - * @group permissions - * @group bug_15 - */ - public function readAndWritePermissionsForUser() - { - $abstractContent = new TestvfsStreamAbstractContent('foo', 0600); - $this->assertTrue($abstractContent->isReadable(vfsStream::getCurrentUser(), - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isReadable(-1, - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isReadable(-1, - -1 - ) - ); - $this->assertTrue($abstractContent->isWritable(vfsStream::getCurrentUser(), - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isWritable(-1, - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isWritable(-1, - -1 - ) - ); - $this->assertFalse($abstractContent->isExecutable(vfsStream::getCurrentUser(), - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isExecutable(-1, - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isExecutable(-1, - -1 - ) - ); - } - - /** - * @test - * @group permissions - * @group bug_15 - */ - public function readAndWritePermissionsForGroup() - { - $abstractContent = new TestvfsStreamAbstractContent('foo', 0060); - $this->assertFalse($abstractContent->isReadable(vfsStream::getCurrentUser(), - vfsStream::getCurrentGroup() - ) - ); - $this->assertTrue($abstractContent->isReadable(-1, - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isReadable(-1, - -1 - ) - ); - $this->assertFalse($abstractContent->isWritable(vfsStream::getCurrentUser(), - vfsStream::getCurrentGroup() - ) - ); - $this->assertTrue($abstractContent->isWritable(-1, - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isWritable(-1, - -1 - ) - ); - $this->assertFalse($abstractContent->isExecutable(vfsStream::getCurrentUser(), - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isExecutable(-1, - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isExecutable(-1, - -1 - ) - ); - } - - /** - * @test - * @group permissions - * @group bug_15 - */ - public function readAndWritePermissionsForOther() - { - $abstractContent = new TestvfsStreamAbstractContent('foo', 0006); - $this->assertFalse($abstractContent->isReadable(vfsStream::getCurrentUser(), - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isReadable(-1, - vfsStream::getCurrentGroup() - ) - ); - $this->assertTrue($abstractContent->isReadable(-1, - -1 - ) - ); - $this->assertFalse($abstractContent->isWritable(vfsStream::getCurrentUser(), - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isWritable(-1, - vfsStream::getCurrentGroup() - ) - ); - $this->assertTrue($abstractContent->isWritable(-1, - -1 - ) - ); - $this->assertFalse($abstractContent->isExecutable(vfsStream::getCurrentUser(), - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isExecutable(-1, - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isExecutable(-1, - -1 - ) - ); - } - - /** - * @test - * @group permissions - * @group bug_15 - */ - public function allPermissionsForUser() - { - $abstractContent = new TestvfsStreamAbstractContent('foo', 0700); - $this->assertTrue($abstractContent->isReadable(vfsStream::getCurrentUser(), - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isReadable(-1, - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isReadable(-1, - -1 - ) - ); - $this->assertTrue($abstractContent->isWritable(vfsStream::getCurrentUser(), - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isWritable(-1, - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isWritable(-1, - -1 - ) - ); - $this->assertTrue($abstractContent->isExecutable(vfsStream::getCurrentUser(), - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isExecutable(-1, - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isExecutable(-1, - -1 - ) - ); - } - - /** - * @test - * @group permissions - * @group bug_15 - */ - public function allPermissionsForGroup() - { - $abstractContent = new TestvfsStreamAbstractContent('foo', 0070); - $this->assertFalse($abstractContent->isReadable(vfsStream::getCurrentUser(), - vfsStream::getCurrentGroup() - ) - ); - $this->assertTrue($abstractContent->isReadable(-1, - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isReadable(-1, - -1 - ) - ); - $this->assertFalse($abstractContent->isWritable(vfsStream::getCurrentUser(), - vfsStream::getCurrentGroup() - ) - ); - $this->assertTrue($abstractContent->isWritable(-1, - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isWritable(-1, - -1 - ) - ); - $this->assertFalse($abstractContent->isExecutable(vfsStream::getCurrentUser(), - vfsStream::getCurrentGroup() - ) - ); - $this->assertTrue($abstractContent->isExecutable(-1, - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isExecutable(-1, - -1 - ) - ); - } - - /** - * @test - * @group permissions - * @group bug_15 - */ - public function allPermissionsForOther() - { - $abstractContent = new TestvfsStreamAbstractContent('foo', 0007); - $this->assertFalse($abstractContent->isReadable(vfsStream::getCurrentUser(), - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isReadable(-1, - vfsStream::getCurrentGroup() - ) - ); - $this->assertTrue($abstractContent->isReadable(-1, - -1 - ) - ); - $this->assertFalse($abstractContent->isWritable(vfsStream::getCurrentUser(), - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isWritable(-1, - vfsStream::getCurrentGroup() - ) - ); - $this->assertTrue($abstractContent->isWritable(-1, - -1 - ) - ); - $this->assertFalse($abstractContent->isExecutable(vfsStream::getCurrentUser(), - vfsStream::getCurrentGroup() - ) - ); - $this->assertFalse($abstractContent->isExecutable(-1, - vfsStream::getCurrentGroup() - ) - ); - $this->assertTrue($abstractContent->isExecutable(-1, - -1 - ) - ); - } -} -?> \ No newline at end of file diff --git a/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamBlockTestCase.php b/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamBlockTestCase.php deleted file mode 100644 index 33222f7..0000000 --- a/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamBlockTestCase.php +++ /dev/null @@ -1,89 +0,0 @@ -block = new vfsStreamBlock('foo'); - } - - /** - * test default values and methods - * - * @test - */ - public function defaultValues() - { - $this->assertEquals(vfsStreamContent::TYPE_BLOCK, $this->block->getType()); - $this->assertEquals('foo', $this->block->getName()); - $this->assertTrue($this->block->appliesTo('foo')); - $this->assertFalse($this->block->appliesTo('foo/bar')); - $this->assertFalse($this->block->appliesTo('bar')); - } - - /** - * tests how external functions see this object - * - * @test - */ - public function external() - { - $root = vfsStream::setup('root'); - $root->addChild(vfsStream::newBlock('foo')); - $this->assertEquals('block', filetype(vfsStream::url('root/foo'))); - } - - /** - * tests adding a complex structure - * - * @test - */ - public function addStructure() - { - $structure = array( - 'topLevel' => array( - 'thisIsAFile' => 'file contents', - '[blockDevice]' => 'block contents' - ) - ); - - $root = vfsStream::create($structure); - - $this->assertSame('block', filetype(vfsStream::url('root/topLevel/blockDevice'))); - } - - /** - * tests that a blank name for a block device throws an exception - * @test - * @expectedException org\bovigo\vfs\vfsStreamException - */ - public function createWithEmptyName() - { - $structure = array( - 'topLevel' => array( - 'thisIsAFile' => 'file contents', - '[]' => 'block contents' - ) - ); - - $root = vfsStream::create($structure); - } -} diff --git a/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamContainerIteratorTestCase.php b/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamContainerIteratorTestCase.php deleted file mode 100644 index e1b4fe1..0000000 --- a/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamContainerIteratorTestCase.php +++ /dev/null @@ -1,112 +0,0 @@ -dir = new vfsStreamDirectory('foo'); - $this->mockChild1 = $this->getMock('org\\bovigo\\vfs\\vfsStreamContent'); - $this->mockChild1->expects($this->any()) - ->method('getName') - ->will($this->returnValue('bar')); - $this->dir->addChild($this->mockChild1); - $this->mockChild2 = $this->getMock('org\\bovigo\\vfs\\vfsStreamContent'); - $this->mockChild2->expects($this->any()) - ->method('getName') - ->will($this->returnValue('baz')); - $this->dir->addChild($this->mockChild2); - } - - /** - * clean up test environment - */ - public function tearDown() - { - vfsStream::enableDotfiles(); - } - - /** - * @return array - */ - public function provideSwitchWithExpectations() - { - return array(array(function() { vfsStream::disableDotfiles(); }, - array() - ), - array(function() { vfsStream::enableDotfiles(); }, - array('.', '..') - ) - ); - } - - private function getDirName($dir) - { - if (is_string($dir)) { - return $dir; - } - - - return $dir->getName(); - } - - /** - * @param \Closure $dotFilesSwitch - * @param array $dirNames - * @test - * @dataProvider provideSwitchWithExpectations - */ - public function iteration(\Closure $dotFilesSwitch, array $dirs) - { - $dirs[] = $this->mockChild1; - $dirs[] = $this->mockChild2; - $dotFilesSwitch(); - $dirIterator = $this->dir->getIterator(); - foreach ($dirs as $dir) { - $this->assertEquals($this->getDirName($dir), $dirIterator->key()); - $this->assertTrue($dirIterator->valid()); - if (!is_string($dir)) { - $this->assertSame($dir, $dirIterator->current()); - } - - $dirIterator->next(); - } - - $this->assertFalse($dirIterator->valid()); - $this->assertNull($dirIterator->key()); - $this->assertNull($dirIterator->current()); - } -} -?> \ No newline at end of file diff --git a/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamDirectoryIssue18TestCase.php b/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamDirectoryIssue18TestCase.php deleted file mode 100644 index 89cde1c..0000000 --- a/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamDirectoryIssue18TestCase.php +++ /dev/null @@ -1,81 +0,0 @@ -rootDirectory = vfsStream::newDirectory('/'); - $this->rootDirectory->addChild(vfsStream::newDirectory('var/log/app')); - $dir = $this->rootDirectory->getChild('var/log/app'); - $dir->addChild(vfsStream::newDirectory('app1')); - $dir->addChild(vfsStream::newDirectory('app2')); - $dir->addChild(vfsStream::newDirectory('foo')); - } - - /** - * @test - */ - public function shouldContainThreeSubdirectories() - { - $this->assertEquals(3, - count($this->rootDirectory->getChild('var/log/app')->getChildren()) - ); - } - - /** - * @test - */ - public function shouldContainSubdirectoryFoo() - { - $this->assertTrue($this->rootDirectory->getChild('var/log/app')->hasChild('foo')); - $this->assertInstanceOf('org\\bovigo\\vfs\\vfsStreamDirectory', - $this->rootDirectory->getChild('var/log/app')->getChild('foo') - ); - } - - /** - * @test - */ - public function shouldContainSubdirectoryApp1() - { - $this->assertTrue($this->rootDirectory->getChild('var/log/app')->hasChild('app1')); - $this->assertInstanceOf('org\\bovigo\\vfs\\vfsStreamDirectory', - $this->rootDirectory->getChild('var/log/app')->getChild('app1') - ); - } - - /** - * @test - */ - public function shouldContainSubdirectoryApp2() - { - $this->assertTrue($this->rootDirectory->getChild('var/log/app')->hasChild('app2')); - $this->assertInstanceOf('org\\bovigo\\vfs\\vfsStreamDirectory', - $this->rootDirectory->getChild('var/log/app')->getChild('app2') - ); - } -} -?> \ No newline at end of file diff --git a/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamDirectoryTestCase.php b/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamDirectoryTestCase.php deleted file mode 100644 index f8b9384..0000000 --- a/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamDirectoryTestCase.php +++ /dev/null @@ -1,335 +0,0 @@ -dir = new vfsStreamDirectory('foo'); - } - - /** - * assure that a directory seperator inside the name throws an exception - * - * @test - * @expectedException org\bovigo\vfs\vfsStreamException - */ - public function invalidCharacterInName() - { - $dir = new vfsStreamDirectory('foo/bar'); - } - - /** - * test default values and methods - * - * @test - */ - public function defaultValues() - { - $this->assertEquals(vfsStreamContent::TYPE_DIR, $this->dir->getType()); - $this->assertEquals('foo', $this->dir->getName()); - $this->assertTrue($this->dir->appliesTo('foo')); - $this->assertTrue($this->dir->appliesTo('foo/bar')); - $this->assertFalse($this->dir->appliesTo('bar')); - $this->assertEquals(array(), $this->dir->getChildren()); - } - - /** - * test renaming the directory - * - * @test - */ - public function rename() - { - $this->dir->rename('bar'); - $this->assertEquals('bar', $this->dir->getName()); - $this->assertFalse($this->dir->appliesTo('foo')); - $this->assertFalse($this->dir->appliesTo('foo/bar')); - $this->assertTrue($this->dir->appliesTo('bar')); - } - - /** - * renaming the directory to an invalid name throws a vfsStreamException - * - * @test - * @expectedException org\bovigo\vfs\vfsStreamException - */ - public function renameToInvalidNameThrowsvfsStreamException() - { - $this->dir->rename('foo/baz'); - } - - /** - * @test - * @since 0.10.0 - */ - public function hasNoChildrenByDefault() - { - $this->assertFalse($this->dir->hasChildren()); - } - - /** - * @test - * @since 0.10.0 - */ - public function hasChildrenReturnsTrueIfAtLeastOneChildPresent() - { - $mockChild = $this->getMock('org\\bovigo\\vfs\\vfsStreamContent'); - $mockChild->expects($this->any()) - ->method('appliesTo') - ->will($this->returnValue(false)); - $mockChild->expects($this->any()) - ->method('getName') - ->will($this->returnValue('baz')); - $this->dir->addChild($mockChild); - $this->assertTrue($this->dir->hasChildren()); - } - - /** - * @test - */ - public function hasChildReturnsFalseForNonExistingChild() - { - $this->assertFalse($this->dir->hasChild('bar')); - } - - /** - * @test - */ - public function getChildReturnsNullForNonExistingChild() - { - $this->assertNull($this->dir->getChild('bar')); - } - - /** - * @test - */ - public function removeChildReturnsFalseForNonExistingChild() - { - $this->assertFalse($this->dir->removeChild('bar')); - } - - /** - * @test - */ - public function nonExistingChild() - { - $mockChild = $this->getMock('org\\bovigo\\vfs\\vfsStreamContent'); - $mockChild->expects($this->any()) - ->method('appliesTo') - ->will($this->returnValue(false)); - $mockChild->expects($this->any()) - ->method('getName') - ->will($this->returnValue('baz')); - $this->dir->addChild($mockChild); - $this->assertFalse($this->dir->removeChild('bar')); - } - - /** - * test that adding, handling and removing of a child works as expected - * - * @test - */ - public function childHandling() - { - $mockChild = $this->getMock('org\\bovigo\\vfs\\vfsStreamContent'); - $mockChild->expects($this->any()) - ->method('getType') - ->will($this->returnValue(vfsStreamContent::TYPE_FILE)); - $mockChild->expects($this->any()) - ->method('getName') - ->will($this->returnValue('bar')); - $mockChild->expects($this->any()) - ->method('appliesTo') - ->with($this->equalTo('bar')) - ->will($this->returnValue(true)); - $mockChild->expects($this->once()) - ->method('size') - ->will($this->returnValue(5)); - $this->dir->addChild($mockChild); - $this->assertTrue($this->dir->hasChild('bar')); - $bar = $this->dir->getChild('bar'); - $this->assertSame($mockChild, $bar); - $this->assertEquals(array($mockChild), $this->dir->getChildren()); - $this->assertEquals(0, $this->dir->size()); - $this->assertEquals(5, $this->dir->sizeSummarized()); - $this->assertTrue($this->dir->removeChild('bar')); - $this->assertEquals(array(), $this->dir->getChildren()); - $this->assertEquals(0, $this->dir->size()); - $this->assertEquals(0, $this->dir->sizeSummarized()); - } - - /** - * test that adding, handling and removing of a child works as expected - * - * @test - */ - public function childHandlingWithSubdirectory() - { - $mockChild = $this->getMock('org\\bovigo\\vfs\\vfsStreamContent'); - $mockChild->expects($this->any()) - ->method('getType') - ->will($this->returnValue(vfsStreamContent::TYPE_FILE)); - $mockChild->expects($this->any()) - ->method('getName') - ->will($this->returnValue('bar')); - $mockChild->expects($this->once()) - ->method('size') - ->will($this->returnValue(5)); - $subdir = new vfsStreamDirectory('subdir'); - $subdir->addChild($mockChild); - $this->dir->addChild($subdir); - $this->assertTrue($this->dir->hasChild('subdir')); - $this->assertSame($subdir, $this->dir->getChild('subdir')); - $this->assertEquals(array($subdir), $this->dir->getChildren()); - $this->assertEquals(0, $this->dir->size()); - $this->assertEquals(5, $this->dir->sizeSummarized()); - $this->assertTrue($this->dir->removeChild('subdir')); - $this->assertEquals(array(), $this->dir->getChildren()); - $this->assertEquals(0, $this->dir->size()); - $this->assertEquals(0, $this->dir->sizeSummarized()); - } - - /** - * dd - * - * @test - * @group regression - * @group bug_5 - */ - public function addChildReplacesChildWithSameName_Bug_5() - { - $mockChild1 = $this->getMock('org\\bovigo\\vfs\\vfsStreamContent'); - $mockChild1->expects($this->any()) - ->method('getType') - ->will($this->returnValue(vfsStreamContent::TYPE_FILE)); - $mockChild1->expects($this->any()) - ->method('getName') - ->will($this->returnValue('bar')); - $mockChild2 = $this->getMock('org\\bovigo\\vfs\\vfsStreamContent'); - $mockChild2->expects($this->any()) - ->method('getType') - ->will($this->returnValue(vfsStreamContent::TYPE_FILE)); - $mockChild2->expects($this->any()) - ->method('getName') - ->will($this->returnValue('bar')); - $this->dir->addChild($mockChild1); - $this->assertTrue($this->dir->hasChild('bar')); - $this->assertSame($mockChild1, $this->dir->getChild('bar')); - $this->dir->addChild($mockChild2); - $this->assertTrue($this->dir->hasChild('bar')); - $this->assertSame($mockChild2, $this->dir->getChild('bar')); - } - - /** - * When testing for a nested path, verify that directory separators are respected properly - * so that subdir1/subdir2 is not considered equal to subdir1Xsubdir2. - * - * @test - * @group bug_24 - * @group regression - */ - public function explicitTestForSeparatorWithNestedPaths_Bug_24() - { - $mockChild = $this->getMock('org\\bovigo\\vfs\\vfsStreamContent'); - $mockChild->expects($this->any()) - ->method('getType') - ->will($this->returnValue(vfsStreamContent::TYPE_FILE)); - $mockChild->expects($this->any()) - ->method('getName') - ->will($this->returnValue('bar')); - - $subdir1 = new vfsStreamDirectory('subdir1'); - $this->dir->addChild($subdir1); - - $subdir2 = new vfsStreamDirectory('subdir2'); - $subdir1->addChild($subdir2); - - $subdir2->addChild($mockChild); - - $this->assertTrue($this->dir->hasChild('subdir1'), "Level 1 path with separator exists"); - $this->assertTrue($this->dir->hasChild('subdir1/subdir2'), "Level 2 path with separator exists"); - $this->assertTrue($this->dir->hasChild('subdir1/subdir2/bar'), "Level 3 path with separator exists"); - $this->assertFalse($this->dir->hasChild('subdir1.subdir2'), "Path with period does not exist"); - $this->assertFalse($this->dir->hasChild('subdir1.subdir2/bar'), "Nested path with period does not exist"); - } - - - /** - * setting and retrieving permissions for a directory - * - * @test - * @group permissions - */ - public function permissions() - { - $this->assertEquals(0777, $this->dir->getPermissions()); - $this->assertSame($this->dir, $this->dir->chmod(0755)); - $this->assertEquals(0755, $this->dir->getPermissions()); - } - - /** - * setting and retrieving permissions for a directory - * - * @test - * @group permissions - */ - public function permissionsSet() - { - $this->dir = new vfsStreamDirectory('foo', 0755); - $this->assertEquals(0755, $this->dir->getPermissions()); - $this->assertSame($this->dir, $this->dir->chmod(0700)); - $this->assertEquals(0700, $this->dir->getPermissions()); - } - - /** - * setting and retrieving owner of a file - * - * @test - * @group permissions - */ - public function owner() - { - $this->assertEquals(vfsStream::getCurrentUser(), $this->dir->getUser()); - $this->assertTrue($this->dir->isOwnedByUser(vfsStream::getCurrentUser())); - $this->assertSame($this->dir, $this->dir->chown(vfsStream::OWNER_USER_1)); - $this->assertEquals(vfsStream::OWNER_USER_1, $this->dir->getUser()); - $this->assertTrue($this->dir->isOwnedByUser(vfsStream::OWNER_USER_1)); - } - - /** - * setting and retrieving owner group of a file - * - * @test - * @group permissions - */ - public function group() - { - $this->assertEquals(vfsStream::getCurrentGroup(), $this->dir->getGroup()); - $this->assertTrue($this->dir->isOwnedByGroup(vfsStream::getCurrentGroup())); - $this->assertSame($this->dir, $this->dir->chgrp(vfsStream::GROUP_USER_1)); - $this->assertEquals(vfsStream::GROUP_USER_1, $this->dir->getGroup()); - $this->assertTrue($this->dir->isOwnedByGroup(vfsStream::GROUP_USER_1)); - } -} -?> \ No newline at end of file diff --git a/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamExLockTestCase.php b/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamExLockTestCase.php deleted file mode 100644 index 9763560..0000000 --- a/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamExLockTestCase.php +++ /dev/null @@ -1,56 +0,0 @@ -at($root); - - } - - /** - * This test verifies the current behaviour where vfsStream URLs do not work - * with file_put_contents() and LOCK_EX. The test is intended to break once - * PHP changes this so we get notified about the change. - * - * @test - */ - public function filePutContentsLockShouldReportError() - { - @file_put_contents(vfsStream::url('root/testfile'), "some string\n", LOCK_EX); - $php_error = error_get_last(); - $this->assertEquals("file_put_contents(): Exclusive locks may only be set for regular files", $php_error['message']); - } - - /** - * @test - */ - public function flockSouldPass() - { - $fp = fopen(vfsStream::url('root/testfile'), 'w'); - flock($fp, LOCK_EX); - fwrite($fp, "another string\n"); - flock($fp, LOCK_UN); - fclose($fp); - $this->assertEquals("another string\n", file_get_contents(vfsStream::url('root/testfile'))); - } -} - diff --git a/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamFileTestCase.php b/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamFileTestCase.php deleted file mode 100644 index 5fe15d0..0000000 --- a/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamFileTestCase.php +++ /dev/null @@ -1,306 +0,0 @@ -file = new vfsStreamFile('foo'); - } - - /** - * test default values and methods - * - * @test - */ - public function defaultValues() - { - $this->assertEquals(vfsStreamContent::TYPE_FILE, $this->file->getType()); - $this->assertEquals('foo', $this->file->getName()); - $this->assertTrue($this->file->appliesTo('foo')); - $this->assertFalse($this->file->appliesTo('foo/bar')); - $this->assertFalse($this->file->appliesTo('bar')); - } - - /** - * test setting and getting the content of a file - * - * @test - */ - public function content() - { - $this->assertNull($this->file->getContent()); - $this->assertSame($this->file, $this->file->setContent('bar')); - $this->assertEquals('bar', $this->file->getContent()); - $this->assertSame($this->file, $this->file->withContent('baz')); - $this->assertEquals('baz', $this->file->getContent()); - } - - /** - * test renaming the directory - * - * @test - */ - public function rename() - { - $this->file->rename('bar'); - $this->assertEquals('bar', $this->file->getName()); - $this->assertFalse($this->file->appliesTo('foo')); - $this->assertFalse($this->file->appliesTo('foo/bar')); - $this->assertTrue($this->file->appliesTo('bar')); - } - - /** - * test reading contents from the file - * - * @test - */ - public function readEmptyFile() - { - $this->assertTrue($this->file->eof()); - $this->assertEquals(0, $this->file->size()); - $this->assertEquals('', $this->file->read(5)); - $this->assertEquals(5, $this->file->getBytesRead()); - $this->assertTrue($this->file->eof()); - } - - /** - * test reading contents from the file - * - * @test - */ - public function read() - { - $this->file->setContent('foobarbaz'); - $this->assertFalse($this->file->eof()); - $this->assertEquals(9, $this->file->size()); - $this->assertEquals('foo', $this->file->read(3)); - $this->assertEquals(3, $this->file->getBytesRead()); - $this->assertFalse($this->file->eof()); - $this->assertEquals(9, $this->file->size()); - $this->assertEquals('bar', $this->file->read(3)); - $this->assertEquals(6, $this->file->getBytesRead()); - $this->assertFalse($this->file->eof()); - $this->assertEquals(9, $this->file->size()); - $this->assertEquals('baz', $this->file->read(3)); - $this->assertEquals(9, $this->file->getBytesRead()); - $this->assertEquals(9, $this->file->size()); - $this->assertTrue($this->file->eof()); - $this->assertEquals('', $this->file->read(3)); - } - - /** - * test seeking to offset - * - * @test - */ - public function seekEmptyFile() - { - $this->assertFalse($this->file->seek(0, 55)); - $this->assertTrue($this->file->seek(0, SEEK_SET)); - $this->assertEquals(0, $this->file->getBytesRead()); - $this->assertTrue($this->file->seek(5, SEEK_SET)); - $this->assertEquals(5, $this->file->getBytesRead()); - $this->assertTrue($this->file->seek(0, SEEK_CUR)); - $this->assertEquals(5, $this->file->getBytesRead()); - $this->assertTrue($this->file->seek(2, SEEK_CUR)); - $this->assertEquals(7, $this->file->getBytesRead()); - $this->assertTrue($this->file->seek(0, SEEK_END)); - $this->assertEquals(0, $this->file->getBytesRead()); - $this->assertTrue($this->file->seek(2, SEEK_END)); - $this->assertEquals(2, $this->file->getBytesRead()); - } - - /** - * test seeking to offset - * - * @test - */ - public function seekRead() - { - $this->file->setContent('foobarbaz'); - $this->assertFalse($this->file->seek(0, 55)); - $this->assertTrue($this->file->seek(0, SEEK_SET)); - $this->assertEquals('foobarbaz', $this->file->readUntilEnd()); - $this->assertEquals(0, $this->file->getBytesRead()); - $this->assertTrue($this->file->seek(5, SEEK_SET)); - $this->assertEquals('rbaz', $this->file->readUntilEnd()); - $this->assertEquals(5, $this->file->getBytesRead()); - $this->assertTrue($this->file->seek(0, SEEK_CUR)); - $this->assertEquals('rbaz', $this->file->readUntilEnd()); - $this->assertEquals(5, $this->file->getBytesRead(), 5); - $this->assertTrue($this->file->seek(2, SEEK_CUR)); - $this->assertEquals('az', $this->file->readUntilEnd()); - $this->assertEquals(7, $this->file->getBytesRead()); - $this->assertTrue($this->file->seek(0, SEEK_END)); - $this->assertEquals('', $this->file->readUntilEnd()); - $this->assertEquals(9, $this->file->getBytesRead()); - $this->assertTrue($this->file->seek(2, SEEK_END)); - $this->assertEquals('', $this->file->readUntilEnd()); - $this->assertEquals(11, $this->file->getBytesRead()); - } - - /** - * test writing data into the file - * - * @test - */ - public function writeEmptyFile() - { - $this->assertEquals(3, $this->file->write('foo')); - $this->assertEquals('foo', $this->file->getContent()); - $this->assertEquals(3, $this->file->size()); - $this->assertEquals(3, $this->file->write('bar')); - $this->assertEquals('foobar', $this->file->getContent()); - $this->assertEquals(6, $this->file->size()); - } - - /** - * test writing data into the file - * - * @test - */ - public function write() - { - $this->file->setContent('foobarbaz'); - $this->assertTrue($this->file->seek(3, SEEK_SET)); - $this->assertEquals(3, $this->file->write('foo')); - $this->assertEquals('foofoobaz', $this->file->getContent()); - $this->assertEquals(9, $this->file->size()); - $this->assertEquals(3, $this->file->write('bar')); - $this->assertEquals('foofoobar', $this->file->getContent()); - $this->assertEquals(9, $this->file->size()); - } - - /** - * setting and retrieving permissions for a file - * - * @test - * @group permissions - */ - public function permissions() - { - $this->assertEquals(0666, $this->file->getPermissions()); - $this->assertSame($this->file, $this->file->chmod(0644)); - $this->assertEquals(0644, $this->file->getPermissions()); - } - - /** - * setting and retrieving permissions for a file - * - * @test - * @group permissions - */ - public function permissionsSet() - { - $this->file = new vfsStreamFile('foo', 0644); - $this->assertEquals(0644, $this->file->getPermissions()); - $this->assertSame($this->file, $this->file->chmod(0600)); - $this->assertEquals(0600, $this->file->getPermissions()); - } - - /** - * setting and retrieving owner of a file - * - * @test - * @group permissions - */ - public function owner() - { - $this->assertEquals(vfsStream::getCurrentUser(), $this->file->getUser()); - $this->assertTrue($this->file->isOwnedByUser(vfsStream::getCurrentUser())); - $this->assertSame($this->file, $this->file->chown(vfsStream::OWNER_USER_1)); - $this->assertEquals(vfsStream::OWNER_USER_1, $this->file->getUser()); - $this->assertTrue($this->file->isOwnedByUser(vfsStream::OWNER_USER_1)); - } - - /** - * setting and retrieving owner group of a file - * - * @test - * @group permissions - */ - public function group() - { - $this->assertEquals(vfsStream::getCurrentGroup(), $this->file->getGroup()); - $this->assertTrue($this->file->isOwnedByGroup(vfsStream::getCurrentGroup())); - $this->assertSame($this->file, $this->file->chgrp(vfsStream::GROUP_USER_1)); - $this->assertEquals(vfsStream::GROUP_USER_1, $this->file->getGroup()); - $this->assertTrue($this->file->isOwnedByGroup(vfsStream::GROUP_USER_1)); - } - - /** - * @test - * @group issue_33 - * @since 1.1.0 - */ - public function truncateRemovesSuperflouosContent() - { - $this->assertEquals(11, $this->file->write("lorem ipsum")); - $this->assertTrue($this->file->truncate(5)); - $this->assertEquals(5, $this->file->size()); - $this->assertEquals('lorem', $this->file->getContent()); - } - - /** - * @test - * @group issue_33 - * @since 1.1.0 - */ - public function truncateToGreaterSizeAddsZeroBytes() - { - $this->assertEquals(11, $this->file->write("lorem ipsum")); - $this->assertTrue($this->file->truncate(25)); - $this->assertEquals(25, $this->file->size()); - $this->assertEquals("lorem ipsum\0\0\0\0\0\0\0\0\0\0\0\0\0\0", $this->file->getContent()); - } - - /** - * @test - * @group issue_79 - * @since 1.3.0 - */ - public function withContentAcceptsAnyFileContentInstance() - { - $mockFileContent = $this->getMock('org\bovigo\vfs\content\FileContent'); - $mockFileContent->expects($this->once()) - ->method('content') - ->will($this->returnValue('foobarbaz')); - $this->assertEquals( - 'foobarbaz', - $this->file->withContent($mockFileContent) - ->getContent() - ); - } - - /** - * @test - * @group issue_79 - * @expectedException \InvalidArgumentException - * @since 1.3.0 - */ - public function withContentThrowsInvalidArgumentExceptionWhenContentIsNoStringAndNoFileContent() - { - $this->file->withContent(313); - } -} diff --git a/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamGlobTestCase.php b/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamGlobTestCase.php deleted file mode 100644 index 24884ed..0000000 --- a/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamGlobTestCase.php +++ /dev/null @@ -1,29 +0,0 @@ -assertEmpty(glob(vfsStream::url('example'), GLOB_MARK)); - } -} -?> \ No newline at end of file diff --git a/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamResolveIncludePathTestCase.php b/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamResolveIncludePathTestCase.php deleted file mode 100644 index 6619505..0000000 --- a/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamResolveIncludePathTestCase.php +++ /dev/null @@ -1,66 +0,0 @@ -markTestSkipped('Requires https://github.com/facebook/hhvm/issues/1476 to be fixed'); - } - - $this->backupIncludePath = get_include_path(); - vfsStream::setup(); - mkdir('vfs://root/a/path', 0777, true); - set_include_path('vfs://root/a' . PATH_SEPARATOR . $this->backupIncludePath); - } - - /** - * clean up test environment - */ - public function tearDown() - { - set_include_path($this->backupIncludePath); - } - - /** - * @test - */ - public function knownFileCanBeResolved() - { - file_put_contents('vfs://root/a/path/knownFile.php', ''); - $this->assertEquals('vfs://root/a/path/knownFile.php', stream_resolve_include_path('path/knownFile.php')); - } - - /** - * @test - */ - public function unknownFileCanNotBeResolvedYieldsFalse() - { - $this->assertFalse(@stream_resolve_include_path('path/unknownFile.php')); - } -} -?> \ No newline at end of file diff --git a/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamTestCase.php b/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamTestCase.php deleted file mode 100644 index c4a76ed..0000000 --- a/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamTestCase.php +++ /dev/null @@ -1,707 +0,0 @@ -assertEquals('vfs://foo', vfsStream::url('foo')); - $this->assertEquals('vfs://foo/bar.baz', vfsStream::url('foo/bar.baz')); - $this->assertEquals('vfs://foo/bar.baz', vfsStream::url('foo\bar.baz')); - } - - /** - * assure that url2path conversion works correct - * - * @test - */ - public function path() - { - $this->assertEquals('foo', vfsStream::path('vfs://foo')); - $this->assertEquals('foo/bar.baz', vfsStream::path('vfs://foo/bar.baz')); - $this->assertEquals('foo/bar.baz', vfsStream::path('vfs://foo\bar.baz')); - } - - /** - * windows directory separators are converted into default separator - * - * @author Gabriel Birke - * @test - */ - public function pathConvertsWindowsDirectorySeparators() - { - $this->assertEquals('foo/bar', vfsStream::path('vfs://foo\\bar')); - } - - /** - * trailing whitespace should be removed - * - * @author Gabriel Birke - * @test - */ - public function pathRemovesTrailingWhitespace() - { - $this->assertEquals('foo/bar', vfsStream::path('vfs://foo/bar ')); - } - - /** - * trailing slashes are removed - * - * @author Gabriel Birke - * @test - */ - public function pathRemovesTrailingSlash() - { - $this->assertEquals('foo/bar', vfsStream::path('vfs://foo/bar/')); - } - - /** - * trailing slash and whitespace should be removed - * - * @author Gabriel Birke - * @test - */ - public function pathRemovesTrailingSlashAndWhitespace() - { - $this->assertEquals('foo/bar', vfsStream::path('vfs://foo/bar/ ')); - } - - /** - * double slashes should be replaced by single slash - * - * @author Gabriel Birke - * @test - */ - public function pathRemovesDoubleSlashes() - { - // Regular path - $this->assertEquals('my/path', vfsStream::path('vfs://my/path')); - // Path with double slashes - $this->assertEquals('my/path', vfsStream::path('vfs://my//path')); - } - - /** - * test to create a new file - * - * @test - */ - public function newFile() - { - $file = vfsStream::newFile('filename.txt'); - $this->assertInstanceOf('org\\bovigo\\vfs\\vfsStreamFile', $file); - $this->assertEquals('filename.txt', $file->getName()); - $this->assertEquals(0666, $file->getPermissions()); - } - - /** - * test to create a new file with non-default permissions - * - * @test - * @group permissions - */ - public function newFileWithDifferentPermissions() - { - $file = vfsStream::newFile('filename.txt', 0644); - $this->assertInstanceOf('org\\bovigo\\vfs\\vfsStreamFile', $file); - $this->assertEquals('filename.txt', $file->getName()); - $this->assertEquals(0644, $file->getPermissions()); - } - - /** - * test to create a new directory structure - * - * @test - */ - public function newSingleDirectory() - { - $foo = vfsStream::newDirectory('foo'); - $this->assertEquals('foo', $foo->getName()); - $this->assertEquals(0, count($foo->getChildren())); - $this->assertEquals(0777, $foo->getPermissions()); - } - - /** - * test to create a new directory structure with non-default permissions - * - * @test - * @group permissions - */ - public function newSingleDirectoryWithDifferentPermissions() - { - $foo = vfsStream::newDirectory('foo', 0755); - $this->assertEquals('foo', $foo->getName()); - $this->assertEquals(0, count($foo->getChildren())); - $this->assertEquals(0755, $foo->getPermissions()); - } - - /** - * test to create a new directory structure - * - * @test - */ - public function newDirectoryStructure() - { - $foo = vfsStream::newDirectory('foo/bar/baz'); - $this->assertEquals('foo', $foo->getName()); - $this->assertEquals(0777, $foo->getPermissions()); - $this->assertTrue($foo->hasChild('bar')); - $this->assertTrue($foo->hasChild('bar/baz')); - $this->assertFalse($foo->hasChild('baz')); - $bar = $foo->getChild('bar'); - $this->assertEquals('bar', $bar->getName()); - $this->assertEquals(0777, $bar->getPermissions()); - $this->assertTrue($bar->hasChild('baz')); - $baz1 = $bar->getChild('baz'); - $this->assertEquals('baz', $baz1->getName()); - $this->assertEquals(0777, $baz1->getPermissions()); - $baz2 = $foo->getChild('bar/baz'); - $this->assertSame($baz1, $baz2); - } - - /** - * test that correct directory structure is created - * - * @test - */ - public function newDirectoryWithSlashAtStart() - { - $foo = vfsStream::newDirectory('/foo/bar/baz', 0755); - $this->assertEquals('foo', $foo->getName()); - $this->assertEquals(0755, $foo->getPermissions()); - $this->assertTrue($foo->hasChild('bar')); - $this->assertTrue($foo->hasChild('bar/baz')); - $this->assertFalse($foo->hasChild('baz')); - $bar = $foo->getChild('bar'); - $this->assertEquals('bar', $bar->getName()); - $this->assertEquals(0755, $bar->getPermissions()); - $this->assertTrue($bar->hasChild('baz')); - $baz1 = $bar->getChild('baz'); - $this->assertEquals('baz', $baz1->getName()); - $this->assertEquals(0755, $baz1->getPermissions()); - $baz2 = $foo->getChild('bar/baz'); - $this->assertSame($baz1, $baz2); - } - - /** - * @test - * @group setup - * @since 0.7.0 - */ - public function setupRegistersStreamWrapperAndCreatesRootDirectoryWithDefaultNameAndPermissions() - { - $root = vfsStream::setup(); - $this->assertSame($root, vfsStreamWrapper::getRoot()); - $this->assertEquals('root', $root->getName()); - $this->assertEquals(0777, $root->getPermissions()); - } - - /** - * @test - * @group setup - * @since 0.7.0 - */ - public function setupRegistersStreamWrapperAndCreatesRootDirectoryWithGivenNameAndDefaultPermissions() - { - $root = vfsStream::setup('foo'); - $this->assertSame($root, vfsStreamWrapper::getRoot()); - $this->assertEquals('foo', $root->getName()); - $this->assertEquals(0777, $root->getPermissions()); - } - - /** - * @test - * @group setup - * @since 0.7.0 - */ - public function setupRegistersStreamWrapperAndCreatesRootDirectoryWithGivenNameAndPermissions() - { - $root = vfsStream::setup('foo', 0444); - $this->assertSame($root, vfsStreamWrapper::getRoot()); - $this->assertEquals('foo', $root->getName()); - $this->assertEquals(0444, $root->getPermissions()); - } - - /** - * @test - * @group issue_14 - * @group issue_20 - * @since 0.10.0 - */ - public function setupWithEmptyArrayIsEqualToSetup() - { - $root = vfsStream::setup('example', - 0755, - array() - ); - $this->assertEquals('example', $root->getName()); - $this->assertEquals(0755, $root->getPermissions()); - $this->assertFalse($root->hasChildren()); - } - - /** - * @test - * @group issue_14 - * @group issue_20 - * @since 0.10.0 - */ - public function setupArraysAreTurnedIntoSubdirectories() - { - $root = vfsStream::setup('root', - null, - array('test' => array()) - ); - $this->assertTrue($root->hasChildren()); - $this->assertTrue($root->hasChild('test')); - $this->assertInstanceOf('org\\bovigo\\vfs\\vfsStreamDirectory', - $root->getChild('test') - ); - $this->assertFalse($root->getChild('test')->hasChildren()); - } - - /** - * @test - * @group issue_14 - * @group issue_20 - * @since 0.10.0 - */ - public function setupStringsAreTurnedIntoFilesWithContent() - { - $root = vfsStream::setup('root', - null, - array('test.txt' => 'some content') - ); - $this->assertTrue($root->hasChildren()); - $this->assertTrue($root->hasChild('test.txt')); - $this->assertVfsFile($root->getChild('test.txt'), 'some content'); - } - - /** - * @test - * @group issue_14 - * @group issue_20 - * @since 0.10.0 - */ - public function setupWorksRecursively() - { - $root = vfsStream::setup('root', - null, - array('test' => array('foo' => array('test.txt' => 'hello'), - 'baz.txt' => 'world' - ) - ) - ); - $this->assertTrue($root->hasChildren()); - $this->assertTrue($root->hasChild('test')); - $test = $root->getChild('test'); - $this->assertInstanceOf('org\\bovigo\\vfs\\vfsStreamDirectory', $test); - $this->assertTrue($test->hasChildren()); - $this->assertTrue($test->hasChild('baz.txt')); - $this->assertVfsFile($test->getChild('baz.txt'), 'world'); - - $this->assertTrue($test->hasChild('foo')); - $foo = $test->getChild('foo'); - $this->assertInstanceOf('org\\bovigo\\vfs\\vfsStreamDirectory', $foo); - $this->assertTrue($foo->hasChildren()); - $this->assertTrue($foo->hasChild('test.txt')); - $this->assertVfsFile($foo->getChild('test.txt'), 'hello'); - } - - /** - * @test - * @group issue_17 - * @group issue_20 - */ - public function setupCastsNumericDirectoriesToStrings() - { - $root = vfsStream::setup('root', - null, - array(2011 => array ('test.txt' => 'some content')) - ); - $this->assertTrue($root->hasChild('2011')); - - $directory = $root->getChild('2011'); - $this->assertVfsFile($directory->getChild('test.txt'), 'some content'); - - $this->assertTrue(file_exists('vfs://root/2011/test.txt')); - } - - /** - * @test - * @group issue_20 - * @since 0.11.0 - */ - public function createArraysAreTurnedIntoSubdirectories() - { - $baseDir = vfsStream::create(array('test' => array()), new vfsStreamDirectory('baseDir')); - $this->assertTrue($baseDir->hasChildren()); - $this->assertTrue($baseDir->hasChild('test')); - $this->assertInstanceOf('org\\bovigo\\vfs\\vfsStreamDirectory', - $baseDir->getChild('test') - ); - $this->assertFalse($baseDir->getChild('test')->hasChildren()); - } - - /** - * @test - * @group issue_20 - * @since 0.11.0 - */ - public function createArraysAreTurnedIntoSubdirectoriesOfRoot() - { - $root = vfsStream::setup(); - $this->assertSame($root, vfsStream::create(array('test' => array()))); - $this->assertTrue($root->hasChildren()); - $this->assertTrue($root->hasChild('test')); - $this->assertInstanceOf('org\\bovigo\\vfs\\vfsStreamDirectory', - $root->getChild('test') - ); - $this->assertFalse($root->getChild('test')->hasChildren()); - } - - /** - * @test - * @group issue_20 - * @expectedException \InvalidArgumentException - * @since 0.11.0 - */ - public function createThrowsExceptionIfNoBaseDirGivenAndNoRootSet() - { - vfsStream::create(array('test' => array())); - } - - /** - * @test - * @group issue_20 - * @since 0.11.0 - */ - public function createWorksRecursively() - { - $baseDir = vfsStream::create(array('test' => array('foo' => array('test.txt' => 'hello'), - 'baz.txt' => 'world' - ) - ), - new vfsStreamDirectory('baseDir') - ); - $this->assertTrue($baseDir->hasChildren()); - $this->assertTrue($baseDir->hasChild('test')); - $test = $baseDir->getChild('test'); - $this->assertInstanceOf('org\\bovigo\\vfs\\vfsStreamDirectory', $test); - $this->assertTrue($test->hasChildren()); - $this->assertTrue($test->hasChild('baz.txt')); - $this->assertVfsFile($test->getChild('baz.txt'), 'world'); - - $this->assertTrue($test->hasChild('foo')); - $foo = $test->getChild('foo'); - $this->assertInstanceOf('org\\bovigo\\vfs\\vfsStreamDirectory', $foo); - $this->assertTrue($foo->hasChildren()); - $this->assertTrue($foo->hasChild('test.txt')); - $this->assertVfsFile($foo->getChild('test.txt'), 'hello'); - } - - /** - * @test - * @group issue_20 - * @since 0.11.0 - */ - public function createWorksRecursivelyWithRoot() - { - $root = vfsStream::setup(); - $this->assertSame($root, - vfsStream::create(array('test' => array('foo' => array('test.txt' => 'hello'), - 'baz.txt' => 'world' - ) - ) - ) - ); - $this->assertTrue($root->hasChildren()); - $this->assertTrue($root->hasChild('test')); - $test = $root->getChild('test'); - $this->assertInstanceOf('org\\bovigo\\vfs\\vfsStreamDirectory', $test); - $this->assertTrue($test->hasChildren()); - $this->assertTrue($test->hasChild('baz.txt')); - $this->assertVfsFile($test->getChild('baz.txt'), 'world'); - - $this->assertTrue($test->hasChild('foo')); - $foo = $test->getChild('foo'); - $this->assertInstanceOf('org\\bovigo\\vfs\\vfsStreamDirectory', $foo); - $this->assertTrue($foo->hasChildren()); - $this->assertTrue($foo->hasChild('test.txt')); - $this->assertVfsFile($foo->getChild('test.txt'), 'hello'); - } - - /** - * @test - * @group issue_20 - * @since 0.10.0 - */ - public function createStringsAreTurnedIntoFilesWithContent() - { - $baseDir = vfsStream::create(array('test.txt' => 'some content'), new vfsStreamDirectory('baseDir')); - $this->assertTrue($baseDir->hasChildren()); - $this->assertTrue($baseDir->hasChild('test.txt')); - $this->assertVfsFile($baseDir->getChild('test.txt'), 'some content'); - } - - /** - * @test - * @group issue_20 - * @since 0.11.0 - */ - public function createStringsAreTurnedIntoFilesWithContentWithRoot() - { - $root = vfsStream::setup(); - $this->assertSame($root, - vfsStream::create(array('test.txt' => 'some content')) - ); - $this->assertTrue($root->hasChildren()); - $this->assertTrue($root->hasChild('test.txt')); - $this->assertVfsFile($root->getChild('test.txt'), 'some content'); - } - - /** - * @test - * @group issue_20 - * @since 0.11.0 - */ - public function createCastsNumericDirectoriesToStrings() - { - $baseDir = vfsStream::create(array(2011 => array ('test.txt' => 'some content')), new vfsStreamDirectory('baseDir')); - $this->assertTrue($baseDir->hasChild('2011')); - - $directory = $baseDir->getChild('2011'); - $this->assertVfsFile($directory->getChild('test.txt'), 'some content'); - } - - /** - * @test - * @group issue_20 - * @since 0.11.0 - */ - public function createCastsNumericDirectoriesToStringsWithRoot() - { - $root = vfsStream::setup(); - $this->assertSame($root, - vfsStream::create(array(2011 => array ('test.txt' => 'some content'))) - ); - $this->assertTrue($root->hasChild('2011')); - - $directory = $root->getChild('2011'); - $this->assertVfsFile($directory->getChild('test.txt'), 'some content'); - } - - /** - * helper function for assertions on vfsStreamFile - * - * @param vfsStreamFile $file - * @param string $content - */ - protected function assertVfsFile(vfsStreamFile $file, $content) - { - $this->assertInstanceOf('org\\bovigo\\vfs\\vfsStreamFile', - $file - ); - $this->assertEquals($content, - $file->getContent() - ); - } - - /** - * @test - * @group issue_10 - * @since 0.10.0 - */ - public function inspectWithContentGivesContentToVisitor() - { - $mockContent = $this->getMock('org\\bovigo\\vfs\\vfsStreamContent'); - $mockVisitor = $this->getMock('org\\bovigo\\vfs\\visitor\\vfsStreamVisitor'); - $mockVisitor->expects($this->once()) - ->method('visit') - ->with($this->equalTo($mockContent)) - ->will($this->returnValue($mockVisitor)); - $this->assertSame($mockVisitor, vfsStream::inspect($mockVisitor, $mockContent)); - } - - /** - * @test - * @group issue_10 - * @since 0.10.0 - */ - public function inspectWithoutContentGivesRootToVisitor() - { - $root = vfsStream::setup(); - $mockVisitor = $this->getMock('org\\bovigo\\vfs\\visitor\\vfsStreamVisitor'); - $mockVisitor->expects($this->once()) - ->method('visitDirectory') - ->with($this->equalTo($root)) - ->will($this->returnValue($mockVisitor)); - $this->assertSame($mockVisitor, vfsStream::inspect($mockVisitor)); - } - - /** - * @test - * @group issue_10 - * @expectedException \InvalidArgumentException - * @since 0.10.0 - */ - public function inspectWithoutContentAndWithoutRootThrowsInvalidArgumentException() - { - $mockVisitor = $this->getMock('org\\bovigo\\vfs\\visitor\\vfsStreamVisitor'); - $mockVisitor->expects($this->never()) - ->method('visit'); - $mockVisitor->expects($this->never()) - ->method('visitDirectory'); - vfsStream::inspect($mockVisitor); - } - - /** - * returns path to file system copy resource directory - * - * @return string - */ - protected function getFileSystemCopyDir() - { - return realpath(dirname(__FILE__) . '/../../../../resources/filesystemcopy'); - } - - /** - * @test - * @group issue_4 - * @expectedException \InvalidArgumentException - * @since 0.11.0 - */ - public function copyFromFileSystemThrowsExceptionIfNoBaseDirGivenAndNoRootSet() - { - vfsStream::copyFromFileSystem($this->getFileSystemCopyDir()); - } - - /** - * @test - * @group issue_4 - * @since 0.11.0 - */ - public function copyFromEmptyFolder() - { - $baseDir = vfsStream::copyFromFileSystem($this->getFileSystemCopyDir() . '/emptyFolder', - vfsStream::newDirectory('test') - ); - $baseDir->removeChild('.gitignore'); - $this->assertFalse($baseDir->hasChildren()); - } - - /** - * @test - * @group issue_4 - * @since 0.11.0 - */ - public function copyFromEmptyFolderWithRoot() - { - $root = vfsStream::setup(); - $this->assertEquals($root, - vfsStream::copyFromFileSystem($this->getFileSystemCopyDir() . '/emptyFolder') - ); - $root->removeChild('.gitignore'); - $this->assertFalse($root->hasChildren()); - } - - /** - * @test - * @group issue_4 - * @since 0.11.0 - */ - public function copyFromWithSubFolders() - { - $baseDir = vfsStream::copyFromFileSystem($this->getFileSystemCopyDir(), - vfsStream::newDirectory('test'), - 3 - ); - $this->assertTrue($baseDir->hasChildren()); - $this->assertTrue($baseDir->hasChild('emptyFolder')); - $this->assertTrue($baseDir->hasChild('withSubfolders')); - $subfolderDir = $baseDir->getChild('withSubfolders'); - $this->assertTrue($subfolderDir->hasChild('subfolder1')); - $this->assertTrue($subfolderDir->getChild('subfolder1')->hasChild('file1.txt')); - $this->assertVfsFile($subfolderDir->getChild('subfolder1/file1.txt'), ''); - $this->assertTrue($subfolderDir->hasChild('subfolder2')); - $this->assertTrue($subfolderDir->hasChild('aFile.txt')); - $this->assertVfsFile($subfolderDir->getChild('aFile.txt'), 'foo'); - } - - /** - * @test - * @group issue_4 - * @since 0.11.0 - */ - public function copyFromWithSubFoldersWithRoot() - { - $root = vfsStream::setup(); - $this->assertEquals($root, - vfsStream::copyFromFileSystem($this->getFileSystemCopyDir(), - null, - 3 - ) - ); - $this->assertTrue($root->hasChildren()); - $this->assertTrue($root->hasChild('emptyFolder')); - $this->assertTrue($root->hasChild('withSubfolders')); - $subfolderDir = $root->getChild('withSubfolders'); - $this->assertTrue($subfolderDir->hasChild('subfolder1')); - $this->assertTrue($subfolderDir->getChild('subfolder1')->hasChild('file1.txt')); - $this->assertVfsFile($subfolderDir->getChild('subfolder1/file1.txt'), ''); - $this->assertTrue($subfolderDir->hasChild('subfolder2')); - $this->assertTrue($subfolderDir->hasChild('aFile.txt')); - $this->assertVfsFile($subfolderDir->getChild('aFile.txt'), 'foo'); - } - - /** - * @test - * @group issue_4 - * @group issue_29 - * @since 0.11.2 - */ - public function copyFromPreservesFilePermissions() - { - if (DIRECTORY_SEPARATOR !== '/') { - $this->markTestSkipped('Only applicable on Linux style systems.'); - } - - $copyDir = $this->getFileSystemCopyDir(); - $root = vfsStream::setup(); - $this->assertEquals($root, - vfsStream::copyFromFileSystem($copyDir, - null - ) - ); - $this->assertEquals(fileperms($copyDir . '/withSubfolders') - vfsStreamContent::TYPE_DIR, - $root->getChild('withSubfolders') - ->getPermissions() - ); - $this->assertEquals(fileperms($copyDir . '/withSubfolders/aFile.txt') - vfsStreamContent::TYPE_FILE, - $root->getChild('withSubfolders/aFile.txt') - ->getPermissions() - ); - } -} -?> \ No newline at end of file diff --git a/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamUmaskTestCase.php b/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamUmaskTestCase.php deleted file mode 100644 index 342af31..0000000 --- a/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamUmaskTestCase.php +++ /dev/null @@ -1,195 +0,0 @@ -assertEquals(vfsStream::umask(), - vfsStream::umask() - ); - $this->assertEquals(0000, - vfsStream::umask() - ); - } - - /** - * @test - */ - public function changingUmaskSettingReturnsOldUmaskSetting() - { - $this->assertEquals(0000, - vfsStream::umask(0022) - ); - $this->assertEquals(0022, - vfsStream::umask() - ); - } - - /** - * @test - */ - public function createFileWithDefaultUmaskSetting() - { - $file = new vfsStreamFile('foo'); - $this->assertEquals(0666, $file->getPermissions()); - } - - /** - * @test - */ - public function createFileWithDifferentUmaskSetting() - { - vfsStream::umask(0022); - $file = new vfsStreamFile('foo'); - $this->assertEquals(0644, $file->getPermissions()); - } - - /** - * @test - */ - public function createDirectoryWithDefaultUmaskSetting() - { - $directory = new vfsStreamDirectory('foo'); - $this->assertEquals(0777, $directory->getPermissions()); - } - - /** - * @test - */ - public function createDirectoryWithDifferentUmaskSetting() - { - vfsStream::umask(0022); - $directory = new vfsStreamDirectory('foo'); - $this->assertEquals(0755, $directory->getPermissions()); - } - - /** - * @test - */ - public function createFileUsingStreamWithDefaultUmaskSetting() - { - $root = vfsStream::setup(); - file_put_contents(vfsStream::url('root/newfile.txt'), 'file content'); - $this->assertEquals(0666, $root->getChild('newfile.txt')->getPermissions()); - } - - /** - * @test - */ - public function createFileUsingStreamWithDifferentUmaskSetting() - { - $root = vfsStream::setup(); - vfsStream::umask(0022); - file_put_contents(vfsStream::url('root/newfile.txt'), 'file content'); - $this->assertEquals(0644, $root->getChild('newfile.txt')->getPermissions()); - } - - /** - * @test - */ - public function createDirectoryUsingStreamWithDefaultUmaskSetting() - { - $root = vfsStream::setup(); - mkdir(vfsStream::url('root/newdir')); - $this->assertEquals(0777, $root->getChild('newdir')->getPermissions()); - } - - /** - * @test - */ - public function createDirectoryUsingStreamWithDifferentUmaskSetting() - { - $root = vfsStream::setup(); - vfsStream::umask(0022); - mkdir(vfsStream::url('root/newdir')); - $this->assertEquals(0755, $root->getChild('newdir')->getPermissions()); - } - - /** - * @test - */ - public function createDirectoryUsingStreamWithExplicit0() - { - $root = vfsStream::setup(); - vfsStream::umask(0022); - mkdir(vfsStream::url('root/newdir'), null); - $this->assertEquals(0000, $root->getChild('newdir')->getPermissions()); - } - - /** - * @test - * - */ - public function createDirectoryUsingStreamWithDifferentUmaskSettingButExplicit0777() - { - $root = vfsStream::setup(); - vfsStream::umask(0022); - mkdir(vfsStream::url('root/newdir'), 0777); - $this->assertEquals(0755, $root->getChild('newdir')->getPermissions()); - } - - /** - * @test - */ - public function createDirectoryUsingStreamWithDifferentUmaskSettingButExplicitModeRequestedByCall() - { - $root = vfsStream::setup(); - vfsStream::umask(0022); - mkdir(vfsStream::url('root/newdir'), 0700); - $this->assertEquals(0700, $root->getChild('newdir')->getPermissions()); - } - - /** - * @test - */ - public function defaultUmaskSettingDoesNotInfluenceSetup() - { - $root = vfsStream::setup(); - $this->assertEquals(0777, $root->getPermissions()); - } - - /** - * @test - */ - public function umaskSettingShouldBeRespectedBySetup() - { - vfsStream::umask(0022); - $root = vfsStream::setup(); - $this->assertEquals(0755, $root->getPermissions()); - } -} -?> \ No newline at end of file diff --git a/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperAlreadyRegisteredTestCase.php b/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperAlreadyRegisteredTestCase.php deleted file mode 100644 index c7f78dc..0000000 --- a/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperAlreadyRegisteredTestCase.php +++ /dev/null @@ -1,63 +0,0 @@ -getMock('org\\bovigo\\vfs\\vfsStreamWrapper'); - stream_wrapper_register(vfsStream::SCHEME, get_class($mock)); - } - - /** - * clean up test environment - */ - public function tearDown() - { - TestvfsStreamWrapper::unregister(); - } - - /** - * registering the stream wrapper when another stream wrapper is already - * registered for the vfs scheme should throw an exception - * - * @test - * @expectedException org\bovigo\vfs\vfsStreamException - */ - public function registerOverAnotherStreamWrapper() - { - vfsStreamWrapper::register(); - } -} -?> \ No newline at end of file diff --git a/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperBaseTestCase.php b/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperBaseTestCase.php deleted file mode 100644 index 52ec40c..0000000 --- a/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperBaseTestCase.php +++ /dev/null @@ -1,99 +0,0 @@ -fooURL = vfsStream::url('foo'); - $this->barURL = vfsStream::url('foo/bar'); - $this->baz1URL = vfsStream::url('foo/bar/baz1'); - $this->baz2URL = vfsStream::url('foo/baz2'); - $this->foo = new vfsStreamDirectory('foo'); - $this->bar = new vfsStreamDirectory('bar'); - $this->baz1 = vfsStream::newFile('baz1') - ->lastModified(300) - ->lastAccessed(300) - ->lastAttributeModified(300) - ->withContent('baz 1'); - $this->baz2 = vfsStream::newFile('baz2') - ->withContent('baz2') - ->lastModified(400) - ->lastAccessed(400) - ->lastAttributeModified(400); - $this->bar->addChild($this->baz1); - $this->foo->addChild($this->bar); - $this->foo->addChild($this->baz2); - $this->foo->lastModified(100) - ->lastAccessed(100) - ->lastAttributeModified(100); - $this->bar->lastModified(200) - ->lastAccessed(100) - ->lastAttributeModified(100); - vfsStreamWrapper::register(); - vfsStreamWrapper::setRoot($this->foo); - } -} -?> \ No newline at end of file diff --git a/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperDirSeparatorTestCase.php b/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperDirSeparatorTestCase.php deleted file mode 100644 index 1fd2a2d..0000000 --- a/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperDirSeparatorTestCase.php +++ /dev/null @@ -1,73 +0,0 @@ -root = vfsStream::setup(); - } - - /** - * @test - */ - public function fileCanBeAccessedUsingWinDirSeparator() - { - vfsStream::newFile('foo/bar/baz.txt') - ->at($this->root) - ->withContent('test'); - $this->assertEquals('test', file_get_contents('vfs://root/foo\bar\baz.txt')); - } - - - /** - * @test - */ - public function directoryCanBeCreatedUsingWinDirSeparator() - { - mkdir('vfs://root/dir\bar\foo', true, 0777); - $this->assertTrue($this->root->hasChild('dir')); - $this->assertTrue($this->root->getChild('dir')->hasChild('bar')); - $this->assertTrue($this->root->getChild('dir/bar')->hasChild('foo')); - } - - /** - * @test - */ - public function directoryExitsTestUsingTrailingWinDirSeparator() - { - $structure = array( - 'dir' => array( - 'bar' => array( - ) - ) - ); - vfsStream::create($structure, $this->root); - - $this->assertTrue(file_exists(vfsStream::url('root/').'dir\\')); - } -} -?> \ No newline at end of file diff --git a/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperDirTestCase.php b/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperDirTestCase.php deleted file mode 100644 index 4f3c169..0000000 --- a/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperDirTestCase.php +++ /dev/null @@ -1,460 +0,0 @@ -assertFalse(mkdir(vfsStream::url('another'))); - $this->assertEquals(2, count($this->foo->getChildren())); - $this->assertSame($this->foo, vfsStreamWrapper::getRoot()); - } - - /** - * mkdir() should not overwrite existing root - * - * @test - */ - public function mkdirNoNewRootRecursively() - { - $this->assertFalse(mkdir(vfsStream::url('another/more'), 0777, true)); - $this->assertEquals(2, count($this->foo->getChildren())); - $this->assertSame($this->foo, vfsStreamWrapper::getRoot()); - } - - /** - * assert that mkdir() creates the correct directory structure - * - * @test - * @group permissions - */ - public function mkdirNonRecursively() - { - $this->assertFalse(mkdir($this->barURL . '/another/more')); - $this->assertEquals(2, count($this->foo->getChildren())); - $this->assertTrue(mkdir($this->fooURL . '/another')); - $this->assertEquals(3, count($this->foo->getChildren())); - $this->assertEquals(0777, $this->foo->getChild('another')->getPermissions()); - } - - /** - * assert that mkdir() creates the correct directory structure - * - * @test - * @group permissions - */ - public function mkdirRecursively() - { - $this->assertTrue(mkdir($this->fooURL . '/another/more', 0777, true)); - $this->assertEquals(3, count($this->foo->getChildren())); - $another = $this->foo->getChild('another'); - $this->assertTrue($another->hasChild('more')); - $this->assertEquals(0777, $this->foo->getChild('another')->getPermissions()); - $this->assertEquals(0777, $this->foo->getChild('another')->getChild('more')->getPermissions()); - } - - /** - * @test - * @group issue_9 - * @since 0.9.0 - */ - public function mkdirWithDots() - { - $this->assertTrue(mkdir($this->fooURL . '/another/../more/.', 0777, true)); - $this->assertEquals(3, count($this->foo->getChildren())); - $this->assertTrue($this->foo->hasChild('more')); - } - - /** - * no root > new directory becomes root - * - * @test - * @group permissions - */ - public function mkdirWithoutRootCreatesNewRoot() - { - vfsStreamWrapper::register(); - $this->assertTrue(@mkdir(vfsStream::url('foo'))); - $this->assertEquals(vfsStreamContent::TYPE_DIR, vfsStreamWrapper::getRoot()->getType()); - $this->assertEquals('foo', vfsStreamWrapper::getRoot()->getName()); - $this->assertEquals(0777, vfsStreamWrapper::getRoot()->getPermissions()); - } - - /** - * trying to create a subdirectory of a file should not work - * - * @test - */ - public function mkdirOnFileReturnsFalse() - { - $this->assertFalse(mkdir($this->baz1URL . '/another/more', 0777, true)); - } - - /** - * assert that mkdir() creates the correct directory structure - * - * @test - * @group permissions - */ - public function mkdirNonRecursivelyDifferentPermissions() - { - $this->assertTrue(mkdir($this->fooURL . '/another', 0755)); - $this->assertEquals(0755, $this->foo->getChild('another')->getPermissions()); - } - - /** - * assert that mkdir() creates the correct directory structure - * - * @test - * @group permissions - */ - public function mkdirRecursivelyDifferentPermissions() - { - $this->assertTrue(mkdir($this->fooURL . '/another/more', 0755, true)); - $this->assertEquals(3, count($this->foo->getChildren())); - $another = $this->foo->getChild('another'); - $this->assertTrue($another->hasChild('more')); - $this->assertEquals(0755, $this->foo->getChild('another')->getPermissions()); - $this->assertEquals(0755, $this->foo->getChild('another')->getChild('more')->getPermissions()); - } - - /** - * assert that mkdir() creates the correct directory structure - * - * @test - * @group permissions - */ - public function mkdirRecursivelyUsesDefaultPermissions() - { - $this->foo->chmod(0700); - $this->assertTrue(mkdir($this->fooURL . '/another/more', 0777, true)); - $this->assertEquals(3, count($this->foo->getChildren())); - $another = $this->foo->getChild('another'); - $this->assertTrue($another->hasChild('more')); - $this->assertEquals(0777, $this->foo->getChild('another')->getPermissions()); - $this->assertEquals(0777, $this->foo->getChild('another')->getChild('more')->getPermissions()); - } - - /** - * no root > new directory becomes root - * - * @test - * @group permissions - */ - public function mkdirWithoutRootCreatesNewRootDifferentPermissions() - { - vfsStreamWrapper::register(); - $this->assertTrue(@mkdir(vfsStream::url('foo'), 0755)); - $this->assertEquals(vfsStreamContent::TYPE_DIR, vfsStreamWrapper::getRoot()->getType()); - $this->assertEquals('foo', vfsStreamWrapper::getRoot()->getName()); - $this->assertEquals(0755, vfsStreamWrapper::getRoot()->getPermissions()); - } - - /** - * no root > new directory becomes root - * - * @test - * @group permissions - */ - public function mkdirWithoutRootCreatesNewRootWithDefaultPermissions() - { - vfsStreamWrapper::register(); - $this->assertTrue(@mkdir(vfsStream::url('foo'))); - $this->assertEquals(vfsStreamContent::TYPE_DIR, vfsStreamWrapper::getRoot()->getType()); - $this->assertEquals('foo', vfsStreamWrapper::getRoot()->getName()); - $this->assertEquals(0777, vfsStreamWrapper::getRoot()->getPermissions()); - } - - /** - * @test - * @group permissions - * @group bug_15 - */ - public function mkdirDirCanNotCreateNewDirInNonWritingDirectory() - { - vfsStreamWrapper::register(); - vfsStreamWrapper::setRoot(new vfsStreamDirectory('root')); - vfsStreamWrapper::getRoot()->addChild(new vfsStreamDirectory('restrictedFolder', 0000)); - $this->assertFalse(is_writable(vfsStream::url('root/restrictedFolder/'))); - $this->assertFalse(mkdir(vfsStream::url('root/restrictedFolder/newFolder'))); - $this->assertFalse(vfsStreamWrapper::getRoot()->hasChild('restrictedFolder/newFolder')); - } - - /** - * @test - * @group issue_28 - */ - public function mkDirShouldNotOverwriteExistingDirectories() - { - vfsStream::setup('root'); - $dir = vfsStream::url('root/dir'); - $this->assertTrue(mkdir($dir)); - $this->assertFalse(@mkdir($dir)); - } - - /** - * @test - * @group issue_28 - * @expectedException PHPUnit_Framework_Error - * @expectedExceptionMessage mkdir(): Path vfs://root/dir exists - */ - public function mkDirShouldNotOverwriteExistingDirectoriesAndTriggerE_USER_WARNING() - { - vfsStream::setup('root'); - $dir = vfsStream::url('root/dir'); - $this->assertTrue(mkdir($dir)); - $this->assertFalse(mkdir($dir)); - } - - /** - * @test - * @group issue_28 - */ - public function mkDirShouldNotOverwriteExistingFiles() - { - $root = vfsStream::setup('root'); - vfsStream::newFile('test.txt')->at($root); - $this->assertFalse(@mkdir(vfsStream::url('root/test.txt'))); - } - - /** - * @test - * @group issue_28 - * @expectedException PHPUnit_Framework_Error - * @expectedExceptionMessage mkdir(): Path vfs://root/test.txt exists - */ - public function mkDirShouldNotOverwriteExistingFilesAndTriggerE_USER_WARNING() - { - $root = vfsStream::setup('root'); - vfsStream::newFile('test.txt')->at($root); - $this->assertFalse(mkdir(vfsStream::url('root/test.txt'))); - } - - /** - * @test - * @group permissions - * @group bug_15 - */ - public function canNotIterateOverNonReadableDirectory() - { - vfsStreamWrapper::register(); - vfsStreamWrapper::setRoot(new vfsStreamDirectory('root', 0000)); - $this->assertFalse(@opendir(vfsStream::url('root'))); - $this->assertFalse(@dir(vfsStream::url('root'))); - } - - /** - * assert is_dir() returns correct result - * - * @test - */ - public function is_dir() - { - $this->assertTrue(is_dir($this->fooURL)); - $this->assertTrue(is_dir($this->fooURL . '/.')); - $this->assertTrue(is_dir($this->barURL)); - $this->assertTrue(is_dir($this->barURL . '/.')); - $this->assertFalse(is_dir($this->baz1URL)); - $this->assertFalse(is_dir($this->baz2URL)); - $this->assertFalse(is_dir($this->fooURL . '/another')); - $this->assertFalse(is_dir(vfsStream::url('another'))); - } - - /** - * can not unlink without root - * - * @test - */ - public function canNotUnlinkDirectoryWithoutRoot() - { - vfsStreamWrapper::register(); - $this->assertFalse(@rmdir(vfsStream::url('foo'))); - } - - /** - * rmdir() can not remove files - * - * @test - */ - public function rmdirCanNotRemoveFiles() - { - $this->assertFalse(rmdir($this->baz1URL)); - $this->assertFalse(rmdir($this->baz2URL)); - } - - /** - * rmdir() can not remove a non-existing directory - * - * @test - */ - public function rmdirCanNotRemoveNonExistingDirectory() - { - $this->assertFalse(rmdir($this->fooURL . '/another')); - } - - /** - * rmdir() can not remove non-empty directories - * - * @test - */ - public function rmdirCanNotRemoveNonEmptyDirectory() - { - $this->assertFalse(rmdir($this->fooURL)); - $this->assertFalse(rmdir($this->barURL)); - } - - /** - * @test - */ - public function rmdirCanRemoveEmptyDirectory() - { - vfsStream::newDirectory('empty')->at($this->foo); - $this->assertTrue($this->foo->hasChild('empty')); - $this->assertTrue(rmdir($this->fooURL . '/empty')); - $this->assertFalse($this->foo->hasChild('empty')); - } - - /** - * @test - */ - public function rmdirCanRemoveEmptyDirectoryWithDot() - { - vfsStream::newDirectory('empty')->at($this->foo); - $this->assertTrue($this->foo->hasChild('empty')); - $this->assertTrue(rmdir($this->fooURL . '/empty/.')); - $this->assertFalse($this->foo->hasChild('empty')); - } - - /** - * rmdir() can remove empty directories - * - * @test - */ - public function rmdirCanRemoveEmptyRoot() - { - $this->foo->removeChild('bar'); - $this->foo->removeChild('baz2'); - $this->assertTrue(rmdir($this->fooURL)); - $this->assertFalse(file_exists($this->fooURL)); // make sure statcache was cleared - $this->assertNull(vfsStreamWrapper::getRoot()); - } - - /** - * @test - * @group permissions - * @group bug_15 - */ - public function rmdirDirCanNotRemoveDirFromNonWritingDirectory() - { - vfsStreamWrapper::register(); - vfsStreamWrapper::setRoot(new vfsStreamDirectory('root', 0000)); - vfsStreamWrapper::getRoot()->addChild(new vfsStreamDirectory('nonRemovableFolder')); - $this->assertFalse(is_writable(vfsStream::url('root'))); - $this->assertFalse(rmdir(vfsStream::url('root/nonRemovableFolder'))); - $this->assertTrue(vfsStreamWrapper::getRoot()->hasChild('nonRemovableFolder')); - } - - /** - * @test - * @group permissions - * @group bug_17 - */ - public function issue17() - { - vfsStreamWrapper::register(); - vfsStreamWrapper::setRoot(new vfsStreamDirectory('root', 0770)); - vfsStreamWrapper::getRoot()->chgrp(vfsStream::GROUP_USER_1) - ->chown(vfsStream::OWNER_USER_1); - $this->assertFalse(mkdir(vfsStream::url('root/doesNotWork'))); - $this->assertFalse(vfsStreamWrapper::getRoot()->hasChild('doesNotWork')); - } - - /** - * @test - * @group bug_19 - */ - public function accessWithDoubleDotReturnsCorrectContent() - { - $this->assertEquals('baz2', - file_get_contents(vfsStream::url('foo/bar/../baz2')) - ); - } - - /** - * @test - * @since 0.11.0 - * @group issue_23 - */ - public function unlinkCanNotRemoveNonEmptyDirectory() - { - try { - $this->assertFalse(unlink($this->barURL)); - } catch (\PHPUnit_Framework_Error $fe) { - $this->assertEquals('unlink(vfs://foo/bar): Operation not permitted', $fe->getMessage()); - } - - $this->assertTrue($this->foo->hasChild('bar')); - $this->assertFileExists($this->barURL); - } - - /** - * @test - * @since 0.11.0 - * @group issue_23 - */ - public function unlinkCanNotRemoveEmptyDirectory() - { - vfsStream::newDirectory('empty')->at($this->foo); - try { - $this->assertTrue(unlink($this->fooURL . '/empty')); - } catch (\PHPUnit_Framework_Error $fe) { - $this->assertEquals('unlink(vfs://foo/empty): Operation not permitted', $fe->getMessage()); - } - - $this->assertTrue($this->foo->hasChild('empty')); - $this->assertFileExists($this->fooURL . '/empty'); - } - - /** - * @test - * @group issue_32 - */ - public function canCreateFolderOfSameNameAsParentFolder() - { - $root = vfsStream::setup('testFolder'); - mkdir(vfsStream::url('testFolder') . '/testFolder/subTestFolder', 0777, true); - $this->assertTrue(file_exists(vfsStream::url('testFolder/testFolder/subTestFolder/.'))); - } - - /** - * @test - * @group issue_32 - */ - public function canRetrieveFolderOfSameNameAsParentFolder() - { - $root = vfsStream::setup('testFolder'); - mkdir(vfsStream::url('testFolder') . '/testFolder/subTestFolder', 0777, true); - $this->assertTrue($root->hasChild('testFolder')); - $this->assertNotNull($root->getChild('testFolder')); - } -} -?> \ No newline at end of file diff --git a/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperFileTestCase.php b/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperFileTestCase.php deleted file mode 100644 index 5bcb37a..0000000 --- a/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperFileTestCase.php +++ /dev/null @@ -1,458 +0,0 @@ -assertEquals('baz2', file_get_contents($this->baz2URL)); - $this->assertEquals('baz 1', file_get_contents($this->baz1URL)); - $this->assertFalse(@file_get_contents($this->barURL)); - $this->assertFalse(@file_get_contents($this->fooURL)); - } - - /** - * @test - * @group permissions - * @group bug_15 - */ - public function file_get_contentsNonReadableFile() - { - vfsStreamWrapper::register(); - vfsStreamWrapper::setRoot(new vfsStreamDirectory('root')); - vfsStream::newFile('new.txt', 0000)->at(vfsStreamWrapper::getRoot())->withContent('content'); - $this->assertEquals('', @file_get_contents(vfsStream::url('root/new.txt'))); - } - - /** - * assert that file_put_contents() delivers correct file contents - * - * @test - */ - public function file_put_contentsExistingFile() - { - $this->assertEquals(14, file_put_contents($this->baz2URL, 'baz is not bar')); - $this->assertEquals('baz is not bar', $this->baz2->getContent()); - $this->assertEquals(6, file_put_contents($this->baz1URL, 'foobar')); - $this->assertEquals('foobar', $this->baz1->getContent()); - $this->assertFalse(@file_put_contents($this->barURL, 'This does not work.')); - $this->assertFalse(@file_put_contents($this->fooURL, 'This does not work, too.')); - } - - /** - * @test - * @group permissions - * @group bug_15 - */ - public function file_put_contentsExistingFileNonWritableDirectory() - { - vfsStreamWrapper::register(); - vfsStreamWrapper::setRoot(new vfsStreamDirectory('root', 0000)); - vfsStream::newFile('new.txt')->at(vfsStreamWrapper::getRoot())->withContent('content'); - $this->assertEquals(15, @file_put_contents(vfsStream::url('root/new.txt'), 'This does work.')); - $this->assertEquals('This does work.', file_get_contents(vfsStream::url('root/new.txt'))); - - } - - /** - * @test - * @group permissions - * @group bug_15 - */ - public function file_put_contentsExistingNonWritableFile() - { - vfsStreamWrapper::register(); - vfsStreamWrapper::setRoot(new vfsStreamDirectory('root')); - vfsStream::newFile('new.txt', 0400)->at(vfsStreamWrapper::getRoot())->withContent('content'); - $this->assertFalse(@file_put_contents(vfsStream::url('root/new.txt'), 'This does not work.')); - $this->assertEquals('content', file_get_contents(vfsStream::url('root/new.txt'))); - } - - /** - * assert that file_put_contents() delivers correct file contents - * - * @test - */ - public function file_put_contentsNonExistingFile() - { - $this->assertEquals(14, file_put_contents($this->fooURL . '/baznot.bar', 'baz is not bar')); - $this->assertEquals(3, count($this->foo->getChildren())); - $this->assertEquals(14, file_put_contents($this->barURL . '/baznot.bar', 'baz is not bar')); - $this->assertEquals(2, count($this->bar->getChildren())); - } - - /** - * @test - * @group permissions - * @group bug_15 - */ - public function file_put_contentsNonExistingFileNonWritableDirectory() - { - vfsStreamWrapper::register(); - vfsStreamWrapper::setRoot(new vfsStreamDirectory('root', 0000)); - $this->assertFalse(@file_put_contents(vfsStream::url('root/new.txt'), 'This does not work.')); - $this->assertFalse(file_exists(vfsStream::url('root/new.txt'))); - - } - - /** - * using a file pointer should work without any problems - * - * @test - */ - public function usingFilePointer() - { - $fp = fopen($this->baz1URL, 'r'); - $this->assertEquals(0, ftell($fp)); - $this->assertFalse(feof($fp)); - $this->assertEquals(0, fseek($fp, 2)); - $this->assertEquals(2, ftell($fp)); - $this->assertEquals(0, fseek($fp, 1, SEEK_CUR)); - $this->assertEquals(3, ftell($fp)); - $this->assertEquals(0, fseek($fp, 1, SEEK_END)); - $this->assertEquals(6, ftell($fp)); - $this->assertTrue(feof($fp)); - $this->assertEquals(0, fseek($fp, 2)); - $this->assertFalse(feof($fp)); - $this->assertEquals(2, ftell($fp)); - $this->assertEquals('z', fread($fp, 1)); - $this->assertEquals(3, ftell($fp)); - $this->assertEquals(' 1', fread($fp, 8092)); - $this->assertEquals(5, ftell($fp)); - $this->assertTrue(fclose($fp)); - } - - /** - * assert is_file() returns correct result - * - * @test - */ - public function is_file() - { - $this->assertFalse(is_file($this->fooURL)); - $this->assertFalse(is_file($this->barURL)); - $this->assertTrue(is_file($this->baz1URL)); - $this->assertTrue(is_file($this->baz2URL)); - $this->assertFalse(is_file($this->fooURL . '/another')); - $this->assertFalse(is_file(vfsStream::url('another'))); - } - - /** - * @test - * @group issue7 - * @group issue13 - */ - public function issue13CanNotOverwriteFiles() - { - $vfsFile = vfsStream::url('foo/overwrite.txt'); - file_put_contents($vfsFile, 'test'); - file_put_contents($vfsFile, 'd'); - $this->assertEquals('d', file_get_contents($vfsFile)); - } - - /** - * @test - * @group issue7 - * @group issue13 - */ - public function appendContentIfOpenedWithModeA() - { - $vfsFile = vfsStream::url('foo/overwrite.txt'); - file_put_contents($vfsFile, 'test'); - $fp = fopen($vfsFile, 'ab'); - fwrite($fp, 'd'); - fclose($fp); - $this->assertEquals('testd', file_get_contents($vfsFile)); - } - - /** - * @test - * @group issue7 - * @group issue13 - */ - public function canOverwriteNonExistingFileWithModeX() - { - $vfsFile = vfsStream::url('foo/overwrite.txt'); - $fp = fopen($vfsFile, 'xb'); - fwrite($fp, 'test'); - fclose($fp); - $this->assertEquals('test', file_get_contents($vfsFile)); - } - - /** - * @test - * @group issue7 - * @group issue13 - */ - public function canNotOverwriteExistingFileWithModeX() - { - $vfsFile = vfsStream::url('foo/overwrite.txt'); - file_put_contents($vfsFile, 'test'); - $this->assertFalse(@fopen($vfsFile, 'xb')); - $this->assertEquals('test', file_get_contents($vfsFile)); - } - - /** - * @test - * @group issue7 - * @group issue13 - */ - public function canNotOpenNonExistingFileReadonly() - { - $this->assertFalse(@fopen(vfsStream::url('foo/doesNotExist.txt'), 'rb')); - } - - /** - * @test - * @group issue7 - * @group issue13 - */ - public function canNotOpenNonExistingFileReadAndWrite() - { - $this->assertFalse(@fopen(vfsStream::url('foo/doesNotExist.txt'), 'rb+')); - } - - /** - * @test - * @group issue7 - * @group issue13 - */ - public function canNotOpenWithIllegalMode() - { - $this->assertFalse(@fopen($this->baz2URL, 'invalid')); - } - - /** - * @test - * @group issue7 - * @group issue13 - */ - public function canNotWriteToReadOnlyFile() - { - $fp = fopen($this->baz2URL, 'rb'); - $this->assertEquals('baz2', fread($fp, 4096)); - $this->assertEquals(0, fwrite($fp, 'foo')); - fclose($fp); - $this->assertEquals('baz2', file_get_contents($this->baz2URL)); - } - - /** - * @test - * @group issue7 - * @group issue13 - */ - public function canNotReadFromWriteOnlyFileWithModeW() - { - $fp = fopen($this->baz2URL, 'wb'); - $this->assertEquals('', fread($fp, 4096)); - $this->assertEquals(3, fwrite($fp, 'foo')); - fseek($fp, 0); - $this->assertEquals('', fread($fp, 4096)); - fclose($fp); - $this->assertEquals('foo', file_get_contents($this->baz2URL)); - } - - /** - * @test - * @group issue7 - * @group issue13 - */ - public function canNotReadFromWriteOnlyFileWithModeA() - { - $fp = fopen($this->baz2URL, 'ab'); - $this->assertEquals('', fread($fp, 4096)); - $this->assertEquals(3, fwrite($fp, 'foo')); - fseek($fp, 0); - $this->assertEquals('', fread($fp, 4096)); - fclose($fp); - $this->assertEquals('baz2foo', file_get_contents($this->baz2URL)); - } - - /** - * @test - * @group issue7 - * @group issue13 - */ - public function canNotReadFromWriteOnlyFileWithModeX() - { - $vfsFile = vfsStream::url('foo/modeXtest.txt'); - $fp = fopen($vfsFile, 'xb'); - $this->assertEquals('', fread($fp, 4096)); - $this->assertEquals(3, fwrite($fp, 'foo')); - fseek($fp, 0); - $this->assertEquals('', fread($fp, 4096)); - fclose($fp); - $this->assertEquals('foo', file_get_contents($vfsFile)); - } - - /** - * @test - * @group permissions - * @group bug_15 - */ - public function canNotRemoveFileFromDirectoryWithoutWritePermissions() - { - vfsStreamWrapper::register(); - vfsStreamWrapper::setRoot(new vfsStreamDirectory('root', 0000)); - vfsStream::newFile('new.txt')->at(vfsStreamWrapper::getRoot()); - $this->assertFalse(unlink(vfsStream::url('root/new.txt'))); - $this->assertTrue(file_exists(vfsStream::url('root/new.txt'))); - } - - /** - * @test - * @group issue_30 - */ - public function truncatesFileWhenOpenedWithModeW() - { - $vfsFile = vfsStream::url('foo/overwrite.txt'); - file_put_contents($vfsFile, 'test'); - $fp = fopen($vfsFile, 'wb'); - $this->assertEquals('', file_get_contents($vfsFile)); - fclose($fp); - } - - /** - * @test - * @group issue_30 - */ - public function createsNonExistingFileWhenOpenedWithModeC() - { - $vfsFile = vfsStream::url('foo/tobecreated.txt'); - $fp = fopen($vfsFile, 'cb'); - fwrite($fp, 'some content'); - $this->assertTrue($this->foo->hasChild('tobecreated.txt')); - fclose($fp); - $this->assertEquals('some content', file_get_contents($vfsFile)); - } - - /** - * @test - * @group issue_30 - */ - public function createsNonExistingFileWhenOpenedWithModeCplus() - { - $vfsFile = vfsStream::url('foo/tobecreated.txt'); - $fp = fopen($vfsFile, 'cb+'); - fwrite($fp, 'some content'); - $this->assertTrue($this->foo->hasChild('tobecreated.txt')); - fclose($fp); - $this->assertEquals('some content', file_get_contents($vfsFile)); - } - - /** - * @test - * @group issue_30 - */ - public function doesNotTruncateFileWhenOpenedWithModeC() - { - $vfsFile = vfsStream::url('foo/overwrite.txt'); - file_put_contents($vfsFile, 'test'); - $fp = fopen($vfsFile, 'cb'); - $this->assertEquals('test', file_get_contents($vfsFile)); - fclose($fp); - } - - /** - * @test - * @group issue_30 - */ - public function setsPointerToStartWhenOpenedWithModeC() - { - $vfsFile = vfsStream::url('foo/overwrite.txt'); - file_put_contents($vfsFile, 'test'); - $fp = fopen($vfsFile, 'cb'); - $this->assertEquals(0, ftell($fp)); - fclose($fp); - } - - /** - * @test - * @group issue_30 - */ - public function doesNotTruncateFileWhenOpenedWithModeCplus() - { - $vfsFile = vfsStream::url('foo/overwrite.txt'); - file_put_contents($vfsFile, 'test'); - $fp = fopen($vfsFile, 'cb+'); - $this->assertEquals('test', file_get_contents($vfsFile)); - fclose($fp); - } - - /** - * @test - * @group issue_30 - */ - public function setsPointerToStartWhenOpenedWithModeCplus() - { - $vfsFile = vfsStream::url('foo/overwrite.txt'); - file_put_contents($vfsFile, 'test'); - $fp = fopen($vfsFile, 'cb+'); - $this->assertEquals(0, ftell($fp)); - fclose($fp); - } - - /** - * @test - */ - public function cannotOpenExistingNonwritableFileWithModeA() - { - $this->baz1->chmod(0400); - $this->assertFalse(@fopen($this->baz1URL, 'a')); - } - - /** - * @test - */ - public function cannotOpenExistingNonwritableFileWithModeW() - { - $this->baz1->chmod(0400); - $this->assertFalse(@fopen($this->baz1URL, 'w')); - } - - /** - * @test - */ - public function cannotOpenNonReadableFileWithModeR() - { - $this->baz1->chmod(0); - $this->assertFalse(@fopen($this->baz1URL, 'r')); - } - - /** - * @test - */ - public function cannotRenameToNonWritableDir() - { - $this->bar->chmod(0); - $this->assertFalse(@rename($this->baz2URL, vfsStream::url('foo/bar/baz3'))); - } - - /** - * @test - * @group issue_38 - */ - public function cannotReadFileFromNonReadableDir() - { - $this->markTestSkipped("Issue #38."); - $this->bar->chmod(0); - $this->assertFalse(@file_get_contents($this->baz1URL)); - } -} -?> \ No newline at end of file diff --git a/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperFileTimesTestCase.php b/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperFileTimesTestCase.php deleted file mode 100644 index 2d036c0..0000000 --- a/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperFileTimesTestCase.php +++ /dev/null @@ -1,315 +0,0 @@ -lastModified(50) - ->lastAccessed(50) - ->lastAttributeModified(50); - $this->fooUrl = vfsStream::url('root/foo.txt'); - $this->barUrl = vfsStream::url('root/bar'); - $this->bazUrl = vfsStream::url('root/bar/baz.txt'); - } - - /** - * helper assertion for the tests - * - * @param string $url url to check - * @param vfsStreamContent $content content to compare - */ - protected function assertFileTimesEqualStreamTimes($url, vfsStreamContent $content) - { - $this->assertEquals(filemtime($url), $content->filemtime()); - $this->assertEquals(fileatime($url), $content->fileatime()); - $this->assertEquals(filectime($url), $content->filectime()); - } - - /** - * @test - * @group issue_7 - * @group issue_26 - */ - public function openFileChangesAttributeTimeOnly() - { - $file = vfsStream::newFile('foo.txt') - ->withContent('test') - ->at(vfsStreamWrapper::getRoot()) - ->lastModified(100) - ->lastAccessed(100) - ->lastAttributeModified(100); - fclose(fopen($this->fooUrl, 'rb')); - $this->assertGreaterThan(time() - 2, fileatime($this->fooUrl)); - $this->assertLessThanOrEqual(time(), fileatime($this->fooUrl)); - $this->assertLessThanOrEqual(100, filemtime($this->fooUrl)); - $this->assertEquals(100, filectime($this->fooUrl)); - $this->assertFileTimesEqualStreamTimes($this->fooUrl, $file); - } - - /** - * @test - * @group issue_7 - * @group issue_26 - */ - public function fileGetContentsChangesAttributeTimeOnly() - { - $file = vfsStream::newFile('foo.txt') - ->withContent('test') - ->at(vfsStreamWrapper::getRoot()) - ->lastModified(100) - ->lastAccessed(100) - ->lastAttributeModified(100); - file_get_contents($this->fooUrl); - $this->assertGreaterThan(time() - 2, fileatime($this->fooUrl)); - $this->assertLessThanOrEqual(time(), fileatime($this->fooUrl)); - $this->assertLessThanOrEqual(100, filemtime($this->fooUrl)); - $this->assertEquals(100, filectime($this->fooUrl)); - $this->assertFileTimesEqualStreamTimes($this->fooUrl, $file); - } - - /** - * @test - * @group issue_7 - * @group issue_26 - */ - public function openFileWithTruncateChangesAttributeAndModificationTime() - { - $file = vfsStream::newFile('foo.txt') - ->withContent('test') - ->at(vfsStreamWrapper::getRoot()) - ->lastModified(100) - ->lastAccessed(100) - ->lastAttributeModified(100); - fclose(fopen($this->fooUrl, 'wb')); - $this->assertGreaterThan(time() - 2, filemtime($this->fooUrl)); - $this->assertGreaterThan(time() - 2, fileatime($this->fooUrl)); - $this->assertLessThanOrEqual(time(), filemtime($this->fooUrl)); - $this->assertLessThanOrEqual(time(), fileatime($this->fooUrl)); - $this->assertEquals(100, filectime($this->fooUrl)); - $this->assertFileTimesEqualStreamTimes($this->fooUrl, $file); - } - - /** - * @test - * @group issue_7 - */ - public function readFileChangesAccessTime() - { - $file = vfsStream::newFile('foo.txt') - ->withContent('test') - ->at(vfsStreamWrapper::getRoot()) - ->lastModified(100) - ->lastAccessed(100) - ->lastAttributeModified(100); - $fp = fopen($this->fooUrl, 'rb'); - $openTime = time(); - sleep(3); - fread($fp, 1024); - fclose($fp); - $this->assertLessThanOrEqual($openTime, filemtime($this->fooUrl)); - $this->assertLessThanOrEqual($openTime + 3, fileatime($this->fooUrl)); - $this->assertEquals(100, filectime($this->fooUrl)); - $this->assertFileTimesEqualStreamTimes($this->fooUrl, $file); - } - - /** - * @test - * @group issue_7 - */ - public function writeFileChangesModificationTime() - { - $file = vfsStream::newFile('foo.txt') - ->at(vfsStreamWrapper::getRoot()) - ->lastModified(100) - ->lastAccessed(100) - ->lastAttributeModified(100); - $fp = fopen($this->fooUrl, 'wb'); - $openTime = time(); - sleep(3); - fwrite($fp, 'test'); - fclose($fp); - $this->assertLessThanOrEqual($openTime + 3, filemtime($this->fooUrl)); - $this->assertLessThanOrEqual($openTime, fileatime($this->fooUrl)); - $this->assertEquals(100, filectime($this->fooUrl)); - $this->assertFileTimesEqualStreamTimes($this->fooUrl, $file); - - } - - /** - * @test - * @group issue_7 - */ - public function createNewFileSetsAllTimesToCurrentTime() - { - file_put_contents($this->fooUrl, 'test'); - $this->assertLessThanOrEqual(time(), filemtime($this->fooUrl)); - $this->assertEquals(fileatime($this->fooUrl), filectime($this->fooUrl)); - $this->assertEquals(fileatime($this->fooUrl), filemtime($this->fooUrl)); - $this->assertFileTimesEqualStreamTimes($this->fooUrl, vfsStreamWrapper::getRoot()->getChild('foo.txt')); - } - - /** - * @test - * @group issue_7 - */ - public function createNewFileChangesAttributeAndModificationTimeOfContainingDirectory() - { - $dir = vfsStream::newDirectory('bar') - ->at(vfsStreamWrapper::getRoot()) - ->lastModified(100) - ->lastAccessed(100) - ->lastAttributeModified(100); - file_put_contents($this->bazUrl, 'test'); - $this->assertLessThanOrEqual(time(), filemtime($this->barUrl)); - $this->assertLessThanOrEqual(time(), filectime($this->barUrl)); - $this->assertEquals(100, fileatime($this->barUrl)); - $this->assertFileTimesEqualStreamTimes($this->barUrl, $dir); - } - - /** - * @test - * @group issue_7 - */ - public function addNewFileNameWithLinkFunctionChangesAttributeTimeOfOriginalFile() - { - $this->markTestSkipped('Links are currently not supported by vfsStream.'); - } - - /** - * @test - * @group issue_7 - */ - public function addNewFileNameWithLinkFunctionChangesAttributeAndModificationTimeOfDirectoryContainingLink() - { - $this->markTestSkipped('Links are currently not supported by vfsStream.'); - } - - /** - * @test - * @group issue_7 - */ - public function removeFileChangesAttributeAndModificationTimeOfContainingDirectory() - { - $dir = vfsStream::newDirectory('bar') - ->at(vfsStreamWrapper::getRoot()); - $file = vfsStream::newFile('baz.txt') - ->at($dir) - ->lastModified(100) - ->lastAccessed(100) - ->lastAttributeModified(100); - $dir->lastModified(100) - ->lastAccessed(100) - ->lastAttributeModified(100); - unlink($this->bazUrl); - $this->assertLessThanOrEqual(time(), filemtime($this->barUrl)); - $this->assertLessThanOrEqual(time(), filectime($this->barUrl)); - $this->assertEquals(100, fileatime($this->barUrl)); - $this->assertFileTimesEqualStreamTimes($this->barUrl, $dir); - } - - /** - * @test - * @group issue_7 - */ - public function renameFileChangesAttributeAndModificationTimeOfAffectedDirectories() - { - $target = vfsStream::newDirectory('target') - ->at(vfsStreamWrapper::getRoot()) - ->lastModified(200) - ->lastAccessed(200) - ->lastAttributeModified(200); - $source = vfsStream::newDirectory('bar') - ->at(vfsStreamWrapper::getRoot()); - $file = vfsStream::newFile('baz.txt') - ->at($source) - ->lastModified(300) - ->lastAccessed(300) - ->lastAttributeModified(300); - $source->lastModified(100) - ->lastAccessed(100) - ->lastAttributeModified(100); - rename($this->bazUrl, vfsStream::url('root/target/baz.txt')); - $this->assertLessThanOrEqual(time(), filemtime($this->barUrl)); - $this->assertLessThanOrEqual(time(), filectime($this->barUrl)); - $this->assertEquals(100, fileatime($this->barUrl)); - $this->assertFileTimesEqualStreamTimes($this->barUrl, $source); - $this->assertLessThanOrEqual(time(), filemtime(vfsStream::url('root/target'))); - $this->assertLessThanOrEqual(time(), filectime(vfsStream::url('root/target'))); - $this->assertEquals(200, fileatime(vfsStream::url('root/target'))); - $this->assertFileTimesEqualStreamTimes(vfsStream::url('root/target'), $target); - } - - /** - * @test - * @group issue_7 - */ - public function renameFileDoesNotChangeFileTimesOfFileItself() - { - $target = vfsStream::newDirectory('target') - ->at(vfsStreamWrapper::getRoot()) - ->lastModified(200) - ->lastAccessed(200) - ->lastAttributeModified(200); - $source = vfsStream::newDirectory('bar') - ->at(vfsStreamWrapper::getRoot()); - $file = vfsStream::newFile('baz.txt') - ->at($source) - ->lastModified(300) - ->lastAccessed(300) - ->lastAttributeModified(300); - $source->lastModified(100) - ->lastAccessed(100) - ->lastAttributeModified(100); - rename($this->bazUrl, vfsStream::url('root/target/baz.txt')); - $this->assertEquals(300, filemtime(vfsStream::url('root/target/baz.txt'))); - $this->assertEquals(300, filectime(vfsStream::url('root/target/baz.txt'))); - $this->assertEquals(300, fileatime(vfsStream::url('root/target/baz.txt'))); - $this->assertFileTimesEqualStreamTimes(vfsStream::url('root/target/baz.txt'), $file); - } - - /** - * @test - * @group issue_7 - */ - public function changeFileAttributesChangesAttributeTimeOfFileItself() - { - $this->markTestSkipped('Changing file attributes via stream wrapper for self-defined streams is not supported by PHP.'); - } -} -?> \ No newline at end of file diff --git a/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperFlockTestCase.php b/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperFlockTestCase.php deleted file mode 100644 index 1b329dc..0000000 --- a/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperFlockTestCase.php +++ /dev/null @@ -1,440 +0,0 @@ -root = vfsStream::setup(); - } - - /** - * @test - */ - public function fileIsNotLockedByDefault() - { - $this->assertFalse(vfsStream::newFile('foo.txt')->isLocked()); - } - - /** - * @test - */ - public function streamIsNotLockedByDefault() - { - file_put_contents(vfsStream::url('root/foo.txt'), 'content'); - $this->assertFalse($this->root->getChild('foo.txt')->isLocked()); - } - - /** - * @test - */ - public function canAquireSharedLock() - { - $file = vfsStream::newFile('foo.txt')->at($this->root); - $fp = fopen(vfsStream::url('root/foo.txt'), 'rb'); - $this->assertTrue(flock($fp, LOCK_SH)); - $this->assertTrue($file->isLocked()); - $this->assertTrue($file->hasSharedLock()); - $this->assertFalse($file->hasExclusiveLock()); - fclose($fp); - - } - - /** - * @test - */ - public function canAquireSharedLockWithNonBlockingFlockCall() - { - $file = vfsStream::newFile('foo.txt')->at($this->root); - $fp = fopen(vfsStream::url('root/foo.txt'), 'rb'); - $this->assertTrue(flock($fp, LOCK_SH | LOCK_NB)); - $this->assertTrue($file->isLocked()); - $this->assertTrue($file->hasSharedLock()); - $this->assertFalse($file->hasExclusiveLock()); - fclose($fp); - - } - - /** - * @test - */ - public function canAquireEclusiveLock() - { - $file = vfsStream::newFile('foo.txt')->at($this->root); - $fp = fopen(vfsStream::url('root/foo.txt'), 'rb'); - $this->assertTrue(flock($fp, LOCK_EX)); - $this->assertTrue($file->isLocked()); - $this->assertFalse($file->hasSharedLock()); - $this->assertTrue($file->hasExclusiveLock()); - fclose($fp); - } - - /** - * @test - */ - public function canAquireEclusiveLockWithNonBlockingFlockCall() - { - $file = vfsStream::newFile('foo.txt')->at($this->root); - $fp = fopen(vfsStream::url('root/foo.txt'), 'rb'); - $this->assertTrue(flock($fp, LOCK_EX | LOCK_NB)); - $this->assertTrue($file->isLocked()); - $this->assertFalse($file->hasSharedLock()); - $this->assertTrue($file->hasExclusiveLock()); - fclose($fp); - } - - /** - * @test - */ - public function canRemoveLock() - { - $file = vfsStream::newFile('foo.txt')->at($this->root); - $fp = fopen(vfsStream::url('root/foo.txt'), 'rb'); - $file->lock($fp, LOCK_EX); - $this->assertTrue(flock($fp, LOCK_UN)); - $this->assertFalse($file->isLocked()); - $this->assertFalse($file->hasSharedLock()); - $this->assertFalse($file->hasExclusiveLock()); - fclose($fp); - } - - /** - * @see https://github.com/mikey179/vfsStream/issues/40 - * @test - * @group issue_40 - */ - public function canRemoveLockWhenNotLocked() - { - $file = vfsStream::newFile('foo.txt')->at($this->root); - $fp = fopen(vfsStream::url('root/foo.txt'), 'rb'); - $this->assertTrue(flock($fp, LOCK_UN)); - $this->assertFalse($file->isLocked()); - $this->assertFalse($file->hasSharedLock()); - $this->assertFalse($file->hasSharedLock($fp)); - $this->assertFalse($file->hasExclusiveLock()); - $this->assertFalse($file->hasExclusiveLock($fp)); - fclose($fp); - } - - /** - * @see https://github.com/mikey179/vfsStream/issues/40 - * @test - * @group issue_40 - */ - public function canRemoveSharedLockWithoutRemovingSharedLockOnOtherFileHandler() - { - $file = vfsStream::newFile('foo.txt')->at($this->root); - $fp1 = fopen(vfsStream::url('root/foo.txt'), 'rb'); - $fp2 = fopen(vfsStream::url('root/foo.txt'), 'rb'); - $file->lock($fp1, LOCK_SH); - $file->lock($fp2, LOCK_SH); - $this->assertTrue(flock($fp1, LOCK_UN)); - $this->assertTrue($file->hasSharedLock()); - $this->assertFalse($file->hasSharedLock($fp1)); - $this->assertTrue($file->hasSharedLock($fp2)); - fclose($fp1); - fclose($fp2); - } - - /** - * @see https://github.com/mikey179/vfsStream/issues/40 - * @test - * @group issue_40 - */ - public function canNotRemoveSharedLockAcquiredOnOtherFileHandler() - { - $file = vfsStream::newFile('foo.txt')->at($this->root); - $fp1 = fopen(vfsStream::url('root/foo.txt'), 'rb'); - $fp2 = fopen(vfsStream::url('root/foo.txt'), 'rb'); - $file->lock($fp1, LOCK_SH); - $this->assertTrue(flock($fp2, LOCK_UN)); - $this->assertTrue($file->isLocked()); - $this->assertTrue($file->hasSharedLock()); - $this->assertFalse($file->hasExclusiveLock()); - fclose($fp1); - fclose($fp2); - } - - /** - * @see https://github.com/mikey179/vfsStream/issues/40 - * @test - * @group issue_40 - */ - public function canNotRemoveExlusiveLockAcquiredOnOtherFileHandler() - { - $file = vfsStream::newFile('foo.txt')->at($this->root); - $fp1 = fopen(vfsStream::url('root/foo.txt'), 'rb'); - $fp2 = fopen(vfsStream::url('root/foo.txt'), 'rb'); - $file->lock($fp1, LOCK_EX); - $this->assertTrue(flock($fp2, LOCK_UN)); - $this->assertTrue($file->isLocked()); - $this->assertFalse($file->hasSharedLock()); - $this->assertTrue($file->hasExclusiveLock()); - fclose($fp1); - fclose($fp2); - } - - /** - * @test - */ - public function canRemoveLockWithNonBlockingFlockCall() - { - $file = vfsStream::newFile('foo.txt')->at($this->root); - $fp = fopen(vfsStream::url('root/foo.txt'), 'rb'); - $file->lock($fp, LOCK_EX); - $this->assertTrue(flock($fp, LOCK_UN | LOCK_NB)); - $this->assertFalse($file->isLocked()); - $this->assertFalse($file->hasSharedLock()); - $this->assertFalse($file->hasExclusiveLock()); - fclose($fp); - } - - /** - * @see https://github.com/mikey179/vfsStream/issues/40 - * @test - * @group issue_40 - */ - public function canNotAquireExclusiveLockIfAlreadyExclusivelyLockedOnOtherFileHandler() - { - $file = vfsStream::newFile('foo.txt')->at($this->root); - $fp1 = fopen(vfsStream::url('root/foo.txt'), 'rb'); - $fp2 = fopen(vfsStream::url('root/foo.txt'), 'rb'); - $file->lock($fp1, LOCK_EX); - $this->assertFalse(flock($fp2, LOCK_EX + LOCK_NB)); - $this->assertTrue($file->isLocked()); - $this->assertFalse($file->hasSharedLock()); - $this->assertTrue($file->hasExclusiveLock()); - $this->assertTrue($file->hasExclusiveLock($fp1)); - $this->assertFalse($file->hasExclusiveLock($fp2)); - fclose($fp1); - fclose($fp2); - } - - /** - * @see https://github.com/mikey179/vfsStream/issues/40 - * @test - * @group issue_40 - */ - public function canAquireExclusiveLockIfAlreadySelfExclusivelyLocked() - { - $file = vfsStream::newFile('foo.txt')->at($this->root); - $fp = fopen(vfsStream::url('root/foo.txt'), 'rb'); - $file->lock($fp, LOCK_EX); - $this->assertTrue(flock($fp, LOCK_EX + LOCK_NB)); - $this->assertTrue($file->isLocked()); - $this->assertFalse($file->hasSharedLock()); - $this->assertTrue($file->hasExclusiveLock()); - fclose($fp); - } - - /** - * @see https://github.com/mikey179/vfsStream/issues/40 - * @test - * @group issue_40 - */ - public function canNotAquireExclusiveLockIfAlreadySharedLockedOnOtherFileHandler() - { - $file = vfsStream::newFile('foo.txt')->at($this->root); - $fp1 = fopen(vfsStream::url('root/foo.txt'), 'rb'); - $fp2 = fopen(vfsStream::url('root/foo.txt'), 'rb'); - $file->lock($fp1, LOCK_SH); - $this->assertFalse(flock($fp2, LOCK_EX)); - $this->assertTrue($file->isLocked()); - $this->assertTrue($file->hasSharedLock()); - $this->assertFalse($file->hasExclusiveLock()); - fclose($fp1); - fclose($fp2); - } - - /** - * @see https://github.com/mikey179/vfsStream/issues/40 - * @test - * @group issue_40 - */ - public function canAquireExclusiveLockIfAlreadySelfSharedLocked() - { - $file = vfsStream::newFile('foo.txt')->at($this->root); - $fp = fopen(vfsStream::url('root/foo.txt'), 'rb'); - $file->lock($fp, LOCK_SH); - $this->assertTrue(flock($fp, LOCK_EX)); - $this->assertTrue($file->isLocked()); - $this->assertFalse($file->hasSharedLock()); - $this->assertTrue($file->hasExclusiveLock()); - fclose($fp); - } - - /** - * @see https://github.com/mikey179/vfsStream/issues/40 - * @test - * @group issue_40 - */ - public function canNotAquireSharedLockIfAlreadyExclusivelyLockedOnOtherFileHandler() - { - $file = vfsStream::newFile('foo.txt')->at($this->root); - $fp1 = fopen(vfsStream::url('root/foo.txt'), 'rb'); - $fp2 = fopen(vfsStream::url('root/foo.txt'), 'rb'); - $file->lock($fp1, LOCK_EX); - $this->assertFalse(flock($fp2, LOCK_SH + LOCK_NB)); - $this->assertTrue($file->isLocked()); - $this->assertFalse($file->hasSharedLock()); - $this->assertTrue($file->hasExclusiveLock()); - fclose($fp1); - fclose($fp2); - } - - /** - * @see https://github.com/mikey179/vfsStream/issues/40 - * @test - * @group issue_40 - */ - public function canAquireSharedLockIfAlreadySelfExclusivelyLocked() - { - $file = vfsStream::newFile('foo.txt')->at($this->root); - $fp = fopen(vfsStream::url('root/foo.txt'), 'rb'); - $file->lock($fp, LOCK_EX); - $this->assertTrue(flock($fp, LOCK_SH + LOCK_NB)); - $this->assertTrue($file->isLocked()); - $this->assertTrue($file->hasSharedLock()); - $this->assertFalse($file->hasExclusiveLock()); - fclose($fp); - } - - /** - * @see https://github.com/mikey179/vfsStream/issues/40 - * @test - * @group issue_40 - */ - public function canAquireSharedLockIfAlreadySelfSharedLocked() - { - $file = vfsStream::newFile('foo.txt')->at($this->root); - $fp = fopen(vfsStream::url('root/foo.txt'), 'rb'); - $file->lock($fp, LOCK_SH); - $this->assertTrue(flock($fp, LOCK_SH)); - $this->assertTrue($file->isLocked()); - $this->assertTrue($file->hasSharedLock()); - $this->assertFalse($file->hasExclusiveLock()); - fclose($fp); - } - - /** - * @see https://github.com/mikey179/vfsStream/issues/40 - * @test - * @group issue_40 - */ - public function canAquireSharedLockIfAlreadySharedLockedOnOtherFileHandler() - { - $file = vfsStream::newFile('foo.txt')->at($this->root); - $fp1 = fopen(vfsStream::url('root/foo.txt'), 'rb'); - $fp2 = fopen(vfsStream::url('root/foo.txt'), 'rb'); - $file->lock($fp1, LOCK_SH); - $this->assertTrue(flock($fp2, LOCK_SH)); - $this->assertTrue($file->isLocked()); - $this->assertTrue($file->hasSharedLock()); - $this->assertTrue($file->hasSharedLock($fp1)); - $this->assertTrue($file->hasSharedLock($fp2)); - $this->assertFalse($file->hasExclusiveLock()); - fclose($fp1); - fclose($fp2); - } - - /** - * @see https://github.com/mikey179/vfsStream/issues/31 - * @see https://github.com/mikey179/vfsStream/issues/40 - * @test - * @group issue_31 - * @group issue_40 - */ - public function removesExclusiveLockOnStreamClose() - { - $file = vfsStream::newFile('foo.txt')->at($this->root); - $fp = fopen(vfsStream::url('root/foo.txt'), 'rb'); - $file->lock($fp, LOCK_EX); - fclose($fp); - $this->assertFalse($file->isLocked()); - $this->assertFalse($file->hasSharedLock()); - $this->assertFalse($file->hasExclusiveLock()); - } - - /** - * @see https://github.com/mikey179/vfsStream/issues/31 - * @see https://github.com/mikey179/vfsStream/issues/40 - * @test - * @group issue_31 - * @group issue_40 - */ - public function removesSharedLockOnStreamClose() - { - $file = vfsStream::newFile('foo.txt')->at($this->root); - $fp = fopen(vfsStream::url('root/foo.txt'), 'rb'); - $file->lock($fp, LOCK_SH); - fclose($fp); - $this->assertFalse($file->isLocked()); - $this->assertFalse($file->hasSharedLock()); - $this->assertFalse($file->hasExclusiveLock()); - } - - /** - * @see https://github.com/mikey179/vfsStream/issues/40 - * @test - * @group issue_40 - */ - public function notRemovesExclusiveLockOnStreamCloseIfExclusiveLockAcquiredOnOtherFileHandler() - { - $file = vfsStream::newFile('foo.txt')->at($this->root); - $fp1 = fopen(vfsStream::url('root/foo.txt'), 'rb'); - $fp2 = fopen(vfsStream::url('root/foo.txt'), 'rb'); - $file->lock($fp2, LOCK_EX); - fclose($fp1); - $this->assertTrue($file->isLocked()); - $this->assertFalse($file->hasSharedLock()); - $this->assertTrue($file->hasExclusiveLock()); - $this->assertTrue($file->hasExclusiveLock($fp2)); - fclose($fp2); - } - - /** - * @see https://github.com/mikey179/vfsStream/issues/40 - * @test - * @group issue_40 - */ - public function notRemovesSharedLockOnStreamCloseIfSharedLockAcquiredOnOtherFileHandler() - { - $file = vfsStream::newFile('foo.txt')->at($this->root); - $fp1 = fopen(vfsStream::url('root/foo.txt'), 'rb'); - $fp2 = fopen(vfsStream::url('root/foo.txt'), 'rb'); - $file->lock($fp2, LOCK_SH); - fclose($fp1); - $this->assertTrue($file->isLocked()); - $this->assertTrue($file->hasSharedLock()); - $this->assertTrue($file->hasSharedLock($fp2)); - $this->assertFalse($file->hasExclusiveLock()); - fclose($fp2); - } -} -?> \ No newline at end of file diff --git a/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperLargeFileTestCase.php b/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperLargeFileTestCase.php deleted file mode 100644 index ca1a3f5..0000000 --- a/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperLargeFileTestCase.php +++ /dev/null @@ -1,77 +0,0 @@ -largeFile = vfsStream::newFile('large.txt') - ->withContent(LargeFileContent::withGigabytes(100)) - ->at($root); - } - - /** - * @test - */ - public function hasLargeFileSize() - { - $this->assertEquals( - 100 * 1024 * 1024 * 1024, - filesize($this->largeFile->url()) - ); - } - - /** - * @test - */ - public function canReadFromLargeFile() - { - $fp = fopen($this->largeFile->url(), 'rb'); - $data = fread($fp, 15); - fclose($fp); - $this->assertEquals(str_repeat(' ', 15), $data); - } - - /** - * @test - */ - public function canWriteIntoLargeFile() - { - $fp = fopen($this->largeFile->url(), 'rb+'); - fseek($fp, 100 * 1024 * 1024, SEEK_SET); - fwrite($fp, 'foobarbaz'); - fclose($fp); - $this->largeFile->seek((100 * 1024 * 1024) - 3, SEEK_SET); - $this->assertEquals( - ' foobarbaz ', - $this->largeFile->read(15) - ); - } -} diff --git a/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperQuotaTestCase.php b/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperQuotaTestCase.php deleted file mode 100644 index afaeb47..0000000 --- a/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperQuotaTestCase.php +++ /dev/null @@ -1,224 +0,0 @@ -root = vfsStream::setup(); - vfsStream::setQuota(10); - } - - /** - * @test - */ - public function writeLessThanQuotaWritesEverything() - { - $this->assertEquals(9, file_put_contents(vfsStream::url('root/file.txt'), '123456789')); - $this->assertEquals('123456789', $this->root->getChild('file.txt')->getContent()); - } - - /** - * @test - */ - public function writeUpToQotaWritesEverything() - { - $this->assertEquals(10, file_put_contents(vfsStream::url('root/file.txt'), '1234567890')); - $this->assertEquals('1234567890', $this->root->getChild('file.txt')->getContent()); - } - - /** - * @test - */ - public function writeMoreThanQotaWritesOnlyUpToQuota() - { - try { - file_put_contents(vfsStream::url('root/file.txt'), '12345678901'); - } catch (\PHPUnit_Framework_Error $e) { - $this->assertEquals('file_put_contents(): Only 10 of 11 bytes written, possibly out of free disk space', - $e->getMessage() - ); - } - - $this->assertEquals('1234567890', $this->root->getChild('file.txt')->getContent()); - } - - /** - * @test - */ - public function considersAllFilesForQuota() - { - vfsStream::newFile('foo.txt') - ->withContent('foo') - ->at(vfsStream::newDirectory('bar') - ->at($this->root) - ); - try { - file_put_contents(vfsStream::url('root/file.txt'), '12345678901'); - } catch (\PHPUnit_Framework_Error $e) { - $this->assertEquals('file_put_contents(): Only 7 of 11 bytes written, possibly out of free disk space', - $e->getMessage() - ); - } - - $this->assertEquals('1234567', $this->root->getChild('file.txt')->getContent()); - } - - /** - * @test - * @group issue_33 - */ - public function truncateToLessThanQuotaWritesEverything() - { - if (version_compare(PHP_VERSION, '5.4.0', '<')) { - $this->markTestSkipped('Requires PHP 5.4'); - } - - if (strstr(PHP_VERSION, 'hiphop') !== false) { - $this->markTestSkipped('Not supported on hhvm'); - } - - $fp = fopen(vfsStream::url('root/file.txt'), 'w+'); - $this->assertTrue(ftruncate($fp, 9)); - fclose($fp); - $this->assertEquals(9, - $this->root->getChild('file.txt')->size() - ); - $this->assertEquals("\0\0\0\0\0\0\0\0\0", - $this->root->getChild('file.txt')->getContent() - ); - } - - /** - * @test - * @group issue_33 - */ - public function truncateUpToQotaWritesEverything() - { - if (version_compare(PHP_VERSION, '5.4.0', '<')) { - $this->markTestSkipped('Requires PHP 5.4'); - } - - if (strstr(PHP_VERSION, 'hiphop') !== false) { - $this->markTestSkipped('Not supported on hhvm'); - } - - $fp = fopen(vfsStream::url('root/file.txt'), 'w+'); - $this->assertTrue(ftruncate($fp, 10)); - fclose($fp); - $this->assertEquals(10, - $this->root->getChild('file.txt')->size() - ); - $this->assertEquals("\0\0\0\0\0\0\0\0\0\0", - $this->root->getChild('file.txt')->getContent() - ); - } - - /** - * @test - * @group issue_33 - */ - public function truncateToMoreThanQotaWritesOnlyUpToQuota() - { - if (version_compare(PHP_VERSION, '5.4.0', '<')) { - $this->markTestSkipped('Requires PHP 5.4'); - } - - if (strstr(PHP_VERSION, 'hiphop') !== false) { - $this->markTestSkipped('Not supported on hhvm'); - } - - $fp = fopen(vfsStream::url('root/file.txt'), 'w+'); - $this->assertTrue(ftruncate($fp, 11)); - fclose($fp); - $this->assertEquals(10, - $this->root->getChild('file.txt')->size() - ); - $this->assertEquals("\0\0\0\0\0\0\0\0\0\0", - $this->root->getChild('file.txt')->getContent() - ); - } - - /** - * @test - * @group issue_33 - */ - public function truncateConsidersAllFilesForQuota() - { - if (version_compare(PHP_VERSION, '5.4.0', '<')) { - $this->markTestSkipped('Requires PHP 5.4'); - } - - if (strstr(PHP_VERSION, 'hiphop') !== false) { - $this->markTestSkipped('Not supported on hhvm'); - } - - vfsStream::newFile('bar.txt') - ->withContent('bar') - ->at(vfsStream::newDirectory('bar') - ->at($this->root) - ); - $fp = fopen(vfsStream::url('root/file.txt'), 'w+'); - $this->assertTrue(ftruncate($fp, 11)); - fclose($fp); - $this->assertEquals(7, - $this->root->getChild('file.txt')->size() - ); - $this->assertEquals("\0\0\0\0\0\0\0", - $this->root->getChild('file.txt')->getContent() - ); - } - - /** - * @test - * @group issue_33 - */ - public function canNotTruncateToGreaterLengthWhenDiscQuotaReached() - { - if (version_compare(PHP_VERSION, '5.4.0', '<')) { - $this->markTestSkipped('Requires PHP 5.4'); - } - - if (strstr(PHP_VERSION, 'hiphop') !== false) { - $this->markTestSkipped('Not supported on hhvm'); - } - - vfsStream::newFile('bar.txt') - ->withContent('1234567890') - ->at(vfsStream::newDirectory('bar') - ->at($this->root) - ); - $fp = fopen(vfsStream::url('root/file.txt'), 'w+'); - $this->assertFalse(ftruncate($fp, 11)); - fclose($fp); - $this->assertEquals(0, - $this->root->getChild('file.txt')->size() - ); - $this->assertEquals('', - $this->root->getChild('file.txt')->getContent() - ); - } -} -?> \ No newline at end of file diff --git a/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperSetOptionTestCase.php b/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperSetOptionTestCase.php deleted file mode 100644 index aa86bd3..0000000 --- a/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperSetOptionTestCase.php +++ /dev/null @@ -1,76 +0,0 @@ -root = vfsStream::setup(); - vfsStream::newFile('foo.txt')->at($this->root); - } - - /** - * @test - */ - public function setBlockingDoesNotWork() - { - $fp = fopen(vfsStream::url('root/foo.txt'), 'rb'); - $this->assertFalse(stream_set_blocking($fp, 1)); - fclose($fp); - } - - /** - * @test - */ - public function removeBlockingDoesNotWork() - { - $fp = fopen(vfsStream::url('root/foo.txt'), 'rb'); - $this->assertFalse(stream_set_blocking($fp, 0)); - fclose($fp); - } - - /** - * @test - */ - public function setTimeoutDoesNotWork() - { - $fp = fopen(vfsStream::url('root/foo.txt'), 'rb'); - $this->assertFalse(stream_set_timeout($fp, 1)); - fclose($fp); - } - - /** - * @test - */ - public function setWriteBufferDoesNotWork() - { - $fp = fopen(vfsStream::url('root/foo.txt'), 'rb'); - $this->assertEquals(-1, stream_set_write_buffer($fp, 512)); - fclose($fp); - } -} -?> \ No newline at end of file diff --git a/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperStreamSelectTestCase.php b/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperStreamSelectTestCase.php deleted file mode 100644 index c2aec99..0000000 --- a/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperStreamSelectTestCase.php +++ /dev/null @@ -1,35 +0,0 @@ -at($root)->withContent('testContent'); - - $fp = fopen(vfsStream::url('root/foo.txt'), 'rb'); - $readarray = array($fp); - $writearray = array(); - $exceptarray = array(); - stream_select($readarray, $writearray, $exceptarray, 1); - } -} -?> \ No newline at end of file diff --git a/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperTestCase.php b/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperTestCase.php deleted file mode 100644 index 425fd41..0000000 --- a/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperTestCase.php +++ /dev/null @@ -1,770 +0,0 @@ -assertSame($this->foo, vfsStreamWrapper::getRoot()); - vfsStreamWrapper::register(); - $this->assertNull(vfsStreamWrapper::getRoot()); - } - - /** - * @test - * @since 0.11.0 - */ - public function setRootReturnsRoot() - { - vfsStreamWrapper::register(); - $root = vfsStream::newDirectory('root'); - $this->assertSame($root, vfsStreamWrapper::setRoot($root)); - } - - /** - * assure that filesize is returned correct - * - * @test - */ - public function filesize() - { - $this->assertEquals(0, filesize($this->fooURL)); - $this->assertEquals(0, filesize($this->fooURL . '/.')); - $this->assertEquals(0, filesize($this->barURL)); - $this->assertEquals(0, filesize($this->barURL . '/.')); - $this->assertEquals(4, filesize($this->baz2URL)); - $this->assertEquals(5, filesize($this->baz1URL)); - } - - /** - * assert that file_exists() delivers correct result - * - * @test - */ - public function file_exists() - { - $this->assertTrue(file_exists($this->fooURL)); - $this->assertTrue(file_exists($this->fooURL . '/.')); - $this->assertTrue(file_exists($this->barURL)); - $this->assertTrue(file_exists($this->barURL . '/.')); - $this->assertTrue(file_exists($this->baz1URL)); - $this->assertTrue(file_exists($this->baz2URL)); - $this->assertFalse(file_exists($this->fooURL . '/another')); - $this->assertFalse(file_exists(vfsStream::url('another'))); - } - - /** - * assert that filemtime() delivers correct result - * - * @test - */ - public function filemtime() - { - $this->assertEquals(100, filemtime($this->fooURL)); - $this->assertEquals(100, filemtime($this->fooURL . '/.')); - $this->assertEquals(200, filemtime($this->barURL)); - $this->assertEquals(200, filemtime($this->barURL . '/.')); - $this->assertEquals(300, filemtime($this->baz1URL)); - $this->assertEquals(400, filemtime($this->baz2URL)); - } - - /** - * @test - * @group issue_23 - */ - public function unlinkRemovesFilesOnly() - { - $this->assertTrue(unlink($this->baz2URL)); - $this->assertFalse(file_exists($this->baz2URL)); // make sure statcache was cleared - $this->assertEquals(array($this->bar), $this->foo->getChildren()); - $this->assertFalse(@unlink($this->fooURL . '/another')); - $this->assertFalse(@unlink(vfsStream::url('another'))); - $this->assertEquals(array($this->bar), $this->foo->getChildren()); - } - - /** - * @test - * @group issue_49 - */ - public function unlinkReturnsFalseWhenFileDoesNotExist() - { - vfsStream::setup()->addChild(vfsStream::newFile('foo.blubb')); - $this->assertFalse(@unlink(vfsStream::url('foo.blubb2'))); - } - - /** - * @test - * @group issue_49 - */ - public function unlinkReturnsFalseWhenFileDoesNotExistAndFileWithSameNameExistsInRoot() - { - vfsStream::setup()->addChild(vfsStream::newFile('foo.blubb')); - $this->assertFalse(@unlink(vfsStream::url('foo.blubb'))); - } - - /** - * assert dirname() returns correct directory name - * - * @test - */ - public function dirname() - { - $this->assertEquals($this->fooURL, dirname($this->barURL)); - $this->assertEquals($this->barURL, dirname($this->baz1URL)); - # returns "vfs:" instead of "." - # however this seems not to be fixable because dirname() does not - # call the stream wrapper - #$this->assertEquals(dirname(vfsStream::url('doesNotExist')), '.'); - } - - /** - * assert basename() returns correct file name - * - * @test - */ - public function basename() - { - $this->assertEquals('bar', basename($this->barURL)); - $this->assertEquals('baz1', basename($this->baz1URL)); - $this->assertEquals('doesNotExist', basename(vfsStream::url('doesNotExist'))); - } - - /** - * assert is_readable() works correct - * - * @test - */ - public function is_readable() - { - $this->assertTrue(is_readable($this->fooURL)); - $this->assertTrue(is_readable($this->fooURL . '/.')); - $this->assertTrue(is_readable($this->barURL)); - $this->assertTrue(is_readable($this->barURL . '/.')); - $this->assertTrue(is_readable($this->baz1URL)); - $this->assertTrue(is_readable($this->baz2URL)); - $this->assertFalse(is_readable($this->fooURL . '/another')); - $this->assertFalse(is_readable(vfsStream::url('another'))); - - $this->foo->chmod(0222); - $this->assertFalse(is_readable($this->fooURL)); - - $this->baz1->chmod(0222); - $this->assertFalse(is_readable($this->baz1URL)); - } - - /** - * assert is_writable() works correct - * - * @test - */ - public function is_writable() - { - $this->assertTrue(is_writable($this->fooURL)); - $this->assertTrue(is_writable($this->fooURL . '/.')); - $this->assertTrue(is_writable($this->barURL)); - $this->assertTrue(is_writable($this->barURL . '/.')); - $this->assertTrue(is_writable($this->baz1URL)); - $this->assertTrue(is_writable($this->baz2URL)); - $this->assertFalse(is_writable($this->fooURL . '/another')); - $this->assertFalse(is_writable(vfsStream::url('another'))); - - $this->foo->chmod(0444); - $this->assertFalse(is_writable($this->fooURL)); - - $this->baz1->chmod(0444); - $this->assertFalse(is_writable($this->baz1URL)); - } - - /** - * assert is_executable() works correct - * - * @test - */ - public function is_executable() - { - $this->assertFalse(is_executable($this->baz1URL)); - $this->baz1->chmod(0766); - $this->assertTrue(is_executable($this->baz1URL)); - $this->assertFalse(is_executable($this->baz2URL)); - } - - /** - * assert is_executable() works correct - * - * @test - */ - public function directoriesAndNonExistingFilesAreNeverExecutable() - { - $this->assertFalse(is_executable($this->fooURL)); - $this->assertFalse(is_executable($this->fooURL . '/.')); - $this->assertFalse(is_executable($this->barURL)); - $this->assertFalse(is_executable($this->barURL . '/.')); - $this->assertFalse(is_executable($this->fooURL . '/another')); - $this->assertFalse(is_executable(vfsStream::url('another'))); - } - - /** - * file permissions - * - * @test - * @group permissions - */ - public function chmod() - { - $this->assertEquals(40777, decoct(fileperms($this->fooURL))); - $this->assertEquals(40777, decoct(fileperms($this->fooURL . '/.'))); - $this->assertEquals(40777, decoct(fileperms($this->barURL))); - $this->assertEquals(40777, decoct(fileperms($this->barURL . '/.'))); - $this->assertEquals(100666, decoct(fileperms($this->baz1URL))); - $this->assertEquals(100666, decoct(fileperms($this->baz2URL))); - - $this->foo->chmod(0755); - $this->bar->chmod(0700); - $this->baz1->chmod(0644); - $this->baz2->chmod(0600); - $this->assertEquals(40755, decoct(fileperms($this->fooURL))); - $this->assertEquals(40755, decoct(fileperms($this->fooURL . '/.'))); - $this->assertEquals(40700, decoct(fileperms($this->barURL))); - $this->assertEquals(40700, decoct(fileperms($this->barURL . '/.'))); - $this->assertEquals(100644, decoct(fileperms($this->baz1URL))); - $this->assertEquals(100600, decoct(fileperms($this->baz2URL))); - } - - /** - * @test - * @group issue_11 - * @group permissions - */ - public function chmodModifiesPermissions() - { - if (version_compare(phpversion(), '5.4.0', '<')) { - $this->assertFalse(@chmod($this->fooURL, 0755)); - $this->assertFalse(@chmod($this->barURL, 0711)); - $this->assertFalse(@chmod($this->baz1URL, 0644)); - $this->assertFalse(@chmod($this->baz2URL, 0664)); - $this->assertEquals(40777, decoct(fileperms($this->fooURL))); - $this->assertEquals(40777, decoct(fileperms($this->barURL))); - $this->assertEquals(100666, decoct(fileperms($this->baz1URL))); - $this->assertEquals(100666, decoct(fileperms($this->baz2URL))); - } else { - $this->assertTrue(chmod($this->fooURL, 0755)); - $this->assertTrue(chmod($this->barURL, 0711)); - $this->assertTrue(chmod($this->baz1URL, 0644)); - $this->assertTrue(chmod($this->baz2URL, 0664)); - $this->assertEquals(40755, decoct(fileperms($this->fooURL))); - $this->assertEquals(40711, decoct(fileperms($this->barURL))); - $this->assertEquals(100644, decoct(fileperms($this->baz1URL))); - $this->assertEquals(100664, decoct(fileperms($this->baz2URL))); - } - } - - /** - * @test - * @group permissions - */ - public function fileownerIsCurrentUserByDefault() - { - $this->assertEquals(vfsStream::getCurrentUser(), fileowner($this->fooURL)); - $this->assertEquals(vfsStream::getCurrentUser(), fileowner($this->fooURL . '/.')); - $this->assertEquals(vfsStream::getCurrentUser(), fileowner($this->barURL)); - $this->assertEquals(vfsStream::getCurrentUser(), fileowner($this->barURL . '/.')); - $this->assertEquals(vfsStream::getCurrentUser(), fileowner($this->baz1URL)); - $this->assertEquals(vfsStream::getCurrentUser(), fileowner($this->baz2URL)); - } - - /** - * @test - * @group issue_11 - * @group permissions - */ - public function chownChangesUser() - { - if (version_compare(phpversion(), '5.4.0', '<')) { - $this->foo->chown(vfsStream::OWNER_USER_1); - $this->bar->chown(vfsStream::OWNER_USER_1); - $this->baz1->chown(vfsStream::OWNER_USER_2); - $this->baz2->chown(vfsStream::OWNER_USER_2); - } else { - chown($this->fooURL, vfsStream::OWNER_USER_1); - chown($this->barURL, vfsStream::OWNER_USER_1); - chown($this->baz1URL, vfsStream::OWNER_USER_2); - chown($this->baz2URL, vfsStream::OWNER_USER_2); - } - - $this->assertEquals(vfsStream::OWNER_USER_1, fileowner($this->fooURL)); - $this->assertEquals(vfsStream::OWNER_USER_1, fileowner($this->fooURL . '/.')); - $this->assertEquals(vfsStream::OWNER_USER_1, fileowner($this->barURL)); - $this->assertEquals(vfsStream::OWNER_USER_1, fileowner($this->barURL . '/.')); - $this->assertEquals(vfsStream::OWNER_USER_2, fileowner($this->baz1URL)); - $this->assertEquals(vfsStream::OWNER_USER_2, fileowner($this->baz2URL)); - } - - /** - * @test - * @group issue_11 - * @group permissions - */ - public function chownDoesNotWorkOnVfsStreamUrls() - { - if (version_compare(phpversion(), '5.4.0', '<')) { - $this->assertFalse(@chown($this->fooURL, vfsStream::OWNER_USER_2)); - $this->assertEquals(vfsStream::getCurrentUser(), fileowner($this->fooURL)); - } - } - - /** - * @test - * @group issue_11 - * @group permissions - */ - public function groupIsCurrentGroupByDefault() - { - $this->assertEquals(vfsStream::getCurrentGroup(), filegroup($this->fooURL)); - $this->assertEquals(vfsStream::getCurrentGroup(), filegroup($this->fooURL . '/.')); - $this->assertEquals(vfsStream::getCurrentGroup(), filegroup($this->barURL)); - $this->assertEquals(vfsStream::getCurrentGroup(), filegroup($this->barURL . '/.')); - $this->assertEquals(vfsStream::getCurrentGroup(), filegroup($this->baz1URL)); - $this->assertEquals(vfsStream::getCurrentGroup(), filegroup($this->baz2URL)); - } - - /** - * @test - * @group issue_11 - * @group permissions - */ - public function chgrp() - { - if (version_compare(phpversion(), '5.4.0', '<')) { - $this->foo->chgrp(vfsStream::GROUP_USER_1); - $this->bar->chgrp(vfsStream::GROUP_USER_1); - $this->baz1->chgrp(vfsStream::GROUP_USER_2); - $this->baz2->chgrp(vfsStream::GROUP_USER_2); - } else { - chgrp($this->fooURL, vfsStream::GROUP_USER_1); - chgrp($this->barURL, vfsStream::GROUP_USER_1); - chgrp($this->baz1URL, vfsStream::GROUP_USER_2); - chgrp($this->baz2URL, vfsStream::GROUP_USER_2); - } - - $this->assertEquals(vfsStream::GROUP_USER_1, filegroup($this->fooURL)); - $this->assertEquals(vfsStream::GROUP_USER_1, filegroup($this->fooURL . '/.')); - $this->assertEquals(vfsStream::GROUP_USER_1, filegroup($this->barURL)); - $this->assertEquals(vfsStream::GROUP_USER_1, filegroup($this->barURL . '/.')); - $this->assertEquals(vfsStream::GROUP_USER_2, filegroup($this->baz1URL)); - $this->assertEquals(vfsStream::GROUP_USER_2, filegroup($this->baz2URL)); - } - - /** - * @test - * @group issue_11 - * @group permissions - */ - public function chgrpDoesNotWorkOnVfsStreamUrls() - { - if (version_compare(phpversion(), '5.4.0', '<')) { - $this->assertFalse(@chgrp($this->fooURL, vfsStream::GROUP_USER_2)); - $this->assertEquals(vfsStream::getCurrentGroup(), filegroup($this->fooURL)); - } - } - - /** - * @test - * @author Benoit Aubuchon - */ - public function renameDirectory() - { - // move foo/bar to foo/baz3 - $baz3URL = vfsStream::url('foo/baz3'); - $this->assertTrue(rename($this->barURL, $baz3URL)); - $this->assertFileExists($baz3URL); - $this->assertFileNotExists($this->barURL); - } - - /** - * @test - */ - public function renameDirectoryWithDots() - { - // move foo/bar to foo/baz3 - $baz3URL = vfsStream::url('foo/baz3'); - $this->assertTrue(rename($this->barURL . '/.', $baz3URL)); - $this->assertFileExists($baz3URL); - $this->assertFileNotExists($this->barURL); - } - - /** - * @test - * @group issue_9 - * @since 0.9.0 - */ - public function renameDirectoryWithDotsInTarget() - { - // move foo/bar to foo/baz3 - $baz3URL = vfsStream::url('foo/../foo/baz3/.'); - $this->assertTrue(rename($this->barURL . '/.', $baz3URL)); - $this->assertFileExists($baz3URL); - $this->assertFileNotExists($this->barURL); - } - - /** - * @test - * @author Benoit Aubuchon - */ - public function renameDirectoryOverwritingExistingFile() - { - // move foo/bar to foo/baz2 - $this->assertTrue(rename($this->barURL, $this->baz2URL)); - $this->assertFileExists(vfsStream::url('foo/baz2/baz1')); - $this->assertFileNotExists($this->barURL); - } - - /** - * @test - * @expectedException PHPUnit_Framework_Error - */ - public function renameFileIntoFile() - { - // foo/baz2 is a file, so it can not be turned into a directory - $baz3URL = vfsStream::url('foo/baz2/baz3'); - $this->assertTrue(rename($this->baz1URL, $baz3URL)); - $this->assertFileExists($baz3URL); - $this->assertFileNotExists($this->baz1URL); - } - - /** - * @test - * @author Benoit Aubuchon - */ - public function renameFileToDirectory() - { - // move foo/bar/baz1 to foo/baz3 - $baz3URL = vfsStream::url('foo/baz3'); - $this->assertTrue(rename($this->baz1URL, $baz3URL)); - $this->assertFileExists($this->barURL); - $this->assertFileExists($baz3URL); - $this->assertFileNotExists($this->baz1URL); - } - - /** - * assert that trying to rename from a non existing file trigger a warning - * - * @expectedException PHPUnit_Framework_Error - * @test - */ - public function renameOnSourceFileNotFound() - { - rename(vfsStream::url('notfound'), $this->baz1URL); - } - /** - * assert that trying to rename to a directory that is not found trigger a warning - - * @expectedException PHPUnit_Framework_Error - * @test - */ - public function renameOnDestinationDirectoryFileNotFound() - { - rename($this->baz1URL, vfsStream::url('foo/notfound/file2')); - } - /** - * stat() and fstat() should return the same result - * - * @test - */ - public function statAndFstatReturnSameResult() - { - $fp = fopen($this->baz2URL, 'r'); - $this->assertEquals(stat($this->baz2URL), - fstat($fp) - ); - fclose($fp); - } - - /** - * stat() returns full data - * - * @test - */ - public function statReturnsFullDataForFiles() - { - $this->assertEquals(array(0 => 0, - 1 => 0, - 2 => 0100666, - 3 => 0, - 4 => vfsStream::getCurrentUser(), - 5 => vfsStream::getCurrentGroup(), - 6 => 0, - 7 => 4, - 8 => 400, - 9 => 400, - 10 => 400, - 11 => -1, - 12 => -1, - 'dev' => 0, - 'ino' => 0, - 'mode' => 0100666, - 'nlink' => 0, - 'uid' => vfsStream::getCurrentUser(), - 'gid' => vfsStream::getCurrentGroup(), - 'rdev' => 0, - 'size' => 4, - 'atime' => 400, - 'mtime' => 400, - 'ctime' => 400, - 'blksize' => -1, - 'blocks' => -1 - ), - stat($this->baz2URL) - ); - } - - /** - * @test - */ - public function statReturnsFullDataForDirectories() - { - $this->assertEquals(array(0 => 0, - 1 => 0, - 2 => 0040777, - 3 => 0, - 4 => vfsStream::getCurrentUser(), - 5 => vfsStream::getCurrentGroup(), - 6 => 0, - 7 => 0, - 8 => 100, - 9 => 100, - 10 => 100, - 11 => -1, - 12 => -1, - 'dev' => 0, - 'ino' => 0, - 'mode' => 0040777, - 'nlink' => 0, - 'uid' => vfsStream::getCurrentUser(), - 'gid' => vfsStream::getCurrentGroup(), - 'rdev' => 0, - 'size' => 0, - 'atime' => 100, - 'mtime' => 100, - 'ctime' => 100, - 'blksize' => -1, - 'blocks' => -1 - ), - stat($this->fooURL) - ); - } - - /** - * @test - */ - public function statReturnsFullDataForDirectoriesWithDot() - { - $this->assertEquals(array(0 => 0, - 1 => 0, - 2 => 0040777, - 3 => 0, - 4 => vfsStream::getCurrentUser(), - 5 => vfsStream::getCurrentGroup(), - 6 => 0, - 7 => 0, - 8 => 100, - 9 => 100, - 10 => 100, - 11 => -1, - 12 => -1, - 'dev' => 0, - 'ino' => 0, - 'mode' => 0040777, - 'nlink' => 0, - 'uid' => vfsStream::getCurrentUser(), - 'gid' => vfsStream::getCurrentGroup(), - 'rdev' => 0, - 'size' => 0, - 'atime' => 100, - 'mtime' => 100, - 'ctime' => 100, - 'blksize' => -1, - 'blocks' => -1 - ), - stat($this->fooURL . '/.') - ); - } - - /** - * @test - * @expectedException PHPUnit_Framework_Error - */ - public function openFileWithoutDirectory() - { - vfsStreamWrapper::register(); - $this->assertFalse(file_get_contents(vfsStream::url('file.txt'))); - } - - /** - * @test - * @group issue_33 - * @since 1.1.0 - * @requires PHP 5.4.0 - */ - public function truncateRemovesSuperflouosContent() - { - if (strstr(PHP_VERSION, 'hiphop') !== false) { - $this->markTestSkipped('Not supported on hhvm'); - } - - $handle = fopen($this->baz1URL, "r+"); - $this->assertTrue(ftruncate($handle, 0)); - $this->assertEquals(0, filesize($this->baz1URL)); - $this->assertEquals('', file_get_contents($this->baz1URL)); - fclose($handle); - } - - /** - * @test - * @group issue_33 - * @since 1.1.0 - * @requires PHP 5.4.0 - */ - public function truncateToGreaterSizeAddsZeroBytes() - { - if (strstr(PHP_VERSION, 'hiphop') !== false) { - $this->markTestSkipped('Not supported on hhvm'); - } - - $handle = fopen($this->baz1URL, "r+"); - $this->assertTrue(ftruncate($handle, 25)); - $this->assertEquals(25, filesize($this->baz1URL)); - $this->assertEquals("baz 1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", - file_get_contents($this->baz1URL)); - fclose($handle); - } - - /** - * @test - * @group issue_11 - * @requires PHP 5.4.0 - */ - public function touchCreatesNonExistingFile() - { - $this->assertTrue(touch($this->fooURL . '/new.txt')); - $this->assertTrue($this->foo->hasChild('new.txt')); - } - - /** - * @test - * @group issue_11 - * @requires PHP 5.4.0 - */ - public function touchChangesAccessAndModificationTimeForFile() - { - $this->assertTrue(touch($this->baz1URL, 303, 313)); - $this->assertEquals(303, $this->baz1->filemtime()); - $this->assertEquals(313, $this->baz1->fileatime()); - } - - /** - * @test - * @group issue_11 - * @group issue_80 - * @requires PHP 5.4.0 - */ - public function touchChangesTimesToCurrentTimestampWhenNoTimesGiven() - { - $this->assertTrue(touch($this->baz1URL)); - $this->assertEquals(time(), $this->baz1->filemtime(), '', 1); - $this->assertEquals(time(), $this->baz1->fileatime(), '', 1); - } - - /** - * @test - * @group issue_11 - * @requires PHP 5.4.0 - */ - public function touchWithModifiedTimeChangesAccessAndModifiedTime() - { - $this->assertTrue(touch($this->baz1URL, 303)); - $this->assertEquals(303, $this->baz1->filemtime()); - $this->assertEquals(303, $this->baz1->fileatime()); - } - - /** - * @test - * @group issue_11 - * @requires PHP 5.4.0 - */ - public function touchChangesAccessAndModificationTimeForDirectory() - { - $this->assertTrue(touch($this->fooURL, 303, 313)); - $this->assertEquals(303, $this->foo->filemtime()); - $this->assertEquals(313, $this->foo->fileatime()); - } - - /** - * @test - * @group issue_34 - * @since 1.2.0 - */ - public function pathesAreCorrectlySet() - { - $this->assertEquals(vfsStream::path($this->fooURL), $this->foo->path()); - $this->assertEquals(vfsStream::path($this->barURL), $this->bar->path()); - $this->assertEquals(vfsStream::path($this->baz1URL), $this->baz1->path()); - $this->assertEquals(vfsStream::path($this->baz2URL), $this->baz2->path()); - } - - /** - * @test - * @group issue_34 - * @since 1.2.0 - */ - public function urlsAreCorrectlySet() - { - $this->assertEquals($this->fooURL, $this->foo->url()); - $this->assertEquals($this->barURL, $this->bar->url()); - $this->assertEquals($this->baz1URL, $this->baz1->url()); - $this->assertEquals($this->baz2URL, $this->baz2->url()); - } - - /** - * @test - * @group issue_34 - * @since 1.2.0 - */ - public function pathIsUpdatedAfterMove() - { - // move foo/bar/baz1 to foo/baz3 - $baz3URL = vfsStream::url('foo/baz3'); - $this->assertTrue(rename($this->baz1URL, $baz3URL)); - $this->assertEquals(vfsStream::path($baz3URL), $this->baz1->path()); - } - - /** - * @test - * @group issue_34 - * @since 1.2.0 - */ - public function urlIsUpdatedAfterMove() - { - // move foo/bar/baz1 to foo/baz3 - $baz3URL = vfsStream::url('foo/baz3'); - $this->assertTrue(rename($this->baz1URL, $baz3URL)); - $this->assertEquals($baz3URL, $this->baz1->url()); - } -} diff --git a/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperWithoutRootTestCase.php b/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperWithoutRootTestCase.php deleted file mode 100644 index 6b03066..0000000 --- a/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperWithoutRootTestCase.php +++ /dev/null @@ -1,64 +0,0 @@ - no directory to open - * - * @test - */ - public function canNotOpenDirectory() - { - $this->assertFalse(@dir(vfsStream::url('foo'))); - } - - /** - * can not unlink without root - * - * @test - */ - public function canNotUnlink() - { - $this->assertFalse(@unlink(vfsStream::url('foo'))); - } - - /** - * can not open a file without root - * - * @test - */ - public function canNotOpen() - { - $this->assertFalse(@fopen(vfsStream::url('foo'))); - } - - /** - * can not rename a file without root - * - * @test - */ - public function canNotRename() - { - $this->assertFalse(@rename(vfsStream::url('foo'), vfsStream::url('bar'))); - } -} -?> diff --git a/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamZipTestCase.php b/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamZipTestCase.php deleted file mode 100644 index 6aedcec..0000000 --- a/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamZipTestCase.php +++ /dev/null @@ -1,53 +0,0 @@ -markTestSkipped('No ext/zip installed, skipping test.'); - } - - $this->markTestSkipped('Zip extension can not work with vfsStream urls.'); - - vfsStreamWrapper::register(); - vfsStreamWrapper::setRoot(vfsStream::newDirectory('root')); - - } - - /** - * @test - */ - public function createZipArchive() - { - $zip = new ZipArchive(); - $this->assertTrue($zip->open(vfsStream::url('root/test.zip'), ZipArchive::CREATE)); - $this->assertTrue($zip->addFromString("testfile1.txt", "#1 This is a test string added as testfile1.txt.\n")); - $this->assertTrue($zip->addFromString("testfile2.txt", "#2 This is a test string added as testfile2.txt.\n")); - $zip->setArchiveComment('a test'); - var_dump($zip); - $this->assertTrue($zip->close()); - var_dump($zip->getStatusString()); - var_dump($zip->close()); - var_dump($zip->getStatusString()); - var_dump($zip); - var_dump(file_exists(vfsStream::url('root/test.zip'))); - } -} -?> \ No newline at end of file diff --git a/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/visitor/vfsStreamAbstractVisitorTestCase.php b/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/visitor/vfsStreamAbstractVisitorTestCase.php deleted file mode 100644 index d7bb49e..0000000 --- a/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/visitor/vfsStreamAbstractVisitorTestCase.php +++ /dev/null @@ -1,99 +0,0 @@ -abstractVisitor = $this->getMock('org\\bovigo\\vfs\\visitor\\vfsStreamAbstractVisitor', - array('visitFile', 'visitDirectory') - ); - } - - /** - * @test - * @expectedException \InvalidArgumentException - */ - public function visitThrowsInvalidArgumentExceptionOnUnknownContentType() - { - $mockContent = $this->getMock('org\\bovigo\\vfs\\vfsStreamContent'); - $mockContent->expects($this->any()) - ->method('getType') - ->will($this->returnValue('invalid')); - $this->assertSame($this->abstractVisitor, - $this->abstractVisitor->visit($mockContent) - ); - } - - /** - * @test - */ - public function visitWithFileCallsVisitFile() - { - $file = new vfsStreamFile('foo.txt'); - $this->abstractVisitor->expects($this->once()) - ->method('visitFile') - ->with($this->equalTo($file)); - $this->assertSame($this->abstractVisitor, - $this->abstractVisitor->visit($file) - ); - } - - /** - * tests that a block device eventually calls out to visit file - * - * @test - */ - public function visitWithBlockCallsVisitFile() - { - $block = new vfsStreamBlock('foo'); - $this->abstractVisitor->expects($this->once()) - ->method('visitFile') - ->with($this->equalTo($block)); - $this->assertSame($this->abstractVisitor, - $this->abstractVisitor->visit($block) - ); - } - - /** - * @test - */ - public function visitWithDirectoryCallsVisitDirectory() - { - $dir = new vfsStreamDirectory('bar'); - $this->abstractVisitor->expects($this->once()) - ->method('visitDirectory') - ->with($this->equalTo($dir)); - $this->assertSame($this->abstractVisitor, - $this->abstractVisitor->visit($dir) - ); - } -} -?> diff --git a/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/visitor/vfsStreamPrintVisitorTestCase.php b/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/visitor/vfsStreamPrintVisitorTestCase.php deleted file mode 100644 index 05a11ac..0000000 --- a/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/visitor/vfsStreamPrintVisitorTestCase.php +++ /dev/null @@ -1,103 +0,0 @@ -at(vfsStream::setup()); - $printVisitor = new vfsStreamPrintVisitor(fopen('vfs://root/foo.txt', 'wb')); - $this->assertSame($printVisitor, - $printVisitor->visitFile(vfsStream::newFile('bar.txt')) - ); - $this->assertEquals("- bar.txt\n", $output->getContent()); - } - - /** - * @test - */ - public function visitFileWritesBlockDeviceToStream() - { - $output = vfsStream::newFile('foo.txt') - ->at(vfsStream::setup()); - $printVisitor = new vfsStreamPrintVisitor(fopen('vfs://root/foo.txt', 'wb')); - $this->assertSame($printVisitor, - $printVisitor->visitBlockDevice(vfsStream::newBlock('bar')) - ); - $this->assertEquals("- [bar]\n", $output->getContent()); - } - - /** - * @test - */ - public function visitDirectoryWritesDirectoryNameToStream() - { - $output = vfsStream::newFile('foo.txt') - ->at(vfsStream::setup()); - $printVisitor = new vfsStreamPrintVisitor(fopen('vfs://root/foo.txt', 'wb')); - $this->assertSame($printVisitor, - $printVisitor->visitDirectory(vfsStream::newDirectory('baz')) - ); - $this->assertEquals("- baz\n", $output->getContent()); - } - - /** - * @test - */ - public function visitRecursiveDirectoryStructure() - { - $root = vfsStream::setup('root', - null, - array('test' => array('foo' => array('test.txt' => 'hello'), - 'baz.txt' => 'world' - ), - 'foo.txt' => '' - ) - ); - $printVisitor = new vfsStreamPrintVisitor(fopen('vfs://root/foo.txt', 'wb')); - $this->assertSame($printVisitor, - $printVisitor->visitDirectory($root) - ); - $this->assertEquals("- root\n - test\n - foo\n - test.txt\n - baz.txt\n - foo.txt\n", file_get_contents('vfs://root/foo.txt')); - } -} -?> diff --git a/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/visitor/vfsStreamStructureVisitorTestCase.php b/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/visitor/vfsStreamStructureVisitorTestCase.php deleted file mode 100644 index ad93a2c..0000000 --- a/core/vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/visitor/vfsStreamStructureVisitorTestCase.php +++ /dev/null @@ -1,86 +0,0 @@ -assertEquals(array('foo.txt' => 'test'), - $structureVisitor->visitFile(vfsStream::newFile('foo.txt') - ->withContent('test') - ) - ->getStructure() - ); - } - - /** - * @test - */ - public function visitFileCreatesStructureForBlock() - { - $structureVisitor = new vfsStreamStructureVisitor(); - $this->assertEquals(array('[foo]' => 'test'), - $structureVisitor->visitBlockDevice(vfsStream::newBlock('foo') - ->withContent('test') - ) - ->getStructure() - ); - } - - /** - * @test - */ - public function visitDirectoryCreatesStructureForDirectory() - { - $structureVisitor = new vfsStreamStructureVisitor(); - $this->assertEquals(array('baz' => array()), - $structureVisitor->visitDirectory(vfsStream::newDirectory('baz')) - ->getStructure() - ); - } - - /** - * @test - */ - public function visitRecursiveDirectoryStructure() - { - $root = vfsStream::setup('root', - null, - array('test' => array('foo' => array('test.txt' => 'hello'), - 'baz.txt' => 'world' - ), - 'foo.txt' => '' - ) - ); - $structureVisitor = new vfsStreamStructureVisitor(); - $this->assertEquals(array('root' => array('test' => array('foo' => array('test.txt' => 'hello'), - 'baz.txt' => 'world' - ), - 'foo.txt' => '' - ), - ), - $structureVisitor->visitDirectory($root) - ->getStructure() - ); - } -} -?> diff --git a/core/vendor/mikey179/vfsStream/src/test/resources/filesystemcopy/emptyFolder/.gitignore b/core/vendor/mikey179/vfsStream/src/test/resources/filesystemcopy/emptyFolder/.gitignore deleted file mode 100644 index e69de29..0000000 diff --git a/core/vendor/mikey179/vfsStream/src/test/resources/filesystemcopy/withSubfolders/aFile.txt b/core/vendor/mikey179/vfsStream/src/test/resources/filesystemcopy/withSubfolders/aFile.txt deleted file mode 100644 index 1910281..0000000 --- a/core/vendor/mikey179/vfsStream/src/test/resources/filesystemcopy/withSubfolders/aFile.txt +++ /dev/null @@ -1 +0,0 @@ -foo \ No newline at end of file diff --git a/core/vendor/mikey179/vfsStream/src/test/resources/filesystemcopy/withSubfolders/subfolder1/file1.txt b/core/vendor/mikey179/vfsStream/src/test/resources/filesystemcopy/withSubfolders/subfolder1/file1.txt deleted file mode 100644 index f6ea049..0000000 --- a/core/vendor/mikey179/vfsStream/src/test/resources/filesystemcopy/withSubfolders/subfolder1/file1.txt +++ /dev/null @@ -1 +0,0 @@ -foobar \ No newline at end of file diff --git a/core/vendor/mikey179/vfsStream/src/test/resources/filesystemcopy/withSubfolders/subfolder2/.gitignore b/core/vendor/mikey179/vfsStream/src/test/resources/filesystemcopy/withSubfolders/subfolder2/.gitignore deleted file mode 100644 index e69de29..0000000 diff --git a/core/vendor/phpunit/php-code-coverage/.gitattributes b/core/vendor/phpunit/php-code-coverage/.gitattributes deleted file mode 100644 index 461090b..0000000 --- a/core/vendor/phpunit/php-code-coverage/.gitattributes +++ /dev/null @@ -1 +0,0 @@ -*.php diff=php diff --git a/core/vendor/phpunit/php-code-coverage/.gitignore b/core/vendor/phpunit/php-code-coverage/.gitignore deleted file mode 100644 index b386531..0000000 --- a/core/vendor/phpunit/php-code-coverage/.gitignore +++ /dev/null @@ -1,11 +0,0 @@ -build/api -build/code-browser -build/coverage -build/logs -build/pdepend -cache.properties -phpunit.xml -/vendor -/composer.lock -/composer.phar -/.idea diff --git a/core/vendor/phpunit/php-code-coverage/.travis.yml b/core/vendor/phpunit/php-code-coverage/.travis.yml deleted file mode 100644 index 5c23715..0000000 --- a/core/vendor/phpunit/php-code-coverage/.travis.yml +++ /dev/null @@ -1,20 +0,0 @@ -language: php - -php: - - 5.3.3 - - 5.3 - - 5.4 - - 5.5 - - 5.6 - -before_script: - - COMPOSER_ROOT_VERSION=dev-master composer install --dev --prefer-source - -script: vendor/bin/phpunit --configuration ./build/travis-ci.xml - -notifications: - email: false - irc: - channels: - - "irc.freenode.org#phpunit" - use_notice: true diff --git a/core/vendor/phpunit/php-code-coverage/CONTRIBUTING.md b/core/vendor/phpunit/php-code-coverage/CONTRIBUTING.md deleted file mode 100644 index 6f6ef34..0000000 --- a/core/vendor/phpunit/php-code-coverage/CONTRIBUTING.md +++ /dev/null @@ -1,5 +0,0 @@ -Pull Requests for bug fixes should be made against the current release branch (1.2). - -Pull Requests for new features should be made against master. - -For further notes please refer to [https://github.com/sebastianbergmann/phpunit/blob/master/CONTRIBUTING.md](https://github.com/sebastianbergmann/phpunit/blob/master/CONTRIBUTING.md) diff --git a/core/vendor/phpunit/php-code-coverage/LICENSE b/core/vendor/phpunit/php-code-coverage/LICENSE deleted file mode 100644 index 02e6511..0000000 --- a/core/vendor/phpunit/php-code-coverage/LICENSE +++ /dev/null @@ -1,33 +0,0 @@ -PHP_CodeCoverage - -Copyright (c) 2009-2014, Sebastian Bergmann . -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - - * Neither the name of Sebastian Bergmann nor the names of his - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. diff --git a/core/vendor/phpunit/php-code-coverage/README.md b/core/vendor/phpunit/php-code-coverage/README.md deleted file mode 100644 index 603d623..0000000 --- a/core/vendor/phpunit/php-code-coverage/README.md +++ /dev/null @@ -1,40 +0,0 @@ -[![Latest Stable Version](https://poser.pugx.org/phpunit/php-code-coverage/v/stable.png)](https://packagist.org/packages/phpunit/php-code-coverage) -[![Build Status](https://travis-ci.org/sebastianbergmann/php-code-coverage.png?branch=master)](https://travis-ci.org/sebastianbergmann/php-code-coverage) - -# PHP_CodeCoverage - -**PHP_CodeCoverage** is a library that provides collection, processing, and rendering functionality for PHP code coverage information. - -## Requirements - -* PHP 5.3.3 is required but using the latest version of PHP is highly recommended -* [Xdebug](http://xdebug.org/) 2.1.3 is required but using the latest version of Xdebug is highly recommended - -## Installation - -To add PHP_CodeCoverage as a local, per-project dependency to your project, simply add a dependency on `phpunit/php-code-coverage` to your project's `composer.json` file. Here is a minimal example of a `composer.json` file that just defines a dependency on PHP_CodeCoverage 2.1: - - { - "require": { - "phpunit/php-code-coverage": "2.1.*" - } - } - -## Using the PHP_CodeCoverage API - -```php -start(''); - -// ... - -$coverage->stop(); - -$writer = new PHP_CodeCoverage_Report_Clover; -$writer->process($coverage, '/tmp/clover.xml'); - -$writer = new PHP_CodeCoverage_Report_HTML; -$writer->process($coverage, '/tmp/code-coverage-report'); -``` - diff --git a/core/vendor/phpunit/php-code-coverage/build.xml b/core/vendor/phpunit/php-code-coverage/build.xml deleted file mode 100644 index 6604b76..0000000 --- a/core/vendor/phpunit/php-code-coverage/build.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/core/vendor/phpunit/php-code-coverage/build/travis-ci.xml b/core/vendor/phpunit/php-code-coverage/build/travis-ci.xml deleted file mode 100644 index 15e879fa..0000000 --- a/core/vendor/phpunit/php-code-coverage/build/travis-ci.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - ../tests/PHP - - - - - - - - - - ../src - - - diff --git a/core/vendor/phpunit/php-code-coverage/composer.json b/core/vendor/phpunit/php-code-coverage/composer.json deleted file mode 100644 index fb00ddd..0000000 --- a/core/vendor/phpunit/php-code-coverage/composer.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "name": "phpunit/php-code-coverage", - "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", - "type": "library", - "keywords": [ - "coverage", - "testing", - "xunit" - ], - "homepage": "https://github.com/sebastianbergmann/php-code-coverage", - "license": "BSD-3-Clause", - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "irc": "irc://irc.freenode.net/phpunit" - }, - "require": { - "php": ">=5.3.3", - "phpunit/php-file-iterator": "~1.3", - "phpunit/php-token-stream": "~1.3", - "phpunit/php-text-template": "~1.2", - "sebastian/environment": "~1.0", - "sebastian/version": "~1.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.1", - "ext-xdebug": ">=2.1.4" - }, - "suggest": { - "ext-dom": "*", - "ext-xdebug": ">=2.2.1", - "ext-xmlwriter": "*" - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "include-path": [ - "" - ] -} diff --git a/core/vendor/phpunit/php-code-coverage/phpunit.xml.dist b/core/vendor/phpunit/php-code-coverage/phpunit.xml.dist deleted file mode 100644 index f5fa606..0000000 --- a/core/vendor/phpunit/php-code-coverage/phpunit.xml.dist +++ /dev/null @@ -1,23 +0,0 @@ - - - - - tests/PHP - - - - - - - - - - - - src - - - - diff --git a/core/vendor/phpunit/php-code-coverage/scripts/auto_append.php b/core/vendor/phpunit/php-code-coverage/scripts/auto_append.php deleted file mode 100644 index 6cd768d..0000000 --- a/core/vendor/phpunit/php-code-coverage/scripts/auto_append.php +++ /dev/null @@ -1,5 +0,0 @@ -stop(); - -$writer = new PHP_CodeCoverage_Report_HTML; -$writer->process($coverage, '/tmp/coverage'); diff --git a/core/vendor/phpunit/php-code-coverage/scripts/auto_prepend.php b/core/vendor/phpunit/php-code-coverage/scripts/auto_prepend.php deleted file mode 100644 index 7a8887a..0000000 --- a/core/vendor/phpunit/php-code-coverage/scripts/auto_prepend.php +++ /dev/null @@ -1,10 +0,0 @@ -filter(); - -$filter->addFileToBlacklist(__FILE__); -$filter->addFileToBlacklist(dirname(__FILE__) . '/auto_append.php'); - -$coverage->start($_SERVER['SCRIPT_FILENAME']); diff --git a/core/vendor/phpunit/php-code-coverage/src/CodeCoverage.php b/core/vendor/phpunit/php-code-coverage/src/CodeCoverage.php deleted file mode 100644 index 06161e2..0000000 --- a/core/vendor/phpunit/php-code-coverage/src/CodeCoverage.php +++ /dev/null @@ -1,903 +0,0 @@ -. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @category PHP - * @package CodeCoverage - * @author Sebastian Bergmann - * @copyright 2009-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/php-code-coverage - * @since File available since Release 1.0.0 - */ - -use SebastianBergmann\Environment\Runtime; - -/** - * Provides collection functionality for PHP code coverage information. - * - * @category PHP - * @package CodeCoverage - * @author Sebastian Bergmann - * @copyright 2009-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/php-code-coverage - * @since Class available since Release 1.0.0 - */ -class PHP_CodeCoverage -{ - /** - * @var PHP_CodeCoverage_Driver - */ - private $driver; - - /** - * @var PHP_CodeCoverage_Filter - */ - private $filter; - - /** - * @var boolean - */ - private $cacheTokens = false; - - /** - * @var boolean - */ - private $checkForUnintentionallyCoveredCode = false; - - /** - * @var boolean - */ - private $forceCoversAnnotation = false; - - /** - * @var boolean - */ - private $mapTestClassNameToCoveredClassName = false; - - /** - * @var boolean - */ - private $addUncoveredFilesFromWhitelist = true; - - /** - * @var boolean - */ - private $processUncoveredFilesFromWhitelist = false; - - /** - * @var mixed - */ - private $currentId; - - /** - * Code coverage data. - * - * @var array - */ - private $data = array(); - - /** - * @var array - */ - private $ignoredLines = array(); - - /** - * Test data. - * - * @var array - */ - private $tests = array(); - - /** - * Constructor. - * - * @param PHP_CodeCoverage_Driver $driver - * @param PHP_CodeCoverage_Filter $filter - * @throws PHP_CodeCoverage_Exception - */ - public function __construct(PHP_CodeCoverage_Driver $driver = null, PHP_CodeCoverage_Filter $filter = null) - { - if ($driver === null) { - $runtime = new Runtime; - - if ($runtime->isHHVM()) { - $driver = new PHP_CodeCoverage_Driver_HHVM; - } elseif ($runtime->hasXdebug()) { - $driver = new PHP_CodeCoverage_Driver_Xdebug; - } else { - throw new PHP_CodeCoverage_Exception('No code coverage driver available'); - } - } - - if ($filter === null) { - $filter = new PHP_CodeCoverage_Filter; - } - - $this->driver = $driver; - $this->filter = $filter; - } - - /** - * Returns the PHP_CodeCoverage_Report_Node_* object graph - * for this PHP_CodeCoverage object. - * - * @return PHP_CodeCoverage_Report_Node_Directory - * @since Method available since Release 1.1.0 - */ - public function getReport() - { - $factory = new PHP_CodeCoverage_Report_Factory; - - return $factory->create($this); - } - - /** - * Clears collected code coverage data. - */ - public function clear() - { - $this->currentId = null; - $this->data = array(); - $this->tests = array(); - } - - /** - * Returns the PHP_CodeCoverage_Filter used. - * - * @return PHP_CodeCoverage_Filter - */ - public function filter() - { - return $this->filter; - } - - /** - * Returns the collected code coverage data. - * Set $raw = true to bypass all filters. - * - * @param bool $raw - * @return array - * @since Method available since Release 1.1.0 - */ - public function getData($raw = false) - { - if (!$raw && $this->addUncoveredFilesFromWhitelist) { - $this->addUncoveredFilesFromWhitelist(); - } - - // We need to apply the blacklist filter a second time - // when no whitelist is used. - if (!$raw && !$this->filter->hasWhitelist()) { - $this->applyListsFilter($this->data); - } - - return $this->data; - } - - /** - * Sets the coverage data. - * - * @param array $data - * @since Method available since Release 2.0.0 - */ - public function setData(array $data) - { - $this->data = $data; - } - - /** - * Returns the test data. - * - * @return array - * @since Method available since Release 1.1.0 - */ - public function getTests() - { - return $this->tests; - } - - /** - * Sets the test data. - * - * @param array $tests - * @since Method available since Release 2.0.0 - */ - public function setTests(array $tests) - { - $this->tests = $tests; - } - - /** - * Start collection of code coverage information. - * - * @param mixed $id - * @param boolean $clear - * @throws PHP_CodeCoverage_Exception - */ - public function start($id, $clear = false) - { - if (!is_bool($clear)) { - throw PHP_CodeCoverage_Util_InvalidArgumentHelper::factory( - 1, - 'boolean' - ); - } - - if ($clear) { - $this->clear(); - } - - $this->currentId = $id; - - $this->driver->start(); - } - - /** - * Stop collection of code coverage information. - * - * @param boolean $append - * @param mixed $linesToBeCovered - * @param array $linesToBeUsed - * @return array - * @throws PHP_CodeCoverage_Exception - */ - public function stop($append = true, $linesToBeCovered = array(), array $linesToBeUsed = array()) - { - if (!is_bool($append)) { - throw PHP_CodeCoverage_Util_InvalidArgumentHelper::factory( - 1, - 'boolean' - ); - } - - if (!is_array($linesToBeCovered) && $linesToBeCovered !== false) { - throw PHP_CodeCoverage_Util_InvalidArgumentHelper::factory( - 2, - 'array or false' - ); - } - - $data = $this->driver->stop(); - $this->append($data, null, $append, $linesToBeCovered, $linesToBeUsed); - - $this->currentId = null; - - return $data; - } - - /** - * Appends code coverage data. - * - * @param array $data - * @param mixed $id - * @param boolean $append - * @param mixed $linesToBeCovered - * @param array $linesToBeUsed - * @throws PHP_CodeCoverage_Exception - */ - public function append(array $data, $id = null, $append = true, $linesToBeCovered = array(), array $linesToBeUsed = array()) - { - if ($id === null) { - $id = $this->currentId; - } - - if ($id === null) { - throw new PHP_CodeCoverage_Exception; - } - - $this->applyListsFilter($data); - $this->applyIgnoredLinesFilter($data); - $this->initializeFilesThatAreSeenTheFirstTime($data); - - if (!$append) { - return; - } - - if ($id != 'UNCOVERED_FILES_FROM_WHITELIST') { - $this->applyCoversAnnotationFilter( - $data, - $linesToBeCovered, - $linesToBeUsed - ); - } - - if (empty($data)) { - return; - } - - $status = null; - - if ($id instanceof PHPUnit_Framework_TestCase) { - $status = $id->getStatus(); - $id = get_class($id) . '::' . $id->getName(); - } elseif ($id instanceof PHPUnit_Extensions_PhptTestCase) { - $id = $id->getName(); - } - - $this->tests[$id] = $status; - - foreach ($data as $file => $lines) { - if (!$this->filter->isFile($file)) { - continue; - } - - foreach ($lines as $k => $v) { - if ($v == 1) { - $this->data[$file][$k][] = $id; - } - } - } - } - - /** - * Merges the data from another instance of PHP_CodeCoverage. - * - * @param PHP_CodeCoverage $that - */ - public function merge(PHP_CodeCoverage $that) - { - foreach ($that->data as $file => $lines) { - if (!isset($this->data[$file])) { - if (!$this->filter->isFiltered($file)) { - $this->data[$file] = $lines; - } - - continue; - } - - foreach ($lines as $line => $data) { - if ($data !== null) { - if (!isset($this->data[$file][$line])) { - $this->data[$file][$line] = $data; - } else { - $this->data[$file][$line] = array_unique( - array_merge($this->data[$file][$line], $data) - ); - } - } - } - } - - $this->tests = array_merge($this->tests, $that->getTests()); - } - - /** - * @param boolean $flag - * @throws PHP_CodeCoverage_Exception - * @since Method available since Release 1.1.0 - */ - public function setCacheTokens($flag) - { - if (!is_bool($flag)) { - throw PHP_CodeCoverage_Util_InvalidArgumentHelper::factory( - 1, - 'boolean' - ); - } - - $this->cacheTokens = $flag; - } - - /** - * @since Method available since Release 1.1.0 - */ - public function getCacheTokens() - { - return $this->cacheTokens; - } - - /** - * @param boolean $flag - * @throws PHP_CodeCoverage_Exception - * @since Method available since Release 2.0.0 - */ - public function setCheckForUnintentionallyCoveredCode($flag) - { - if (!is_bool($flag)) { - throw PHP_CodeCoverage_Util_InvalidArgumentHelper::factory( - 1, - 'boolean' - ); - } - - $this->checkForUnintentionallyCoveredCode = $flag; - } - - /** - * @param boolean $flag - * @throws PHP_CodeCoverage_Exception - */ - public function setForceCoversAnnotation($flag) - { - if (!is_bool($flag)) { - throw PHP_CodeCoverage_Util_InvalidArgumentHelper::factory( - 1, - 'boolean' - ); - } - - $this->forceCoversAnnotation = $flag; - } - - /** - * @param boolean $flag - * @throws PHP_CodeCoverage_Exception - */ - public function setMapTestClassNameToCoveredClassName($flag) - { - if (!is_bool($flag)) { - throw PHP_CodeCoverage_Util_InvalidArgumentHelper::factory( - 1, - 'boolean' - ); - } - - $this->mapTestClassNameToCoveredClassName = $flag; - } - - /** - * @param boolean $flag - * @throws PHP_CodeCoverage_Exception - */ - public function setAddUncoveredFilesFromWhitelist($flag) - { - if (!is_bool($flag)) { - throw PHP_CodeCoverage_Util_InvalidArgumentHelper::factory( - 1, - 'boolean' - ); - } - - $this->addUncoveredFilesFromWhitelist = $flag; - } - - /** - * @param boolean $flag - * @throws PHP_CodeCoverage_Exception - */ - public function setProcessUncoveredFilesFromWhitelist($flag) - { - if (!is_bool($flag)) { - throw PHP_CodeCoverage_Util_InvalidArgumentHelper::factory( - 1, - 'boolean' - ); - } - - $this->processUncoveredFilesFromWhitelist = $flag; - } - - /** - * Applies the @covers annotation filtering. - * - * @param array $data - * @param mixed $linesToBeCovered - * @param array $linesToBeUsed - * @throws PHP_CodeCoverage_Exception_UnintentionallyCoveredCode - */ - private function applyCoversAnnotationFilter(array &$data, $linesToBeCovered, array $linesToBeUsed) - { - if ($linesToBeCovered === false || - ($this->forceCoversAnnotation && empty($linesToBeCovered))) { - $data = array(); - - return; - } - - if (empty($linesToBeCovered)) { - return; - } - - if ($this->checkForUnintentionallyCoveredCode) { - $this->performUnintentionallyCoveredCodeCheck( - $data, - $linesToBeCovered, - $linesToBeUsed - ); - } - - $data = array_intersect_key($data, $linesToBeCovered); - - foreach (array_keys($data) as $filename) { - $_linesToBeCovered = array_flip($linesToBeCovered[$filename]); - - $data[$filename] = array_intersect_key( - $data[$filename], - $_linesToBeCovered - ); - } - } - - /** - * Applies the blacklist/whitelist filtering. - * - * @param array $data - */ - private function applyListsFilter(array &$data) - { - foreach (array_keys($data) as $filename) { - if ($this->filter->isFiltered($filename)) { - unset($data[$filename]); - } - } - } - - /** - * Applies the "ignored lines" filtering. - * - * @param array $data - */ - private function applyIgnoredLinesFilter(array &$data) - { - foreach (array_keys($data) as $filename) { - if (!$this->filter->isFile($filename)) { - continue; - } - - foreach ($this->getLinesToBeIgnored($filename) as $line) { - unset($data[$filename][$line]); - } - - if (empty($data[$filename])) { - unset($data[$filename]); - } - } - } - - /** - * @param array $data - * @since Method available since Release 1.1.0 - */ - private function initializeFilesThatAreSeenTheFirstTime(array $data) - { - foreach ($data as $file => $lines) { - if ($this->filter->isFile($file) && !isset($this->data[$file])) { - $this->data[$file] = array(); - - foreach ($lines as $k => $v) { - $this->data[$file][$k] = $v == -2 ? null : array(); - } - } - } - } - - /** - * Processes whitelisted files that are not covered. - */ - private function addUncoveredFilesFromWhitelist() - { - $data = array(); - $uncoveredFiles = array_diff( - $this->filter->getWhitelist(), - array_keys($this->data) - ); - - foreach ($uncoveredFiles as $uncoveredFile) { - if (!file_exists($uncoveredFile)) { - continue; - } - - if ($this->processUncoveredFilesFromWhitelist) { - $this->processUncoveredFileFromWhitelist( - $uncoveredFile, - $data, - $uncoveredFiles - ); - } else { - $data[$uncoveredFile] = array(); - - $lines = count(file($uncoveredFile)); - - for ($i = 1; $i <= $lines; $i++) { - $data[$uncoveredFile][$i] = -1; - } - } - } - - $this->append($data, 'UNCOVERED_FILES_FROM_WHITELIST'); - } - - /** - * @param string $uncoveredFile - * @param array $data - * @param array $uncoveredFiles - */ - private function processUncoveredFileFromWhitelist($uncoveredFile, array &$data, array $uncoveredFiles) - { - $this->driver->start(); - include_once $uncoveredFile; - $coverage = $this->driver->stop(); - - foreach ($coverage as $file => $fileCoverage) { - if (!isset($data[$file]) && - in_array($file, $uncoveredFiles)) { - foreach (array_keys($fileCoverage) as $key) { - if ($fileCoverage[$key] == 1) { - $fileCoverage[$key] = -1; - } - } - - $data[$file] = $fileCoverage; - } - } - } - - /** - * Returns the lines of a source file that should be ignored. - * - * @param string $filename - * @return array - * @throws PHP_CodeCoverage_Exception - * @since Method available since Release 2.0.0 - */ - private function getLinesToBeIgnored($filename) - { - if (!is_string($filename)) { - throw PHP_CodeCoverage_Util_InvalidArgumentHelper::factory( - 1, - 'string' - ); - } - - if (!isset($this->ignoredLines[$filename])) { - $this->ignoredLines[$filename] = array(); - $ignore = false; - $stop = false; - $lines = file($filename); - $numLines = count($lines); - - foreach ($lines as $index => $line) { - if (!trim($line)) { - $this->ignoredLines[$filename][] = $index + 1; - } - } - - if ($this->cacheTokens) { - $tokens = PHP_Token_Stream_CachingFactory::get($filename); - } else { - $tokens = new PHP_Token_Stream($filename); - } - - $classes = array_merge($tokens->getClasses(), $tokens->getTraits()); - $tokens = $tokens->tokens(); - - foreach ($tokens as $token) { - switch (get_class($token)) { - case 'PHP_Token_COMMENT': - case 'PHP_Token_DOC_COMMENT': - $_token = trim($token); - $_line = trim($lines[$token->getLine() - 1]); - - if ($_token == '// @codeCoverageIgnore' || - $_token == '//@codeCoverageIgnore') { - $ignore = true; - $stop = true; - } elseif ($_token == '// @codeCoverageIgnoreStart' || - $_token == '//@codeCoverageIgnoreStart') { - $ignore = true; - } elseif ($_token == '// @codeCoverageIgnoreEnd' || - $_token == '//@codeCoverageIgnoreEnd') { - $stop = true; - } - - if (!$ignore) { - $start = $token->getLine(); - $end = $start + substr_count($token, "\n"); - - // Do not ignore the first line when there is a token - // before the comment - if (0 !== strpos($_token, $_line)) { - $start++; - } - - for ($i = $start; $i < $end; $i++) { - $this->ignoredLines[$filename][] = $i; - } - - // A DOC_COMMENT token or a COMMENT token starting with "/*" - // does not contain the final \n character in its text - if (0 === strpos($_token, '/*') && '*/' === substr(trim($lines[$i-1]), -2)) { - $this->ignoredLines[$filename][] = $i; - } - } - break; - - case 'PHP_Token_INTERFACE': - case 'PHP_Token_TRAIT': - case 'PHP_Token_CLASS': - case 'PHP_Token_FUNCTION': - $docblock = $token->getDocblock(); - - $this->ignoredLines[$filename][] = $token->getLine(); - - if (strpos($docblock, '@codeCoverageIgnore')) { - $endLine = $token->getEndLine(); - - for ($i = $token->getLine(); $i <= $endLine; $i++) { - $this->ignoredLines[$filename][] = $i; - } - } elseif ($token instanceof PHP_Token_INTERFACE || - $token instanceof PHP_Token_TRAIT || - $token instanceof PHP_Token_CLASS) { - if (empty($classes[$token->getName()]['methods'])) { - for ($i = $token->getLine(); - $i <= $token->getEndLine(); - $i++) { - $this->ignoredLines[$filename][] = $i; - } - } else { - $firstMethod = array_shift( - $classes[$token->getName()]['methods'] - ); - - do { - $lastMethod = array_pop( - $classes[$token->getName()]['methods'] - ); - } while ($lastMethod !== null && - substr($lastMethod['signature'], 0, 18) == 'anonymous function'); - - if ($lastMethod === null) { - $lastMethod = $firstMethod; - } - - for ($i = $token->getLine(); - $i < $firstMethod['startLine']; - $i++) { - $this->ignoredLines[$filename][] = $i; - } - - for ($i = $token->getEndLine(); - $i > $lastMethod['endLine']; - $i--) { - $this->ignoredLines[$filename][] = $i; - } - } - } - break; - - case 'PHP_Token_NAMESPACE': - $this->ignoredLines[$filename][] = $token->getEndLine(); - - // Intentional fallthrough - case 'PHP_Token_OPEN_TAG': - case 'PHP_Token_CLOSE_TAG': - case 'PHP_Token_USE': - $this->ignoredLines[$filename][] = $token->getLine(); - break; - } - - if ($ignore) { - $this->ignoredLines[$filename][] = $token->getLine(); - - if ($stop) { - $ignore = false; - $stop = false; - } - } - } - - $this->ignoredLines[$filename][] = $numLines + 1; - - $this->ignoredLines[$filename] = array_unique( - $this->ignoredLines[$filename] - ); - - sort($this->ignoredLines[$filename]); - } - - return $this->ignoredLines[$filename]; - } - - /** - * @param array $data - * @param array $linesToBeCovered - * @param array $linesToBeUsed - * @throws PHP_CodeCoverage_Exception_UnintentionallyCoveredCode - * @since Method available since Release 2.0.0 - */ - private function performUnintentionallyCoveredCodeCheck(array &$data, array $linesToBeCovered, array $linesToBeUsed) - { - $allowedLines = $this->getAllowedLines( - $linesToBeCovered, - $linesToBeUsed - ); - - $message = ''; - - foreach ($data as $file => $_data) { - foreach ($_data as $line => $flag) { - if ($flag == 1 && - (!isset($allowedLines[$file]) || - !isset($allowedLines[$file][$line]))) { - $message .= sprintf( - '- %s:%d' . PHP_EOL, - $file, - $line - ); - } - } - } - - if (!empty($message)) { - throw new PHP_CodeCoverage_Exception_UnintentionallyCoveredCode( - $message - ); - } - } - - /** - * @param array $linesToBeCovered - * @param array $linesToBeUsed - * @return array - * @since Method available since Release 2.0.0 - */ - private function getAllowedLines(array $linesToBeCovered, array $linesToBeUsed) - { - $allowedLines = array(); - - foreach (array_keys($linesToBeCovered) as $file) { - if (!isset($allowedLines[$file])) { - $allowedLines[$file] = array(); - } - - $allowedLines[$file] = array_merge( - $allowedLines[$file], - $linesToBeCovered[$file] - ); - } - - foreach (array_keys($linesToBeUsed) as $file) { - if (!isset($allowedLines[$file])) { - $allowedLines[$file] = array(); - } - - $allowedLines[$file] = array_merge( - $allowedLines[$file], - $linesToBeUsed[$file] - ); - } - - foreach (array_keys($allowedLines) as $file) { - $allowedLines[$file] = array_flip( - array_unique($allowedLines[$file]) - ); - } - - return $allowedLines; - } -} diff --git a/core/vendor/phpunit/php-code-coverage/src/CodeCoverage/Driver.php b/core/vendor/phpunit/php-code-coverage/src/CodeCoverage/Driver.php deleted file mode 100644 index e9bd699..0000000 --- a/core/vendor/phpunit/php-code-coverage/src/CodeCoverage/Driver.php +++ /dev/null @@ -1,70 +0,0 @@ -. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @category PHP - * @package CodeCoverage - * @author Sebastian Bergmann - * @copyright 2009-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/php-code-coverage - * @since File available since Release 1.0.0 - */ - -/** - * Interface for code coverage drivers. - * - * @category PHP - * @package CodeCoverage - * @author Sebastian Bergmann - * @copyright 2009-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/php-code-coverage - * @since Class available since Release 1.0.0 - */ -interface PHP_CodeCoverage_Driver -{ - /** - * Start collection of code coverage information. - */ - public function start(); - - /** - * Stop collection of code coverage information. - * - * @return array - */ - public function stop(); -} diff --git a/core/vendor/phpunit/php-code-coverage/src/CodeCoverage/Driver/HHVM.php b/core/vendor/phpunit/php-code-coverage/src/CodeCoverage/Driver/HHVM.php deleted file mode 100644 index cc370e7..0000000 --- a/core/vendor/phpunit/php-code-coverage/src/CodeCoverage/Driver/HHVM.php +++ /dev/null @@ -1,91 +0,0 @@ -. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @category PHP - * @package CodeCoverage - * @author Sebastian Bergmann - * @copyright 2009-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/php-code-coverage - * @since File available since Release 1.3.0 - */ - -/** - * Driver for HHVM's code coverage functionality. - * - * @category PHP - * @package CodeCoverage - * @author Sebastian Bergmann - * @copyright 2009-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/php-code-coverage - * @since Class available since Release 1.3.0 - * @codeCoverageIgnore - */ -class PHP_CodeCoverage_Driver_HHVM implements PHP_CodeCoverage_Driver -{ - /** - * Constructor. - */ - public function __construct() - { - if (!defined('HHVM_VERSION')) { - throw new PHP_CodeCoverage_Exception('This driver requires HHVM'); - } - } - - /** - * Start collection of code coverage information. - */ - public function start() - { - fb_enable_code_coverage(); - } - - /** - * Stop collection of code coverage information. - * - * @return array - */ - public function stop() - { - $codeCoverage = fb_get_code_coverage(TRUE); - - fb_disable_code_coverage(); - - return $codeCoverage; - } -} diff --git a/core/vendor/phpunit/php-code-coverage/src/CodeCoverage/Driver/Xdebug.php b/core/vendor/phpunit/php-code-coverage/src/CodeCoverage/Driver/Xdebug.php deleted file mode 100644 index 3c2fb4c..0000000 --- a/core/vendor/phpunit/php-code-coverage/src/CodeCoverage/Driver/Xdebug.php +++ /dev/null @@ -1,140 +0,0 @@ -. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @category PHP - * @package CodeCoverage - * @author Sebastian Bergmann - * @copyright 2009-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/php-code-coverage - * @since File available since Release 1.0.0 - */ - -/** - * Driver for Xdebug's code coverage functionality. - * - * @category PHP - * @package CodeCoverage - * @author Sebastian Bergmann - * @copyright 2009-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/php-code-coverage - * @since Class available since Release 1.0.0 - * @codeCoverageIgnore - */ -class PHP_CodeCoverage_Driver_Xdebug implements PHP_CodeCoverage_Driver -{ - /** - * Constructor. - */ - public function __construct() - { - if (!extension_loaded('xdebug')) { - throw new PHP_CodeCoverage_Exception('This driver requires Xdebug'); - } - - if (version_compare(phpversion('xdebug'), '2.2.0-dev', '>=') && - !ini_get('xdebug.coverage_enable')) { - throw new PHP_CodeCoverage_Exception( - 'xdebug.coverage_enable=On has to be set in php.ini' - ); - } - } - - /** - * Start collection of code coverage information. - */ - public function start() - { - xdebug_start_code_coverage(XDEBUG_CC_UNUSED | XDEBUG_CC_DEAD_CODE); - } - - /** - * Stop collection of code coverage information. - * - * @return array - */ - public function stop() - { - $data = xdebug_get_code_coverage(); - xdebug_stop_code_coverage(); - - return $this->cleanup($data); - } - - /** - * @param array $data - * @return array - * @since Method available since Release 2.0.0 - */ - private function cleanup(array $data) - { - foreach (array_keys($data) as $file) { - if (isset($data[$file][0])) { - unset($data[$file][0]); - } - - if (file_exists($file)) { - $numLines = $this->getNumberOfLinesInFile($file); - - foreach (array_keys($data[$file]) as $line) { - if (isset($data[$file][$line]) && $line > $numLines) { - unset($data[$file][$line]); - } - } - } - } - - return $data; - } - - /** - * @param string $file - * @return integer - * @since Method available since Release 2.0.0 - */ - private function getNumberOfLinesInFile($file) - { - $buffer = file_get_contents($file); - $lines = substr_count($buffer, "\n"); - - if (substr($buffer, -1) !== "\n") { - $lines++; - } - - return $lines; - } -} diff --git a/core/vendor/phpunit/php-code-coverage/src/CodeCoverage/Exception.php b/core/vendor/phpunit/php-code-coverage/src/CodeCoverage/Exception.php deleted file mode 100644 index 9d302d0..0000000 --- a/core/vendor/phpunit/php-code-coverage/src/CodeCoverage/Exception.php +++ /dev/null @@ -1,59 +0,0 @@ -. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @category PHP - * @package CodeCoverage - * @author Sebastian Bergmann - * @copyright 2009-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/php-code-coverage - * @since File available since Release 1.1.0 - */ - -/** - * Exception class for PHP_CodeCoverage component. - * - * @category PHP - * @package CodeCoverage - * @author Sebastian Bergmann - * @copyright 2009-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/php-code-coverage - * @since Class available since Release 1.1.0 - */ -class PHP_CodeCoverage_Exception extends RuntimeException -{ -} diff --git a/core/vendor/phpunit/php-code-coverage/src/CodeCoverage/Exception/UnintentionallyCoveredCode.php b/core/vendor/phpunit/php-code-coverage/src/CodeCoverage/Exception/UnintentionallyCoveredCode.php deleted file mode 100644 index 323383d..0000000 --- a/core/vendor/phpunit/php-code-coverage/src/CodeCoverage/Exception/UnintentionallyCoveredCode.php +++ /dev/null @@ -1,59 +0,0 @@ -. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @category PHP - * @package CodeCoverage - * @author Sebastian Bergmann - * @copyright 2009-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/php-code-coverage - * @since File available since Release 2.0.0 - */ - -/** - * Exception that is raised when code is unintentionally covered. - * - * @category PHP - * @package CodeCoverage - * @author Sebastian Bergmann - * @copyright 2009-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/php-code-coverage - * @since Class available since Release 2.0.0 - */ -class PHP_CodeCoverage_Exception_UnintentionallyCoveredCode extends PHP_CodeCoverage_Exception -{ -} diff --git a/core/vendor/phpunit/php-code-coverage/src/CodeCoverage/Filter.php b/core/vendor/phpunit/php-code-coverage/src/CodeCoverage/Filter.php deleted file mode 100644 index aae37de..0000000 --- a/core/vendor/phpunit/php-code-coverage/src/CodeCoverage/Filter.php +++ /dev/null @@ -1,408 +0,0 @@ -. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @category PHP - * @package CodeCoverage - * @author Sebastian Bergmann - * @copyright 2009-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/php-code-coverage - * @since File available since Release 1.0.0 - */ - -/** - * Filter for blacklisting and whitelisting of code coverage information. - * - * @category PHP - * @package CodeCoverage - * @author Sebastian Bergmann - * @copyright 2009-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/php-code-coverage - * @since Class available since Release 1.0.0 - */ -class PHP_CodeCoverage_Filter -{ - /** - * Source files that are blacklisted. - * - * @var array - */ - private $blacklistedFiles = array(); - - /** - * Source files that are whitelisted. - * - * @var array - */ - private $whitelistedFiles = array(); - - /** - * @var boolean - */ - private $blacklistPrefilled = false; - - /** - * A list of classes which are always blacklisted - * - * @var array - */ - public static $blacklistClassNames = array( - 'File_Iterator' => 1, - 'PHP_CodeCoverage' => 1, - 'PHP_Invoker' => 1, - 'PHP_Timer' => 1, - 'PHP_Token' => 1, - 'PHPUnit_Framework_TestCase' => 2, - 'PHPUnit_Extensions_Database_TestCase' => 2, - 'PHPUnit_Framework_MockObject_Generator' => 2, - 'PHPUnit_Extensions_SeleniumTestCase' => 2, - 'PHPUnit_Extensions_Story_TestCase' => 2, - 'Text_Template' => 1, - 'Symfony\Component\Yaml\Yaml' => 1, - 'SebastianBergmann\Diff\Diff' => 1, - 'SebastianBergmann\Comparator\Comparator' => 1, - 'SebastianBergmann\Environment\Runtime' => 1, - 'SebastianBergmann\Exporter\Exporter' => 1, - 'SebastianBergmann\Version' => 1, - 'Composer\Autoload\ClassLoader' => 1, - 'Instantiator\Instantiator' => 1, - 'LazyMap\AbstractLazyMap' => 1 - ); - - /** - * Adds a directory to the blacklist (recursively). - * - * @param string $directory - * @param string $suffix - * @param string $prefix - */ - public function addDirectoryToBlacklist($directory, $suffix = '.php', $prefix = '') - { - $facade = new File_Iterator_Facade; - $files = $facade->getFilesAsArray($directory, $suffix, $prefix); - - foreach ($files as $file) { - $this->addFileToBlacklist($file); - } - } - - /** - * Adds a file to the blacklist. - * - * @param string $filename - */ - public function addFileToBlacklist($filename) - { - $this->blacklistedFiles[realpath($filename)] = true; - } - - /** - * Adds files to the blacklist. - * - * @param array $files - */ - public function addFilesToBlacklist(array $files) - { - foreach ($files as $file) { - $this->addFileToBlacklist($file); - } - } - - /** - * Removes a directory from the blacklist (recursively). - * - * @param string $directory - * @param string $suffix - * @param string $prefix - */ - public function removeDirectoryFromBlacklist($directory, $suffix = '.php', $prefix = '') - { - $facade = new File_Iterator_Facade; - $files = $facade->getFilesAsArray($directory, $suffix, $prefix); - - foreach ($files as $file) { - $this->removeFileFromBlacklist($file); - } - } - - /** - * Removes a file from the blacklist. - * - * @param string $filename - */ - public function removeFileFromBlacklist($filename) - { - $filename = realpath($filename); - - if (isset($this->blacklistedFiles[$filename])) { - unset($this->blacklistedFiles[$filename]); - } - } - - /** - * Adds a directory to the whitelist (recursively). - * - * @param string $directory - * @param string $suffix - * @param string $prefix - */ - public function addDirectoryToWhitelist($directory, $suffix = '.php', $prefix = '') - { - $facade = new File_Iterator_Facade; - $files = $facade->getFilesAsArray($directory, $suffix, $prefix); - - foreach ($files as $file) { - $this->addFileToWhitelist($file); - } - } - - /** - * Adds a file to the whitelist. - * - * @param string $filename - */ - public function addFileToWhitelist($filename) - { - $this->whitelistedFiles[realpath($filename)] = true; - } - - /** - * Adds files to the whitelist. - * - * @param array $files - */ - public function addFilesToWhitelist(array $files) - { - foreach ($files as $file) { - $this->addFileToWhitelist($file); - } - } - - /** - * Removes a directory from the whitelist (recursively). - * - * @param string $directory - * @param string $suffix - * @param string $prefix - */ - public function removeDirectoryFromWhitelist($directory, $suffix = '.php', $prefix = '') - { - $facade = new File_Iterator_Facade; - $files = $facade->getFilesAsArray($directory, $suffix, $prefix); - - foreach ($files as $file) { - $this->removeFileFromWhitelist($file); - } - } - - /** - * Removes a file from the whitelist. - * - * @param string $filename - */ - public function removeFileFromWhitelist($filename) - { - $filename = realpath($filename); - - if (isset($this->whitelistedFiles[$filename])) { - unset($this->whitelistedFiles[$filename]); - } - } - - /** - * Checks whether a filename is a real filename. - * - * @param string $filename - */ - public function isFile($filename) - { - if ($filename == '-' || - strpos($filename, 'vfs://') === 0 || - strpos($filename, 'xdebug://debug-eval') !== false || - strpos($filename, 'eval()\'d code') !== false || - strpos($filename, 'runtime-created function') !== false || - strpos($filename, 'runkit created function') !== false || - strpos($filename, 'assert code') !== false || - strpos($filename, 'regexp code') !== false) { - return false; - } - - return file_exists($filename); - } - - /** - * Checks whether or not a file is filtered. - * - * When the whitelist is empty (default), blacklisting is used. - * When the whitelist is not empty, whitelisting is used. - * - * @param string $filename - * @param boolean $ignoreWhitelist - * @return boolean - * @throws PHP_CodeCoverage_Exception - */ - public function isFiltered($filename) - { - if (!$this->isFile($filename)) { - return true; - } - - $filename = realpath($filename); - - if (!empty($this->whitelistedFiles)) { - return !isset($this->whitelistedFiles[$filename]); - } - - if (!$this->blacklistPrefilled) { - $this->prefillBlacklist(); - } - - return isset($this->blacklistedFiles[$filename]); - } - - /** - * Returns the list of blacklisted files. - * - * @return array - */ - public function getBlacklist() - { - return array_keys($this->blacklistedFiles); - } - - /** - * Returns the list of whitelisted files. - * - * @return array - */ - public function getWhitelist() - { - return array_keys($this->whitelistedFiles); - } - - /** - * Returns whether this filter has a whitelist. - * - * @return boolean - * @since Method available since Release 1.1.0 - */ - public function hasWhitelist() - { - return !empty($this->whitelistedFiles); - } - - /** - * @since Method available since Release 1.2.3 - */ - private function prefillBlacklist() - { - if (defined('__PHPUNIT_PHAR__')) { - $this->addFileToBlacklist(__PHPUNIT_PHAR__); - } - - foreach (self::$blacklistClassNames as $className => $parent) { - $this->addDirectoryContainingClassToBlacklist($className, $parent); - } - - $this->blacklistPrefilled = true; - } - - /** - * @param string $className - * @param integer $parent - * @since Method available since Release 1.2.3 - */ - private function addDirectoryContainingClassToBlacklist($className, $parent = 1) - { - if (!class_exists($className)) { - return; - } - - $reflector = new ReflectionClass($className); - $directory = $reflector->getFileName(); - - for ($i = 0; $i < $parent; $i++) { - $directory = dirname($directory); - } - - $this->addDirectoryToBlacklist($directory); - } - - /** - * Returns the blacklisted files. - * - * @return array - * @since Method available since Release 2.0.0 - */ - public function getBlacklistedFiles() - { - return $this->blacklistedFiles; - } - - /** - * Sets the blacklisted files. - * - * @param array $blacklistedFiles - * @since Method available since Release 2.0.0 - */ - public function setBlacklistedFiles($blacklistedFiles) - { - $this->blacklistedFiles = $blacklistedFiles; - } - - /** - * Returns the whitelisted files. - * - * @return array - * @since Method available since Release 2.0.0 - */ - public function getWhitelistedFiles() - { - return $this->whitelistedFiles; - } - - /** - * Sets the whitelisted files. - * - * @param array $whitelistedFiles - * @since Method available since Release 2.0.0 - */ - public function setWhitelistedFiles($whitelistedFiles) - { - $this->whitelistedFiles = $whitelistedFiles; - } -} diff --git a/core/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Clover.php b/core/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Clover.php deleted file mode 100644 index f2c0242..0000000 --- a/core/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Clover.php +++ /dev/null @@ -1,325 +0,0 @@ -. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @category PHP - * @package CodeCoverage - * @author Sebastian Bergmann - * @copyright 2009-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/php-code-coverage - * @since File available since Release 1.0.0 - */ - -/** - * Generates a Clover XML logfile from an PHP_CodeCoverage object. - * - * @category PHP - * @package CodeCoverage - * @author Sebastian Bergmann - * @copyright 2009-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/php-code-coverage - * @since Class available since Release 1.0.0 - */ -class PHP_CodeCoverage_Report_Clover -{ - /** - * @param PHP_CodeCoverage $coverage - * @param string $target - * @param string $name - * @return string - */ - public function process(PHP_CodeCoverage $coverage, $target = null, $name = null) - { - $xmlDocument = new DOMDocument('1.0', 'UTF-8'); - $xmlDocument->formatOutput = true; - - $xmlCoverage = $xmlDocument->createElement('coverage'); - $xmlCoverage->setAttribute('generated', (int) $_SERVER['REQUEST_TIME']); - $xmlDocument->appendChild($xmlCoverage); - - $xmlProject = $xmlDocument->createElement('project'); - $xmlProject->setAttribute('timestamp', (int) $_SERVER['REQUEST_TIME']); - - if (is_string($name)) { - $xmlProject->setAttribute('name', $name); - } - - $xmlCoverage->appendChild($xmlProject); - - $packages = array(); - $report = $coverage->getReport(); - unset($coverage); - - foreach ($report as $item) { - $namespace = 'global'; - - if (!$item instanceof PHP_CodeCoverage_Report_Node_File) { - continue; - } - - $xmlFile = $xmlDocument->createElement('file'); - $xmlFile->setAttribute('name', $item->getPath()); - - $classes = $item->getClassesAndTraits(); - $coverage = $item->getCoverageData(); - $lines = array(); - - foreach ($classes as $className => $class) { - $classStatements = 0; - $coveredClassStatements = 0; - $coveredMethods = 0; - $classMethods = 0; - - foreach ($class['methods'] as $methodName => $method) { - if ($method['executableLines'] == 0) { - continue; - } - - $classMethods++; - $classStatements += $method['executableLines']; - $coveredClassStatements += $method['executedLines']; - if ($method['coverage'] == 100) { - $coveredMethods++; - } - - $methodCount = 0; - for ($i = $method['startLine']; - $i <= $method['endLine']; - $i++) { - if (isset($coverage[$i]) && ($coverage[$i] !== null)) { - $methodCount = max($methodCount, count($coverage[$i])); - } - } - - $lines[$method['startLine']] = array( - 'count' => $methodCount, - 'crap' => $method['crap'], - 'type' => 'method', - 'name' => $methodName - ); - } - - if (!empty($class['package']['namespace'])) { - $namespace = $class['package']['namespace']; - } - - $xmlClass = $xmlDocument->createElement('class'); - $xmlClass->setAttribute('name', $className); - $xmlClass->setAttribute('namespace', $namespace); - - if (!empty($class['package']['fullPackage'])) { - $xmlClass->setAttribute( - 'fullPackage', - $class['package']['fullPackage'] - ); - } - - if (!empty($class['package']['category'])) { - $xmlClass->setAttribute( - 'category', - $class['package']['category'] - ); - } - - if (!empty($class['package']['package'])) { - $xmlClass->setAttribute( - 'package', - $class['package']['package'] - ); - } - - if (!empty($class['package']['subpackage'])) { - $xmlClass->setAttribute( - 'subpackage', - $class['package']['subpackage'] - ); - } - - $xmlFile->appendChild($xmlClass); - - $xmlMetrics = $xmlDocument->createElement('metrics'); - $xmlMetrics->setAttribute('methods', $classMethods); - $xmlMetrics->setAttribute('coveredmethods', $coveredMethods); - $xmlMetrics->setAttribute('conditionals', 0); - $xmlMetrics->setAttribute('coveredconditionals', 0); - $xmlMetrics->setAttribute('statements', $classStatements); - $xmlMetrics->setAttribute( - 'coveredstatements', - $coveredClassStatements - ); - $xmlMetrics->setAttribute( - 'elements', - $classMethods + - $classStatements - /* + conditionals */ - ); - $xmlMetrics->setAttribute( - 'coveredelements', - $coveredMethods + - $coveredClassStatements - /* + coveredconditionals */ - ); - $xmlClass->appendChild($xmlMetrics); - } - - foreach ($coverage as $line => $data) { - if ($data === null || isset($lines[$line])) { - continue; - } - - $lines[$line] = array( - 'count' => count($data), 'type' => 'stmt' - ); - } - - ksort($lines); - - foreach ($lines as $line => $data) { - $xmlLine = $xmlDocument->createElement('line'); - $xmlLine->setAttribute('num', $line); - $xmlLine->setAttribute('type', $data['type']); - - if (isset($data['name'])) { - $xmlLine->setAttribute('name', $data['name']); - } - - if (isset($data['crap'])) { - $xmlLine->setAttribute('crap', $data['crap']); - } - - $xmlLine->setAttribute('count', $data['count']); - $xmlFile->appendChild($xmlLine); - } - - $linesOfCode = $item->getLinesOfCode(); - - $xmlMetrics = $xmlDocument->createElement('metrics'); - $xmlMetrics->setAttribute('loc', $linesOfCode['loc']); - $xmlMetrics->setAttribute('ncloc', $linesOfCode['ncloc']); - $xmlMetrics->setAttribute('classes', $item->getNumClassesAndTraits()); - $xmlMetrics->setAttribute('methods', $item->getNumMethods()); - $xmlMetrics->setAttribute( - 'coveredmethods', - $item->getNumTestedMethods() - ); - $xmlMetrics->setAttribute('conditionals', 0); - $xmlMetrics->setAttribute('coveredconditionals', 0); - $xmlMetrics->setAttribute( - 'statements', - $item->getNumExecutableLines() - ); - $xmlMetrics->setAttribute( - 'coveredstatements', - $item->getNumExecutedLines() - ); - $xmlMetrics->setAttribute( - 'elements', - $item->getNumMethods() + $item->getNumExecutableLines() - /* + conditionals */ - ); - $xmlMetrics->setAttribute( - 'coveredelements', - $item->getNumTestedMethods() + $item->getNumExecutedLines() - /* + coveredconditionals */ - ); - $xmlFile->appendChild($xmlMetrics); - - if ($namespace == 'global') { - $xmlProject->appendChild($xmlFile); - } else { - if (!isset($packages[$namespace])) { - $packages[$namespace] = $xmlDocument->createElement( - 'package' - ); - - $packages[$namespace]->setAttribute('name', $namespace); - $xmlProject->appendChild($packages[$namespace]); - } - - $packages[$namespace]->appendChild($xmlFile); - } - } - - $linesOfCode = $report->getLinesOfCode(); - - $xmlMetrics = $xmlDocument->createElement('metrics'); - $xmlMetrics->setAttribute('files', count($report)); - $xmlMetrics->setAttribute('loc', $linesOfCode['loc']); - $xmlMetrics->setAttribute('ncloc', $linesOfCode['ncloc']); - $xmlMetrics->setAttribute( - 'classes', - $report->getNumClassesAndTraits() - ); - $xmlMetrics->setAttribute('methods', $report->getNumMethods()); - $xmlMetrics->setAttribute( - 'coveredmethods', - $report->getNumTestedMethods() - ); - $xmlMetrics->setAttribute('conditionals', 0); - $xmlMetrics->setAttribute('coveredconditionals', 0); - $xmlMetrics->setAttribute( - 'statements', - $report->getNumExecutableLines() - ); - $xmlMetrics->setAttribute( - 'coveredstatements', - $report->getNumExecutedLines() - ); - $xmlMetrics->setAttribute( - 'elements', - $report->getNumMethods() + $report->getNumExecutableLines() - /* + conditionals */ - ); - $xmlMetrics->setAttribute( - 'coveredelements', - $report->getNumTestedMethods() + $report->getNumExecutedLines() - /* + coveredconditionals */ - ); - - $xmlProject->appendChild($xmlMetrics); - - if ($target !== null) { - if (!is_dir(dirname($target))) { - mkdir(dirname($target), 0777, true); - } - - return $xmlDocument->save($target); - } else { - return $xmlDocument->saveXML(); - } - } -} diff --git a/core/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Crap4j.php b/core/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Crap4j.php deleted file mode 100644 index a66adc1..0000000 --- a/core/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Crap4j.php +++ /dev/null @@ -1,163 +0,0 @@ -. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @category PHP - * @package CodeCoverage - * @author Zsolt Takács - * @copyright 2009-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/php-code-coverage - * @since File available since Release 2.0.0 - */ - -/** - * @category PHP - * @package CodeCoverage - * @author Zsolt Takács - * @copyright 2009-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/php-code-coverage - * @since Class available since Release 2.0.0 - */ -class PHP_CodeCoverage_Report_Crap4j -{ - private $threshold = 30; - - /** - * @param PHP_CodeCoverage $coverage - * @param string $target - * @param string $name - * @return string - */ - public function process(PHP_CodeCoverage $coverage, $target = null, $name = null) - { - $document = new DOMDocument('1.0', 'UTF-8'); - $document->formatOutput = true; - - $root = $document->createElement('crap_result'); - $document->appendChild($root); - - $project = $document->createElement('project', is_string($name) ? $name : ''); - $root->appendChild($project); - $root->appendChild($document->createElement('timestamp', date('Y-m-d H:i:s', (int) $_SERVER['REQUEST_TIME']))); - - $stats = $document->createElement('stats'); - $methodsNode = $document->createElement('methods'); - - $report = $coverage->getReport(); - unset($coverage); - - $fullMethodCount = 0; - $fullCrapMethodCount = 0; - $fullCrapLoad = 0; - $fullCrap = 0; - - foreach ($report as $item) { - if (!$item instanceof PHP_CodeCoverage_Report_Node_File) { - continue; - } - - $file = $document->createElement('file'); - $file->setAttribute('name', $item->getPath()); - - $classes = $item->getClassesAndTraits(); - - foreach ($classes as $className => $class) { - foreach ($class['methods'] as $methodName => $method) { - $crapLoad = $this->getCrapLoad($method['crap'], $method['ccn'], $method['coverage']); - - $fullCrap += $method['crap']; - $fullCrapLoad += $crapLoad; - $fullMethodCount++; - - if ($method['crap'] >= $this->threshold) { - $fullCrapMethodCount++; - } - - $methodNode = $document->createElement('method'); - - $methodNode->appendChild($document->createElement('package', '')); - $methodNode->appendChild($document->createElement('className', $className)); - $methodNode->appendChild($document->createElement('methodName', $methodName)); - $methodNode->appendChild($document->createElement('methodSignature', htmlspecialchars($method['signature']))); - $methodNode->appendChild($document->createElement('fullMethod', htmlspecialchars($method['signature']))); - $methodNode->appendChild($document->createElement('crap', $this->roundValue($method['crap']))); - $methodNode->appendChild($document->createElement('complexity', $method['ccn'])); - $methodNode->appendChild($document->createElement('coverage', $this->roundValue($method['coverage']))); - $methodNode->appendChild($document->createElement('crapLoad', round($crapLoad))); - - $methodsNode->appendChild($methodNode); - } - } - } - - $stats->appendChild($document->createElement('name', 'Method Crap Stats')); - $stats->appendChild($document->createElement('methodCount', $fullMethodCount)); - $stats->appendChild($document->createElement('crapMethodCount', $fullCrapMethodCount)); - $stats->appendChild($document->createElement('crapLoad', round($fullCrapLoad))); - $stats->appendChild($document->createElement('totalCrap', $fullCrap)); - $stats->appendChild($document->createElement('crapMethodPercent', $this->roundValue(100 * $fullCrapMethodCount / $fullMethodCount))); - - $root->appendChild($stats); - $root->appendChild($methodsNode); - - if ($target !== null) { - if (!is_dir(dirname($target))) { - mkdir(dirname($target), 0777, true); - } - - return $document->save($target); - } else { - return $document->saveXML(); - } - } - - private function getCrapLoad($crapValue, $cyclomaticComplexity, $coveragePercent) - { - $crapLoad = 0; - if ($crapValue > $this->threshold) { - $crapLoad += $cyclomaticComplexity * (1.0 - $coveragePercent / 100); - $crapLoad += $cyclomaticComplexity / $this->threshold; - } - - return $crapLoad; - } - - private function roundValue($value) - { - return round($value, 2); - } -} diff --git a/core/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Factory.php b/core/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Factory.php deleted file mode 100644 index c8cb63b..0000000 --- a/core/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Factory.php +++ /dev/null @@ -1,281 +0,0 @@ -. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @category PHP - * @package CodeCoverage - * @author Sebastian Bergmann - * @copyright 2009-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/php-code-coverage - * @since File available since Release 1.1.0 - */ - -/** - * Factory for PHP_CodeCoverage_Report_Node_* object graphs. - * - * @category PHP - * @package CodeCoverage - * @author Sebastian Bergmann - * @copyright 2009-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/php-code-coverage - * @since Class available since Release 1.1.0 - */ -class PHP_CodeCoverage_Report_Factory -{ - /** - * @param PHP_CodeCoverage $coverage - */ - public function create(PHP_CodeCoverage $coverage) - { - $files = $coverage->getData(); - $commonPath = $this->reducePaths($files); - $root = new PHP_CodeCoverage_Report_Node_Directory( - $commonPath, null - ); - - $this->addItems( - $root, - $this->buildDirectoryStructure($files), - $coverage->getTests(), - $coverage->getCacheTokens() - ); - - return $root; - } - - /** - * @param PHP_CodeCoverage_Report_Node_Directory $root - * @param array $items - * @param array $tests - * @param boolean $cacheTokens - */ - private function addItems(PHP_CodeCoverage_Report_Node_Directory $root, array $items, array $tests, $cacheTokens) - { - foreach ($items as $key => $value) { - if (substr($key, -2) == '/f') { - $key = substr($key, 0, -2); - - if (file_exists($root->getPath() . DIRECTORY_SEPARATOR . $key)) { - $root->addFile($key, $value, $tests, $cacheTokens); - } - } else { - $child = $root->addDirectory($key); - $this->addItems($child, $value, $tests, $cacheTokens); - } - } - } - - /** - * Builds an array representation of the directory structure. - * - * For instance, - * - * - * Array - * ( - * [Money.php] => Array - * ( - * ... - * ) - * - * [MoneyBag.php] => Array - * ( - * ... - * ) - * ) - * - * - * is transformed into - * - * - * Array - * ( - * [.] => Array - * ( - * [Money.php] => Array - * ( - * ... - * ) - * - * [MoneyBag.php] => Array - * ( - * ... - * ) - * ) - * ) - * - * - * @param array $files - * @return array - */ - private function buildDirectoryStructure($files) - { - $result = array(); - - foreach ($files as $path => $file) { - $path = explode('/', $path); - $pointer = &$result; - $max = count($path); - - for ($i = 0; $i < $max; $i++) { - if ($i == ($max - 1)) { - $type = '/f'; - } else { - $type = ''; - } - - $pointer = &$pointer[$path[$i] . $type]; - } - - $pointer = $file; - } - - return $result; - } - - /** - * Reduces the paths by cutting the longest common start path. - * - * For instance, - * - * - * Array - * ( - * [/home/sb/Money/Money.php] => Array - * ( - * ... - * ) - * - * [/home/sb/Money/MoneyBag.php] => Array - * ( - * ... - * ) - * ) - * - * - * is reduced to - * - * - * Array - * ( - * [Money.php] => Array - * ( - * ... - * ) - * - * [MoneyBag.php] => Array - * ( - * ... - * ) - * ) - * - * - * @param array $files - * @return string - */ - private function reducePaths(&$files) - { - if (empty($files)) { - return '.'; - } - - $commonPath = ''; - $paths = array_keys($files); - - if (count($files) == 1) { - $commonPath = dirname($paths[0]) . '/'; - $files[basename($paths[0])] = $files[$paths[0]]; - - unset($files[$paths[0]]); - - return $commonPath; - } - - $max = count($paths); - - for ($i = 0; $i < $max; $i++) { - // strip phar:// prefixes - if (strpos($paths[$i], 'phar://') === 0) { - $paths[$i] = substr($paths[$i], 7); - $paths[$i] = strtr($paths[$i], '/', DIRECTORY_SEPARATOR); - } - $paths[$i] = explode(DIRECTORY_SEPARATOR, $paths[$i]); - - if (empty($paths[$i][0])) { - $paths[$i][0] = DIRECTORY_SEPARATOR; - } - } - - $done = false; - $max = count($paths); - - while (!$done) { - for ($i = 0; $i < $max - 1; $i++) { - if (!isset($paths[$i][0]) || - !isset($paths[$i+1][0]) || - $paths[$i][0] != $paths[$i+1][0]) { - $done = true; - break; - } - } - - if (!$done) { - $commonPath .= $paths[0][0]; - - if ($paths[0][0] != DIRECTORY_SEPARATOR) { - $commonPath .= DIRECTORY_SEPARATOR; - } - - for ($i = 0; $i < $max; $i++) { - array_shift($paths[$i]); - } - } - } - - $original = array_keys($files); - $max = count($original); - - for ($i = 0; $i < $max; $i++) { - $files[join('/', $paths[$i])] = $files[$original[$i]]; - unset($files[$original[$i]]); - } - - ksort($files); - - return substr($commonPath, 0, -1); - } -} diff --git a/core/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML.php b/core/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML.php deleted file mode 100644 index 148cb52..0000000 --- a/core/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML.php +++ /dev/null @@ -1,223 +0,0 @@ -. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @category PHP - * @package CodeCoverage - * @author Sebastian Bergmann - * @copyright 2009-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/php-code-coverage - * @since File available since Release 1.0.0 - */ - -/** - * Generates an HTML report from an PHP_CodeCoverage object. - * - * @category PHP - * @package CodeCoverage - * @author Sebastian Bergmann - * @copyright 2009-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/php-code-coverage - * @since Class available since Release 1.0.0 - */ -class PHP_CodeCoverage_Report_HTML -{ - /** - * @var string - */ - private $templatePath; - - /** - * @var string - */ - private $generator; - - /** - * @var integer - */ - private $lowUpperBound; - - /** - * @var integer - */ - private $highLowerBound; - - /** - * Constructor. - * - * @param integer $lowUpperBound - * @param integer $highLowerBound - * @param string $generator - */ - public function __construct($lowUpperBound = 50, $highLowerBound = 90, $generator = '') - { - $this->generator = $generator; - $this->highLowerBound = $highLowerBound; - $this->lowUpperBound = $lowUpperBound; - - $this->templatePath = sprintf( - '%s%sHTML%sRenderer%sTemplate%s', - - dirname(__FILE__), - DIRECTORY_SEPARATOR, - DIRECTORY_SEPARATOR, - DIRECTORY_SEPARATOR, - DIRECTORY_SEPARATOR - ); - } - - /** - * @param PHP_CodeCoverage $coverage - * @param string $target - */ - public function process(PHP_CodeCoverage $coverage, $target) - { - $target = $this->getDirectory($target); - $report = $coverage->getReport(); - unset($coverage); - - if (!isset($_SERVER['REQUEST_TIME'])) { - $_SERVER['REQUEST_TIME'] = time(); - } - - $date = date('D M j G:i:s T Y', $_SERVER['REQUEST_TIME']); - - $dashboard = new PHP_CodeCoverage_Report_HTML_Renderer_Dashboard( - $this->templatePath, - $this->generator, - $date, - $this->lowUpperBound, - $this->highLowerBound - ); - - $directory = new PHP_CodeCoverage_Report_HTML_Renderer_Directory( - $this->templatePath, - $this->generator, - $date, - $this->lowUpperBound, - $this->highLowerBound - ); - - $file = new PHP_CodeCoverage_Report_HTML_Renderer_File( - $this->templatePath, - $this->generator, - $date, - $this->lowUpperBound, - $this->highLowerBound - ); - - $directory->render($report, $target . 'index.html'); - $dashboard->render($report, $target . 'dashboard.html'); - - foreach ($report as $node) { - $id = $node->getId(); - - if ($node instanceof PHP_CodeCoverage_Report_Node_Directory) { - if (!file_exists($target . $id)) { - mkdir($target . $id, 0777, true); - } - - $directory->render($node, $target . $id . '/index.html'); - $dashboard->render($node, $target . $id . '/dashboard.html'); - } else { - $dir = dirname($target . $id); - - if (!file_exists($dir)) { - mkdir($dir, 0777, true); - } - - $file->render($node, $target . $id . '.html'); - } - } - - $this->copyFiles($target); - } - - /** - * @param string $target - */ - private function copyFiles($target) - { - $dir = $this->getDirectory($target . 'css'); - copy($this->templatePath . 'css/bootstrap.min.css', $dir . 'bootstrap.min.css'); - copy($this->templatePath . 'css/nv.d3.css', $dir . 'nv.d3.css'); - copy($this->templatePath . 'css/style.css', $dir . 'style.css'); - - $dir = $this->getDirectory($target . 'fonts'); - copy($this->templatePath . 'fonts/glyphicons-halflings-regular.eot', $dir . 'glyphicons-halflings-regular.eot'); - copy($this->templatePath . 'fonts/glyphicons-halflings-regular.svg', $dir . 'glyphicons-halflings-regular.svg'); - copy($this->templatePath . 'fonts/glyphicons-halflings-regular.ttf', $dir . 'glyphicons-halflings-regular.ttf'); - copy($this->templatePath . 'fonts/glyphicons-halflings-regular.woff', $dir . 'glyphicons-halflings-regular.woff'); - - $dir = $this->getDirectory($target . 'js'); - copy($this->templatePath . 'js/bootstrap.min.js', $dir . 'bootstrap.min.js'); - copy($this->templatePath . 'js/d3.min.js', $dir . 'd3.min.js'); - copy($this->templatePath . 'js/holder.js', $dir . 'holder.js'); - copy($this->templatePath . 'js/html5shiv.min.js', $dir . 'html5shiv.min.js'); - copy($this->templatePath . 'js/jquery.min.js', $dir . 'jquery.min.js'); - copy($this->templatePath . 'js/nv.d3.min.js', $dir . 'nv.d3.min.js'); - copy($this->templatePath . 'js/respond.min.js', $dir . 'respond.min.js'); - } - - /** - * @param string $directory - * @return string - * @throws PHP_CodeCoverage_Exception - * @since Method available since Release 1.2.0 - */ - private function getDirectory($directory) - { - if (substr($directory, -1, 1) != DIRECTORY_SEPARATOR) { - $directory .= DIRECTORY_SEPARATOR; - } - - if (is_dir($directory)) { - return $directory; - } - - if (@mkdir($directory, 0777, true)) { - return $directory; - } - - throw new PHP_CodeCoverage_Exception( - sprintf( - 'Directory "%s" does not exist.', - $directory - ) - ); - } -} diff --git a/core/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer.php b/core/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer.php deleted file mode 100644 index 55ebabc..0000000 --- a/core/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer.php +++ /dev/null @@ -1,306 +0,0 @@ -. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @category PHP - * @package CodeCoverage - * @author Sebastian Bergmann - * @copyright 2009-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/php-code-coverage - * @since File available since Release 1.1.0 - */ - -use SebastianBergmann\Environment\Runtime; - -/** - * Base class for PHP_CodeCoverage_Report_Node renderers. - * - * @category PHP - * @package CodeCoverage - * @author Sebastian Bergmann - * @copyright 2009-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/php-code-coverage - * @since Class available since Release 1.1.0 - */ -abstract class PHP_CodeCoverage_Report_HTML_Renderer -{ - /** - * @var string - */ - protected $templatePath; - - /** - * @var string - */ - protected $generator; - - /** - * @var string - */ - protected $date; - - /** - * @var integer - */ - protected $lowUpperBound; - - /** - * @var integer - */ - protected $highLowerBound; - - /** - * @var string - */ - protected $version; - - /** - * Constructor. - * - * @param string $templatePath - * @param string $generator - * @param string $date - * @param integer $lowUpperBound - * @param integer $highLowerBound - */ - public function __construct($templatePath, $generator, $date, $lowUpperBound, $highLowerBound) - { - $version = new SebastianBergmann\Version('2.0.11', dirname(dirname(dirname(dirname(__DIR__))))); - - $this->templatePath = $templatePath; - $this->generator = $generator; - $this->date = $date; - $this->lowUpperBound = $lowUpperBound; - $this->highLowerBound = $highLowerBound; - $this->version = $version->getVersion(); - } - - /** - * @param Text_Template $template - * @param array $data - * @return string - */ - protected function renderItemTemplate(Text_Template $template, array $data) - { - $numSeperator = ' / '; - $classesBar = ' '; - $classesLevel = 'None'; - $classesNumber = ' '; - - if (isset($data['numClasses']) && $data['numClasses'] > 0) { - $classesLevel = $this->getColorLevel($data['testedClassesPercent']); - - $classesNumber = $data['numTestedClasses'] . $numSeperator . - $data['numClasses']; - - $classesBar = $this->getCoverageBar( - $data['testedClassesPercent'] - ); - } - - $methodsBar = ' '; - $methodsLevel = 'None'; - $methodsNumber = ' '; - - if ($data['numMethods'] > 0) { - $methodsLevel = $this->getColorLevel($data['testedMethodsPercent']); - - $methodsNumber = $data['numTestedMethods'] . $numSeperator . - $data['numMethods']; - - $methodsBar = $this->getCoverageBar( - $data['testedMethodsPercent'] - ); - } - - $linesBar = ' '; - $linesLevel = 'None'; - $linesNumber = ' '; - - if ($data['numExecutableLines'] > 0) { - $linesLevel = $this->getColorLevel($data['linesExecutedPercent']); - - $linesNumber = $data['numExecutedLines'] . $numSeperator . - $data['numExecutableLines']; - - $linesBar = $this->getCoverageBar( - $data['linesExecutedPercent'] - ); - } - - $template->setVar( - array( - 'icon' => isset($data['icon']) ? $data['icon'] : '', - 'crap' => isset($data['crap']) ? $data['crap'] : '', - 'name' => $data['name'], - 'lines_bar' => $linesBar, - 'lines_executed_percent' => $data['linesExecutedPercentAsString'], - 'lines_level' => $linesLevel, - 'lines_number' => $linesNumber, - 'methods_bar' => $methodsBar, - 'methods_tested_percent' => $data['testedMethodsPercentAsString'], - 'methods_level' => $methodsLevel, - 'methods_number' => $methodsNumber, - 'classes_bar' => $classesBar, - 'classes_tested_percent' => isset($data['testedClassesPercentAsString']) ? $data['testedClassesPercentAsString'] : '', - 'classes_level' => $classesLevel, - 'classes_number' => $classesNumber - ) - ); - - return $template->render(); - } - - /** - * @param Text_Template $template - * @param PHP_CodeCoverage_Report_Node $node - */ - protected function setCommonTemplateVariables(Text_Template $template, PHP_CodeCoverage_Report_Node $node) - { - $runtime = new Runtime; - - $template->setVar( - array( - 'id' => $node->getId(), - 'full_path' => $node->getPath(), - 'path_to_root' => $this->getPathToRoot($node), - 'breadcrumbs' => $this->getBreadcrumbs($node), - 'date' => $this->date, - 'version' => $this->version, - 'runtime_name' => $runtime->getName(), - 'runtime_version' => $runtime->getVersion(), - 'runtime_link' => $runtime->getVendorUrl(), - 'generator' => $this->generator, - 'low_upper_bound' => $this->lowUpperBound, - 'high_lower_bound' => $this->highLowerBound - ) - ); - } - - protected function getBreadcrumbs(PHP_CodeCoverage_Report_Node $node) - { - $breadcrumbs = ''; - $path = $node->getPathAsArray(); - $pathToRoot = array(); - $max = count($path); - - if ($node instanceof PHP_CodeCoverage_Report_Node_File) { - $max--; - } - - for ($i = 0; $i < $max; $i++) { - $pathToRoot[] = str_repeat('../', $i); - } - - foreach ($path as $step) { - if ($step !== $node) { - $breadcrumbs .= $this->getInactiveBreadcrumb( - $step, array_pop($pathToRoot) - ); - } else { - $breadcrumbs .= $this->getActiveBreadcrumb($step); - } - } - - return $breadcrumbs; - } - - protected function getActiveBreadcrumb(PHP_CodeCoverage_Report_Node $node) - { - $buffer = sprintf( - '
  • %s
  • ' . "\n", - $node->getName() - ); - - if ($node instanceof PHP_CodeCoverage_Report_Node_Directory) { - $buffer .= '
  • (Dashboard)
  • ' . "\n"; - } - - return $buffer; - } - - protected function getInactiveBreadcrumb(PHP_CodeCoverage_Report_Node $node, $pathToRoot) - { - return sprintf( - '
  • %s
  • ' . "\n", - $pathToRoot, - $node->getName() - ); - } - - protected function getPathToRoot(PHP_CodeCoverage_Report_Node $node) - { - $id = $node->getId(); - $depth = substr_count($id, '/'); - - if ($id != 'index' && - $node instanceof PHP_CodeCoverage_Report_Node_Directory) { - $depth++; - } - - return str_repeat('../', $depth); - } - - protected function getCoverageBar($percent) - { - $level = $this->getColorLevel($percent); - - $template = new Text_Template( - $this->templatePath . 'coverage_bar.html', '{{', '}}' - ); - - $template->setVar(array('level' => $level, 'percent' => sprintf("%.2F", $percent))); - - return $template->render(); - } - - /** - * @param integer $percent - * @return string - */ - protected function getColorLevel($percent) - { - if ($percent < $this->lowUpperBound) { - return 'danger'; - } elseif ($percent >= $this->lowUpperBound && - $percent < $this->highLowerBound) { - return 'warning'; - } else { - return 'success'; - } - } -} diff --git a/core/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Dashboard.php b/core/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Dashboard.php deleted file mode 100644 index b913c42..0000000 --- a/core/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Dashboard.php +++ /dev/null @@ -1,330 +0,0 @@ -. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @category PHP - * @package CodeCoverage - * @author Sebastian Bergmann - * @copyright 2009-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/php-code-coverage - * @since File available since Release 1.1.0 - */ - -/** - * Renders the dashboard for a PHP_CodeCoverage_Report_Node_Directory node. - * - * @category PHP - * @package CodeCoverage - * @author Sebastian Bergmann - * @copyright 2009-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/php-code-coverage - * @since Class available since Release 1.1.0 - */ -class PHP_CodeCoverage_Report_HTML_Renderer_Dashboard extends PHP_CodeCoverage_Report_HTML_Renderer -{ - /** - * @param PHP_CodeCoverage_Report_Node_Directory $node - * @param string $file - */ - public function render(PHP_CodeCoverage_Report_Node_Directory $node, $file) - { - $classes = $node->getClassesAndTraits(); - $template = new Text_Template( - $this->templatePath . 'dashboard.html', '{{', '}}' - ); - - $this->setCommonTemplateVariables($template, $node); - - $complexity = $this->complexity($classes); - $coverageDistribution = $this->coverageDistribution($classes); - $insufficientCoverage = $this->insufficientCoverage($classes); - $projectRisks = $this->projectRisks($classes); - - $template->setVar( - array( - 'insufficient_coverage_classes' => $insufficientCoverage['class'], - 'insufficient_coverage_methods' => $insufficientCoverage['method'], - 'project_risks_classes' => $projectRisks['class'], - 'project_risks_methods' => $projectRisks['method'], - 'complexity_class' => $complexity['class'], - 'complexity_method' => $complexity['method'], - 'class_coverage_distribution' => $coverageDistribution['class'], - 'method_coverage_distribution' => $coverageDistribution['method'] - ) - ); - - $template->renderTo($file); - } - - /** - * Returns the data for the Class/Method Complexity charts. - * - * @param array $classes - * @return array - */ - protected function complexity(array $classes) - { - $result = array('class' => array(), 'method' => array()); - - foreach ($classes as $className => $class) { - foreach ($class['methods'] as $methodName => $method) { - if ($className != '*') { - $methodName = $className . '::' . $methodName; - } - - $result['method'][] = array( - $method['coverage'], - $method['ccn'], - sprintf( - '%s', - $method['link'], - $methodName - ) - ); - } - - $result['class'][] = array( - $class['coverage'], - $class['ccn'], - sprintf( - '%s', - $class['link'], - $className - ) - ); - } - - return array( - 'class' => json_encode($result['class']), - 'method' => json_encode($result['method']) - ); - } - - /** - * Returns the data for the Class / Method Coverage Distribution chart. - * - * @param array $classes - * @return array - */ - protected function coverageDistribution(array $classes) - { - $result = array( - 'class' => array( - '0%' => 0, - '0-10%' => 0, - '10-20%' => 0, - '20-30%' => 0, - '30-40%' => 0, - '40-50%' => 0, - '50-60%' => 0, - '60-70%' => 0, - '70-80%' => 0, - '80-90%' => 0, - '90-100%' => 0, - '100%' => 0 - ), - 'method' => array( - '0%' => 0, - '0-10%' => 0, - '10-20%' => 0, - '20-30%' => 0, - '30-40%' => 0, - '40-50%' => 0, - '50-60%' => 0, - '60-70%' => 0, - '70-80%' => 0, - '80-90%' => 0, - '90-100%' => 0, - '100%' => 0 - ) - ); - - foreach ($classes as $class) { - foreach ($class['methods'] as $methodName => $method) { - if ($method['coverage'] == 0) { - $result['method']['0%']++; - } elseif ($method['coverage'] == 100) { - $result['method']['100%']++; - } else { - $key = floor($method['coverage'] / 10) * 10; - $key = $key . '-' . ($key + 10) . '%'; - $result['method'][$key]++; - } - } - - if ($class['coverage'] == 0) { - $result['class']['0%']++; - } elseif ($class['coverage'] == 100) { - $result['class']['100%']++; - } else { - $key = floor($class['coverage'] / 10) * 10; - $key = $key . '-' . ($key + 10) . '%'; - $result['class'][$key]++; - } - } - - return array( - 'class' => json_encode(array_values($result['class'])), - 'method' => json_encode(array_values($result['method'])) - ); - } - - /** - * Returns the classes / methods with insufficient coverage. - * - * @param array $classes - * @return array - */ - protected function insufficientCoverage(array $classes) - { - $leastTestedClasses = array(); - $leastTestedMethods = array(); - $result = array('class' => '', 'method' => ''); - - foreach ($classes as $className => $class) { - foreach ($class['methods'] as $methodName => $method) { - if ($method['coverage'] < $this->highLowerBound) { - if ($className != '*') { - $key = $className . '::' . $methodName; - } else { - $key = $methodName; - } - - $leastTestedMethods[$key] = $method['coverage']; - } - } - - if ($class['coverage'] < $this->highLowerBound) { - $leastTestedClasses[$className] = $class['coverage']; - } - } - - asort($leastTestedClasses); - asort($leastTestedMethods); - - foreach ($leastTestedClasses as $className => $coverage) { - $result['class'] .= sprintf( - ' %s%d%%' . "\n", - $classes[$className]['link'], - $className, - $coverage - ); - } - - foreach ($leastTestedMethods as $methodName => $coverage) { - list($class, $method) = explode('::', $methodName); - - $result['method'] .= sprintf( - ' %s%d%%' . "\n", - $classes[$class]['methods'][$method]['link'], - $methodName, - $method, - $coverage - ); - } - - return $result; - } - - /** - * Returns the project risks according to the CRAP index. - * - * @param array $classes - * @return array - */ - protected function projectRisks(array $classes) - { - $classRisks = array(); - $methodRisks = array(); - $result = array('class' => '', 'method' => ''); - - foreach ($classes as $className => $class) { - foreach ($class['methods'] as $methodName => $method) { - if ($method['coverage'] < $this->highLowerBound && - $method['ccn'] > 1) { - if ($className != '*') { - $key = $className . '::' . $methodName; - } else { - $key = $methodName; - } - - $methodRisks[$key] = $method['crap']; - } - } - - if ($class['coverage'] < $this->highLowerBound && - $class['ccn'] > count($class['methods'])) { - $classRisks[$className] = $class['crap']; - } - } - - arsort($classRisks); - arsort($methodRisks); - - foreach ($classRisks as $className => $crap) { - $result['class'] .= sprintf( - ' %s%d' . "\n", - $classes[$className]['link'], - $className, - $crap - ); - } - - foreach ($methodRisks as $methodName => $crap) { - list($class, $method) = explode('::', $methodName); - - $result['method'] .= sprintf( - ' %s%d' . "\n", - $classes[$class]['methods'][$method]['link'], - $methodName, - $method, - $crap - ); - } - - return $result; - } - - protected function getActiveBreadcrumb(PHP_CodeCoverage_Report_Node $node) - { - return sprintf( - '
  • %s
  • ' . "\n" . - '
  • (Dashboard)
  • ' . "\n", - $node->getName() - ); - } -} diff --git a/core/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Directory.php b/core/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Directory.php deleted file mode 100644 index 4cf6000..0000000 --- a/core/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Directory.php +++ /dev/null @@ -1,138 +0,0 @@ -. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @category PHP - * @package CodeCoverage - * @author Sebastian Bergmann - * @copyright 2009-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/php-code-coverage - * @since File available since Release 1.1.0 - */ - -/** - * Renders a PHP_CodeCoverage_Report_Node_Directory node. - * - * @category PHP - * @package CodeCoverage - * @author Sebastian Bergmann - * @copyright 2009-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/php-code-coverage - * @since Class available since Release 1.1.0 - */ -class PHP_CodeCoverage_Report_HTML_Renderer_Directory extends PHP_CodeCoverage_Report_HTML_Renderer -{ - /** - * @param PHP_CodeCoverage_Report_Node_Directory $node - * @param string $file - */ - public function render(PHP_CodeCoverage_Report_Node_Directory $node, $file) - { - $template = new Text_Template($this->templatePath . 'directory.html', '{{', '}}'); - - $this->setCommonTemplateVariables($template, $node); - - $items = $this->renderItem($node, true); - - foreach ($node->getDirectories() as $item) { - $items .= $this->renderItem($item); - } - - foreach ($node->getFiles() as $item) { - $items .= $this->renderItem($item); - } - - $template->setVar( - array( - 'id' => $node->getId(), - 'items' => $items - ) - ); - - $template->renderTo($file); - } - - /** - * @param PHP_CodeCoverage_Report_Node $item - * @param boolean $total - * @return string - */ - protected function renderItem(PHP_CodeCoverage_Report_Node $item, $total = false) - { - $data = array( - 'numClasses' => $item->getNumClassesAndTraits(), - 'numTestedClasses' => $item->getNumTestedClassesAndTraits(), - 'numMethods' => $item->getNumMethods(), - 'numTestedMethods' => $item->getNumTestedMethods(), - 'linesExecutedPercent' => $item->getLineExecutedPercent(false), - 'linesExecutedPercentAsString' => $item->getLineExecutedPercent(), - 'numExecutedLines' => $item->getNumExecutedLines(), - 'numExecutableLines' => $item->getNumExecutableLines(), - 'testedMethodsPercent' => $item->getTestedMethodsPercent(false), - 'testedMethodsPercentAsString' => $item->getTestedMethodsPercent(), - 'testedClassesPercent' => $item->getTestedClassesAndTraitsPercent(false), - 'testedClassesPercentAsString' => $item->getTestedClassesAndTraitsPercent() - ); - - if ($total) { - $data['name'] = 'Total'; - } else { - if ($item instanceof PHP_CodeCoverage_Report_Node_Directory) { - $data['name'] = sprintf( - '%s', - $item->getName(), - $item->getName() - ); - - $data['icon'] = ' '; - } else { - $data['name'] = sprintf( - '%s', - $item->getName(), - $item->getName() - ); - - $data['icon'] = ' '; - } - } - - return $this->renderItemTemplate( - new Text_Template($this->templatePath . 'directory_item.html', '{{', '}}'), - $data - ); - } -} diff --git a/core/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/File.php b/core/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/File.php deleted file mode 100644 index 8c73f8f..0000000 --- a/core/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/File.php +++ /dev/null @@ -1,575 +0,0 @@ -. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @category PHP - * @package CodeCoverage - * @author Sebastian Bergmann - * @copyright 2009-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/php-code-coverage - * @since File available since Release 1.1.0 - */ - -// @codeCoverageIgnoreStart -if (!defined('T_TRAIT')) { - define('T_TRAIT', 1001); -} - -if (!defined('T_INSTEADOF')) { - define('T_INSTEADOF', 1002); -} - -if (!defined('T_CALLABLE')) { - define('T_CALLABLE', 1003); -} - -if (!defined('T_FINALLY')) { - define('T_FINALLY', 1004); -} - -if (!defined('T_YIELD')) { - define('T_YIELD', 1005); -} -// @codeCoverageIgnoreEnd - -/** - * Renders a PHP_CodeCoverage_Report_Node_File node. - * - * @category PHP - * @package CodeCoverage - * @author Sebastian Bergmann - * @copyright 2009-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/php-code-coverage - * @since Class available since Release 1.1.0 - */ -class PHP_CodeCoverage_Report_HTML_Renderer_File extends PHP_CodeCoverage_Report_HTML_Renderer -{ - /** - * Constructor. - * - * @param string $templatePath - * @param string $generator - * @param string $date - * @param integer $lowUpperBound - * @param integer $highLowerBound - */ - public function __construct($templatePath, $generator, $date, $lowUpperBound, $highLowerBound) - { - parent::__construct( - $templatePath, - $generator, - $date, - $lowUpperBound, - $highLowerBound - ); - } - - /** - * @param PHP_CodeCoverage_Report_Node_File $node - * @param string $file - */ - public function render(PHP_CodeCoverage_Report_Node_File $node, $file) - { - $template = new Text_Template($this->templatePath . 'file.html', '{{', '}}'); - - $template->setVar( - array( - 'items' => $this->renderItems($node), - 'lines' => $this->renderSource($node) - ) - ); - - $this->setCommonTemplateVariables($template, $node); - - $template->renderTo($file); - } - - /** - * @param PHP_CodeCoverage_Report_Node_File $node - * @return string - */ - protected function renderItems(PHP_CodeCoverage_Report_Node_File $node) - { - $template = new Text_Template($this->templatePath . 'file_item.html', '{{', '}}'); - - $methodItemTemplate = new Text_Template( - $this->templatePath . 'method_item.html', '{{', '}}' - ); - - $items = $this->renderItemTemplate( - $template, - array( - 'name' => 'Total', - 'numClasses' => $node->getNumClassesAndTraits(), - 'numTestedClasses' => $node->getNumTestedClassesAndTraits(), - 'numMethods' => $node->getNumMethods(), - 'numTestedMethods' => $node->getNumTestedMethods(), - 'linesExecutedPercent' => $node->getLineExecutedPercent(false), - 'linesExecutedPercentAsString' => $node->getLineExecutedPercent(), - 'numExecutedLines' => $node->getNumExecutedLines(), - 'numExecutableLines' => $node->getNumExecutableLines(), - 'testedMethodsPercent' => $node->getTestedMethodsPercent(false), - 'testedMethodsPercentAsString' => $node->getTestedMethodsPercent(), - 'testedClassesPercent' => $node->getTestedClassesAndTraitsPercent(false), - 'testedClassesPercentAsString' => $node->getTestedClassesAndTraitsPercent(), - 'crap' => 'CRAP' - ) - ); - - $items .= $this->renderFunctionItems( - $node->getFunctions(), - $methodItemTemplate - ); - - $items .= $this->renderTraitOrClassItems( - $node->getTraits(), - $template, - $methodItemTemplate - ); - - $items .= $this->renderTraitOrClassItems( - $node->getClasses(), - $template, - $methodItemTemplate - ); - - return $items; - } - - /** - * @param array $items - * @param Text_Template $template - * @param Text_Template $methodItemTemplate - * @return string - */ - protected function renderTraitOrClassItems(array $items, Text_Template $template, Text_Template $methodItemTemplate) - { - if (empty($items)) { - return ''; - } - - $buffer = ''; - - foreach ($items as $name => $item) { - $numMethods = count($item['methods']); - $numTestedMethods = 0; - - foreach ($item['methods'] as $method) { - if ($method['executedLines'] == $method['executableLines']) { - $numTestedMethods++; - } - } - - $buffer .= $this->renderItemTemplate( - $template, - array( - 'name' => $name, - 'numClasses' => 1, - 'numTestedClasses' => $numTestedMethods == $numMethods ? 1 : 0, - 'numMethods' => $numMethods, - 'numTestedMethods' => $numTestedMethods, - 'linesExecutedPercent' => PHP_CodeCoverage_Util::percent( - $item['executedLines'], - $item['executableLines'], - false - ), - 'linesExecutedPercentAsString' => PHP_CodeCoverage_Util::percent( - $item['executedLines'], - $item['executableLines'], - true - ), - 'numExecutedLines' => $item['executedLines'], - 'numExecutableLines' => $item['executableLines'], - 'testedMethodsPercent' => PHP_CodeCoverage_Util::percent( - $numTestedMethods, - $numMethods, - false - ), - 'testedMethodsPercentAsString' => PHP_CodeCoverage_Util::percent( - $numTestedMethods, - $numMethods, - true - ), - 'testedClassesPercent' => PHP_CodeCoverage_Util::percent( - $numTestedMethods == $numMethods ? 1 : 0, - 1, - false - ), - 'testedClassesPercentAsString' => PHP_CodeCoverage_Util::percent( - $numTestedMethods == $numMethods ? 1 : 0, - 1, - true - ), - 'crap' => $item['crap'] - ) - ); - - foreach ($item['methods'] as $method) { - $buffer .= $this->renderFunctionOrMethodItem( - $methodItemTemplate, $method, ' ' - ); - } - } - - return $buffer; - } - - /** - * @param array $functions - * @param Text_Template $template - * @return string - */ - protected function renderFunctionItems(array $functions, Text_Template $template) - { - if (empty($functions)) { - return ''; - } - - $buffer = ''; - - foreach ($functions as $function) { - $buffer .= $this->renderFunctionOrMethodItem( - $template, $function - ); - } - - return $buffer; - } - - /** - * @param Text_Template $template - * @return string - */ - protected function renderFunctionOrMethodItem(Text_Template $template, array $item, $indent = '') - { - $numTestedItems = $item['executedLines'] == $item['executableLines'] ? 1 : 0; - - return $this->renderItemTemplate( - $template, - array( - 'name' => sprintf( - '%s%s', - $indent, - $item['startLine'], - htmlspecialchars($item['signature']) - ), - 'numMethods' => 1, - 'numTestedMethods' => $numTestedItems, - 'linesExecutedPercent' => PHP_CodeCoverage_Util::percent( - $item['executedLines'], - $item['executableLines'], - false - ), - 'linesExecutedPercentAsString' => PHP_CodeCoverage_Util::percent( - $item['executedLines'], - $item['executableLines'], - true - ), - 'numExecutedLines' => $item['executedLines'], - 'numExecutableLines' => $item['executableLines'], - 'testedMethodsPercent' => PHP_CodeCoverage_Util::percent( - $numTestedItems, - 1, - false - ), - 'testedMethodsPercentAsString' => PHP_CodeCoverage_Util::percent( - $numTestedItems, - 1, - true - ), - 'crap' => $item['crap'] - ) - ); - } - - /** - * @param PHP_CodeCoverage_Report_Node_File $node - * @return string - */ - protected function renderSource(PHP_CodeCoverage_Report_Node_File $node) - { - $coverageData = $node->getCoverageData(); - $testData = $node->getTestData(); - $codeLines = $this->loadFile($node->getPath()); - $lines = ''; - $i = 1; - - foreach ($codeLines as $line) { - $numTests = ''; - $trClass = ''; - $popoverContent = ''; - $popoverTitle = ''; - - if (array_key_exists($i, $coverageData)) { - $numTests = count($coverageData[$i]); - - if ($coverageData[$i] === null) { - $trClass = ' class="warning"'; - } elseif ($numTests == 0) { - $trClass = ' class="danger"'; - } else { - $trClass = ' class="success popin"'; - $popoverContent = '
      '; - - if ($numTests > 1) { - $popoverTitle = $numTests . ' tests cover line ' . $i; - } else { - $popoverTitle = '1 test covers line ' . $i; - } - - foreach ($coverageData[$i] as $test) { - switch ($testData[$test]) { - case 0: { - $testCSS = ' class="success"'; - } - break; - - case 1: - case 2: { - $testCSS = ' class="warning"'; - } - break; - - case 3: { - $testCSS = ' class="danger"'; - } - break; - - case 4: { - $testCSS = ' class="danger"'; - } - break; - - default: { - $testCSS = ''; - } - } - - $popoverContent .= sprintf( - '%s', - - $testCSS, - htmlspecialchars($test) - ); - } - - $popoverContent .= '
    '; - } - } - - if (!empty($popoverTitle)) { - $popover = sprintf( - ' data-title="%s" data-content="%s" data-placement="bottom" data-html="true"', - $popoverTitle, - htmlspecialchars($popoverContent) - ); - } else { - $popover = ''; - } - - $lines .= sprintf( - ' %s' . "\n", - $trClass, - $popover, - $i, - $i, - $i, - $line - ); - - $i++; - } - - return $lines; - } - - /** - * @param string $file - * @return array - */ - protected function loadFile($file) - { - $buffer = file_get_contents($file); - $tokens = token_get_all($buffer); - $result = array(''); - $i = 0; - $stringFlag = false; - $fileEndsWithNewLine = substr($buffer, -1) == "\n"; - - unset($buffer); - - foreach ($tokens as $j => $token) { - if (is_string($token)) { - if ($token === '"' && $tokens[$j - 1] !== '\\') { - $result[$i] .= sprintf( - '%s', - - htmlspecialchars($token) - ); - - $stringFlag = !$stringFlag; - } else { - $result[$i] .= sprintf( - '%s', - - htmlspecialchars($token) - ); - } - - continue; - } - - list ($token, $value) = $token; - - $value = str_replace( - array("\t", ' '), - array('    ', ' '), - htmlspecialchars($value) - ); - - if ($value === "\n") { - $result[++$i] = ''; - } else { - $lines = explode("\n", $value); - - foreach ($lines as $jj => $line) { - $line = trim($line); - - if ($line !== '') { - if ($stringFlag) { - $colour = 'string'; - } else { - switch ($token) { - case T_INLINE_HTML: { - $colour = 'html'; - } - break; - - case T_COMMENT: - case T_DOC_COMMENT: { - $colour = 'comment'; - } - break; - - case T_ABSTRACT: - case T_ARRAY: - case T_AS: - case T_BREAK: - case T_CALLABLE: - case T_CASE: - case T_CATCH: - case T_CLASS: - case T_CLONE: - case T_CONTINUE: - case T_DEFAULT: - case T_ECHO: - case T_ELSE: - case T_ELSEIF: - case T_EMPTY: - case T_ENDDECLARE: - case T_ENDFOR: - case T_ENDFOREACH: - case T_ENDIF: - case T_ENDSWITCH: - case T_ENDWHILE: - case T_EXIT: - case T_EXTENDS: - case T_FINAL: - case T_FINALLY: - case T_FOREACH: - case T_FUNCTION: - case T_GLOBAL: - case T_IF: - case T_IMPLEMENTS: - case T_INCLUDE: - case T_INCLUDE_ONCE: - case T_INSTANCEOF: - case T_INSTEADOF: - case T_INTERFACE: - case T_ISSET: - case T_LOGICAL_AND: - case T_LOGICAL_OR: - case T_LOGICAL_XOR: - case T_NAMESPACE: - case T_NEW: - case T_PRIVATE: - case T_PROTECTED: - case T_PUBLIC: - case T_REQUIRE: - case T_REQUIRE_ONCE: - case T_RETURN: - case T_STATIC: - case T_THROW: - case T_TRAIT: - case T_TRY: - case T_UNSET: - case T_USE: - case T_VAR: - case T_WHILE: - case T_YIELD: { - $colour = 'keyword'; - } - break; - - default: { - $colour = 'default'; - } - } - } - - $result[$i] .= sprintf( - '%s', - - $colour, - $line - ); - } - - if (isset($lines[$jj + 1])) { - $result[++$i] = ''; - } - } - } - } - - if ($fileEndsWithNewLine) { - unset($result[count($result)-1]); - } - - return $result; - } -} diff --git a/core/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/coverage_bar.html.dist b/core/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/coverage_bar.html.dist deleted file mode 100644 index 5a09c35..0000000 --- a/core/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/coverage_bar.html.dist +++ /dev/null @@ -1,5 +0,0 @@ -
    -
    - {{percent}}% covered ({{level}}) -
    -
    diff --git a/core/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/css/bootstrap.min.css b/core/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/css/bootstrap.min.css deleted file mode 100644 index a9f35ce..0000000 --- a/core/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/css/bootstrap.min.css +++ /dev/null @@ -1,5 +0,0 @@ -/*! - * Bootstrap v3.2.0 (http://getbootstrap.com) - * Copyright 2011-2014 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - *//*! normalize.css v3.0.1 | MIT License | git.io/normalize */html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background:0 0}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0;font-size:2em}mark{color:#000;background:#ff0}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{height:0;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{margin:0;font:inherit;color:inherit}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}input{line-height:normal}input[type=checkbox],input[type=radio]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{padding:.35em .625em .75em;margin:0 2px;border:1px solid silver}legend{padding:0;border:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-spacing:0;border-collapse:collapse}td,th{padding:0}@media print{*{color:#000!important;text-shadow:none!important;background:transparent!important;-webkit-box-shadow:none!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="javascript:"]:after,a[href^="#"]:after{content:""}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100%!important}p,h2,h3{orphans:3;widows:3}h2,h3{page-break-after:avoid}select{background:#fff!important}.navbar{display:none}.table td,.table th{background-color:#fff!important}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table-bordered th,.table-bordered td{border:1px solid #ddd!important}}@font-face{font-family:'Glyphicons Halflings';src:url(../fonts/glyphicons-halflings-regular.eot);src:url(../fonts/glyphicons-halflings-regular.eot?#iefix) format('embedded-opentype'),url(../fonts/glyphicons-halflings-regular.woff) format('woff'),url(../fonts/glyphicons-halflings-regular.ttf) format('truetype'),url(../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular) format('svg')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"\2a"}.glyphicon-plus:before{content:"\2b"}.glyphicon-euro:before{content:"\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:before{content:"\e003"}.glyphicon-heart:before{content:"\e005"}.glyphicon-star:before{content:"\e006"}.glyphicon-star-empty:before{content:"\e007"}.glyphicon-user:before{content:"\e008"}.glyphicon-film:before{content:"\e009"}.glyphicon-th-large:before{content:"\e010"}.glyphicon-th:before{content:"\e011"}.glyphicon-th-list:before{content:"\e012"}.glyphicon-ok:before{content:"\e013"}.glyphicon-remove:before{content:"\e014"}.glyphicon-zoom-in:before{content:"\e015"}.glyphicon-zoom-out:before{content:"\e016"}.glyphicon-off:before{content:"\e017"}.glyphicon-signal:before{content:"\e018"}.glyphicon-cog:before{content:"\e019"}.glyphicon-trash:before{content:"\e020"}.glyphicon-home:before{content:"\e021"}.glyphicon-file:before{content:"\e022"}.glyphicon-time:before{content:"\e023"}.glyphicon-road:before{content:"\e024"}.glyphicon-download-alt:before{content:"\e025"}.glyphicon-download:before{content:"\e026"}.glyphicon-upload:before{content:"\e027"}.glyphicon-inbox:before{content:"\e028"}.glyphicon-play-circle:before{content:"\e029"}.glyphicon-repeat:before{content:"\e030"}.glyphicon-refresh:before{content:"\e031"}.glyphicon-list-alt:before{content:"\e032"}.glyphicon-lock:before{content:"\e033"}.glyphicon-flag:before{content:"\e034"}.glyphicon-headphones:before{content:"\e035"}.glyphicon-volume-off:before{content:"\e036"}.glyphicon-volume-down:before{content:"\e037"}.glyphicon-volume-up:before{content:"\e038"}.glyphicon-qrcode:before{content:"\e039"}.glyphicon-barcode:before{content:"\e040"}.glyphicon-tag:before{content:"\e041"}.glyphicon-tags:before{content:"\e042"}.glyphicon-book:before{content:"\e043"}.glyphicon-bookmark:before{content:"\e044"}.glyphicon-print:before{content:"\e045"}.glyphicon-camera:before{content:"\e046"}.glyphicon-font:before{content:"\e047"}.glyphicon-bold:before{content:"\e048"}.glyphicon-italic:before{content:"\e049"}.glyphicon-text-height:before{content:"\e050"}.glyphicon-text-width:before{content:"\e051"}.glyphicon-align-left:before{content:"\e052"}.glyphicon-align-center:before{content:"\e053"}.glyphicon-align-right:before{content:"\e054"}.glyphicon-align-justify:before{content:"\e055"}.glyphicon-list:before{content:"\e056"}.glyphicon-indent-left:before{content:"\e057"}.glyphicon-indent-right:before{content:"\e058"}.glyphicon-facetime-video:before{content:"\e059"}.glyphicon-picture:before{content:"\e060"}.glyphicon-map-marker:before{content:"\e062"}.glyphicon-adjust:before{content:"\e063"}.glyphicon-tint:before{content:"\e064"}.glyphicon-edit:before{content:"\e065"}.glyphicon-share:before{content:"\e066"}.glyphicon-check:before{content:"\e067"}.glyphicon-move:before{content:"\e068"}.glyphicon-step-backward:before{content:"\e069"}.glyphicon-fast-backward:before{content:"\e070"}.glyphicon-backward:before{content:"\e071"}.glyphicon-play:before{content:"\e072"}.glyphicon-pause:before{content:"\e073"}.glyphicon-stop:before{content:"\e074"}.glyphicon-forward:before{content:"\e075"}.glyphicon-fast-forward:before{content:"\e076"}.glyphicon-step-forward:before{content:"\e077"}.glyphicon-eject:before{content:"\e078"}.glyphicon-chevron-left:before{content:"\e079"}.glyphicon-chevron-right:before{content:"\e080"}.glyphicon-plus-sign:before{content:"\e081"}.glyphicon-minus-sign:before{content:"\e082"}.glyphicon-remove-sign:before{content:"\e083"}.glyphicon-ok-sign:before{content:"\e084"}.glyphicon-question-sign:before{content:"\e085"}.glyphicon-info-sign:before{content:"\e086"}.glyphicon-screenshot:before{content:"\e087"}.glyphicon-remove-circle:before{content:"\e088"}.glyphicon-ok-circle:before{content:"\e089"}.glyphicon-ban-circle:before{content:"\e090"}.glyphicon-arrow-left:before{content:"\e091"}.glyphicon-arrow-right:before{content:"\e092"}.glyphicon-arrow-up:before{content:"\e093"}.glyphicon-arrow-down:before{content:"\e094"}.glyphicon-share-alt:before{content:"\e095"}.glyphicon-resize-full:before{content:"\e096"}.glyphicon-resize-small:before{content:"\e097"}.glyphicon-exclamation-sign:before{content:"\e101"}.glyphicon-gift:before{content:"\e102"}.glyphicon-leaf:before{content:"\e103"}.glyphicon-fire:before{content:"\e104"}.glyphicon-eye-open:before{content:"\e105"}.glyphicon-eye-close:before{content:"\e106"}.glyphicon-warning-sign:before{content:"\e107"}.glyphicon-plane:before{content:"\e108"}.glyphicon-calendar:before{content:"\e109"}.glyphicon-random:before{content:"\e110"}.glyphicon-comment:before{content:"\e111"}.glyphicon-magnet:before{content:"\e112"}.glyphicon-chevron-up:before{content:"\e113"}.glyphicon-chevron-down:before{content:"\e114"}.glyphicon-retweet:before{content:"\e115"}.glyphicon-shopping-cart:before{content:"\e116"}.glyphicon-folder-close:before{content:"\e117"}.glyphicon-folder-open:before{content:"\e118"}.glyphicon-resize-vertical:before{content:"\e119"}.glyphicon-resize-horizontal:before{content:"\e120"}.glyphicon-hdd:before{content:"\e121"}.glyphicon-bullhorn:before{content:"\e122"}.glyphicon-bell:before{content:"\e123"}.glyphicon-certificate:before{content:"\e124"}.glyphicon-thumbs-up:before{content:"\e125"}.glyphicon-thumbs-down:before{content:"\e126"}.glyphicon-hand-right:before{content:"\e127"}.glyphicon-hand-left:before{content:"\e128"}.glyphicon-hand-up:before{content:"\e129"}.glyphicon-hand-down:before{content:"\e130"}.glyphicon-circle-arrow-right:before{content:"\e131"}.glyphicon-circle-arrow-left:before{content:"\e132"}.glyphicon-circle-arrow-up:before{content:"\e133"}.glyphicon-circle-arrow-down:before{content:"\e134"}.glyphicon-globe:before{content:"\e135"}.glyphicon-wrench:before{content:"\e136"}.glyphicon-tasks:before{content:"\e137"}.glyphicon-filter:before{content:"\e138"}.glyphicon-briefcase:before{content:"\e139"}.glyphicon-fullscreen:before{content:"\e140"}.glyphicon-dashboard:before{content:"\e141"}.glyphicon-paperclip:before{content:"\e142"}.glyphicon-heart-empty:before{content:"\e143"}.glyphicon-link:before{content:"\e144"}.glyphicon-phone:before{content:"\e145"}.glyphicon-pushpin:before{content:"\e146"}.glyphicon-usd:before{content:"\e148"}.glyphicon-gbp:before{content:"\e149"}.glyphicon-sort:before{content:"\e150"}.glyphicon-sort-by-alphabet:before{content:"\e151"}.glyphicon-sort-by-alphabet-alt:before{content:"\e152"}.glyphicon-sort-by-order:before{content:"\e153"}.glyphicon-sort-by-order-alt:before{content:"\e154"}.glyphicon-sort-by-attributes:before{content:"\e155"}.glyphicon-sort-by-attributes-alt:before{content:"\e156"}.glyphicon-unchecked:before{content:"\e157"}.glyphicon-expand:before{content:"\e158"}.glyphicon-collapse-down:before{content:"\e159"}.glyphicon-collapse-up:before{content:"\e160"}.glyphicon-log-in:before{content:"\e161"}.glyphicon-flash:before{content:"\e162"}.glyphicon-log-out:before{content:"\e163"}.glyphicon-new-window:before{content:"\e164"}.glyphicon-record:before{content:"\e165"}.glyphicon-save:before{content:"\e166"}.glyphicon-open:before{content:"\e167"}.glyphicon-saved:before{content:"\e168"}.glyphicon-import:before{content:"\e169"}.glyphicon-export:before{content:"\e170"}.glyphicon-send:before{content:"\e171"}.glyphicon-floppy-disk:before{content:"\e172"}.glyphicon-floppy-saved:before{content:"\e173"}.glyphicon-floppy-remove:before{content:"\e174"}.glyphicon-floppy-save:before{content:"\e175"}.glyphicon-floppy-open:before{content:"\e176"}.glyphicon-credit-card:before{content:"\e177"}.glyphicon-transfer:before{content:"\e178"}.glyphicon-cutlery:before{content:"\e179"}.glyphicon-header:before{content:"\e180"}.glyphicon-compressed:before{content:"\e181"}.glyphicon-earphone:before{content:"\e182"}.glyphicon-phone-alt:before{content:"\e183"}.glyphicon-tower:before{content:"\e184"}.glyphicon-stats:before{content:"\e185"}.glyphicon-sd-video:before{content:"\e186"}.glyphicon-hd-video:before{content:"\e187"}.glyphicon-subtitles:before{content:"\e188"}.glyphicon-sound-stereo:before{content:"\e189"}.glyphicon-sound-dolby:before{content:"\e190"}.glyphicon-sound-5-1:before{content:"\e191"}.glyphicon-sound-6-1:before{content:"\e192"}.glyphicon-sound-7-1:before{content:"\e193"}.glyphicon-copyright-mark:before{content:"\e194"}.glyphicon-registration-mark:before{content:"\e195"}.glyphicon-cloud-download:before{content:"\e197"}.glyphicon-cloud-upload:before{content:"\e198"}.glyphicon-tree-conifer:before{content:"\e199"}.glyphicon-tree-deciduous:before{content:"\e200"}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:before,:after{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:10px;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}input,button,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#428bca;text-decoration:none}a:hover,a:focus{color:#2a6496;text-decoration:underline}a:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.img-responsive,.thumbnail>img,.thumbnail a>img,.carousel-inner>.item>img,.carousel-inner>.item>a>img{display:block;width:100% \9;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{display:inline-block;width:100% \9;max-width:100%;height:auto;padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}h1,h2,h3,h4,h5,h6,.h1,.h2,.h3,.h4,.h5,.h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small,.h1 small,.h2 small,.h3 small,.h4 small,.h5 small,.h6 small,h1 .small,h2 .small,h3 .small,h4 .small,h5 .small,h6 .small,.h1 .small,.h2 .small,.h3 .small,.h4 .small,.h5 .small,.h6 .small{font-weight:400;line-height:1;color:#777}h1,.h1,h2,.h2,h3,.h3{margin-top:20px;margin-bottom:10px}h1 small,.h1 small,h2 small,.h2 small,h3 small,.h3 small,h1 .small,.h1 .small,h2 .small,.h2 .small,h3 .small,.h3 .small{font-size:65%}h4,.h4,h5,.h5,h6,.h6{margin-top:10px;margin-bottom:10px}h4 small,.h4 small,h5 small,.h5 small,h6 small,.h6 small,h4 .small,.h4 .small,h5 .small,.h5 .small,h6 .small,.h6 .small{font-size:75%}h1,.h1{font-size:36px}h2,.h2{font-size:30px}h3,.h3{font-size:24px}h4,.h4{font-size:18px}h5,.h5{font-size:14px}h6,.h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:300;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}small,.small{font-size:85%}cite{font-style:normal}mark,.mark{padding:.2em;background-color:#fcf8e3}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#777}.text-primary{color:#428bca}a.text-primary:hover{color:#3071a9}.text-success{color:#3c763d}a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#428bca}a.bg-primary:hover{background-color:#3071a9}.bg-success{background-color:#dff0d8}a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:hover{background-color:#e4b9b9}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ul,ol{margin-top:0;margin-bottom:10px}ul ul,ol ul,ul ol,ol ol{margin-bottom:0}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;margin-left:-5px;list-style:none}.list-inline>li{display:inline-block;padding-right:5px;padding-left:5px}dl{margin-top:0;margin-bottom:20px}dt,dd{line-height:1.42857143}dt{font-weight:700}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[title],abbr[data-original-title]{cursor:help;border-bottom:1px dotted #777}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote p:last-child,blockquote ul:last-child,blockquote ol:last-child{margin-bottom:0}blockquote footer,blockquote small,blockquote .small{display:block;font-size:80%;line-height:1.42857143;color:#777}blockquote footer:before,blockquote small:before,blockquote .small:before{content:'\2014 \00A0'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;text-align:right;border-right:5px solid #eee;border-left:0}.blockquote-reverse footer:before,blockquote.pull-right footer:before,.blockquote-reverse small:before,blockquote.pull-right small:before,.blockquote-reverse .small:before,blockquote.pull-right .small:before{content:''}.blockquote-reverse footer:after,blockquote.pull-right footer:after,.blockquote-reverse small:after,blockquote.pull-right small:after,.blockquote-reverse .small:after,blockquote.pull-right .small:after{content:'\00A0 \2014'}blockquote:before,blockquote:after{content:""}address{margin-bottom:20px;font-style:normal;line-height:1.42857143}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}code{padding:2px 4px;font-size:90%;color:#c7254e;background-color:#f9f2f4;border-radius:4px}kbd{padding:2px 4px;font-size:90%;color:#fff;background-color:#333;border-radius:3px;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.25);box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}kbd kbd{padding:0;font-size:100%;-webkit-box-shadow:none;box-shadow:none}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857143;color:#333;word-break:break-all;word-wrap:break-word;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.container-fluid{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}.row{margin-right:-15px;margin-left:-15px}.col-xs-1,.col-sm-1,.col-md-1,.col-lg-1,.col-xs-2,.col-sm-2,.col-md-2,.col-lg-2,.col-xs-3,.col-sm-3,.col-md-3,.col-lg-3,.col-xs-4,.col-sm-4,.col-md-4,.col-lg-4,.col-xs-5,.col-sm-5,.col-md-5,.col-lg-5,.col-xs-6,.col-sm-6,.col-md-6,.col-lg-6,.col-xs-7,.col-sm-7,.col-md-7,.col-lg-7,.col-xs-8,.col-sm-8,.col-md-8,.col-lg-8,.col-xs-9,.col-sm-9,.col-md-9,.col-lg-9,.col-xs-10,.col-sm-10,.col-md-10,.col-lg-10,.col-xs-11,.col-sm-11,.col-md-11,.col-lg-11,.col-xs-12,.col-sm-12,.col-md-12,.col-lg-12{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.col-xs-1,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-10,.col-xs-11,.col-xs-12{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:auto}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:auto}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11,.col-md-12{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:auto}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:auto}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:auto}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:auto}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}table{background-color:transparent}th{text-align:left}.table{width:100%;max-width:100%;margin-bottom:20px}.table>thead>tr>th,.table>tbody>tr>th,.table>tfoot>tr>th,.table>thead>tr>td,.table>tbody>tr>td,.table>tfoot>tr>td{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>th,.table>caption+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>td,.table>thead:first-child>tr:first-child>td{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>thead>tr>th,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>tbody>tr>td,.table-condensed>tfoot>tr>td{padding:5px}.table-bordered{border:1px solid #ddd}.table-bordered>thead>tr>th,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>tbody>tr>td,.table-bordered>tfoot>tr>td{border:1px solid #ddd}.table-bordered>thead>tr>th,.table-bordered>thead>tr>td{border-bottom-width:2px}.table-striped>tbody>tr:nth-child(odd)>td,.table-striped>tbody>tr:nth-child(odd)>th{background-color:#f9f9f9}.table-hover>tbody>tr:hover>td,.table-hover>tbody>tr:hover>th{background-color:#f5f5f5}table col[class*=col-]{position:static;display:table-column;float:none}table td[class*=col-],table th[class*=col-]{position:static;display:table-cell;float:none}.table>thead>tr>td.active,.table>tbody>tr>td.active,.table>tfoot>tr>td.active,.table>thead>tr>th.active,.table>tbody>tr>th.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>tbody>tr.active>td,.table>tfoot>tr.active>td,.table>thead>tr.active>th,.table>tbody>tr.active>th,.table>tfoot>tr.active>th{background-color:#f5f5f5}.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover,.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr.active:hover>th{background-color:#e8e8e8}.table>thead>tr>td.success,.table>tbody>tr>td.success,.table>tfoot>tr>td.success,.table>thead>tr>th.success,.table>tbody>tr>th.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>tbody>tr.success>td,.table>tfoot>tr.success>td,.table>thead>tr.success>th,.table>tbody>tr.success>th,.table>tfoot>tr.success>th{background-color:#dff0d8}.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover,.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr.success:hover>th{background-color:#d0e9c6}.table>thead>tr>td.info,.table>tbody>tr>td.info,.table>tfoot>tr>td.info,.table>thead>tr>th.info,.table>tbody>tr>th.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>tbody>tr.info>td,.table>tfoot>tr.info>td,.table>thead>tr.info>th,.table>tbody>tr.info>th,.table>tfoot>tr.info>th{background-color:#d9edf7}.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover,.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr.info:hover>th{background-color:#c4e3f3}.table>thead>tr>td.warning,.table>tbody>tr>td.warning,.table>tfoot>tr>td.warning,.table>thead>tr>th.warning,.table>tbody>tr>th.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>tbody>tr.warning>td,.table>tfoot>tr.warning>td,.table>thead>tr.warning>th,.table>tbody>tr.warning>th,.table>tfoot>tr.warning>th{background-color:#fcf8e3}.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover,.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr.warning:hover>th{background-color:#faf2cc}.table>thead>tr>td.danger,.table>tbody>tr>td.danger,.table>tfoot>tr>td.danger,.table>thead>tr>th.danger,.table>tbody>tr>th.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>tbody>tr.danger>td,.table>tfoot>tr.danger>td,.table>thead>tr.danger>th,.table>tbody>tr.danger>th,.table>tfoot>tr.danger>th{background-color:#f2dede}.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover,.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr.danger:hover>th{background-color:#ebcccc}@media screen and (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>thead>tr>th,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tfoot>tr>td{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>thead>tr>th:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child{border-left:0}.table-responsive>.table-bordered>thead>tr>th:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>th,.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>td{border-bottom:0}}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border:0;border-bottom:1px solid #e5e5e5}label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:700}input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=radio],input[type=checkbox]{margin:4px 0 0;margin-top:1px \9;line-height:normal}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=file]:focus,input[type=radio]:focus,input[type=checkbox]:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{display:block;padding-top:7px;font-size:14px;line-height:1.42857143;color:#555}.form-control{display:block;width:100%;height:34px;padding:6px 12px;font-size:14px;line-height:1.42857143;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;-o-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#777;opacity:1}.form-control:-ms-input-placeholder{color:#777}.form-control::-webkit-input-placeholder{color:#777}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{cursor:not-allowed;background-color:#eee;opacity:1}textarea.form-control{height:auto}input[type=search]{-webkit-appearance:none}input[type=date],input[type=time],input[type=datetime-local],input[type=month]{line-height:34px;line-height:1.42857143 \0}input[type=date].input-sm,input[type=time].input-sm,input[type=datetime-local].input-sm,input[type=month].input-sm{line-height:30px}input[type=date].input-lg,input[type=time].input-lg,input[type=datetime-local].input-lg,input[type=month].input-lg{line-height:46px}.form-group{margin-bottom:15px}.radio,.checkbox{position:relative;display:block;min-height:20px;margin-top:10px;margin-bottom:10px}.radio label,.checkbox label{padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.radio input[type=radio],.radio-inline input[type=radio],.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox]{position:absolute;margin-top:4px \9;margin-left:-20px}.radio+.radio,.checkbox+.checkbox{margin-top:-5px}.radio-inline,.checkbox-inline{display:inline-block;padding-left:20px;margin-bottom:0;font-weight:400;vertical-align:middle;cursor:pointer}.radio-inline+.radio-inline,.checkbox-inline+.checkbox-inline{margin-top:0;margin-left:10px}input[type=radio][disabled],input[type=checkbox][disabled],input[type=radio].disabled,input[type=checkbox].disabled,fieldset[disabled] input[type=radio],fieldset[disabled] input[type=checkbox]{cursor:not-allowed}.radio-inline.disabled,.checkbox-inline.disabled,fieldset[disabled] .radio-inline,fieldset[disabled] .checkbox-inline{cursor:not-allowed}.radio.disabled label,.checkbox.disabled label,fieldset[disabled] .radio label,fieldset[disabled] .checkbox label{cursor:not-allowed}.form-control-static{padding-top:7px;padding-bottom:7px;margin-bottom:0}.form-control-static.input-lg,.form-control-static.input-sm{padding-right:0;padding-left:0}.input-sm,.form-horizontal .form-group-sm .form-control{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm{height:30px;line-height:30px}textarea.input-sm,select[multiple].input-sm{height:auto}.input-lg,.form-horizontal .form-group-lg .form-control{height:46px;padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}select.input-lg{height:46px;line-height:46px}textarea.input-lg,select[multiple].input-lg{height:auto}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.form-control-feedback{position:absolute;top:25px;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center}.input-lg+.form-control-feedback{width:46px;height:46px;line-height:46px}.input-sm+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .help-block,.has-success .control-label,.has-success .radio,.has-success .checkbox,.has-success .radio-inline,.has-success .checkbox-inline{color:#3c763d}.has-success .form-control{border-color:#3c763d;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;background-color:#dff0d8;border-color:#3c763d}.has-success .form-control-feedback{color:#3c763d}.has-warning .help-block,.has-warning .control-label,.has-warning .radio,.has-warning .checkbox,.has-warning .radio-inline,.has-warning .checkbox-inline{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;background-color:#fcf8e3;border-color:#8a6d3b}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .help-block,.has-error .control-label,.has-error .radio,.has-error .checkbox,.has-error .radio-inline,.has-error .checkbox-inline{color:#a94442}.has-error .form-control{border-color:#a94442;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;background-color:#f2dede;border-color:#a94442}.has-error .form-control-feedback{color:#a94442}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn,.form-inline .input-group .form-control{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .radio,.form-inline .checkbox{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .radio label,.form-inline .checkbox label{padding-left:0}.form-inline .radio input[type=radio],.form-inline .checkbox input[type=checkbox]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}}.form-horizontal .radio,.form-horizontal .checkbox,.form-horizontal .radio-inline,.form-horizontal .checkbox-inline{padding-top:7px;margin-top:0;margin-bottom:0}.form-horizontal .radio,.form-horizontal .checkbox{min-height:27px}.form-horizontal .form-group{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.form-horizontal .control-label{padding-top:7px;margin-bottom:0;text-align:right}}.form-horizontal .has-feedback .form-control-feedback{top:0;right:15px}@media (min-width:768px){.form-horizontal .form-group-lg .control-label{padding-top:14.3px}}@media (min-width:768px){.form-horizontal .form-group-sm .control-label{padding-top:6px}}.btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-image:none;border:1px solid transparent;border-radius:4px}.btn:focus,.btn:active:focus,.btn.active:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn:hover,.btn:focus{color:#333;text-decoration:none}.btn:active,.btn.active{background-image:none;outline:0;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{pointer-events:none;cursor:not-allowed;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none;opacity:.65}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default:hover,.btn-default:focus,.btn-default:active,.btn-default.active,.open>.dropdown-toggle.btn-default{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default:active,.btn-default.active,.open>.dropdown-toggle.btn-default{background-image:none}.btn-default.disabled,.btn-default[disabled],fieldset[disabled] .btn-default,.btn-default.disabled:hover,.btn-default[disabled]:hover,fieldset[disabled] .btn-default:hover,.btn-default.disabled:focus,.btn-default[disabled]:focus,fieldset[disabled] .btn-default:focus,.btn-default.disabled:active,.btn-default[disabled]:active,fieldset[disabled] .btn-default:active,.btn-default.disabled.active,.btn-default[disabled].active,fieldset[disabled] .btn-default.active{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#428bca;border-color:#357ebd}.btn-primary:hover,.btn-primary:focus,.btn-primary:active,.btn-primary.active,.open>.dropdown-toggle.btn-primary{color:#fff;background-color:#3071a9;border-color:#285e8e}.btn-primary:active,.btn-primary.active,.open>.dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled,.btn-primary[disabled],fieldset[disabled] .btn-primary,.btn-primary.disabled:hover,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary:hover,.btn-primary.disabled:focus,.btn-primary[disabled]:focus,fieldset[disabled] .btn-primary:focus,.btn-primary.disabled:active,.btn-primary[disabled]:active,fieldset[disabled] .btn-primary:active,.btn-primary.disabled.active,.btn-primary[disabled].active,fieldset[disabled] .btn-primary.active{background-color:#428bca;border-color:#357ebd}.btn-primary .badge{color:#428bca;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success:hover,.btn-success:focus,.btn-success:active,.btn-success.active,.open>.dropdown-toggle.btn-success{color:#fff;background-color:#449d44;border-color:#398439}.btn-success:active,.btn-success.active,.open>.dropdown-toggle.btn-success{background-image:none}.btn-success.disabled,.btn-success[disabled],fieldset[disabled] .btn-success,.btn-success.disabled:hover,.btn-success[disabled]:hover,fieldset[disabled] .btn-success:hover,.btn-success.disabled:focus,.btn-success[disabled]:focus,fieldset[disabled] .btn-success:focus,.btn-success.disabled:active,.btn-success[disabled]:active,fieldset[disabled] .btn-success:active,.btn-success.disabled.active,.btn-success[disabled].active,fieldset[disabled] .btn-success.active{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info:hover,.btn-info:focus,.btn-info:active,.btn-info.active,.open>.dropdown-toggle.btn-info{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info:active,.btn-info.active,.open>.dropdown-toggle.btn-info{background-image:none}.btn-info.disabled,.btn-info[disabled],fieldset[disabled] .btn-info,.btn-info.disabled:hover,.btn-info[disabled]:hover,fieldset[disabled] .btn-info:hover,.btn-info.disabled:focus,.btn-info[disabled]:focus,fieldset[disabled] .btn-info:focus,.btn-info.disabled:active,.btn-info[disabled]:active,fieldset[disabled] .btn-info:active,.btn-info.disabled.active,.btn-info[disabled].active,fieldset[disabled] .btn-info.active{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning:hover,.btn-warning:focus,.btn-warning:active,.btn-warning.active,.open>.dropdown-toggle.btn-warning{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning:active,.btn-warning.active,.open>.dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled,.btn-warning[disabled],fieldset[disabled] .btn-warning,.btn-warning.disabled:hover,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning:hover,.btn-warning.disabled:focus,.btn-warning[disabled]:focus,fieldset[disabled] .btn-warning:focus,.btn-warning.disabled:active,.btn-warning[disabled]:active,fieldset[disabled] .btn-warning:active,.btn-warning.disabled.active,.btn-warning[disabled].active,fieldset[disabled] .btn-warning.active{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger:hover,.btn-danger:focus,.btn-danger:active,.btn-danger.active,.open>.dropdown-toggle.btn-danger{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger:active,.btn-danger.active,.open>.dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled,.btn-danger[disabled],fieldset[disabled] .btn-danger,.btn-danger.disabled:hover,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger:hover,.btn-danger.disabled:focus,.btn-danger[disabled]:focus,fieldset[disabled] .btn-danger:focus,.btn-danger.disabled:active,.btn-danger[disabled]:active,fieldset[disabled] .btn-danger:active,.btn-danger.disabled.active,.btn-danger[disabled].active,fieldset[disabled] .btn-danger.active{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{font-weight:400;color:#428bca;cursor:pointer;border-radius:0}.btn-link,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link,.btn-link:hover,.btn-link:focus,.btn-link:active{border-color:transparent}.btn-link:hover,.btn-link:focus{color:#2a6496;text-decoration:underline;background-color:transparent}.btn-link[disabled]:hover,fieldset[disabled] .btn-link:hover,.btn-link[disabled]:focus,fieldset[disabled] .btn-link:focus{color:#777;text-decoration:none}.btn-lg,.btn-group-lg>.btn{padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}.btn-sm,.btn-group-sm>.btn{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-xs,.btn-group-xs>.btn{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type=submit].btn-block,input[type=reset].btn-block,input[type=button].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition:height .35s ease;-o-transition:height .35s ease;transition:height .35s ease}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px solid;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:14px;text-align:left;list-style:none;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,.175);box-shadow:0 6px 12px rgba(0,0,0,.175)}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}.dropdown-menu>li>a:hover,.dropdown-menu>li>a:focus{color:#262626;text-decoration:none;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:hover,.dropdown-menu>.active>a:focus{color:#fff;text-decoration:none;background-color:#428bca;outline:0}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{color:#777}.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{text-decoration:none;cursor:not-allowed;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{right:0;left:auto}.dropdown-menu-left{right:auto;left:0}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#777;white-space:nowrap}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{content:"";border-top:0;border-bottom:4px solid}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:1px}@media (min-width:768px){.navbar-right .dropdown-menu{right:0;left:auto}.navbar-right .dropdown-menu-left{right:auto;left:0}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group>.btn,.btn-group-vertical>.btn{position:relative;float:left}.btn-group>.btn:hover,.btn-group-vertical>.btn:hover,.btn-group>.btn:focus,.btn-group-vertical>.btn:focus,.btn-group>.btn:active,.btn-group-vertical>.btn:active,.btn-group>.btn.active,.btn-group-vertical>.btn.active{z-index:2}.btn-group>.btn:focus,.btn-group-vertical>.btn:focus{outline:0}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child>.btn:last-child,.btn-group>.btn-group:first-child>.dropdown-toggle{border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:last-child>.btn:first-child{border-top-left-radius:0;border-bottom-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-right:8px;padding-left:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-right:12px;padding-left:12px}.btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-top-left-radius:0;border-top-right-radius:0;border-bottom-left-radius:4px}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-top-right-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{display:table-cell;float:none;width:1%}.btn-group-justified>.btn-group .btn{width:100%}.btn-group-justified>.btn-group .dropdown-menu{left:auto}[data-toggle=buttons]>.btn>input[type=radio],[data-toggle=buttons]>.btn>input[type=checkbox]{position:absolute;z-index:-1;filter:alpha(opacity=0);opacity:0}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-right:0;padding-left:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn,select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn,select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn{height:auto}.input-group-addon,.input-group-btn,.input-group .form-control{display:table-cell}.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child),.input-group .form-control:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=radio],.input-group-addon input[type=checkbox]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle),.input-group-btn:last-child>.btn-group:not(:last-child)>.btn{border-top-right-radius:0;border-bottom-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:first-child>.btn-group:not(:first-child)>.btn{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{position:relative;font-size:0;white-space:nowrap}.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:hover,.input-group-btn>.btn:focus,.input-group-btn>.btn:active{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{margin-left:-1px}.nav{padding-left:0;margin-bottom:0;list-style:none}.nav>li{position:relative;display:block}.nav>li>a{position:relative;display:block;padding:10px 15px}.nav>li>a:hover,.nav>li>a:focus{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#777}.nav>li.disabled>a:hover,.nav>li.disabled>a:focus{color:#777;text-decoration:none;cursor:not-allowed;background-color:transparent}.nav .open>a,.nav .open>a:hover,.nav .open>a:focus{background-color:#eee;border-color:#428bca}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:hover,.nav-tabs>li.active>a:focus{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:hover,.nav-tabs.nav-justified>.active>a:focus{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:hover,.nav-tabs.nav-justified>.active>a:focus{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:hover,.nav-pills>li.active>a:focus{color:#fff;background-color:#428bca}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:hover,.nav-tabs-justified>.active>a:focus{border:1px solid #ddd}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:hover,.nav-tabs-justified>.active>a:focus{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}@media (min-width:768px){.navbar{border-radius:4px}}@media (min-width:768px){.navbar-header{float:left}}.navbar-collapse{padding-right:15px;padding-left:15px;overflow-x:visible;-webkit-overflow-scrolling:touch;border-top:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1)}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar-collapse{width:auto;border-top:0;-webkit-box-shadow:none;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse,.navbar-fixed-bottom .navbar-collapse{padding-right:0;padding-left:0}}.navbar-fixed-top .navbar-collapse,.navbar-fixed-bottom .navbar-collapse{max-height:340px}@media (max-width:480px) and (orientation:landscape){.navbar-fixed-top .navbar-collapse,.navbar-fixed-bottom .navbar-collapse{max-height:200px}}.container>.navbar-header,.container-fluid>.navbar-header,.container>.navbar-collapse,.container-fluid>.navbar-collapse{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.container>.navbar-header,.container-fluid>.navbar-header,.container>.navbar-collapse,.container-fluid>.navbar-collapse{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;border-width:0 0 1px}@media (min-width:768px){.navbar-static-top{border-radius:0}}.navbar-fixed-top,.navbar-fixed-bottom{position:fixed;right:0;left:0;z-index:1030;-webkit-transform:translate3d(0,0,0);-o-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}@media (min-width:768px){.navbar-fixed-top,.navbar-fixed-bottom{border-radius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;height:50px;padding:15px 15px;font-size:18px;line-height:20px}.navbar-brand:hover,.navbar-brand:focus{text-decoration:none}@media (min-width:768px){.navbar>.container .navbar-brand,.navbar>.container-fluid .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;padding:9px 10px;margin-top:8px;margin-right:15px;margin-bottom:8px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;-webkit-box-shadow:none;box-shadow:none}.navbar-nav .open .dropdown-menu>li>a,.navbar-nav .open .dropdown-menu .dropdown-header{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:hover,.navbar-nav .open .dropdown-menu>li>a:focus{background-image:none}}@media (min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}.navbar-nav.navbar-right:last-child{margin-right:-15px}}@media (min-width:768px){.navbar-left{float:left!important}.navbar-right{float:right!important}}.navbar-form{padding:10px 15px;margin-top:8px;margin-right:-15px;margin-bottom:8px;margin-left:-15px;border-top:1px solid transparent;border-bottom:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1)}@media (min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .input-group{display:inline-table;vertical-align:middle}.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn,.navbar-form .input-group .form-control{width:auto}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .radio,.navbar-form .checkbox{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.navbar-form .radio label,.navbar-form .checkbox label{padding-left:0}.navbar-form .radio input[type=radio],.navbar-form .checkbox input[type=checkbox]{position:relative;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}}@media (min-width:768px){.navbar-form{width:auto;padding-top:0;padding-bottom:0;margin-right:0;margin-left:0;border:0;-webkit-box-shadow:none;box-shadow:none}.navbar-form.navbar-right:last-child{margin-right:-15px}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-left-radius:0;border-top-right-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-right:15px;margin-left:15px}.navbar-text.navbar-right:last-child{margin-right:0}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:hover,.navbar-default .navbar-brand:focus{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a{color:#777}.navbar-default .navbar-nav>li>a:hover,.navbar-default .navbar-nav>li>a:focus{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:hover,.navbar-default .navbar-nav>.active>a:focus{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:hover,.navbar-default .navbar-nav>.disabled>a:focus{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:hover,.navbar-default .navbar-toggle:focus{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:hover,.navbar-default .navbar-nav>.open>a:focus{color:#555;background-color:#e7e7e7}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-default .btn-link{color:#777}.navbar-default .btn-link:hover,.navbar-default .btn-link:focus{color:#333}.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:hover,.navbar-default .btn-link[disabled]:focus,fieldset[disabled] .navbar-default .btn-link:focus{color:#ccc}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#777}.navbar-inverse .navbar-brand:hover,.navbar-inverse .navbar-brand:focus{color:#fff;background-color:transparent}.navbar-inverse .navbar-text{color:#777}.navbar-inverse .navbar-nav>li>a{color:#777}.navbar-inverse .navbar-nav>li>a:hover,.navbar-inverse .navbar-nav>li>a:focus{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:hover,.navbar-inverse .navbar-nav>.active>a:focus{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:hover,.navbar-inverse .navbar-nav>.disabled>a:focus{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:hover,.navbar-inverse .navbar-toggle:focus{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:hover,.navbar-inverse .navbar-nav>.open>a:focus{color:#fff;background-color:#080808}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#777}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .btn-link{color:#777}.navbar-inverse .btn-link:hover,.navbar-inverse .btn-link:focus{color:#fff}.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:hover,.navbar-inverse .btn-link[disabled]:focus,fieldset[disabled] .navbar-inverse .btn-link:focus{color:#444}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{padding:0 5px;color:#ccc;content:"/\00a0"}.breadcrumb>.active{color:#777}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;margin-left:-1px;line-height:1.42857143;color:#428bca;text-decoration:none;background-color:#fff;border:1px solid #ddd}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-top-left-radius:4px;border-bottom-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-top-right-radius:4px;border-bottom-right-radius:4px}.pagination>li>a:hover,.pagination>li>span:hover,.pagination>li>a:focus,.pagination>li>span:focus{color:#2a6496;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>span,.pagination>.active>a:hover,.pagination>.active>span:hover,.pagination>.active>a:focus,.pagination>.active>span:focus{z-index:2;color:#fff;cursor:default;background-color:#428bca;border-color:#428bca}.pagination>.disabled>span,.pagination>.disabled>span:hover,.pagination>.disabled>span:focus,.pagination>.disabled>a,.pagination>.disabled>a:hover,.pagination>.disabled>a:focus{color:#777;cursor:not-allowed;background-color:#fff;border-color:#ddd}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-top-left-radius:6px;border-bottom-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-top-right-radius:6px;border-bottom-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-top-left-radius:3px;border-bottom-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-top-right-radius:3px;border-bottom-right-radius:3px}.pager{padding-left:0;margin:20px 0;text-align:center;list-style:none}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:hover,.pager li>a:focus{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:hover,.pager .disabled>a:focus,.pager .disabled>span{color:#777;cursor:not-allowed;background-color:#fff}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}a.label:hover,a.label:focus{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#777}.label-default[href]:hover,.label-default[href]:focus{background-color:#5e5e5e}.label-primary{background-color:#428bca}.label-primary[href]:hover,.label-primary[href]:focus{background-color:#3071a9}.label-success{background-color:#5cb85c}.label-success[href]:hover,.label-success[href]:focus{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:hover,.label-info[href]:focus{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:hover,.label-warning[href]:focus{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:hover,.label-danger[href]:focus{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;background-color:#777;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-xs .badge{top:0;padding:1px 5px}a.badge:hover,a.badge:focus{color:#fff;text-decoration:none;cursor:pointer}a.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#428bca;background-color:#fff}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding:30px;margin-bottom:30px;color:inherit;background-color:#eee}.jumbotron h1,.jumbotron .h1{color:inherit}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.jumbotron>hr{border-top-color:#d5d5d5}.container .jumbotron{border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container .jumbotron{padding-right:60px;padding-left:60px}.jumbotron h1,.jumbotron .h1{font-size:63px}}.thumbnail{display:block;padding:4px;margin-bottom:20px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.thumbnail>img,.thumbnail a>img{margin-right:auto;margin-left:auto}a.thumbnail:hover,a.thumbnail:focus,a.thumbnail.active{border-color:#428bca}.thumbnail .caption{padding:9px;color:#333}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:700}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable,.alert-dismissible{padding-right:35px}.alert-dismissable .close,.alert-dismissible .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-o-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;overflow:hidden;background-color:#f5f5f5;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#428bca;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-transition:width .6s ease;-o-transition:width .6s ease;transition:width .6s ease}.progress-striped .progress-bar,.progress-bar-striped{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);-webkit-background-size:40px 40px;background-size:40px 40px}.progress.active .progress-bar,.progress-bar.active{-webkit-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar[aria-valuenow="1"],.progress-bar[aria-valuenow="2"]{min-width:30px}.progress-bar[aria-valuenow="0"]{min-width:30px;color:#777;background-color:transparent;background-image:none;-webkit-box-shadow:none;box-shadow:none}.progress-bar-success{background-color:#5cb85c}.progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-info{background-color:#5bc0de}.progress-striped .progress-bar-info{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-warning{background-color:#f0ad4e}.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-danger{background-color:#d9534f}.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.media,.media-body{overflow:hidden;zoom:1}.media,.media .media{margin-top:15px}.media:first-child{margin-top:0}.media-object{display:block}.media-heading{margin:0 0 5px}.media>.pull-left{margin-right:10px}.media>.pull-right{margin-left:10px}.media-list{padding-left:0;list-style:none}.list-group{padding-left:0;margin-bottom:20px}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}a.list-group-item{color:#555}a.list-group-item .list-group-item-heading{color:#333}a.list-group-item:hover,a.list-group-item:focus{color:#555;text-decoration:none;background-color:#f5f5f5}.list-group-item.disabled,.list-group-item.disabled:hover,.list-group-item.disabled:focus{color:#777;background-color:#eee}.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading{color:inherit}.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text{color:#777}.list-group-item.active,.list-group-item.active:hover,.list-group-item.active:focus{z-index:2;color:#fff;background-color:#428bca;border-color:#428bca}.list-group-item.active .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-item.active .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>.small{color:inherit}.list-group-item.active .list-group-item-text,.list-group-item.active:hover .list-group-item-text,.list-group-item.active:focus .list-group-item-text{color:#e1edf7}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:hover,a.list-group-item-success:focus{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:hover,a.list-group-item-success.active:focus{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:hover,a.list-group-item-info:focus{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:hover,a.list-group-item-info.active:focus{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:hover,a.list-group-item-warning:focus{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:hover,a.list-group-item-warning.active:focus{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:hover,a.list-group-item-danger:focus{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:hover,a.list-group-item-danger.active:focus{color:#fff;background-color:#a94442;border-color:#a94442}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-left-radius:3px;border-top-right-radius:3px}.panel-heading>.dropdown .dropdown-toggle{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:16px;color:inherit}.panel-title>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group{margin-bottom:0}.panel>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-left-radius:3px;border-top-right-radius:3px}.panel>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.list-group+.panel-footer{border-top-width:0}.panel>.table,.panel>.table-responsive>.table,.panel>.panel-collapse>.table{margin-bottom:0}.panel>.table:first-child,.panel>.table-responsive:first-child>.table:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table:last-child,.panel>.table-responsive:last-child>.table:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive{border-top:1px solid #ddd}.panel>.table>tbody:first-child>tr:first-child th,.panel>.table>tbody:first-child>tr:first-child td{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child{border-left:0}.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child{border-right:0}.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th{border-bottom:0}.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}.panel>.table-responsive{margin-bottom:0;border:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;border-radius:4px}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse>.panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ddd}.panel-default>.panel-heading .badge{color:#f5f5f5;background-color:#333}.panel-default>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#428bca}.panel-primary>.panel-heading{color:#fff;background-color:#428bca;border-color:#428bca}.panel-primary>.panel-heading+.panel-collapse>.panel-body{border-top-color:#428bca}.panel-primary>.panel-heading .badge{color:#428bca;background-color:#fff}.panel-primary>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#428bca}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse>.panel-body{border-top-color:#d6e9c6}.panel-success>.panel-heading .badge{color:#dff0d8;background-color:#3c763d}.panel-success>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse>.panel-body{border-top-color:#bce8f1}.panel-info>.panel-heading .badge{color:#d9edf7;background-color:#31708f}.panel-info>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse>.panel-body{border-top-color:#faebcc}.panel-warning>.panel-heading .badge{color:#fcf8e3;background-color:#8a6d3b}.panel-warning>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ebccd1}.panel-danger>.panel-heading .badge{color:#f2dede;background-color:#a94442}.panel-danger>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ebccd1}.embed-responsive{position:relative;display:block;height:0;padding:0;overflow:hidden}.embed-responsive .embed-responsive-item,.embed-responsive iframe,.embed-responsive embed,.embed-responsive object{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}.embed-responsive.embed-responsive-16by9{padding-bottom:56.25%}.embed-responsive.embed-responsive-4by3{padding-bottom:75%}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;filter:alpha(opacity=20);opacity:.2}.close:hover,.close:focus{color:#000;text-decoration:none;cursor:pointer;filter:alpha(opacity=50);opacity:.5}button.close{-webkit-appearance:none;padding:0;cursor:pointer;background:0 0;border:0}.modal-open{overflow:hidden}.modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;display:none;overflow:hidden;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transition:-webkit-transform .3s ease-out;-o-transition:-o-transform .3s ease-out;transition:transform .3s ease-out;-webkit-transform:translate3d(0,-25%,0);-o-transform:translate3d(0,-25%,0);transform:translate3d(0,-25%,0)}.modal.in .modal-dialog{-webkit-transform:translate3d(0,0,0);-o-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;outline:0;-webkit-box-shadow:0 3px 9px rgba(0,0,0,.5);box-shadow:0 3px 9px rgba(0,0,0,.5)}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{filter:alpha(opacity=0);opacity:0}.modal-backdrop.in{filter:alpha(opacity=50);opacity:.5}.modal-header{min-height:16.43px;padding:15px;border-bottom:1px solid #e5e5e5}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:15px}.modal-footer{padding:15px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{-webkit-box-shadow:0 5px 15px rgba(0,0,0,.5);box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1070;display:block;font-size:12px;line-height:1.4;visibility:visible;filter:alpha(opacity=0);opacity:0}.tooltip.in{filter:alpha(opacity=90);opacity:.9}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;text-decoration:none;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-left .tooltip-arrow{bottom:0;left:5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-right .tooltip-arrow{right:5px;bottom:0;border-width:5px 5px 0;border-top-color:#000}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-left .tooltip-arrow{top:0;left:5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-right .tooltip-arrow{top:0;right:5px;border-width:0 5px 5px;border-bottom-color:#000}.popover{position:absolute;top:0;left:0;z-index:1060;display:none;max-width:276px;padding:1px;text-align:left;white-space:normal;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2)}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;font-weight:400;line-height:18px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover>.arrow{border-width:11px}.popover>.arrow:after{content:"";border-width:10px}.popover.top>.arrow{bottom:-11px;left:50%;margin-left:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,.25);border-bottom-width:0}.popover.top>.arrow:after{bottom:1px;margin-left:-10px;content:" ";border-top-color:#fff;border-bottom-width:0}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,.25);border-left-width:0}.popover.right>.arrow:after{bottom:-10px;left:1px;content:" ";border-right-color:#fff;border-left-width:0}.popover.bottom>.arrow{top:-11px;left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25)}.popover.bottom>.arrow:after{top:1px;margin-left:-10px;content:" ";border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left>.arrow:after{right:1px;bottom:-10px;content:" ";border-right-width:0;border-left-color:#fff}.carousel{position:relative}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner>.item{position:relative;display:none;-webkit-transition:.6s ease-in-out left;-o-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>img,.carousel-inner>.item>a>img{line-height:1}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;bottom:0;left:0;width:15%;font-size:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6);filter:alpha(opacity=50);opacity:.5}.carousel-control.left{background-image:-webkit-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,.0001)));background-image:linear-gradient(to right,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);background-repeat:repeat-x}.carousel-control.right{right:0;left:auto;background-image:-webkit-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.0001)),to(rgba(0,0,0,.5)));background-image:linear-gradient(to right,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);background-repeat:repeat-x}.carousel-control:hover,.carousel-control:focus{color:#fff;text-decoration:none;filter:alpha(opacity=90);outline:0;opacity:.9}.carousel-control .icon-prev,.carousel-control .icon-next,.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right{position:absolute;top:50%;z-index:5;display:inline-block}.carousel-control .icon-prev,.carousel-control .glyphicon-chevron-left{left:50%;margin-left:-10px}.carousel-control .icon-next,.carousel-control .glyphicon-chevron-right{right:50%;margin-right:-10px}.carousel-control .icon-prev,.carousel-control .icon-next{width:20px;height:20px;margin-top:-10px;font-family:serif}.carousel-control .icon-prev:before{content:'\2039'}.carousel-control .icon-next:before{content:'\203a'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;padding-left:0;margin-left:-30%;text-align:center;list-style:none}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;cursor:pointer;background-color:#000 \9;background-color:rgba(0,0,0,0);border:1px solid #fff;border-radius:10px}.carousel-indicators .active{width:12px;height:12px;margin:0;background-color:#fff}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-caption .btn{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-prev,.carousel-control .icon-next{width:30px;height:30px;margin-top:-15px;font-size:30px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{margin-left:-15px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{margin-right:-15px}.carousel-caption{right:20%;left:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.clearfix:before,.clearfix:after,.dl-horizontal dd:before,.dl-horizontal dd:after,.container:before,.container:after,.container-fluid:before,.container-fluid:after,.row:before,.row:after,.form-horizontal .form-group:before,.form-horizontal .form-group:after,.btn-toolbar:before,.btn-toolbar:after,.btn-group-vertical>.btn-group:before,.btn-group-vertical>.btn-group:after,.nav:before,.nav:after,.navbar:before,.navbar:after,.navbar-header:before,.navbar-header:after,.navbar-collapse:before,.navbar-collapse:after,.pager:before,.pager:after,.panel-body:before,.panel-body:after,.modal-footer:before,.modal-footer:after{display:table;content:" "}.clearfix:after,.dl-horizontal dd:after,.container:after,.container-fluid:after,.row:after,.form-horizontal .form-group:after,.btn-toolbar:after,.btn-group-vertical>.btn-group:after,.nav:after,.navbar:after,.navbar-header:after,.navbar-collapse:after,.pager:after,.panel-body:after,.modal-footer:after{clear:both}.center-block{display:block;margin-right:auto;margin-left:auto}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none!important;visibility:hidden!important}.affix{position:fixed;-webkit-transform:translate3d(0,0,0);-o-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}@-ms-viewport{width:device-width}.visible-xs,.visible-sm,.visible-md,.visible-lg{display:none!important}.visible-xs-block,.visible-xs-inline,.visible-xs-inline-block,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block{display:none!important}@media (max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table}tr.visible-xs{display:table-row!important}th.visible-xs,td.visible-xs{display:table-cell!important}}@media (max-width:767px){.visible-xs-block{display:block!important}}@media (max-width:767px){.visible-xs-inline{display:inline!important}}@media (max-width:767px){.visible-xs-inline-block{display:inline-block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table}tr.visible-sm{display:table-row!important}th.visible-sm,td.visible-sm{display:table-cell!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-block{display:block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline{display:inline!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline-block{display:inline-block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md{display:block!important}table.visible-md{display:table}tr.visible-md{display:table-row!important}th.visible-md,td.visible-md{display:table-cell!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-block{display:block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline{display:inline!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline-block{display:inline-block!important}}@media (min-width:1200px){.visible-lg{display:block!important}table.visible-lg{display:table}tr.visible-lg{display:table-row!important}th.visible-lg,td.visible-lg{display:table-cell!important}}@media (min-width:1200px){.visible-lg-block{display:block!important}}@media (min-width:1200px){.visible-lg-inline{display:inline!important}}@media (min-width:1200px){.visible-lg-inline-block{display:inline-block!important}}@media (max-width:767px){.hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none!important}}@media (min-width:1200px){.hidden-lg{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:block!important}table.visible-print{display:table}tr.visible-print{display:table-row!important}th.visible-print,td.visible-print{display:table-cell!important}}.visible-print-block{display:none!important}@media print{.visible-print-block{display:block!important}}.visible-print-inline{display:none!important}@media print{.visible-print-inline{display:inline!important}}.visible-print-inline-block{display:none!important}@media print{.visible-print-inline-block{display:inline-block!important}}@media print{.hidden-print{display:none!important}} \ No newline at end of file diff --git a/core/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/css/nv.d3.css b/core/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/css/nv.d3.css deleted file mode 100644 index cae8348..0000000 --- a/core/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/css/nv.d3.css +++ /dev/null @@ -1,769 +0,0 @@ - -/******************** - * HTML CSS - */ - - -.chartWrap { - margin: 0; - padding: 0; - overflow: hidden; -} - -/******************** - Box shadow and border radius styling -*/ -.nvtooltip.with-3d-shadow, .with-3d-shadow .nvtooltip { - -moz-box-shadow: 0 5px 10px rgba(0,0,0,.2); - -webkit-box-shadow: 0 5px 10px rgba(0,0,0,.2); - box-shadow: 0 5px 10px rgba(0,0,0,.2); - - -webkit-border-radius: 6px; - -moz-border-radius: 6px; - border-radius: 6px; -} - -/******************** - * TOOLTIP CSS - */ - -.nvtooltip { - position: absolute; - background-color: rgba(255,255,255,1.0); - padding: 1px; - border: 1px solid rgba(0,0,0,.2); - z-index: 10000; - - font-family: Arial; - font-size: 13px; - text-align: left; - pointer-events: none; - - white-space: nowrap; - - -webkit-touch-callout: none; - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} - -/*Give tooltips that old fade in transition by - putting a "with-transitions" class on the container div. -*/ -.nvtooltip.with-transitions, .with-transitions .nvtooltip { - transition: opacity 250ms linear; - -moz-transition: opacity 250ms linear; - -webkit-transition: opacity 250ms linear; - - transition-delay: 250ms; - -moz-transition-delay: 250ms; - -webkit-transition-delay: 250ms; -} - -.nvtooltip.x-nvtooltip, -.nvtooltip.y-nvtooltip { - padding: 8px; -} - -.nvtooltip h3 { - margin: 0; - padding: 4px 14px; - line-height: 18px; - font-weight: normal; - background-color: rgba(247,247,247,0.75); - text-align: center; - - border-bottom: 1px solid #ebebeb; - - -webkit-border-radius: 5px 5px 0 0; - -moz-border-radius: 5px 5px 0 0; - border-radius: 5px 5px 0 0; -} - -.nvtooltip p { - margin: 0; - padding: 5px 14px; - text-align: center; -} - -.nvtooltip span { - display: inline-block; - margin: 2px 0; -} - -.nvtooltip table { - margin: 6px; - border-spacing:0; -} - - -.nvtooltip table td { - padding: 2px 9px 2px 0; - vertical-align: middle; -} - -.nvtooltip table td.key { - font-weight:normal; -} -.nvtooltip table td.value { - text-align: right; - font-weight: bold; -} - -.nvtooltip table tr.highlight td { - padding: 1px 9px 1px 0; - border-bottom-style: solid; - border-bottom-width: 1px; - border-top-style: solid; - border-top-width: 1px; -} - -.nvtooltip table td.legend-color-guide div { - width: 8px; - height: 8px; - vertical-align: middle; -} - -.nvtooltip .footer { - padding: 3px; - text-align: center; -} - - -.nvtooltip-pending-removal { - position: absolute; - pointer-events: none; -} - - -/******************** - * SVG CSS - */ - - -svg { - -webkit-touch-callout: none; - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - /* Trying to get SVG to act like a greedy block in all browsers */ - display: block; - width:100%; - height:100%; -} - - -svg text { - font: normal 12px Arial; -} - -svg .title { - font: bold 14px Arial; -} - -.nvd3 .nv-background { - fill: white; - fill-opacity: 0; - /* - pointer-events: none; - */ -} - -.nvd3.nv-noData { - font-size: 18px; - font-weight: bold; -} - - -/********** -* Brush -*/ - -.nv-brush .extent { - fill-opacity: .125; - shape-rendering: crispEdges; -} - - - -/********** -* Legend -*/ - -.nvd3 .nv-legend .nv-series { - cursor: pointer; -} - -.nvd3 .nv-legend .disabled circle { - fill-opacity: 0; -} - - - -/********** -* Axes -*/ -.nvd3 .nv-axis { - pointer-events:none; -} - -.nvd3 .nv-axis path { - fill: none; - stroke: #000; - stroke-opacity: .75; - shape-rendering: crispEdges; -} - -.nvd3 .nv-axis path.domain { - stroke-opacity: .75; -} - -.nvd3 .nv-axis.nv-x path.domain { - stroke-opacity: 0; -} - -.nvd3 .nv-axis line { - fill: none; - stroke: #e5e5e5; - shape-rendering: crispEdges; -} - -.nvd3 .nv-axis .zero line, -/*this selector may not be necessary*/ .nvd3 .nv-axis line.zero { - stroke-opacity: .75; -} - -.nvd3 .nv-axis .nv-axisMaxMin text { - font-weight: bold; -} - -.nvd3 .x .nv-axis .nv-axisMaxMin text, -.nvd3 .x2 .nv-axis .nv-axisMaxMin text, -.nvd3 .x3 .nv-axis .nv-axisMaxMin text { - text-anchor: middle -} - - - -/********** -* Brush -*/ - -.nv-brush .resize path { - fill: #eee; - stroke: #666; -} - - - -/********** -* Bars -*/ - -.nvd3 .nv-bars .negative rect { - zfill: brown; -} - -.nvd3 .nv-bars rect { - zfill: steelblue; - fill-opacity: .75; - - transition: fill-opacity 250ms linear; - -moz-transition: fill-opacity 250ms linear; - -webkit-transition: fill-opacity 250ms linear; -} - -.nvd3 .nv-bars rect.hover { - fill-opacity: 1; -} - -.nvd3 .nv-bars .hover rect { - fill: lightblue; -} - -.nvd3 .nv-bars text { - fill: rgba(0,0,0,0); -} - -.nvd3 .nv-bars .hover text { - fill: rgba(0,0,0,1); -} - - -/********** -* Bars -*/ - -.nvd3 .nv-multibar .nv-groups rect, -.nvd3 .nv-multibarHorizontal .nv-groups rect, -.nvd3 .nv-discretebar .nv-groups rect { - stroke-opacity: 0; - - transition: fill-opacity 250ms linear; - -moz-transition: fill-opacity 250ms linear; - -webkit-transition: fill-opacity 250ms linear; -} - -.nvd3 .nv-multibar .nv-groups rect:hover, -.nvd3 .nv-multibarHorizontal .nv-groups rect:hover, -.nvd3 .nv-discretebar .nv-groups rect:hover { - fill-opacity: 1; -} - -.nvd3 .nv-discretebar .nv-groups text, -.nvd3 .nv-multibarHorizontal .nv-groups text { - font-weight: bold; - fill: rgba(0,0,0,1); - stroke: rgba(0,0,0,0); -} - -/*********** -* Pie Chart -*/ - -.nvd3.nv-pie path { - stroke-opacity: 0; - transition: fill-opacity 250ms linear, stroke-width 250ms linear, stroke-opacity 250ms linear; - -moz-transition: fill-opacity 250ms linear, stroke-width 250ms linear, stroke-opacity 250ms linear; - -webkit-transition: fill-opacity 250ms linear, stroke-width 250ms linear, stroke-opacity 250ms linear; - -} - -.nvd3.nv-pie .nv-slice text { - stroke: #000; - stroke-width: 0; -} - -.nvd3.nv-pie path { - stroke: #fff; - stroke-width: 1px; - stroke-opacity: 1; -} - -.nvd3.nv-pie .hover path { - fill-opacity: .7; -} -.nvd3.nv-pie .nv-label { - pointer-events: none; -} -.nvd3.nv-pie .nv-label rect { - fill-opacity: 0; - stroke-opacity: 0; -} - -/********** -* Lines -*/ - -.nvd3 .nv-groups path.nv-line { - fill: none; - stroke-width: 1.5px; - /* - stroke-linecap: round; - shape-rendering: geometricPrecision; - - transition: stroke-width 250ms linear; - -moz-transition: stroke-width 250ms linear; - -webkit-transition: stroke-width 250ms linear; - - transition-delay: 250ms - -moz-transition-delay: 250ms; - -webkit-transition-delay: 250ms; - */ -} - -.nvd3 .nv-groups path.nv-line.nv-thin-line { - stroke-width: 1px; -} - - -.nvd3 .nv-groups path.nv-area { - stroke: none; - /* - stroke-linecap: round; - shape-rendering: geometricPrecision; - - stroke-width: 2.5px; - transition: stroke-width 250ms linear; - -moz-transition: stroke-width 250ms linear; - -webkit-transition: stroke-width 250ms linear; - - transition-delay: 250ms - -moz-transition-delay: 250ms; - -webkit-transition-delay: 250ms; - */ -} - -.nvd3 .nv-line.hover path { - stroke-width: 6px; -} - -/* -.nvd3.scatter .groups .point { - fill-opacity: 0.1; - stroke-opacity: 0.1; -} - */ - -.nvd3.nv-line .nvd3.nv-scatter .nv-groups .nv-point { - fill-opacity: 0; - stroke-opacity: 0; -} - -.nvd3.nv-scatter.nv-single-point .nv-groups .nv-point { - fill-opacity: .5 !important; - stroke-opacity: .5 !important; -} - - -.with-transitions .nvd3 .nv-groups .nv-point { - transition: stroke-width 250ms linear, stroke-opacity 250ms linear; - -moz-transition: stroke-width 250ms linear, stroke-opacity 250ms linear; - -webkit-transition: stroke-width 250ms linear, stroke-opacity 250ms linear; - -} - -.nvd3.nv-scatter .nv-groups .nv-point.hover, -.nvd3 .nv-groups .nv-point.hover { - stroke-width: 7px; - fill-opacity: .95 !important; - stroke-opacity: .95 !important; -} - - -.nvd3 .nv-point-paths path { - stroke: #aaa; - stroke-opacity: 0; - fill: #eee; - fill-opacity: 0; -} - - - -.nvd3 .nv-indexLine { - cursor: ew-resize; -} - - -/********** -* Distribution -*/ - -.nvd3 .nv-distribution { - pointer-events: none; -} - - - -/********** -* Scatter -*/ - -/* **Attempting to remove this for useVoronoi(false), need to see if it's required anywhere -.nvd3 .nv-groups .nv-point { - pointer-events: none; -} -*/ - -.nvd3 .nv-groups .nv-point.hover { - stroke-width: 20px; - stroke-opacity: .5; -} - -.nvd3 .nv-scatter .nv-point.hover { - fill-opacity: 1; -} - -/* -.nv-group.hover .nv-point { - fill-opacity: 1; -} -*/ - - -/********** -* Stacked Area -*/ - -.nvd3.nv-stackedarea path.nv-area { - fill-opacity: .7; - /* - stroke-opacity: .65; - fill-opacity: 1; - */ - stroke-opacity: 0; - - transition: fill-opacity 250ms linear, stroke-opacity 250ms linear; - -moz-transition: fill-opacity 250ms linear, stroke-opacity 250ms linear; - -webkit-transition: fill-opacity 250ms linear, stroke-opacity 250ms linear; - - /* - transition-delay: 500ms; - -moz-transition-delay: 500ms; - -webkit-transition-delay: 500ms; - */ - -} - -.nvd3.nv-stackedarea path.nv-area.hover { - fill-opacity: .9; - /* - stroke-opacity: .85; - */ -} -/* -.d3stackedarea .groups path { - stroke-opacity: 0; -} - */ - - - -.nvd3.nv-stackedarea .nv-groups .nv-point { - stroke-opacity: 0; - fill-opacity: 0; -} - -/* -.nvd3.nv-stackedarea .nv-groups .nv-point.hover { - stroke-width: 20px; - stroke-opacity: .75; - fill-opacity: 1; -}*/ - - - -/********** -* Line Plus Bar -*/ - -.nvd3.nv-linePlusBar .nv-bar rect { - fill-opacity: .75; -} - -.nvd3.nv-linePlusBar .nv-bar rect:hover { - fill-opacity: 1; -} - - -/********** -* Bullet -*/ - -.nvd3.nv-bullet { font: 10px sans-serif; } -.nvd3.nv-bullet .nv-measure { fill-opacity: .8; } -.nvd3.nv-bullet .nv-measure:hover { fill-opacity: 1; } -.nvd3.nv-bullet .nv-marker { stroke: #000; stroke-width: 2px; } -.nvd3.nv-bullet .nv-markerTriangle { stroke: #000; fill: #fff; stroke-width: 1.5px; } -.nvd3.nv-bullet .nv-tick line { stroke: #666; stroke-width: .5px; } -.nvd3.nv-bullet .nv-range.nv-s0 { fill: #eee; } -.nvd3.nv-bullet .nv-range.nv-s1 { fill: #ddd; } -.nvd3.nv-bullet .nv-range.nv-s2 { fill: #ccc; } -.nvd3.nv-bullet .nv-title { font-size: 14px; font-weight: bold; } -.nvd3.nv-bullet .nv-subtitle { fill: #999; } - - -.nvd3.nv-bullet .nv-range { - fill: #bababa; - fill-opacity: .4; -} -.nvd3.nv-bullet .nv-range:hover { - fill-opacity: .7; -} - - - -/********** -* Sparkline -*/ - -.nvd3.nv-sparkline path { - fill: none; -} - -.nvd3.nv-sparklineplus g.nv-hoverValue { - pointer-events: none; -} - -.nvd3.nv-sparklineplus .nv-hoverValue line { - stroke: #333; - stroke-width: 1.5px; - } - -.nvd3.nv-sparklineplus, -.nvd3.nv-sparklineplus g { - pointer-events: all; -} - -.nvd3 .nv-hoverArea { - fill-opacity: 0; - stroke-opacity: 0; -} - -.nvd3.nv-sparklineplus .nv-xValue, -.nvd3.nv-sparklineplus .nv-yValue { - /* - stroke: #666; - */ - stroke-width: 0; - font-size: .9em; - font-weight: normal; -} - -.nvd3.nv-sparklineplus .nv-yValue { - stroke: #f66; -} - -.nvd3.nv-sparklineplus .nv-maxValue { - stroke: #2ca02c; - fill: #2ca02c; -} - -.nvd3.nv-sparklineplus .nv-minValue { - stroke: #d62728; - fill: #d62728; -} - -.nvd3.nv-sparklineplus .nv-currentValue { - /* - stroke: #444; - fill: #000; - */ - font-weight: bold; - font-size: 1.1em; -} - -/********** -* historical stock -*/ - -.nvd3.nv-ohlcBar .nv-ticks .nv-tick { - stroke-width: 2px; -} - -.nvd3.nv-ohlcBar .nv-ticks .nv-tick.hover { - stroke-width: 4px; -} - -.nvd3.nv-ohlcBar .nv-ticks .nv-tick.positive { - stroke: #2ca02c; -} - -.nvd3.nv-ohlcBar .nv-ticks .nv-tick.negative { - stroke: #d62728; -} - -.nvd3.nv-historicalStockChart .nv-axis .nv-axislabel { - font-weight: bold; -} - -.nvd3.nv-historicalStockChart .nv-dragTarget { - fill-opacity: 0; - stroke: none; - cursor: move; -} - -.nvd3 .nv-brush .extent { - /* - cursor: ew-resize !important; - */ - fill-opacity: 0 !important; -} - -.nvd3 .nv-brushBackground rect { - stroke: #000; - stroke-width: .4; - fill: #fff; - fill-opacity: .7; -} - - - -/********** -* Indented Tree -*/ - - -/** - * TODO: the following 3 selectors are based on classes used in the example. I should either make them standard and leave them here, or move to a CSS file not included in the library - */ -.nvd3.nv-indentedtree .name { - margin-left: 5px; -} - -.nvd3.nv-indentedtree .clickable { - color: #08C; - cursor: pointer; -} - -.nvd3.nv-indentedtree span.clickable:hover { - color: #005580; - text-decoration: underline; -} - - -.nvd3.nv-indentedtree .nv-childrenCount { - display: inline-block; - margin-left: 5px; -} - -.nvd3.nv-indentedtree .nv-treeicon { - cursor: pointer; - /* - cursor: n-resize; - */ -} - -.nvd3.nv-indentedtree .nv-treeicon.nv-folded { - cursor: pointer; - /* - cursor: s-resize; - */ -} - -/********** -* Parallel Coordinates -*/ - -.nvd3 .background path { - fill: none; - stroke: #ccc; - stroke-opacity: .4; - shape-rendering: crispEdges; -} - -.nvd3 .foreground path { - fill: none; - stroke: steelblue; - stroke-opacity: .7; -} - -.nvd3 .brush .extent { - fill-opacity: .3; - stroke: #fff; - shape-rendering: crispEdges; -} - -.nvd3 .axis line, .axis path { - fill: none; - stroke: #000; - shape-rendering: crispEdges; -} - -.nvd3 .axis text { - text-shadow: 0 1px 0 #fff; -} - -/**** -Interactive Layer -*/ -.nvd3 .nv-interactiveGuideLine { - pointer-events:none; -} -.nvd3 line.nv-guideline { - stroke: #ccc; -} \ No newline at end of file diff --git a/core/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/css/style.css b/core/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/css/style.css deleted file mode 100644 index ff146a5..0000000 --- a/core/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/css/style.css +++ /dev/null @@ -1,114 +0,0 @@ -body { - padding-top: 10px; -} - -.popover { - max-width: none; -} - -.glyphicon { - margin-right:.25em; -} - -.table-bordered>thead>tr>td { - border-bottom-width: 1px; -} - -.table tbody>tr>td, .table thead>tr>td { - padding-top: 3px; - padding-bottom: 3px; -} - -.table-condensed tbody>tr>td { - padding-top: 0; - padding-bottom: 0; -} - -.table .progress { - margin-bottom: inherit; -} - -.table-borderless th, .table-borderless td { - border: 0 !important; -} - -.table tbody td.success, li.success, span.success { - background-color: #dff0d8; -} - -.table tbody tr.danger, .table tbody td.danger, li.danger, span.danger { - background-color: #f2dede; -} - -.table tbody td.warning, li.warning, span.warning { - background-color: #fcf8e3; -} - -.table tbody td.info { - background-color: #d9edf7; -} - -td.big { - width: 117px; -} - -td.small { -} - -td.codeLine { - font-family: monospace; - white-space: pre; -} - -td span.comment { - color: #888a85; -} - -td span.default { - color: #2e3436; -} - -td span.html { - color: #888a85; -} - -td span.keyword { - color: #2e3436; - font-weight: bold; -} - -pre span.string { - color: #2e3436; -} - -span.success, span.warning, span.danger { - margin-right: 2px; - padding-left: 10px; - padding-right: 10px; - text-align: center; -} - -#classCoverageDistribution, #classComplexity { - height: 200px; - width: 475px; -} - -#toplink { - position: fixed; - left: 5px; - bottom: 5px; - outline: 0; -} - -svg text { - font-family: "Lucida Grande", "Lucida Sans Unicode", Verdana, Arial, Helvetica, sans-serif; - font-size: 11px; - color: #666; - fill: #666; -} - -.scrollbox { - height:245px; - overflow-x:hidden; - overflow-y:scroll; -} \ No newline at end of file diff --git a/core/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/dashboard.html.dist b/core/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/dashboard.html.dist deleted file mode 100644 index 3ae8ba1..0000000 --- a/core/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/dashboard.html.dist +++ /dev/null @@ -1,286 +0,0 @@ - - - - - Dashboard for {{full_path}} - - - - - - - -
    -
    -
    -
    - -
    -
    -
    -
    -
    -
    -
    -

    Classes

    -
    -
    -
    -
    -

    Coverage Distribution

    -
    - -
    -
    -
    -

    Complexity

    -
    - -
    -
    -
    -
    -
    -

    Insufficient Coverage

    -
    - - - - - - - - -{{insufficient_coverage_classes}} - -
    ClassCoverage
    -
    -
    -
    -

    Project Risks

    -
    - - - - - - - - -{{project_risks_classes}} - -
    ClassCRAP
    -
    -
    -
    -
    -
    -

    Methods

    -
    -
    -
    -
    -

    Coverage Distribution

    -
    - -
    -
    -
    -

    Complexity

    -
    - -
    -
    -
    -
    -
    -

    Insufficient Coverage

    -
    - - - - - - - - -{{insufficient_coverage_methods}} - -
    MethodCoverage
    -
    -
    -
    -

    Project Risks

    -
    - - - - - - - - -{{project_risks_methods}} - -
    MethodCRAP
    -
    -
    -
    - -
    - - - - - - - - diff --git a/core/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/directory.html.dist b/core/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/directory.html.dist deleted file mode 100644 index 8175df9..0000000 --- a/core/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/directory.html.dist +++ /dev/null @@ -1,61 +0,0 @@ - - - - - Code Coverage for {{full_path}} - - - - - - -
    -
    -
    -
    - -
    -
    -
    -
    -
    - - - - - - - - - - - - - - -{{items}} - -
     
    Code Coverage
     
    Lines
    Functions and Methods
    Classes and Traits
    - -
    - - - - - diff --git a/core/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/directory_item.html.dist b/core/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/directory_item.html.dist deleted file mode 100644 index 78dbb35..0000000 --- a/core/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/directory_item.html.dist +++ /dev/null @@ -1,13 +0,0 @@ - - {{icon}}{{name}} - {{lines_bar}} -
    {{lines_executed_percent}}
    -
    {{lines_number}}
    - {{methods_bar}} -
    {{methods_tested_percent}}
    -
    {{methods_number}}
    - {{classes_bar}} -
    {{classes_tested_percent}}
    -
    {{classes_number}}
    - - diff --git a/core/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/file.html.dist b/core/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/file.html.dist deleted file mode 100644 index 6827bd1..0000000 --- a/core/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/file.html.dist +++ /dev/null @@ -1,90 +0,0 @@ - - - - - Code Coverage for {{full_path}} - - - - - - -
    -
    -
    -
    - -
    -
    -
    -
    -
    - - - - - - - - - - - - - - -{{items}} - -
     
    Code Coverage
     
    Classes and Traits
    Functions and Methods
    Lines
    - - -{{lines}} - -
    - -
    - - - - - - diff --git a/core/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/file_item.html.dist b/core/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/file_item.html.dist deleted file mode 100644 index 756fdd6..0000000 --- a/core/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/file_item.html.dist +++ /dev/null @@ -1,14 +0,0 @@ - - {{name}} - {{classes_bar}} -
    {{classes_tested_percent}}
    -
    {{classes_number}}
    - {{methods_bar}} -
    {{methods_tested_percent}}
    -
    {{methods_number}}
    - {{crap}} - {{lines_bar}} -
    {{lines_executed_percent}}
    -
    {{lines_number}}
    - - diff --git a/core/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/fonts/glyphicons-halflings-regular.eot b/core/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/fonts/glyphicons-halflings-regular.eot deleted file mode 100644 index 4a4ca865d67e86f961bc6e2ef00bffa4e34bb9ed..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 20335 zcma%iRa9Lu*X_aGIXLtH2X}XOcXxM};>BGK?k>gMi@Uo+afec%&=$Y_zI(@iAMVRd zMzYtMnVHGh`(bBgBrYld0G2WU0R1n+0{)ZW{#ye8Pyh%N;2)-_`hS4`dHjR_o8s?3 z%Kr!aAA=Sk15gC$0aO9906BmJKn0)-&;Wq`d1e4dfc3v(2XF@106hNnKnJJ;tp3?v z|4=i4`#;17p#2YV|JP~t*4IuDO^FK=e+xx$$?LVd`z~aAr@Bit+ z4B+|46aYB=Q+D{L`5%t;Kdt|aZw_GpXL0?v@B%pgd3^uI=KcSkIq3hHHvk~6A@l#d zDHwovCxFWvz!d;sGQ^&}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ha!#0t3<5F`ED$p<#rl0e5CFtqc!!Oi7M~UH7I8~> zKcNUu8%}Z~Bb?-HK-;xoKCjL8>_&0cLO;{MS&3$vA|)_!KSn*s%ug690fdLcraD7- fD&x8tjE$WbXjs&snU8)|^B;s6yTptcKAzx$Qp3K0 diff --git a/core/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/fonts/glyphicons-halflings-regular.svg b/core/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/fonts/glyphicons-halflings-regular.svg deleted file mode 100644 index e3e2dc7..0000000 --- a/core/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/fonts/glyphicons-halflings-regular.svg +++ /dev/null @@ -1,229 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/core/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/fonts/glyphicons-halflings-regular.ttf b/core/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/fonts/glyphicons-halflings-regular.ttf deleted file mode 100644 index 67fa00bf83801d2fa568546b982c80d27f6ef74e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 41280 zcmc${2b>$#wLd<0X4JKkMs=IoY9(#guC%-Ix~!LV@5XgawLzwtVoFRi&4B<;Yzzq| z1QHw)z@da0*@PsIyqA!`6G@b6oWOe_b_$P#@)GbXG2Zd-d+unfZAkvV-{LBX3Wc;?Pswd9i3FaAXkSUrx`&zn7GF0_`M^SUUB}0?t9iO6@<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/fonts/glyphicons-halflings-regular.woff b/core/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/fonts/glyphicons-halflings-regular.woff deleted file mode 100644 index 8c54182aa5d4d1ab3c9171976b615c1dcb1dc187..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 23320 zcmY&6mA1(8T6a0V( z7zzkXUYUXEN9+9I!ap!DFOd#1wlTB=0s{G=z_>rwLFyJd-Ppy62nY!Dzg$rNAC#b> zW_IQ_KN{(eU)_(Nsd6JjiMgTUPb}E#|M~#|A(>mdoBe3JKtOVEKtTU^2nd*oEldqf zfPj=PfBaZ}zy@NZ@n!KN0s$!#{qXEt`TP45!w50c8!{TL10RAG)dniu*zrR^LTrn}O+tRb0xd~0E&>H($0brSGJ*iX z8bUAslphEzmTHiWB72`anLv4VuEY~_ za}WVZu^zT;R-~y&T~BYSiJ>00^O~gpl9q$zHI%Y>Lhsr-MaOrb%y%q|(42pX<4bce z&%S(EIYGx}q8~@4pX*EKdS?h=SI&tEv`GGM8)AScL0;U}brn10v;~p2;1NOn2Um$W z*U=i%VuwBRz@Z11qKr(qgO8vr*&X5{?12dd{6*l`Yp`?k3MDcih%qI+g!qV2n61L{ zS-80y9H-NmrN`sSUC*p$lut-w`?nyb*goYXni_zf3okCBA{zrCwXDq^$DQB5U?DQ* z61o2X9r4;yA!5sN`)f6pe9e8pguH(cK5%0-vMf9zrWWth^A{_9wXmH0nW$}wo9hf@Mt&V*5m2_W0Zac{Bwl*3N0W}7D6V5mO|AbT zMePe7b5d1qntWOB)2(kfH3+1h@`qdCj$7%?Ws`6C=E;z?vBmFy(ZuU>?ZKAjdKnE_$3iyZHlp%_ z77-FteGS2x>7s==RC=EgNc20pi}B5ZYP?<*;Yn$7M)<7;<>9ljc|Q@}q1HAXA>?XX z{-<=FYU*8Yx_bmPn*eq|(6}#S=KV{`|BZ*Xn#BSEOxT0n<2%3UJglMVh`FJxT)N*_o6m(8iH0h%=F{CzZaZ8j3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Nmp~5gOA&f#-}&RAC)+jT~aqW16dJJ!<{1SBRwNC-+@s#0J0xpc8U*({ev?ecGPiyM}y+{LPI^Pz?Ji3a8#5efn?b(KWc-fBU|^ znzO>c4x)cqC;rQm)MvF;V?w20k|d9a4=;gCLFjI~FAkIXegCKr4lG7?rbLS=Ln@|L z3$L)>=Fje6xLl#+7Nq=-S)MTw-AEsaotO9R?|`NzO}OzLB(ed{M5IYv+ZmE2)-yjn z2;LdNB6l201nn}Usb78XPvsv(=a!oOv=Mt%G*z0SZdP*I7d0QUxQDKO-T~4G=ztAc z@B5-Vu`Zg*ttfNbRp&NiZ?^jV+^pKthCKh^v*imA8R6#*MAthXKqK*C3<_ro+!3&|sV3VO#qfx35<~sF#wVm#wXr zv7ndFub0-Mm+PsQd81c|xtyG^oTa>+{`$UVUrwz(!b9^**P7>RzFx_3TK;;vTtKm$ zGI}yV@QugpOa4lP@k+wRO1RicT=z;;;7ZanAOryr9S->N5fBdngwX{r(}c7_!*5CkfA>g#46{`oCAdW=8fv-O$1Et7)?S0IJTuYb}cw|G&rE{b=#ln zcJ1qS4CYi+WlZDI*ue}(LFN#t^cb$&^Ceg#i;iA!~bT6jrXc!gwoNoab7xphgg zb%h{ti7#=5-h273_iFgwj`wgXy8!hHIC13FsTn2m{qdX#eajU}YW!4kITQvWO?tT;Vf8g(x{~xTU8MmMO%erSx?CP6!SO0-5{u$k4 zCf4#NV_{_?ECrJF}4UgOzZ`I+?ZFg9Uc||hEIS~1iw|&Yk-GO)NhbQ mX4Rtsthis.$items.length-1||0>b?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){c.to(b)}):d==b?this.pause().cycle():this.slide(b>d?"next":"prev",a(this.$items[b]))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){return this.sliding?void 0:this.slide("next")},c.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},c.prototype.slide=function(b,c){var d=this.$element.find(".item.active"),e=c||d[b](),f=this.interval,g="next"==b?"left":"right",h="next"==b?"first":"last",i=this;if(!e.length){if(!this.options.wrap)return;e=this.$element.find(".item")[h]()}if(e.hasClass("active"))return this.sliding=!1;var j=e[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:g});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,f&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(e)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:g});return a.support.transition&&this.$element.hasClass("slide")?(e.addClass(b),e[0].offsetWidth,d.addClass(g),e.addClass(g),d.one("bsTransitionEnd",function(){e.removeClass([b,g].join(" ")).addClass("active"),d.removeClass(["active",g].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(1e3*d.css("transition-duration").slice(0,-1))):(d.removeClass("active"),e.addClass("active"),this.sliding=!1,this.$element.trigger(m)),f&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this},a(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}}),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.collapse"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b);!e&&f.toggle&&"show"==b&&(b=!b),e||d.data("bs.collapse",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.transitioning=null,this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};c.VERSION="3.2.0",c.DEFAULTS={toggle:!0},c.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},c.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var c=a.Event("show.bs.collapse");if(this.$element.trigger(c),!c.isDefaultPrevented()){var d=this.$parent&&this.$parent.find("> .panel > .in");if(d&&d.length){var e=d.data("bs.collapse");if(e&&e.transitioning)return;b.call(d,"hide"),e||d.data("bs.collapse",null)}var f=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[f](0),this.transitioning=1;var g=function(){this.$element.removeClass("collapsing").addClass("collapse in")[f](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return g.call(this);var h=a.camelCase(["scroll",f].join("-"));this.$element.one("bsTransitionEnd",a.proxy(g,this)).emulateTransitionEnd(350)[f](this.$element[0][h])}}},c.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1;var d=function(){this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(d,this)).emulateTransitionEnd(350):d.call(this)}}},c.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var d=a.fn.collapse;a.fn.collapse=b,a.fn.collapse.Constructor=c,a.fn.collapse.noConflict=function(){return a.fn.collapse=d,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(c){var d,e=a(this),f=e.attr("data-target")||c.preventDefault()||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""),g=a(f),h=g.data("bs.collapse"),i=h?"toggle":e.data(),j=e.attr("data-parent"),k=j&&a(j);h&&h.transitioning||(k&&k.find('[data-toggle="collapse"][data-parent="'+j+'"]').not(e).addClass("collapsed"),e[g.hasClass("in")?"addClass":"removeClass"]("collapsed")),b.call(g,i)})}(jQuery),+function(a){"use strict";function b(b){b&&3===b.which||(a(e).remove(),a(f).each(function(){var d=c(a(this)),e={relatedTarget:this};d.hasClass("open")&&(d.trigger(b=a.Event("hide.bs.dropdown",e)),b.isDefaultPrevented()||d.removeClass("open").trigger("hidden.bs.dropdown",e))}))}function c(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.2.0",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=c(e),g=f.hasClass("open");if(b(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a('