Changeset 2921855
- Timestamp:
- 06/05/2023 04:43:18 PM (3 years ago)
- Location:
- wp-linked-data/trunk
- Files:
-
- 71 added
- 40 edited
-
controller/UserProfileController.php (modified) (1 diff)
-
rdf/RdfBuilder.php (modified) (3 diffs)
-
readme.txt (modified) (2 diffs)
-
vendor/autoload.php (modified) (1 diff)
-
vendor/composer/ClassLoader.php (modified) (3 diffs)
-
vendor/composer/InstalledVersions.php (modified) (4 diffs)
-
vendor/composer/autoload_namespaces.php (modified) (1 diff)
-
vendor/composer/autoload_psr4.php (modified) (1 diff)
-
vendor/composer/autoload_real.php (modified) (2 diffs)
-
vendor/composer/autoload_static.php (modified) (5 diffs)
-
vendor/composer/installed.json (modified) (7 diffs)
-
vendor/composer/installed.php (modified) (5 diffs)
-
vendor/composer/platform_check.php (modified) (1 diff)
-
vendor/easyrdf/easyrdf/.editorconfig (added)
-
vendor/easyrdf/easyrdf/.travis.yml (added)
-
vendor/easyrdf/easyrdf/CHANGELOG.md (modified) (2 diffs)
-
vendor/easyrdf/easyrdf/CODE_OF_CONDUCT.md (added)
-
vendor/easyrdf/easyrdf/CONTRIBUTING.md (added)
-
vendor/easyrdf/easyrdf/DEVELOPER.md (modified) (1 diff)
-
vendor/easyrdf/easyrdf/LICENSE.md (modified) (1 diff)
-
vendor/easyrdf/easyrdf/README.md (modified) (6 diffs)
-
vendor/easyrdf/easyrdf/composer.json (modified) (3 diffs)
-
vendor/easyrdf/easyrdf/doap.php (modified) (4 diffs)
-
vendor/easyrdf/easyrdf/lib/Collection.php (added)
-
vendor/easyrdf/easyrdf/lib/Container.php (added)
-
vendor/easyrdf/easyrdf/lib/Exception.php (added)
-
vendor/easyrdf/easyrdf/lib/Format.php (added)
-
vendor/easyrdf/easyrdf/lib/Graph.php (added)
-
vendor/easyrdf/easyrdf/lib/GraphStore.php (added)
-
vendor/easyrdf/easyrdf/lib/Http (added)
-
vendor/easyrdf/easyrdf/lib/Http.php (added)
-
vendor/easyrdf/easyrdf/lib/Http/Client.php (added)
-
vendor/easyrdf/easyrdf/lib/Http/Exception.php (added)
-
vendor/easyrdf/easyrdf/lib/Http/Response.php (added)
-
vendor/easyrdf/easyrdf/lib/Isomorphic.php (added)
-
vendor/easyrdf/easyrdf/lib/Literal (added)
-
vendor/easyrdf/easyrdf/lib/Literal.php (added)
-
vendor/easyrdf/easyrdf/lib/Literal/Boolean.php (added)
-
vendor/easyrdf/easyrdf/lib/Literal/Date.php (added)
-
vendor/easyrdf/easyrdf/lib/Literal/DateTime.php (added)
-
vendor/easyrdf/easyrdf/lib/Literal/Decimal.php (added)
-
vendor/easyrdf/easyrdf/lib/Literal/HTML.php (added)
-
vendor/easyrdf/easyrdf/lib/Literal/HexBinary.php (added)
-
vendor/easyrdf/easyrdf/lib/Literal/Integer.php (added)
-
vendor/easyrdf/easyrdf/lib/Literal/XML.php (added)
-
vendor/easyrdf/easyrdf/lib/ParsedUri.php (added)
-
vendor/easyrdf/easyrdf/lib/Parser (added)
-
vendor/easyrdf/easyrdf/lib/Parser.php (added)
-
vendor/easyrdf/easyrdf/lib/Parser/Arc.php (added)
-
vendor/easyrdf/easyrdf/lib/Parser/Exception.php (added)
-
vendor/easyrdf/easyrdf/lib/Parser/Json.php (added)
-
vendor/easyrdf/easyrdf/lib/Parser/JsonLd.php (added)
-
vendor/easyrdf/easyrdf/lib/Parser/Ntriples.php (added)
-
vendor/easyrdf/easyrdf/lib/Parser/Rapper.php (added)
-
vendor/easyrdf/easyrdf/lib/Parser/RdfPhp.php (added)
-
vendor/easyrdf/easyrdf/lib/Parser/RdfXml.php (added)
-
vendor/easyrdf/easyrdf/lib/Parser/Rdfa.php (added)
-
vendor/easyrdf/easyrdf/lib/Parser/Turtle.php (added)
-
vendor/easyrdf/easyrdf/lib/RdfNamespace.php (added)
-
vendor/easyrdf/easyrdf/lib/Resource.php (added)
-
vendor/easyrdf/easyrdf/lib/Serialiser (added)
-
vendor/easyrdf/easyrdf/lib/Serialiser.php (added)
-
vendor/easyrdf/easyrdf/lib/Serialiser/Arc.php (added)
-
vendor/easyrdf/easyrdf/lib/Serialiser/GraphViz.php (added)
-
vendor/easyrdf/easyrdf/lib/Serialiser/Json.php (added)
-
vendor/easyrdf/easyrdf/lib/Serialiser/JsonLd.php (added)
-
vendor/easyrdf/easyrdf/lib/Serialiser/Ntriples.php (added)
-
vendor/easyrdf/easyrdf/lib/Serialiser/Rapper.php (added)
-
vendor/easyrdf/easyrdf/lib/Serialiser/RdfPhp.php (added)
-
vendor/easyrdf/easyrdf/lib/Serialiser/RdfXml.php (added)
-
vendor/easyrdf/easyrdf/lib/Serialiser/Turtle.php (added)
-
vendor/easyrdf/easyrdf/lib/Sparql (added)
-
vendor/easyrdf/easyrdf/lib/Sparql/Client.php (added)
-
vendor/easyrdf/easyrdf/lib/Sparql/Result.php (added)
-
vendor/easyrdf/easyrdf/lib/TypeMapper.php (added)
-
vendor/easyrdf/easyrdf/lib/Utils.php (added)
-
vendor/easyrdf/easyrdf/lib/XMLParser.php (added)
-
vendor/easyrdf/easyrdf/scripts/copyright_updater.php (modified) (4 diffs)
-
vendor/ml/json-ld/.devcontainer (added)
-
vendor/ml/json-ld/.devcontainer/Dockerfile (added)
-
vendor/ml/json-ld/.devcontainer/devcontainer.json (added)
-
vendor/ml/json-ld/.github (added)
-
vendor/ml/json-ld/.github/workflows (added)
-
vendor/ml/json-ld/.github/workflows/ci.yaml (added)
-
vendor/ml/json-ld/.vscode (added)
-
vendor/ml/json-ld/.vscode/launch.json (added)
-
vendor/ml/json-ld/FileGetContentsLoader.php (modified) (5 diffs)
-
vendor/ml/json-ld/NQuads.php (modified) (2 diffs)
-
vendor/ml/json-ld/README.md (modified) (1 diff)
-
vendor/ml/json-ld/Test/FileGetContentsLoaderTest.php (added)
-
vendor/ml/json-ld/Test/NQuadsTest.php (modified) (3 diffs)
-
vendor/willdurand/negotiation/.github (added)
-
vendor/willdurand/negotiation/.github/workflows (added)
-
vendor/willdurand/negotiation/.github/workflows/ci.yaml (added)
-
vendor/willdurand/negotiation/.gitignore (modified) (1 diff)
-
vendor/willdurand/negotiation/README.md (modified) (6 diffs)
-
vendor/willdurand/negotiation/composer.json (modified) (1 diff)
-
vendor/willdurand/negotiation/phpunit.xml.dist (modified) (3 diffs)
-
vendor/willdurand/negotiation/src/Negotiation/AbstractNegotiator.php (modified) (6 diffs)
-
vendor/willdurand/negotiation/src/Negotiation/AcceptMatch.php (added)
-
vendor/willdurand/negotiation/src/Negotiation/BaseAccept.php (modified) (1 diff)
-
vendor/willdurand/negotiation/src/Negotiation/LanguageNegotiator.php (modified) (1 diff)
-
vendor/willdurand/negotiation/src/Negotiation/Negotiator.php (modified) (2 diffs)
-
vendor/willdurand/negotiation/tests/Negotiation/Tests/CharsetNegotiatorTest.php (modified) (2 diffs)
-
vendor/willdurand/negotiation/tests/Negotiation/Tests/EncodingNegotiatorTest.php (modified) (1 diff)
-
vendor/willdurand/negotiation/tests/Negotiation/Tests/LanguageNegotiatorTest.php (modified) (3 diffs)
-
vendor/willdurand/negotiation/tests/Negotiation/Tests/MatchTest.php (modified) (5 diffs)
-
vendor/willdurand/negotiation/tests/Negotiation/Tests/NegotiatorTest.php (modified) (7 diffs)
-
vendor/willdurand/negotiation/tests/Negotiation/Tests/TestCase.php (modified) (1 diff)
-
wp-linked-data-initialize.php (modified) (1 diff)
-
wp-linked-data.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-linked-data/trunk/controller/UserProfileController.php
r769768 r2921855 43 43 $serializedRdf = trim (stripslashes ($_POST['additionalRdf'])); 44 44 if (!empty($serializedRdf)) { 45 $graph = new \EasyRdf _Graph();45 $graph = new \EasyRdf\Graph(); 46 46 $graph->parse ($serializedRdf); // parsing if done to check if syntax is valid 47 47 update_user_meta ($userId, 'additionalRdf', $serializedRdf); -
wp-linked-data/trunk/rdf/RdfBuilder.php
r2177822 r2921855 15 15 16 16 public function buildGraph ($queriedObject, $wpQuery) { 17 $graph = new \EasyRdf _Graph();17 $graph = new \EasyRdf\Graph(); 18 18 if (!$queriedObject) { 19 19 return $this->buildGraphForBlog ($graph, $wpQuery); … … 46 46 $post_resource->set ('dc:title', $post->post_title); 47 47 $post_resource->set ('sioc:content', strip_tags($post->post_content)); 48 $post_resource->set ('dc:modified', \EasyRdf _Literal_Date::parse($post->post_modified));49 $post_resource->set ('dc:created', \EasyRdf _Literal_Date::parse($post->post_date));48 $post_resource->set ('dc:modified', \EasyRdf\Literal\Date::parse($post->post_modified)); 49 $post_resource->set ('dc:created', \EasyRdf\Literal\Date::parse($post->post_date)); 50 50 51 51 $author = get_userdata ($post->post_author); … … 100 100 if ($rsaPublicKey) { 101 101 $key_resource = $graph->newBNode ('cert:RSAPublicKey'); 102 $key_resource->set ('cert:exponent', new \EasyRdf _Literal_Integer($rsaPublicKey->getExponent ()));103 $key_resource->set ('cert:modulus', new \EasyRdf _Literal_HexBinary($rsaPublicKey->getModulus ()));102 $key_resource->set ('cert:exponent', new \EasyRdf\Literal\Integer($rsaPublicKey->getExponent ())); 103 $key_resource->set ('cert:modulus', new \EasyRdf\Literal\HexBinary($rsaPublicKey->getModulus ())); 104 104 $author_resource->set ('cert:key', $key_resource); 105 105 } -
wp-linked-data/trunk/readme.txt
r2856603 r2921855 4 4 Tags: linked data, rdf, semantic web, webid, solid 5 5 Requires at least: 3.5.1 6 Tested up to: 6. 16 Tested up to: 6.2 7 7 Stable tag: trunk 8 8 License: GPLv3 … … 66 66 == Changelog == 67 67 68 = 0.5.4 = 69 70 * Fix: compatibility with PHP 8 71 68 72 = 0.5.3 = 69 73 -
wp-linked-data/trunk/vendor/autoload.php
r2856603 r2921855 23 23 require_once __DIR__ . '/composer/autoload_real.php'; 24 24 25 return ComposerAutoloaderInit 7eeb0d37b137ab979f259838b63ffd05::getLoader();25 return ComposerAutoloaderInitfba302fb16f43093c13bd9f227a751dc::getLoader(); -
wp-linked-data/trunk/vendor/composer/ClassLoader.php
r2856603 r2921855 430 430 { 431 431 if ($file = $this->findFile($class)) { 432 (self::$includeFile)($file); 432 $includeFile = self::$includeFile; 433 $includeFile($file); 433 434 434 435 return true; … … 561 562 } 562 563 563 private static function initializeIncludeClosure(): void 564 /** 565 * @return void 566 */ 567 private static function initializeIncludeClosure() 564 568 { 565 569 if (self::$includeFile !== null) { … … 575 579 * @return void 576 580 */ 577 self::$includeFile = static function($file) {581 self::$includeFile = \Closure::bind(static function($file) { 578 582 include $file; 579 } ;583 }, null, null); 580 584 } 581 585 } -
wp-linked-data/trunk/vendor/composer/InstalledVersions.php
r2856603 r2921855 99 99 foreach (self::getInstalled() as $installed) { 100 100 if (isset($installed['versions'][$packageName])) { 101 return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']);101 return $includeDevRequirements || !isset($installed['versions'][$packageName]['dev_requirement']) || $installed['versions'][$packageName]['dev_requirement'] === false; 102 102 } 103 103 } … … 120 120 public static function satisfies(VersionParser $parser, $packageName, $constraint) 121 121 { 122 $constraint = $parser->parseConstraints( $constraint);122 $constraint = $parser->parseConstraints((string) $constraint); 123 123 $provided = $parser->parseConstraints(self::getVersionRanges($packageName)); 124 124 … … 329 329 $installed[] = self::$installedByVendor[$vendorDir]; 330 330 } elseif (is_file($vendorDir.'/composer/installed.php')) { 331 $installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php'; 331 /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */ 332 $required = require $vendorDir.'/composer/installed.php'; 333 $installed[] = self::$installedByVendor[$vendorDir] = $required; 332 334 if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) { 333 335 self::$installed = $installed[count($installed) - 1]; … … 341 343 // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937 342 344 if (substr(__DIR__, -8, 1) !== 'C') { 343 self::$installed = require __DIR__ . '/installed.php'; 345 /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */ 346 $required = require __DIR__ . '/installed.php'; 347 self::$installed = $required; 344 348 } else { 345 349 self::$installed = array(); 346 350 } 347 351 } 348 $installed[] = self::$installed; 352 353 if (self::$installed !== array()) { 354 $installed[] = self::$installed; 355 } 349 356 350 357 return $installed; -
wp-linked-data/trunk/vendor/composer/autoload_namespaces.php
r2856603 r2921855 8 8 return array( 9 9 'ML\\IRI' => array($vendorDir . '/ml/iri'), 10 'EasyRdf_' => array($vendorDir . '/easyrdf/easyrdf/lib'),11 10 ); -
wp-linked-data/trunk/vendor/composer/autoload_psr4.php
r2856603 r2921855 9 9 'Negotiation\\' => array($vendorDir . '/willdurand/negotiation/src/Negotiation'), 10 10 'ML\\JsonLD\\' => array($vendorDir . '/ml/json-ld'), 11 'EasyRdf\\' => array($vendorDir . '/easyrdf/easyrdf/lib'), 11 12 ); -
wp-linked-data/trunk/vendor/composer/autoload_real.php
r2856603 r2921855 3 3 // autoload_real.php @generated by Composer 4 4 5 class ComposerAutoloaderInit 7eeb0d37b137ab979f259838b63ffd055 class ComposerAutoloaderInitfba302fb16f43093c13bd9f227a751dc 6 6 { 7 7 private static $loader; … … 25 25 require __DIR__ . '/platform_check.php'; 26 26 27 spl_autoload_register(array('ComposerAutoloaderInit 7eeb0d37b137ab979f259838b63ffd05', 'loadClassLoader'), true, true);27 spl_autoload_register(array('ComposerAutoloaderInitfba302fb16f43093c13bd9f227a751dc', 'loadClassLoader'), true, true); 28 28 self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); 29 spl_autoload_unregister(array('ComposerAutoloaderInit 7eeb0d37b137ab979f259838b63ffd05', 'loadClassLoader'));29 spl_autoload_unregister(array('ComposerAutoloaderInitfba302fb16f43093c13bd9f227a751dc', 'loadClassLoader')); 30 30 31 31 require __DIR__ . '/autoload_static.php'; 32 call_user_func(\Composer\Autoload\ComposerStaticInit 7eeb0d37b137ab979f259838b63ffd05::getInitializer($loader));32 call_user_func(\Composer\Autoload\ComposerStaticInitfba302fb16f43093c13bd9f227a751dc::getInitializer($loader)); 33 33 34 34 $loader->register(true); -
wp-linked-data/trunk/vendor/composer/autoload_static.php
r2856603 r2921855 5 5 namespace Composer\Autoload; 6 6 7 class ComposerStaticInit 7eeb0d37b137ab979f259838b63ffd057 class ComposerStaticInitfba302fb16f43093c13bd9f227a751dc 8 8 { 9 9 public static $prefixLengthsPsr4 = array ( … … 15 15 array ( 16 16 'ML\\JsonLD\\' => 10, 17 ), 18 'E' => 19 array ( 20 'EasyRdf\\' => 8, 17 21 ), 18 22 ); … … 27 31 0 => __DIR__ . '/..' . '/ml/json-ld', 28 32 ), 33 'EasyRdf\\' => 34 array ( 35 0 => __DIR__ . '/..' . '/easyrdf/easyrdf/lib', 36 ), 29 37 ); 30 38 … … 35 43 array ( 36 44 0 => __DIR__ . '/..' . '/ml/iri', 37 ),38 ),39 'E' =>40 array (41 'EasyRdf_' =>42 array (43 0 => __DIR__ . '/..' . '/easyrdf/easyrdf/lib',44 45 ), 45 46 ), … … 53 54 { 54 55 return \Closure::bind(function () use ($loader) { 55 $loader->prefixLengthsPsr4 = ComposerStaticInit 7eeb0d37b137ab979f259838b63ffd05::$prefixLengthsPsr4;56 $loader->prefixDirsPsr4 = ComposerStaticInit 7eeb0d37b137ab979f259838b63ffd05::$prefixDirsPsr4;57 $loader->prefixesPsr0 = ComposerStaticInit 7eeb0d37b137ab979f259838b63ffd05::$prefixesPsr0;58 $loader->classMap = ComposerStaticInit 7eeb0d37b137ab979f259838b63ffd05::$classMap;56 $loader->prefixLengthsPsr4 = ComposerStaticInitfba302fb16f43093c13bd9f227a751dc::$prefixLengthsPsr4; 57 $loader->prefixDirsPsr4 = ComposerStaticInitfba302fb16f43093c13bd9f227a751dc::$prefixDirsPsr4; 58 $loader->prefixesPsr0 = ComposerStaticInitfba302fb16f43093c13bd9f227a751dc::$prefixesPsr0; 59 $loader->classMap = ComposerStaticInitfba302fb16f43093c13bd9f227a751dc::$classMap; 59 60 60 61 }, null, ClassLoader::class); -
wp-linked-data/trunk/vendor/composer/installed.json
r2856603 r2921855 3 3 { 4 4 "name": "easyrdf/easyrdf", 5 "version": "0.9.1", 6 "version_normalized": "0.9.1.0", 7 "source": { 8 "type": "git", 9 "url": "https://github.com/njh/easyrdf.git", 10 "reference": "acd09dfe0555fbcfa254291e433c45fdd4652566" 11 }, 12 "dist": { 13 "type": "zip", 14 "url": "https://api.github.com/repos/njh/easyrdf/zipball/acd09dfe0555fbcfa254291e433c45fdd4652566", 15 "reference": "acd09dfe0555fbcfa254291e433c45fdd4652566", 16 "shasum": "" 17 }, 18 "require": { 5 "version": "1.1.1", 6 "version_normalized": "1.1.1.0", 7 "source": { 8 "type": "git", 9 "url": "https://github.com/easyrdf/easyrdf.git", 10 "reference": "c7b0a9dbcb211eb7de03ee99ff5b52d17f2a8e64" 11 }, 12 "dist": { 13 "type": "zip", 14 "url": "https://api.github.com/repos/easyrdf/easyrdf/zipball/c7b0a9dbcb211eb7de03ee99ff5b52d17f2a8e64", 15 "reference": "c7b0a9dbcb211eb7de03ee99ff5b52d17f2a8e64", 16 "shasum": "" 17 }, 18 "require": { 19 "ext-dom": "*", 19 20 "ext-mbstring": "*", 20 21 "ext-pcre": "*", 21 "php": ">=5.2.8" 22 "ext-xmlreader": "*", 23 "lib-libxml": "*", 24 "php": ">=7.1.0" 22 25 }, 23 26 "require-dev": { 24 "phpunit/phpunit": "~3.5", 25 "sami/sami": "~1.4", 26 "squizlabs/php_codesniffer": "~1.4.3" 27 "code-lts/doctum": "^5", 28 "ml/json-ld": "~1.0", 29 "phpunit/phpunit": "^7", 30 "semsol/arc2": "^2.4", 31 "squizlabs/php_codesniffer": "3.*", 32 "zendframework/zend-http": "~2.3" 27 33 }, 28 34 "suggest": { 29 "ml/json-ld": "~1.0" 30 }, 31 "time": "2015-02-27T09:45:49+00:00", 32 "type": "library", 33 "installation-source": "dist", 34 "autoload": { 35 "psr-0": { 36 "EasyRdf_": "lib/" 35 "ml/json-ld": "~1.0", 36 "semsol/arc2": "~2.2" 37 }, 38 "time": "2020-12-02T08:47:31+00:00", 39 "type": "library", 40 "installation-source": "dist", 41 "autoload": { 42 "psr-4": { 43 "EasyRdf\\": "lib" 37 44 } 38 45 }, … … 51 58 "name": "Alexey Zakhlestin", 52 59 "email": "indeyets@gmail.com", 60 "homepage": "http://indeyets.ru/", 53 61 "role": "Developer" 54 62 } … … 64 72 "sparql" 65 73 ], 74 "support": { 75 "forum": "http://groups.google.com/group/easyrdf/", 76 "issues": "http://github.com/easyrdf/easyrdf/issues", 77 "source": "https://github.com/easyrdf/easyrdf/tree/1.1.1" 78 }, 66 79 "install-path": "../easyrdf/easyrdf" 67 80 }, … … 114 127 "url" 115 128 ], 129 "support": { 130 "issues": "https://github.com/lanthaler/IRI/issues", 131 "source": "https://github.com/lanthaler/IRI/tree/master" 132 }, 116 133 "install-path": "../ml/iri/ML/IRI" 117 134 }, 118 135 { 119 136 "name": "ml/json-ld", 120 "version": "1. 1.0",121 "version_normalized": "1. 1.0.0",137 "version": "1.2.1", 138 "version_normalized": "1.2.1.0", 122 139 "source": { 123 140 "type": "git", 124 141 "url": "https://github.com/lanthaler/JsonLD.git", 125 "reference": " b5f82820c255cb64067b1c7adbb819cad4afa70a"126 }, 127 "dist": { 128 "type": "zip", 129 "url": "https://api.github.com/repos/lanthaler/JsonLD/zipball/ b5f82820c255cb64067b1c7adbb819cad4afa70a",130 "reference": " b5f82820c255cb64067b1c7adbb819cad4afa70a",142 "reference": "537e68e87a6bce23e57c575cd5dcac1f67ce25d8" 143 }, 144 "dist": { 145 "type": "zip", 146 "url": "https://api.github.com/repos/lanthaler/JsonLD/zipball/537e68e87a6bce23e57c575cd5dcac1f67ce25d8", 147 "reference": "537e68e87a6bce23e57c575cd5dcac1f67ce25d8", 131 148 "shasum": "" 132 149 }, … … 140 157 "phpunit/phpunit": "^4" 141 158 }, 142 "time": "20 18-11-18T20:26:18+00:00",159 "time": "2022-09-29T08:45:17+00:00", 143 160 "type": "library", 144 161 "installation-source": "dist", … … 166 183 "jsonld" 167 184 ], 185 "support": { 186 "issues": "https://github.com/lanthaler/JsonLD/issues", 187 "source": "https://github.com/lanthaler/JsonLD/tree/1.2.1" 188 }, 168 189 "install-path": "../ml/json-ld" 169 190 }, 170 191 { 171 192 "name": "willdurand/negotiation", 172 "version": " v2.3.1",173 "version_normalized": " 2.3.1.0",193 "version": "3.1.0", 194 "version_normalized": "3.1.0.0", 174 195 "source": { 175 196 "type": "git", 176 197 "url": "https://github.com/willdurand/Negotiation.git", 177 "reference": " 03436ededa67c6e83b9b12defac15384cb399dc9"178 }, 179 "dist": { 180 "type": "zip", 181 "url": "https://api.github.com/repos/willdurand/Negotiation/zipball/ 03436ededa67c6e83b9b12defac15384cb399dc9",182 "reference": " 03436ededa67c6e83b9b12defac15384cb399dc9",183 "shasum": "" 184 }, 185 "require": { 186 "php": ">= 5.4.0"198 "reference": "68e9ea0553ef6e2ee8db5c1d98829f111e623ec2" 199 }, 200 "dist": { 201 "type": "zip", 202 "url": "https://api.github.com/repos/willdurand/Negotiation/zipball/68e9ea0553ef6e2ee8db5c1d98829f111e623ec2", 203 "reference": "68e9ea0553ef6e2ee8db5c1d98829f111e623ec2", 204 "shasum": "" 205 }, 206 "require": { 207 "php": ">=7.1.0" 187 208 }, 188 209 "require-dev": { 189 " phpunit/phpunit": "~4.5"190 }, 191 "time": "20 17-05-14T17:21:12+00:00",210 "symfony/phpunit-bridge": "^5.0" 211 }, 212 "time": "2022-01-30T20:08:53+00:00", 192 213 "type": "library", 193 214 "extra": { 194 215 "branch-alias": { 195 "dev-master": " 2.3-dev"216 "dev-master": "3.0-dev" 196 217 } 197 218 }, … … 221 242 "negotiation" 222 243 ], 244 "support": { 245 "issues": "https://github.com/willdurand/Negotiation/issues", 246 "source": "https://github.com/willdurand/Negotiation/tree/3.1.0" 247 }, 223 248 "install-path": "../willdurand/negotiation" 224 249 } 225 250 ], 226 "dev": true,251 "dev": false, 227 252 "dev-package-names": [] 228 253 } -
wp-linked-data/trunk/vendor/composer/installed.php
r2856603 r2921855 4 4 'pretty_version' => 'dev-main', 5 5 'version' => 'dev-main', 6 'reference' => ' 289f6cdcbea10e1e2ef6e8063c38d8774593f0cb',6 'reference' => 'ce3bc31464ca0da8de099eba750a1fc6b48cf1cd', 7 7 'type' => 'library', 8 8 'install_path' => __DIR__ . '/../../../', 9 9 'aliases' => array(), 10 'dev' => true,10 'dev' => false, 11 11 ), 12 12 'versions' => array( … … 14 14 'pretty_version' => 'dev-main', 15 15 'version' => 'dev-main', 16 'reference' => ' 289f6cdcbea10e1e2ef6e8063c38d8774593f0cb',16 'reference' => 'ce3bc31464ca0da8de099eba750a1fc6b48cf1cd', 17 17 'type' => 'library', 18 18 'install_path' => __DIR__ . '/../../../', … … 21 21 ), 22 22 'easyrdf/easyrdf' => array( 23 'pretty_version' => ' 0.9.1',24 'version' => ' 0.9.1.0',25 'reference' => ' acd09dfe0555fbcfa254291e433c45fdd4652566',23 'pretty_version' => '1.1.1', 24 'version' => '1.1.1.0', 25 'reference' => 'c7b0a9dbcb211eb7de03ee99ff5b52d17f2a8e64', 26 26 'type' => 'library', 27 27 'install_path' => __DIR__ . '/../easyrdf/easyrdf', … … 39 39 ), 40 40 'ml/json-ld' => array( 41 'pretty_version' => '1. 1.0',42 'version' => '1. 1.0.0',43 'reference' => ' b5f82820c255cb64067b1c7adbb819cad4afa70a',41 'pretty_version' => '1.2.1', 42 'version' => '1.2.1.0', 43 'reference' => '537e68e87a6bce23e57c575cd5dcac1f67ce25d8', 44 44 'type' => 'library', 45 45 'install_path' => __DIR__ . '/../ml/json-ld', … … 48 48 ), 49 49 'willdurand/negotiation' => array( 50 'pretty_version' => ' v2.3.1',51 'version' => ' 2.3.1.0',52 'reference' => ' 03436ededa67c6e83b9b12defac15384cb399dc9',50 'pretty_version' => '3.1.0', 51 'version' => '3.1.0.0', 52 'reference' => '68e9ea0553ef6e2ee8db5c1d98829f111e623ec2', 53 53 'type' => 'library', 54 54 'install_path' => __DIR__ . '/../willdurand/negotiation', -
wp-linked-data/trunk/vendor/composer/platform_check.php
r2856603 r2921855 5 5 $issues = array(); 6 6 7 if (!(PHP_VERSION_ID >= 50400)) {8 $issues[] = 'Your Composer dependencies require a PHP version ">= 5.4.0". You are running ' . PHP_VERSION . '.';7 if (!(PHP_VERSION_ID >= 70100)) { 8 $issues[] = 'Your Composer dependencies require a PHP version ">= 7.1.0". You are running ' . PHP_VERSION . '.'; 9 9 } 10 10 -
wp-linked-data/trunk/vendor/easyrdf/easyrdf/CHANGELOG.md
r2177822 r2921855 1 EasyRdf 1.1.1 2 ============= 3 4 Bug fix release that fixes parsing very large RDF/XML files. 5 6 * Use chunked parsing to parse Large XML files using xml_parse (#350) 7 * Fix Resource- and Graph->label claim wrong return type (#254) 8 9 10 EasyRdf 1.1.0 11 ============= 12 13 Bug fix release with a few improvements and changes in Composer dependencies. 14 15 Overview 16 -------- 17 18 * Composer: 19 * changed ARC2 from `~2.2` to `^2.4` (#347) 20 * replaced `sami/sami` with `code-lts/doctum` 21 * added the following required PHP extensions: ext-pcre, ext-xmlreader, lib-libxml 22 * Accept an array of properties in get/getLiteral/getResource methods, fixes #325 (#326) 23 * Add support for parsing large SPARQL XML Results (#357) 24 * Made `Parser` class abstract, to be in line with `Serialiser` class (#328) 25 * Fixed "Sparql\Client uses invalid parameters for Zend\Http\Client->setHeaders" (#335) 26 * Fixed undefined index path in Http\Client::request (#271, #368) 27 28 Highlights for EasyRdf developers 29 --------------------------------- 30 31 * added .editorconfig (#340) 32 * added a basic Docker setup to improve local development and testing (#334) 33 * added `CONTRIBUTING.md` 34 35 36 EasyRdf 1.0.0 37 ============= 38 39 Major new features 40 ------------------ 41 42 * Minimum version of PHP is now PHP version 7.1, PHP 5.x is no-longer supported 43 * Usage without composer is not supported anymore 44 * Library is loaded via PSR-4 autoloader now 45 * The Redland PHP extension is no-longer supported 46 47 Enhancements 48 ------------ 49 50 * `$graph->isA()` can take full IRIs as second parameter (only qname was accepted earlier, see issue #215) 51 * `Accept` HTTP-header depends on SPARQL-query type (see issues #231, #226) 52 * It is possible to set alternate default `Resource` class via `Graph::setDefaultResourceClass()` (see issue #243) 53 * When calling `Graph::load()` set the HTTP Accept header to the desired format 54 * The RDF/PHP and RDF/JSON specifications were added to the documentation 55 * Added text/xml and application/xml MIME types to RDF/XML format 56 * Added additional namespaces from W3C RDFa context 57 * Speeding up the turtle parser by optimising the mb_substr calls 58 * Added support for compressed response body in HTTP client 59 * Updated to PHP CodeSniffer v3 60 * Updated to Sami v4 for API documentation 61 * Updated to PHPUnit v7 62 63 API changes 64 ----------- 65 66 * Classes are renamed like this: `EasyRdf_Parser_Turtle` → `EasyRdf\Parser\Turtle`. With a single exception: `EasyRdf_Namespace` → `EasyRdf\RdfNamespace` (because `namespace` is a keyword in PHP) 67 * EasyRdf expects HTTP-client objects compatible with ZendFramework 2.x instead of 1.x now. (zend-http is added to require-dev so tests for it are always run) 68 * `Resource` implements `ArrayAccess` interface now (see #242) 69 * Now using PHP Type Hints in some classes, which avoids having to do type checks 70 * Serialiser class is now abstract 71 * Implement the ArrayAccess Interface in Resource 72 73 Bug Fixes 74 --------- 75 76 * Fixes that add compatibility for PHP 7.4 77 * Unicode-strings are properly encoded in n-triples documents (see #219) 78 * `RdfPhp` parser validates its input (see #227) 79 * Timeout is applied to response-times, not only connection-times (see #202) 80 * `$graph->get()` is reliable after `$graph->delete()` now (see #239, #241) 81 * Fix for running Graphviz tests against newer versions of Graphviz 82 * Fixed for when the HTTP server doesn't return Reason-Phrase in the status (see #321) 83 * Corrections to RDF format URIs 84 * Fixes for format guessing, so it works with SPARQL-style PREFIX and BASE 85 * Turtle serialiser improvements and fixes 86 * Fix for unescaping URIs while parsing ntriples 87 * Fixed encoding of unicode literals in ntriples 88 89 Changes to Examples 90 ------------------- 91 92 * Added index.php to examples folder, to make them easier to navigate 93 * Removed artistinfo.php example (BBC Music no longer publishes RDF) 94 * Replaced Dbpedialite Villages example with Wikidata Villages example 95 * Added Open Graph Protocol example 96 * Changed default URI for converter example 97 * Fixed namespace for dbpedia categories 98 * Fixes for UK Postcode example and changed it to use Open Street Map 99 100 1 101 EasyRdf 0.9.1 2 102 ============= … … 4 104 Bug Fixes 5 105 --------- 6 7 * Timeout is applied to response-times, not only connection-times (see #202) 106 * Support timeouts for HTTP requests where the server takes a long time to answer. Fixes #202 107 * Fixed Google Map on UK Postcode example 108 8 109 9 110 EasyRdf 0.9.0 -
wp-linked-data/trunk/vendor/easyrdf/easyrdf/DEVELOPER.md
r2177822 r2921855 1 Contributing to EasyRdf 2 ======================= 1 # Developers 3 2 4 Contributions to the EasyRdf codebase are welcome using the usual Github pull request workflow.3 Please also read (CONTRIBUTING.md)[CONTRIBUTING.md]. 5 4 6 To run the code style checker: 5 ## .editorconfig 7 6 8 ``` 9 make cs 10 ``` 7 Please make sure your editor uses our `.editorconfig` file. It contains rules about our coding styles. 11 8 12 You can run the PHP unit test suite with: 9 ## Docker 13 10 14 ``` 15 make test-lib 16 ``` 11 To improve local development we have a Docker container on board. You can find it in `/docker`. 17 12 18 Unit tests are automatically run after being received by Github: 19 http://ci.aelius.com/job/easyrdf/ 13 If you are on `Linux`, go to your terminal, switch to the `docker` folder and run: 20 14 21 The tests for the examples are run separately: 22 http://ci.aelius.com/job/easyrdf-examples/ 15 > make 23 16 17 This will build and start the docker container. 18 After it started, you will be logged in automatically. 24 19 25 Notes 26 ----- 20 Afterwards you can run further commands on the CLI, like `composer update` or PHPUnit test suite. 27 21 28 * Please ask on the [mailing list] before starting work on any significant changes 29 * Please write tests for any new features or bug fixes. The tests should be checked in the same commit as the code. 22 ### Fuseki 30 23 31 [mailing list]:http://groups.google.com/group/easyrdf 24 You can run Fuseki inside the Docker container by calling the following on the Terminal: 25 26 > bash test/start_fuseki.sh 27 28 It will start the server in the background. Wait a few seconds and then run PHPUnit as always. 29 30 ## Tests 31 32 Our test related files are located in `test` folder. Tests are written using PHPUnit. 33 34 Make sure you ran `composer update`, if you want to execute the test suite ([Getting Started](http://www.easyrdf.org/docs/getting-started)). 35 36 To run all tests, open your terminal and run: 37 38 > make test-lib 39 40 ### Travis 41 42 We use Travis to run tests automatically after new code is being received by Github (library and examples): 43 44 Link: https://travis-ci.com/github/easyrdf/easyrdf 45 46 After you made a pull request, use Travis to check the test result. 47 48 ## Important notes 49 50 * Don't rely on our test API, like functions or classes! They are only for internal use. If you want certain functionality be part of the public API, please create an issue. -
wp-linked-data/trunk/vendor/easyrdf/easyrdf/LICENSE.md
r2177822 r2921855 2 2 ======= 3 3 4 Copyright (c) 2009-20 11Nicholas J Humfrey. All rights reserved.4 Copyright (c) 2009-2020 Nicholas J Humfrey. All rights reserved. 5 5 6 6 Redistribution and use in source and binary forms, with or without -
wp-linked-data/trunk/vendor/easyrdf/easyrdf/README.md
r2177822 r2921855 1 1 EasyRdf 2 2 ======= 3 4 [](https://travis-ci.com/easyrdf/easyrdf) 5 3 6 EasyRdf is a PHP library designed to make it easy to consume and produce [RDF]. 4 7 It was designed for use in mixed teams of experienced and inexperienced RDF … … 10 13 inspect what data is available during development. 11 14 12 Data is typically loaded into a [EasyRdf_Graph] object from source RDF13 documents, loaded from the web via HTTP. The [ EasyRdf_GraphStore] class15 Data is typically loaded into an [`EasyRdf\Graph`] object from source RDF 16 documents, loaded from the web via HTTP. The [`EasyRdf\GraphStore`] class 14 17 simplifies loading and saving data to a SPARQL 1.1 Graph Store. 15 18 16 19 SPARQL queries can be made over HTTP to a Triplestore using the 17 [ EasyRdf_Sparql_Client] class. SELECT and ASKqueries will return an18 [ EasyRdf_Sparql_Result] object and CONSTRUCT and DESCRIBEqueries will return19 an [ EasyRdf_Graph] object.20 [`EasyRdf\Sparql\Client`] class. `SELECT` and `ASK` queries will return an 21 [`EasyRdf\Sparql\Result`] object and `CONSTRUCT` and `DESCRIBE` queries will return 22 an [`EasyRdf\Graph`] object. 20 23 21 24 ### Example ### 22 25 23 $foaf = new EasyRdf_Graph("http://njh.me/foaf.rdf"); 24 $foaf->load(); 25 $me = $foaf->primaryTopic(); 26 echo "My name is: ".$me->get('foaf:name')."\n"; 27 26 ```php 27 $foaf = new \EasyRdf\Graph("http://njh.me/foaf.rdf"); 28 $foaf->load(); 29 $me = $foaf->primaryTopic(); 30 echo "My name is: ".$me->get('foaf:name')."\n"; 31 ``` 28 32 29 33 Downloads … … 36 40 ----- 37 41 38 * [EasyRdf Homepage](http ://www.easyrdf.org/)39 * [API documentation](http ://www.easyrdf.org/docs/api)40 * [Change Log](http ://github.com/njh/easyrdf/blob/master/CHANGELOG.md)41 * Source Code: <http://github.com/njh/easyrdf>42 * Issue Tracker: <http://github.com/njh/easyrdf/issues>42 * [EasyRdf Homepage](https://www.easyrdf.org/) 43 * [API documentation](https://www.easyrdf.org/docs/api) 44 * [Change Log](https://github.com/easyrdf/easyrdf/blob/master/CHANGELOG.md) 45 * [Source Code](https://github.com/easyrdf/easyrdf) 46 * [Issue Tracker](https://github.com/easyrdf/easyrdf/issues) 43 47 44 48 … … 46 50 ------------ 47 51 48 * PHP 5.2.8or higher52 * PHP 7.1 or higher 49 53 50 54 … … 52 56 -------- 53 57 54 * API documentation written in phpdoc 55 * Extensive unit tests written using phpunit 56 * Automated testing against PHP 5.2, 5.3 and 5.4 58 * API documentation written in `phpdoc` 59 * Extensive unit tests written using `phpunit` 57 60 * Built-in parsers and serialisers: RDF/JSON, N-Triples, RDF/XML, Turtle 58 * Optional parsing support for: [ARC2], [ Redland Bindings], [rapper]59 * Optional support for [ Zend_Http_Client]60 * No required external depend ancies upon other libraries (PEAR, Zend, etc...)61 * Optional parsing support for: [ARC2], [rapper] 62 * Optional support for [`Zend\Http\Client`] 63 * No required external dependencies upon other libraries (PEAR, Zend, etc...) 61 64 * Complies with Zend Framework coding style. 62 * Type mapper - resources of type foaf:Person can be mapped into PHP object of class Foaf_Person65 * Type mapper - resources of type `foaf:Person` can be mapped into PHP object of class `Foaf_Person` 63 66 * Support for visualisation of graphs using [GraphViz] 64 67 * Comes with a number of examples 65 68 66 69 67 MoreExamples68 ------------- 70 List of Examples 71 ---------------- 69 72 70 * [ artistinfo.php](https://github.com/njh/easyrdf/blob/master/examples/artistinfo.php#slider) - Example of mapping an RDF class type to a PHP Class71 * [ basic.php](https://github.com/njh/easyrdf/blob/master/examples/basic.php#slider) - Basic "Hello World" type example72 * [ basic_sparql.php](https://github.com/njh/easyrdf/blob/master/examples/basic_sparql.php#slider) - Example of making a SPARQL SELECT query73 * [ converter.php](https://github.com/njh/easyrdf/blob/master/examples/converter.php#slider) - Convert RDF from one format to another74 * [ dump.php](https://github.com/njh/easyrdf/blob/master/examples/dump.php#slider) - Display the contents of a graph75 * [ foafinfo.php](https://github.com/njh/easyrdf/blob/master/examples/foafinfo.php#slider) - Display the basic information in a FOAF document76 * [ foafmaker.php](https://github.com/njh/easyrdf/blob/master/examples/foafmaker.php#slider) - Construct a FOAF document with a choice of serialisations77 * [ graph_direct.php](https://github.com/njh/easyrdf/blob/master/examples/graph_direct.php#slider) - Example of using EasyRdf_Graph directly without EasyRdf_Resource78 * [ graphstore.php](https://github.com/njh/easyrdf/blob/master/examples/graphstore.php#slider) - Store and retrieve data from a SPARQL 1.1 Graph Store79 * [ graphviz.php](https://github.com/njh/easyrdf/blob/master/examples/graphviz.php#slider) - GraphViz rendering example80 * [ 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 simplier81 * [ httpget.php](https://github.com/njh/easyrdf/blob/master/examples/httpget.php#slider) - No RDF, just test EasyRdf_Http_Client82 * [ serialise.php](https://github.com/njh/easyrdf/blob/master/examples/serialise.php#slider) - Basic serialisation example83 * [ sparql_queryform.php](https://github.com/njh/easyrdf/blob/master/examples/sparql_queryform.php#slider) - Form to submit SPARQL queries and display the result84 * [ uk_postcode.php](https://github.com/njh/easyrdf/blob/master/examples/uk_postcode.php#slider) - Example of resolving UK postcodes using uk-postcodes.com85 * [ villages.php](https://github.com/njh/easyrdf/blob/master/examples/villages.php#slider) - Fetch and information about villages in Fife from dbpedialite.org86 * [ zend_framework.php](https://github.com/njh/easyrdf/blob/master/examples/zend_framework.php#slider) - Example of using Zend_Http_Client and Zend_Loader_Autoloaderwith EasyRdf73 * [`basic.php`](/examples/basic.php#slider) - Basic "Hello World" type example 74 * [`basic_sparql.php`](/examples/basic_sparql.php#slider) - Example of making a SPARQL `SELECT` query 75 * [`converter.php`](/examples/converter.php#slider) - Convert RDF from one format to another 76 * [`dump.php`](/examples/dump.php#slider) - Display the contents of a graph 77 * [`foafinfo.php`](/examples/foafinfo.php#slider) - Display the basic information in a FOAF document 78 * [`foafmaker.php`](/examples/foafmaker.php#slider) - Construct a FOAF document with a choice of serialisations 79 * [`graph_direct.php`](/examples/graph_direct.php#slider) - Example of using `EasyRdf\Graph` directly without `EasyRdf\Resource` 80 * [`graphstore.php`](/examples/graphstore.php#slider) - Store and retrieve data from a SPARQL 1.1 Graph Store 81 * [`graphviz.php`](/examples/graphviz.php#slider) - GraphViz rendering example 82 * [`html_tag_helpers.php`](/examples/html_tag_helpers.php#slider) - Rails Style html tag helpers to make the EasyRdf examples simpler 83 * [`httpget.php`](/examples/httpget.php#slider) - No RDF, just test `EasyRdf\Http\Client` 84 * [`open_graph_protocol.php`](/examples/open_graph_protocol.php#slider) - Extract Open Graph Protocol metadata from a webpage 85 * [`serialise.php`](/examples/serialise.php#slider) - Basic serialisation example 86 * [`sparql_queryform.php`](/examples/sparql_queryform.php#slider) - Form to submit SPARQL queries and display the result 87 * [`uk_postcode.php`](/examples/uk_postcode.php#slider) - Example of resolving UK postcodes using uk-postcodes.com 88 * [`wikidata_villages.php`](/examples/wikidata_villages.php#slider) - Fetch and information about villages in Fife from Wikidata 89 * [`zend_framework.php`](/examples/zend_framework.php#slider) - Example of using `Zend\Http\Client` with EasyRdf 87 90 91 92 Contributing 93 ------------ 94 95 We welcome any contributions. For further information please read [CONTRIBUTING.md](CONTRIBUTING.md). 96 97 For further information about extending / hack EasyRdf please read [DEVELOPER.md](DEVELOPER.md). 98 99 Running Examples 100 ---------------- 101 102 The easiest way of trying out some of the examples is to use the PHP command to 103 run a local web server on your computer. 104 105 ``` 106 php -S localhost:8080 -t examples 107 ``` 108 109 Then open the following URL in your browser: http://localhost:8080/ 88 110 89 111 … … 96 118 97 119 98 [ EasyRdf_Graph]:http://www.easyrdf.org/docs/api/EasyRdf_Graph.html99 [ EasyRdf_GraphStore]:http://www.easyrdf.org/docs/api/EasyRdf_GraphStore.html100 [ EasyRdf_Sparql_Client]:http://www.easyrdf.org/docs/api/EasyRdf_Sparql_Client.html101 [ EasyRdf_Sparql_Result]:http://www.easyrdf.org/docs/api/EasyRdf_Sparql_Result.html120 [`EasyRdf\Graph`]:https://www.easyrdf.org/docs/api/EasyRdf\Graph.html 121 [`EasyRdf\GraphStore`]:https://www.easyrdf.org/docs/api/EasyRdf\GraphStore.html 122 [`EasyRdf\Sparql\Client`]:https://www.easyrdf.org/docs/api/EasyRdf\Sparql\Client.html 123 [`EasyRdf\Sparql\Result`]:https://www.easyrdf.org/docs/api/EasyRdf\Sparql\Result.html 102 124 103 [ARC2]:http ://github.com/semsol/arc2/104 [BSD-3-Clause]:http ://www.opensource.org/licenses/BSD-3-Clause105 [downloaded from the EasyRdf website]:http ://www.easyrdf.org/downloads106 [GraphViz]:http ://www.graphviz.org/125 [ARC2]:https://github.com/semsol/arc2/ 126 [BSD-3-Clause]:https://www.opensource.org/licenses/BSD-3-Clause 127 [downloaded from the EasyRdf website]:https://www.easyrdf.org/downloads 128 [GraphViz]:https://www.graphviz.org/ 107 129 [rapper]:http://librdf.org/raptor/rapper.html 108 [RDF]:http://en.wikipedia.org/wiki/Resource_Description_Framework 109 [Redland Bindings]:http://librdf.org/bindings/ 110 [SPARQL 1.1 query language]:http://www.w3.org/TR/sparql11-query/ 111 [UNLICENSE]:http://unlicense.org/ 112 [Zend_Http_Client]:http://framework.zend.com/manual/en/zend.http.client.html 130 [RDF]:https://en.wikipedia.org/wiki/Resource_Description_Framework 131 [SPARQL 1.1 query language]:https://www.w3.org/TR/sparql11-query/ 132 [UNLICENSE]:https://unlicense.org/ 133 [`Zend\Http\Client`]:https://docs.zendframework.com/zend-http/client/intro/ -
wp-linked-data/trunk/vendor/easyrdf/easyrdf/composer.json
r2177822 r2921855 2 2 "name": "easyrdf/easyrdf", 3 3 "description": "EasyRdf is a PHP library designed to make it easy to consume and produce RDF.", 4 "version": "0.9.1",5 4 "type": "library", 6 5 "keywords": ["RDF", "Semantic Web", "Linked Data", "Turtle", "RDFa", "SPARQL"], … … 17 16 "name": "Alexey Zakhlestin", 18 17 "email": "indeyets@gmail.com", 18 "homepage": "http://indeyets.ru/", 19 19 "role": "Developer" 20 20 } … … 22 22 "support": { 23 23 "forum": "http://groups.google.com/group/easyrdf/", 24 "issues": "http://github.com/njh/easyrdf/issues", 25 "irc": "irc://chat.freenode.net/easyrdf" 24 "issues": "http://github.com/easyrdf/easyrdf/issues" 26 25 }, 27 26 "require": { 28 "php": ">=5.2.8", 27 "php": ">=7.1.0", 28 "ext-dom" : "*", 29 29 "ext-mbstring": "*", 30 "ext-pcre": "*" 30 "ext-pcre": "*", 31 "ext-xmlreader" : "*", 32 "lib-libxml" : "*" 31 33 }, 32 34 "suggest": { 33 "ml/json-ld": "~1.0" 35 "ml/json-ld": "~1.0", 36 "semsol/arc2": "~2.2" 34 37 }, 35 38 "require-dev": { 36 "phpunit/PHPUnit": "~3.5", 37 "squizlabs/php_codesniffer": "~1.4.3", 38 "sami/sami": "~1.4" 39 "ml/json-ld": "~1.0", 40 "phpunit/phpunit": "^7", 41 "code-lts/doctum": "^5", 42 "semsol/arc2": "^2.4", 43 "squizlabs/php_codesniffer": "3.*", 44 "zendframework/zend-http": "~2.3" 39 45 }, 40 46 "autoload": { 41 "psr-0": { "EasyRdf_": "lib/" } 47 "psr-4": { 48 "EasyRdf\\": "lib" 49 } 42 50 } 43 51 } -
wp-linked-data/trunk/vendor/easyrdf/easyrdf/doap.php
r2177822 r2921855 1 1 <?php 2 require_once "vendor/autoload.php";2 require_once __DIR__."/vendor/autoload.php"; 3 3 4 4 // Load some properties from the composer file … … 6 6 7 7 // Start building up a RDF graph 8 $doap = new EasyRdf_Graph($composer->homepage.'doap.rdf');8 $doap = new \EasyRdf\Graph($composer->homepage.'doap.rdf'); 9 9 $easyrdf = $doap->resource('#easyrdf', 'doap:Project', 'foaf:Project'); 10 10 $easyrdf->addLiteral('doap:name', 'EasyRDF'); … … 21 21 ); 22 22 $easyrdf->addResource('doap:license', 'http://usefulinc.com/doap/licenses/bsd'); 23 $easyrdf->addResource('doap:download-page', 'http://github.com/njh/easyrdf/downloads'); 24 $easyrdf->addResource('doap:download-page', 'http://github.com/njh/easyrdf/downloads'); 25 $easyrdf->addResource('doap:bug-database', 'http://github.com/njh/easyrdf/issues'); 23 $easyrdf->addResource('doap:download-page', 'http://github.com/easyrdf/easyrdf/downloads'); 24 $easyrdf->addResource('doap:bug-database', 'http://github.com/easyrdf/easyrdf/issues'); 26 25 $easyrdf->addResource('doap:mailing-list', 'http://groups.google.com/group/easyrdf'); 27 26 … … 32 31 33 32 $repository = $doap->newBNode('doap:GitRepository'); 34 $repository->addResource('doap:browse', 'http://github.com/ njh/easyrdf');35 $repository->addResource('doap:location', 'git://github.com/ njh/easyrdf.git');33 $repository->addResource('doap:browse', 'http://github.com/easyrdf/easyrdf'); 34 $repository->addResource('doap:location', 'git://github.com/easyrdf/easyrdf.git'); 36 35 $easyrdf->addResource('doap:repository', $repository); 37 36 -
wp-linked-data/trunk/vendor/easyrdf/easyrdf/scripts/copyright_updater.php
r2177822 r2921855 12 12 if (preg_match("/^(.+)Copyright\s+\(c\)\s+(\d+)-?(\d*) (Nicholas.+)$/", $line, $m)) { 13 13 $copy_statements++; 14 14 15 15 if ($m[2] != $year and $m[3] != $year) { 16 16 // Change the line … … 18 18 } 19 19 } 20 20 21 21 // Remove trailing whitespace 22 22 $line = rtrim($line); 23 23 $output .= "$line\n"; 24 24 } 25 25 26 26 // Remove surplus line endings 27 27 while (substr($output, -2) == "\n\n") { … … 39 39 function process_directory($path) { 40 40 $dir = opendir($path); 41 41 42 42 while ($file = readdir($dir)) { 43 43 if (substr($file, 0, 1) == '.') { … … 56 56 } 57 57 } 58 59 closedir($dir); 58 59 closedir($dir); 60 60 } 61 61 -
wp-linked-data/trunk/vendor/ml/json-ld/FileGetContentsLoader.php
r2177822 r2921855 54 54 $remoteDocument->mediaType = null; 55 55 56 $httpHeadersOffset = count($http_response_header);56 $httpHeadersOffset = isset($http_response_header) ? count($http_response_header) : 0; 57 57 } 58 58 } … … 78 78 } 79 79 80 $linkHeaderValues = $this->parse ContextLinkHeaders($linkHeaderValues, new IRI($url));80 $linkHeaderValues = $this->parseLinkHeaders($linkHeaderValues, new IRI($url)); 81 81 82 if (count($linkHeaderValues) === 1) { 83 $remoteDocument->contextUrl = reset($linkHeaderValues); 84 } elseif (count($linkHeaderValues) > 1) { 82 $contextLinkHeaders = array_filter($linkHeaderValues, function ($link) { 83 return (isset($link['rel']) 84 && in_array('http://www.w3.org/ns/json-ld#context', explode(' ', $link['rel']))); 85 }); 86 87 if (count($contextLinkHeaders) === 1) { 88 $remoteDocument->contextUrl = $contextLinkHeaders[0]['uri']; 89 } elseif (count($contextLinkHeaders) > 1) { 85 90 throw new JsonLdException( 86 91 JsonLdException::MULTIPLE_CONTEXT_LINK_HEADERS, … … 101 106 if ('application/ld+json' === $remoteDocument->mediaType) { 102 107 $remoteDocument->contextUrl = null; 103 } elseif (('application/json' !== $remoteDocument->mediaType) && 104 (0 !== substr_compare($remoteDocument->mediaType, '+json', -5))) { 105 throw new JsonLdException( 106 JsonLdException::LOADING_DOCUMENT_FAILED, 107 'Invalid media type', 108 $remoteDocument->mediaType 109 ); 108 } else { 109 // If the Media type was not as expected, check to see if the desired content type 110 // is being offered in a Link header (this is what schema.org now does). 111 $altLinkHeaders = array_filter($linkHeaderValues, function ($link) { 112 return (isset($link['rel']) && isset($link['type']) 113 && ($link['rel'] === 'alternate') && ($link['type'] === 'application/ld+json')); 114 }); 115 116 // The spec states 'A response MUST NOT contain more than one HTTP Link Header 117 // using the alternate link relation with type="application/ld+json"' 118 if (count($altLinkHeaders) === 1) { 119 return $this->loadDocument($altLinkHeaders[0]['uri']); 120 } elseif (count($altLinkHeaders) > 1) { 121 throw new JsonLdException( 122 JsonLdException::LOADING_DOCUMENT_FAILED, 123 'Received multiple alternate link headers' 124 ); 125 } 126 127 if (('application/json' !== $remoteDocument->mediaType) && 128 (0 !== substr_compare($remoteDocument->mediaType, '+json', -5))) { 129 throw new JsonLdException( 130 JsonLdException::LOADING_DOCUMENT_FAILED, 131 'Invalid media type', 132 $remoteDocument->mediaType 133 ); 134 } 110 135 } 111 136 } … … 122 147 * Parse HTTP Link headers 123 148 * 124 * @param array $values An array of HTTP Link header values125 * @param IRI $baseIri The document's URL (used to expand relative URLs to absolutes)149 * @param array $values An array of HTTP Link headers. 150 * @param IRI $baseIri The document's URL (used to expand relative URLs to absolutes). 126 151 * 127 * @return array An array of parsed HTTP Link headers 152 * @return array A structured representation of the Link header values. 153 * 154 * @internal Do not use this method directly, it's only temporarily accessible for testing. 128 155 */ 129 p rivate function parseContextLinkHeaders(array $values, IRI $baseIri)156 public function parseLinkHeaders(array $values, IRI $baseIri) 130 157 { 131 158 // Separate multiple links contained in a single header value … … 145 172 146 173 // Split the header in key-value pairs 174 $result = array(); 175 147 176 foreach ($values as $val) { 148 177 $part = array(); 178 149 179 foreach (preg_split('/;(?=([^"]*"[^"]*")*[^"]*$)/', $val) as $kvp) { 150 180 preg_match_all('/<[^>]+>|[^=]+/', $kvp, $matches); 151 181 $pieces = array_map($trimWhitespaceCallback, $matches[0]); 152 $part[$pieces[0]] = isset($pieces[1]) ? $pieces[1] : ''; 182 183 if (count($pieces) > 1) { 184 $part[$pieces[0]] = $pieces[1]; 185 } elseif (count($pieces) === 1) { 186 $part['uri'] = (string) $baseIri->resolve(trim($pieces[0], '<> ')); 187 } 153 188 } 154 189 155 if ( in_array('http://www.w3.org/ns/json-ld#context', explode(' ', $part['rel']))) {156 $ contexts[] = (string) $baseIri->resolve(trim(key($part), '<> '));190 if (!empty($part)) { 191 $result[] = $part; 157 192 } 158 193 } 159 194 160 return array_values(array_unique($contexts));195 return $result; 161 196 } 162 197 } -
wp-linked-data/trunk/vendor/ml/json-ld/NQuads.php
r2177822 r2921855 42 42 : '<' . $quad->getObject() . '>'; 43 43 } else { 44 $result .= '"' . $quad->getObject()->getValue() . '"'; 44 $result .= '"' . str_replace( 45 array("\n", '"'), 46 array('\n', '\"'), 47 $quad->getObject()->getValue()) . '"'; 45 48 $result .= ($quad->getObject() instanceof TypedValue) 46 49 ? (RdfConstants::XSD_STRING === $quad->getObject()->getType()) … … 76 79 // define partial regexes 77 80 $iri = '(?:<([^>]*)>)'; 78 $bnode = '(_:(?:[A-Za-z0-9]+))'; 81 82 // blank node labels based on https://www.w3.org/TR/n-quads/#BNodes 83 $bnode = '(_:(?:[A-Za-z0-9_]|[A-Za-z0-9_][A-Za-z0-9_\-.]*[A-Za-z0-9_\-]))'; 84 79 85 $plain = '"([^"\\\\]*(?:\\\\.[^"\\\\]*)*)"'; 80 86 $datatype = "\\^\\^$iri"; -
wp-linked-data/trunk/vendor/ml/json-ld/README.md
r2177822 r2921855 1 JsonLD [](http://travis-ci.org/lanthaler/JsonLD)1 JsonLD [](https://github.com/lanthaler/JsonLD/actions/workflows/ci.yaml) 2 2 ============== 3 3 -
wp-linked-data/trunk/vendor/ml/json-ld/Test/NQuadsTest.php
r2177822 r2921855 10 10 namespace ML\JsonLD\Test; 11 11 12 use ML\JsonLD\JsonLD; 12 13 use ML\JsonLD\NQuads; 13 14 … … 20 21 { 21 22 /** 22 * Tests th e expansion API23 * Tests that parsing an invalid NQuad file fails 23 24 * 24 25 * @expectedException \ML\JsonLD\Exception\InvalidQuadException … … 29 30 $nquads->parse('Invalid NQuads file'); 30 31 } 32 33 /** 34 * Tests escaping 35 */ 36 public function testEscaping() 37 { 38 $doc = '<http://example.com>'; 39 $doc .= ' <http://schema.org/description>'; 40 $doc .= ' "String with line-break \n and quote (\")" .'; 41 $doc .= "\n"; 42 43 $nquads = new NQuads(); 44 $parsed = JsonLD::fromRdf($nquads->parse($doc)); 45 $serialized = $nquads->serialize(JsonLD::toRdf($parsed)); 46 47 $this->assertSame($doc, $serialized); 48 } 49 50 /** 51 * Tests blank node label parsing 52 */ 53 public function testParseBlankNodes() 54 { 55 $nquads = new NQuads(); 56 57 $this->assertNotEmpty($nquads->parse('_:b <http://ex/1> "Test" .'), 'just a letter'); 58 59 $this->assertNotEmpty($nquads->parse('_:b1 <http://ex/1> "Test" .'), 'letter and number'); 60 61 $this->assertNotEmpty($nquads->parse('_:_b1 <http://ex/1> "Test" .'), 'beginning _'); 62 63 $this->assertNotEmpty($nquads->parse('_:b_1 <http://ex/1> "Test" .'), 'containing _'); 64 65 $this->assertNotEmpty($nquads->parse('_:b1_ <http://ex/1> "Test" .'), 'ending _'); 66 67 $this->assertNotEmpty($nquads->parse('_:b-1 <http://ex/1> "Test" .'), 'containing -'); 68 69 $this->assertNotEmpty($nquads->parse('_:b-1 <http://ex/1> "Test" .'), 'ending -'); 70 71 $this->assertNotEmpty($nquads->parse('_:b.1 <http://ex/1> "Test" .'), 'containing .'); 72 } 73 74 /** 75 * Tests that parsing fails for blank node labels beginning with "-" 76 * 77 * @expectedException \ML\JsonLD\Exception\InvalidQuadException 78 */ 79 public function testParseBlankNodeDashAtTheBeginning() 80 { 81 $nquads = new NQuads(); 82 $nquads->parse('_:-b1 <http://ex/1> "Test" .'); 83 } 84 85 /** 86 * Tests that parsing fails for blank node labels beginning with "." 87 * 88 * @expectedException \ML\JsonLD\Exception\InvalidQuadException 89 */ 90 public function testParseBlankNodePeriodAtTheBeginning() 91 { 92 $nquads = new NQuads(); 93 $nquads->parse('_:.b1 <http://ex/1> "Test" .'); 94 } 95 96 /** 97 * Tests that parsing fails for blank node labels ending with "." 98 * 99 * @expectedException \ML\JsonLD\Exception\InvalidQuadException 100 */ 101 public function testParseBlankNodePeriodAtTheEnd() 102 { 103 $nquads = new NQuads(); 104 $nquads->parse('_:b1. <http://ex/1> "Test" .'); 105 } 31 106 } -
wp-linked-data/trunk/vendor/willdurand/negotiation/.gitignore
r2177822 r2921855 1 1 /vendor/ 2 2 composer.lock 3 .phpunit.result.cache -
wp-linked-data/trunk/vendor/willdurand/negotiation/README.md
r2177822 r2921855 2 2 =========== 3 3 4 [](http://travis-ci.org/willdurand/Negotiation) 6 [](https://ci.appveyor.com/project/willdurand/negotiation) 4 [](https://github.com/willdurand/Negotiation/actions?query=workflow%3A%22ci%22+branch%3Amaster) 8 5 [](https://packagist.org/packages/willdurand/Negotiation) 10 7 [](https://packagist.org/packages/willdurand/Negotiation) 12 13 9 14 10 **Negotiation** is a standalone library without any dependencies that allows you … … 19 15 extensively unit tested! 20 16 21 > **Important:** You are browsing the documentation of Negotiation **2.x**. 22 Documentation for version **1.x** is available here: [Negotiation 1.x 23 documentation](https://github.com/willdurand/Negotiation/blob/1.x/README.md#usage). 24 You might also be interested in this: [**What's new in Negotiation 2?**](https://github.com/willdurand/Negotiation/releases/tag/v2.0.0-alpha1) 17 > **Important:** You are browsing the documentation of Negotiation **3.x**+. 18 > 19 > Documentation for version **1.x** is available here: [Negotiation 1.x 20 > documentation](https://github.com/willdurand/Negotiation/blob/1.x/README.md#usage). 21 > 22 > Documentation for version **2.x** is available here: [Negotiation 2.x 23 > documentation](https://github.com/willdurand/Negotiation/blob/2.x/README.md#usage). 25 24 26 25 … … 63 62 $negotiator = new \Negotiation\LanguageNegotiator(); 64 63 65 $acceptLang ageHeader = 'en; q=0.1, fr; q=0.4, fu; q=0.9, de; q=0.2';64 $acceptLanguageHeader = 'en; q=0.1, fr; q=0.4, fu; q=0.9, de; q=0.2'; 66 65 $priorities = array('de', 'fu', 'en'); 67 66 68 $bestLanguage = $negotiator->getBest($acceptLang ageHeader, $priorities);67 $bestLanguage = $negotiator->getBest($acceptLanguageHeader, $priorities); 69 68 70 69 $type = $bestLanguage->getType(); … … 96 95 97 96 $acceptCharsetHeader = 'ISO-8859-1, UTF-8; q=0.9'; 98 $priorities = array('iso-8859-1;q=0.3', 'utf-8;q=0.9', 'utf-16;q=1.0'); 97 $priorities = array('iso-8859-1;q=0.3', 'utf-8;q=0.9', 'utf-16;q=1.0'); 99 98 100 99 $bestCharset = $negotiator->getBest($acceptCharsetHeader, $priorities); … … 125 124 126 125 126 Versioning 127 ---------- 128 129 Negotiation follows [Semantic Versioning](http://semver.org/). 130 131 ### End Of Life 132 133 #### 1.x 134 135 As of October 2016, [branch 136 `1.x`](https://github.com/willdurand/Negotiation/tree/1.x) is not supported 137 anymore, meaning major version `1` reached end of life. Last version is: 138 [1.5.0](https://github.com/willdurand/Negotiation/releases/tag/1.5.0). 139 140 #### 2.x 141 142 As of November 2020, [branch 143 `2.x`](https://github.com/willdurand/Negotiation/tree/2.x) is not supported 144 anymore, meaning major version `2` reached end of life. Last version is: 145 [2.3.1](https://github.com/willdurand/Negotiation/releases/tag/v2.3.1). 146 147 ### Stable Version 148 149 #### 3.x (and `dev-master`) 150 151 Negotiation [3.0](https://github.com/willdurand/Negotiation/releases/tag/3.0.0) 152 has been released on November 26th, 2020. This is the **current stable version** 153 and it is in sync with the main branch (a.k.a. `master`). 154 127 155 Unit Tests 128 156 ---------- … … 152 180 * [PEAR HTTP2](https://github.com/pear/HTTP2). 153 181 154 * William Durand <will+git@drnd.me>182 * [William Durand](https://github.com/willdurand) 155 183 * [@neural-wetware](https://github.com/neural-wetware) 156 184 -
wp-linked-data/trunk/vendor/willdurand/negotiation/composer.json
r2177822 r2921855 12 12 ], 13 13 "require": { 14 "php": ">= 5.4.0"14 "php": ">=7.1.0" 15 15 }, 16 16 "autoload": { 17 17 "psr-4": { "Negotiation\\": "src/Negotiation" } 18 18 }, 19 "autoload-dev": { 20 "psr-4": { "Negotiation\\Tests\\": "tests/Negotiation/Tests" } 21 }, 19 22 "extra": { 20 23 "branch-alias": { 21 "dev-master": " 2.3-dev"24 "dev-master": "3.0-dev" 22 25 } 23 26 }, 24 27 "require-dev": { 25 " phpunit/phpunit": "~4.5"28 "symfony/phpunit-bridge": "^5.0" 26 29 } 27 30 } -
wp-linked-data/trunk/vendor/willdurand/negotiation/phpunit.xml.dist
r2177822 r2921855 1 1 <?xml version="1.0" encoding="UTF-8"?> 2 <phpunit backupGlobals="false" 2 <phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd" 3 backupGlobals="false" 3 4 backupStaticAttributes="false" 4 5 colors="true" … … 8 9 processIsolation="false" 9 10 stopOnFailure="false" 10 syntaxCheck="false"11 11 bootstrap="tests/bootstrap.php" 12 12 > … … 16 16 </testsuite> 17 17 </testsuites> 18 < filter>19 < whitelist>18 <coverage> 19 <include> 20 20 <directory>./src/Negotiation/</directory> 21 </ whitelist>22 </ filter>21 </include> 22 </coverage> 23 23 </phpunit> -
wp-linked-data/trunk/vendor/willdurand/negotiation/src/Negotiation/AbstractNegotiator.php
r2177822 r2921855 14 14 * @return AcceptHeader|null best matching type 15 15 */ 16 public function getBest($header, array $priorities )16 public function getBest($header, array $priorities, $strict = false) 17 17 { 18 18 if (empty($priorities)) { … … 34 34 $acceptedHeaders[] = $this->acceptFactory($h); 35 35 } catch (Exception\Exception $e) { 36 // silently skip in case of invalid headers coming in from a client 36 if ($strict) { 37 throw $e; 38 } 37 39 } 38 40 } … … 42 44 } 43 45 $matches = $this->findMatches($acceptedHeaders, $acceptedPriorities); 44 $specificMatches = array_reduce($matches, 'Negotiation\ Match::reduce', []);46 $specificMatches = array_reduce($matches, 'Negotiation\AcceptMatch::reduce', []); 45 47 46 usort($specificMatches, 'Negotiation\ Match::compare');48 usort($specificMatches, 'Negotiation\AcceptMatch::compare'); 47 49 48 50 $match = array_shift($specificMatches); 49 51 50 52 return null === $match ? null : $acceptedPriorities[$match->index]; 53 } 54 55 /** 56 * @param string $header A string containing an `Accept|Accept-*` header. 57 * 58 * @return AcceptHeader[] An ordered list of accept header elements 59 */ 60 public function getOrderedElements($header) 61 { 62 if (!$header) { 63 throw new InvalidArgument('The header string should not be empty.'); 64 } 65 66 $elements = array(); 67 $orderKeys = array(); 68 foreach ($this->parseHeader($header) as $key => $h) { 69 try { 70 $element = $this->acceptFactory($h); 71 $elements[] = $element; 72 $orderKeys[] = [$element->getQuality(), $key, $element->getValue()]; 73 } catch (Exception\Exception $e) { 74 // silently skip in case of invalid headers coming in from a client 75 } 76 } 77 78 // sort based on quality and then original order. This is necessary as 79 // to ensure that the first in the list for two items with the same 80 // quality stays in that order in both PHP5 and PHP7. 81 uasort($orderKeys, function ($a, $b) { 82 $qA = $a[0]; 83 $qB = $b[0]; 84 85 if ($qA == $qB) { 86 return $a[1] <=> $b[1]; 87 } 88 89 return ($qA > $qB) ? -1 : 1; 90 }); 91 92 $orderedElements = []; 93 foreach ($orderKeys as $key) { 94 $orderedElements[] = $elements[$key[1]]; 95 } 96 97 return $orderedElements; 51 98 } 52 99 … … 63 110 * @param integer $index 64 111 * 65 * @return Match|null Headers matched112 * @return AcceptMatch|null Headers matched 66 113 */ 67 114 protected function match(AcceptHeader $header, AcceptHeader $priority, $index) … … 75 122 $score = 1 * $equal; 76 123 77 return new Match($header->getQuality() * $priority->getQuality(), $score, $index);124 return new AcceptMatch($header->getQuality() * $priority->getQuality(), $score, $index); 78 125 } 79 126 … … 101 148 * @param Priority[] $priorities Configured priorities 102 149 * 103 * @return Match[] Headers matched150 * @return AcceptMatch[] Headers matched 104 151 */ 105 152 private function findMatches(array $headerParts, array $priorities) -
wp-linked-data/trunk/vendor/willdurand/negotiation/src/Negotiation/BaseAccept.php
r2177822 r2921855 113 113 /** 114 114 * 115 * @param string $acceptPart115 * @param string|null $acceptPart 116 116 * @return array 117 117 */ 118 118 private function parseParameters($acceptPart) 119 119 { 120 if ($acceptPart === null) { 121 return ['', []]; 122 } 123 120 124 $parts = explode(';', $acceptPart); 121 125 $type = array_shift($parts); -
wp-linked-data/trunk/vendor/willdurand/negotiation/src/Negotiation/LanguageNegotiator.php
r2177822 r2921855 28 28 $ps = $priority->getSubPart(); 29 29 30 $baseEqual = !strcasecmp( $ab,$pb);31 $subEqual = !strcasecmp( $as,$ps);30 $baseEqual = !strcasecmp((string)$ab, (string)$pb); 31 $subEqual = !strcasecmp((string)$as, (string)$ps); 32 32 33 if (($ab == '*' || $baseEqual) && ($as === null || $subEqual )) {33 if (($ab == '*' || $baseEqual) && ($as === null || $subEqual || null === $ps)) { 34 34 $score = 10 * $baseEqual + $subEqual; 35 35 36 return new Match($acceptLanguage->getQuality() * $priority->getQuality(), $score, $index);36 return new AcceptMatch($acceptLanguage->getQuality() * $priority->getQuality(), $score, $index); 37 37 } 38 38 -
wp-linked-data/trunk/vendor/willdurand/negotiation/src/Negotiation/Negotiator.php
r2177822 r2921855 39 39 $score = 100 * $baseEqual + 10 * $subEqual + count($intersection); 40 40 41 return new Match($accept->getQuality() * $priority->getQuality(), $score, $index);41 return new AcceptMatch($accept->getQuality() * $priority->getQuality(), $score, $index); 42 42 } 43 43 … … 66 66 $score = 100 * $baseEqual + 10 * $subEqual + $plusEqual + count($intersection); 67 67 68 return new Match($accept->getQuality() * $priority->getQuality(), $score, $index);68 return new AcceptMatch($accept->getQuality() * $priority->getQuality(), $score, $index); 69 69 } 70 70 -
wp-linked-data/trunk/vendor/willdurand/negotiation/tests/Negotiation/Tests/CharsetNegotiatorTest.php
r2177822 r2921855 13 13 private $negotiator; 14 14 15 protected function setUp() 15 protected function setUp(): void 16 16 { 17 17 $this->negotiator = new CharsetNegotiator(); … … 44 44 { 45 45 if (is_null($expected)) 46 $this-> setExpectedException('Negotiation\Exception\InvalidArgument');46 $this->expectException('Negotiation\Exception\InvalidArgument'); 47 47 48 48 $accept = $this->negotiator->getBest($accept, $priorities); -
wp-linked-data/trunk/vendor/willdurand/negotiation/tests/Negotiation/Tests/EncodingNegotiatorTest.php
r2177822 r2921855 13 13 private $negotiator; 14 14 15 protected function setUp() 15 protected function setUp(): void 16 16 { 17 17 $this->negotiator = new EncodingNegotiator(); -
wp-linked-data/trunk/vendor/willdurand/negotiation/tests/Negotiation/Tests/LanguageNegotiatorTest.php
r2177822 r2921855 14 14 private $negotiator; 15 15 16 protected function setUp() 16 protected function setUp(): void 17 17 { 18 18 $this->negotiator = new LanguageNegotiator(); … … 52 52 # Quality of source factors 53 53 array('en;q=0.5,de', array('de;q=0.3', 'en;q=0.9'), 'en;q=0.9'), 54 # Generic fallback 55 array('fr-FR, en-US;q=0.8', array('fr'), 'fr'), 56 array('fr-FR, en-US;q=0.8', array('fr', 'en-US'), 'fr'), 57 array('fr-FR, en-US;q=0.8', array('fr-CA', 'en'), 'en'), 54 58 ); 55 59 } … … 79 83 ); 80 84 } 85 86 /** 87 * Given a accept header containing specific languages (here 'en-US', 'fr-FR') 88 * And priorities containing a generic version of that language 89 * Then the best language is mapped to the generic one here 'fr' 90 */ 91 public function testSpecificLanguageAreMappedToGeneric() 92 { 93 $acceptLanguageHeader = 'fr-FR, en-US;q=0.8'; 94 $priorities = array('fr'); 95 96 $acceptHeader = $this->negotiator->getBest($acceptLanguageHeader, $priorities); 97 98 $this->assertInstanceOf('Negotiation\AcceptHeader', $acceptHeader); 99 $this->assertEquals('fr', $acceptHeader->getValue()); 100 } 81 101 } -
wp-linked-data/trunk/vendor/willdurand/negotiation/tests/Negotiation/Tests/MatchTest.php
r2177822 r2921855 3 3 namespace Negotiation\Tests; 4 4 5 use Negotiation\ Match;5 use Negotiation\AcceptMatch; 6 6 7 7 class MatchTest extends TestCase … … 12 12 public function testCompare($match1, $match2, $expected) 13 13 { 14 $this->assertEquals($expected, Match::compare($match1, $match2));14 $this->assertEquals($expected, AcceptMatch::compare($match1, $match2)); 15 15 } 16 16 … … 18 18 { 19 19 return array( 20 array(new Match(1.0, 110, 1), newMatch(1.0, 111, 1), 0),21 array(new Match(0.1, 10, 1), newMatch(0.1, 10, 2), -1),22 array(new Match(0.5, 110, 5), newMatch(0.5, 11, 4), 1),23 array(new Match(0.4, 110, 1), newMatch(0.6, 111, 3), 1),24 array(new Match(0.6, 110, 1), newMatch(0.4, 111, 3), -1),20 array(new AcceptMatch(1.0, 110, 1), new AcceptMatch(1.0, 111, 1), 0), 21 array(new AcceptMatch(0.1, 10, 1), new AcceptMatch(0.1, 10, 2), -1), 22 array(new AcceptMatch(0.5, 110, 5), new AcceptMatch(0.5, 11, 4), 1), 23 array(new AcceptMatch(0.4, 110, 1), new AcceptMatch(0.6, 111, 3), 1), 24 array(new AcceptMatch(0.6, 110, 1), new AcceptMatch(0.4, 111, 3), -1), 25 25 ); 26 26 } … … 31 31 public function testReduce($carry, $match, $expected) 32 32 { 33 $this->assertEquals($expected, Match::reduce($carry, $match));33 $this->assertEquals($expected, AcceptMatch::reduce($carry, $match)); 34 34 } 35 35 … … 38 38 return array( 39 39 array( 40 array(1 => new Match(1.0, 10, 1)),41 new Match(0.5, 111, 1),42 array(1 => new Match(0.5, 111, 1)),40 array(1 => new AcceptMatch(1.0, 10, 1)), 41 new AcceptMatch(0.5, 111, 1), 42 array(1 => new AcceptMatch(0.5, 111, 1)), 43 43 ), 44 44 array( 45 array(1 => new Match(1.0, 110, 1)),46 new Match(0.5, 11, 1),47 array(1 => new Match(1.0, 110, 1)),45 array(1 => new AcceptMatch(1.0, 110, 1)), 46 new AcceptMatch(0.5, 11, 1), 47 array(1 => new AcceptMatch(1.0, 110, 1)), 48 48 ), 49 49 array( 50 array(0 => new Match(1.0, 10, 1)),51 new Match(0.5, 111, 1),52 array(0 => new Match(1.0, 10, 1), 1 => newMatch(0.5, 111, 1)),50 array(0 => new AcceptMatch(1.0, 10, 1)), 51 new AcceptMatch(0.5, 111, 1), 52 array(0 => new AcceptMatch(1.0, 10, 1), 1 => new AcceptMatch(0.5, 111, 1)), 53 53 ), 54 54 ); -
wp-linked-data/trunk/vendor/willdurand/negotiation/tests/Negotiation/Tests/NegotiatorTest.php
r2177822 r2921855 7 7 use Negotiation\Negotiator; 8 8 use Negotiation\Accept; 9 use Negotiation\ Match;9 use Negotiation\AcceptMatch; 10 10 11 11 class NegotiatorTest extends TestCase … … 17 17 private $negotiator; 18 18 19 protected function setUp() 19 protected function setUp(): void 20 20 { 21 21 $this->negotiator = new Negotiator(); … … 105 105 } 106 106 107 /** 108 * @dataProvider dataProviderForTestGetOrderedElements 109 */ 110 public function testGetOrderedElements($header, $expected) 111 { 112 try { 113 $elements = $this->negotiator->getOrderedElements($header); 114 } catch (\Exception $e) { 115 $this->assertEquals($expected, $e); 116 117 return; 118 } 119 120 if (empty($elements)) { 121 $this->assertNull($expected); 122 123 return; 124 } 125 126 $this->assertInstanceOf('Negotiation\Accept', $elements[0]); 127 128 foreach ($expected as $key => $item) { 129 $this->assertSame($item, $elements[$key]->getValue()); 130 } 131 } 132 133 public static function dataProviderForTestGetOrderedElements() 134 { 135 return array( 136 // error cases 137 array('', new InvalidArgument('The header string should not be empty.')), 138 array('/qwer', null), 139 140 // first one wins as no quality modifiers 141 array('text/html, text/xml', array('text/html', 'text/xml')), 142 143 // ordered by quality modifier 144 array( 145 'text/html;q=0.3, text/html;q=0.7', 146 array('text/html;q=0.7', 'text/html;q=0.3') 147 ), 148 // ordered by quality modifier - the one with no modifier wins, level not taken into account 149 array( 150 'text/*;q=0.3, text/html;q=0.7, text/html;level=1, text/html;level=2;q=0.4, */*;q=0.5', 151 array('text/html;level=1', 'text/html;q=0.7', '*/*;q=0.5', 'text/html;level=2;q=0.4', 'text/*;q=0.3') 152 ), 153 ); 154 } 155 107 156 public function testGetBestRespectsQualityOfSource() 108 157 { … … 110 159 $this->assertInstanceOf('Negotiation\Accept', $accept); 111 160 $this->assertEquals('text/plain', $accept->getType()); 161 } 162 163 public function testGetBestInvalidMediaType() 164 { 165 $this->expectException(\Negotiation\Exception\InvalidMediaType::class); 166 $header = 'sdlfkj20ff; wdf'; 167 $priorities = array('foo/qwer'); 168 169 $this->negotiator->getBest($header, $priorities, true); 112 170 } 113 171 … … 155 213 array(new Accept('text/html; charset=UTF-8'), new Accept('image/png; foo=bar'), new Accept('application/pdf')), 156 214 array( 157 new Match(1.0, 111, 0),158 new Match(0.7, 111, 1),159 new Match(0.4, 1, 1),215 new AcceptMatch(1.0, 111, 0), 216 new AcceptMatch(0.7, 111, 1), 217 new AcceptMatch(0.4, 1, 1), 160 218 ) 161 219 ), … … 164 222 array(new Accept('text/html; asfd=qwer'), new Accept('image/png'), new Accept('application/pdf')), 165 223 array( 166 new Match(1.0, 110, 0),167 new Match(0.7, 100, 1),224 new AcceptMatch(1.0, 110, 0), 225 new AcceptMatch(0.7, 100, 1), 168 226 ) 169 227 ), … … 172 230 array(new Accept('text/html; level=1'), new Accept('text/html'), new Accept('text/plain'), new Accept('image/jpeg'), new Accept('text/html; level=2'), new Accept('text/html; level=3')), 173 231 array( 174 new Match(0.3, 100, 0),175 new Match(0.7, 110, 0),176 new Match(1.0, 111, 0),177 new Match(0.5, 0, 0),178 new Match(0.3, 100, 1),179 new Match(0.7, 110, 1),180 new Match(0.5, 0, 1),181 new Match(0.3, 100, 2),182 new Match(0.5, 0, 2),183 new Match(0.5, 0, 3),184 new Match(0.3, 100, 4),185 new Match(0.7, 110, 4),186 new Match(0.4, 111, 4),187 new Match(0.5, 0, 4),188 new Match(0.3, 100, 5),189 new Match(0.7, 110, 5),190 new Match(0.5, 0, 5),232 new AcceptMatch(0.3, 100, 0), 233 new AcceptMatch(0.7, 110, 0), 234 new AcceptMatch(1.0, 111, 0), 235 new AcceptMatch(0.5, 0, 0), 236 new AcceptMatch(0.3, 100, 1), 237 new AcceptMatch(0.7, 110, 1), 238 new AcceptMatch(0.5, 0, 1), 239 new AcceptMatch(0.3, 100, 2), 240 new AcceptMatch(0.5, 0, 2), 241 new AcceptMatch(0.5, 0, 3), 242 new AcceptMatch(0.3, 100, 4), 243 new AcceptMatch(0.7, 110, 4), 244 new AcceptMatch(0.4, 111, 4), 245 new AcceptMatch(0.5, 0, 4), 246 new AcceptMatch(0.3, 100, 5), 247 new AcceptMatch(0.7, 110, 5), 248 new AcceptMatch(0.5, 0, 5), 191 249 ) 192 250 ) -
wp-linked-data/trunk/vendor/willdurand/negotiation/tests/Negotiation/Tests/TestCase.php
r2177822 r2921855 3 3 namespace Negotiation\Tests; 4 4 5 abstract class TestCase extends \PHPUnit_Framework_TestCase 5 use PHPUnit\Framework\TestCase as PHPUnitTestCase; 6 7 abstract class TestCase extends PHPUnitTestCase 6 8 { 7 9 protected function call_private_method($class, $method, $object, $params) -
wp-linked-data/trunk/wp-linked-data-initialize.php
r2177822 r2921855 23 23 24 24 private function registerRdfNamespaces () { 25 EasyRdf _Namespace::set ('bio', 'http://purl.org/vocab/bio/0.1/');26 EasyRdf _Namespace::set ('sioct', 'http://rdfs.org/sioc/types#');25 EasyRdf\RdfNamespace::set ('bio', 'http://purl.org/vocab/bio/0.1/'); 26 EasyRdf\RdfNamespace::set ('sioct', 'http://rdfs.org/sioc/types#'); 27 27 } 28 28 -
wp-linked-data/trunk/wp-linked-data.php
r2494951 r2921855 4 4 Plugin URI: http://wordpress.org/extend/plugins/wp-linked-data/ 5 5 Description: Publishing blog contents as linked data 6 Version: 0.5. 36 Version: 0.5.4 7 7 Author: Angelo Veltens 8 8 Author URI: http://angelo.veltens.org/ … … 30 30 class WpLinkedData { 31 31 32 function WpLinkedData($wpLinkedDataInitializer) {32 function __construct ($wpLinkedDataInitializer) { 33 33 register_activation_hook (__FILE__, array(&$this, 'onPluginActivation')); 34 34 if (phpVersionSupported()) {
Note: See TracChangeset
for help on using the changeset viewer.