From 34206ce9c931f2e819b7be2a200cf76a660b88c1 Mon Sep 17 00:00:00 2001 From: Adam Franco Date: Thu, 19 Sep 2024 17:03:24 -0400 Subject: [PATCH 001/173] #47: Add symfony framework structure and remove phpcas. Generated with composer create-project symfony/skeleton:"6.4.*" catalog-symfony then manually merged into the application directory. --- .env | 20 + .gitignore | 10 + bin/console | 21 + composer.json | 60 +- composer.lock | 2451 ++++++++++++++++++++++++--- config/bundles.php | 5 + config/packages/cache.yaml | 19 + config/packages/framework.yaml | 24 + config/packages/http_discovery.yaml | 10 + config/packages/routing.yaml | 12 + config/preload.php | 5 + config/routes.yaml | 5 + config/routes/framework.yaml | 4 + config/services.yaml | 24 + public/index.php | 9 + src/Controller/.gitignore | 0 src/Kernel.php | 11 + symfony.lock | 79 + 18 files changed, 2510 insertions(+), 259 deletions(-) create mode 100644 .env create mode 100644 bin/console create mode 100644 config/bundles.php create mode 100644 config/packages/cache.yaml create mode 100644 config/packages/framework.yaml create mode 100644 config/packages/http_discovery.yaml create mode 100644 config/packages/routing.yaml create mode 100644 config/preload.php create mode 100644 config/routes.yaml create mode 100644 config/routes/framework.yaml create mode 100644 config/services.yaml create mode 100644 public/index.php create mode 100644 src/Controller/.gitignore create mode 100644 src/Kernel.php create mode 100644 symfony.lock diff --git a/.env b/.env new file mode 100644 index 00000000..eb5b0b14 --- /dev/null +++ b/.env @@ -0,0 +1,20 @@ +# In all environments, the following files are loaded if they exist, +# the latter taking precedence over the former: +# +# * .env contains default values for the environment variables needed by the app +# * .env.local uncommitted file with local overrides +# * .env.$APP_ENV committed environment-specific defaults +# * .env.$APP_ENV.local uncommitted environment-specific overrides +# +# Real environment variables win over .env files. +# +# DO NOT DEFINE PRODUCTION SECRETS IN THIS FILE NOR IN ANY OTHER COMMITTED FILES. +# https://symfony.com/doc/current/configuration/secrets.html +# +# Run "composer dump-env prod" to compile .env files for production use (requires symfony/flex >=1.2). +# https://symfony.com/doc/current/best_practices.html#use-environment-variables-for-infrastructure-configuration + +###> symfony/framework-bundle ### +APP_ENV=dev +APP_SECRET=af0c5e8cb62edd2dd690260da18618a2 +###< symfony/framework-bundle ### diff --git a/.gitignore b/.gitignore index 1ac4c29f..92027b3a 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,13 @@ progress.txt vendor/ .phpunit.result.cache .php-cs-fixer.cache + +###> symfony/framework-bundle ### +/.env.local +/.env.local.php +/.env.*.local +/config/secrets/prod/prod.decrypt.private.php +/public/bundles/ +/var/ +/vendor/ +###< symfony/framework-bundle ### diff --git a/bin/console b/bin/console new file mode 100644 index 00000000..d8d530e2 --- /dev/null +++ b/bin/console @@ -0,0 +1,21 @@ +#!/usr/bin/env php +=8.1", + "ext-ctype": "*", + "ext-iconv": "*", "onelogin/php-saml": "^4.2", - "microsoft/microsoft-graph": "^2.12" + "microsoft/microsoft-graph": "^2.12", + "symfony/console": "6.4.*", + "symfony/dotenv": "6.4.*", + "symfony/flex": "^2", + "symfony/framework-bundle": "6.4.*", + "symfony/runtime": "6.4.*", + "symfony/yaml": "6.4.*" + }, + "require-dev": { }, "config": { "allow-plugins": { - "php-http/discovery": true + "php-http/discovery": true, + "symfony/flex": true, + "symfony/runtime": true + }, + "sort-packages": true + }, + "autoload": { + "psr-4": { + "App\\": "src/" + } + }, + "autoload-dev": { + "psr-4": { + "App\\Tests\\": "tests/" + } + }, + "replace": { + "symfony/polyfill-ctype": "*", + "symfony/polyfill-iconv": "*", + "symfony/polyfill-php72": "*", + "symfony/polyfill-php73": "*", + "symfony/polyfill-php74": "*", + "symfony/polyfill-php80": "*", + "symfony/polyfill-php81": "*" + }, + "scripts": { + "auto-scripts": { + "cache:clear": "symfony-cmd", + "assets:install %PUBLIC_DIR%": "symfony-cmd" + }, + "post-install-cmd": [ + "@auto-scripts" + ], + "post-update-cmd": [ + "@auto-scripts" + ] + }, + "conflict": { + "symfony/symfony": "*" + }, + "extra": { + "symfony": { + "allow-contrib": false, + "require": "6.4.*" } } } diff --git a/composer.lock b/composer.lock index 7f2c2233..ef7c151c 100644 --- a/composer.lock +++ b/composer.lock @@ -4,79 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "1270962f00552945670e2e690a9a2bf9", + "content-hash": "61fab6c025a173671a288e10c9d8ba16", "packages": [ - { - "name": "apereo/phpcas", - "version": "1.6.1", - "source": { - "type": "git", - "url": "https://github.com/apereo/phpCAS.git", - "reference": "c129708154852656aabb13d8606cd5b12dbbabac" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/apereo/phpCAS/zipball/c129708154852656aabb13d8606cd5b12dbbabac", - "reference": "c129708154852656aabb13d8606cd5b12dbbabac", - "shasum": "" - }, - "require": { - "ext-curl": "*", - "ext-dom": "*", - "php": ">=7.1.0", - "psr/log": "^1.0 || ^2.0 || ^3.0" - }, - "require-dev": { - "monolog/monolog": "^1.0.0 || ^2.0.0", - "phpstan/phpstan": "^1.5", - "phpunit/phpunit": ">=7.5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3.x-dev" - } - }, - "autoload": { - "files": [ - "source/CAS.php" - ], - "classmap": [ - "source/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "authors": [ - { - "name": "Joachim Fritschi", - "email": "jfritschi@freenet.de", - "homepage": "https://github.com/jfritschi" - }, - { - "name": "Adam Franco", - "homepage": "https://github.com/adamfranco" - }, - { - "name": "Henry Pan", - "homepage": "https://github.com/phy25" - } - ], - "description": "Provides a simple API for authenticating users against a CAS server", - "homepage": "https://wiki.jasig.org/display/CASC/phpCAS", - "keywords": [ - "apereo", - "cas", - "jasig" - ], - "support": { - "issues": "https://github.com/apereo/phpCAS/issues", - "source": "https://github.com/apereo/phpCAS/tree/1.6.1" - }, - "time": "2023-02-19T19:52:35+00:00" - }, { "name": "brick/math", "version": "0.12.1", @@ -139,16 +68,16 @@ }, { "name": "doctrine/annotations", - "version": "2.0.1", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/doctrine/annotations.git", - "reference": "e157ef3f3124bbf6fe7ce0ffd109e8a8ef284e7f" + "reference": "901c2ee5d26eb64ff43c47976e114bf00843acf7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/e157ef3f3124bbf6fe7ce0ffd109e8a8ef284e7f", - "reference": "e157ef3f3124bbf6fe7ce0ffd109e8a8ef284e7f", + "url": "https://api.github.com/repos/doctrine/annotations/zipball/901c2ee5d26eb64ff43c47976e114bf00843acf7", + "reference": "901c2ee5d26eb64ff43c47976e114bf00843acf7", "shasum": "" }, "require": { @@ -160,10 +89,10 @@ "require-dev": { "doctrine/cache": "^2.0", "doctrine/coding-standard": "^10", - "phpstan/phpstan": "^1.8.0", + "phpstan/phpstan": "^1.10.28", "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "symfony/cache": "^5.4 || ^6", - "vimeo/psalm": "^4.10" + "symfony/cache": "^5.4 || ^6.4 || ^7", + "vimeo/psalm": "^4.30 || ^5.14" }, "suggest": { "php": "PHP 8.0 or higher comes with attributes, a native replacement for annotations" @@ -209,9 +138,9 @@ ], "support": { "issues": "https://github.com/doctrine/annotations/issues", - "source": "https://github.com/doctrine/annotations/tree/2.0.1" + "source": "https://github.com/doctrine/annotations/tree/2.0.2" }, - "time": "2023-02-02T22:02:53+00:00" + "time": "2024-09-05T10:17:24+00:00" }, { "name": "doctrine/lexer", @@ -851,16 +780,16 @@ }, { "name": "microsoft/kiota-http-guzzle", - "version": "1.3.0", + "version": "1.3.1", "source": { "type": "git", "url": "https://github.com/microsoft/kiota-http-guzzle-php.git", - "reference": "fc853cf4db8772d677080b8909fc853438a3612a" + "reference": "7ff51aa658c3cf9d421501631e2bf45ced425b65" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/microsoft/kiota-http-guzzle-php/zipball/fc853cf4db8772d677080b8909fc853438a3612a", - "reference": "fc853cf4db8772d677080b8909fc853438a3612a", + "url": "https://api.github.com/repos/microsoft/kiota-http-guzzle-php/zipball/7ff51aa658c3cf9d421501631e2bf45ced425b65", + "reference": "7ff51aa658c3cf9d421501631e2bf45ced425b65", "shasum": "" }, "require": { @@ -893,9 +822,9 @@ "description": "Kiota HTTP Request Adapter implementation", "support": { "issues": "https://github.com/microsoft/kiota-http-guzzle-php/issues", - "source": "https://github.com/microsoft/kiota-http-guzzle-php/tree/1.3.0" + "source": "https://github.com/microsoft/kiota-http-guzzle-php/tree/1.3.1" }, - "time": "2024-03-12T08:25:57+00:00" + "time": "2024-09-04T11:54:51+00:00" }, { "name": "microsoft/kiota-serialization-form", @@ -948,16 +877,16 @@ }, { "name": "microsoft/kiota-serialization-json", - "version": "1.3.0", + "version": "v1.3.1", "source": { "type": "git", "url": "https://github.com/microsoft/kiota-serialization-json-php.git", - "reference": "1e7b71b2814fa90fde2b0b6e7db36ebb5ec01b13" + "reference": "85f7fdba1ad5b3adcb5bccdabfbada44e82af7f6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/microsoft/kiota-serialization-json-php/zipball/1e7b71b2814fa90fde2b0b6e7db36ebb5ec01b13", - "reference": "1e7b71b2814fa90fde2b0b6e7db36ebb5ec01b13", + "url": "https://api.github.com/repos/microsoft/kiota-serialization-json-php/zipball/85f7fdba1ad5b3adcb5bccdabfbada44e82af7f6", + "reference": "85f7fdba1ad5b3adcb5bccdabfbada44e82af7f6", "shasum": "" }, "require": { @@ -991,9 +920,9 @@ "description": "Implementation of Kiota serialization abstractions using Json.", "support": { "issues": "https://github.com/microsoft/kiota-serialization-json-php/issues", - "source": "https://github.com/microsoft/kiota-serialization-json-php/tree/1.3.0" + "source": "https://github.com/microsoft/kiota-serialization-json-php/tree/v1.3.1" }, - "time": "2024-06-04T13:27:38+00:00" + "time": "2024-09-16T17:45:09+00:00" }, { "name": "microsoft/kiota-serialization-multipart", @@ -1092,16 +1021,16 @@ }, { "name": "microsoft/microsoft-graph", - "version": "v2.12.0", + "version": "v2.14.0", "source": { "type": "git", "url": "https://github.com/microsoftgraph/msgraph-sdk-php.git", - "reference": "1a5f146a936686b116166682e0dfeab74ef358e6" + "reference": "69182967d397b1a98e68f3888a816141aeabacc0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/microsoftgraph/msgraph-sdk-php/zipball/1a5f146a936686b116166682e0dfeab74ef358e6", - "reference": "1a5f146a936686b116166682e0dfeab74ef358e6", + "url": "https://api.github.com/repos/microsoftgraph/msgraph-sdk-php/zipball/69182967d397b1a98e68f3888a816141aeabacc0", + "reference": "69182967d397b1a98e68f3888a816141aeabacc0", "shasum": "" }, "require": { @@ -1133,9 +1062,9 @@ "homepage": "https://developer.microsoft.com/en-us/graph", "support": { "issues": "https://github.com/microsoftgraph/msgraph-sdk-php/issues", - "source": "https://github.com/microsoftgraph/msgraph-sdk-php/tree/v2.12.0" + "source": "https://github.com/microsoftgraph/msgraph-sdk-php/tree/v2.14.0" }, - "time": "2024-06-04T13:56:43+00:00" + "time": "2024-09-19T07:19:49+00:00" }, { "name": "microsoft/microsoft-graph-core", @@ -1468,16 +1397,16 @@ }, { "name": "open-telemetry/sem-conv", - "version": "1.25.0", + "version": "1.27.1", "source": { "type": "git", "url": "https://github.com/opentelemetry-php/sem-conv.git", - "reference": "23f457ba390847647a17068e0095d9ffe9a4824c" + "reference": "1dba705fea74bc0718d04be26090e3697e56f4e6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/opentelemetry-php/sem-conv/zipball/23f457ba390847647a17068e0095d9ffe9a4824c", - "reference": "23f457ba390847647a17068e0095d9ffe9a4824c", + "url": "https://api.github.com/repos/opentelemetry-php/sem-conv/zipball/1dba705fea74bc0718d04be26090e3697e56f4e6", + "reference": "1dba705fea74bc0718d04be26090e3697e56f4e6", "shasum": "" }, "require": { @@ -1521,7 +1450,7 @@ "issues": "https://github.com/open-telemetry/opentelemetry-php/issues", "source": "https://github.com/open-telemetry/opentelemetry-php" }, - "time": "2024-04-09T23:31:35+00:00" + "time": "2024-08-28T09:20:31+00:00" }, { "name": "paragonie/random_compat", @@ -1753,6 +1682,109 @@ }, "time": "2021-02-03T23:26:27+00:00" }, + { + "name": "psr/container", + "version": "2.0.2", + "source": { + "type": "git", + "url": "https://github.com/php-fig/container.git", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "shasum": "" + }, + "require": { + "php": ">=7.4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Container\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common Container Interface (PHP FIG PSR-11)", + "homepage": "https://github.com/php-fig/container", + "keywords": [ + "PSR-11", + "container", + "container-interface", + "container-interop", + "psr" + ], + "support": { + "issues": "https://github.com/php-fig/container/issues", + "source": "https://github.com/php-fig/container/tree/2.0.2" + }, + "time": "2021-11-05T16:47:00+00:00" + }, + { + "name": "psr/event-dispatcher", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/event-dispatcher.git", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0", + "shasum": "" + }, + "require": { + "php": ">=7.2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\EventDispatcher\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Standard interfaces for event handling.", + "keywords": [ + "events", + "psr", + "psr-14" + ], + "support": { + "issues": "https://github.com/php-fig/event-dispatcher/issues", + "source": "https://github.com/php-fig/event-dispatcher/tree/1.0.0" + }, + "time": "2019-01-08T18:20:26+00:00" + }, { "name": "psr/http-client", "version": "1.0.3", @@ -1915,30 +1947,30 @@ }, { "name": "psr/log", - "version": "1.1.4", + "version": "3.0.2", "source": { "type": "git", "url": "https://github.com/php-fig/log.git", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11" + "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11", + "url": "https://api.github.com/repos/php-fig/log/zipball/f16e1d5863e37f8d8c2a01719f5b34baa2b714d3", + "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": ">=8.0.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1.x-dev" + "dev-master": "3.x-dev" } }, "autoload": { "psr-4": { - "Psr\\Log\\": "Psr/Log/" + "Psr\\Log\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -1959,9 +1991,9 @@ "psr-3" ], "support": { - "source": "https://github.com/php-fig/log/tree/1.1.4" + "source": "https://github.com/php-fig/log/tree/3.0.2" }, - "time": "2021-05-03T11:20:27+00:00" + "time": "2024-09-11T13:17:53+00:00" }, { "name": "ralouphie/getallheaders", @@ -2270,35 +2302,60 @@ "time": "2024-04-18T10:51:20+00:00" }, { - "name": "symfony/deprecation-contracts", - "version": "v3.5.0", + "name": "symfony/cache", + "version": "v6.4.11", "source": { "type": "git", - "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1" + "url": "https://github.com/symfony/cache.git", + "reference": "36daef8fce88fe0b9a4f8cf4c342ced5c05616dc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1", - "reference": "0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1", + "url": "https://api.github.com/repos/symfony/cache/zipball/36daef8fce88fe0b9a4f8cf4c342ced5c05616dc", + "reference": "36daef8fce88fe0b9a4f8cf4c342ced5c05616dc", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.1", + "psr/cache": "^2.0|^3.0", + "psr/log": "^1.1|^2|^3", + "symfony/cache-contracts": "^2.5|^3", + "symfony/service-contracts": "^2.5|^3", + "symfony/var-exporter": "^6.3.6|^7.0" }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "3.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" - } + "conflict": { + "doctrine/dbal": "<2.13.1", + "symfony/dependency-injection": "<5.4", + "symfony/http-kernel": "<5.4", + "symfony/var-dumper": "<5.4" + }, + "provide": { + "psr/cache-implementation": "2.0|3.0", + "psr/simple-cache-implementation": "1.0|2.0|3.0", + "symfony/cache-implementation": "1.1|2.0|3.0" }, + "require-dev": { + "cache/integration-tests": "dev-master", + "doctrine/dbal": "^2.13.1|^3|^4", + "predis/predis": "^1.1|^2.0", + "psr/simple-cache": "^1.0|^2.0|^3.0", + "symfony/config": "^5.4|^6.0|^7.0", + "symfony/dependency-injection": "^5.4|^6.0|^7.0", + "symfony/filesystem": "^5.4|^6.0|^7.0", + "symfony/http-kernel": "^5.4|^6.0|^7.0", + "symfony/messenger": "^5.4|^6.0|^7.0", + "symfony/var-dumper": "^5.4|^6.0|^7.0" + }, + "type": "library", "autoload": { - "files": [ - "function.php" + "psr-4": { + "Symfony\\Component\\Cache\\": "" + }, + "classmap": [ + "Traits/ValueWrapper.php" + ], + "exclude-from-classmap": [ + "/Tests/" ] }, "notification-url": "https://packagist.org/downloads/", @@ -2315,10 +2372,14 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "A generic function and convention to trigger deprecation notices", + "description": "Provides extended PSR-6, PSR-16 (and tags) implementations", "homepage": "https://symfony.com", + "keywords": [ + "caching", + "psr6" + ], "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v3.5.0" + "source": "https://github.com/symfony/cache/tree/v6.4.11" }, "funding": [ { @@ -2334,44 +2395,39 @@ "type": "tidelift" } ], - "time": "2024-04-18T09:32:20+00:00" + "time": "2024-08-05T07:40:31+00:00" }, { - "name": "symfony/polyfill-mbstring", - "version": "v1.30.0", + "name": "symfony/cache-contracts", + "version": "v3.5.0", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "fd22ab50000ef01661e2a31d850ebaa297f8e03c" + "url": "https://github.com/symfony/cache-contracts.git", + "reference": "df6a1a44c890faded49a5fca33c2d5c5fd3c2197" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/fd22ab50000ef01661e2a31d850ebaa297f8e03c", - "reference": "fd22ab50000ef01661e2a31d850ebaa297f8e03c", + "url": "https://api.github.com/repos/symfony/cache-contracts/zipball/df6a1a44c890faded49a5fca33c2d5c5fd3c2197", + "reference": "df6a1a44c890faded49a5fca33c2d5c5fd3c2197", "shasum": "" }, "require": { - "php": ">=7.1" - }, - "provide": { - "ext-mbstring": "*" - }, - "suggest": { - "ext-mbstring": "For best performance" + "php": ">=8.1", + "psr/cache": "^3.0" }, "type": "library", "extra": { + "branch-alias": { + "dev-main": "3.5-dev" + }, "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" } }, "autoload": { - "files": [ - "bootstrap.php" - ], "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" + "Symfony\\Contracts\\Cache\\": "" } }, "notification-url": "https://packagist.org/downloads/", @@ -2388,17 +2444,18 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill for the Mbstring extension", + "description": "Generic abstractions related to caching", "homepage": "https://symfony.com", "keywords": [ - "compatibility", - "mbstring", - "polyfill", - "portable", - "shim" + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.30.0" + "source": "https://github.com/symfony/cache-contracts/tree/v3.5.0" }, "funding": [ { @@ -2414,41 +2471,46 @@ "type": "tidelift" } ], - "time": "2024-06-19T12:30:46+00:00" + "time": "2024-04-18T09:32:20+00:00" }, { - "name": "symfony/polyfill-php80", - "version": "v1.30.0", + "name": "symfony/config", + "version": "v6.4.8", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "77fa7995ac1b21ab60769b7323d600a991a90433" + "url": "https://github.com/symfony/config.git", + "reference": "12e7e52515ce37191b193cf3365903c4f3951e35" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/77fa7995ac1b21ab60769b7323d600a991a90433", - "reference": "77fa7995ac1b21ab60769b7323d600a991a90433", + "url": "https://api.github.com/repos/symfony/config/zipball/12e7e52515ce37191b193cf3365903c4f3951e35", + "reference": "12e7e52515ce37191b193cf3365903c4f3951e35", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=8.1", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/filesystem": "^5.4|^6.0|^7.0", + "symfony/polyfill-ctype": "~1.8" }, - "type": "library", - "extra": { - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } + "conflict": { + "symfony/finder": "<5.4", + "symfony/service-contracts": "<2.5" + }, + "require-dev": { + "symfony/event-dispatcher": "^5.4|^6.0|^7.0", + "symfony/finder": "^5.4|^6.0|^7.0", + "symfony/messenger": "^5.4|^6.0|^7.0", + "symfony/service-contracts": "^2.5|^3", + "symfony/yaml": "^5.4|^6.0|^7.0" }, + "type": "library", "autoload": { - "files": [ - "bootstrap.php" - ], "psr-4": { - "Symfony\\Polyfill\\Php80\\": "" + "Symfony\\Component\\Config\\": "" }, - "classmap": [ - "Resources/stubs" + "exclude-from-classmap": [ + "/Tests/" ] }, "notification-url": "https://packagist.org/downloads/", @@ -2457,28 +2519,18 @@ ], "authors": [ { - "name": "Ion Bazan", - "email": "ion.bazan@gmail.com" - }, - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", + "description": "Helps you find, load, combine, autofill and validate configuration values of any kind", "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.30.0" + "source": "https://github.com/symfony/config/tree/v6.4.8" }, "funding": [ { @@ -2494,41 +2546,59 @@ "type": "tidelift" } ], - "time": "2024-05-31T15:07:36+00:00" + "time": "2024-05-31T14:49:08+00:00" }, { - "name": "symfony/polyfill-php81", - "version": "v1.30.0", + "name": "symfony/console", + "version": "v6.4.11", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-php81.git", - "reference": "3fb075789fb91f9ad9af537c4012d523085bd5af" + "url": "https://github.com/symfony/console.git", + "reference": "42686880adaacdad1835ee8fc2a9ec5b7bd63998" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/3fb075789fb91f9ad9af537c4012d523085bd5af", - "reference": "3fb075789fb91f9ad9af537c4012d523085bd5af", + "url": "https://api.github.com/repos/symfony/console/zipball/42686880adaacdad1835ee8fc2a9ec5b7bd63998", + "reference": "42686880adaacdad1835ee8fc2a9ec5b7bd63998", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=8.1", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/polyfill-mbstring": "~1.0", + "symfony/service-contracts": "^2.5|^3", + "symfony/string": "^5.4|^6.0|^7.0" }, - "type": "library", - "extra": { - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } + "conflict": { + "symfony/dependency-injection": "<5.4", + "symfony/dotenv": "<5.4", + "symfony/event-dispatcher": "<5.4", + "symfony/lock": "<5.4", + "symfony/process": "<5.4" + }, + "provide": { + "psr/log-implementation": "1.0|2.0|3.0" + }, + "require-dev": { + "psr/log": "^1|^2|^3", + "symfony/config": "^5.4|^6.0|^7.0", + "symfony/dependency-injection": "^5.4|^6.0|^7.0", + "symfony/event-dispatcher": "^5.4|^6.0|^7.0", + "symfony/http-foundation": "^6.4|^7.0", + "symfony/http-kernel": "^6.4|^7.0", + "symfony/lock": "^5.4|^6.0|^7.0", + "symfony/messenger": "^5.4|^6.0|^7.0", + "symfony/process": "^5.4|^6.0|^7.0", + "symfony/stopwatch": "^5.4|^6.0|^7.0", + "symfony/var-dumper": "^5.4|^6.0|^7.0" }, + "type": "library", "autoload": { - "files": [ - "bootstrap.php" - ], "psr-4": { - "Symfony\\Polyfill\\Php81\\": "" + "Symfony\\Component\\Console\\": "" }, - "classmap": [ - "Resources/stubs" + "exclude-from-classmap": [ + "/Tests/" ] }, "notification-url": "https://packagist.org/downloads/", @@ -2537,24 +2607,24 @@ ], "authors": [ { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions", + "description": "Eases the creation of beautiful and testable command line interfaces", "homepage": "https://symfony.com", "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" + "cli", + "command-line", + "console", + "terminal" ], "support": { - "source": "https://github.com/symfony/polyfill-php81/tree/v1.30.0" + "source": "https://github.com/symfony/console/tree/v6.4.11" }, "funding": [ { @@ -2570,41 +2640,52 @@ "type": "tidelift" } ], - "time": "2024-06-19T12:30:46+00:00" + "time": "2024-08-15T22:48:29+00:00" }, { - "name": "symfony/polyfill-php82", - "version": "v1.30.0", + "name": "symfony/dependency-injection", + "version": "v6.4.11", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-php82.git", - "reference": "77ff49780f56906788a88974867ed68bc49fae5b" + "url": "https://github.com/symfony/dependency-injection.git", + "reference": "e93c8368dc9915c2fe12018ff22fcbbdd32c9a9e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php82/zipball/77ff49780f56906788a88974867ed68bc49fae5b", - "reference": "77ff49780f56906788a88974867ed68bc49fae5b", + "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/e93c8368dc9915c2fe12018ff22fcbbdd32c9a9e", + "reference": "e93c8368dc9915c2fe12018ff22fcbbdd32c9a9e", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=8.1", + "psr/container": "^1.1|^2.0", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/service-contracts": "^2.5|^3.0", + "symfony/var-exporter": "^6.2.10|^7.0" }, - "type": "library", - "extra": { - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } + "conflict": { + "ext-psr": "<1.1|>=2", + "symfony/config": "<6.1", + "symfony/finder": "<5.4", + "symfony/proxy-manager-bridge": "<6.3", + "symfony/yaml": "<5.4" + }, + "provide": { + "psr/container-implementation": "1.1|2.0", + "symfony/service-implementation": "1.1|2.0|3.0" + }, + "require-dev": { + "symfony/config": "^6.1|^7.0", + "symfony/expression-language": "^5.4|^6.0|^7.0", + "symfony/yaml": "^5.4|^6.0|^7.0" }, + "type": "library", "autoload": { - "files": [ - "bootstrap.php" - ], "psr-4": { - "Symfony\\Polyfill\\Php82\\": "" + "Symfony\\Component\\DependencyInjection\\": "" }, - "classmap": [ - "Resources/stubs" + "exclude-from-classmap": [ + "/Tests/" ] }, "notification-url": "https://packagist.org/downloads/", @@ -2613,24 +2694,1880 @@ ], "authors": [ { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill backporting some PHP 8.2+ features to lower PHP versions", + "description": "Allows you to standardize and centralize the way objects are constructed in your application", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/dependency-injection/tree/v6.4.11" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-08-29T08:15:38+00:00" + }, + { + "name": "symfony/deprecation-contracts", + "version": "v3.5.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1", + "reference": "0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.5-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "files": [ + "function.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "A generic function and convention to trigger deprecation notices", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.5.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-04-18T09:32:20+00:00" + }, + { + "name": "symfony/dotenv", + "version": "v6.4.10", + "source": { + "type": "git", + "url": "https://github.com/symfony/dotenv.git", + "reference": "2ae0c84cc9be0dc1eeb86016970b63c764d8472e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/dotenv/zipball/2ae0c84cc9be0dc1eeb86016970b63c764d8472e", + "reference": "2ae0c84cc9be0dc1eeb86016970b63c764d8472e", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "conflict": { + "symfony/console": "<5.4", + "symfony/process": "<5.4" + }, + "require-dev": { + "symfony/console": "^5.4|^6.0|^7.0", + "symfony/process": "^5.4|^6.0|^7.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Dotenv\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Registers environment variables from a .env file", + "homepage": "https://symfony.com", + "keywords": [ + "dotenv", + "env", + "environment" + ], + "support": { + "source": "https://github.com/symfony/dotenv/tree/v6.4.10" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-07-09T18:29:35+00:00" + }, + { + "name": "symfony/error-handler", + "version": "v6.4.10", + "source": { + "type": "git", + "url": "https://github.com/symfony/error-handler.git", + "reference": "231f1b2ee80f72daa1972f7340297d67439224f0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/231f1b2ee80f72daa1972f7340297d67439224f0", + "reference": "231f1b2ee80f72daa1972f7340297d67439224f0", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "psr/log": "^1|^2|^3", + "symfony/var-dumper": "^5.4|^6.0|^7.0" + }, + "conflict": { + "symfony/deprecation-contracts": "<2.5", + "symfony/http-kernel": "<6.4" + }, + "require-dev": { + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/http-kernel": "^6.4|^7.0", + "symfony/serializer": "^5.4|^6.0|^7.0" + }, + "bin": [ + "Resources/bin/patch-type-declarations" + ], + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\ErrorHandler\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides tools to manage errors and ease debugging PHP code", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/error-handler/tree/v6.4.10" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-07-26T12:30:32+00:00" + }, + { + "name": "symfony/event-dispatcher", + "version": "v6.4.8", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher.git", + "reference": "8d7507f02b06e06815e56bb39aa0128e3806208b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/8d7507f02b06e06815e56bb39aa0128e3806208b", + "reference": "8d7507f02b06e06815e56bb39aa0128e3806208b", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/event-dispatcher-contracts": "^2.5|^3" + }, + "conflict": { + "symfony/dependency-injection": "<5.4", + "symfony/service-contracts": "<2.5" + }, + "provide": { + "psr/event-dispatcher-implementation": "1.0", + "symfony/event-dispatcher-implementation": "2.0|3.0" + }, + "require-dev": { + "psr/log": "^1|^2|^3", + "symfony/config": "^5.4|^6.0|^7.0", + "symfony/dependency-injection": "^5.4|^6.0|^7.0", + "symfony/error-handler": "^5.4|^6.0|^7.0", + "symfony/expression-language": "^5.4|^6.0|^7.0", + "symfony/http-foundation": "^5.4|^6.0|^7.0", + "symfony/service-contracts": "^2.5|^3", + "symfony/stopwatch": "^5.4|^6.0|^7.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\EventDispatcher\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/event-dispatcher/tree/v6.4.8" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-05-31T14:49:08+00:00" + }, + { + "name": "symfony/event-dispatcher-contracts", + "version": "v3.5.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher-contracts.git", + "reference": "8f93aec25d41b72493c6ddff14e916177c9efc50" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/8f93aec25d41b72493c6ddff14e916177c9efc50", + "reference": "8f93aec25d41b72493c6ddff14e916177c9efc50", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "psr/event-dispatcher": "^1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.5-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\EventDispatcher\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Generic abstractions related to dispatching event", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "support": { + "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.5.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-04-18T09:32:20+00:00" + }, + { + "name": "symfony/filesystem", + "version": "v6.4.9", + "source": { + "type": "git", + "url": "https://github.com/symfony/filesystem.git", + "reference": "b51ef8059159330b74a4d52f68e671033c0fe463" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/b51ef8059159330b74a4d52f68e671033c0fe463", + "reference": "b51ef8059159330b74a4d52f68e671033c0fe463", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-mbstring": "~1.8" + }, + "require-dev": { + "symfony/process": "^5.4|^6.4|^7.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Filesystem\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides basic utilities for the filesystem", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/filesystem/tree/v6.4.9" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-06-28T09:49:33+00:00" + }, + { + "name": "symfony/finder", + "version": "v6.4.11", + "source": { + "type": "git", + "url": "https://github.com/symfony/finder.git", + "reference": "d7eb6daf8cd7e9ac4976e9576b32042ef7253453" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/finder/zipball/d7eb6daf8cd7e9ac4976e9576b32042ef7253453", + "reference": "d7eb6daf8cd7e9ac4976e9576b32042ef7253453", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "require-dev": { + "symfony/filesystem": "^6.0|^7.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Finder\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Finds files and directories via an intuitive fluent interface", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/finder/tree/v6.4.11" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-08-13T14:27:37+00:00" + }, + { + "name": "symfony/flex", + "version": "v2.4.6", + "source": { + "type": "git", + "url": "https://github.com/symfony/flex.git", + "reference": "4dc11919791f81d087a12db2ab4c7e044431ef6b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/flex/zipball/4dc11919791f81d087a12db2ab4c7e044431ef6b", + "reference": "4dc11919791f81d087a12db2ab4c7e044431ef6b", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^2.1", + "php": ">=8.0" + }, + "require-dev": { + "composer/composer": "^2.1", + "symfony/dotenv": "^5.4|^6.0", + "symfony/filesystem": "^5.4|^6.0", + "symfony/phpunit-bridge": "^5.4|^6.0", + "symfony/process": "^5.4|^6.0" + }, + "type": "composer-plugin", + "extra": { + "class": "Symfony\\Flex\\Flex" + }, + "autoload": { + "psr-4": { + "Symfony\\Flex\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien.potencier@gmail.com" + } + ], + "description": "Composer plugin for Symfony", + "support": { + "issues": "https://github.com/symfony/flex/issues", + "source": "https://github.com/symfony/flex/tree/v2.4.6" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-04-27T10:22:22+00:00" + }, + { + "name": "symfony/framework-bundle", + "version": "v6.4.10", + "source": { + "type": "git", + "url": "https://github.com/symfony/framework-bundle.git", + "reference": "6cbdb0cc3ddbb63499262cd3036882b08ee2690b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/framework-bundle/zipball/6cbdb0cc3ddbb63499262cd3036882b08ee2690b", + "reference": "6cbdb0cc3ddbb63499262cd3036882b08ee2690b", + "shasum": "" + }, + "require": { + "composer-runtime-api": ">=2.1", + "ext-xml": "*", + "php": ">=8.1", + "symfony/cache": "^5.4|^6.0|^7.0", + "symfony/config": "^6.1|^7.0", + "symfony/dependency-injection": "^6.4|^7.0", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/error-handler": "^6.1|^7.0", + "symfony/event-dispatcher": "^5.4|^6.0|^7.0", + "symfony/filesystem": "^5.4|^6.0|^7.0", + "symfony/finder": "^5.4|^6.0|^7.0", + "symfony/http-foundation": "^6.4|^7.0", + "symfony/http-kernel": "^6.4", + "symfony/polyfill-mbstring": "~1.0", + "symfony/routing": "^6.4|^7.0" + }, + "conflict": { + "doctrine/annotations": "<1.13.1", + "doctrine/persistence": "<1.3", + "phpdocumentor/reflection-docblock": "<3.2.2", + "phpdocumentor/type-resolver": "<1.4.0", + "symfony/asset": "<5.4", + "symfony/asset-mapper": "<6.4", + "symfony/clock": "<6.3", + "symfony/console": "<5.4|>=7.0", + "symfony/dom-crawler": "<6.4", + "symfony/dotenv": "<5.4", + "symfony/form": "<5.4", + "symfony/http-client": "<6.3", + "symfony/lock": "<5.4", + "symfony/mailer": "<5.4", + "symfony/messenger": "<6.3", + "symfony/mime": "<6.4", + "symfony/property-access": "<5.4", + "symfony/property-info": "<5.4", + "symfony/scheduler": "<6.4.4|>=7.0.0,<7.0.4", + "symfony/security-core": "<5.4", + "symfony/security-csrf": "<5.4", + "symfony/serializer": "<6.4", + "symfony/stopwatch": "<5.4", + "symfony/translation": "<6.4", + "symfony/twig-bridge": "<5.4", + "symfony/twig-bundle": "<5.4", + "symfony/validator": "<6.4", + "symfony/web-profiler-bundle": "<6.4", + "symfony/workflow": "<6.4" + }, + "require-dev": { + "doctrine/annotations": "^1.13.1|^2", + "doctrine/persistence": "^1.3|^2|^3", + "dragonmantank/cron-expression": "^3.1", + "phpdocumentor/reflection-docblock": "^3.0|^4.0|^5.0", + "seld/jsonlint": "^1.10", + "symfony/asset": "^5.4|^6.0|^7.0", + "symfony/asset-mapper": "^6.4|^7.0", + "symfony/browser-kit": "^5.4|^6.0|^7.0", + "symfony/clock": "^6.2|^7.0", + "symfony/console": "^5.4.9|^6.0.9|^7.0", + "symfony/css-selector": "^5.4|^6.0|^7.0", + "symfony/dom-crawler": "^6.4|^7.0", + "symfony/dotenv": "^5.4|^6.0|^7.0", + "symfony/expression-language": "^5.4|^6.0|^7.0", + "symfony/form": "^5.4|^6.0|^7.0", + "symfony/html-sanitizer": "^6.1|^7.0", + "symfony/http-client": "^6.3|^7.0", + "symfony/lock": "^5.4|^6.0|^7.0", + "symfony/mailer": "^5.4|^6.0|^7.0", + "symfony/messenger": "^6.3|^7.0", + "symfony/mime": "^6.4|^7.0", + "symfony/notifier": "^5.4|^6.0|^7.0", + "symfony/polyfill-intl-icu": "~1.0", + "symfony/process": "^5.4|^6.0|^7.0", + "symfony/property-info": "^5.4|^6.0|^7.0", + "symfony/rate-limiter": "^5.4|^6.0|^7.0", + "symfony/scheduler": "^6.4.4|^7.0.4", + "symfony/security-bundle": "^5.4|^6.0|^7.0", + "symfony/semaphore": "^5.4|^6.0|^7.0", + "symfony/serializer": "^6.4|^7.0", + "symfony/stopwatch": "^5.4|^6.0|^7.0", + "symfony/string": "^5.4|^6.0|^7.0", + "symfony/translation": "^6.4|^7.0", + "symfony/twig-bundle": "^5.4|^6.0|^7.0", + "symfony/uid": "^5.4|^6.0|^7.0", + "symfony/validator": "^6.4|^7.0", + "symfony/web-link": "^5.4|^6.0|^7.0", + "symfony/workflow": "^6.4|^7.0", + "symfony/yaml": "^5.4|^6.0|^7.0", + "twig/twig": "^2.10|^3.0.4" + }, + "type": "symfony-bundle", + "autoload": { + "psr-4": { + "Symfony\\Bundle\\FrameworkBundle\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides a tight integration between Symfony components and the Symfony full-stack framework", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/framework-bundle/tree/v6.4.10" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-07-26T13:24:20+00:00" + }, + { + "name": "symfony/http-foundation", + "version": "v6.4.10", + "source": { + "type": "git", + "url": "https://github.com/symfony/http-foundation.git", + "reference": "117f1f20a7ade7bcea28b861fb79160a21a1e37b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/117f1f20a7ade7bcea28b861fb79160a21a1e37b", + "reference": "117f1f20a7ade7bcea28b861fb79160a21a1e37b", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/polyfill-mbstring": "~1.1", + "symfony/polyfill-php83": "^1.27" + }, + "conflict": { + "symfony/cache": "<6.3" + }, + "require-dev": { + "doctrine/dbal": "^2.13.1|^3|^4", + "predis/predis": "^1.1|^2.0", + "symfony/cache": "^6.3|^7.0", + "symfony/dependency-injection": "^5.4|^6.0|^7.0", + "symfony/expression-language": "^5.4|^6.0|^7.0", + "symfony/http-kernel": "^5.4.12|^6.0.12|^6.1.4|^7.0", + "symfony/mime": "^5.4|^6.0|^7.0", + "symfony/rate-limiter": "^5.4|^6.0|^7.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\HttpFoundation\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Defines an object-oriented layer for the HTTP specification", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/http-foundation/tree/v6.4.10" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-07-26T12:36:27+00:00" + }, + { + "name": "symfony/http-kernel", + "version": "v6.4.11", + "source": { + "type": "git", + "url": "https://github.com/symfony/http-kernel.git", + "reference": "1ba6b89d781cb47448155cc70dd2e0f1b0584c79" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/1ba6b89d781cb47448155cc70dd2e0f1b0584c79", + "reference": "1ba6b89d781cb47448155cc70dd2e0f1b0584c79", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "psr/log": "^1|^2|^3", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/error-handler": "^6.4|^7.0", + "symfony/event-dispatcher": "^5.4|^6.0|^7.0", + "symfony/http-foundation": "^6.4|^7.0", + "symfony/polyfill-ctype": "^1.8" + }, + "conflict": { + "symfony/browser-kit": "<5.4", + "symfony/cache": "<5.4", + "symfony/config": "<6.1", + "symfony/console": "<5.4", + "symfony/dependency-injection": "<6.4", + "symfony/doctrine-bridge": "<5.4", + "symfony/form": "<5.4", + "symfony/http-client": "<5.4", + "symfony/http-client-contracts": "<2.5", + "symfony/mailer": "<5.4", + "symfony/messenger": "<5.4", + "symfony/translation": "<5.4", + "symfony/translation-contracts": "<2.5", + "symfony/twig-bridge": "<5.4", + "symfony/validator": "<6.4", + "symfony/var-dumper": "<6.3", + "twig/twig": "<2.13" + }, + "provide": { + "psr/log-implementation": "1.0|2.0|3.0" + }, + "require-dev": { + "psr/cache": "^1.0|^2.0|^3.0", + "symfony/browser-kit": "^5.4|^6.0|^7.0", + "symfony/clock": "^6.2|^7.0", + "symfony/config": "^6.1|^7.0", + "symfony/console": "^5.4|^6.0|^7.0", + "symfony/css-selector": "^5.4|^6.0|^7.0", + "symfony/dependency-injection": "^6.4|^7.0", + "symfony/dom-crawler": "^5.4|^6.0|^7.0", + "symfony/expression-language": "^5.4|^6.0|^7.0", + "symfony/finder": "^5.4|^6.0|^7.0", + "symfony/http-client-contracts": "^2.5|^3", + "symfony/process": "^5.4|^6.0|^7.0", + "symfony/property-access": "^5.4.5|^6.0.5|^7.0", + "symfony/routing": "^5.4|^6.0|^7.0", + "symfony/serializer": "^6.4.4|^7.0.4", + "symfony/stopwatch": "^5.4|^6.0|^7.0", + "symfony/translation": "^5.4|^6.0|^7.0", + "symfony/translation-contracts": "^2.5|^3", + "symfony/uid": "^5.4|^6.0|^7.0", + "symfony/validator": "^6.4|^7.0", + "symfony/var-dumper": "^5.4|^6.4|^7.0", + "symfony/var-exporter": "^6.2|^7.0", + "twig/twig": "^2.13|^3.0.4" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\HttpKernel\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides a structured process for converting a Request into a Response", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/http-kernel/tree/v6.4.11" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-08-30T16:57:20+00:00" + }, + { + "name": "symfony/polyfill-intl-grapheme", + "version": "v1.31.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-grapheme.git", + "reference": "b9123926e3b7bc2f98c02ad54f6a4b02b91a8abe" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/b9123926e3b7bc2f98c02ad54f6a4b02b91a8abe", + "reference": "b9123926e3b7bc2f98c02ad54f6a4b02b91a8abe", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Grapheme\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's grapheme_* functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "grapheme", + "intl", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.31.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-09-09T11:45:10+00:00" + }, + { + "name": "symfony/polyfill-intl-normalizer", + "version": "v1.31.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-normalizer.git", + "reference": "3833d7255cc303546435cb650316bff708a1c75c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/3833d7255cc303546435cb650316bff708a1c75c", + "reference": "3833d7255cc303546435cb650316bff708a1c75c", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Normalizer\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's Normalizer class and related functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "intl", + "normalizer", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.31.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-09-09T11:45:10+00:00" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.31.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/85181ba99b2345b0ef10ce42ecac37612d9fd341", + "reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "provide": { + "ext-mbstring": "*" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.31.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-09-09T11:45:10+00:00" + }, + { + "name": "symfony/polyfill-php82", + "version": "v1.31.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php82.git", + "reference": "5d2ed36f7734637dacc025f179698031951b1692" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php82/zipball/5d2ed36f7734637dacc025f179698031951b1692", + "reference": "5d2ed36f7734637dacc025f179698031951b1692", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "type": "library", + "extra": { + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php82\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.2+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php82/tree/v1.31.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-09-09T11:45:10+00:00" + }, + { + "name": "symfony/polyfill-php83", + "version": "v1.31.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php83.git", + "reference": "2fb86d65e2d424369ad2905e83b236a8805ba491" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php83/zipball/2fb86d65e2d424369ad2905e83b236a8805ba491", + "reference": "2fb86d65e2d424369ad2905e83b236a8805ba491", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "type": "library", + "extra": { + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php83\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.3+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php83/tree/v1.31.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-09-09T11:45:10+00:00" + }, + { + "name": "symfony/routing", + "version": "v6.4.11", + "source": { + "type": "git", + "url": "https://github.com/symfony/routing.git", + "reference": "8ee0c24c1bf61c263a26f1b9b6d19e83b1121f2a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/routing/zipball/8ee0c24c1bf61c263a26f1b9b6d19e83b1121f2a", + "reference": "8ee0c24c1bf61c263a26f1b9b6d19e83b1121f2a", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/deprecation-contracts": "^2.5|^3" + }, + "conflict": { + "doctrine/annotations": "<1.12", + "symfony/config": "<6.2", + "symfony/dependency-injection": "<5.4", + "symfony/yaml": "<5.4" + }, + "require-dev": { + "doctrine/annotations": "^1.12|^2", + "psr/log": "^1|^2|^3", + "symfony/config": "^6.2|^7.0", + "symfony/dependency-injection": "^5.4|^6.0|^7.0", + "symfony/expression-language": "^5.4|^6.0|^7.0", + "symfony/http-foundation": "^5.4|^6.0|^7.0", + "symfony/yaml": "^5.4|^6.0|^7.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Routing\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Maps an HTTP request to a set of configuration variables", + "homepage": "https://symfony.com", + "keywords": [ + "router", + "routing", + "uri", + "url" + ], + "support": { + "source": "https://github.com/symfony/routing/tree/v6.4.11" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-08-29T08:15:38+00:00" + }, + { + "name": "symfony/runtime", + "version": "v6.4.8", + "source": { + "type": "git", + "url": "https://github.com/symfony/runtime.git", + "reference": "b4bfa2fd4cad1fee62f80b3dfe4eb674cc3302a0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/runtime/zipball/b4bfa2fd4cad1fee62f80b3dfe4eb674cc3302a0", + "reference": "b4bfa2fd4cad1fee62f80b3dfe4eb674cc3302a0", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^1.0|^2.0", + "php": ">=8.1" + }, + "conflict": { + "symfony/dotenv": "<5.4" + }, + "require-dev": { + "composer/composer": "^1.0.2|^2.0", + "symfony/console": "^5.4.9|^6.0.9|^7.0", + "symfony/dotenv": "^5.4|^6.0|^7.0", + "symfony/http-foundation": "^5.4|^6.0|^7.0", + "symfony/http-kernel": "^5.4|^6.0|^7.0" + }, + "type": "composer-plugin", + "extra": { + "class": "Symfony\\Component\\Runtime\\Internal\\ComposerPlugin" + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Runtime\\": "", + "Symfony\\Runtime\\Symfony\\Component\\": "Internal/" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Enables decoupling PHP applications from global state", + "homepage": "https://symfony.com", + "keywords": [ + "runtime" + ], + "support": { + "source": "https://github.com/symfony/runtime/tree/v6.4.8" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-05-31T14:49:08+00:00" + }, + { + "name": "symfony/service-contracts", + "version": "v3.5.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/service-contracts.git", + "reference": "bd1d9e59a81d8fa4acdcea3f617c581f7475a80f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/bd1d9e59a81d8fa4acdcea3f617c581f7475a80f", + "reference": "bd1d9e59a81d8fa4acdcea3f617c581f7475a80f", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "psr/container": "^1.1|^2.0", + "symfony/deprecation-contracts": "^2.5|^3" + }, + "conflict": { + "ext-psr": "<1.1|>=2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.5-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\Service\\": "" + }, + "exclude-from-classmap": [ + "/Test/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Generic abstractions related to writing services", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "support": { + "source": "https://github.com/symfony/service-contracts/tree/v3.5.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-04-18T09:32:20+00:00" + }, + { + "name": "symfony/string", + "version": "v6.4.11", + "source": { + "type": "git", + "url": "https://github.com/symfony/string.git", + "reference": "5bc3eb632cf9c8dbfd6529d89be9950d1518883b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/string/zipball/5bc3eb632cf9c8dbfd6529d89be9950d1518883b", + "reference": "5bc3eb632cf9c8dbfd6529d89be9950d1518883b", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-intl-grapheme": "~1.0", + "symfony/polyfill-intl-normalizer": "~1.0", + "symfony/polyfill-mbstring": "~1.0" + }, + "conflict": { + "symfony/translation-contracts": "<2.5" + }, + "require-dev": { + "symfony/error-handler": "^5.4|^6.0|^7.0", + "symfony/http-client": "^5.4|^6.0|^7.0", + "symfony/intl": "^6.2|^7.0", + "symfony/translation-contracts": "^2.5|^3.0", + "symfony/var-exporter": "^5.4|^6.0|^7.0" + }, + "type": "library", + "autoload": { + "files": [ + "Resources/functions.php" + ], + "psr-4": { + "Symfony\\Component\\String\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way", + "homepage": "https://symfony.com", + "keywords": [ + "grapheme", + "i18n", + "string", + "unicode", + "utf-8", + "utf8" + ], + "support": { + "source": "https://github.com/symfony/string/tree/v6.4.11" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-08-12T09:55:28+00:00" + }, + { + "name": "symfony/var-dumper", + "version": "v6.4.11", + "source": { + "type": "git", + "url": "https://github.com/symfony/var-dumper.git", + "reference": "ee14c8254a480913268b1e3b1cba8045ed122694" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/ee14c8254a480913268b1e3b1cba8045ed122694", + "reference": "ee14c8254a480913268b1e3b1cba8045ed122694", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/polyfill-mbstring": "~1.0" + }, + "conflict": { + "symfony/console": "<5.4" + }, + "require-dev": { + "ext-iconv": "*", + "symfony/console": "^5.4|^6.0|^7.0", + "symfony/error-handler": "^6.3|^7.0", + "symfony/http-kernel": "^5.4|^6.0|^7.0", + "symfony/process": "^5.4|^6.0|^7.0", + "symfony/uid": "^5.4|^6.0|^7.0", + "twig/twig": "^2.13|^3.0.4" + }, + "bin": [ + "Resources/bin/var-dump-server" + ], + "type": "library", + "autoload": { + "files": [ + "Resources/functions/dump.php" + ], + "psr-4": { + "Symfony\\Component\\VarDumper\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides mechanisms for walking through any arbitrary PHP variable", + "homepage": "https://symfony.com", + "keywords": [ + "debug", + "dump" + ], + "support": { + "source": "https://github.com/symfony/var-dumper/tree/v6.4.11" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-08-30T16:03:21+00:00" + }, + { + "name": "symfony/var-exporter", + "version": "v6.4.9", + "source": { + "type": "git", + "url": "https://github.com/symfony/var-exporter.git", + "reference": "f9a060622e0d93777b7f8687ec4860191e16802e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/var-exporter/zipball/f9a060622e0d93777b7f8687ec4860191e16802e", + "reference": "f9a060622e0d93777b7f8687ec4860191e16802e", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/deprecation-contracts": "^2.5|^3" + }, + "require-dev": { + "symfony/property-access": "^6.4|^7.0", + "symfony/serializer": "^6.4|^7.0", + "symfony/var-dumper": "^5.4|^6.0|^7.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\VarExporter\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Allows exporting any serializable PHP data structure to plain PHP code", + "homepage": "https://symfony.com", + "keywords": [ + "clone", + "construct", + "export", + "hydrate", + "instantiate", + "lazy-loading", + "proxy", + "serialize" + ], + "support": { + "source": "https://github.com/symfony/var-exporter/tree/v6.4.9" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-06-24T15:53:56+00:00" + }, + { + "name": "symfony/yaml", + "version": "v6.4.11", + "source": { + "type": "git", + "url": "https://github.com/symfony/yaml.git", + "reference": "be37e7f13195e05ab84ca5269365591edd240335" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/yaml/zipball/be37e7f13195e05ab84ca5269365591edd240335", + "reference": "be37e7f13195e05ab84ca5269365591edd240335", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/polyfill-ctype": "^1.8" + }, + "conflict": { + "symfony/console": "<5.4" + }, + "require-dev": { + "symfony/console": "^5.4|^6.0|^7.0" + }, + "bin": [ + "Resources/bin/yaml-lint" + ], + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Yaml\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Loads and dumps YAML files", "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], "support": { - "source": "https://github.com/symfony/polyfill-php82/tree/v1.30.0" + "source": "https://github.com/symfony/yaml/tree/v6.4.11" }, "funding": [ { @@ -2646,16 +4583,20 @@ "type": "tidelift" } ], - "time": "2024-06-19T12:30:46+00:00" + "time": "2024-08-12T09:55:28+00:00" } ], "packages-dev": [], "aliases": [], "minimum-stability": "stable", "stability-flags": [], - "prefer-stable": false, + "prefer-stable": true, "prefer-lowest": false, - "platform": [], + "platform": { + "php": ">=8.1", + "ext-ctype": "*", + "ext-iconv": "*" + }, "platform-dev": [], "plugin-api-version": "2.6.0" } diff --git a/config/bundles.php b/config/bundles.php new file mode 100644 index 00000000..49d3fb6f --- /dev/null +++ b/config/bundles.php @@ -0,0 +1,5 @@ + ['all' => true], +]; diff --git a/config/packages/cache.yaml b/config/packages/cache.yaml new file mode 100644 index 00000000..6899b720 --- /dev/null +++ b/config/packages/cache.yaml @@ -0,0 +1,19 @@ +framework: + cache: + # Unique name of your app: used to compute stable namespaces for cache keys. + #prefix_seed: your_vendor_name/app_name + + # The "app" cache stores to the filesystem by default. + # The data in this cache should persist between deploys. + # Other options include: + + # Redis + #app: cache.adapter.redis + #default_redis_provider: redis://localhost + + # APCu (not recommended with heavy random-write workloads as memory fragmentation can cause perf issues) + #app: cache.adapter.apcu + + # Namespaced pools use the above "app" backend by default + #pools: + #my.dedicated.cache: null diff --git a/config/packages/framework.yaml b/config/packages/framework.yaml new file mode 100644 index 00000000..28095da4 --- /dev/null +++ b/config/packages/framework.yaml @@ -0,0 +1,24 @@ +# see https://symfony.com/doc/current/reference/configuration/framework.html +framework: + secret: '%env(APP_SECRET)%' + annotations: false + http_method_override: false + handle_all_throwables: true + + # Enables session support. Note that the session will ONLY be started if you read or write from it. + # Remove or comment this section to explicitly disable session support. + session: + handler_id: null + cookie_secure: auto + cookie_samesite: lax + + #esi: true + #fragments: true + php_errors: + log: true + +when@test: + framework: + test: true + session: + storage_factory_id: session.storage.factory.mock_file diff --git a/config/packages/http_discovery.yaml b/config/packages/http_discovery.yaml new file mode 100644 index 00000000..2a789e73 --- /dev/null +++ b/config/packages/http_discovery.yaml @@ -0,0 +1,10 @@ +services: + Psr\Http\Message\RequestFactoryInterface: '@http_discovery.psr17_factory' + Psr\Http\Message\ResponseFactoryInterface: '@http_discovery.psr17_factory' + Psr\Http\Message\ServerRequestFactoryInterface: '@http_discovery.psr17_factory' + Psr\Http\Message\StreamFactoryInterface: '@http_discovery.psr17_factory' + Psr\Http\Message\UploadedFileFactoryInterface: '@http_discovery.psr17_factory' + Psr\Http\Message\UriFactoryInterface: '@http_discovery.psr17_factory' + + http_discovery.psr17_factory: + class: Http\Discovery\Psr17Factory diff --git a/config/packages/routing.yaml b/config/packages/routing.yaml new file mode 100644 index 00000000..4b766ce5 --- /dev/null +++ b/config/packages/routing.yaml @@ -0,0 +1,12 @@ +framework: + router: + utf8: true + + # Configure how to generate URLs in non-HTTP contexts, such as CLI commands. + # See https://symfony.com/doc/current/routing.html#generating-urls-in-commands + #default_uri: http://localhost + +when@prod: + framework: + router: + strict_requirements: null diff --git a/config/preload.php b/config/preload.php new file mode 100644 index 00000000..5ebcdb21 --- /dev/null +++ b/config/preload.php @@ -0,0 +1,5 @@ + Date: Fri, 20 Sep 2024 14:49:49 -0400 Subject: [PATCH 002/173] Add default .htaccess with `composer require symfony/apache-pack`. --- composer.json | 7 +++-- composer.lock | 28 ++++++++++++++++++- public/.htaccess | 70 ++++++++++++++++++++++++++++++++++++++++++++++++ symfony.lock | 12 +++++++++ 4 files changed, 112 insertions(+), 5 deletions(-) create mode 100644 public/.htaccess diff --git a/composer.json b/composer.json index 65415188..099b23c0 100644 --- a/composer.json +++ b/composer.json @@ -8,8 +8,9 @@ "php": ">=8.1", "ext-ctype": "*", "ext-iconv": "*", - "onelogin/php-saml": "^4.2", "microsoft/microsoft-graph": "^2.12", + "onelogin/php-saml": "^4.2", + "symfony/apache-pack": "^1.0", "symfony/console": "6.4.*", "symfony/dotenv": "6.4.*", "symfony/flex": "^2", @@ -17,8 +18,6 @@ "symfony/runtime": "6.4.*", "symfony/yaml": "6.4.*" }, - "require-dev": { - }, "config": { "allow-plugins": { "php-http/discovery": true, @@ -63,7 +62,7 @@ }, "extra": { "symfony": { - "allow-contrib": false, + "allow-contrib": true, "require": "6.4.*" } } diff --git a/composer.lock b/composer.lock index ef7c151c..f0907640 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "61fab6c025a173671a288e10c9d8ba16", + "content-hash": "8325de776499155bdf6bc928f31e19d4", "packages": [ { "name": "brick/math", @@ -2301,6 +2301,32 @@ }, "time": "2024-04-18T10:51:20+00:00" }, + { + "name": "symfony/apache-pack", + "version": "v1.0.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/apache-pack.git", + "reference": "3aa5818d73ad2551281fc58a75afd9ca82622e6c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/apache-pack/zipball/3aa5818d73ad2551281fc58a75afd9ca82622e6c", + "reference": "3aa5818d73ad2551281fc58a75afd9ca82622e6c", + "shasum": "" + }, + "type": "symfony-pack", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A pack for Apache support in Symfony", + "support": { + "issues": "https://github.com/symfony/apache-pack/issues", + "source": "https://github.com/symfony/apache-pack/tree/master" + }, + "time": "2017-12-12T01:46:35+00:00" + }, { "name": "symfony/cache", "version": "v6.4.11", diff --git a/public/.htaccess b/public/.htaccess new file mode 100644 index 00000000..f7345dfb --- /dev/null +++ b/public/.htaccess @@ -0,0 +1,70 @@ +# Use the front controller as index file. It serves as a fallback solution when +# every other rewrite/redirect fails (e.g. in an aliased environment without +# mod_rewrite). Additionally, this reduces the matching process for the +# start page (path "/") because otherwise Apache will apply the rewriting rules +# to each configured DirectoryIndex file (e.g. index.php, index.html, index.pl). +DirectoryIndex index.php + +# By default, Apache does not evaluate symbolic links if you did not enable this +# feature in your server configuration. Uncomment the following line if you +# install assets as symlinks or if you experience problems related to symlinks +# when compiling LESS/Sass/CoffeScript assets. +# Options +SymLinksIfOwnerMatch + +# Disabling MultiViews prevents unwanted negotiation, e.g. "/index" should not resolve +# to the front controller "/index.php" but be rewritten to "/index.php/index". + + Options -MultiViews + + + + # This Option needs to be enabled for RewriteRule, otherwise it will show an error like + # 'Options FollowSymLinks or SymLinksIfOwnerMatch is off which implies that RewriteRule directive is forbidden' + Options +SymLinksIfOwnerMatch + + RewriteEngine On + + # Determine the RewriteBase automatically and set it as environment variable. + # If you are using Apache aliases to do mass virtual hosting or installed the + # project in a subdirectory, the base path will be prepended to allow proper + # resolution of the index.php file and to redirect to the correct URI. It will + # work in environments without path prefix as well, providing a safe, one-size + # fits all solution. But as you do not need it in this case, you can comment + # the following 2 lines to eliminate the overhead. + RewriteCond %{REQUEST_URI}::$0 ^(/.+)/(.*)::\2$ + RewriteRule .* - [E=BASE:%1] + + # Sets the HTTP_AUTHORIZATION header removed by Apache + RewriteCond %{HTTP:Authorization} .+ + RewriteRule ^ - [E=HTTP_AUTHORIZATION:%0] + + # Redirect to URI without front controller to prevent duplicate content + # (with and without `/index.php`). Only do this redirect on the initial + # rewrite by Apache and not on subsequent cycles. Otherwise we would get an + # endless redirect loop (request -> rewrite to front controller -> + # redirect -> request -> ...). + # So in case you get a "too many redirects" error or you always get redirected + # to the start page because your Apache does not expose the REDIRECT_STATUS + # environment variable, you have 2 choices: + # - disable this feature by commenting the following 2 lines or + # - use Apache >= 2.3.9 and replace all L flags by END flags and remove the + # following RewriteCond (best solution) + RewriteCond %{ENV:REDIRECT_STATUS} ="" + RewriteRule ^index\.php(?:/(.*)|$) %{ENV:BASE}/$1 [R=301,L] + + # If the requested filename exists, simply serve it. + # We only want to let Apache serve files and not directories. + # Rewrite all other queries to the front controller. + RewriteCond %{REQUEST_FILENAME} !-f + RewriteRule ^ %{ENV:BASE}/index.php [L] + + + + + # When mod_rewrite is not available, we instruct a temporary redirect of + # the start page to the front controller explicitly so that the website + # and the generated links can still be used. + RedirectMatch 307 ^/$ /index.php/ + # RedirectTemp cannot be used instead + + diff --git a/symfony.lock b/symfony.lock index be63bfb8..9390dfe7 100644 --- a/symfony.lock +++ b/symfony.lock @@ -20,6 +20,18 @@ "config/packages/http_discovery.yaml" ] }, + "symfony/apache-pack": { + "version": "1.0", + "recipe": { + "repo": "github.com/symfony/recipes-contrib", + "branch": "main", + "version": "1.0", + "ref": "0f18b4decdf5695d692c1d0dfd65516a07a6adf1" + }, + "files": [ + "public/.htaccess" + ] + }, "symfony/console": { "version": "6.4", "recipe": { From 80958b0e3a956f85b85eb4a08abe62c14c24045e Mon Sep 17 00:00:00 2001 From: Adam Franco Date: Tue, 24 Sep 2024 15:52:10 -0400 Subject: [PATCH 003/173] #47: Move the Catalogs controller into the Symfony structure. --- .../Controller/Catalogs.php | 27 +++++++++---------- 1 file changed, 12 insertions(+), 15 deletions(-) rename application/controllers/CatalogsController.php => src/Controller/Catalogs.php (85%) diff --git a/application/controllers/CatalogsController.php b/src/Controller/Catalogs.php similarity index 85% rename from application/controllers/CatalogsController.php rename to src/Controller/Catalogs.php index 4d726bf6..4f70bfd4 100755 --- a/application/controllers/CatalogsController.php +++ b/src/Controller/Catalogs.php @@ -6,6 +6,12 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License (GPL) */ +namespace App\Controller; + +use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\Routing\Annotation\Route; + /** * A controller for accessing catalogs. * @@ -14,27 +20,18 @@ * @copyright Copyright © 2009, Middlebury College * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License (GPL) */ -class CatalogsController extends AbstractCatalogController +class Catalogs extends AbstractController { - public function indexAction() - { - $this->_forward('list'); - } - /** - * Print out a list of all catalogs. - * - * @return void - * - * @since 4/21/09 - */ + #[Route('/catalogs/', name: 'List all catalogs')] public function listAction() { $lookupSession = $this->_helper->osid->getCourseManager()->getCourseCatalogLookupSession(); - $this->view->catalogs = $lookupSession->getCourseCatalogs(); - $this->view->title = 'Available Catalogs'; - $this->view->headTitle($this->view->title); + return $this->render('catalogs.html.twig', [ + 'title' => 'Available Catalogs', + 'catalogs' => $lookupSession->getCourseCatalogs(), + ]); } /** From c9c5d4c9844da3641c5e3734098c283604d1a6bf Mon Sep 17 00:00:00 2001 From: Adam Franco Date: Tue, 24 Sep 2024 15:53:23 -0400 Subject: [PATCH 004/173] #47: Remove +SymLinksIfOwnerMatch directive that is breaking on toboggan. --- public/.htaccess | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/.htaccess b/public/.htaccess index f7345dfb..5351ee42 100644 --- a/public/.htaccess +++ b/public/.htaccess @@ -20,7 +20,7 @@ DirectoryIndex index.php # This Option needs to be enabled for RewriteRule, otherwise it will show an error like # 'Options FollowSymLinks or SymLinksIfOwnerMatch is off which implies that RewriteRule directive is forbidden' - Options +SymLinksIfOwnerMatch + # Options +SymLinksIfOwnerMatch RewriteEngine On From 1021e4547c4773aa8aa1296647a9c3643ad0a8dc Mon Sep 17 00:00:00 2001 From: Adam Franco Date: Tue, 24 Sep 2024 15:55:22 -0400 Subject: [PATCH 005/173] #47: Wire up a new osid.runtime service to access the OSID API. --- .../resources/Catalog/Action/Helper/Osid.php | 91 --------------- config/services.yaml | 10 ++ src/Controller/Catalogs.php | 18 ++- src/Service/Osid/Runtime.php | 106 ++++++++++++++++++ 4 files changed, 133 insertions(+), 92 deletions(-) delete mode 100755 application/resources/Catalog/Action/Helper/Osid.php create mode 100644 src/Service/Osid/Runtime.php diff --git a/application/resources/Catalog/Action/Helper/Osid.php b/application/resources/Catalog/Action/Helper/Osid.php deleted file mode 100755 index c7f728a4..00000000 --- a/application/resources/Catalog/Action/Helper/Osid.php +++ /dev/null @@ -1,91 +0,0 @@ -getRuntimeManager(); - - $config = Zend_Registry::getInstance()->config; - if (!isset($config->osid->course_impl) || !strlen(trim($config->osid->course_impl))) { - $implClass = 'banner_course_CourseManager'; - } else { - $implClass = $config->osid->course_impl; - } - - self::$courseManager = $runtimeManager->getManager(osid_OSID::COURSE(), $implClass, '3.0.0'); - } - - return self::$courseManager; - } - - /** - * Answer the Runtime Manager. - * - * @return osid_OsidRuntimeManager - * - * @since 4/20/09 - */ - public function getRuntimeManager() - { - if (!isset(self::$runtimeManager)) { - self::$runtimeManager = new phpkit_AutoloadOsidRuntimeManager($this->getConfigPath()); - } - - return self::$runtimeManager; - } -} diff --git a/config/services.yaml b/config/services.yaml index 2d6a76f9..f74c9d3e 100644 --- a/config/services.yaml +++ b/config/services.yaml @@ -4,6 +4,7 @@ # Put parameters here that don't need to change on each machine where the app is deployed # https://symfony.com/doc/current/best_practices.html#use-parameters-for-application-configuration parameters: + app.osid.runtime.courseimpl: 'banner_course_CourseManager' services: # default configuration for services in *this* file @@ -22,3 +23,12 @@ services: # add more service definitions when explicit configuration is needed # please note that last definitions always *replace* previous ones + + App\Service\Osid\Runtime: + arguments: + $configPath: '../configuration.plist' + $courseImpl: '%app.osid.runtime.courseimpl%' + + # Service aliases. + osid.runtime: + class: App\Service\Osid\Runtime diff --git a/src/Controller/Catalogs.php b/src/Controller/Catalogs.php index 4f70bfd4..e7c5f3ac 100755 --- a/src/Controller/Catalogs.php +++ b/src/Controller/Catalogs.php @@ -8,6 +8,7 @@ namespace App\Controller; +use App\Service\Osid\Runtime; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\Routing\Annotation\Route; @@ -23,10 +24,25 @@ class Catalogs extends AbstractController { + /** + * @var \App\Service\Osid\Runtime + */ + private $osidRuntime; + + /** + * Construct a new Catalogs controller. + * + * @param \App\Service\Osid\Runtime $osidRuntime + * The osid.runtime service. + */ + public function __construct(Runtime $osidRuntime) { + $this->osidRuntime = $osidRuntime; + } + #[Route('/catalogs/', name: 'List all catalogs')] public function listAction() { - $lookupSession = $this->_helper->osid->getCourseManager()->getCourseCatalogLookupSession(); + $lookupSession = $this->osidRuntime->getCourseManager()->getCourseCatalogLookupSession(); return $this->render('catalogs.html.twig', [ 'title' => 'Available Catalogs', diff --git a/src/Service/Osid/Runtime.php b/src/Service/Osid/Runtime.php new file mode 100644 index 00000000..583b7826 --- /dev/null +++ b/src/Service/Osid/Runtime.php @@ -0,0 +1,106 @@ +setConfigPath($configPath); + $this->courseImpl = $courseImpl; + } + + /** + * Answer the configuration path. + * + * @return string + * + * @since 6/11/09 + */ + public function getConfigPath() + { + if (!isset($this->configPath)) { + $this->configPath = BASE_PATH.'/configuration.plist'; + } + + return $this->configPath; + } + + /** + * Set the configuration path. + * + * @param string $path + * + * @since 6/11/09 + * + * @throws osid_IllegalStateException the config path has already been set + */ + public function setConfigPath($path) + { + if (isset($this->configPath) && $this->configPath != $path) { + throw new osid_IllegalStateException('the config path has already been set'); + } + + $this->configPath = $path; + } + + /** + * Answer the CourseManager. + * + * @return osid_course_CourseManager + * + * @since 4/20/09 + */ + public function getCourseManager() + { + if (!isset($this->courseManager)) { + if (class_exists($this->courseImpl)) { + $runtimeManager = $this->getRuntimeManager(); + $this->courseManager = $runtimeManager->getManager(osid_OSID::COURSE(), $this->courseImpl, '3.0.0'); + } + else { + throw new \InvalidArgumentException("Unknown CourseManger implementation class: " . $this->courseImpl); + } + + } + + return $this->courseManager; + } + + /** + * Answer the Runtime Manager. + * + * @return osid_OsidRuntimeManager + * + * @since 4/20/09 + */ + public function getRuntimeManager() + { + if (!isset($this->runtimeManager)) { + $this->runtimeManager = new phpkit_AutoloadOsidRuntimeManager($this->getConfigPath()); + } + + return $this->runtimeManager; + } +} From c3ef1d0429c5ccf05779c0ace6f8ab1be51c97fb Mon Sep 17 00:00:00 2001 From: Adam Franco Date: Wed, 25 Sep 2024 11:03:28 -0400 Subject: [PATCH 006/173] #47: Use PSR-0 autoloading for osid-phpkit. --- composer.json | 4 + composer.lock | 146 +++++++++++++++++------------------ src/Service/Osid/Runtime.php | 6 +- 3 files changed, 80 insertions(+), 76 deletions(-) diff --git a/composer.json b/composer.json index 099b23c0..69741bf5 100644 --- a/composer.json +++ b/composer.json @@ -29,6 +29,10 @@ "autoload": { "psr-4": { "App\\": "src/" + }, + "psr-0": { + "osid_": "library/osid-phpkit/", + "phpkit_": "library/osid-phpkit/" } }, "autoload-dev": { diff --git a/composer.lock b/composer.lock index f0907640..dceee8e9 100644 --- a/composer.lock +++ b/composer.lock @@ -2329,16 +2329,16 @@ }, { "name": "symfony/cache", - "version": "v6.4.11", + "version": "v6.4.12", "source": { "type": "git", "url": "https://github.com/symfony/cache.git", - "reference": "36daef8fce88fe0b9a4f8cf4c342ced5c05616dc" + "reference": "a463451b7f6ac4a47b98dbfc78ec2d3560c759d8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/cache/zipball/36daef8fce88fe0b9a4f8cf4c342ced5c05616dc", - "reference": "36daef8fce88fe0b9a4f8cf4c342ced5c05616dc", + "url": "https://api.github.com/repos/symfony/cache/zipball/a463451b7f6ac4a47b98dbfc78ec2d3560c759d8", + "reference": "a463451b7f6ac4a47b98dbfc78ec2d3560c759d8", "shasum": "" }, "require": { @@ -2405,7 +2405,7 @@ "psr6" ], "support": { - "source": "https://github.com/symfony/cache/tree/v6.4.11" + "source": "https://github.com/symfony/cache/tree/v6.4.12" }, "funding": [ { @@ -2421,7 +2421,7 @@ "type": "tidelift" } ], - "time": "2024-08-05T07:40:31+00:00" + "time": "2024-09-16T16:01:33+00:00" }, { "name": "symfony/cache-contracts", @@ -2576,16 +2576,16 @@ }, { "name": "symfony/console", - "version": "v6.4.11", + "version": "v6.4.12", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "42686880adaacdad1835ee8fc2a9ec5b7bd63998" + "reference": "72d080eb9edf80e36c19be61f72c98ed8273b765" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/42686880adaacdad1835ee8fc2a9ec5b7bd63998", - "reference": "42686880adaacdad1835ee8fc2a9ec5b7bd63998", + "url": "https://api.github.com/repos/symfony/console/zipball/72d080eb9edf80e36c19be61f72c98ed8273b765", + "reference": "72d080eb9edf80e36c19be61f72c98ed8273b765", "shasum": "" }, "require": { @@ -2650,7 +2650,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v6.4.11" + "source": "https://github.com/symfony/console/tree/v6.4.12" }, "funding": [ { @@ -2666,20 +2666,20 @@ "type": "tidelift" } ], - "time": "2024-08-15T22:48:29+00:00" + "time": "2024-09-20T08:15:52+00:00" }, { "name": "symfony/dependency-injection", - "version": "v6.4.11", + "version": "v6.4.12", "source": { "type": "git", "url": "https://github.com/symfony/dependency-injection.git", - "reference": "e93c8368dc9915c2fe12018ff22fcbbdd32c9a9e" + "reference": "cfb9d34a1cdd4911bc737a5358fd1cf8ebfb536e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/e93c8368dc9915c2fe12018ff22fcbbdd32c9a9e", - "reference": "e93c8368dc9915c2fe12018ff22fcbbdd32c9a9e", + "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/cfb9d34a1cdd4911bc737a5358fd1cf8ebfb536e", + "reference": "cfb9d34a1cdd4911bc737a5358fd1cf8ebfb536e", "shasum": "" }, "require": { @@ -2731,7 +2731,7 @@ "description": "Allows you to standardize and centralize the way objects are constructed in your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/dependency-injection/tree/v6.4.11" + "source": "https://github.com/symfony/dependency-injection/tree/v6.4.12" }, "funding": [ { @@ -2747,7 +2747,7 @@ "type": "tidelift" } ], - "time": "2024-08-29T08:15:38+00:00" + "time": "2024-09-20T08:18:25+00:00" }, { "name": "symfony/deprecation-contracts", @@ -2818,16 +2818,16 @@ }, { "name": "symfony/dotenv", - "version": "v6.4.10", + "version": "v6.4.12", "source": { "type": "git", "url": "https://github.com/symfony/dotenv.git", - "reference": "2ae0c84cc9be0dc1eeb86016970b63c764d8472e" + "reference": "815284236cab7d8e1280f53bf562c07a4dfe5954" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dotenv/zipball/2ae0c84cc9be0dc1eeb86016970b63c764d8472e", - "reference": "2ae0c84cc9be0dc1eeb86016970b63c764d8472e", + "url": "https://api.github.com/repos/symfony/dotenv/zipball/815284236cab7d8e1280f53bf562c07a4dfe5954", + "reference": "815284236cab7d8e1280f53bf562c07a4dfe5954", "shasum": "" }, "require": { @@ -2872,7 +2872,7 @@ "environment" ], "support": { - "source": "https://github.com/symfony/dotenv/tree/v6.4.10" + "source": "https://github.com/symfony/dotenv/tree/v6.4.12" }, "funding": [ { @@ -2888,7 +2888,7 @@ "type": "tidelift" } ], - "time": "2024-07-09T18:29:35+00:00" + "time": "2024-09-16T16:01:33+00:00" }, { "name": "symfony/error-handler", @@ -3123,16 +3123,16 @@ }, { "name": "symfony/filesystem", - "version": "v6.4.9", + "version": "v6.4.12", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "b51ef8059159330b74a4d52f68e671033c0fe463" + "reference": "f810e3cbdf7fdc35983968523d09f349fa9ada12" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/b51ef8059159330b74a4d52f68e671033c0fe463", - "reference": "b51ef8059159330b74a4d52f68e671033c0fe463", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/f810e3cbdf7fdc35983968523d09f349fa9ada12", + "reference": "f810e3cbdf7fdc35983968523d09f349fa9ada12", "shasum": "" }, "require": { @@ -3169,7 +3169,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v6.4.9" + "source": "https://github.com/symfony/filesystem/tree/v6.4.12" }, "funding": [ { @@ -3185,7 +3185,7 @@ "type": "tidelift" } ], - "time": "2024-06-28T09:49:33+00:00" + "time": "2024-09-16T16:01:33+00:00" }, { "name": "symfony/finder", @@ -3318,16 +3318,16 @@ }, { "name": "symfony/framework-bundle", - "version": "v6.4.10", + "version": "v6.4.12", "source": { "type": "git", "url": "https://github.com/symfony/framework-bundle.git", - "reference": "6cbdb0cc3ddbb63499262cd3036882b08ee2690b" + "reference": "6a9665bd1fae37b198429775c6132f193339434f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/framework-bundle/zipball/6cbdb0cc3ddbb63499262cd3036882b08ee2690b", - "reference": "6cbdb0cc3ddbb63499262cd3036882b08ee2690b", + "url": "https://api.github.com/repos/symfony/framework-bundle/zipball/6a9665bd1fae37b198429775c6132f193339434f", + "reference": "6a9665bd1fae37b198429775c6132f193339434f", "shasum": "" }, "require": { @@ -3336,7 +3336,7 @@ "php": ">=8.1", "symfony/cache": "^5.4|^6.0|^7.0", "symfony/config": "^6.1|^7.0", - "symfony/dependency-injection": "^6.4|^7.0", + "symfony/dependency-injection": "^6.4.12|^7.0", "symfony/deprecation-contracts": "^2.5|^3", "symfony/error-handler": "^6.1|^7.0", "symfony/event-dispatcher": "^5.4|^6.0|^7.0", @@ -3446,7 +3446,7 @@ "description": "Provides a tight integration between Symfony components and the Symfony full-stack framework", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/framework-bundle/tree/v6.4.10" + "source": "https://github.com/symfony/framework-bundle/tree/v6.4.12" }, "funding": [ { @@ -3462,20 +3462,20 @@ "type": "tidelift" } ], - "time": "2024-07-26T13:24:20+00:00" + "time": "2024-09-20T13:34:56+00:00" }, { "name": "symfony/http-foundation", - "version": "v6.4.10", + "version": "v6.4.12", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "117f1f20a7ade7bcea28b861fb79160a21a1e37b" + "reference": "133ac043875f59c26c55e79cf074562127cce4d2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/117f1f20a7ade7bcea28b861fb79160a21a1e37b", - "reference": "117f1f20a7ade7bcea28b861fb79160a21a1e37b", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/133ac043875f59c26c55e79cf074562127cce4d2", + "reference": "133ac043875f59c26c55e79cf074562127cce4d2", "shasum": "" }, "require": { @@ -3523,7 +3523,7 @@ "description": "Defines an object-oriented layer for the HTTP specification", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-foundation/tree/v6.4.10" + "source": "https://github.com/symfony/http-foundation/tree/v6.4.12" }, "funding": [ { @@ -3539,20 +3539,20 @@ "type": "tidelift" } ], - "time": "2024-07-26T12:36:27+00:00" + "time": "2024-09-20T08:18:25+00:00" }, { "name": "symfony/http-kernel", - "version": "v6.4.11", + "version": "v6.4.12", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "1ba6b89d781cb47448155cc70dd2e0f1b0584c79" + "reference": "96df83d51b5f78804f70c093b97310794fd6257b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/1ba6b89d781cb47448155cc70dd2e0f1b0584c79", - "reference": "1ba6b89d781cb47448155cc70dd2e0f1b0584c79", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/96df83d51b5f78804f70c093b97310794fd6257b", + "reference": "96df83d51b5f78804f70c093b97310794fd6257b", "shasum": "" }, "require": { @@ -3637,7 +3637,7 @@ "description": "Provides a structured process for converting a Request into a Response", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-kernel/tree/v6.4.11" + "source": "https://github.com/symfony/http-kernel/tree/v6.4.12" }, "funding": [ { @@ -3653,7 +3653,7 @@ "type": "tidelift" } ], - "time": "2024-08-30T16:57:20+00:00" + "time": "2024-09-21T06:02:57+00:00" }, { "name": "symfony/polyfill-intl-grapheme", @@ -4048,16 +4048,16 @@ }, { "name": "symfony/routing", - "version": "v6.4.11", + "version": "v6.4.12", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "8ee0c24c1bf61c263a26f1b9b6d19e83b1121f2a" + "reference": "a7c8036bd159486228dc9be3e846a00a0dda9f9f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/8ee0c24c1bf61c263a26f1b9b6d19e83b1121f2a", - "reference": "8ee0c24c1bf61c263a26f1b9b6d19e83b1121f2a", + "url": "https://api.github.com/repos/symfony/routing/zipball/a7c8036bd159486228dc9be3e846a00a0dda9f9f", + "reference": "a7c8036bd159486228dc9be3e846a00a0dda9f9f", "shasum": "" }, "require": { @@ -4111,7 +4111,7 @@ "url" ], "support": { - "source": "https://github.com/symfony/routing/tree/v6.4.11" + "source": "https://github.com/symfony/routing/tree/v6.4.12" }, "funding": [ { @@ -4127,20 +4127,20 @@ "type": "tidelift" } ], - "time": "2024-08-29T08:15:38+00:00" + "time": "2024-09-20T08:32:26+00:00" }, { "name": "symfony/runtime", - "version": "v6.4.8", + "version": "v6.4.12", "source": { "type": "git", "url": "https://github.com/symfony/runtime.git", - "reference": "b4bfa2fd4cad1fee62f80b3dfe4eb674cc3302a0" + "reference": "bfe32a1adf41da4dd7f6b939a039779d7af5497f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/runtime/zipball/b4bfa2fd4cad1fee62f80b3dfe4eb674cc3302a0", - "reference": "b4bfa2fd4cad1fee62f80b3dfe4eb674cc3302a0", + "url": "https://api.github.com/repos/symfony/runtime/zipball/bfe32a1adf41da4dd7f6b939a039779d7af5497f", + "reference": "bfe32a1adf41da4dd7f6b939a039779d7af5497f", "shasum": "" }, "require": { @@ -4190,7 +4190,7 @@ "runtime" ], "support": { - "source": "https://github.com/symfony/runtime/tree/v6.4.8" + "source": "https://github.com/symfony/runtime/tree/v6.4.12" }, "funding": [ { @@ -4206,7 +4206,7 @@ "type": "tidelift" } ], - "time": "2024-05-31T14:49:08+00:00" + "time": "2024-09-19T13:29:10+00:00" }, { "name": "symfony/service-contracts", @@ -4293,16 +4293,16 @@ }, { "name": "symfony/string", - "version": "v6.4.11", + "version": "v6.4.12", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "5bc3eb632cf9c8dbfd6529d89be9950d1518883b" + "reference": "f8a1ccebd0997e16112dfecfd74220b78e5b284b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/5bc3eb632cf9c8dbfd6529d89be9950d1518883b", - "reference": "5bc3eb632cf9c8dbfd6529d89be9950d1518883b", + "url": "https://api.github.com/repos/symfony/string/zipball/f8a1ccebd0997e16112dfecfd74220b78e5b284b", + "reference": "f8a1ccebd0997e16112dfecfd74220b78e5b284b", "shasum": "" }, "require": { @@ -4359,7 +4359,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v6.4.11" + "source": "https://github.com/symfony/string/tree/v6.4.12" }, "funding": [ { @@ -4375,7 +4375,7 @@ "type": "tidelift" } ], - "time": "2024-08-12T09:55:28+00:00" + "time": "2024-09-20T08:15:52+00:00" }, { "name": "symfony/var-dumper", @@ -4541,16 +4541,16 @@ }, { "name": "symfony/yaml", - "version": "v6.4.11", + "version": "v6.4.12", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "be37e7f13195e05ab84ca5269365591edd240335" + "reference": "762ee56b2649659380e0ef4d592d807bc17b7971" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/be37e7f13195e05ab84ca5269365591edd240335", - "reference": "be37e7f13195e05ab84ca5269365591edd240335", + "url": "https://api.github.com/repos/symfony/yaml/zipball/762ee56b2649659380e0ef4d592d807bc17b7971", + "reference": "762ee56b2649659380e0ef4d592d807bc17b7971", "shasum": "" }, "require": { @@ -4593,7 +4593,7 @@ "description": "Loads and dumps YAML files", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/yaml/tree/v6.4.11" + "source": "https://github.com/symfony/yaml/tree/v6.4.12" }, "funding": [ { @@ -4609,7 +4609,7 @@ "type": "tidelift" } ], - "time": "2024-08-12T09:55:28+00:00" + "time": "2024-09-17T12:47:12+00:00" } ], "packages-dev": [], diff --git a/src/Service/Osid/Runtime.php b/src/Service/Osid/Runtime.php index 583b7826..bd7f9fa0 100644 --- a/src/Service/Osid/Runtime.php +++ b/src/Service/Osid/Runtime.php @@ -59,7 +59,7 @@ public function getConfigPath() public function setConfigPath($path) { if (isset($this->configPath) && $this->configPath != $path) { - throw new osid_IllegalStateException('the config path has already been set'); + throw new \osid_IllegalStateException('the config path has already been set'); } $this->configPath = $path; @@ -77,7 +77,7 @@ public function getCourseManager() if (!isset($this->courseManager)) { if (class_exists($this->courseImpl)) { $runtimeManager = $this->getRuntimeManager(); - $this->courseManager = $runtimeManager->getManager(osid_OSID::COURSE(), $this->courseImpl, '3.0.0'); + $this->courseManager = $runtimeManager->getManager(\osid_OSID::COURSE(), $this->courseImpl, '3.0.0'); } else { throw new \InvalidArgumentException("Unknown CourseManger implementation class: " . $this->courseImpl); @@ -98,7 +98,7 @@ public function getCourseManager() public function getRuntimeManager() { if (!isset($this->runtimeManager)) { - $this->runtimeManager = new phpkit_AutoloadOsidRuntimeManager($this->getConfigPath()); + $this->runtimeManager = new \phpkit_AutoloadOsidRuntimeManager($this->getConfigPath()); } return $this->runtimeManager; From 7dc2c46cfb4bbeb3b9d3eb793e429204092dfb64 Mon Sep 17 00:00:00 2001 From: Adam Franco Date: Wed, 25 Sep 2024 11:42:44 -0400 Subject: [PATCH 007/173] #47: Use PSR-0 autoloading for existing code in application/library/ For now we can skip any reorganization, addition of namespaces, and other refactoring of the main data model while getting controllers and views ported over to Symfony. --- composer.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 69741bf5..5e3c3eeb 100644 --- a/composer.json +++ b/composer.json @@ -32,7 +32,8 @@ }, "psr-0": { "osid_": "library/osid-phpkit/", - "phpkit_": "library/osid-phpkit/" + "phpkit_": "library/osid-phpkit/", + "": "application/library/" } }, "autoload-dev": { From 397f6ecc62cc310ab16b2c3cbe4447b9505a15bb Mon Sep 17 00:00:00 2001 From: Adam Franco Date: Wed, 25 Sep 2024 11:44:14 -0400 Subject: [PATCH 008/173] #47: Add symfony/twig-bundle for rendering suppport. --- composer.json | 1 + composer.lock | 352 +++++++++++++++++++++++++++++++++++++- config/bundles.php | 1 + config/packages/twig.yaml | 6 + symfony.lock | 13 ++ templates/base.html.twig | 16 ++ 6 files changed, 388 insertions(+), 1 deletion(-) create mode 100644 config/packages/twig.yaml create mode 100644 templates/base.html.twig diff --git a/composer.json b/composer.json index 5e3c3eeb..b49cb3a4 100644 --- a/composer.json +++ b/composer.json @@ -16,6 +16,7 @@ "symfony/flex": "^2", "symfony/framework-bundle": "6.4.*", "symfony/runtime": "6.4.*", + "symfony/twig-bundle": "6.4.*", "symfony/yaml": "6.4.*" }, "config": { diff --git a/composer.lock b/composer.lock index dceee8e9..053673a8 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "8325de776499155bdf6bc928f31e19d4", + "content-hash": "8e58fec512db5cf782477222ccddae8e", "packages": [ { "name": "brick/math", @@ -4377,6 +4377,277 @@ ], "time": "2024-09-20T08:15:52+00:00" }, + { + "name": "symfony/translation-contracts", + "version": "v3.5.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/translation-contracts.git", + "reference": "b9d2189887bb6b2e0367a9fc7136c5239ab9b05a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/b9d2189887bb6b2e0367a9fc7136c5239ab9b05a", + "reference": "b9d2189887bb6b2e0367a9fc7136c5239ab9b05a", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.5-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\Translation\\": "" + }, + "exclude-from-classmap": [ + "/Test/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Generic abstractions related to translation", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "support": { + "source": "https://github.com/symfony/translation-contracts/tree/v3.5.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-04-18T09:32:20+00:00" + }, + { + "name": "symfony/twig-bridge", + "version": "v6.4.12", + "source": { + "type": "git", + "url": "https://github.com/symfony/twig-bridge.git", + "reference": "09c0df13f822a1b80c5972ca1aa9eeb1288e1194" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/twig-bridge/zipball/09c0df13f822a1b80c5972ca1aa9eeb1288e1194", + "reference": "09c0df13f822a1b80c5972ca1aa9eeb1288e1194", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/translation-contracts": "^2.5|^3", + "twig/twig": "^2.13|^3.0.4" + }, + "conflict": { + "phpdocumentor/reflection-docblock": "<3.2.2", + "phpdocumentor/type-resolver": "<1.4.0", + "symfony/console": "<5.4", + "symfony/form": "<6.3", + "symfony/http-foundation": "<5.4", + "symfony/http-kernel": "<6.4", + "symfony/mime": "<6.2", + "symfony/serializer": "<6.4", + "symfony/translation": "<5.4", + "symfony/workflow": "<5.4" + }, + "require-dev": { + "egulias/email-validator": "^2.1.10|^3|^4", + "league/html-to-markdown": "^5.0", + "phpdocumentor/reflection-docblock": "^3.0|^4.0|^5.0", + "symfony/asset": "^5.4|^6.0|^7.0", + "symfony/asset-mapper": "^6.3|^7.0", + "symfony/console": "^5.4|^6.0|^7.0", + "symfony/dependency-injection": "^5.4|^6.0|^7.0", + "symfony/expression-language": "^5.4|^6.0|^7.0", + "symfony/finder": "^5.4|^6.0|^7.0", + "symfony/form": "^6.4|^7.0", + "symfony/html-sanitizer": "^6.1|^7.0", + "symfony/http-foundation": "^5.4|^6.0|^7.0", + "symfony/http-kernel": "^6.4|^7.0", + "symfony/intl": "^5.4|^6.0|^7.0", + "symfony/mime": "^6.2|^7.0", + "symfony/polyfill-intl-icu": "~1.0", + "symfony/property-info": "^5.4|^6.0|^7.0", + "symfony/routing": "^5.4|^6.0|^7.0", + "symfony/security-acl": "^2.8|^3.0", + "symfony/security-core": "^5.4|^6.0|^7.0", + "symfony/security-csrf": "^5.4|^6.0|^7.0", + "symfony/security-http": "^5.4|^6.0|^7.0", + "symfony/serializer": "^6.4.3|^7.0.3", + "symfony/stopwatch": "^5.4|^6.0|^7.0", + "symfony/translation": "^6.1|^7.0", + "symfony/web-link": "^5.4|^6.0|^7.0", + "symfony/workflow": "^5.4|^6.0|^7.0", + "symfony/yaml": "^5.4|^6.0|^7.0", + "twig/cssinliner-extra": "^2.12|^3", + "twig/inky-extra": "^2.12|^3", + "twig/markdown-extra": "^2.12|^3" + }, + "type": "symfony-bridge", + "autoload": { + "psr-4": { + "Symfony\\Bridge\\Twig\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides integration for Twig with various Symfony components", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/twig-bridge/tree/v6.4.12" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-09-15T06:35:36+00:00" + }, + { + "name": "symfony/twig-bundle", + "version": "v6.4.12", + "source": { + "type": "git", + "url": "https://github.com/symfony/twig-bundle.git", + "reference": "4e63369647e3924e110b37337c6a58aac3086ad4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/twig-bundle/zipball/4e63369647e3924e110b37337c6a58aac3086ad4", + "reference": "4e63369647e3924e110b37337c6a58aac3086ad4", + "shasum": "" + }, + "require": { + "composer-runtime-api": ">=2.1", + "php": ">=8.1", + "symfony/config": "^6.1|^7.0", + "symfony/dependency-injection": "^6.1|^7.0", + "symfony/http-foundation": "^5.4|^6.0|^7.0", + "symfony/http-kernel": "^6.2", + "symfony/twig-bridge": "^6.4", + "twig/twig": "^2.13|^3.0.4" + }, + "conflict": { + "symfony/framework-bundle": "<5.4", + "symfony/translation": "<5.4" + }, + "require-dev": { + "symfony/asset": "^5.4|^6.0|^7.0", + "symfony/expression-language": "^5.4|^6.0|^7.0", + "symfony/finder": "^5.4|^6.0|^7.0", + "symfony/form": "^5.4|^6.0|^7.0", + "symfony/framework-bundle": "^5.4|^6.0|^7.0", + "symfony/routing": "^5.4|^6.0|^7.0", + "symfony/stopwatch": "^5.4|^6.0|^7.0", + "symfony/translation": "^5.4|^6.0|^7.0", + "symfony/web-link": "^5.4|^6.0|^7.0", + "symfony/yaml": "^5.4|^6.0|^7.0" + }, + "type": "symfony-bundle", + "autoload": { + "psr-4": { + "Symfony\\Bundle\\TwigBundle\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides a tight integration of Twig into the Symfony full-stack framework", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/twig-bundle/tree/v6.4.12" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-09-08T12:30:05+00:00" + }, { "name": "symfony/var-dumper", "version": "v6.4.11", @@ -4610,6 +4881,85 @@ } ], "time": "2024-09-17T12:47:12+00:00" + }, + { + "name": "twig/twig", + "version": "v3.14.0", + "source": { + "type": "git", + "url": "https://github.com/twigphp/Twig.git", + "reference": "126b2c97818dbff0cdf3fbfc881aedb3d40aae72" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/126b2c97818dbff0cdf3fbfc881aedb3d40aae72", + "reference": "126b2c97818dbff0cdf3fbfc881aedb3d40aae72", + "shasum": "" + }, + "require": { + "php": ">=8.0.2", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/polyfill-ctype": "^1.8", + "symfony/polyfill-mbstring": "^1.3", + "symfony/polyfill-php81": "^1.29" + }, + "require-dev": { + "psr/container": "^1.0|^2.0", + "symfony/phpunit-bridge": "^5.4.9|^6.4|^7.0" + }, + "type": "library", + "autoload": { + "files": [ + "src/Resources/core.php", + "src/Resources/debug.php", + "src/Resources/escaper.php", + "src/Resources/string_loader.php" + ], + "psr-4": { + "Twig\\": "src/" + } + }, + "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": "Twig Team", + "role": "Contributors" + }, + { + "name": "Armin Ronacher", + "email": "armin.ronacher@active-4.com", + "role": "Project Founder" + } + ], + "description": "Twig, the flexible, fast, and secure template language for PHP", + "homepage": "https://twig.symfony.com", + "keywords": [ + "templating" + ], + "support": { + "issues": "https://github.com/twigphp/Twig/issues", + "source": "https://github.com/twigphp/Twig/tree/v3.14.0" + }, + "funding": [ + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/twig/twig", + "type": "tidelift" + } + ], + "time": "2024-09-09T17:55:12+00:00" } ], "packages-dev": [], diff --git a/config/bundles.php b/config/bundles.php index 49d3fb6f..bdd37acd 100644 --- a/config/bundles.php +++ b/config/bundles.php @@ -2,4 +2,5 @@ return [ Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true], + Symfony\Bundle\TwigBundle\TwigBundle::class => ['all' => true], ]; diff --git a/config/packages/twig.yaml b/config/packages/twig.yaml new file mode 100644 index 00000000..3f795d92 --- /dev/null +++ b/config/packages/twig.yaml @@ -0,0 +1,6 @@ +twig: + file_name_pattern: '*.twig' + +when@test: + twig: + strict_variables: true diff --git a/symfony.lock b/symfony.lock index 9390dfe7..e2f9854a 100644 --- a/symfony.lock +++ b/symfony.lock @@ -87,5 +87,18 @@ "config/packages/routing.yaml", "config/routes.yaml" ] + }, + "symfony/twig-bundle": { + "version": "6.4", + "recipe": { + "repo": "github.com/symfony/recipes", + "branch": "main", + "version": "6.4", + "ref": "cab5fd2a13a45c266d45a7d9337e28dee6272877" + }, + "files": [ + "config/packages/twig.yaml", + "templates/base.html.twig" + ] } } diff --git a/templates/base.html.twig b/templates/base.html.twig new file mode 100644 index 00000000..1069c147 --- /dev/null +++ b/templates/base.html.twig @@ -0,0 +1,16 @@ + + + + + {% block title %}Welcome!{% endblock %} + + {% block stylesheets %} + {% endblock %} + + {% block javascripts %} + {% endblock %} + + + {% block body %}{% endblock %} + + From 2f817fd3818c3a5ca9b2d49983a1d7dea4c4918a Mon Sep 17 00:00:00 2001 From: Adam Franco Date: Wed, 25 Sep 2024 16:19:15 -0400 Subject: [PATCH 009/173] #47: Build out catalog listing template and action. --- .../Action/Helper/AbstractOsidIdentifier.php | 36 -------------- application/views/scripts/catalogs/list.phtml | 10 ---- config/services.yaml | 13 +++++ src/Controller/Catalogs.php | 23 ++++++++- .../Osid/AbstractOsidIdentifierMap.php | 48 +++++++++++++++++++ .../OsidId.php => src/Service/Osid/IdMap.php | 17 +++---- .../Service/Osid/TypeMap.php | 16 +++---- templates/catalogs.html.twig | 4 ++ 8 files changed, 103 insertions(+), 64 deletions(-) delete mode 100755 application/resources/Catalog/Action/Helper/AbstractOsidIdentifier.php delete mode 100755 application/views/scripts/catalogs/list.phtml create mode 100755 src/Service/Osid/AbstractOsidIdentifierMap.php rename application/resources/Catalog/Action/Helper/OsidId.php => src/Service/Osid/IdMap.php (70%) rename application/resources/Catalog/Action/Helper/OsidType.php => src/Service/Osid/TypeMap.php (69%) create mode 100755 templates/catalogs.html.twig diff --git a/application/resources/Catalog/Action/Helper/AbstractOsidIdentifier.php b/application/resources/Catalog/Action/Helper/AbstractOsidIdentifier.php deleted file mode 100755 index 5e25f935..00000000 --- a/application/resources/Catalog/Action/Helper/AbstractOsidIdentifier.php +++ /dev/null @@ -1,36 +0,0 @@ -config; - $authority = (string) $config->catalog->shorten_ids_for_authority; - if (strlen($authority)) { - self::$idAuthorityToShorten = $authority; - } else { - self::$idAuthorityToShorten = false; - } - } - - return self::$idAuthorityToShorten; - } -} diff --git a/application/views/scripts/catalogs/list.phtml b/application/views/scripts/catalogs/list.phtml deleted file mode 100755 index e65604fb..00000000 --- a/application/views/scripts/catalogs/list.phtml +++ /dev/null @@ -1,10 +0,0 @@ - 'catalogs', - 'action' => 'view'); - -while ($this->catalogs->hasNext()) { - $catalog = $this->catalogs->getNextCourseCatalog(); - $params['catalog'] = $this->getStringFromOsidId($catalog->getId()); - print "\n\t

".$catalog->getDisplayName()."

"; - print "\n\t
".$catalog->getDescription()."
"; -} diff --git a/config/services.yaml b/config/services.yaml index f74c9d3e..70e52634 100644 --- a/config/services.yaml +++ b/config/services.yaml @@ -5,6 +5,7 @@ # https://symfony.com/doc/current/best_practices.html#use-parameters-for-application-configuration parameters: app.osid.runtime.courseimpl: 'banner_course_CourseManager' + app.osid.id.authority_to_shorten: 'middlebury.edu' services: # default configuration for services in *this* file @@ -29,6 +30,18 @@ services: $configPath: '../configuration.plist' $courseImpl: '%app.osid.runtime.courseimpl%' + App\Service\Osid\IdMap: + arguments: + $idAuthorityToShorten: '%app.osid.id.authority_to_shorten%' + + App\Service\Osid\TypeMap: + arguments: + $idAuthorityToShorten: '%app.osid.id.authority_to_shorten%' + # Service aliases. osid.runtime: class: App\Service\Osid\Runtime + osid.id_map: + class: App\Service\Osid\IdMap + osid.type_map: + class: App\Service\Osid\TypeMap diff --git a/src/Controller/Catalogs.php b/src/Controller/Catalogs.php index e7c5f3ac..ebf61a5e 100755 --- a/src/Controller/Catalogs.php +++ b/src/Controller/Catalogs.php @@ -9,6 +9,7 @@ namespace App\Controller; use App\Service\Osid\Runtime; +use App\Service\Osid\IdMap; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\Routing\Annotation\Route; @@ -29,14 +30,22 @@ class Catalogs extends AbstractController */ private $osidRuntime; + /** + * @var \App\Service\Osid\IdMap + */ + private $osidIdMap; + /** * Construct a new Catalogs controller. * * @param \App\Service\Osid\Runtime $osidRuntime * The osid.runtime service. + * @param \App\Service\Osid\Identifier $osidIdentifier + * The osid.identifier service. */ - public function __construct(Runtime $osidRuntime) { + public function __construct(Runtime $osidRuntime, IdMap $osidIdMap) { $this->osidRuntime = $osidRuntime; + $this->osidIdMap = $osidIdMap; } #[Route('/catalogs/', name: 'List all catalogs')] @@ -44,9 +53,19 @@ public function listAction() { $lookupSession = $this->osidRuntime->getCourseManager()->getCourseCatalogLookupSession(); + $catalogs = $lookupSession->getCourseCatalogs(); + $catalogData = []; + while ($catalogs->hasNext()) { + $catalog = $catalogs->getNextCourseCatalog(); + $catalogData[] = [ + "id" => $this->osidIdMap->toString($catalog->getId()), + "display_name" => $catalog->getDisplayName(), + "description" => $catalog->getDescription(), + ]; + } return $this->render('catalogs.html.twig', [ 'title' => 'Available Catalogs', - 'catalogs' => $lookupSession->getCourseCatalogs(), + 'catalogs' => $catalogData, ]); } diff --git a/src/Service/Osid/AbstractOsidIdentifierMap.php b/src/Service/Osid/AbstractOsidIdentifierMap.php new file mode 100755 index 00000000..6c273191 --- /dev/null +++ b/src/Service/Osid/AbstractOsidIdentifierMap.php @@ -0,0 +1,48 @@ +idAuthorityToShorten = $idAuthorityToShorten; + } + + /** + * Answer the id-authority for whom ids should be shortened. + * + * @return mixed string or false if none should be shortened + * + * @since 6/16/09 + */ + protected function getIdAuthorityToShorten() + { + if (isset($this->idAuthorityToShorten)) { + return $this->idAuthorityToShorten; + } + else { + return FALSE; + } + } + +} diff --git a/application/resources/Catalog/Action/Helper/OsidId.php b/src/Service/Osid/IdMap.php similarity index 70% rename from application/resources/Catalog/Action/Helper/OsidId.php rename to src/Service/Osid/IdMap.php index 17f225f0..c22f7007 100755 --- a/application/resources/Catalog/Action/Helper/OsidId.php +++ b/src/Service/Osid/IdMap.php @@ -1,15 +1,16 @@ getIdAuthorityToShorten()) { - return new phpkit_id_Id($this->getIdAuthorityToShorten(), 'urn', $idString); + return new \phpkit_id_Id($this->getIdAuthorityToShorten(), 'urn', $idString); } else { throw $e; } @@ -39,14 +40,14 @@ public function fromString($idString) * * @since 4/21/09 */ - public function toString(osid_id_Id $id) + public function toString(\osid_id_Id $id) { if ($this->getIdAuthorityToShorten() && 'urn' == strtolower($id->getIdentifierNamespace()) && strtolower($id->getAuthority()) == $this->getIdAuthorityToShorten()) { return $id->getIdentifier(); } else { - return phpkit_id_URNInetId::getInetURNString($id); + return \phpkit_id_URNInetId::getInetURNString($id); } } } diff --git a/application/resources/Catalog/Action/Helper/OsidType.php b/src/Service/Osid/TypeMap.php similarity index 69% rename from application/resources/Catalog/Action/Helper/OsidType.php rename to src/Service/Osid/TypeMap.php index 26120029..584defac 100755 --- a/application/resources/Catalog/Action/Helper/OsidType.php +++ b/src/Service/Osid/TypeMap.php @@ -1,14 +1,14 @@ getIdAuthorityToShorten()) { - return new phpkit_type_Type('urn', $this->getIdAuthorityToShorten(), $idString); + return new \phpkit_type_Type('urn', $this->getIdAuthorityToShorten(), $idString); } else { throw $e; } @@ -39,14 +39,14 @@ public function fromString($idString) * * @since 4/21/09 */ - public function toString(osid_type_Type $type) + public function toString(\osid_type_Type $type) { if ($this->getIdAuthorityToShorten() && 'urn' == strtolower($type->getIdentifierNamespace()) && strtolower($type->getAuthority()) == $this->getIdAuthorityToShorten()) { return $type->getIdentifier(); } else { - return phpkit_type_URNInetType::getInetURNString($type); + return \phpkit_type_URNInetType::getInetURNString($type); } } } diff --git a/templates/catalogs.html.twig b/templates/catalogs.html.twig new file mode 100755 index 00000000..e34022c4 --- /dev/null +++ b/templates/catalogs.html.twig @@ -0,0 +1,4 @@ +{% for catalog in catalogs %} +

{{ catalog.display_name }}

+
{{ catalog.description }}
+{% endfor %} From 7d015dbca2517a233e7f7fa23c8d5168c3ea3a4a Mon Sep 17 00:00:00 2001 From: Adam Franco Date: Thu, 26 Sep 2024 14:06:00 -0400 Subject: [PATCH 010/173] Add Lando config to set up local dev environment. --- .lando.yml | 39 +++++++++++++++++++++++++++++++++++++++ README.md | 34 +++++++++++++++++++++++++++++----- 2 files changed, 68 insertions(+), 5 deletions(-) create mode 100644 .lando.yml diff --git a/.lando.yml b/.lando.yml new file mode 100644 index 00000000..24aa9b52 --- /dev/null +++ b/.lando.yml @@ -0,0 +1,39 @@ +name: coursecatalog +recipe: symfony +config: + webroot: public + php: 8.1 +services: + appserver: + build_as_root: + - apt update + - mkdir /opt/oracle + # Fetch binaries directly from Oracle: + # https://www.oracle.com/database/technologies/instant-client/downloads.html + - curl https://download.oracle.com/otn_software/linux/instantclient/191000/instantclient-basic-linux.arm64-19.10.0.0.0dbru-2.zip > /opt/oracle/instantclient-basic.zip + - curl https://download.oracle.com/otn_software/linux/instantclient/191000/instantclient-sdk-linux.arm64-19.10.0.0.0dbru.zip > /opt/oracle/instantclient-sdk.zip + # Unzip + - unzip /opt/oracle/instantclient-basic.zip -d /opt/oracle + - unzip /opt/oracle/instantclient-sdk.zip -d /opt/oracle + # Add sqlplus command line Oracle client for debugging. + - curl https://download.oracle.com/otn_software/linux/instantclient/191000/instantclient-sqlplus-linux.arm64-19.10.0.0.0dbru.zip > /opt/oracle/instantclient-sqlplus.zip + - unzip /opt/oracle/instantclient-sqlplus.zip -d /opt/oracle + # Delete all of our downloads. + - rm /opt/oracle/*.zip + # Make OS aware of newly installed libraries + - echo /opt/oracle/instantclient_19_10 > /etc/ld.so.conf.d/oracle-instantclient.conf + - ldconfig -v + # Set the interpreter for the Oracle command-line tools. + # See: https://askubuntu.com/questions/1397724/no-such-file-or-directory-when-running-sqlplus-command + # This is not needed for the Oci8 PHP extension itself, but is needed to + # get sqlplus command-line Oracle client working for debugging. + - apt -y install patchelf + - patchelf --set-interpreter /lib/ld-linux-aarch64.so.1 /opt/oracle/instantclient_19_10/adrci + - patchelf --set-interpreter /lib/ld-linux-aarch64.so.1 /opt/oracle/instantclient_19_10/genezi + - patchelf --set-interpreter /lib/ld-linux-aarch64.so.1 /opt/oracle/instantclient_19_10/sqlplus + - patchelf --set-interpreter /lib/ld-linux-aarch64.so.1 /opt/oracle/instantclient_19_10/uidrvci + # Install libaio1 -- when missing was preventing the extension from loading. + - apt install libaio1 + # Install and enable OCI8 + - echo "instantclient,/opt/oracle/instantclient_19_10" | pecl install oci8-3.2.1 + - docker-php-ext-enable oci8 diff --git a/README.md b/README.md index 92005a27..1235ac72 100644 --- a/README.md +++ b/README.md @@ -39,16 +39,40 @@ These instructions assume that you have a POSIX machine running Apache with PHP cd coursecatalog git-submodule update --init --recursive ``` -3. Make a symbolic link to the `coursecatalog/docroot/` directory in a web-accessible directory or add a virtualhost rooted in the `coursecatalog/docroot/` directory. -4. Create a MySQL database for the catalogs data and a cache of Banner data. -5. Make copies of the example config files at `configuration.plist`, `frontend_config.ini`, and `update_config.ini` and edit values to match your environment. -6. Create the database tables defined in `application/library/banner/course/sql/table_creation.sql` -7. Run the script at `bin/update-from-banner.php` to dump Banner data into the the MySQL database: +3. Install additional dependencies with Composer: + ``` + composer install + ``` +4. Make a symbolic link to the `coursecatalog/docroot/` directory in a web-accessible directory or add a virtualhost rooted in the `coursecatalog/docroot/` directory. +5. Create a MySQL database for the catalogs data and a cache of Banner data. +6. Make copies of the example config files at `configuration.plist`, `frontend_config.ini`, and `update_config.ini` and edit values to match your environment. +7. Create the database tables defined in `application/library/banner/course/sql/table_creation.sql` +8. Run the script at `bin/update-from-banner.php` to dump Banner data into the the MySQL database: ``` php bin/update-from-banner.php php bin/build_indices.php ``` +## Development environment setup + +### Lando +Install Docker and Lando to provide a local containerized environment + +In the code directory, start the local containers with `lando start` + +### Copying the production database +Dump the production database to a non version-controlled file path like `var/catalog_prod.sql`. + +Strip out any `DEFINER` statements that will break the import: +``` +sed -i '' 's/DEFINER=[^*]*\*/\*/g' var/catalog_prod.sql +``` + +Import the database into the local container: +``` +lando db-import var/catalog_prod.sql +``` + Unit Tests ---------- From 3a902308dbb608f99a9256ec3fe95fa68785895a Mon Sep 17 00:00:00 2001 From: Adam Franco Date: Thu, 26 Sep 2024 17:10:49 -0400 Subject: [PATCH 011/173] #47: Add PHPUnit as a dev dependency. --- .env.test | 6 + .gitignore | 10 + application/test/banner/configuration.plist | 6 +- bin/phpunit | 23 + composer.json | 6 + composer.lock | 2097 ++++++++++++++++++- phpunit.xml.dist | 38 + symfony.lock | 29 + tests/bootstrap.php | 13 + 9 files changed, 2222 insertions(+), 6 deletions(-) create mode 100644 .env.test create mode 100755 bin/phpunit create mode 100644 phpunit.xml.dist create mode 100644 tests/bootstrap.php diff --git a/.env.test b/.env.test new file mode 100644 index 00000000..9e7162f0 --- /dev/null +++ b/.env.test @@ -0,0 +1,6 @@ +# define your env variables for the test env here +KERNEL_CLASS='App\Kernel' +APP_SECRET='$ecretf0rt3st' +SYMFONY_DEPRECATIONS_HELPER=999999 +PANTHER_APP_ENV=panther +PANTHER_ERROR_SCREENSHOT_DIR=./var/error-screenshots diff --git a/.gitignore b/.gitignore index 92027b3a..5b53f395 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,13 @@ vendor/ /var/ /vendor/ ###< symfony/framework-bundle ### + +###> symfony/phpunit-bridge ### +.phpunit.result.cache +/phpunit.xml +###< symfony/phpunit-bridge ### + +###> phpunit/phpunit ### +/phpunit.xml +.phpunit.result.cache +###< phpunit/phpunit ### diff --git a/application/test/banner/configuration.plist b/application/test/banner/configuration.plist index 81e4df0b..1feea851 100755 --- a/application/test/banner/configuration.plist +++ b/application/test/banner/configuration.plist @@ -7,11 +7,11 @@ urn:inet:middlebury.edu:config:banner_course/pdo_count_queries urn:inet:middlebury.edu:config:banner_course/pdo_dsn - mysql:dbname=afranco_catalog_test;host=localhost + mysql:dbname=symfony_test;host=database urn:inet:middlebury.edu:config:banner_course/pdo_password - testpassword + symfony urn:inet:middlebury.edu:config:banner_course/pdo_username - testuser + symfony urn:inet:middlebury.edu:config:apc_course/impl_class_name banner_course_CourseManager diff --git a/bin/phpunit b/bin/phpunit new file mode 100755 index 00000000..692baccb --- /dev/null +++ b/bin/phpunit @@ -0,0 +1,23 @@ +#!/usr/bin/env php += 80000) { + require dirname(__DIR__).'/vendor/phpunit/phpunit/phpunit'; + } else { + define('PHPUNIT_COMPOSER_INSTALL', dirname(__DIR__).'/vendor/autoload.php'); + require PHPUNIT_COMPOSER_INSTALL; + PHPUnit\TextUI\Command::main(); + } +} else { + if (!is_file(dirname(__DIR__).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php')) { + echo "Unable to find the `simple-phpunit.php` script in `vendor/symfony/phpunit-bridge/bin/`.\n"; + exit(1); + } + + require dirname(__DIR__).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php'; +} diff --git a/composer.json b/composer.json index b49cb3a4..8835e682 100644 --- a/composer.json +++ b/composer.json @@ -71,5 +71,11 @@ "allow-contrib": true, "require": "6.4.*" } + }, + "require-dev": { + "phpunit/phpunit": "^9.5", + "symfony/browser-kit": "6.4.*", + "symfony/css-selector": "6.4.*", + "symfony/phpunit-bridge": "^7.1" } } diff --git a/composer.lock b/composer.lock index 053673a8..fd9f847d 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "8e58fec512db5cf782477222ccddae8e", + "content-hash": "9bd5f77b184c4d6a6ff281752fa68768", "packages": [ { "name": "brick/math", @@ -4962,7 +4962,2098 @@ "time": "2024-09-09T17:55:12+00:00" } ], - "packages-dev": [], + "packages-dev": [ + { + "name": "doctrine/instantiator", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/c6222283fa3f4ac679f8b9ced9a4e23f163e80d0", + "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0", + "shasum": "" + }, + "require": { + "php": "^8.1" + }, + "require-dev": { + "doctrine/coding-standard": "^11", + "ext-pdo": "*", + "ext-phar": "*", + "phpbench/phpbench": "^1.2", + "phpstan/phpstan": "^1.9.4", + "phpstan/phpstan-phpunit": "^1.3", + "phpunit/phpunit": "^9.5.27", + "vimeo/psalm": "^5.4" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "https://ocramius.github.io/" + } + ], + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://www.doctrine-project.org/projects/instantiator.html", + "keywords": [ + "constructor", + "instantiate" + ], + "support": { + "issues": "https://github.com/doctrine/instantiator/issues", + "source": "https://github.com/doctrine/instantiator/tree/2.0.0" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", + "type": "tidelift" + } + ], + "time": "2022-12-30T00:23:10+00:00" + }, + { + "name": "masterminds/html5", + "version": "2.9.0", + "source": { + "type": "git", + "url": "https://github.com/Masterminds/html5-php.git", + "reference": "f5ac2c0b0a2eefca70b2ce32a5809992227e75a6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Masterminds/html5-php/zipball/f5ac2c0b0a2eefca70b2ce32a5809992227e75a6", + "reference": "f5ac2c0b0a2eefca70b2ce32a5809992227e75a6", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "php": ">=5.3.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35 || ^5.7.21 || ^6 || ^7 || ^8 || ^9" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.7-dev" + } + }, + "autoload": { + "psr-4": { + "Masterminds\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Matt Butcher", + "email": "technosophos@gmail.com" + }, + { + "name": "Matt Farina", + "email": "matt@mattfarina.com" + }, + { + "name": "Asmir Mustafic", + "email": "goetas@gmail.com" + } + ], + "description": "An HTML5 parser and serializer.", + "homepage": "http://masterminds.github.io/html5-php", + "keywords": [ + "HTML5", + "dom", + "html", + "parser", + "querypath", + "serializer", + "xml" + ], + "support": { + "issues": "https://github.com/Masterminds/html5-php/issues", + "source": "https://github.com/Masterminds/html5-php/tree/2.9.0" + }, + "time": "2024-03-31T07:05:07+00:00" + }, + { + "name": "myclabs/deep-copy", + "version": "1.12.0", + "source": { + "type": "git", + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c", + "reference": "3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "conflict": { + "doctrine/collections": "<1.6.8", + "doctrine/common": "<2.13.3 || >=3 <3.2.2" + }, + "require-dev": { + "doctrine/collections": "^1.6.8", + "doctrine/common": "^2.13.3 || ^3.2.2", + "phpspec/prophecy": "^1.10", + "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" + }, + "type": "library", + "autoload": { + "files": [ + "src/DeepCopy/deep_copy.php" + ], + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Create deep copies (clones) of your objects", + "keywords": [ + "clone", + "copy", + "duplicate", + "object", + "object graph" + ], + "support": { + "issues": "https://github.com/myclabs/DeepCopy/issues", + "source": "https://github.com/myclabs/DeepCopy/tree/1.12.0" + }, + "funding": [ + { + "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", + "type": "tidelift" + } + ], + "time": "2024-06-12T14:39:25+00:00" + }, + { + "name": "nikic/php-parser", + "version": "v5.2.0", + "source": { + "type": "git", + "url": "https://github.com/nikic/PHP-Parser.git", + "reference": "23c79fbbfb725fb92af9bcf41065c8e9a0d49ddb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/23c79fbbfb725fb92af9bcf41065c8e9a0d49ddb", + "reference": "23c79fbbfb725fb92af9bcf41065c8e9a0d49ddb", + "shasum": "" + }, + "require": { + "ext-ctype": "*", + "ext-json": "*", + "ext-tokenizer": "*", + "php": ">=7.4" + }, + "require-dev": { + "ircmaxell/php-yacc": "^0.0.7", + "phpunit/phpunit": "^9.0" + }, + "bin": [ + "bin/php-parse" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, + "autoload": { + "psr-4": { + "PhpParser\\": "lib/PhpParser" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Nikita Popov" + } + ], + "description": "A PHP parser written in PHP", + "keywords": [ + "parser", + "php" + ], + "support": { + "issues": "https://github.com/nikic/PHP-Parser/issues", + "source": "https://github.com/nikic/PHP-Parser/tree/v5.2.0" + }, + "time": "2024-09-15T16:40:33+00:00" + }, + { + "name": "phar-io/manifest", + "version": "2.0.4", + "source": { + "type": "git", + "url": "https://github.com/phar-io/manifest.git", + "reference": "54750ef60c58e43759730615a392c31c80e23176" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/54750ef60c58e43759730615a392c31c80e23176", + "reference": "54750ef60c58e43759730615a392c31c80e23176", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-libxml": "*", + "ext-phar": "*", + "ext-xmlwriter": "*", + "phar-io/version": "^3.0.1", + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", + "support": { + "issues": "https://github.com/phar-io/manifest/issues", + "source": "https://github.com/phar-io/manifest/tree/2.0.4" + }, + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2024-03-03T12:33:53+00:00" + }, + { + "name": "phar-io/version", + "version": "3.2.1", + "source": { + "type": "git", + "url": "https://github.com/phar-io/version.git", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Library for handling version information and constraints", + "support": { + "issues": "https://github.com/phar-io/version/issues", + "source": "https://github.com/phar-io/version/tree/3.2.1" + }, + "time": "2022-02-21T01:04:05+00:00" + }, + { + "name": "phpunit/php-code-coverage", + "version": "9.2.32", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "85402a822d1ecf1db1096959413d35e1c37cf1a5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/85402a822d1ecf1db1096959413d35e1c37cf1a5", + "reference": "85402a822d1ecf1db1096959413d35e1c37cf1a5", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-libxml": "*", + "ext-xmlwriter": "*", + "nikic/php-parser": "^4.19.1 || ^5.1.0", + "php": ">=7.3", + "phpunit/php-file-iterator": "^3.0.6", + "phpunit/php-text-template": "^2.0.4", + "sebastian/code-unit-reverse-lookup": "^2.0.3", + "sebastian/complexity": "^2.0.3", + "sebastian/environment": "^5.1.5", + "sebastian/lines-of-code": "^1.0.4", + "sebastian/version": "^3.0.2", + "theseer/tokenizer": "^1.2.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.6" + }, + "suggest": { + "ext-pcov": "PHP extension that provides line coverage", + "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "9.2.x-dev" + } + }, + "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 provides collection, processing, and rendering functionality for PHP code coverage information.", + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "keywords": [ + "coverage", + "testing", + "xunit" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", + "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.32" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-08-22T04:23:01+00:00" + }, + { + "name": "phpunit/php-file-iterator", + "version": "3.0.6", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", + "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.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" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.6" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-12-02T12:48:52+00:00" + }, + { + "name": "phpunit/php-invoker", + "version": "3.1.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-invoker.git", + "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "ext-pcntl": "*", + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-pcntl": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Invoke callables with a timeout", + "homepage": "https://github.com/sebastianbergmann/php-invoker/", + "keywords": [ + "process" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-invoker/issues", + "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:58:55+00:00" + }, + { + "name": "phpunit/php-text-template", + "version": "2.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "keywords": [ + "template" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-text-template/issues", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T05:33:50+00:00" + }, + { + "name": "phpunit/php-timer", + "version": "5.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", + "keywords": [ + "timer" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-timer/issues", + "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:16:10+00:00" + }, + { + "name": "phpunit/phpunit", + "version": "9.6.21", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "de6abf3b6f8dd955fac3caad3af7a9504e8c2ffa" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/de6abf3b6f8dd955fac3caad3af7a9504e8c2ffa", + "reference": "de6abf3b6f8dd955fac3caad3af7a9504e8c2ffa", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.5.0 || ^2", + "ext-dom": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-xml": "*", + "ext-xmlwriter": "*", + "myclabs/deep-copy": "^1.12.0", + "phar-io/manifest": "^2.0.4", + "phar-io/version": "^3.2.1", + "php": ">=7.3", + "phpunit/php-code-coverage": "^9.2.32", + "phpunit/php-file-iterator": "^3.0.6", + "phpunit/php-invoker": "^3.1.1", + "phpunit/php-text-template": "^2.0.4", + "phpunit/php-timer": "^5.0.3", + "sebastian/cli-parser": "^1.0.2", + "sebastian/code-unit": "^1.0.8", + "sebastian/comparator": "^4.0.8", + "sebastian/diff": "^4.0.6", + "sebastian/environment": "^5.1.5", + "sebastian/exporter": "^4.0.6", + "sebastian/global-state": "^5.0.7", + "sebastian/object-enumerator": "^4.0.4", + "sebastian/resource-operations": "^3.0.4", + "sebastian/type": "^3.2.1", + "sebastian/version": "^3.0.2" + }, + "suggest": { + "ext-soap": "To be able to generate mocks based on WSDL files", + "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" + }, + "bin": [ + "phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "9.6-dev" + } + }, + "autoload": { + "files": [ + "src/Framework/Assert/Functions.php" + ], + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "The PHP Unit Testing framework.", + "homepage": "https://phpunit.de/", + "keywords": [ + "phpunit", + "testing", + "xunit" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/phpunit/issues", + "security": "https://github.com/sebastianbergmann/phpunit/security/policy", + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.21" + }, + "funding": [ + { + "url": "https://phpunit.de/sponsors.html", + "type": "custom" + }, + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit", + "type": "tidelift" + } + ], + "time": "2024-09-19T10:50:18+00:00" + }, + { + "name": "sebastian/cli-parser", + "version": "1.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/cli-parser.git", + "reference": "2b56bea83a09de3ac06bb18b92f068e60cc6f50b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/2b56bea83a09de3ac06bb18b92f068e60cc6f50b", + "reference": "2b56bea83a09de3ac06bb18b92f068e60cc6f50b", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "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 for parsing CLI options", + "homepage": "https://github.com/sebastianbergmann/cli-parser", + "support": { + "issues": "https://github.com/sebastianbergmann/cli-parser/issues", + "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-03-02T06:27:43+00:00" + }, + { + "name": "sebastian/code-unit", + "version": "1.0.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit.git", + "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120", + "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the PHP code units", + "homepage": "https://github.com/sebastianbergmann/code-unit", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit/issues", + "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:08:54+00:00" + }, + { + "name": "sebastian/code-unit-reverse-lookup", + "version": "2.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Looks up which function or method a line of code belongs to", + "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:30:19+00:00" + }, + { + "name": "sebastian/comparator", + "version": "4.0.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "fa0f136dd2334583309d32b62544682ee972b51a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/fa0f136dd2334583309d32b62544682ee972b51a", + "reference": "fa0f136dd2334583309d32b62544682ee972b51a", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/diff": "^4.0", + "sebastian/exporter": "^4.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + } + ], + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "https://github.com/sebastianbergmann/comparator", + "keywords": [ + "comparator", + "compare", + "equality" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/comparator/issues", + "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.8" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2022-09-14T12:41:17+00:00" + }, + { + "name": "sebastian/complexity", + "version": "2.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/complexity.git", + "reference": "25f207c40d62b8b7aa32f5ab026c53561964053a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/25f207c40d62b8b7aa32f5ab026c53561964053a", + "reference": "25f207c40d62b8b7aa32f5ab026c53561964053a", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^4.18 || ^5.0", + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "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 for calculating the complexity of PHP code units", + "homepage": "https://github.com/sebastianbergmann/complexity", + "support": { + "issues": "https://github.com/sebastianbergmann/complexity/issues", + "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-12-22T06:19:30+00:00" + }, + { + "name": "sebastian/diff", + "version": "4.0.6", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/ba01945089c3a293b01ba9badc29ad55b106b0bc", + "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3", + "symfony/process": "^4.2 || ^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + } + ], + "description": "Diff implementation", + "homepage": "https://github.com/sebastianbergmann/diff", + "keywords": [ + "diff", + "udiff", + "unidiff", + "unified diff" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/diff/issues", + "source": "https://github.com/sebastianbergmann/diff/tree/4.0.6" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-03-02T06:30:58+00:00" + }, + { + "name": "sebastian/environment", + "version": "5.1.5", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", + "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-posix": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.1-dev" + } + }, + "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" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/environment/issues", + "source": "https://github.com/sebastianbergmann/environment/tree/5.1.5" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-03T06:03:51+00:00" + }, + { + "name": "sebastian/exporter", + "version": "4.0.6", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "78c00df8f170e02473b682df15bfcdacc3d32d72" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/78c00df8f170e02473b682df15bfcdacc3d32d72", + "reference": "78c00df8f170e02473b682df15bfcdacc3d32d72", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/recursion-context": "^4.0" + }, + "require-dev": { + "ext-mbstring": "*", + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "https://www.github.com/sebastianbergmann/exporter", + "keywords": [ + "export", + "exporter" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/exporter/issues", + "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.6" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-03-02T06:33:00+00:00" + }, + { + "name": "sebastian/global-state", + "version": "5.0.7", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9", + "reference": "bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" + }, + "require-dev": { + "ext-dom": "*", + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-uopz": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Snapshotting of global state", + "homepage": "http://www.github.com/sebastianbergmann/global-state", + "keywords": [ + "global state" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/global-state/issues", + "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.7" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-03-02T06:35:11+00:00" + }, + { + "name": "sebastian/lines-of-code", + "version": "1.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/lines-of-code.git", + "reference": "e1e4a170560925c26d424b6a03aed157e7dcc5c5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/e1e4a170560925c26d424b6a03aed157e7dcc5c5", + "reference": "e1e4a170560925c26d424b6a03aed157e7dcc5c5", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^4.18 || ^5.0", + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "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 for counting the lines of code in PHP source code", + "homepage": "https://github.com/sebastianbergmann/lines-of-code", + "support": { + "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-12-22T06:20:34+00:00" + }, + { + "name": "sebastian/object-enumerator", + "version": "4.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-enumerator.git", + "reference": "5c9eeac41b290a3712d88851518825ad78f45c71" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71", + "reference": "5c9eeac41b290a3712d88851518825ad78f45c71", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Traverses array structures and object graphs to enumerate all referenced objects", + "homepage": "https://github.com/sebastianbergmann/object-enumerator/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:12:34+00:00" + }, + { + "name": "sebastian/object-reflector", + "version": "2.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-reflector.git", + "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", + "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Allows reflection of object attributes, including inherited and non-public ones", + "homepage": "https://github.com/sebastianbergmann/object-reflector/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-reflector/issues", + "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:14:26+00:00" + }, + { + "name": "sebastian/recursion-context", + "version": "4.0.5", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1", + "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides functionality to recursively process PHP variables", + "homepage": "https://github.com/sebastianbergmann/recursion-context", + "support": { + "issues": "https://github.com/sebastianbergmann/recursion-context/issues", + "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.5" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-03T06:07:39+00:00" + }, + { + "name": "sebastian/resource-operations", + "version": "3.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/resource-operations.git", + "reference": "05d5692a7993ecccd56a03e40cd7e5b09b1d404e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/05d5692a7993ecccd56a03e40cd7e5b09b1d404e", + "reference": "05d5692a7993ecccd56a03e40cd7e5b09b1d404e", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides a list of PHP built-in functions that operate on resources", + "homepage": "https://www.github.com/sebastianbergmann/resource-operations", + "support": { + "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-03-14T16:00:52+00:00" + }, + { + "name": "sebastian/type", + "version": "3.2.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/type.git", + "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", + "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the types of the PHP type system", + "homepage": "https://github.com/sebastianbergmann/type", + "support": { + "issues": "https://github.com/sebastianbergmann/type/issues", + "source": "https://github.com/sebastianbergmann/type/tree/3.2.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-03T06:13:03+00:00" + }, + { + "name": "sebastian/version", + "version": "3.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "c6c1022351a901512170118436c764e473f6de8c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c", + "reference": "c6c1022351a901512170118436c764e473f6de8c", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "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", + "support": { + "issues": "https://github.com/sebastianbergmann/version/issues", + "source": "https://github.com/sebastianbergmann/version/tree/3.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:39:44+00:00" + }, + { + "name": "symfony/browser-kit", + "version": "v6.4.8", + "source": { + "type": "git", + "url": "https://github.com/symfony/browser-kit.git", + "reference": "62ab90b92066ef6cce5e79365625b4b1432464c8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/browser-kit/zipball/62ab90b92066ef6cce5e79365625b4b1432464c8", + "reference": "62ab90b92066ef6cce5e79365625b4b1432464c8", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/dom-crawler": "^5.4|^6.0|^7.0" + }, + "require-dev": { + "symfony/css-selector": "^5.4|^6.0|^7.0", + "symfony/http-client": "^5.4|^6.0|^7.0", + "symfony/mime": "^5.4|^6.0|^7.0", + "symfony/process": "^5.4|^6.0|^7.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\BrowserKit\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Simulates the behavior of a web browser, allowing you to make requests, click on links and submit forms programmatically", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/browser-kit/tree/v6.4.8" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-05-31T14:49:08+00:00" + }, + { + "name": "symfony/css-selector", + "version": "v6.4.8", + "source": { + "type": "git", + "url": "https://github.com/symfony/css-selector.git", + "reference": "4b61b02fe15db48e3687ce1c45ea385d1780fe08" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/4b61b02fe15db48e3687ce1c45ea385d1780fe08", + "reference": "4b61b02fe15db48e3687ce1c45ea385d1780fe08", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\CssSelector\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Jean-François Simon", + "email": "jeanfrancois.simon@sensiolabs.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Converts CSS selectors to XPath expressions", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/css-selector/tree/v6.4.8" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-05-31T14:49:08+00:00" + }, + { + "name": "symfony/dom-crawler", + "version": "v6.4.12", + "source": { + "type": "git", + "url": "https://github.com/symfony/dom-crawler.git", + "reference": "9d307ecbcb917001692be333cdc58f474fdb37f0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/9d307ecbcb917001692be333cdc58f474fdb37f0", + "reference": "9d307ecbcb917001692be333cdc58f474fdb37f0", + "shasum": "" + }, + "require": { + "masterminds/html5": "^2.6", + "php": ">=8.1", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-mbstring": "~1.0" + }, + "require-dev": { + "symfony/css-selector": "^5.4|^6.0|^7.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\DomCrawler\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Eases DOM navigation for HTML and XML documents", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/dom-crawler/tree/v6.4.12" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-09-15T06:35:36+00:00" + }, + { + "name": "symfony/phpunit-bridge", + "version": "v7.1.4", + "source": { + "type": "git", + "url": "https://github.com/symfony/phpunit-bridge.git", + "reference": "e876eb90e32a8fc4c4911d458e09f88d65877d1c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/phpunit-bridge/zipball/e876eb90e32a8fc4c4911d458e09f88d65877d1c", + "reference": "e876eb90e32a8fc4c4911d458e09f88d65877d1c", + "shasum": "" + }, + "require": { + "php": ">=7.2.5" + }, + "conflict": { + "phpunit/phpunit": "<7.5|9.1.2" + }, + "require-dev": { + "symfony/deprecation-contracts": "^2.5|^3.0", + "symfony/error-handler": "^5.4|^6.4|^7.0", + "symfony/polyfill-php81": "^1.27" + }, + "bin": [ + "bin/simple-phpunit" + ], + "type": "symfony-bridge", + "extra": { + "thanks": { + "name": "phpunit/phpunit", + "url": "https://github.com/sebastianbergmann/phpunit" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Bridge\\PhpUnit\\": "" + }, + "exclude-from-classmap": [ + "/Tests/", + "/bin/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides utilities for PHPUnit, especially user deprecation notices management", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/phpunit-bridge/tree/v7.1.4" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-08-13T14:28:19+00:00" + }, + { + "name": "theseer/tokenizer", + "version": "1.2.3", + "source": { + "type": "git", + "url": "https://github.com/theseer/tokenizer.git", + "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", + "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": "^7.2 || ^8.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + } + ], + "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", + "support": { + "issues": "https://github.com/theseer/tokenizer/issues", + "source": "https://github.com/theseer/tokenizer/tree/1.2.3" + }, + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2024-03-03T12:36:25+00:00" + } + ], "aliases": [], "minimum-stability": "stable", "stability-flags": [], @@ -4974,5 +7065,5 @@ "ext-iconv": "*" }, "platform-dev": [], - "plugin-api-version": "2.6.0" + "plugin-api-version": "2.2.0" } diff --git a/phpunit.xml.dist b/phpunit.xml.dist new file mode 100644 index 00000000..c76a655a --- /dev/null +++ b/phpunit.xml.dist @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + tests + + + + + + src + + + + + + + + + + diff --git a/symfony.lock b/symfony.lock index e2f9854a..5d78d83e 100644 --- a/symfony.lock +++ b/symfony.lock @@ -20,6 +20,20 @@ "config/packages/http_discovery.yaml" ] }, + "phpunit/phpunit": { + "version": "9.6", + "recipe": { + "repo": "github.com/symfony/recipes", + "branch": "main", + "version": "9.6", + "ref": "7364a21d87e658eb363c5020c072ecfdc12e2326" + }, + "files": [ + ".env.test", + "phpunit.xml.dist", + "tests/bootstrap.php" + ] + }, "symfony/apache-pack": { "version": "1.0", "recipe": { @@ -75,6 +89,21 @@ "src/Kernel.php" ] }, + "symfony/phpunit-bridge": { + "version": "7.1", + "recipe": { + "repo": "github.com/symfony/recipes", + "branch": "main", + "version": "6.3", + "ref": "a411a0480041243d97382cac7984f7dce7813c08" + }, + "files": [ + ".env.test", + "bin/phpunit", + "phpunit.xml.dist", + "tests/bootstrap.php" + ] + }, "symfony/routing": { "version": "6.4", "recipe": { diff --git a/tests/bootstrap.php b/tests/bootstrap.php new file mode 100644 index 00000000..47a58557 --- /dev/null +++ b/tests/bootstrap.php @@ -0,0 +1,13 @@ +bootEnv(dirname(__DIR__).'/.env'); +} + +if ($_SERVER['APP_DEBUG']) { + umask(0000); +} From 3357430848df163e211dac7f576d9d0dc429b963 Mon Sep 17 00:00:00 2001 From: Adam Franco Date: Thu, 26 Sep 2024 17:11:14 -0400 Subject: [PATCH 012/173] #47: Change the database to mariadb to mirror prod. --- .lando.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.lando.yml b/.lando.yml index 24aa9b52..e2a9f83b 100644 --- a/.lando.yml +++ b/.lando.yml @@ -3,6 +3,7 @@ recipe: symfony config: webroot: public php: 8.1 + database: mariadb services: appserver: build_as_root: From 8336afc97a2f1ae9df25b0464652099734fca10f Mon Sep 17 00:00:00 2001 From: Adam Franco Date: Fri, 27 Sep 2024 14:41:34 -0400 Subject: [PATCH 013/173] #47: Convert id-subcomponent separator from '/' to '.'. The use of '/' as a separator in subcomponents turned out to be a bad idea because these slashes need to be escaped as %2F, but these escaped slashes can interfere with some webserver configuration. For example Apache redirects require the NE "No Escape" option to preserve %2F slashes without double-escaping: # Redirect all traffic to https # # We're using mod_rewrite here rather than mod_alias's `Redirect` # because mod_alias doesn't allow the "NE" == "noescape" parameter # that allows URLs includinging encoded slashes (%2F) to be returned # without double-escaping. RewriteRule .* https://<%= node["app_domain"] %>$0 [L,R=301,NE] Similarly, Symfony refuses to allow slashes in parameters passed as tokens in routes. To address this problematic choice, use '.' as a separator of sub-components in identifiers. Periods don't require special escaping in URLs or database queries, though they do in regular expressions. --- application/controllers/ArchiveController.php | 10 +- application/controllers/CoursesController.php | 12 +- application/controllers/ExportController.php | 6 +- application/controllers/JsonController.php | 30 ++--- .../controllers/OfferingsController.php | 16 +-- .../controllers/ResourcesController.php | 2 +- application/controllers/TopicsController.php | 12 +- .../library/AbstractCatalogController.php | 14 +- .../library/apc/course/CourseManager.php | 4 +- .../library/banner/AbstractSession.php | 20 +-- .../library/banner/course/AbstractSession.php | 18 +-- application/library/banner/course/Course.php | 6 +- .../banner/course/Course/AbstractList.php | 8 +- .../banner/course/Course/AbstractSession.php | 4 +- .../banner/course/Course/Catalog/Session.php | 6 +- .../banner/course/Course/Lookup/Session.php | 14 +- .../banner/course/Course/Search/Query.php | 8 +- .../banner/course/Course/Search/Session.php | 2 +- .../course/CourseCatalog/Lookup/Session.php | 2 +- .../library/banner/course/CourseManager.php | 22 ++-- .../library/banner/course/CourseOffering.php | 26 ++-- .../course/CourseOffering/AbstractSession.php | 10 +- .../course/CourseOffering/Catalog/Session.php | 6 +- .../course/CourseOffering/GenusTypeList.php | 2 +- .../course/CourseOffering/Lookup/Session.php | 2 +- .../course/CourseOffering/Search/Query.php | 16 +-- .../course/CourseOffering/Search/Session.php | 16 +-- .../banner/course/Term/Catalog/Session.php | 10 +- .../banner/course/Term/ForCourseList.php | 2 +- .../banner/course/Term/Lookup/AllList.php | 2 +- .../banner/course/Term/Lookup/Session.php | 12 +- .../banner/course/Topic/AbstractList.php | 4 +- .../banner/course/Topic/Lookup/Session.php | 108 ++++++++-------- .../banner/course/Topic/Search/Query.php | 14 +- .../course/Topic/Search/Query/Block.php | 2 +- .../course/Topic/Search/Query/Department.php | 2 +- .../course/Topic/Search/Query/Division.php | 2 +- .../Topic/Search/Query/InstructionMethod.php | 2 +- .../course/Topic/Search/Query/Level.php | 2 +- .../course/Topic/Search/Query/Requirement.php | 2 +- .../course/Topic/Search/Query/Subject.php | 2 +- .../banner/course/Topic/Search/Session.php | 2 +- .../banner/resource/Bin/Lookup/Session.php | 2 +- .../banner/resource/Resource/Building.php | 2 +- .../Resource/Lookup/CombinedSession.php | 66 +++++----- .../Resource/Lookup/PerCatalogSession.php | 68 +++++----- .../banner/resource/Resource/Person.php | 2 +- .../library/banner/resource/Resource/Room.php | 2 +- .../banner/resource/ResourceManager.php | 14 +- .../sql/convert_id_separators_to_period.sql | 7 + .../test/Catalog/Action/Helper/OsidIdTest.php | 4 +- .../Catalog/Action/Helper/OsidTermsTest.php | 8 +- .../Catalog/Action/Helper/OsidTopicTest.php | 4 +- .../Catalog/Action/Helper/OsidTypeTest.php | 4 +- application/test/Catalog/frontend_config.ini | 122 +++++++++--------- application/test/apc/configuration.plist | 12 +- .../test/apc/course/CourseManagerTest.php | 2 +- application/test/banner/configuration.plist | 12 +- .../course/Course/Catalog/SessionTest.php | 6 +- .../Course/Lookup/CombinedSessionTest.php | 18 +-- .../course/Course/Lookup/SessionTest.php | 16 +-- .../banner/course/Course/Search/OrderTest.php | 16 +-- .../banner/course/Course/Search/QueryTest.php | 36 +++--- .../course/Course/Search/SearchTest.php | 18 +-- .../course/Course/Search/SessionTest.php | 16 +-- .../CourseCatalog/Lookup/SessionTest.php | 4 +- .../test/banner/course/CourseCatalogTest.php | 10 +- .../test/banner/course/CourseManagerTest.php | 2 +- .../CourseOffering/Catalog/SessionTest.php | 6 +- .../Lookup/CombinedSessionTest.php | 38 +++--- .../CourseOffering/Lookup/SessionTest.php | 38 +++--- .../CourseOffering/Search/OrderTest.php | 10 +- .../CourseOffering/Search/QueryTest.php | 52 ++++---- .../CourseOffering/Search/SearchTest.php | 10 +- .../CourseOffering/Search/SessionTest.php | 30 ++--- .../test/banner/course/CourseOfferingTest.php | 68 +++++----- application/test/banner/course/CourseTest.php | 18 +-- .../course/PartOfTermCourseOfferingTest.php | 32 ++--- .../course/Term/Catalog/SessionTest.php | 6 +- .../Term/Lookup/CombinedSessionTest.php | 8 +- .../banner/course/Term/Lookup/SessionTest.php | 8 +- application/test/banner/course/TermTest.php | 4 +- .../Topic/Lookup/CombinedSessionTest.php | 50 +++---- .../course/Topic/Lookup/SessionTest.php | 54 ++++---- .../banner/course/Topic/Search/OrderTest.php | 14 +- .../banner/course/Topic/Search/QueryTest.php | 18 +-- .../banner/course/Topic/Search/SearchTest.php | 18 +-- .../course/Topic/Search/SessionTest.php | 14 +- .../resource/Bin/Lookup/SessionTest.php | 4 +- .../Resource/Lookup/PerCatalogSessionTest.php | 30 ++--- .../resource/Resource/Lookup/SessionTest.php | 26 ++-- .../banner/resource/Resource/PersonTest.php | 8 +- .../banner/resource/ResourceManagerTest.php | 2 +- .../views/scripts/offerings/search.phtml | 12 +- .../views/scripts/offerings/searchxml.phtml | 10 +- 95 files changed, 765 insertions(+), 758 deletions(-) create mode 100644 application/sql/convert_id_separators_to_period.sql diff --git a/application/controllers/ArchiveController.php b/application/controllers/ArchiveController.php index ddd0a8be..8fb1fbb0 100644 --- a/application/controllers/ArchiveController.php +++ b/application/controllers/ArchiveController.php @@ -831,9 +831,9 @@ protected function getCourseData(osid_course_Course $course) // Look for different Section Descriptions $offeringQuery = $this->offeringSearchSession->getCourseOfferingQuery(); $offeringQuery->matchCourseId($course->getId(), true); - $offeringQuery->matchGenusType(new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:offering/LCT'), true); - $offeringQuery->matchGenusType(new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:offering/SEM'), true); - $offeringQuery->matchGenusType(new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:offering/IND'), true); + $offeringQuery->matchGenusType(new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:offering.LCT'), true); + $offeringQuery->matchGenusType(new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:offering.SEM'), true); + $offeringQuery->matchGenusType(new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:offering.IND'), true); foreach ($this->selectedTerms as $termId) { $offeringQuery->matchTermId($termId, true); } @@ -856,7 +856,7 @@ protected function getCourseData(osid_course_Course $course) $instructorsType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:record:instructors'); $identifiersType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:record:banner_identifiers'); $namesType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:record:person_names'); - $requirementType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic/requirement'); + $requirementType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.requirement'); $enrollmentNumbersType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:record:enrollment_numbers'); while ($offerings->hasNext()) { $offering = $offerings->getNextCourseOffering(); @@ -1028,7 +1028,7 @@ protected function getCourseData(osid_course_Course $course) // Apply all course-level topics. $allTopics = $this->_helper->topics->topicListAsArray($course->getTopics()); $reqs = []; - $topicType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic/requirement'); + $topicType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.requirement'); $topicTypeString = $this->_helper->osidType->toString($topicType); $topics = $this->_helper->topics->filterTopicsByType($allTopics, $topicType); foreach ($topics as $topic) { diff --git a/application/controllers/CoursesController.php b/application/controllers/CoursesController.php index 385863a9..2e604c41 100755 --- a/application/controllers/CoursesController.php +++ b/application/controllers/CoursesController.php @@ -137,7 +137,7 @@ public function viewAction() public function viewxmlAction() { $this->_helper->layout->disableLayout(); - $this->getResponse()->setHeader('Content-Type', 'text/xml'); + $this->getResponse()->setHeader('Content-Type', 'text.xml'); $this->viewAction(); } @@ -455,8 +455,8 @@ public function instructorxmlAction() throw new InvalidArgumentException('An instructor must be specified.'); } - $instructorId = $this->_helper->osidId->fromString('resource/person/'.$instructor); - $searchUrl = $this->_helper->pathAsAbsoluteUrl($this->_helper->url('view', 'resources', null, ['catalog' => $this->_getParam('catalog'), 'resource' => 'resouce/person/'.$instructor])); + $instructorId = $this->_helper->osidId->fromString('resource.person.'.$instructor); + $searchUrl = $this->_helper->pathAsAbsoluteUrl($this->_helper->url('view', 'resources', null, ['catalog' => $this->_getParam('catalog'), 'resource' => 'resouce.person.'.$instructor])); $resourceLookup = $this->_helper->osid->getCourseManager()->getResourceManager()->getResourceLookupSession(); try { @@ -610,7 +610,7 @@ protected function outputCourseFeed(Helper_RecentCourses_Interface $recentCourse } $allTopics = $this->_helper->topics->topicListAsArray($course->getTopics()); - $topicType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic/department'); + $topicType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.department'); $topicTypeString = $this->_helper->osidType->toString($topicType); $topics = $this->_helper->topics->filterTopicsByType($allTopics, $topicType); foreach ($topics as $topic) { @@ -620,7 +620,7 @@ protected function outputCourseFeed(Helper_RecentCourses_Interface $recentCourse echo ' '; } - $topicType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic/requirement'); + $topicType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.requirement'); $topicTypeString = $this->_helper->osidType->toString($topicType); $topics = $this->_helper->topics->filterTopicsByType($allTopics, $topicType); foreach ($topics as $topic) { @@ -630,7 +630,7 @@ protected function outputCourseFeed(Helper_RecentCourses_Interface $recentCourse echo ' '; } - $topicType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic/level'); + $topicType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.level'); $topicTypeString = $this->_helper->osidType->toString($topicType); $topics = $this->_helper->topics->filterTopicsByType($allTopics, $topicType); foreach ($topics as $topic) { diff --git a/application/controllers/ExportController.php b/application/controllers/ExportController.php index 91d7349c..d27ec627 100644 --- a/application/controllers/ExportController.php +++ b/application/controllers/ExportController.php @@ -450,8 +450,8 @@ public function generatecourselistAction() if ($request->getParam('catalogId')) { $catalogId = $this->_helper->osidId->fromString($request->getParam('catalogId')); - $this->departmentType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic/department'); - $this->subjectType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic/subject'); + $this->departmentType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.department'); + $this->subjectType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.subject'); $topicSearchSession = $this->_helper->osid->getCourseManager()->getTopicSearchSessionForCatalog($catalogId); $topicQuery = $topicSearchSession->getTopicQuery(); @@ -533,7 +533,7 @@ public function validtermAction() $this->termLookupSession = $this->_helper->osid->getCourseManager()->getTermLookupSessionForCatalog($catalogId); try { - $termString = 'term/'.$request->getParam('term'); + $termString = 'term.'.$request->getParam('term'); $termId = $this->_helper->osidId->fromString($termString); } catch (osid_InvalidArgumentException $e) { header('HTTP/1.1 400 Bad Request'); diff --git a/application/controllers/JsonController.php b/application/controllers/JsonController.php index c3efec99..fe035c7c 100644 --- a/application/controllers/JsonController.php +++ b/application/controllers/JsonController.php @@ -37,7 +37,7 @@ public function init() public function termsAction() { if ($this->_getParam('catalog')) { - $catalogId = $this->_helper->osidId->fromString('catalog/'.$this->_getParam('catalog')); + $catalogId = $this->_helper->osidId->fromString('catalog.'.$this->_getParam('catalog')); $lookupSession = $this->_helper->osid->getCourseManager()->getTermLookupSessionForCatalog($catalogId); $currentTermId = $this->_helper->osidTerms->getNextOrLatestTermId($catalogId); } else { @@ -52,7 +52,7 @@ public function termsAction() if ($currentTermId) { $term = $lookupSession->getTerm($currentTermId); $result['terms'][] = [ - 'code' => preg_replace('/^term\//', '', $term->getId()->getIdentifier()), + 'code' => preg_replace('/^term\./', '', $term->getId()->getIdentifier()), 'description' => $term->getDisplayName(), ]; } @@ -63,7 +63,7 @@ public function termsAction() continue; } $result['terms'][] = [ - 'code' => preg_replace('/^term\//', '', $term->getId()->getIdentifier()), + 'code' => preg_replace('/^term\./', '', $term->getId()->getIdentifier()), 'description' => $term->getDisplayName(), ]; } @@ -83,7 +83,7 @@ public function termsAction() public function areasAction() { if ($this->_getParam('catalog')) { - $catalogId = $this->_helper->osidId->fromString('catalog/'.$this->_getParam('catalog')); + $catalogId = $this->_helper->osidId->fromString('catalog.'.$this->_getParam('catalog')); $termLookupSession = $this->_helper->osid->getCourseManager()->getTermLookupSessionForCatalog($catalogId); $topicSearchSession = $this->_helper->osid->getCourseManager()->getTopicSearchSessionForCatalog($catalogId); } else { @@ -97,10 +97,10 @@ public function areasAction() if (empty($code)) { throw new InvalidArgumentException('Missing the "code" parameter.'); } - $termId = $this->_helper->osidId->fromString('term/'.$code); + $termId = $this->_helper->osidId->fromString('term.'.$code); $term = $termLookupSession->getTerm($termId); - $genera = 'topic/subject'; + $genera = 'topic.subject'; $generaType = $this->_helper->osidType->fromString('genera:'.$genera); $termType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:record:terms'); @@ -121,7 +121,7 @@ public function areasAction() while ($topics->hasNext()) { $topic = $topics->getNextTopic(); $result['areas'][] = [ - 'area' => preg_replace('/^'.str_replace('/', '\/', $genera).'\//', '', $topic->getId()->getIdentifier()), + 'area' => preg_replace('/^'.str_replace('.', '\.', $genera).'\./', '', $topic->getId()->getIdentifier()), 'name' => $topic->getDisplayName(), ]; } @@ -141,7 +141,7 @@ public function areasAction() public function catalogAction() { if ($this->_getParam('catalog')) { - $catalogId = $this->_helper->osidId->fromString('catalog/'.$this->_getParam('catalog')); + $catalogId = $this->_helper->osidId->fromString('catalog.'.$this->_getParam('catalog')); $searchSession = $this->_helper->osid->getCourseManager()->getCourseSearchSessionForCatalog($catalogId); $termLookupSession = $this->_helper->osid->getCourseManager()->getTermLookupSessionForCatalog($catalogId); $topicLookupSession = $this->_helper->osid->getCourseManager()->getTopicLookupSessionForCatalog($catalogId); @@ -158,18 +158,18 @@ public function catalogAction() $offeringLookupSession->useFederatedCourseCatalogView(); // Validate our arguments. - $genera = 'topic/subject'; + $genera = 'topic.subject'; $area = $this->_getParam('area'); if (empty($area)) { throw new InvalidArgumentException('Missing the "area" parameter.'); } - $topicId = $this->_helper->osidId->fromString($genera.'/'.$area); + $topicId = $this->_helper->osidId->fromString($genera.'.'.$area); $topic = $topicLookupSession->getTopic($topicId); $code = $this->_getParam('code'); if (empty($code)) { throw new InvalidArgumentException('Missing the "code" parameter.'); } - $termId = $this->_helper->osidId->fromString('term/'.$this->_getParam('code')); + $termId = $this->_helper->osidId->fromString('term.'.$this->_getParam('code')); $term = $termLookupSession->getTerm($termId); // Build the query. @@ -200,7 +200,7 @@ public function catalogAction() public function searchAction() { if ($this->_getParam('catalog')) { - $catalogId = $this->_helper->osidId->fromString('catalog/'.$this->_getParam('catalog')); + $catalogId = $this->_helper->osidId->fromString('catalog.'.$this->_getParam('catalog')); $searchSession = $this->_helper->osid->getCourseManager()->getCourseOfferingSearchSessionForCatalog($catalogId); $termLookupSession = $this->_helper->osid->getCourseManager()->getTermLookupSessionForCatalog($catalogId); $topicLookupSession = $this->_helper->osid->getCourseManager()->getTopicLookupSessionForCatalog($catalogId); @@ -229,15 +229,15 @@ public function searchAction() if (empty($code)) { throw new InvalidArgumentException('Missing the "code" parameter.'); } - $termId = $this->_helper->osidId->fromString('term/'.$this->_getParam('code')); + $termId = $this->_helper->osidId->fromString('term.'.$this->_getParam('code')); $term = $termLookupSession->getTerm($termId); $query->matchTermId($termId, true); - $genera = 'topic/subject'; + $genera = 'topic.subject'; $area = $this->_getParam('area'); if (!empty($area)) { - $topicId = $this->_helper->osidId->fromString($genera.'/'.$area); + $topicId = $this->_helper->osidId->fromString($genera.'.'.$area); $topic = $topicLookupSession->getTopic($topicId); $query->matchTopicId($topicId, true); } diff --git a/application/controllers/OfferingsController.php b/application/controllers/OfferingsController.php index 5e91c9f4..16815c9e 100755 --- a/application/controllers/OfferingsController.php +++ b/application/controllers/OfferingsController.php @@ -35,17 +35,17 @@ public function init() parent::init(); - $this->subjectType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic/subject'); - $this->departmentType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic/department'); - $this->divisionType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic/division'); - $this->requirementType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic/requirement'); - $this->levelType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic/level'); - $this->blockType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic/block'); - $this->instructionMethodType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic/instruction_method'); + $this->subjectType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.subject'); + $this->departmentType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.department'); + $this->divisionType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.division'); + $this->requirementType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.requirement'); + $this->levelType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.level'); + $this->blockType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.block'); + $this->instructionMethodType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.instruction_method'); $this->termType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:record:terms'); - $this->campusType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:resource/place/campus'); + $this->campusType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:resource.place.campus'); } /** diff --git a/application/controllers/ResourcesController.php b/application/controllers/ResourcesController.php index 6bb8f5f7..77af7c19 100755 --- a/application/controllers/ResourcesController.php +++ b/application/controllers/ResourcesController.php @@ -127,7 +127,7 @@ public function viewAction() */ public function listcampusestxtAction() { - $this->renderTextList(new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:resource/place/campus')); + $this->renderTextList(new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:resource.place.campus')); } /** diff --git a/application/controllers/TopicsController.php b/application/controllers/TopicsController.php index 57bdbd5a..453bb5fa 100755 --- a/application/controllers/TopicsController.php +++ b/application/controllers/TopicsController.php @@ -241,7 +241,7 @@ public function viewxmlAction() */ public function listsubjectstxtAction() { - $this->renderTextList(new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic/subject')); + $this->renderTextList(new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.subject')); } /** @@ -253,7 +253,7 @@ public function listsubjectstxtAction() */ public function listrequirementstxtAction() { - $this->renderTextList(new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic/requirement')); + $this->renderTextList(new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.requirement')); } /** @@ -265,7 +265,7 @@ public function listrequirementstxtAction() */ public function listlevelstxtAction() { - $this->renderTextList(new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic/level')); + $this->renderTextList(new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.level')); } /** @@ -277,7 +277,7 @@ public function listlevelstxtAction() */ public function listblockstxtAction() { - $this->renderTextList(new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic/block')); + $this->renderTextList(new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.block')); } /** @@ -289,7 +289,7 @@ public function listblockstxtAction() */ public function listinstructionmethodstxtAction() { - $this->renderTextList(new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic/instruction_method')); + $this->renderTextList(new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.instruction_method')); } /** @@ -301,7 +301,7 @@ public function listinstructionmethodstxtAction() */ public function listdepartmentstxtAction() { - $this->renderTextList(new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic/department')); + $this->renderTextList(new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.department')); } /** diff --git a/application/library/AbstractCatalogController.php b/application/library/AbstractCatalogController.php index 6ea1bb2b..ea3cdcd2 100755 --- a/application/library/AbstractCatalogController.php +++ b/application/library/AbstractCatalogController.php @@ -96,19 +96,19 @@ protected function loadTopics(osid_course_TopicList $topicList) { $topics = $this->_helper->topics->topicListAsArray($topicList); - $this->view->subjectTopics = $this->_helper->topics->filterTopicsByType($topics, new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic/subject')); + $this->view->subjectTopics = $this->_helper->topics->filterTopicsByType($topics, new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.subject')); - $this->view->departmentTopics = $this->_helper->topics->filterTopicsByType($topics, new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic/department')); + $this->view->departmentTopics = $this->_helper->topics->filterTopicsByType($topics, new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.department')); - $this->view->divisionTopics = $this->_helper->topics->filterTopicsByType($topics, new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic/division')); + $this->view->divisionTopics = $this->_helper->topics->filterTopicsByType($topics, new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.division')); - $this->view->requirementTopics = $this->_helper->topics->filterTopicsByType($topics, new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic/requirement')); + $this->view->requirementTopics = $this->_helper->topics->filterTopicsByType($topics, new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.requirement')); - $this->view->levelTopics = $this->_helper->topics->filterTopicsByType($topics, new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic/level')); + $this->view->levelTopics = $this->_helper->topics->filterTopicsByType($topics, new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.level')); - $this->view->blockTopics = $this->_helper->topics->filterTopicsByType($topics, new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic/block')); + $this->view->blockTopics = $this->_helper->topics->filterTopicsByType($topics, new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.block')); - $this->view->instructionMethodTopics = $this->_helper->topics->filterTopicsByType($topics, new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic/instruction_method')); + $this->view->instructionMethodTopics = $this->_helper->topics->filterTopicsByType($topics, new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.instruction_method')); } private $startTime; diff --git a/application/library/apc/course/CourseManager.php b/application/library/apc/course/CourseManager.php index 91ab29df..109fc2f8 100755 --- a/application/library/apc/course/CourseManager.php +++ b/application/library/apc/course/CourseManager.php @@ -28,7 +28,7 @@ public function __construct() { parent::__construct(); - $this->setId(new phpkit_id_URNInetId('urn:inet:middlebury.edu:id:implementations/apc_course')); + $this->setId(new phpkit_id_URNInetId('urn:inet:middlebury.edu:id:implementations.apc_course')); $this->setDisplayName('APC Caching Course Manager'); $this->setDescription('This is a CourseManager implementation that provides read-only, unauthenticated, access to course information stored in an underlying course manager.'); } @@ -74,7 +74,7 @@ public function initialize(osid_OsidRuntimeManager $runtime) try { $implClassName = phpkit_configuration_ConfigUtil::getSingleValuedValue( $runtime->getConfiguration(), - new phpkit_id_URNInetId('urn:inet:middlebury.edu:config:apc_course/impl_class_name'), + new phpkit_id_URNInetId('urn:inet:middlebury.edu:config:apc_course.impl_class_name'), new phpkit_type_Type('urn', 'middlebury.edu', 'Primitives/String')); } catch (osid_NotFoundException $e) { throw new osid_ConfigurationErrorException($e->getMessage(), $e->getCode(), $e); diff --git a/application/library/banner/AbstractSession.php b/application/library/banner/AbstractSession.php index b70cd6c0..c800b4d0 100755 --- a/application/library/banner/AbstractSession.php +++ b/application/library/banner/AbstractSession.php @@ -145,11 +145,11 @@ protected function usesIsolatedView() public function getDatabaseIdString(osid_id_Id $id, $prefix = null) { if ('urn' != $id->getIdentifierNamespace()) { - throw new osid_NotFoundException('I only know about Ids in the urn namespace.'); + throw new osid_NotFoundException('I only know about Ids in the urn namespace, got: '.$id->getIdentifierNamespace()); } if ($id->getAuthority() != $this->manager->getIdAuthority()) { - throw new osid_NotFoundException('I only know about Ids under the '.$this->manager->getIdAuthority().' authority.'); + throw new osid_NotFoundException('I only know about Ids under the '.$this->manager->getIdAuthority().' authority, got: '.$id->getAuthority()); } if (null === $prefix) { @@ -159,7 +159,7 @@ public function getDatabaseIdString(osid_id_Id $id, $prefix = null) } if (!str_starts_with($id->getIdentifier(), $prefix)) { - throw new osid_NotFoundException('I only know about Ids with the '.$prefix.' prefix.'); + throw new osid_NotFoundException('I only know about Ids with the '.$prefix.' prefix, got: '.$id->getIdentifier()); } return substr($id->getIdentifier(), strlen($prefix)); @@ -195,7 +195,7 @@ public function getOsidIdFromString($databaseId, $prefix = null) */ public function getTermCodeFromTermId(osid_id_Id $id) { - $string = $this->getDatabaseIdString($id, 'term/'); + $string = $this->getDatabaseIdString($id, 'term.'); if (!preg_match('#^([0-9]{6})$#', $string)) { throw new osid_NotFoundException("String '$string' cannot be broken into a term-code"); } @@ -214,8 +214,8 @@ public function getTermCodeFromTermId(osid_id_Id $id) */ public function getTermCodeFromOfferingId(osid_id_Id $id) { - $string = $this->getDatabaseIdString($id, 'section/'); - if (!preg_match('#^([0-9]{6})/([0-9]{1,5})$#', $string, $matches)) { + $string = $this->getDatabaseIdString($id, 'section.'); + if (!preg_match('#^([0-9]{6})\.([0-9]{1,5})$#', $string, $matches)) { throw new osid_NotFoundException("String '$string' cannot be broken into a term-code and CRN."); } @@ -233,8 +233,8 @@ public function getTermCodeFromOfferingId(osid_id_Id $id) */ public function getCrnFromOfferingId(osid_id_Id $id) { - $string = $this->getDatabaseIdString($id, 'section/'); - if (!preg_match('#^([0-9]{6})/([0-9]{1,5})$#', $string, $matches)) { + $string = $this->getDatabaseIdString($id, 'section.'); + if (!preg_match('#^([0-9]{6})\.([0-9]{1,5})$#', $string, $matches)) { throw new osid_NotFoundException("String '$string' cannot be broken into a term-code and CRN."); } @@ -250,7 +250,7 @@ public function getCrnFromOfferingId(osid_id_Id $id) */ public function getSubjectFromCourseId(osid_id_Id $id) { - $string = $this->getDatabaseIdString($id, 'course/'); + $string = $this->getDatabaseIdString($id, 'course.'); if (!preg_match('#^([A-Z]{2,4})([A-Z0-9]{3,5})$#i', $string, $matches)) { throw new osid_NotFoundException("String '$string' cannot be broken into a subject-code and Number."); } @@ -267,7 +267,7 @@ public function getSubjectFromCourseId(osid_id_Id $id) */ public function getNumberFromCourseId(osid_id_Id $id) { - $string = $this->getDatabaseIdString($id, 'course/'); + $string = $this->getDatabaseIdString($id, 'course.'); if (!preg_match('#^([A-Z]{2,4})([A-Z0-9]{3,5})$#i', $string, $matches)) { throw new osid_NotFoundException("String '$string' cannot be broken into a subject-code and Number."); } diff --git a/application/library/banner/course/AbstractSession.php b/application/library/banner/course/AbstractSession.php index df804b2d..f5de7375 100755 --- a/application/library/banner/course/AbstractSession.php +++ b/application/library/banner/course/AbstractSession.php @@ -26,7 +26,7 @@ abstract class banner_course_AbstractSession extends banner_AbstractSession impl */ public function getCatalogDatabaseId(osid_id_Id $id) { - return $this->getDatabaseIdString($id, 'catalog/'); + return $this->getDatabaseIdString($id, 'catalog.'); } /** @@ -159,7 +159,7 @@ public function getOfferingIdFromTermCodeAndCrn($termCode, $crn) throw new osid_OperationFailedException('Both termCode and CRN must be specified.'); } - return $this->getOsidIdFromString($termCode.'/'.$crn, 'section/'); + return $this->getOsidIdFromString($termCode.'.'.$crn, 'section.'); } /** @@ -177,7 +177,7 @@ public function getCourseIdFromSubjectAndNumber($subjectCode, $number) throw new osid_OperationFailedException('Both subjectCode and number must be specified.'); } - return $this->getOsidIdFromString($subjectCode.$number, 'course/'); + return $this->getOsidIdFromString($subjectCode.$number, 'course.'); } /** @@ -189,8 +189,8 @@ public function getCourseIdFromSubjectAndNumber($subjectCode, $number) */ public function getTermCodeFromTermId(osid_id_Id $id) { - $string = $this->getDatabaseIdString($id, 'term/'); - if (!preg_match('#^([0-9]{6})(?:/(.{1,3}))?$#', $string, $matches)) { + $string = $this->getDatabaseIdString($id, 'term.'); + if (!preg_match('#^([0-9]{6})(?:\.(.{1,3}))?$#', $string, $matches)) { throw new osid_NotFoundException("String '$string' cannot be converted into a valid term code."); } @@ -206,8 +206,8 @@ public function getTermCodeFromTermId(osid_id_Id $id) */ public function getPartOfTermCodeFromTermId(osid_id_Id $id) { - $string = $this->getDatabaseIdString($id, 'term/'); - if (!preg_match('#^([0-9]{6})(?:/(.{1,3}))$#', $string, $matches)) { + $string = $this->getDatabaseIdString($id, 'term.'); + if (!preg_match('#^([0-9]{6})(?:\.(.{1,3}))$#', $string, $matches)) { throw new osid_NotFoundException("String '$string' cannot be converted into a valid part-of-term code."); } @@ -229,8 +229,8 @@ public function getScheduleCodeFromGenusType(osid_type_Type $genusType) throw new osid_NotFoundException("I only know about the '".$this->getIdAuthority()."' authority"); } - if (!preg_match('/^genera:offering\/([a-z]+)$/i', $genusType->getIdentifier(), $matches)) { - throw new osid_NotFoundException("I only know about identifiers beginning with 'genera:offering/'"); + if (!preg_match('/^genera:offering\.([a-z]+)$/i', $genusType->getIdentifier(), $matches)) { + throw new osid_NotFoundException("I only know about identifiers beginning with 'genera:offering.'"); } return $matches[1]; diff --git a/application/library/banner/course/Course.php b/application/library/banner/course/Course.php index 717d6d4b..4d905f64 100755 --- a/application/library/banner/course/Course.php +++ b/application/library/banner/course/Course.php @@ -799,7 +799,7 @@ public function getLinkSetIdsForTerm(osid_id_Id $termId) } $linkSetIds = array_unique($linkSetIds); foreach ($linkSetIds as $key => $val) { - $linkSetIds[$key] = $this->session->getOsidIdFromString($val, 'link_set/'); + $linkSetIds[$key] = $this->session->getOsidIdFromString($val, 'link_set.'); } return new phpkit_id_ArrayIdList($linkSetIds); @@ -830,7 +830,7 @@ public function getLinkTypeIdsForTermAndSet(osid_id_Id $termId, osid_id_Id $link $setId = substr($linkIdString, 1, 1); // The type id is the first charactor. $typeId = substr($linkIdString, 0, 1); - if ($linkSetId->isEqual($this->session->getOsidIdFromString($setId, 'link_set/'))) { + if ($linkSetId->isEqual($this->session->getOsidIdFromString($setId, 'link_set.'))) { $linkTypeIds[] = $typeId; } } @@ -843,7 +843,7 @@ public function getLinkTypeIdsForTermAndSet(osid_id_Id $termId, osid_id_Id $link } foreach ($linkTypeIds as $key => $val) { - $linkTypeIds[$key] = $this->session->getOsidIdFromString($val, 'link_type/'); + $linkTypeIds[$key] = $this->session->getOsidIdFromString($val, 'link_type.'); } return new phpkit_id_ArrayIdList($linkTypeIds); diff --git a/application/library/banner/course/Course/AbstractList.php b/application/library/banner/course/Course/AbstractList.php index 7f2da7cf..da4e2054 100755 --- a/application/library/banner/course/Course/AbstractList.php +++ b/application/library/banner/course/Course/AbstractList.php @@ -254,15 +254,15 @@ protected function includeInactive() final protected function getObjectFromRow(array $row) { return new banner_course_Course( - $this->session->getOsidIdFromString($row['SCBCRSE_SUBJ_CODE'].$row['SCBCRSE_CRSE_NUMB'], 'course/'), + $this->session->getOsidIdFromString($row['SCBCRSE_SUBJ_CODE'].$row['SCBCRSE_CRSE_NUMB'], 'course.'), $row['SCBCRSE_SUBJ_CODE'].' '.$row['SCBCRSE_CRSE_NUMB'], (null === $row['SCBDESC_TEXT_NARRATIVE']) ? '' : $row['SCBDESC_TEXT_NARRATIVE'], // Description $row['SCBCRSE_TITLE'], $row['SCBCRSE_CREDIT_HR_HIGH'], [ - $this->session->getOsidIdFromString($row['SCBCRSE_SUBJ_CODE'], 'topic/subject/'), - $this->session->getOsidIdFromString($row['SCBCRSE_DEPT_CODE'], 'topic/department/'), - $this->session->getOsidIdFromString($row['SCBCRSE_DIVS_CODE'], 'topic/division/'), + $this->session->getOsidIdFromString($row['SCBCRSE_SUBJ_CODE'], 'topic.subject.'), + $this->session->getOsidIdFromString($row['SCBCRSE_DEPT_CODE'], 'topic.department.'), + $this->session->getOsidIdFromString($row['SCBCRSE_DIVS_CODE'], 'topic.division.'), ], $row['has_alternates'], $this->session); diff --git a/application/library/banner/course/Course/AbstractSession.php b/application/library/banner/course/Course/AbstractSession.php index ed5b6f30..0cac8fb1 100755 --- a/application/library/banner/course/Course/AbstractSession.php +++ b/application/library/banner/course/Course/AbstractSession.php @@ -49,7 +49,7 @@ public function getRequirementTopicIdsForCourse(osid_id_Id $courseId) self::$requirementTopics_stmt->execute($parameters); $topicIds = []; while ($row = self::$requirementTopics_stmt->fetch(PDO::FETCH_ASSOC)) { - $topicIds[] = $this->getOsidIdFromString($row['SCRATTR_ATTR_CODE'], 'topic/requirement/'); + $topicIds[] = $this->getOsidIdFromString($row['SCRATTR_ATTR_CODE'], 'topic.requirement.'); } self::$requirementTopics_stmt->closeCursor(); @@ -89,7 +89,7 @@ public function getLevelTopicIdsForCourse(osid_id_Id $courseId) self::$levelTopics_stmt->execute($parameters); $topicIds = []; while ($row = self::$levelTopics_stmt->fetch(PDO::FETCH_ASSOC)) { - $topicIds[] = $this->getOsidIdFromString($row['SCRLEVL_LEVL_CODE'], 'topic/level/'); + $topicIds[] = $this->getOsidIdFromString($row['SCRLEVL_LEVL_CODE'], 'topic.level.'); } self::$levelTopics_stmt->closeCursor(); diff --git a/application/library/banner/course/Course/Catalog/Session.php b/application/library/banner/course/Course/Catalog/Session.php index b27843ad..fafd9234 100755 --- a/application/library/banner/course/Course/Catalog/Session.php +++ b/application/library/banner/course/Course/Catalog/Session.php @@ -34,7 +34,7 @@ class banner_course_Course_Catalog_Session extends banner_course_Course_Abstract */ public function __construct(banner_course_CourseManagerInterface $manager) { - parent::__construct($manager, 'catalog/'); + parent::__construct($manager, 'catalog.'); } /** @@ -242,7 +242,7 @@ public function getCatalogIdsByCourse(osid_id_Id $courseId) $ids = []; while ($row = $statement->fetch(PDO::FETCH_ASSOC)) { - $ids[] = $this->getOsidIdFromString($row['catalog_id'], 'catalog/'); + $ids[] = $this->getOsidIdFromString($row['catalog_id'], 'catalog.'); } $statement->closeCursor(); @@ -279,7 +279,7 @@ public function getCatalogsByCourse(osid_id_Id $courseId) $catalogs = []; while ($row = $statement->fetch(PDO::FETCH_ASSOC)) { $catalogs[] = new banner_course_CourseCatalog( - $this->getOsidIdFromString($row['catalog_id'], 'catalog/'), + $this->getOsidIdFromString($row['catalog_id'], 'catalog.'), $row['catalog_title']); } $statement->closeCursor(); diff --git a/application/library/banner/course/Course/Lookup/Session.php b/application/library/banner/course/Course/Lookup/Session.php index ceeff4a1..e4180adb 100755 --- a/application/library/banner/course/Course/Lookup/Session.php +++ b/application/library/banner/course/Course/Lookup/Session.php @@ -52,7 +52,7 @@ class banner_course_Course_Lookup_Session extends banner_course_Course_AbstractS */ public function __construct(banner_course_CourseManagerInterface $manager, osid_id_Id $catalogId) { - parent::__construct($manager, 'course/'); + parent::__construct($manager, 'course.'); $this->catalogId = $catalogId; } @@ -228,7 +228,7 @@ public function getCourse(osid_id_Id $courseId) self::$getCourse_stmts[$catalogWhere] = $this->manager->getDB()->prepare($query); } - $courseIdString = $this->getDatabaseIdString($courseId, 'course/'); + $courseIdString = $this->getDatabaseIdString($courseId, 'course.'); $parameters = array_merge( [ @@ -241,19 +241,19 @@ public function getCourse(osid_id_Id $courseId) self::$getCourse_stmts[$catalogWhere]->closeCursor(); if (!$row || !($row['SCBCRSE_SUBJ_CODE'] && $row['SCBCRSE_CRSE_NUMB'])) { - throw new osid_NotFoundException("Could not find a course matching the id-component '$courseIdString' for the catalog '".$this->getDatabaseIdString($this->getCourseCatalogId(), 'catalog/')."'."); + throw new osid_NotFoundException("Could not find a course matching the id-component '$courseIdString' for the catalog '".$this->getDatabaseIdString($this->getCourseCatalogId(), 'catalog.')."'."); } return new banner_course_Course( - $this->getOsidIdFromString($row['SCBCRSE_SUBJ_CODE'].$row['SCBCRSE_CRSE_NUMB'], 'course/'), + $this->getOsidIdFromString($row['SCBCRSE_SUBJ_CODE'].$row['SCBCRSE_CRSE_NUMB'], 'course.'), $row['SCBCRSE_SUBJ_CODE'].' '.$row['SCBCRSE_CRSE_NUMB'], (null === $row['SCBDESC_TEXT_NARRATIVE']) ? '' : $row['SCBDESC_TEXT_NARRATIVE'], // Description $row['SCBCRSE_TITLE'], $row['SCBCRSE_CREDIT_HR_HIGH'], [ - $this->getOsidIdFromString($row['SCBCRSE_SUBJ_CODE'], 'topic/subject/'), - $this->getOsidIdFromString($row['SCBCRSE_DEPT_CODE'], 'topic/department/'), - $this->getOsidIdFromString($row['SCBCRSE_DIVS_CODE'], 'topic/division/'), + $this->getOsidIdFromString($row['SCBCRSE_SUBJ_CODE'], 'topic.subject.'), + $this->getOsidIdFromString($row['SCBCRSE_DEPT_CODE'], 'topic.department.'), + $this->getOsidIdFromString($row['SCBCRSE_DIVS_CODE'], 'topic.division.'), ], $row['has_alternates'], $this); diff --git a/application/library/banner/course/Course/Search/Query.php b/application/library/banner/course/Course/Search/Query.php index bb0a662a..dbf36aa3 100755 --- a/application/library/banner/course/Course/Search/Query.php +++ b/application/library/banner/course/Course/Search/Query.php @@ -575,7 +575,7 @@ public function matchCourseCatalogId(osid_id_Id $courseCatalogId, $match) course_catalog_college WHERE catalog_id = ?)', - [$this->session->getDatabaseIdString($courseCatalogId, 'catalog/')], + [$this->session->getDatabaseIdString($courseCatalogId, 'catalog.')], $match); } @@ -752,7 +752,7 @@ public function getTopicQuery() */ public function matchInstructorId(osid_id_Id $instructorId, $match) { - $this->addClause('instructor_id', 'WEB_ID = ?', [$this->session->getDatabaseIdString($instructorId, 'resource/person/')], $match); + $this->addClause('instructor_id', 'WEB_ID = ?', [$this->session->getDatabaseIdString($instructorId, 'resource.person.')], $match); $this->addTableJoin('LEFT JOIN SSBSECT ON (SCBCRSE_SUBJ_CODE = SSBSECT_SUBJ_CODE AND SCBCRSE_CRSE_NUMB = SSBSECT_CRSE_NUMB)'); $this->addTableJoin('LEFT JOIN SYVINST ON (SYVINST_TERM_CODE = SSBSECT_TERM_CODE AND SYVINST_CRN = SSBSECT_CRN)'); @@ -810,7 +810,7 @@ public function getInstructorQuery() */ public function matchTermId(osid_id_Id $termId, $match) { - $this->addClause('term_id', 'SSBSECT_TERM_CODE = ?', [$this->session->getDatabaseIdString($termId, 'term/')], $match); + $this->addClause('term_id', 'SSBSECT_TERM_CODE = ?', [$this->session->getDatabaseIdString($termId, 'term.')], $match); $this->addTableJoin('LEFT JOIN SSBSECT ON (SCBCRSE_SUBJ_CODE = SSBSECT_SUBJ_CODE AND SCBCRSE_CRSE_NUMB = SSBSECT_CRSE_NUMB)'); $this->addClause('active_sections', 'SSBSECT_SSTS_CODE = ? AND (course_catalog.prnt_ind_to_exclude IS NULL OR SSBSECT_PRNT_IND != course_catalog.prnt_ind_to_exclude)', ['A'], true); @@ -867,7 +867,7 @@ public function getTermQuery() */ public function matchLocationId(osid_id_Id $instructorId, $match) { - $this->addClause('location_id', 'SSBSECT_CAMP_CODE = ?', [$this->session->getDatabaseIdString($instructorId, 'resource/place/campus/')], $match); + $this->addClause('location_id', 'SSBSECT_CAMP_CODE = ?', [$this->session->getDatabaseIdString($instructorId, 'resource.place.campus.')], $match); $this->addTableJoin('LEFT JOIN SSBSECT ON (SCBCRSE_SUBJ_CODE = SSBSECT_SUBJ_CODE AND SCBCRSE_CRSE_NUMB = SSBSECT_CRSE_NUMB)'); $this->addClause('active_sections', 'SSBSECT_SSTS_CODE = ? AND (course_catalog.prnt_ind_to_exclude IS NULL OR SSBSECT_PRNT_IND != course_catalog.prnt_ind_to_exclude)', ['A'], true); diff --git a/application/library/banner/course/Course/Search/Session.php b/application/library/banner/course/Course/Search/Session.php index ffe6435d..0fbbb474 100755 --- a/application/library/banner/course/Course/Search/Session.php +++ b/application/library/banner/course/Course/Search/Session.php @@ -45,7 +45,7 @@ class banner_course_Course_Search_Session extends banner_course_Course_AbstractS */ public function __construct(banner_course_CourseManagerInterface $manager, osid_id_Id $catalogId) { - parent::__construct($manager, 'section/'); + parent::__construct($manager, 'section.'); $this->catalogId = $catalogId; } diff --git a/application/library/banner/course/CourseCatalog/Lookup/Session.php b/application/library/banner/course/CourseCatalog/Lookup/Session.php index 6ef0d69d..b0b09f6e 100755 --- a/application/library/banner/course/CourseCatalog/Lookup/Session.php +++ b/application/library/banner/course/CourseCatalog/Lookup/Session.php @@ -48,7 +48,7 @@ class banner_course_CourseCatalog_Lookup_Session extends banner_course_AbstractS */ public function __construct(banner_course_CourseManagerInterface $manager) { - parent::__construct($manager, 'catalog/'); + parent::__construct($manager, 'catalog.'); } /** diff --git a/application/library/banner/course/CourseManager.php b/application/library/banner/course/CourseManager.php index 7507cac2..d504a41f 100755 --- a/application/library/banner/course/CourseManager.php +++ b/application/library/banner/course/CourseManager.php @@ -35,7 +35,7 @@ public function __construct() { parent::__construct(); - $this->setId(new phpkit_id_URNInetId('urn:inet:middlebury.edu:id:implementations/banner_course')); + $this->setId(new phpkit_id_URNInetId('urn:inet:middlebury.edu:id:implementations.banner_course')); $this->setDisplayName('Banner Course Manager'); $this->setDescription('This is a CourseManager implementation that provides read-only, unauthenticated, access to course information stored in Banner database tables.'); } @@ -76,7 +76,7 @@ public function getIdAuthority() */ public function getCombinedCatalogId() { - return new phpkit_id_Id($this->getIdAuthority(), 'urn', 'catalog/all'); + return new phpkit_id_Id($this->getIdAuthority(), 'urn', 'catalog.all'); } /********************************************************* @@ -118,17 +118,17 @@ public function initialize(osid_OsidRuntimeManager $runtime) try { $dsn = phpkit_configuration_ConfigUtil::getSingleValuedValue( $runtime->getConfiguration(), - new phpkit_id_URNInetId('urn:inet:middlebury.edu:config:banner_course/pdo_dsn'), + new phpkit_id_URNInetId('urn:inet:middlebury.edu:config:banner_course.pdo_dsn'), new phpkit_type_Type('urn', 'middlebury.edu', 'Primitives/String')); $username = phpkit_configuration_ConfigUtil::getSingleValuedValue( $runtime->getConfiguration(), - new phpkit_id_URNInetId('urn:inet:middlebury.edu:config:banner_course/pdo_username'), + new phpkit_id_URNInetId('urn:inet:middlebury.edu:config:banner_course.pdo_username'), new phpkit_type_Type('urn', 'middlebury.edu', 'Primitives/String')); $password = phpkit_configuration_ConfigUtil::getSingleValuedValue( $runtime->getConfiguration(), - new phpkit_id_URNInetId('urn:inet:middlebury.edu:config:banner_course/pdo_password'), + new phpkit_id_URNInetId('urn:inet:middlebury.edu:config:banner_course.pdo_password'), new phpkit_type_Type('urn', 'middlebury.edu', 'Primitives/String')); } catch (osid_NotFoundException $e) { throw new osid_ConfigurationErrorException($e->getMessage(), $e->getCode(), $e); @@ -137,7 +137,7 @@ public function initialize(osid_OsidRuntimeManager $runtime) try { $debug = phpkit_configuration_ConfigUtil::getSingleValuedValue( $runtime->getConfiguration(), - new phpkit_id_URNInetId('urn:inet:middlebury.edu:config:banner_course/pdo_count_queries'), + new phpkit_id_URNInetId('urn:inet:middlebury.edu:config:banner_course.pdo_count_queries'), new phpkit_type_Type('urn', 'middlebury.edu', 'Primitives/Boolean')); } catch (osid_ConfigurationErrorException $e) { $debug = false; @@ -147,7 +147,7 @@ public function initialize(osid_OsidRuntimeManager $runtime) $driverOptions = []; $options = phpkit_configuration_ConfigUtil::getMultiValuedValueOfAnyType( $runtime->getConfiguration(), - new phpkit_id_URNInetId('urn:inet:middlebury.edu:config:banner_course/pdo_driver_options')); + new phpkit_id_URNInetId('urn:inet:middlebury.edu:config:banner_course.pdo_driver_options')); foreach ($options as $key => $value) { $option = constant($key); if (null === $option) { @@ -172,10 +172,10 @@ public function initialize(osid_OsidRuntimeManager $runtime) try { $this->idAuthority = phpkit_configuration_ConfigUtil::getSingleValuedValue( $runtime->getConfiguration(), - new phpkit_id_URNInetId('urn:inet:middlebury.edu:config:banner_course/id_authority'), + new phpkit_id_URNInetId('urn:inet:middlebury.edu:config:banner_course.id_authority'), new phpkit_type_Type('urn', 'middlebury.edu', 'Primitives/String')); if (!strlen($this->idAuthority)) { - throw new osid_ConfigurationErrorException('urn:inet:middlebury.edu:config:banner_course/id_authority must be specified.'); + throw new osid_ConfigurationErrorException('urn:inet:middlebury.edu:config:banner_course.id_authority must be specified.'); } } catch (osid_NotFoundException $e) { throw new osid_ConfigurationErrorException($e->getMessage(), $e->getCode(), $e); @@ -213,7 +213,7 @@ public function shutdown() public function getCourseLookupSession() { return new banner_course_Course_Lookup_CombinedSession($this, - new phpkit_id_URNInetId('urn:inet:'.$this->idAuthority.':catalog/all')); + new phpkit_id_URNInetId('urn:inet:'.$this->idAuthority.':catalog.all')); } /** @@ -268,7 +268,7 @@ public function getCourseLookupSessionForCatalog(osid_id_Id $courseCatalogId) public function getCourseSearchSession() { return new banner_course_Course_Search_Session($this, - new phpkit_id_URNInetId('urn:inet:'.$this->idAuthority.':catalog/all')); + new phpkit_id_URNInetId('urn:inet:'.$this->idAuthority.':catalog.all')); } /** diff --git a/application/library/banner/course/CourseOffering.php b/application/library/banner/course/CourseOffering.php index 1d714f31..dc6ce2b8 100755 --- a/application/library/banner/course/CourseOffering.php +++ b/application/library/banner/course/CourseOffering.php @@ -117,7 +117,7 @@ public function __construct(array $row, banner_course_CourseOffering_SessionInte $this->setGenusType(new phpkit_type_Type( 'urn', // namespace $this->session->getIdAuthority(), // id authority - 'genera:offering/'.$row['STVSCHD_CODE'], // identifier + 'genera:offering.'.$row['STVSCHD_CODE'], // identifier 'Course Offerings', // domain trim($row['STVSCHD_DESC']), // display name trim($row['STVSCHD_CODE']) // display label @@ -350,10 +350,10 @@ public function getTermId() { $termCode = $this->row['SSBSECT_TERM_CODE']; if (!empty($this->row['SSBSECT_PTRM_CODE']) && 1 != $this->row['SSBSECT_PTRM_CODE']) { - $termCode .= '/'.$this->row['SSBSECT_PTRM_CODE']; + $termCode .= '.'.$this->row['SSBSECT_PTRM_CODE']; } - return $this->getOsidIdFromString($termCode, 'term/'); + return $this->getOsidIdFromString($termCode, 'term.'); } /** @@ -387,16 +387,16 @@ public function getTopicIds() if (!isset($this->topicIds)) { $this->topicIds = []; if ($this->row['SCBCRSE_DEPT_CODE']) { - $this->topicIds[] = $this->getOsidIdFromString($this->row['SCBCRSE_DEPT_CODE'], 'topic/department/'); + $this->topicIds[] = $this->getOsidIdFromString($this->row['SCBCRSE_DEPT_CODE'], 'topic.department.'); } if ($this->row['SSBSECT_SUBJ_CODE']) { - $this->topicIds[] = $this->getOsidIdFromString($this->row['SSBSECT_SUBJ_CODE'], 'topic/subject/'); + $this->topicIds[] = $this->getOsidIdFromString($this->row['SSBSECT_SUBJ_CODE'], 'topic.subject.'); } if ($this->row['SCBCRSE_DIVS_CODE']) { - $this->topicIds[] = $this->getOsidIdFromString($this->row['SCBCRSE_DIVS_CODE'], 'topic/division/'); + $this->topicIds[] = $this->getOsidIdFromString($this->row['SCBCRSE_DIVS_CODE'], 'topic.division.'); } if ($this->row['GTVINSM_CODE']) { - $this->topicIds[] = $this->getOsidIdFromString($this->row['GTVINSM_CODE'], 'topic/instruction_method/'); + $this->topicIds[] = $this->getOsidIdFromString($this->row['GTVINSM_CODE'], 'topic.instruction_method.'); } $this->topicIds = array_merge( @@ -484,8 +484,8 @@ public function hasLocation() public function getLocationId() { return $this->getOsidIdFromString( - $this->row['SSRMEET_BLDG_CODE'].'/'.$this->row['SSRMEET_ROOM_CODE'], - 'resource/place/room/'); + $this->row['SSRMEET_BLDG_CODE'].'.'.$this->row['SSRMEET_ROOM_CODE'], + 'resource.place.room.'); } /** @@ -633,8 +633,8 @@ public function getCalendarId() throw new osid_IllegalStateException('This version of the OSID does not support Learning Objectives'); return $this->getOsidIdFromString( - $this->row['SSBSECT_TERM_CODE'].'/'.$this->row['SSBSECT_CRN'], - 'CourseSchedule/'); + $this->row['SSBSECT_TERM_CODE'].'.'.$this->row['SSBSECT_CRN'], + 'CourseSchedule.'); } /** @@ -879,7 +879,7 @@ public function getLinkSetId() $linkId = substr($this->row['SSBSECT_LINK_IDENT'], 1, 1); } - return $this->getOsidIdFromString($linkId, 'link_set/'); + return $this->getOsidIdFromString($linkId, 'link_set.'); } /** @@ -907,7 +907,7 @@ public function getLinkTypeId() $linkId = substr($this->row['SSBSECT_LINK_IDENT'], 0, 1); } - return $this->getOsidIdFromString($linkId, 'link_type/'); + return $this->getOsidIdFromString($linkId, 'link_type.'); } /********************************************************* diff --git a/application/library/banner/course/CourseOffering/AbstractSession.php b/application/library/banner/course/CourseOffering/AbstractSession.php index 94422035..2cb3e26f 100755 --- a/application/library/banner/course/CourseOffering/AbstractSession.php +++ b/application/library/banner/course/CourseOffering/AbstractSession.php @@ -28,7 +28,7 @@ public function getInstructorIdsForOffering(osid_id_Id $offeringId) { $ids = []; foreach ($this->getInstructorDataForOffering($offeringId) as $row) { - $ids[] = $this->getOsidIdFromString($row['WEB_ID'], 'resource/person/'); + $ids[] = $this->getOsidIdFromString($row['WEB_ID'], 'resource.person.'); } return new phpkit_id_ArrayIdList($ids); @@ -46,7 +46,7 @@ public function getInstructorsForOffering(osid_id_Id $offeringId) $people = []; foreach ($this->getInstructorDataForOffering($offeringId) as $row) { $people[] = new banner_resource_Resource_Person( - $this->getOsidIdFromString($row['WEB_ID'], 'resource/person/'), + $this->getOsidIdFromString($row['WEB_ID'], 'resource.person.'), $row['SYVINST_LAST_NAME'], $row['SYVINST_FIRST_NAME'] ); @@ -190,7 +190,7 @@ public function getRequirementTopicIdsForCourseOffering(osid_id_Id $courseOfferi self::$requirementTopics_stmt->execute($parameters); $topicIds = []; while ($row = self::$requirementTopics_stmt->fetch(PDO::FETCH_ASSOC)) { - $topicIds[] = $this->getOsidIdFromString($row['SSRATTR_ATTR_CODE'], 'topic/requirement/'); + $topicIds[] = $this->getOsidIdFromString($row['SSRATTR_ATTR_CODE'], 'topic.requirement.'); } self::$requirementTopics_stmt->closeCursor(); @@ -231,7 +231,7 @@ public function getLevelTopicIdsForCourseOffering(osid_id_Id $courseOfferingId) self::$levelTopics_stmt->execute($parameters); $topicIds = []; while ($row = self::$levelTopics_stmt->fetch(PDO::FETCH_ASSOC)) { - $topicIds[] = $this->getOsidIdFromString($row['SCRLEVL_LEVL_CODE'], 'topic/level/'); + $topicIds[] = $this->getOsidIdFromString($row['SCRLEVL_LEVL_CODE'], 'topic.level.'); } self::$levelTopics_stmt->closeCursor(); @@ -271,7 +271,7 @@ public function getBlockTopicIdsForCourseOffering(osid_id_Id $courseOfferingId) self::$blockTopics_stmt->execute($parameters); $topicIds = []; while ($row = self::$blockTopics_stmt->fetch(PDO::FETCH_ASSOC)) { - $topicIds[] = $this->getOsidIdFromString($row['SSRBLCK_BLCK_CODE'], 'topic/block/'); + $topicIds[] = $this->getOsidIdFromString($row['SSRBLCK_BLCK_CODE'], 'topic.block.'); } self::$blockTopics_stmt->closeCursor(); diff --git a/application/library/banner/course/CourseOffering/Catalog/Session.php b/application/library/banner/course/CourseOffering/Catalog/Session.php index 362a5d85..11762f30 100755 --- a/application/library/banner/course/CourseOffering/Catalog/Session.php +++ b/application/library/banner/course/CourseOffering/Catalog/Session.php @@ -35,7 +35,7 @@ class banner_course_CourseOffering_Catalog_Session extends banner_course_CourseO */ public function __construct(banner_course_CourseManagerInterface $manager) { - parent::__construct($manager, 'catalog/'); + parent::__construct($manager, 'catalog.'); } /** @@ -244,7 +244,7 @@ public function getCatalogIdsByCourseOffering(osid_id_Id $courseOfferingId) $ids = []; while ($row = $statement->fetch(PDO::FETCH_ASSOC)) { - $ids[] = $this->getOsidIdFromString($row['catalog_id'], 'catalog/'); + $ids[] = $this->getOsidIdFromString($row['catalog_id'], 'catalog.'); } $statement->closeCursor(); @@ -281,7 +281,7 @@ public function getCatalogsByCourseOffering(osid_id_Id $courseOfferingId) $catalogs = []; while ($row = $statement->fetch(PDO::FETCH_ASSOC)) { $catalogs[] = new banner_course_CourseCatalog( - $this->getOsidIdFromString($row['catalog_id'], 'catalog/'), + $this->getOsidIdFromString($row['catalog_id'], 'catalog.'), $row['catalog_title']); } $statement->closeCursor(); diff --git a/application/library/banner/course/CourseOffering/GenusTypeList.php b/application/library/banner/course/CourseOffering/GenusTypeList.php index 05644c3d..04121ae1 100755 --- a/application/library/banner/course/CourseOffering/GenusTypeList.php +++ b/application/library/banner/course/CourseOffering/GenusTypeList.php @@ -121,7 +121,7 @@ protected function getObjectFromRow(array $row) return new phpkit_type_Type( 'urn', // namespace $this->session->getIdAuthority(), // id authority - 'genera:offering/'.$row['STVSCHD_CODE'], // identifier + 'genera:offering.'.$row['STVSCHD_CODE'], // identifier 'Course Offerings', // domain $row['STVSCHD_DESC'], // display name $row['STVSCHD_CODE'] // display label diff --git a/application/library/banner/course/CourseOffering/Lookup/Session.php b/application/library/banner/course/CourseOffering/Lookup/Session.php index 10e34c1b..af38f847 100755 --- a/application/library/banner/course/CourseOffering/Lookup/Session.php +++ b/application/library/banner/course/CourseOffering/Lookup/Session.php @@ -47,7 +47,7 @@ class banner_course_CourseOffering_Lookup_Session extends banner_course_CourseOf */ public function __construct(banner_course_CourseManagerInterface $manager, osid_id_Id $catalogId) { - parent::__construct($manager, 'section/'); + parent::__construct($manager, 'section.'); $this->catalogId = $catalogId; } diff --git a/application/library/banner/course/CourseOffering/Search/Query.php b/application/library/banner/course/CourseOffering/Search/Query.php index e6a6e20f..103b6ba7 100755 --- a/application/library/banner/course/CourseOffering/Search/Query.php +++ b/application/library/banner/course/CourseOffering/Search/Query.php @@ -256,7 +256,7 @@ private function getGenusTypeCode(osid_type_Type $genusType) return null; } - if (!preg_match('/^genera:offering\/([a-z]+)$/i', $genusType->getIdentifier(), $matches)) { + if (!preg_match('/^genera:offering\.([a-z]+)$/i', $genusType->getIdentifier(), $matches)) { return null; } @@ -895,8 +895,8 @@ public function matchLocationId(osid_id_Id $resourceId, $match) { // Try room locations try { - $locationString = $this->session->getDatabaseIdString($resourceId, 'resource/place/room/'); - $locationParts = explode('/', $locationString); + $locationString = $this->session->getDatabaseIdString($resourceId, 'resource.place.room.'); + $locationParts = explode('.', $locationString); $this->addClause( 'location', '(SSRMEET_BLDG_CODE = ? AND SSRMEET_ROOM_CODE = ?)', @@ -906,7 +906,7 @@ public function matchLocationId(osid_id_Id $resourceId, $match) // Try building locations catch (osid_NotFoundException $e) { try { - $building = $this->session->getDatabaseIdString($resourceId, 'resource/place/building/'); + $building = $this->session->getDatabaseIdString($resourceId, 'resource.place.building.'); $this->addClause( 'location', 'SSRMEET_BLDG_CODE = ?', @@ -915,7 +915,7 @@ public function matchLocationId(osid_id_Id $resourceId, $match) } // Try campus locations catch (osid_NotFoundException $e) { - $campus = $this->session->getDatabaseIdString($resourceId, 'resource/place/campus/'); + $campus = $this->session->getDatabaseIdString($resourceId, 'resource.place.campus.'); $this->addClause( 'location', 'SSBSECT_CAMP_CODE = ?', @@ -1178,8 +1178,8 @@ public function matchCourseCatalogId(osid_id_Id $courseCatalogId, $match) catalog_id = ? ))', [ - $this->session->getDatabaseIdString($courseCatalogId, 'catalog/'), - $this->session->getDatabaseIdString($courseCatalogId, 'catalog/'), + $this->session->getDatabaseIdString($courseCatalogId, 'catalog.'), + $this->session->getDatabaseIdString($courseCatalogId, 'catalog.'), ], $match); } @@ -1273,7 +1273,7 @@ public function matchAnyURL($match) */ public function matchInstructorId(osid_id_Id $instructorId, $match) { - $this->addClause('instructor_id', 'WEB_ID = ?', [$this->session->getDatabaseIdString($instructorId, 'resource/person/')], $match); + $this->addClause('instructor_id', 'WEB_ID = ?', [$this->session->getDatabaseIdString($instructorId, 'resource.person.')], $match); $this->addTableJoin('LEFT JOIN SYVINST ON (SYVINST_TERM_CODE = SSBSECT_TERM_CODE AND SYVINST_CRN = SSBSECT_CRN)'); } diff --git a/application/library/banner/course/CourseOffering/Search/Session.php b/application/library/banner/course/CourseOffering/Search/Session.php index 3c645e4f..9073d072 100755 --- a/application/library/banner/course/CourseOffering/Search/Session.php +++ b/application/library/banner/course/CourseOffering/Search/Session.php @@ -47,7 +47,7 @@ class banner_course_CourseOffering_Search_Session extends banner_course_CourseOf */ public function __construct(banner_course_CourseManagerInterface $manager, osid_id_Id $catalogId) { - parent::__construct($manager, 'section/'); + parent::__construct($manager, 'section.'); $this->catalogId = $catalogId; } @@ -269,12 +269,12 @@ public function buildIndex($displayStatus = false) $offerings = $lookupSession->getCourseOfferings(); // Known topic types - $this->subjectType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic/subject'); - $this->departmentType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic/department'); - $this->divisionType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic/division'); - $this->requirementType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic/requirement'); - $this->blockType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic/block'); - $this->instructionMethodType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic/instruction_method'); + $this->subjectType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.subject'); + $this->departmentType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.department'); + $this->divisionType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.division'); + $this->requirementType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.requirement'); + $this->blockType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.block'); + $this->instructionMethodType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.instruction_method'); // Known record types $this->instructorsType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:record:instructors'); @@ -296,7 +296,7 @@ public function buildIndex($displayStatus = false) if (!$insertStmt->execute([':term_code' => $termCode, ':crn' => $crn, ':text' => $text])) { $info = $insertStmt->errorInfo(); - throw new osid_OperationFailedException('FullText update failed with code '.$info[0].'/'.$info[1].' - '.$info[2]); + throw new osid_OperationFailedException('FullText update failed with code '.$info[0].'.'.$info[1].' - '.$info[2]); } } catch (Exception $e) { echo "\nError of type:\n\t".$e::class."\nwith message:\n\t".$e->getMessage()."\n"; diff --git a/application/library/banner/course/Term/Catalog/Session.php b/application/library/banner/course/Term/Catalog/Session.php index b9aba1fa..c1e7c2d5 100755 --- a/application/library/banner/course/Term/Catalog/Session.php +++ b/application/library/banner/course/Term/Catalog/Session.php @@ -34,7 +34,7 @@ class banner_course_Term_Catalog_Session extends banner_course_AbstractSession i */ public function __construct(banner_course_CourseManagerInterface $manager) { - parent::__construct($manager, 'catalog/'); + parent::__construct($manager, 'catalog.'); } /** @@ -232,14 +232,14 @@ public function getTermsByCatalogs(osid_id_IdList $courseCatalogIdList) public function getCatalogIdsByTerm(osid_id_Id $termId) { $parameters = [ - ':section_term_code' => $this->getDatabaseIdString($termId, 'term/'), + ':section_term_code' => $this->getDatabaseIdString($termId, 'term.'), ]; $statement = $this->getGetCatalogsStatement(); $statement->execute($parameters); $ids = []; while ($row = $statement->fetch(PDO::FETCH_ASSOC)) { - $ids[] = $this->getOsidIdFromString($row['catalog_id'], 'catalog/'); + $ids[] = $this->getOsidIdFromString($row['catalog_id'], 'catalog.'); } $statement->closeCursor(); @@ -267,7 +267,7 @@ public function getCatalogIdsByTerm(osid_id_Id $termId) public function getCatalogsByTerm(osid_id_Id $termId) { $parameters = [ - ':section_term_code' => $this->getDatabaseIdString($termId, 'term/'), + ':section_term_code' => $this->getDatabaseIdString($termId, 'term.'), ]; $statement = $this->getGetCatalogsStatement(); $statement->execute($parameters); @@ -275,7 +275,7 @@ public function getCatalogsByTerm(osid_id_Id $termId) $catalogs = []; while ($row = $statement->fetch(PDO::FETCH_ASSOC)) { $catalogs[] = new banner_course_CourseCatalog( - $this->getOsidIdFromString($row['catalog_id'], 'catalog/'), + $this->getOsidIdFromString($row['catalog_id'], 'catalog.'), $row['catalog_title']); } $statement->closeCursor(); diff --git a/application/library/banner/course/Term/ForCourseList.php b/application/library/banner/course/Term/ForCourseList.php index 1c17f68d..6e1dfc3f 100755 --- a/application/library/banner/course/Term/ForCourseList.php +++ b/application/library/banner/course/Term/ForCourseList.php @@ -114,7 +114,7 @@ private function getAllInputParameters() protected function getObjectFromRow(array $row) { return new banner_course_Term( - $this->session->getOsidIdFromString($row['STVTERM_CODE'], 'term/'), + $this->session->getOsidIdFromString($row['STVTERM_CODE'], 'term.'), $row['STVTERM_DESC'], $row['STVTERM_START_DATE'], $row['STVTERM_END_DATE']); diff --git a/application/library/banner/course/Term/Lookup/AllList.php b/application/library/banner/course/Term/Lookup/AllList.php index b74ee291..a49758a5 100755 --- a/application/library/banner/course/Term/Lookup/AllList.php +++ b/application/library/banner/course/Term/Lookup/AllList.php @@ -95,7 +95,7 @@ private function getAllInputParameters() protected function getObjectFromRow(array $row) { return new banner_course_Term( - $this->session->getOsidIdFromString($row['STVTERM_CODE'], 'term/'), + $this->session->getOsidIdFromString($row['STVTERM_CODE'], 'term.'), $row['STVTERM_DESC'], $row['STVTERM_START_DATE'], $row['STVTERM_END_DATE']); diff --git a/application/library/banner/course/Term/Lookup/Session.php b/application/library/banner/course/Term/Lookup/Session.php index ec9bcd18..116ac0b0 100755 --- a/application/library/banner/course/Term/Lookup/Session.php +++ b/application/library/banner/course/Term/Lookup/Session.php @@ -48,7 +48,7 @@ class banner_course_Term_Lookup_Session extends banner_course_AbstractSession im */ public function __construct(banner_course_CourseManagerInterface $manager, ?osid_id_Id $catalogId = null) { - parent::__construct($manager, 'term/'); + parent::__construct($manager, 'term.'); if (null === $catalogId) { $this->catalogId = $manager->getCombinedCatalogId(); @@ -187,8 +187,8 @@ public function useIsolatedCourseCatalogView() */ public function getTerm(osid_id_Id $termId) { - $idString = $this->getDatabaseIdString($termId, 'term/'); - if (!preg_match('/^([0-9]{6})(?:\/([a-z0-9]{1,3}))?$/i', $idString, $matches)) { + $idString = $this->getDatabaseIdString($termId, 'term.'); + if (!preg_match('/^([0-9]{6})(?:\.([a-z0-9]{1,3}))?$/i', $idString, $matches)) { throw new osid_NotFoundException('Term id component \''.$idString.'\' could not be converted to a term code.'); } @@ -255,7 +255,7 @@ protected function getBaseTerm($idString) } return new banner_course_Term( - $this->getOsidIdFromString($row['STVTERM_CODE'], 'term/'), + $this->getOsidIdFromString($row['STVTERM_CODE'], 'term.'), $row['STVTERM_DESC'], $row['STVTERM_START_DATE'], $row['STVTERM_END_DATE']); @@ -341,7 +341,7 @@ protected function getPartOfTerm($termCode, $pTermCode) } return new banner_course_Term( - $this->getOsidIdFromString($row['STVTERM_CODE'].'/'.$row['SOBPTRM_PTRM_CODE'], 'term/'), + $this->getOsidIdFromString($row['STVTERM_CODE'].'.'.$row['SOBPTRM_PTRM_CODE'], 'term.'), $desc, $startDate, $endDate); @@ -374,7 +374,7 @@ private function getCatalogParameters() { $params = []; if (null !== $this->catalogId && !$this->catalogId->isEqual($this->getCombinedCatalogId())) { - $params[':catalog_id'] = $this->getDatabaseIdString($this->catalogId, 'catalog/'); + $params[':catalog_id'] = $this->getDatabaseIdString($this->catalogId, 'catalog.'); } return $params; diff --git a/application/library/banner/course/Topic/AbstractList.php b/application/library/banner/course/Topic/AbstractList.php index bbd3bb52..fc10c13d 100755 --- a/application/library/banner/course/Topic/AbstractList.php +++ b/application/library/banner/course/Topic/AbstractList.php @@ -566,10 +566,10 @@ abstract protected function includeSubjects(); final protected function getObjectFromRow(array $row) { return new banner_course_Topic( - $this->session->getOsidIdFromString($row['type'].'/'.$row['id'], 'topic/'), + $this->session->getOsidIdFromString($row['type'].'.'.$row['id'], 'topic.'), trim($row['display_name']), '', - new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic/'.$row['type']) + new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.'.$row['type']) ); } diff --git a/application/library/banner/course/Topic/Lookup/Session.php b/application/library/banner/course/Topic/Lookup/Session.php index 8c9c5e3c..07e79b77 100755 --- a/application/library/banner/course/Topic/Lookup/Session.php +++ b/application/library/banner/course/Topic/Lookup/Session.php @@ -46,7 +46,7 @@ class banner_course_Topic_Lookup_Session extends banner_course_AbstractSession i */ public function __construct(banner_course_CourseManagerInterface $manager, osid_id_Id $catalogId) { - parent::__construct($manager, 'section/'); + parent::__construct($manager, 'section.'); $this->catalogId = $catalogId; } @@ -215,8 +215,8 @@ public function getTopic(osid_id_Id $topicId) */ public function getTopicType(osid_id_Id $topicId) { - $string = $this->getDatabaseIdString($topicId, 'topic/'); - if (!preg_match('#(subject|department|division|requirement|level|block|instruction_method)/.+#', $string, $matches)) { + $string = $this->getDatabaseIdString($topicId, 'topic.'); + if (!preg_match('#(subject|department|division|requirement|level|block|instruction_method)..+#', $string, $matches)) { throw new osid_NotFoundException('Could not turn "'.$string.'" into a topic type.'); } @@ -232,8 +232,8 @@ public function getTopicType(osid_id_Id $topicId) */ public function getTopicValue(osid_id_Id $topicId) { - $string = $this->getDatabaseIdString($topicId, 'topic/'); - if (!preg_match('#(subject|department|division|requirement|level|block|instruction_method)/(.+)#', $string, $matches)) { + $string = $this->getDatabaseIdString($topicId, 'topic.'); + if (!preg_match('#(subject|department|division|requirement|level|block|instruction_method).(.+)#', $string, $matches)) { throw new osid_NotFoundException('Could not turn "'.$string.'" into a topic type.'); } @@ -278,7 +278,7 @@ private function getSubjectTopic(osid_id_Id $topicId) $parameters = array_merge( [ - ':subject_code' => $this->getDatabaseIdString($topicId, 'topic/subject/'), + ':subject_code' => $this->getDatabaseIdString($topicId, 'topic.subject.'), ], $this->getCatalogParameters()); self::$getSubjectTopic_stmts[$catalogWhere]->execute($parameters); @@ -286,14 +286,14 @@ private function getSubjectTopic(osid_id_Id $topicId) self::$getSubjectTopic_stmts[$catalogWhere]->closeCursor(); if (!$row['STVSUBJ_CODE']) { - throw new osid_NotFoundException('Could not find a topic matching the subject code '.$this->getDatabaseIdString($topicId, 'topic/subject/').'.'); + throw new osid_NotFoundException('Could not find a topic matching the subject code '.$this->getDatabaseIdString($topicId, 'topic.subject.').'.'); } return new banner_course_Topic( - $this->getOsidIdFromString($row['STVSUBJ_CODE'], 'topic/subject/'), + $this->getOsidIdFromString($row['STVSUBJ_CODE'], 'topic.subject.'), trim($row['STVSUBJ_DESC']), '', - new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic/subject') + new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.subject') ); } @@ -339,10 +339,10 @@ private function getSubjectTopics() $topics = []; while ($row = self::$getSubjectTopics_stmts[$catalogWhere]->fetch(PDO::FETCH_ASSOC)) { $topics[] = new banner_course_Topic( - $this->getOsidIdFromString($row['STVSUBJ_CODE'], 'topic/subject/'), + $this->getOsidIdFromString($row['STVSUBJ_CODE'], 'topic.subject.'), trim($row['STVSUBJ_DESC']), '', - new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic/subject') + new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.subject') ); } self::$getSubjectTopics_stmts[$catalogWhere]->closeCursor(); @@ -388,7 +388,7 @@ private function getDepartmentTopic(osid_id_Id $topicId) $parameters = array_merge( [ - ':department_code' => $this->getDatabaseIdString($topicId, 'topic/department/'), + ':department_code' => $this->getDatabaseIdString($topicId, 'topic.department.'), ], $this->getCatalogParameters()); self::$getDepartmentTopic_stmts[$catalogWhere]->execute($parameters); @@ -396,14 +396,14 @@ private function getDepartmentTopic(osid_id_Id $topicId) self::$getDepartmentTopic_stmts[$catalogWhere]->closeCursor(); if (!$row['STVDEPT_CODE']) { - throw new osid_NotFoundException('Could not find a topic matching the department code '.$this->getDatabaseIdString($topicId, 'topic/department/').'.'); + throw new osid_NotFoundException('Could not find a topic matching the department code '.$this->getDatabaseIdString($topicId, 'topic.department.').'.'); } return new banner_course_Topic( - $this->getOsidIdFromString($row['STVDEPT_CODE'], 'topic/department/'), + $this->getOsidIdFromString($row['STVDEPT_CODE'], 'topic.department.'), trim($row['STVDEPT_DESC']), '', - new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic/department') + new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.department') ); } @@ -448,10 +448,10 @@ private function getDepartmentTopics() $topics = []; while ($row = self::$getDepartmentTopics_stmts[$catalogWhere]->fetch(PDO::FETCH_ASSOC)) { $topics[] = new banner_course_Topic( - $this->getOsidIdFromString($row['STVDEPT_CODE'], 'topic/department/'), + $this->getOsidIdFromString($row['STVDEPT_CODE'], 'topic.department.'), trim($row['STVDEPT_DESC']), '', - new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic/department') + new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.department') ); } self::$getDepartmentTopics_stmts[$catalogWhere]->closeCursor(); @@ -497,7 +497,7 @@ private function getDivisionTopic(osid_id_Id $topicId) $parameters = array_merge( [ - ':division_code' => $this->getDatabaseIdString($topicId, 'topic/division/'), + ':division_code' => $this->getDatabaseIdString($topicId, 'topic.division.'), ], $this->getCatalogParameters()); self::$getDivisionTopic_stmts[$catalogWhere]->execute($parameters); @@ -505,14 +505,14 @@ private function getDivisionTopic(osid_id_Id $topicId) self::$getDivisionTopic_stmts[$catalogWhere]->closeCursor(); if (!$row['STVDIVS_CODE']) { - throw new osid_NotFoundException('Could not find a topic matching the division code '.$this->getDatabaseIdString($topicId, 'topic/division/').'.'); + throw new osid_NotFoundException('Could not find a topic matching the division code '.$this->getDatabaseIdString($topicId, 'topic.division.').'.'); } return new banner_course_Topic( - $this->getOsidIdFromString($row['STVDIVS_CODE'], 'topic/division/'), + $this->getOsidIdFromString($row['STVDIVS_CODE'], 'topic.division.'), trim($row['STVDIVS_DESC']), '', - new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic/division') + new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.division') ); } @@ -557,10 +557,10 @@ private function getDivisionTopics() $topics = []; while ($row = self::$getDivisionTopics_stmts[$catalogWhere]->fetch(PDO::FETCH_ASSOC)) { $topics[] = new banner_course_Topic( - $this->getOsidIdFromString($row['STVDIVS_CODE'], 'topic/division/'), + $this->getOsidIdFromString($row['STVDIVS_CODE'], 'topic.division.'), trim($row['STVDIVS_DESC']), '', - new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic/division') + new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.division') ); } self::$getDivisionTopics_stmts[$catalogWhere]->closeCursor(); @@ -626,7 +626,7 @@ private function getRequirementTopic(osid_id_Id $topicId) $parameters = array_merge( [ - ':requirement_code' => $this->getDatabaseIdString($topicId, 'topic/requirement/'), + ':requirement_code' => $this->getDatabaseIdString($topicId, 'topic.requirement.'), ], $this->getCatalogParameters()); self::$getRequirementTopic_stmts[$catalogWhere]->execute($parameters); @@ -640,15 +640,15 @@ private function getRequirementTopic(osid_id_Id $topicId) self::$getCourseRequirementTopic_stmts[$catalogWhere]->closeCursor(); if (!$row['STVATTR_CODE']) { - throw new osid_NotFoundException('Could not find a topic matching the requirement code '.$this->getDatabaseIdString($topicId, 'topic/requirement/').'.'); + throw new osid_NotFoundException('Could not find a topic matching the requirement code '.$this->getDatabaseIdString($topicId, 'topic.requirement.').'.'); } } return new banner_course_Topic( - $this->getOsidIdFromString($row['STVATTR_CODE'], 'topic/requirement/'), + $this->getOsidIdFromString($row['STVATTR_CODE'], 'topic.requirement.'), trim($row['STVATTR_DESC']), '', - new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic/requirement') + new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.requirement') ); } @@ -687,10 +687,10 @@ private function getRequirementTopics() $topics = []; while ($row = self::$getRequirementTopics_stmts[$catalogWhere]->fetch(PDO::FETCH_ASSOC)) { $topics[] = new banner_course_Topic( - $this->getOsidIdFromString($row['STVATTR_CODE'], 'topic/requirement/'), + $this->getOsidIdFromString($row['STVATTR_CODE'], 'topic.requirement.'), trim($row['STVATTR_DESC']), '', - new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic/requirement') + new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.requirement') ); } self::$getRequirementTopics_stmts[$catalogWhere]->closeCursor(); @@ -737,7 +737,7 @@ private function getLevelTopic(osid_id_Id $topicId) $parameters = array_merge( [ - ':level_code' => $this->getDatabaseIdString($topicId, 'topic/level/'), + ':level_code' => $this->getDatabaseIdString($topicId, 'topic.level.'), ], $this->getCatalogParameters()); self::$getLevelTopic_stmts[$catalogWhere]->execute($parameters); @@ -745,14 +745,14 @@ private function getLevelTopic(osid_id_Id $topicId) self::$getLevelTopic_stmts[$catalogWhere]->closeCursor(); if (!$row['STVLEVL_CODE']) { - throw new osid_NotFoundException('Could not find a topic matching the level code '.$this->getDatabaseIdString($topicId, 'topic/level/').'.'); + throw new osid_NotFoundException('Could not find a topic matching the level code '.$this->getDatabaseIdString($topicId, 'topic.level.').'.'); } return new banner_course_Topic( - $this->getOsidIdFromString($row['STVLEVL_CODE'], 'topic/level/'), + $this->getOsidIdFromString($row['STVLEVL_CODE'], 'topic.level.'), trim($row['STVLEVL_DESC']), '', - new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic/level') + new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.level') ); } @@ -798,10 +798,10 @@ private function getLevelTopics() $topics = []; while ($row = self::$getLevelTopics_stmts[$catalogWhere]->fetch(PDO::FETCH_ASSOC)) { $topics[] = new banner_course_Topic( - $this->getOsidIdFromString($row['STVLEVL_CODE'], 'topic/level/'), + $this->getOsidIdFromString($row['STVLEVL_CODE'], 'topic.level.'), trim($row['STVLEVL_DESC']), '', - new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic/level') + new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.level') ); } self::$getLevelTopics_stmts[$catalogWhere]->closeCursor(); @@ -841,7 +841,7 @@ private function getBlockTopic(osid_id_Id $topicId) $parameters = array_merge( [ - ':block_code' => $this->getDatabaseIdString($topicId, 'topic/block/'), + ':block_code' => $this->getDatabaseIdString($topicId, 'topic.block.'), ], $this->getCatalogParameters()); self::$getBlockTopic_stmts[$catalogWhere]->execute($parameters); @@ -849,14 +849,14 @@ private function getBlockTopic(osid_id_Id $topicId) self::$getBlockTopic_stmts[$catalogWhere]->closeCursor(); if (!$row['STVBLCK_CODE']) { - throw new osid_NotFoundException('Could not find a topic matching the block code '.$this->getDatabaseIdString($topicId, 'topic/block/').'.'); + throw new osid_NotFoundException('Could not find a topic matching the block code '.$this->getDatabaseIdString($topicId, 'topic.block.').'.'); } return new banner_course_Topic( - $this->getOsidIdFromString($row['STVBLCK_CODE'], 'topic/block/'), + $this->getOsidIdFromString($row['STVBLCK_CODE'], 'topic.block.'), trim($row['STVBLCK_DESC']), '', - new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic/block') + new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.block') ); } @@ -895,10 +895,10 @@ private function getBlockTopics() $topics = []; while ($row = self::$getBlockTopics_stmts[$catalogWhere]->fetch(PDO::FETCH_ASSOC)) { $topics[] = new banner_course_Topic( - $this->getOsidIdFromString($row['STVBLCK_CODE'], 'topic/block/'), + $this->getOsidIdFromString($row['STVBLCK_CODE'], 'topic.block.'), trim($row['STVBLCK_DESC']), '', - new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic/block') + new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.block') ); } self::$getBlockTopics_stmts[$catalogWhere]->closeCursor(); @@ -938,7 +938,7 @@ private function getInstructionMethodTopic(osid_id_Id $topicId) $parameters = array_merge( [ - ':insm_code' => $this->getDatabaseIdString($topicId, 'topic/instruction_method/'), + ':insm_code' => $this->getDatabaseIdString($topicId, 'topic.instruction_method.'), ], $this->getCatalogParameters()); self::$getInstructionMethodTopic_stmts[$catalogWhere]->execute($parameters); @@ -946,14 +946,14 @@ private function getInstructionMethodTopic(osid_id_Id $topicId) self::$getInstructionMethodTopic_stmts[$catalogWhere]->closeCursor(); if (!$row['GTVINSM_CODE']) { - throw new osid_NotFoundException('Could not find a topic matching the instruction_method code '.$this->getDatabaseIdString($topicId, 'topic/instruction_method/').'.'); + throw new osid_NotFoundException('Could not find a topic matching the instruction_method code '.$this->getDatabaseIdString($topicId, 'topic.instruction_method.').'.'); } return new banner_course_Topic( - $this->getOsidIdFromString($row['GTVINSM_CODE'], 'topic/instruction_method/'), + $this->getOsidIdFromString($row['GTVINSM_CODE'], 'topic.instruction_method.'), trim($row['GTVINSM_DESC']), '', - new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic/instruction_method') + new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.instruction_method') ); } @@ -992,10 +992,10 @@ private function getInstructionMethodTopics() $topics = []; while ($row = self::$getInstructionMethodTopics_stmts[$catalogWhere]->fetch(PDO::FETCH_ASSOC)) { $topics[] = new banner_course_Topic( - $this->getOsidIdFromString($row['GTVINSM_CODE'], 'topic/instruction_method/'), + $this->getOsidIdFromString($row['GTVINSM_CODE'], 'topic.instruction_method.'), trim($row['GTVINSM_DESC']), '', - new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic/instruction_method') + new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.instruction_method') ); } self::$getInstructionMethodTopics_stmts[$catalogWhere]->closeCursor(); @@ -1111,19 +1111,19 @@ public function getTopicsByGenusType(osid_type_Type $topicGenusType) return new phpkit_EmptyList('osid_course_TopicList'); } switch ($topicGenusType->getIdentifier()) { - case 'genera:topic/subject': + case 'genera:topic.subject': return $this->getSubjectTopics(); - case 'genera:topic/department': + case 'genera:topic.department': return $this->getDepartmentTopics(); - case 'genera:topic/division': + case 'genera:topic.division': return $this->getDivisionTopics(); - case 'genera:topic/requirement': + case 'genera:topic.requirement': return $this->getRequirementTopics(); - case 'genera:topic/level': + case 'genera:topic.level': return $this->getLevelTopics(); - case 'genera:topic/block': + case 'genera:topic.block': return $this->getBlockTopics(); - case 'genera:topic/instruction_method': + case 'genera:topic.instruction_method': return $this->getInstructionMethodTopics(); default: return new phpkit_EmptyList('osid_course_TopicList'); diff --git a/application/library/banner/course/Topic/Search/Query.php b/application/library/banner/course/Topic/Search/Query.php index b17c2f77..3ccff3c3 100755 --- a/application/library/banner/course/Topic/Search/Query.php +++ b/application/library/banner/course/Topic/Search/Query.php @@ -39,13 +39,13 @@ public function __construct(banner_course_SessionInterface $session) $this->termType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:record:terms'); - $this->subjectType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic/subject'); - $this->departmentType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic/department'); - $this->divisionType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic/division'); - $this->requirementType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic/requirement'); - $this->levelType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic/level'); - $this->blockType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic/block'); - $this->instructionMethodType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic/instruction_method'); + $this->subjectType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.subject'); + $this->departmentType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.department'); + $this->divisionType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.division'); + $this->requirementType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.requirement'); + $this->levelType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.level'); + $this->blockType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.block'); + $this->instructionMethodType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.instruction_method'); $this->toInclude = []; } diff --git a/application/library/banner/course/Topic/Search/Query/Block.php b/application/library/banner/course/Topic/Search/Query/Block.php index 10c04d1b..0038fc65 100755 --- a/application/library/banner/course/Topic/Search/Query/Block.php +++ b/application/library/banner/course/Topic/Search/Query/Block.php @@ -379,6 +379,6 @@ public function getTopicQueryRecord(osid_type_Type $topicRecordType) */ public function matchTermId(osid_id_Id $termId, $match) { - $this->addClause('term', 'SSBSECT_TERM_CODE = ?', [$this->session->getDatabaseIdString($termId, 'term/')], $match); + $this->addClause('term', 'SSBSECT_TERM_CODE = ?', [$this->session->getDatabaseIdString($termId, 'term.')], $match); } } diff --git a/application/library/banner/course/Topic/Search/Query/Department.php b/application/library/banner/course/Topic/Search/Query/Department.php index 452c344a..e98ff86b 100755 --- a/application/library/banner/course/Topic/Search/Query/Department.php +++ b/application/library/banner/course/Topic/Search/Query/Department.php @@ -379,6 +379,6 @@ public function getTopicQueryRecord(osid_type_Type $topicRecordType) */ public function matchTermId(osid_id_Id $termId, $match) { - $this->addClause('term', 'SSBSECT_TERM_CODE = ?', [$this->session->getDatabaseIdString($termId, 'term/')], $match); + $this->addClause('term', 'SSBSECT_TERM_CODE = ?', [$this->session->getDatabaseIdString($termId, 'term.')], $match); } } diff --git a/application/library/banner/course/Topic/Search/Query/Division.php b/application/library/banner/course/Topic/Search/Query/Division.php index 390e735b..95f29e51 100755 --- a/application/library/banner/course/Topic/Search/Query/Division.php +++ b/application/library/banner/course/Topic/Search/Query/Division.php @@ -379,6 +379,6 @@ public function getTopicQueryRecord(osid_type_Type $topicRecordType) */ public function matchTermId(osid_id_Id $termId, $match) { - $this->addClause('term', 'SSBSECT_TERM_CODE = ?', [$this->session->getDatabaseIdString($termId, 'term/')], $match); + $this->addClause('term', 'SSBSECT_TERM_CODE = ?', [$this->session->getDatabaseIdString($termId, 'term.')], $match); } } diff --git a/application/library/banner/course/Topic/Search/Query/InstructionMethod.php b/application/library/banner/course/Topic/Search/Query/InstructionMethod.php index 154b90d1..6d816c30 100644 --- a/application/library/banner/course/Topic/Search/Query/InstructionMethod.php +++ b/application/library/banner/course/Topic/Search/Query/InstructionMethod.php @@ -375,6 +375,6 @@ public function getTopicQueryRecord(osid_type_Type $topicRecordType) */ public function matchTermId(osid_id_Id $termId, $match) { - $this->addClause('term', 'SSBSECT_TERM_CODE = ?', [$this->session->getDatabaseIdString($termId, 'term/')], $match); + $this->addClause('term', 'SSBSECT_TERM_CODE = ?', [$this->session->getDatabaseIdString($termId, 'term.')], $match); } } diff --git a/application/library/banner/course/Topic/Search/Query/Level.php b/application/library/banner/course/Topic/Search/Query/Level.php index 058bada9..8642814e 100755 --- a/application/library/banner/course/Topic/Search/Query/Level.php +++ b/application/library/banner/course/Topic/Search/Query/Level.php @@ -379,6 +379,6 @@ public function getTopicQueryRecord(osid_type_Type $topicRecordType) */ public function matchTermId(osid_id_Id $termId, $match) { - $this->addClause('term', 'SSBSECT_TERM_CODE = ?', [$this->session->getDatabaseIdString($termId, 'term/')], $match); + $this->addClause('term', 'SSBSECT_TERM_CODE = ?', [$this->session->getDatabaseIdString($termId, 'term.')], $match); } } diff --git a/application/library/banner/course/Topic/Search/Query/Requirement.php b/application/library/banner/course/Topic/Search/Query/Requirement.php index 2572290e..f9bf8237 100755 --- a/application/library/banner/course/Topic/Search/Query/Requirement.php +++ b/application/library/banner/course/Topic/Search/Query/Requirement.php @@ -379,6 +379,6 @@ public function getTopicQueryRecord(osid_type_Type $topicRecordType) */ public function matchTermId(osid_id_Id $termId, $match) { - $this->addClause('term', 'SSBSECT_TERM_CODE = ?', [$this->session->getDatabaseIdString($termId, 'term/')], $match); + $this->addClause('term', 'SSBSECT_TERM_CODE = ?', [$this->session->getDatabaseIdString($termId, 'term.')], $match); } } diff --git a/application/library/banner/course/Topic/Search/Query/Subject.php b/application/library/banner/course/Topic/Search/Query/Subject.php index d180982f..06f74654 100755 --- a/application/library/banner/course/Topic/Search/Query/Subject.php +++ b/application/library/banner/course/Topic/Search/Query/Subject.php @@ -379,6 +379,6 @@ public function getTopicQueryRecord(osid_type_Type $topicRecordType) */ public function matchTermId(osid_id_Id $termId, $match) { - $this->addClause('term', 'SSBSECT_TERM_CODE = ?', [$this->session->getDatabaseIdString($termId, 'term/')], $match); + $this->addClause('term', 'SSBSECT_TERM_CODE = ?', [$this->session->getDatabaseIdString($termId, 'term.')], $match); } } diff --git a/application/library/banner/course/Topic/Search/Session.php b/application/library/banner/course/Topic/Search/Session.php index 4c0bc9f5..36c4fecf 100755 --- a/application/library/banner/course/Topic/Search/Session.php +++ b/application/library/banner/course/Topic/Search/Session.php @@ -45,7 +45,7 @@ class banner_course_Topic_Search_Session extends banner_course_AbstractSession i */ public function __construct(banner_course_CourseManagerInterface $manager, osid_id_Id $catalogId) { - parent::__construct($manager, 'section/'); + parent::__construct($manager, 'section.'); $this->catalogId = $catalogId; } diff --git a/application/library/banner/resource/Bin/Lookup/Session.php b/application/library/banner/resource/Bin/Lookup/Session.php index de76dc68..8d972c8e 100755 --- a/application/library/banner/resource/Bin/Lookup/Session.php +++ b/application/library/banner/resource/Bin/Lookup/Session.php @@ -40,7 +40,7 @@ class banner_resource_Bin_Lookup_Session extends banner_AbstractSession implemen */ public function __construct(banner_ManagerInterface $manager) { - parent::__construct($manager, 'catalog/'); + parent::__construct($manager, 'catalog.'); } /** diff --git a/application/library/banner/resource/Resource/Building.php b/application/library/banner/resource/Resource/Building.php index 3c467717..59d4ccd9 100644 --- a/application/library/banner/resource/Resource/Building.php +++ b/application/library/banner/resource/Resource/Building.php @@ -39,7 +39,7 @@ public function __construct(osid_id_Id $id, $displayName, $code) $this->setId($id); $this->setDisplayName($displayName); $this->setDescription($code); - $this->setGenusType(new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:resource/place/building')); + $this->setGenusType(new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:resource.place.building')); $this->buildingDisplayName = $displayName; $this->buildingCode = $code; diff --git a/application/library/banner/resource/Resource/Lookup/CombinedSession.php b/application/library/banner/resource/Resource/Lookup/CombinedSession.php index 08445eba..9e4b368d 100755 --- a/application/library/banner/resource/Resource/Lookup/CombinedSession.php +++ b/application/library/banner/resource/Resource/Lookup/CombinedSession.php @@ -45,7 +45,7 @@ class banner_resource_Resource_Lookup_CombinedSession extends banner_AbstractSes */ public function __construct(banner_ManagerInterface $manager) { - parent::__construct($manager, 'resource/'); + parent::__construct($manager, 'resource.'); } /** @@ -181,11 +181,11 @@ public function getResource(osid_id_Id $resourceId) switch ($type) { case 'person': return $this->getPersonResource($resourceId); - case 'place/room': + case 'place.room': return $this->getRoomResource($resourceId); - case 'place/building': + case 'place.building': return $this->getBuildingResource($resourceId); - case 'place/campus': + case 'place.campus': return $this->getCampusResource($resourceId); default: throw new osid_NotFoundException('No resource found with category '.$type); @@ -201,8 +201,8 @@ public function getResource(osid_id_Id $resourceId) */ public function getResourceType(osid_id_Id $resourceId) { - $string = $this->getDatabaseIdString($resourceId, 'resource/'); - if (!preg_match('#(person|place/room|place/building|place/campus)/(.+)#', $string, $matches)) { + $string = $this->getDatabaseIdString($resourceId, 'resource.'); + if (!preg_match('#(person|place\.room|place\.building|place\.campus)\.(.+)#', $string, $matches)) { throw new osid_NotFoundException('Could not turn "'.$string.'" into a resource type.'); } @@ -218,8 +218,8 @@ public function getResourceType(osid_id_Id $resourceId) */ public function getResourceValue(osid_id_Id $resourceId) { - $string = $this->getDatabaseIdString($resourceId, 'resource/'); - if (!preg_match('#(person|place/room|place/building|place/campus)/(.+)#', $string, $matches)) { + $string = $this->getDatabaseIdString($resourceId, 'resource.'); + if (!preg_match('#(person|place\.room|place\.building|place\.campus)\.(.+)#', $string, $matches)) { throw new osid_NotFoundException('Could not turn "'.$string.'" into a resource type.'); } @@ -252,18 +252,18 @@ private function getPersonResource(osid_id_Id $resourceId) } $parameters = [ - ':webid' => $this->getDatabaseIdString($resourceId, 'resource/person/'), + ':webid' => $this->getDatabaseIdString($resourceId, 'resource.person.'), ]; self::$getPersonResource_stmt->execute($parameters); $row = self::$getPersonResource_stmt->fetch(PDO::FETCH_ASSOC); self::$getPersonResource_stmt->closeCursor(); if (!$row['WEB_ID']) { - throw new osid_NotFoundException('Could not find a resource matching the person code '.$this->getDatabaseIdString($resourceId, 'resource/person/').'.'); + throw new osid_NotFoundException('Could not find a resource matching the person code '.$this->getDatabaseIdString($resourceId, 'resource.person.').'.'); } return new banner_resource_Resource_Person( - $this->getOsidIdFromString($row['WEB_ID'], 'resource/person/'), + $this->getOsidIdFromString($row['WEB_ID'], 'resource.person.'), $row['SYVINST_LAST_NAME'], $row['SYVINST_FIRST_NAME'] ); @@ -298,7 +298,7 @@ private function getPersonResources() $resources = []; while ($row = self::$getPersonResources_stmt->fetch(PDO::FETCH_ASSOC)) { $resources[] = new banner_resource_Resource_Person( - $this->getOsidIdFromString($row['WEB_ID'], 'resource/person/'), + $this->getOsidIdFromString($row['WEB_ID'], 'resource.person.'), $row['SYVINST_LAST_NAME'], $row['SYVINST_FIRST_NAME'] ); @@ -333,18 +333,18 @@ private function getBuildingResource(osid_id_Id $resourceId) } $parameters = [ - ':code' => $this->getDatabaseIdString($resourceId, 'resource/place/building/'), + ':code' => $this->getDatabaseIdString($resourceId, 'resource.place.building.'), ]; self::$getBuildingResource_stmt->execute($parameters); $row = self::$getBuildingResource_stmt->fetch(PDO::FETCH_ASSOC); self::$getBuildingResource_stmt->closeCursor(); if (!$row['STVBLDG_CODE']) { - throw new osid_NotFoundException('Could not find a resource matching the building code '.$this->getDatabaseIdString($resourceId, 'resource/place/building/').'.'); + throw new osid_NotFoundException('Could not find a resource matching the building code '.$this->getDatabaseIdString($resourceId, 'resource.place.building.').'.'); } return new banner_resource_Resource_Building( - $this->getOsidIdFromString($row['STVBLDG_CODE'], 'resource/place/building/'), + $this->getOsidIdFromString($row['STVBLDG_CODE'], 'resource.place.building.'), $row['STVBLDG_DESC'], $row['STVBLDG_CODE'] ); @@ -377,7 +377,7 @@ private function getBuildingResources() $resources = []; while ($row = self::$getBuildingResources_stmt->fetch(PDO::FETCH_ASSOC)) { $resources[] = new banner_resource_Resource_Building( - $this->getOsidIdFromString($row['STVBLDG_CODE'], 'resource/place/building/'), + $this->getOsidIdFromString($row['STVBLDG_CODE'], 'resource.place.building.'), $row['STVBLDG_DESC'], $row['STVBLDG_CODE'] ); @@ -416,8 +416,8 @@ private function getRoomResource(osid_id_Id $resourceId) self::$getRoomResource_stmt = $this->manager->getDB()->prepare($query); } - $roomString = $this->getDatabaseIdString($resourceId, 'resource/place/room/'); - if (!preg_match('#^([a-z0-9_-]+)/(.+)$#i', $roomString, $matches)) { + $roomString = $this->getDatabaseIdString($resourceId, 'resource.place.room.'); + if (!preg_match('#^([a-z0-9_-]+)\.(.+)$#i', $roomString, $matches)) { throw new osid_NotFoundException("Room string '$roomString' doesn't match."); } @@ -430,11 +430,11 @@ private function getRoomResource(osid_id_Id $resourceId) self::$getRoomResource_stmt->closeCursor(); if (!$row['STVBLDG_CODE']) { - throw new osid_NotFoundException('Could not find a resource matching the room code '.$this->getDatabaseIdString($resourceId, 'resource/place/room/').'.'); + throw new osid_NotFoundException('Could not find a resource matching the room code '.$this->getDatabaseIdString($resourceId, 'resource.place.room.').'.'); } return new banner_resource_Resource_Room( - $this->getOsidIdFromString($row['STVBLDG_CODE'].'/'.$row['SSRMEET_ROOM_CODE'], 'resource/place/room/'), + $this->getOsidIdFromString($row['STVBLDG_CODE'].'.'.$row['SSRMEET_ROOM_CODE'], 'resource.place.room.'), $row['STVBLDG_DESC'], $row['STVBLDG_CODE'], $row['SSRMEET_ROOM_CODE'] @@ -474,7 +474,7 @@ private function getRoomResources() $resources = []; while ($row = self::$getRoomResources_stmt->fetch(PDO::FETCH_ASSOC)) { $resources[] = new banner_resource_Resource_Room( - $this->getOsidIdFromString($row['STVBLDG_CODE'].'/'.$row['SSRMEET_ROOM_CODE'], 'resource/place/room/'), + $this->getOsidIdFromString($row['STVBLDG_CODE'].'.'.$row['SSRMEET_ROOM_CODE'], 'resource.place.room.'), $row['STVBLDG_DESC'], $row['STVBLDG_CODE'], $row['SSRMEET_ROOM_CODE'] @@ -510,21 +510,21 @@ private function getCampusResource(osid_id_Id $resourceId) } $parameters = [ - ':code' => $this->getDatabaseIdString($resourceId, 'resource/place/campus/'), + ':code' => $this->getDatabaseIdString($resourceId, 'resource.place.campus.'), ]; self::$getCampusResource_stmt->execute($parameters); $row = self::$getCampusResource_stmt->fetch(PDO::FETCH_ASSOC); self::$getCampusResource_stmt->closeCursor(); if (!$row['STVCAMP_CODE']) { - throw new osid_NotFoundException('Could not find a resource matching the campus code '.$this->getDatabaseIdString($resourceId, 'resource/place/campus/').'.'); + throw new osid_NotFoundException('Could not find a resource matching the campus code '.$this->getDatabaseIdString($resourceId, 'resource.place.campus.').'.'); } return new banner_resource_Resource_Place( - $this->getOsidIdFromString($row['STVCAMP_CODE'], 'resource/place/campus/'), + $this->getOsidIdFromString($row['STVCAMP_CODE'], 'resource.place.campus.'), $row['STVCAMP_DESC'], '', - new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:resource/place/campus') + new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:resource.place.campus') ); } @@ -555,10 +555,10 @@ private function getCampusResources() $resources = []; while ($row = self::$getCampusResources_stmt->fetch(PDO::FETCH_ASSOC)) { $resources[] = new banner_resource_Resource_Place( - $this->getOsidIdFromString($row['STVCAMP_CODE'], 'resource/place/campus/'), + $this->getOsidIdFromString($row['STVCAMP_CODE'], 'resource.place.campus.'), $row['STVCAMP_DESC'], '', - new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:resource/place/campus') + new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:resource.place.campus') ); } self::$getCampusResources_stmt->closeCursor(); @@ -641,15 +641,15 @@ public function getResourcesByGenusType(osid_type_Type $resourceGenusType) return new phpkit_EmptyList('osid_resource_ResourceList'); } switch ($resourceGenusType->getIdentifier()) { - case 'genera:resource/person': + case 'genera:resource.person': return $this->getPersonResources(); - case 'genera:resource/place/campus': + case 'genera:resource.place.campus': return $this->getCampusResources(); - case 'genera:resource/place/building': + case 'genera:resource.place.building': return $this->getBuildingResources(); - case 'genera:resource/place/room': + case 'genera:resource.place.room': return $this->getRoomResources(); - // case 'genera:resource/place': + // case 'genera:resource.place': // return $this->getPlaceResources(); default: return new phpkit_EmptyList('osid_resource_ResourceList'); @@ -685,7 +685,7 @@ public function getResourcesByParentGenusType(osid_type_Type $resourceGenusType) return new phpkit_EmptyList('osid_resource_ResourceList'); } - if ('genera:resource/place' == $resourceGenusType->getIdentifier()) { + if ('genera:resource.place' == $resourceGenusType->getIdentifier()) { $resourceList = new phpkit_CombinedList('osid_resource_ResourceList'); $resourceList->addList($this->getCampusResources()); $resourceList->addList($this->getBuildingResources()); diff --git a/application/library/banner/resource/Resource/Lookup/PerCatalogSession.php b/application/library/banner/resource/Resource/Lookup/PerCatalogSession.php index 88de7ce4..48d6de3d 100755 --- a/application/library/banner/resource/Resource/Lookup/PerCatalogSession.php +++ b/application/library/banner/resource/Resource/Lookup/PerCatalogSession.php @@ -45,7 +45,7 @@ class banner_resource_Resource_Lookup_PerCatalogSession extends banner_AbstractS */ public function __construct(banner_ManagerInterface $manager, osid_id_Id $binId) { - parent::__construct($manager, 'resource/'); + parent::__construct($manager, 'resource.'); $this->binId = $binId; } @@ -80,7 +80,7 @@ private function getCatalogParameters() { $params = []; if (null !== $this->binId && !$this->binId->isEqual($this->manager->getCombinedBinId())) { - $params[':catalog_id'] = $this->getDatabaseIdString($this->binId, 'catalog/'); + $params[':catalog_id'] = $this->getDatabaseIdString($this->binId, 'catalog.'); } return $params; @@ -225,11 +225,11 @@ public function getResource(osid_id_Id $resourceId) switch ($type) { case 'person': return $this->getPersonResource($resourceId); - case 'place/room': + case 'place.room': return $this->getRoomResource($resourceId); - case 'place/building': + case 'place.building': return $this->getBuildingResource($resourceId); - case 'place/campus': + case 'place.campus': return $this->getCampusResource($resourceId); default: throw new osid_NotFoundException('No resource found with category '.$type); @@ -245,8 +245,8 @@ public function getResource(osid_id_Id $resourceId) */ public function getResourceType(osid_id_Id $resourceId) { - $string = $this->getDatabaseIdString($resourceId, 'resource/'); - if (!preg_match('#(person|place/room|place/building|place/campus)/(.+)#', $string, $matches)) { + $string = $this->getDatabaseIdString($resourceId, 'resource.'); + if (!preg_match('#(person|place\.room|place\.building|place\.campus)\.(.+)#', $string, $matches)) { throw new osid_NotFoundException('Could not turn "'.$string.'" into a resource type.'); } @@ -262,8 +262,8 @@ public function getResourceType(osid_id_Id $resourceId) */ public function getResourceValue(osid_id_Id $resourceId) { - $string = $this->getDatabaseIdString($resourceId, 'resource/'); - if (!preg_match('#(person|place/room|place/building|place/campus)/(.+)#', $string, $matches)) { + $string = $this->getDatabaseIdString($resourceId, 'resource.'); + if (!preg_match('#(person|place\.room|place\.building|place\.campus)\.(.+)#', $string, $matches)) { throw new osid_NotFoundException('Could not turn "'.$string.'" into a resource type.'); } @@ -311,7 +311,7 @@ private function getPersonResource(osid_id_Id $resourceId) $parameters = array_merge( [ - ':webid' => $this->getDatabaseIdString($resourceId, 'resource/person/'), + ':webid' => $this->getDatabaseIdString($resourceId, 'resource.person.'), ], $this->getCatalogParameters()); self::$getPersonResource_stmt->execute($parameters); @@ -319,11 +319,11 @@ private function getPersonResource(osid_id_Id $resourceId) self::$getPersonResource_stmt->closeCursor(); if (!$row['WEB_ID']) { - throw new osid_NotFoundException('Could not find a resource matching the person code '.$this->getDatabaseIdString($resourceId, 'resource/person/').'.'); + throw new osid_NotFoundException('Could not find a resource matching the person code '.$this->getDatabaseIdString($resourceId, 'resource.person.').'.'); } return new banner_resource_Resource_Person( - $this->getOsidIdFromString($row['WEB_ID'], 'resource/person/'), + $this->getOsidIdFromString($row['WEB_ID'], 'resource.person.'), $row['SYVINST_LAST_NAME'], $row['SYVINST_FIRST_NAME'] ); @@ -373,7 +373,7 @@ private function getPersonResources() $resources = []; while ($row = self::$getPersonResources_stmt->fetch(PDO::FETCH_ASSOC)) { $resources[] = new banner_resource_Resource_Person( - $this->getOsidIdFromString($row['WEB_ID'], 'resource/person/'), + $this->getOsidIdFromString($row['WEB_ID'], 'resource.person.'), $row['SYVINST_LAST_NAME'], $row['SYVINST_FIRST_NAME'] ); @@ -425,7 +425,7 @@ private function getBuildingResource(osid_id_Id $resourceId) $parameters = array_merge( [ - ':code' => $this->getDatabaseIdString($resourceId, 'resource/place/building/'), + ':code' => $this->getDatabaseIdString($resourceId, 'resource.place.building.'), ], $this->getCatalogParameters()); self::$getBuildingResource_stmt->execute($parameters); @@ -433,11 +433,11 @@ private function getBuildingResource(osid_id_Id $resourceId) self::$getBuildingResource_stmt->closeCursor(); if (!$row['STVBLDG_CODE']) { - throw new osid_NotFoundException('Could not find a resource matching the building code '.$this->getDatabaseIdString($resourceId, 'resource/place/building/').'.'); + throw new osid_NotFoundException('Could not find a resource matching the building code '.$this->getDatabaseIdString($resourceId, 'resource.place.building.').'.'); } return new banner_resource_Resource_Building( - $this->getOsidIdFromString($row['STVBLDG_CODE'], 'resource/place/building/'), + $this->getOsidIdFromString($row['STVBLDG_CODE'], 'resource.place.building.'), $row['STVBLDG_DESC'], $row['STVBLDG_CODE'] ); @@ -486,7 +486,7 @@ private function getBuildingResources() $resources = []; while ($row = self::$getBuildingResources_stmt->fetch(PDO::FETCH_ASSOC)) { $resources[] = new banner_resource_Resource_Building( - $this->getOsidIdFromString($row['STVBLDG_CODE'], 'resource/place/building/'), + $this->getOsidIdFromString($row['STVBLDG_CODE'], 'resource.place.building.'), $row['STVBLDG_DESC'], $row['STVBLDG_CODE'] ); @@ -537,8 +537,8 @@ private function getRoomResource(osid_id_Id $resourceId) self::$getRoomResource_stmt = $this->manager->getDB()->prepare($query); } - $roomString = $this->getDatabaseIdString($resourceId, 'resource/place/room/'); - if (!preg_match('#^([a-z0-9_-]+)/(.+)$#i', $roomString, $matches)) { + $roomString = $this->getDatabaseIdString($resourceId, 'resource.place.room.'); + if (!preg_match('#^([a-z0-9_-]+)\.(.+)$#i', $roomString, $matches)) { throw new osid_NotFoundException("Room string '$roomString' doesn't match."); } @@ -553,11 +553,11 @@ private function getRoomResource(osid_id_Id $resourceId) self::$getRoomResource_stmt->closeCursor(); if (!$row['STVBLDG_CODE']) { - throw new osid_NotFoundException('Could not find a resource matching the room code '.$this->getDatabaseIdString($resourceId, 'resource/place/room/').'.'); + throw new osid_NotFoundException('Could not find a resource matching the room code '.$this->getDatabaseIdString($resourceId, 'resource.place.room.').'.'); } return new banner_resource_Resource_Room( - $this->getOsidIdFromString($row['STVBLDG_CODE'].'/'.$row['SSRMEET_ROOM_CODE'], 'resource/place/room/'), + $this->getOsidIdFromString($row['STVBLDG_CODE'].'.'.$row['SSRMEET_ROOM_CODE'], 'resource.place.room.'), $row['STVBLDG_DESC'], $row['STVBLDG_CODE'], $row['SSRMEET_ROOM_CODE'] @@ -610,7 +610,7 @@ private function getRoomResources() $resources = []; while ($row = self::$getRoomResources_stmt->fetch(PDO::FETCH_ASSOC)) { $resources[] = new banner_resource_Resource_Room( - $this->getOsidIdFromString($row['STVBLDG_CODE'].'/'.$row['SSRMEET_ROOM_CODE'], 'resource/place/room/'), + $this->getOsidIdFromString($row['STVBLDG_CODE'].'.'.$row['SSRMEET_ROOM_CODE'], 'resource.place.room.'), $row['STVBLDG_DESC'], $row['STVBLDG_CODE'], $row['SSRMEET_ROOM_CODE'] @@ -649,7 +649,7 @@ private function getCampusResource(osid_id_Id $resourceId) $parameters = array_merge( [ - ':code' => $this->getDatabaseIdString($resourceId, 'resource/place/campus/'), + ':code' => $this->getDatabaseIdString($resourceId, 'resource.place.campus.'), ], $this->getCatalogParameters()); self::$getCampusResource_stmt->execute($parameters); @@ -657,14 +657,14 @@ private function getCampusResource(osid_id_Id $resourceId) self::$getCampusResource_stmt->closeCursor(); if (!$row['STVCAMP_CODE']) { - throw new osid_NotFoundException('Could not find a resource matching the campus code '.$this->getDatabaseIdString($resourceId, 'resource/place/campus/').'.'); + throw new osid_NotFoundException('Could not find a resource matching the campus code '.$this->getDatabaseIdString($resourceId, 'resource.place.campus.').'.'); } return new banner_resource_Resource_Place( - $this->getOsidIdFromString($row['STVCAMP_CODE'], 'resource/place/campus/'), + $this->getOsidIdFromString($row['STVCAMP_CODE'], 'resource.place.campus.'), $row['STVCAMP_DESC'], '', - new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:resource/place/campus') + new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:resource.place.campus') ); } @@ -697,10 +697,10 @@ private function getCampusResources() $resources = []; while ($row = self::$getCampusResources_stmt->fetch(PDO::FETCH_ASSOC)) { $resources[] = new banner_resource_Resource_Place( - $this->getOsidIdFromString($row['STVCAMP_CODE'], 'resource/place/campus/'), + $this->getOsidIdFromString($row['STVCAMP_CODE'], 'resource.place.campus.'), $row['STVCAMP_DESC'], '', - new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:resource/place/campus') + new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:resource.place.campus') ); } self::$getCampusResources_stmt->closeCursor(); @@ -783,15 +783,15 @@ public function getResourcesByGenusType(osid_type_Type $resourceGenusType) return new phpkit_EmptyList('osid_resource_ResourceList'); } switch ($resourceGenusType->getIdentifier()) { - case 'genera:resource/person': + case 'genera:resource.person': return $this->getPersonResources(); - case 'genera:resource/place/campus': + case 'genera:resource.place.campus': return $this->getCampusResources(); - case 'genera:resource/place/building': + case 'genera:resource.place.building': return $this->getBuildingResources(); - case 'genera:resource/place/room': + case 'genera:resource.place.room': return $this->getRoomResources(); - // case 'genera:resource/place': + // case 'genera:resource.place': // return $this->getPlaceResources(); default: return new phpkit_EmptyList('osid_resource_ResourceList'); @@ -827,7 +827,7 @@ public function getResourcesByParentGenusType(osid_type_Type $resourceGenusType) return new phpkit_EmptyList('osid_resource_ResourceList'); } - if ('genera:resource/place' == $resourceGenusType->getIdentifier()) { + if ('genera:resource.place' == $resourceGenusType->getIdentifier()) { $resourceList = new phpkit_CombinedList('osid_resource_ResourceList'); $resourceList->addList($this->getCampusResources()); $resourceList->addList($this->getBuildingResources()); diff --git a/application/library/banner/resource/Resource/Person.php b/application/library/banner/resource/Resource/Person.php index 017b5615..25770527 100755 --- a/application/library/banner/resource/Resource/Person.php +++ b/application/library/banner/resource/Resource/Person.php @@ -77,7 +77,7 @@ public function __construct(osid_id_Id $id, $surname, $givenName, $middleNames = $this->addRecordType($this->namesType); - $this->setGenusType(new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:resource/person')); + $this->setGenusType(new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:resource.person')); } /** diff --git a/application/library/banner/resource/Resource/Room.php b/application/library/banner/resource/Resource/Room.php index cd372449..0f7c259c 100644 --- a/application/library/banner/resource/Resource/Room.php +++ b/application/library/banner/resource/Resource/Room.php @@ -32,7 +32,7 @@ class banner_resource_Resource_Room extends banner_resource_Resource_Building public function __construct(osid_id_Id $id, $buildingDisplayName, $buildingCode, $room) { parent::__construct($id, $buildingDisplayName, $buildingCode); - $this->setGenusType(new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:resource/place/room')); + $this->setGenusType(new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:resource.place.room')); $this->setDisplayName($buildingDisplayName.' '.$room); $this->setDescription($buildingCode.' '.$room); $this->room = $room; diff --git a/application/library/banner/resource/ResourceManager.php b/application/library/banner/resource/ResourceManager.php index 9ea7fa4e..3baf4f53 100755 --- a/application/library/banner/resource/ResourceManager.php +++ b/application/library/banner/resource/ResourceManager.php @@ -78,7 +78,7 @@ public function getIdAuthority() */ public function getCombinedBinId() { - return new phpkit_id_Id($this->getIdAuthority(), 'urn', 'resource/all'); + return new phpkit_id_Id($this->getIdAuthority(), 'urn', 'resource.all'); } /********************************************************* @@ -120,17 +120,17 @@ public function initialize(osid_OsidRuntimeManager $runtime) try { $dsn = phpkit_configuration_ConfigUtil::getSingleValuedValue( $runtime->getConfiguration(), - new phpkit_id_URNInetId('urn:inet:middlebury.edu:config:banner_course/pdo_dsn'), + new phpkit_id_URNInetId('urn:inet:middlebury.edu:config:banner_course.pdo_dsn'), new phpkit_type_Type('urn', 'middlebury.edu', 'Primitives/String')); $username = phpkit_configuration_ConfigUtil::getSingleValuedValue( $runtime->getConfiguration(), - new phpkit_id_URNInetId('urn:inet:middlebury.edu:config:banner_course/pdo_username'), + new phpkit_id_URNInetId('urn:inet:middlebury.edu:config:banner_course.pdo_username'), new phpkit_type_Type('urn', 'middlebury.edu', 'Primitives/String')); $password = phpkit_configuration_ConfigUtil::getSingleValuedValue( $runtime->getConfiguration(), - new phpkit_id_URNInetId('urn:inet:middlebury.edu:config:banner_course/pdo_password'), + new phpkit_id_URNInetId('urn:inet:middlebury.edu:config:banner_course.pdo_password'), new phpkit_type_Type('urn', 'middlebury.edu', 'Primitives/String')); } catch (osid_NotFoundException $e) { throw new osid_ConfigurationErrorException($e->getMessage(), $e->getCode()); @@ -139,7 +139,7 @@ public function initialize(osid_OsidRuntimeManager $runtime) try { $debug = phpkit_configuration_ConfigUtil::getSingleValuedValue( $runtime->getConfiguration(), - new phpkit_id_URNInetId('urn:inet:middlebury.edu:config:banner_course/pdo_count_queries'), + new phpkit_id_URNInetId('urn:inet:middlebury.edu:config:banner_course.pdo_count_queries'), new phpkit_type_Type('urn', 'middlebury.edu', 'Primitives/Boolean')); } catch (osid_ConfigurationErrorException $e) { $debug = false; @@ -158,10 +158,10 @@ public function initialize(osid_OsidRuntimeManager $runtime) try { $this->idAuthority = phpkit_configuration_ConfigUtil::getSingleValuedValue( $runtime->getConfiguration(), - new phpkit_id_URNInetId('urn:inet:middlebury.edu:config:banner_course/id_authority'), + new phpkit_id_URNInetId('urn:inet:middlebury.edu:config:banner_course.id_authority'), new phpkit_type_Type('urn', 'middlebury.edu', 'Primitives/String')); if (!strlen($this->idAuthority)) { - throw new osid_ConfigurationErrorException('urn:inet:middlebury.edu:config:banner_course/id_authority must be specified.'); + throw new osid_ConfigurationErrorException('urn:inet:middlebury.edu:config:banner_course.id_authority must be specified.'); } } catch (osid_NotFoundException $e) { throw new osid_ConfigurationErrorException($e->getMessage(), $e->getCode()); diff --git a/application/sql/convert_id_separators_to_period.sql b/application/sql/convert_id_separators_to_period.sql new file mode 100644 index 00000000..e1a66e67 --- /dev/null +++ b/application/sql/convert_id_separators_to_period.sql @@ -0,0 +1,7 @@ +UPDATE user_catalog SET catalog_id_keyword = REPLACE(catalog_id_keyword, '/', '.'); +UPDATE user_savedcourses SET course_id_keyword = REPLACE(course_id_keyword, '/', '.'); +UPDATE user_schedules SET term_id_keyword = REPLACE(term_id_keyword, '/', '.'); +UPDATE user_schedule_offerings SET offering_id_keyword = REPLACE(offering_id_keyword, '/', '.'); +UPDATE archive_configurations SET catalog_id = REPLACE(catalog_id, '/', '.'); +UPDATE archive_configuration_revisions SET json_data=REPLACE(json_data, 'topic\\/subject\\/', 'topic.subject.'); +UPDATE archive_configuration_revisions SET json_data=REPLACE(json_data, 'topic\\/department\\/', 'topic.department.'); diff --git a/application/test/Catalog/Action/Helper/OsidIdTest.php b/application/test/Catalog/Action/Helper/OsidIdTest.php index 6bb7cff0..0a3240f9 100755 --- a/application/test/Catalog/Action/Helper/OsidIdTest.php +++ b/application/test/Catalog/Action/Helper/OsidIdTest.php @@ -32,7 +32,7 @@ protected function tearDown(): void public function testGetOsidIdFromString() { - $id = new phpkit_id_Id('example.edu', 'urn', '123456789/abcd'); + $id = new phpkit_id_Id('example.edu', 'urn', '123456789.abcd'); $idString = $this->osidIdHelper->toString($id); $newId = $this->osidIdHelper->fromString($idString); @@ -42,7 +42,7 @@ public function testGetOsidIdFromString() public function testGetStringFromOsidId() { - $id = new phpkit_id_Id('example.edu', 'urn', '123456789/abcd'); + $id = new phpkit_id_Id('example.edu', 'urn', '123456789.abcd'); $idString = $this->osidIdHelper->toString($id); $this->assertIsString($idString); diff --git a/application/test/Catalog/Action/Helper/OsidTermsTest.php b/application/test/Catalog/Action/Helper/OsidTermsTest.php index ed01aa98..0f6fafea 100755 --- a/application/test/Catalog/Action/Helper/OsidTermsTest.php +++ b/application/test/Catalog/Action/Helper/OsidTermsTest.php @@ -25,10 +25,10 @@ protected function setUp(): void $this->osidHelper->setConfigPath($this->getTestConfigPath()); Zend_Controller_Action_HelperBroker::addHelper($this->osidTermsHelper); - $this->mcugId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog/MCUG'); - $this->spring2009TermId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:term/200920'); - $this->fall2009TermId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:term/200990'); - $this->fall2008TermId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:term/200890'); + $this->mcugId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog.MCUG'); + $this->spring2009TermId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:term.200920'); + $this->fall2009TermId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:term.200990'); + $this->fall2008TermId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:term.200890'); $this->termLookup = $this->osidHelper->getCourseManager()->getTermLookupSessionForCatalog($this->mcugId); } diff --git a/application/test/Catalog/Action/Helper/OsidTopicTest.php b/application/test/Catalog/Action/Helper/OsidTopicTest.php index 8b13a9ed..961783c8 100755 --- a/application/test/Catalog/Action/Helper/OsidTopicTest.php +++ b/application/test/Catalog/Action/Helper/OsidTopicTest.php @@ -24,7 +24,7 @@ protected function setUp(): void $this->osidTopicHelper = new Catalog_Action_Helper_Topics(); Zend_Controller_Action_HelperBroker::addHelper($this->osidTopicHelper); - $this->mcugId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog/MCUG'); + $this->mcugId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog.MCUG'); $this->topicLookup = $this->osidHelper->getCourseManager()->getTopicLookupSessionForCatalog($this->mcugId); } @@ -53,7 +53,7 @@ public function testFilterTopicsByType() $numTopics = $topics->available(); $topicArray = $this->osidTopicHelper->topicListAsArray($topics); - $subjectType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic/subject'); + $subjectType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.subject'); $filteredTopics = $this->osidTopicHelper->filterTopicsByType($topicArray, $subjectType); $this->assertIsArray($filteredTopics); diff --git a/application/test/Catalog/Action/Helper/OsidTypeTest.php b/application/test/Catalog/Action/Helper/OsidTypeTest.php index 5cf3bd0b..a47b7c59 100755 --- a/application/test/Catalog/Action/Helper/OsidTypeTest.php +++ b/application/test/Catalog/Action/Helper/OsidTypeTest.php @@ -34,7 +34,7 @@ protected function tearDown(): void public function testGetOsidTypeFromString() { - $type = new phpkit_type_Type('urn', 'example.edu', '123456789/abcd'); + $type = new phpkit_type_Type('urn', 'example.edu', '123456789.abcd'); $typeString = $this->osidTypeHelper->toString($type); $newType = $this->osidTypeHelper->fromString($typeString); @@ -44,7 +44,7 @@ public function testGetOsidTypeFromString() public function testGetStringFromOsidType() { - $type = new phpkit_type_Type('urn', 'example.edu', '123456789/abcd'); + $type = new phpkit_type_Type('urn', 'example.edu', '123456789.abcd'); $typeString = $this->osidTypeHelper->toString($type); $this->assertIsString($typeString); diff --git a/application/test/Catalog/frontend_config.ini b/application/test/Catalog/frontend_config.ini index 53aff9ab..d2a4456e 100755 --- a/application/test/Catalog/frontend_config.ini +++ b/application/test/Catalog/frontend_config.ini @@ -17,128 +17,128 @@ cache_control.expiration_offset = 3600 # Default course offering types to select in the search UI. -catalog.default_offering_genus_types_to_search[] = "urn:inet:middlebury.edu:genera:offering/LCT" -catalog.default_offering_genus_types_to_search[] = "urn:inet:middlebury.edu:genera:offering/SEM" +catalog.default_offering_genus_types_to_search[] = "urn:inet:middlebury.edu:genera:offering.LCT" +catalog.default_offering_genus_types_to_search[] = "urn:inet:middlebury.edu:genera:offering.SEM" # The Id authority to shorten for prettier URLs. catalog.shorten_ids_for_authority = "middlebury.edu" # A map of topics to external URLs. This allows linking out to external sites for # departments or programs. -catalog.topic_map.ALAC.id = "topic/department/ALAC" +catalog.topic_map.ALAC.id = "topic.department.ALAC" catalog.topic_map.ALAC.url = "http://go.middlebury.edu/ALAC" -catalog.topic_map.AMCV.id = "topic/department/AMCV" +catalog.topic_map.AMCV.id = "topic.department.AMCV" catalog.topic_map.AMCV.url = "http://go.middlebury.edu/AMCV" -catalog.topic_map.AMLT.id = "topic/department/AMLT" +catalog.topic_map.AMLT.id = "topic.department.AMLT" catalog.topic_map.AMLT.url = "http://go.middlebury.edu/AMLT" -catalog.topic_map.AMST.id = "topic/department/AMST" +catalog.topic_map.AMST.id = "topic.department.AMST" catalog.topic_map.AMST.url = "http://go.middlebury.edu/AMST" -catalog.topic_map.ARBC.id = "topic/department/ARBC" +catalog.topic_map.ARBC.id = "topic.department.ARBC" catalog.topic_map.ARBC.url = "http://go.middlebury.edu/ARBC" -catalog.topic_map.ARDV.id = "topic/department/ARDV" +catalog.topic_map.ARDV.id = "topic.department.ARDV" catalog.topic_map.ARDV.url = "http://go.middlebury.edu/ARDV" -catalog.topic_map.ART.id = "topic/department/ART" +catalog.topic_map.ART.id = "topic.department.ART" catalog.topic_map.ART.url = "http://go.middlebury.edu/ART" -catalog.topic_map.BIOL.id = "topic/department/BIOL" +catalog.topic_map.BIOL.id = "topic.department.BIOL" catalog.topic_map.BIOL.url = "http://go.middlebury.edu/BIOL" -catalog.topic_map.CHEM.id = "topic/department/CHEM" +catalog.topic_map.CHEM.id = "topic.department.CHEM" catalog.topic_map.CHEM.url = "http://go.middlebury.edu/CHEM" -catalog.topic_map.CHNS.id = "topic/department/CHNS" +catalog.topic_map.CHNS.id = "topic.department.CHNS" catalog.topic_map.CHNS.url = "http://go.middlebury.edu/CHNS" -catalog.topic_map.CLAS.id = "topic/department/CLAS" +catalog.topic_map.CLAS.id = "topic.department.CLAS" catalog.topic_map.CLAS.url = "http://go.middlebury.edu/CLAS" -catalog.topic_map.CSCI.id = "topic/department/CSCI" +catalog.topic_map.CSCI.id = "topic.department.CSCI" catalog.topic_map.CSCI.url = "http://go.middlebury.edu/CSCI" -catalog.topic_map.DANC.id = "topic/department/DANC" +catalog.topic_map.DANC.id = "topic.department.DANC" catalog.topic_map.DANC.url = "http://go.middlebury.edu/DANC" -catalog.topic_map.ECON.id = "topic/department/ECON" +catalog.topic_map.ECON.id = "topic.department.ECON" catalog.topic_map.ECON.url = "http://go.middlebury.edu/ECON" -catalog.topic_map.EDST.id = "topic/department/EDST" +catalog.topic_map.EDST.id = "topic.department.EDST" catalog.topic_map.EDST.url = "http://go.middlebury.edu/EDST" -catalog.topic_map.ENAM.id = "topic/department/ENAM" +catalog.topic_map.ENAM.id = "topic.department.ENAM" catalog.topic_map.ENAM.url = "http://go.middlebury.edu/ENAM" -catalog.topic_map.ENGL.id = "topic/department/ENGL" +catalog.topic_map.ENGL.id = "topic.department.ENGL" catalog.topic_map.ENGL.url = "http://go.middlebury.edu/ENGL" -catalog.topic_map.ENVS.id = "topic/department/ENVS" +catalog.topic_map.ENVS.id = "topic.department.ENVS" catalog.topic_map.ENVS.url = "http://go.middlebury.edu/ENVS" -catalog.topic_map.FMMC.id = "topic/department/FMMC" +catalog.topic_map.FMMC.id = "topic.department.FMMC" catalog.topic_map.FMMC.url = "http://go.middlebury.edu/FMMC" -catalog.topic_map.FREN.id = "topic/department/FREN" +catalog.topic_map.FREN.id = "topic.department.FREN" catalog.topic_map.FREN.url = "http://go.middlebury.edu/FREN" -catalog.topic_map.FYSE.id = "topic/department/FYSE" +catalog.topic_map.FYSE.id = "topic.department.FYSE" catalog.topic_map.FYSE.url = "http://go.middlebury.edu/FYSE" -catalog.topic_map.GEOG.id = "topic/department/GEOG" +catalog.topic_map.GEOG.id = "topic.department.GEOG" catalog.topic_map.GEOG.url = "http://go.middlebury.edu/GEOG" -catalog.topic_map.GEOL.id = "topic/department/GEOL" +catalog.topic_map.GEOL.id = "topic.department.GEOL" catalog.topic_map.GEOL.url = "http://go.middlebury.edu/GEOL" -catalog.topic_map.GRMN.id = "topic/department/GRMN" +catalog.topic_map.GRMN.id = "topic.department.GRMN" catalog.topic_map.GRMN.url = "http://go.middlebury.edu/GRMN" -catalog.topic_map.HARC.id = "topic/department/HARC" +catalog.topic_map.HARC.id = "topic.department.HARC" catalog.topic_map.HARC.url = "http://go.middlebury.edu/HARC" -catalog.topic_map.HIST.id = "topic/department/HIST" +catalog.topic_map.HIST.id = "topic.department.HIST" catalog.topic_map.HIST.url = "http://go.middlebury.edu/HIST" -catalog.topic_map.HUDV.id = "topic/department/HUDV" +catalog.topic_map.HUDV.id = "topic.department.HUDV" catalog.topic_map.HUDV.url = "http://go.middlebury.edu/HUDV" -catalog.topic_map.INDE.id = "topic/department/INDE" +catalog.topic_map.INDE.id = "topic.department.INDE" catalog.topic_map.INDE.url = "http://go.middlebury.edu/INDE" -catalog.topic_map.INTD.id = "topic/department/INTD" +catalog.topic_map.INTD.id = "topic.department.INTD" catalog.topic_map.INTD.url = "http://go.middlebury.edu/INTD" -catalog.topic_map.INTL.id = "topic/department/INTL" +catalog.topic_map.INTL.id = "topic.department.INTL" catalog.topic_map.INTL.url = "http://go.middlebury.edu/INTL" -catalog.topic_map.IPEC.id = "topic/department/IPEC" +catalog.topic_map.IPEC.id = "topic.department.IPEC" catalog.topic_map.IPEC.url = "http://go.middlebury.edu/IPEC" -catalog.topic_map.ISEA.id = "topic/department/ISEA" +catalog.topic_map.ISEA.id = "topic.department.ISEA" catalog.topic_map.ISEA.url = "http://go.middlebury.edu/ISEA" -catalog.topic_map.ISRU.id = "topic/department/ISRU" +catalog.topic_map.ISRU.id = "topic.department.ISRU" catalog.topic_map.ISRU.url = "http://go.middlebury.edu/ISRU" -catalog.topic_map.ITAL.id = "topic/department/ITAL" +catalog.topic_map.ITAL.id = "topic.department.ITAL" catalog.topic_map.ITAL.url = "http://go.middlebury.edu/ITAL" -catalog.topic_map.JAPN.id = "topic/department/JAPN" +catalog.topic_map.JAPN.id = "topic.department.JAPN" catalog.topic_map.JAPN.url = "http://go.middlebury.edu/JAPN" -catalog.topic_map.LITP.id = "topic/department/LITP" +catalog.topic_map.LITP.id = "topic.department.LITP" catalog.topic_map.LITP.url = "http://go.middlebury.edu/LITP" -catalog.topic_map.LITS.id = "topic/department/LITS" +catalog.topic_map.LITS.id = "topic.department.LITS" catalog.topic_map.LITS.url = "http://go.middlebury.edu/LITS" -catalog.topic_map.MATH.id = "topic/department/MATH" +catalog.topic_map.MATH.id = "topic.department.MATH" catalog.topic_map.MATH.url = "http://go.middlebury.edu/MATH" -catalog.topic_map.MBBC.id = "topic/department/MBBC" +catalog.topic_map.MBBC.id = "topic.department.MBBC" catalog.topic_map.MBBC.url = "http://go.middlebury.edu/MBBC" -catalog.topic_map.MUSC.id = "topic/department/MUSC" +catalog.topic_map.MUSC.id = "topic.department.MUSC" catalog.topic_map.MUSC.url = "http://go.middlebury.edu/MUSC" -catalog.topic_map.NSCI.id = "topic/department/NSCI" +catalog.topic_map.NSCI.id = "topic.department.NSCI" catalog.topic_map.NSCI.url = "http://go.middlebury.edu/NSCI" -catalog.topic_map.PGSE.id = "topic/department/PGSE" +catalog.topic_map.PGSE.id = "topic.department.PGSE" catalog.topic_map.PGSE.url = "http://go.middlebury.edu/PGSE" -catalog.topic_map.PHED.id = "topic/department/PHED" +catalog.topic_map.PHED.id = "topic.department.PHED" catalog.topic_map.PHED.url = "http://go.middlebury.edu/PHED" -catalog.topic_map.PHIL.id = "topic/department/PHIL" +catalog.topic_map.PHIL.id = "topic.department.PHIL" catalog.topic_map.PHIL.url = "http://go.middlebury.edu/PHIL" -catalog.topic_map.PHYS.id = "topic/department/PHYS" +catalog.topic_map.PHYS.id = "topic.department.PHYS" catalog.topic_map.PHYS.url = "http://go.middlebury.edu/PHYS" -catalog.topic_map.PSCI.id = "topic/department/PSCI" +catalog.topic_map.PSCI.id = "topic.department.PSCI" catalog.topic_map.PSCI.url = "http://go.middlebury.edu/PSCI" -catalog.topic_map.PSYC.id = "topic/department/PSYC" +catalog.topic_map.PSYC.id = "topic.department.PSYC" catalog.topic_map.PSYC.url = "http://go.middlebury.edu/PSYC" -catalog.topic_map.RELI.id = "topic/department/RELI" +catalog.topic_map.RELI.id = "topic.department.RELI" catalog.topic_map.RELI.url = "http://go.middlebury.edu/RELI" -catalog.topic_map.RUSS.id = "topic/department/RUSS" +catalog.topic_map.RUSS.id = "topic.department.RUSS" catalog.topic_map.RUSS.url = "http://go.middlebury.edu/RUSS" -catalog.topic_map.SISP.id = "topic/department/SISP" +catalog.topic_map.SISP.id = "topic.department.SISP" catalog.topic_map.SISP.url = "http://go.middlebury.edu/SISP" -catalog.topic_map.SOAN.id = "topic/department/SOAN" +catalog.topic_map.SOAN.id = "topic.department.SOAN" catalog.topic_map.SOAN.url = "http://go.middlebury.edu/SOAN" -catalog.topic_map.SPAN.id = "topic/department/SPAN" +catalog.topic_map.SPAN.id = "topic.department.SPAN" catalog.topic_map.SPAN.url = "http://go.middlebury.edu/SPAN" -catalog.topic_map.STLD.id = "topic/department/STLD" +catalog.topic_map.STLD.id = "topic.department.STLD" catalog.topic_map.STLD.url = "http://go.middlebury.edu/STLD" -catalog.topic_map.TEDU.id = "topic/department/TEDU" +catalog.topic_map.TEDU.id = "topic.department.TEDU" catalog.topic_map.TEDU.url = "http://go.middlebury.edu/TEDU" -catalog.topic_map.THEA.id = "topic/department/THEA" +catalog.topic_map.THEA.id = "topic.department.THEA" catalog.topic_map.THEA.url = "http://go.middlebury.edu/THEA" -catalog.topic_map.WAGS.id = "topic/department/WAGS" -catalog.topic_map.WAGS.url = "http://go.middlebury.edu/WAGS" -catalog.topic_map.WRPR.id = "topic/department/WRPR" -catalog.topic_map.WRPR.url = "http://go.middlebury.edu/WRPR" +catalog.topic_map.WAGS.id = "topic.department.WAGS" +catalog.topic_map.WAGS.url = "http://go.middlebury.edu.WAGS" +catalog.topic_map.WRPR.id = "topic.department.WRPR" +catalog.topic_map.WRPR.url = "http:..go.middlebury.edu.WRPR" [staging : production] diff --git a/application/test/apc/configuration.plist b/application/test/apc/configuration.plist index 81e4df0b..74d0dcf5 100755 --- a/application/test/apc/configuration.plist +++ b/application/test/apc/configuration.plist @@ -2,18 +2,18 @@ - urn:inet:middlebury.edu:config:banner_course/id_authority + urn:inet:middlebury.edu:config:banner_course.id_authority middlebury.edu - urn:inet:middlebury.edu:config:banner_course/pdo_count_queries + urn:inet:middlebury.edu:config:banner_course.pdo_count_queries - urn:inet:middlebury.edu:config:banner_course/pdo_dsn + urn:inet:middlebury.edu:config:banner_course.pdo_dsn mysql:dbname=afranco_catalog_test;host=localhost - urn:inet:middlebury.edu:config:banner_course/pdo_password + urn:inet:middlebury.edu:config:banner_course.pdo_password testpassword - urn:inet:middlebury.edu:config:banner_course/pdo_username + urn:inet:middlebury.edu:config:banner_course.pdo_username testuser - urn:inet:middlebury.edu:config:apc_course/impl_class_name + urn:inet:middlebury.edu:config:apc_course.impl_class_name banner_course_CourseManager diff --git a/application/test/apc/course/CourseManagerTest.php b/application/test/apc/course/CourseManagerTest.php index 737b2298..f46f0f7e 100755 --- a/application/test/apc/course/CourseManagerTest.php +++ b/application/test/apc/course/CourseManagerTest.php @@ -12,7 +12,7 @@ class apc_course_CourseManagerTest extends banner_course_CourseManagerTest */ protected function setUp(): void { - $this->mcugId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog/MCUG'); + $this->mcugId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog.MCUG'); $this->manager = self::$runtimeManager->getManager(osid_OSID::COURSE(), 'apc_course_CourseManager', '3.0.0'); } } diff --git a/application/test/banner/configuration.plist b/application/test/banner/configuration.plist index 1feea851..bc1fe3f1 100755 --- a/application/test/banner/configuration.plist +++ b/application/test/banner/configuration.plist @@ -2,18 +2,18 @@ - urn:inet:middlebury.edu:config:banner_course/id_authority + urn:inet:middlebury.edu:config:banner_course.id_authority middlebury.edu - urn:inet:middlebury.edu:config:banner_course/pdo_count_queries + urn:inet:middlebury.edu:config:banner_course.pdo_count_queries - urn:inet:middlebury.edu:config:banner_course/pdo_dsn + urn:inet:middlebury.edu:config:banner_course.pdo_dsn mysql:dbname=symfony_test;host=database - urn:inet:middlebury.edu:config:banner_course/pdo_password + urn:inet:middlebury.edu:config:banner_course.pdo_password symfony - urn:inet:middlebury.edu:config:banner_course/pdo_username + urn:inet:middlebury.edu:config:banner_course.pdo_username symfony - urn:inet:middlebury.edu:config:apc_course/impl_class_name + urn:inet:middlebury.edu:config:apc_course.impl_class_name banner_course_CourseManager diff --git a/application/test/banner/course/Course/Catalog/SessionTest.php b/application/test/banner/course/Course/Catalog/SessionTest.php index 1f515200..982ecd99 100755 --- a/application/test/banner/course/Course/Catalog/SessionTest.php +++ b/application/test/banner/course/Course/Catalog/SessionTest.php @@ -36,11 +36,11 @@ protected function setUp(): void { $this->session = self::$courseManager->getCourseCatalogSession(); - $this->mcugId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog/MCUG'); - $this->miisId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog/MIIS'); + $this->mcugId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog.MCUG'); + $this->miisId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog.MIIS'); $this->unknownId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:unknown_id'); - $this->chemId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course/CHEM0104'); + $this->chemId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course.CHEM0104'); } /** diff --git a/application/test/banner/course/Course/Lookup/CombinedSessionTest.php b/application/test/banner/course/Course/Lookup/CombinedSessionTest.php index 7c9df7e3..15ec2786 100755 --- a/application/test/banner/course/Course/Lookup/CombinedSessionTest.php +++ b/application/test/banner/course/Course/Lookup/CombinedSessionTest.php @@ -34,22 +34,22 @@ protected function getSession() */ protected function setUp(): void { - $this->allId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog/all'); + $this->allId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog.all'); - $this->mcugId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog/MCUG'); - $this->miisId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog/MIIS'); + $this->mcugId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog.MCUG'); + $this->miisId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog.MIIS'); $this->unknownId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:unknown_id'); $this->session = self::$courseManager->getCourseLookupSession(); $this->session->useFederatedCourseCatalogView(); - $this->physId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course/PHYS0201'); - $this->geolId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course/GEOL0250'); - $this->unknownId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course/XXXX0101'); + $this->physId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course.PHYS0201'); + $this->geolId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course.GEOL0250'); + $this->unknownId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course.XXXX0101'); - $this->deptTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic/department/PHYS'); - $this->subjTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic/subject/CHEM'); - $this->divTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic/division/NSCI'); + $this->deptTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic.department.PHYS'); + $this->subjTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic.subject.CHEM'); + $this->divTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic.division.NSCI'); $this->unknownType = new phpkit_type_URNInetType('urn:inet:osid.org:unknown_type'); diff --git a/application/test/banner/course/Course/Lookup/SessionTest.php b/application/test/banner/course/Course/Lookup/SessionTest.php index ed765c8d..e0e3f480 100755 --- a/application/test/banner/course/Course/Lookup/SessionTest.php +++ b/application/test/banner/course/Course/Lookup/SessionTest.php @@ -34,19 +34,19 @@ protected function getSession() */ protected function setUp(): void { - $this->mcugId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog/MCUG'); - $this->miisId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog/MIIS'); + $this->mcugId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog.MCUG'); + $this->miisId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog.MIIS'); $this->unknownId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:unknown_id'); $this->session = self::$courseManager->getCourseLookupSessionForCatalog($this->mcugId); - $this->physId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course/PHYS0201'); - $this->geolId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course/GEOL0250'); - $this->unknownId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course/XXXX0101'); + $this->physId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course.PHYS0201'); + $this->geolId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course.GEOL0250'); + $this->unknownId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course.XXXX0101'); - $this->deptTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic/department/PHYS'); - $this->subjTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic/subject/CHEM'); - $this->divTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic/division/NSCI'); + $this->deptTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic.department.PHYS'); + $this->subjTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic.subject.CHEM'); + $this->divTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic.division.NSCI'); $this->unknownType = new phpkit_type_URNInetType('urn:inet:osid.org:unknown_type'); diff --git a/application/test/banner/course/Course/Search/OrderTest.php b/application/test/banner/course/Course/Search/OrderTest.php index d2196884..9c6a15f5 100755 --- a/application/test/banner/course/Course/Search/OrderTest.php +++ b/application/test/banner/course/Course/Search/OrderTest.php @@ -21,8 +21,8 @@ class banner_course_Course_Search_OrderTest extends TestCase */ protected function setUp(): void { - $this->mcugId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog/MCUG'); - $this->miisId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog/MIIS'); + $this->mcugId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog.MCUG'); + $this->miisId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog.MIIS'); $this->unknownId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:unknown_id'); $this->session = self::$courseManager->getCourseSearchSessionForCatalog($this->mcugId); @@ -36,13 +36,13 @@ protected function setUp(): void $this->object = $this->session->getCourseSearchOrder(); - $this->physId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course/PHYS0201'); - $this->geolId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course/GEOL0250'); - $this->unknownId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course/XXXX0101'); + $this->physId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course.PHYS0201'); + $this->geolId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course.GEOL0250'); + $this->unknownId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course.XXXX0101'); - $this->deptTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic/department/PHYS'); - $this->subjTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic/subject/CHEM'); - $this->divTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic/division/NSCI'); + $this->deptTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic.department.PHYS'); + $this->subjTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic.subject.CHEM'); + $this->divTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic.division.NSCI'); $this->unknownType = new phpkit_type_URNInetType('urn:inet:osid.org:unknown_type'); diff --git a/application/test/banner/course/Course/Search/QueryTest.php b/application/test/banner/course/Course/Search/QueryTest.php index ba4519c0..a5b7a869 100755 --- a/application/test/banner/course/Course/Search/QueryTest.php +++ b/application/test/banner/course/Course/Search/QueryTest.php @@ -21,8 +21,8 @@ class banner_course_Course_Search_QueryTest extends TestCase */ protected function setUp(): void { - $this->mcugId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog/MCUG'); - $this->miisId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog/MIIS'); + $this->mcugId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog.MCUG'); + $this->miisId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog.MIIS'); $this->unknownId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:unknown_id'); $this->session = self::$courseManager->getCourseSearchSessionForCatalog($this->mcugId); @@ -33,19 +33,19 @@ protected function setUp(): void $this->search = $this->session->getCourseSearch(); - $this->physId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course/PHYS0201'); - $this->geolId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course/GEOL0250'); - $this->chemId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course/CHEM0104'); - $this->unknownId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course/XXXX0101'); + $this->physId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course.PHYS0201'); + $this->geolId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course.GEOL0250'); + $this->chemId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course.CHEM0104'); + $this->unknownId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course.XXXX0101'); - $this->physOfferingId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:section/200890/90143'); - $this->geolOfferingId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:section/200420/20663'); - $this->chemOfferingId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:section/200420/20073'); + $this->physOfferingId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:section.200890.90143'); + $this->geolOfferingId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:section.200420.20663'); + $this->chemOfferingId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:section.200420.20073'); - $this->deptTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic/department/PHYS'); - $this->subjTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic/subject/CHEM'); - $this->divTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic/division/NSCI'); - $this->levelTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic/level/UG'); + $this->deptTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic.department.PHYS'); + $this->subjTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic.subject.CHEM'); + $this->divTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic.division.NSCI'); + $this->levelTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic.level.UG'); $this->unknownType = new phpkit_type_URNInetType('urn:inet:osid.org:unknown_type'); @@ -58,12 +58,12 @@ protected function setUp(): void $this->topicQueryRecordType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:record:topic'); $this->otherType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:record:other'); - $this->barryId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:resource/person/WEBID1000002'); - $this->dudleyId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:resource/person/WEBID1000004'); - $this->calvinId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:resource/person/WEBID1000003'); + $this->barryId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:resource.person.WEBID1000002'); + $this->dudleyId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:resource.person.WEBID1000004'); + $this->calvinId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:resource.person.WEBID1000003'); - $this->mainCampusId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:resource/place/campus/M'); - $this->breadloafCampusId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:resource/place/campus/BL'); + $this->mainCampusId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:resource.place.campus.M'); + $this->breadloafCampusId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:resource.place.campus.BL'); } /** diff --git a/application/test/banner/course/Course/Search/SearchTest.php b/application/test/banner/course/Course/Search/SearchTest.php index be3999e4..e5d1fbf1 100755 --- a/application/test/banner/course/Course/Search/SearchTest.php +++ b/application/test/banner/course/Course/Search/SearchTest.php @@ -21,8 +21,8 @@ class banner_course_Course_Search_SearchTest extends TestCase */ protected function setUp(): void { - $this->mcugId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog/MCUG'); - $this->miisId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog/MIIS'); + $this->mcugId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog.MCUG'); + $this->miisId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog.MIIS'); $this->unknownId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:unknown_id'); $this->session = self::$courseManager->getCourseSearchSessionForCatalog($this->mcugId); @@ -34,14 +34,14 @@ protected function setUp(): void $this->object = $this->session->getCourseSearch(); - $this->physId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course/PHYS0201'); - $this->geolId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course/GEOL0250'); - $this->chemId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course/CHEM0104'); - $this->unknownId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course/XXXX0101'); + $this->physId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course.PHYS0201'); + $this->geolId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course.GEOL0250'); + $this->chemId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course.CHEM0104'); + $this->unknownId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course.XXXX0101'); - $this->deptTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic/department/PHYS'); - $this->subjTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic/subject/CHEM'); - $this->divTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic/division/NSCI'); + $this->deptTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic.department.PHYS'); + $this->subjTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic.subject.CHEM'); + $this->divTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic.division.NSCI'); $this->unknownType = new phpkit_type_URNInetType('urn:inet:osid.org:unknown_type'); diff --git a/application/test/banner/course/Course/Search/SessionTest.php b/application/test/banner/course/Course/Search/SessionTest.php index 3fba2251..3703dae2 100755 --- a/application/test/banner/course/Course/Search/SessionTest.php +++ b/application/test/banner/course/Course/Search/SessionTest.php @@ -34,19 +34,19 @@ protected function getSession() */ protected function setUp(): void { - $this->mcugId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog/MCUG'); - $this->miisId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog/MIIS'); + $this->mcugId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog.MCUG'); + $this->miisId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog.MIIS'); $this->unknownId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:unknown_id'); $this->session = self::$courseManager->getCourseSearchSessionForCatalog($this->mcugId); - $this->physId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course/PHYS0201'); - $this->geolId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course/GEOL0250'); - $this->unknownId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course/XXXX0101'); + $this->physId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course.PHYS0201'); + $this->geolId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course.GEOL0250'); + $this->unknownId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course.XXXX0101'); - $this->deptTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic/department/PHYS'); - $this->subjTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic/subject/CHEM'); - $this->divTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic/division/NSCI'); + $this->deptTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic.department.PHYS'); + $this->subjTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic.subject.CHEM'); + $this->divTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic.division.NSCI'); $this->unknownType = new phpkit_type_URNInetType('urn:inet:osid.org:unknown_type'); diff --git a/application/test/banner/course/CourseCatalog/Lookup/SessionTest.php b/application/test/banner/course/CourseCatalog/Lookup/SessionTest.php index f369a4db..94709803 100755 --- a/application/test/banner/course/CourseCatalog/Lookup/SessionTest.php +++ b/application/test/banner/course/CourseCatalog/Lookup/SessionTest.php @@ -36,8 +36,8 @@ protected function setUp(): void { $this->session = self::$courseManager->getCourseCatalogLookupSession(); - $this->mcugId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog/MCUG'); - $this->miisId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog/MIIS'); + $this->mcugId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog.MCUG'); + $this->miisId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog.MIIS'); $this->unknownId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:unknown_id'); $this->unknownType = new phpkit_type_URNInetType('urn:inet:osid.org:unknown_type'); diff --git a/application/test/banner/course/CourseCatalogTest.php b/application/test/banner/course/CourseCatalogTest.php index c141efbe..5f69a35c 100755 --- a/application/test/banner/course/CourseCatalogTest.php +++ b/application/test/banner/course/CourseCatalogTest.php @@ -39,17 +39,17 @@ protected function getObject() */ protected function setUp(): void { - $this->mcugId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog/MCUG'); - $this->miisId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog/MIIS'); + $this->mcugId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog.MCUG'); + $this->miisId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog.MIIS'); $this->unknownId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:unknown_id'); $this->session = self::$courseManager->getCourseLookupSessionForCatalog($this->mcugId); $this->object = $this->session->getCourseCatalog($this->mcugId); - $this->physId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course/PHYS0201'); - $this->mathId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course/MATH0300'); - $this->unknownId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course/XXXX0101'); + $this->physId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course.PHYS0201'); + $this->mathId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course.MATH0300'); + $this->unknownId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course.XXXX0101'); $this->unknownType = new phpkit_type_URNInetType('urn:inet:osid.org:unknown_type'); diff --git a/application/test/banner/course/CourseManagerTest.php b/application/test/banner/course/CourseManagerTest.php index 8b9af891..4e80b6ad 100755 --- a/application/test/banner/course/CourseManagerTest.php +++ b/application/test/banner/course/CourseManagerTest.php @@ -31,7 +31,7 @@ protected function getManager() */ protected function setUp(): void { - $this->mcugId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog/MCUG'); + $this->mcugId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog.MCUG'); $this->manager = self::$runtimeManager->getManager(osid_OSID::COURSE(), 'banner_course_CourseManager', '3.0.0'); } diff --git a/application/test/banner/course/CourseOffering/Catalog/SessionTest.php b/application/test/banner/course/CourseOffering/Catalog/SessionTest.php index 474e6509..c26fd4db 100755 --- a/application/test/banner/course/CourseOffering/Catalog/SessionTest.php +++ b/application/test/banner/course/CourseOffering/Catalog/SessionTest.php @@ -36,11 +36,11 @@ protected function setUp(): void { $this->session = self::$courseManager->getCourseOfferingCatalogSession(); - $this->mcugId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog/MCUG'); - $this->miisId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog/MIIS'); + $this->mcugId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog.MCUG'); + $this->miisId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog.MIIS'); $this->unknownId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:unknown_id'); - $this->sectionId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:section/200890/92418'); + $this->sectionId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:section.200890.92418'); } /** diff --git a/application/test/banner/course/CourseOffering/Lookup/CombinedSessionTest.php b/application/test/banner/course/CourseOffering/Lookup/CombinedSessionTest.php index 660b80a8..79c2746e 100755 --- a/application/test/banner/course/CourseOffering/Lookup/CombinedSessionTest.php +++ b/application/test/banner/course/CourseOffering/Lookup/CombinedSessionTest.php @@ -31,30 +31,30 @@ protected function getSession() */ protected function setUp(): void { - $this->allId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog/all'); - $this->mcugId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog/MCUG'); - $this->miisId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog/MIIS'); + $this->allId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog.all'); + $this->mcugId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog.MCUG'); + $this->miisId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog.MIIS'); $this->unknownId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:unknown_id'); $this->session = self::$courseManager->getCourseOfferingLookupSession(); $this->session->useFederatedCourseCatalogView(); - $this->physId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course/PHYS0201'); - $this->mathId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course/MATH0300'); - $this->chemId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course/CHEM0104'); + $this->physId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course.PHYS0201'); + $this->mathId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course.MATH0300'); + $this->chemId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course.CHEM0104'); - $this->physOfferingId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:section/200890/90143'); - $this->geolOfferingId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:section/200420/20663'); - $this->unknownOfferingId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:section/178293/2101'); + $this->physOfferingId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:section.200890.90143'); + $this->geolOfferingId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:section.200420.20663'); + $this->unknownOfferingId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:section.178293.2101'); - $this->termId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:term/200890'); + $this->termId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:term.200890'); - $this->physDeptTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic/department/PHYS'); - $this->chemDeptTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic/department/CHEM'); - $this->physSubjTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic/subject/PHYS'); - $this->chemSubjTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic/subject/CHEM'); - $this->dedReqTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic/requirement/DED'); - $this->sciReqTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic/requirement/SCI'); + $this->physDeptTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic.department.PHYS'); + $this->chemDeptTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic.department.CHEM'); + $this->physSubjTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic.subject.PHYS'); + $this->chemSubjTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic.subject.CHEM'); + $this->dedReqTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic.requirement.DED'); + $this->sciReqTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic.requirement.SCI'); $this->unknownType = new phpkit_type_URNInetType('urn:inet:osid.org:unknown_type'); @@ -62,9 +62,9 @@ protected function setUp(): void $this->secondaryType = new phpkit_type_URNInetType('urn:inet:osid.org:genera:secondary'); $this->undergraduateType = new phpkit_type_URNInetType('urn:inet:osid.org:genera:undergraduate'); - $this->lectureType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:offering/LCT'); - $this->labType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:offering/LAB'); - $this->discussionType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:offering/DSC'); + $this->lectureType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:offering.LCT'); + $this->labType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:offering.LAB'); + $this->discussionType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:offering.DSC'); } /** diff --git a/application/test/banner/course/CourseOffering/Lookup/SessionTest.php b/application/test/banner/course/CourseOffering/Lookup/SessionTest.php index 2fe8df09..d2b3d8e9 100755 --- a/application/test/banner/course/CourseOffering/Lookup/SessionTest.php +++ b/application/test/banner/course/CourseOffering/Lookup/SessionTest.php @@ -31,29 +31,29 @@ protected function getSession() */ protected function setUp(): void { - $this->mcugId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog/MCUG'); - $this->miisId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog/MIIS'); + $this->mcugId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog.MCUG'); + $this->miisId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog.MIIS'); $this->unknownId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:unknown_id'); $this->session = self::$courseManager->getCourseOfferingLookupSessionForCatalog($this->mcugId); - $this->physId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course/PHYS0201'); - $this->mathId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course/MATH0300'); - $this->chemId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course/CHEM0104'); + $this->physId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course.PHYS0201'); + $this->mathId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course.MATH0300'); + $this->chemId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course.CHEM0104'); - $this->physOfferingId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:section/200890/90143'); - $this->geolOfferingId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:section/200420/20663'); - $this->unknownOfferingId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:section/178293/2101'); + $this->physOfferingId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:section.200890.90143'); + $this->geolOfferingId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:section.200420.20663'); + $this->unknownOfferingId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:section.178293.2101'); - $this->termId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:term/200890'); + $this->termId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:term.200890'); - $this->physDeptTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic/department/PHYS'); - $this->chemDeptTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic/department/CHEM'); - $this->physSubjTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic/subject/PHYS'); - $this->chemSubjTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic/subject/CHEM'); - $this->dedReqTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic/requirement/DED'); - $this->sciReqTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic/requirement/SCI'); - $this->ugLevelTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic/level/UG'); + $this->physDeptTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic.department.PHYS'); + $this->chemDeptTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic.department.CHEM'); + $this->physSubjTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic.subject.PHYS'); + $this->chemSubjTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic.subject.CHEM'); + $this->dedReqTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic.requirement.DED'); + $this->sciReqTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic.requirement.SCI'); + $this->ugLevelTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic.level.UG'); $this->unknownType = new phpkit_type_URNInetType('urn:inet:osid.org:unknown_type'); @@ -61,9 +61,9 @@ protected function setUp(): void $this->secondaryType = new phpkit_type_URNInetType('urn:inet:osid.org:genera:secondary'); $this->undergraduateType = new phpkit_type_URNInetType('urn:inet:osid.org:genera:undergraduate'); - $this->lectureType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:offering/LCT'); - $this->labType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:offering/LAB'); - $this->discussionType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:offering/DSC'); + $this->lectureType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:offering.LCT'); + $this->labType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:offering.LAB'); + $this->discussionType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:offering.DSC'); } /** diff --git a/application/test/banner/course/CourseOffering/Search/OrderTest.php b/application/test/banner/course/CourseOffering/Search/OrderTest.php index 2eec3d7b..812afaec 100755 --- a/application/test/banner/course/CourseOffering/Search/OrderTest.php +++ b/application/test/banner/course/CourseOffering/Search/OrderTest.php @@ -23,21 +23,21 @@ protected function setUp(): void { $this->wildcardStringMatchType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:search:wildcard'); - $this->mcugId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog/MCUG'); + $this->mcugId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog.MCUG'); $this->session = self::$courseManager->getCourseOfferingSearchSessionForCatalog($this->mcugId); $this->object = $this->session->getCourseOfferingSearchOrder(); - $this->termId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:term/200420'); + $this->termId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:term.200420'); $this->query = $this->session->getCourseOfferingQuery(); $this->query->matchTermId($this->termId, true); $this->search = $this->session->getCourseOfferingSearch(); - $this->physOfferingId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:section/200890/90143'); - $this->geolOfferingId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:section/200420/20663'); - $this->chemOfferingId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:section/200420/20073'); + $this->physOfferingId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:section.200890.90143'); + $this->geolOfferingId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:section.200420.20663'); + $this->chemOfferingId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:section.200420.20073'); $this->instructorsType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:record:instructors'); $this->otherType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:record:other'); diff --git a/application/test/banner/course/CourseOffering/Search/QueryTest.php b/application/test/banner/course/CourseOffering/Search/QueryTest.php index 04aba49c..cf72c017 100755 --- a/application/test/banner/course/CourseOffering/Search/QueryTest.php +++ b/application/test/banner/course/CourseOffering/Search/QueryTest.php @@ -23,44 +23,44 @@ protected function setUp(): void { $this->wildcardStringMatchType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:search:wildcard'); - $this->mcugId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog/MCUG'); - $this->miisId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog/MIIS'); + $this->mcugId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog.MCUG'); + $this->miisId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog.MIIS'); $this->session = self::$courseManager->getCourseOfferingSearchSessionForCatalog($this->mcugId); $this->object = $this->session->getCourseOfferingQuery(); - $this->physId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course/PHYS0201'); - $this->chemId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course/CHEM0104'); - $this->termId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:term/200890'); - $this->termId2 = new phpkit_id_URNInetId('urn:inet:middlebury.edu:term/200790'); - - $this->physDeptTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic/department/PHYS'); - $this->chemDeptTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic/department/CHEM'); - $this->physSubjTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic/subject/PHYS'); - $this->geolSubjTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic/subject/GEOL'); - $this->chemSubjTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic/subject/CHEM'); - $this->dedReqTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic/requirement/DED'); - $this->sciReqTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic/requirement/SCI'); - $this->natsciDivTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic/division/NSCI'); - $this->ugLevelTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic/level/UG'); - $this->ccBlockTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic/block/CC'); + $this->physId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course.PHYS0201'); + $this->chemId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course.CHEM0104'); + $this->termId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:term.200890'); + $this->termId2 = new phpkit_id_URNInetId('urn:inet:middlebury.edu:term.200790'); + + $this->physDeptTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic.department.PHYS'); + $this->chemDeptTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic.department.CHEM'); + $this->physSubjTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic.subject.PHYS'); + $this->geolSubjTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic.subject.GEOL'); + $this->chemSubjTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic.subject.CHEM'); + $this->dedReqTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic.requirement.DED'); + $this->sciReqTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic.requirement.SCI'); + $this->natsciDivTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic.division.NSCI'); + $this->ugLevelTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic.level.UG'); + $this->ccBlockTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic.block.CC'); $this->instructorsType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:record:instructors'); $this->weeklyScheduleType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:record:weekly_schedule'); $this->enrollmentType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:record:enrollment'); $this->otherType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:record:other'); - $this->lectureType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:offering/LCT'); - $this->labType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:offering/LAB'); - $this->discussionType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:offering/DSC'); + $this->lectureType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:offering.LCT'); + $this->labType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:offering.LAB'); + $this->discussionType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:offering.DSC'); - $this->barryId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:resource/person/WEBID1000002'); - $this->calvinId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:resource/person/WEBID1000003'); + $this->barryId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:resource.person.WEBID1000002'); + $this->calvinId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:resource.person.WEBID1000003'); - $this->mbh216Id = new phpkit_id_URNInetId('urn:inet:middlebury.edu:resource/place/room/MBH/216'); - $this->mbh560Id = new phpkit_id_URNInetId('urn:inet:middlebury.edu:resource/place/room/MBH/560'); - $this->mainCampusId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:resource/place/campus/M'); - $this->breadloafCampusId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:resource/place/campus/BL'); + $this->mbh216Id = new phpkit_id_URNInetId('urn:inet:middlebury.edu:resource.place.room.MBH.216'); + $this->mbh560Id = new phpkit_id_URNInetId('urn:inet:middlebury.edu:resource.place.room.MBH.560'); + $this->mainCampusId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:resource.place.campus.M'); + $this->breadloafCampusId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:resource.place.campus.BL'); } /** diff --git a/application/test/banner/course/CourseOffering/Search/SearchTest.php b/application/test/banner/course/CourseOffering/Search/SearchTest.php index 5f1db8f5..d51078a5 100755 --- a/application/test/banner/course/CourseOffering/Search/SearchTest.php +++ b/application/test/banner/course/CourseOffering/Search/SearchTest.php @@ -23,18 +23,18 @@ protected function setUp(): void { $this->wildcardStringMatchType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:search:wildcard'); - $this->mcugId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog/MCUG'); + $this->mcugId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog.MCUG'); $this->session = self::$courseManager->getCourseOfferingSearchSessionForCatalog($this->mcugId); $this->object = $this->session->getCourseOfferingSearch(); - $this->termId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:term/200420'); + $this->termId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:term.200420'); $this->query = $this->session->getCourseOfferingQuery(); $this->query->matchTermId($this->termId, true); - $this->physOfferingId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:section/200890/90143'); - $this->geolOfferingId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:section/200420/20663'); - $this->chemOfferingId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:section/200420/20073'); + $this->physOfferingId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:section.200890.90143'); + $this->geolOfferingId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:section.200420.20663'); + $this->chemOfferingId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:section.200420.20073'); $this->instructorsType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:record:instructors'); $this->otherType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:record:other'); diff --git a/application/test/banner/course/CourseOffering/Search/SessionTest.php b/application/test/banner/course/CourseOffering/Search/SessionTest.php index 9d8f54f3..5644da2c 100755 --- a/application/test/banner/course/CourseOffering/Search/SessionTest.php +++ b/application/test/banner/course/CourseOffering/Search/SessionTest.php @@ -31,28 +31,28 @@ protected function getSession() */ protected function setUp(): void { - $this->mcugId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog/MCUG'); - $this->miisId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog/MIIS'); + $this->mcugId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog.MCUG'); + $this->miisId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog.MIIS'); $this->unknownId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:unknown_id'); $this->session = self::$courseManager->getCourseOfferingSearchSessionForCatalog($this->mcugId); - $this->physId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course/PHYS0201'); - $this->mathId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course/MATH0300'); - $this->chemId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course/CHEM0104'); + $this->physId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course.PHYS0201'); + $this->mathId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course.MATH0300'); + $this->chemId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course.CHEM0104'); - $this->physOfferingId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:section/200890/90143'); - $this->geolOfferingId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:section/200420/20663'); - $this->unknownOfferingId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:section/178293/2101'); + $this->physOfferingId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:section.200890.90143'); + $this->geolOfferingId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:section.200420.20663'); + $this->unknownOfferingId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:section.178293.2101'); - $this->termId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:term/200890'); + $this->termId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:term.200890'); - $this->physDeptTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic/department/PHYS'); - $this->chemDeptTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic/department/CHEM'); - $this->physSubjTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic/subject/PHYS'); - $this->chemSubjTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic/subject/CHEM'); - $this->dedReqTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic/requirement/DED'); - $this->sciReqTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic/requirement/SCI'); + $this->physDeptTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic.department.PHYS'); + $this->chemDeptTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic.department.CHEM'); + $this->physSubjTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic.subject.PHYS'); + $this->chemSubjTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic.subject.CHEM'); + $this->dedReqTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic.requirement.DED'); + $this->sciReqTopicId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic.requirement.SCI'); $this->unknownType = new phpkit_type_URNInetType('urn:inet:osid.org:unknown_type'); diff --git a/application/test/banner/course/CourseOfferingTest.php b/application/test/banner/course/CourseOfferingTest.php index 066f1fb6..74b75d8b 100755 --- a/application/test/banner/course/CourseOfferingTest.php +++ b/application/test/banner/course/CourseOfferingTest.php @@ -31,12 +31,12 @@ protected function getObject() */ protected function setUp(): void { - $this->mcugCatalogId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog/MCUG'); - $this->physCourseId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course/PHYS0201'); - $this->physOfferingId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:section/200890/90143'); - $this->geolOfferingId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:section/200890/92418'); - $this->geogOfferingId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:section/200890/92443'); - $this->chemOfferingId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:section/200520/20022'); + $this->mcugCatalogId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog.MCUG'); + $this->physCourseId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course.PHYS0201'); + $this->physOfferingId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:section.200890.90143'); + $this->geolOfferingId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:section.200890.92418'); + $this->geogOfferingId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:section.200890.92443'); + $this->chemOfferingId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:section.200520.20022'); $this->session = self::$courseManager->getCourseOfferingLookupSessionForCatalog($this->mcugCatalogId); $this->object = $this->session->getCourseOffering($this->physOfferingId); @@ -64,7 +64,7 @@ public function testGenusType() { $type = $this->object->getGenusType(); $this->assertInstanceOf('osid_type_Type', $type); - $this->assertEquals('genera:offering/LCT', $type->getIdentifier()); + $this->assertEquals('genera:offering.LCT', $type->getIdentifier()); $this->assertEquals('Lecture', trim($type->getDisplayName())); } @@ -81,13 +81,13 @@ public function testGetTitle() */ public function testEffectiveDateTitle() { - $chem200390 = new phpkit_id_URNInetId('urn:inet:middlebury.edu:section/200390/90085'); - $chem200420 = new phpkit_id_URNInetId('urn:inet:middlebury.edu:section/200420/20073'); - $chem200490 = new phpkit_id_URNInetId('urn:inet:middlebury.edu:section/200490/90066'); - $chem200520 = new phpkit_id_URNInetId('urn:inet:middlebury.edu:section/200520/20019'); - $chem200590 = new phpkit_id_URNInetId('urn:inet:middlebury.edu:section/200590/90056'); - $chem200620 = new phpkit_id_URNInetId('urn:inet:middlebury.edu:section/200620/20017'); - $chem200890 = new phpkit_id_URNInetId('urn:inet:middlebury.edu:section/200890/90040'); + $chem200390 = new phpkit_id_URNInetId('urn:inet:middlebury.edu:section.200390.90085'); + $chem200420 = new phpkit_id_URNInetId('urn:inet:middlebury.edu:section.200420.20073'); + $chem200490 = new phpkit_id_URNInetId('urn:inet:middlebury.edu:section.200490.90066'); + $chem200520 = new phpkit_id_URNInetId('urn:inet:middlebury.edu:section.200520.20019'); + $chem200590 = new phpkit_id_URNInetId('urn:inet:middlebury.edu:section.200590.90056'); + $chem200620 = new phpkit_id_URNInetId('urn:inet:middlebury.edu:section.200620.20017'); + $chem200890 = new phpkit_id_URNInetId('urn:inet:middlebury.edu:section.200890.90040'); $this->assertEquals('Fundamentals of Chemistry II', $this->session->getCourseOffering($chem200390)->getTitle()); $this->assertEquals('Fundamentals of Chemistry II', $this->session->getCourseOffering($chem200420)->getTitle()); @@ -109,13 +109,13 @@ public function testGetPhysDescription() */ public function testEffectiveDateDescription() { - $chem200390 = new phpkit_id_URNInetId('urn:inet:middlebury.edu:section/200390/90085'); - $chem200420 = new phpkit_id_URNInetId('urn:inet:middlebury.edu:section/200420/20073'); - $chem200490 = new phpkit_id_URNInetId('urn:inet:middlebury.edu:section/200490/90066'); - $chem200520 = new phpkit_id_URNInetId('urn:inet:middlebury.edu:section/200520/20019'); - $chem200590 = new phpkit_id_URNInetId('urn:inet:middlebury.edu:section/200590/90056'); - $chem200620 = new phpkit_id_URNInetId('urn:inet:middlebury.edu:section/200620/20017'); - $chem200890 = new phpkit_id_URNInetId('urn:inet:middlebury.edu:section/200890/90040'); + $chem200390 = new phpkit_id_URNInetId('urn:inet:middlebury.edu:section.200390.90085'); + $chem200420 = new phpkit_id_URNInetId('urn:inet:middlebury.edu:section.200420.20073'); + $chem200490 = new phpkit_id_URNInetId('urn:inet:middlebury.edu:section.200490.90066'); + $chem200520 = new phpkit_id_URNInetId('urn:inet:middlebury.edu:section.200520.20019'); + $chem200590 = new phpkit_id_URNInetId('urn:inet:middlebury.edu:section.200590.90056'); + $chem200620 = new phpkit_id_URNInetId('urn:inet:middlebury.edu:section.200620.20017'); + $chem200890 = new phpkit_id_URNInetId('urn:inet:middlebury.edu:section.200890.90040'); $description = 'Major topics include chemical kinetics, chemical equilibrium, acid-base equilibria, chemical thermodynamics, electrochemistry, descriptive inorganic chemistry, and coordination chemistry. Lab work includes inorganic synthesis, qualitative analysis, and quantitative analysis in kinetics, acid-base and redox chemistry. (CHEM 0103 or by waiver) 3 hrs. lect., 3 hrs. lab, 1 hr. disc.'; @@ -192,12 +192,12 @@ public function testTopicIds() { $list = $this->object->getTopicIds(); $identifiers = [ - 'topic/subject/PHYS', - 'topic/department/PHYS', - 'topic/division/NSCI', - 'topic/requirement/DED', - 'topic/requirement/SCI', - 'topic/level/UG', + 'topic.subject.PHYS', + 'topic.department.PHYS', + 'topic.division.NSCI', + 'topic.requirement.DED', + 'topic.requirement.SCI', + 'topic.level.UG', ]; $found = []; $this->assertTrue($list->hasNext()); @@ -226,13 +226,13 @@ public function testGeolTopicIds() $list = $offering->getTopicIds(); $this->assertEquals(7, $list->available()); $identifiers = [ - 'topic/subject/GEOL', - 'topic/department/GEOL', - 'topic/division/NSCI', - 'topic/requirement/DED', - 'topic/requirement/SCI', - 'topic/level/UG', - 'topic/block/CC', + 'topic.subject.GEOL', + 'topic.department.GEOL', + 'topic.division.NSCI', + 'topic.requirement.DED', + 'topic.requirement.SCI', + 'topic.level.UG', + 'topic.block.CC', ]; $found = []; while ($list->hasNext()) { diff --git a/application/test/banner/course/CourseTest.php b/application/test/banner/course/CourseTest.php index 6d8851cb..a12a73bd 100755 --- a/application/test/banner/course/CourseTest.php +++ b/application/test/banner/course/CourseTest.php @@ -31,11 +31,11 @@ protected function getObject() */ protected function setUp(): void { - $this->mcugId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog/MCUG'); - $this->physId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course/PHYS0201'); - $this->geolId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course/GEOL0250'); - $this->geogId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course/GEOG0250'); - $this->chemId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course/CHEM0104'); + $this->mcugId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog.MCUG'); + $this->physId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course.PHYS0201'); + $this->geolId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course.GEOL0250'); + $this->geogId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course.GEOG0250'); + $this->chemId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course.CHEM0104'); $this->session = self::$courseManager->getCourseLookupSessionForCatalog($this->mcugId); $this->object = $this->session->getCourse($this->physId); @@ -120,10 +120,10 @@ public function testTopicIds() { $list = $this->object->getTopicIds(); $identifiers = [ - 'topic/subject/PHYS', - 'topic/department/PHYS', - 'topic/division/NSCI', - 'topic/level/UG', + 'topic.subject.PHYS', + 'topic.department.PHYS', + 'topic.division.NSCI', + 'topic.level.UG', ]; $found = []; $this->assertTrue($list->hasNext()); diff --git a/application/test/banner/course/PartOfTermCourseOfferingTest.php b/application/test/banner/course/PartOfTermCourseOfferingTest.php index 70328a61..19f284c2 100644 --- a/application/test/banner/course/PartOfTermCourseOfferingTest.php +++ b/application/test/banner/course/PartOfTermCourseOfferingTest.php @@ -31,13 +31,13 @@ protected function getObject() */ protected function setUp(): void { - $this->mclsCatalogId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog/MCLS'); - $this->hebmCourseId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course/HEBM5642'); - $this->hebmOfferingId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:section/201690/92587'); - $this->mcugCatalogId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog/MCUG'); - $this->physCourseId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course/PHYS0201'); - $this->physOfferingId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:section/200390/90260'); - $this->physId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course/PHYS0201'); + $this->mclsCatalogId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog.MCLS'); + $this->hebmCourseId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course.HEBM5642'); + $this->hebmOfferingId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:section.201690.92587'); + $this->mcugCatalogId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog.MCUG'); + $this->physCourseId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course.PHYS0201'); + $this->physOfferingId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:section.200390.90260'); + $this->physId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course.PHYS0201'); $this->session = self::$courseManager->getCourseOfferingLookupSessionForCatalog($this->mclsCatalogId); $this->searchSession = self::$courseManager->getCourseOfferingSearchSessionForCatalog($this->mclsCatalogId); @@ -61,14 +61,14 @@ protected function tearDown(): void public function testGetTermId() { $this->assertInstanceOf('osid_id_Id', $this->object->getTermId()); - $this->assertEquals('term/201690/HBM', $this->object->getTermId()->getIdentifier()); + $this->assertEquals('term.201690.HBM', $this->object->getTermId()->getIdentifier()); } public function testGetTerm() { $term = $this->object->getTerm(); $this->assertInstanceOf('osid_course_Term', $term); - $this->assertEquals('term/201690/HBM', $term->getId()->getIdentifier()); + $this->assertEquals('term.201690.HBM', $term->getId()->getIdentifier()); } public function testTermStartDate() @@ -88,7 +88,7 @@ public function testTermEndDate() */ public function testOfferingFoundInBaseTerm() { - $offerings = $this->session->getCourseOfferingsByTermForCourse(new phpkit_id_URNInetId('urn:inet:middlebury.edu:term/201690'), $this->hebmCourseId); + $offerings = $this->session->getCourseOfferingsByTermForCourse(new phpkit_id_URNInetId('urn:inet:middlebury.edu:term.201690'), $this->hebmCourseId); $this->assertTrue($offerings->hasNext()); $offering = $offerings->getNextCourseOffering(); $this->assertTrue($this->hebmOfferingId->isEqual($offering->getId())); @@ -99,7 +99,7 @@ public function testOfferingFoundInBaseTerm() */ public function testOfferingFoundInPartOfTerm() { - $offerings = $this->session->getCourseOfferingsByTermForCourse(new phpkit_id_URNInetId('urn:inet:middlebury.edu:term/201690/HBM'), $this->hebmCourseId); + $offerings = $this->session->getCourseOfferingsByTermForCourse(new phpkit_id_URNInetId('urn:inet:middlebury.edu:term.201690.HBM'), $this->hebmCourseId); $this->assertTrue($offerings->hasNext()); $offering = $offerings->getNextCourseOffering(); $this->assertTrue($this->hebmOfferingId->isEqual($offering->getId())); @@ -111,7 +111,7 @@ public function testOfferingFoundInPartOfTerm() public function testOfferingSearchBaseTerm() { $query = $this->searchSession->getCourseOfferingQuery(); - $query->matchTermId(new phpkit_id_URNInetId('urn:inet:middlebury.edu:term/201690'), true); + $query->matchTermId(new phpkit_id_URNInetId('urn:inet:middlebury.edu:term.201690'), true); $offerings = $this->searchSession->getCourseOfferingsByQuery($query); $this->assertTrue($offerings->hasNext()); $offering = $offerings->getNextCourseOffering(); @@ -124,7 +124,7 @@ public function testOfferingSearchBaseTerm() public function testOfferingSearchPartOfTerm() { $query = $this->searchSession->getCourseOfferingQuery(); - $query->matchTermId(new phpkit_id_URNInetId('urn:inet:middlebury.edu:term/201690/HBM'), true); + $query->matchTermId(new phpkit_id_URNInetId('urn:inet:middlebury.edu:term.201690.HBM'), true); $offerings = $this->searchSession->getCourseOfferingsByQuery($query); $this->assertTrue($offerings->hasNext()); $offering = $offerings->getNextCourseOffering(); @@ -139,7 +139,7 @@ public function testOfferingSearchBaseTermUg() $this->searchSession = self::$courseManager->getCourseOfferingSearchSessionForCatalog($this->mcugCatalogId); $query = $this->searchSession->getCourseOfferingQuery(); - $query->matchTermId(new phpkit_id_URNInetId('urn:inet:middlebury.edu:term/200390'), true); + $query->matchTermId(new phpkit_id_URNInetId('urn:inet:middlebury.edu:term.200390'), true); $query->matchCourseId($this->physId, true); $offerings = $this->searchSession->getCourseOfferingsByQuery($query); $this->assertTrue($offerings->hasNext()); @@ -154,7 +154,7 @@ public function testOfferingSearchPartOfTermUg1() { $this->searchSession = self::$courseManager->getCourseOfferingSearchSessionForCatalog($this->mcugCatalogId); $query = $this->searchSession->getCourseOfferingQuery(); - $query->matchTermId(new phpkit_id_URNInetId('urn:inet:middlebury.edu:term/200390/1'), true); + $query->matchTermId(new phpkit_id_URNInetId('urn:inet:middlebury.edu:term.200390.1'), true); $query->matchCourseId($this->physId, true); $offerings = $this->searchSession->getCourseOfferingsByQuery($query); $this->assertTrue($offerings->hasNext()); @@ -169,7 +169,7 @@ public function testOfferingSearchPartOfTermUgHbm() { $this->searchSession = self::$courseManager->getCourseOfferingSearchSessionForCatalog($this->mcugCatalogId); $query = $this->searchSession->getCourseOfferingQuery(); - $query->matchTermId(new phpkit_id_URNInetId('urn:inet:middlebury.edu:term/200390/HBM'), true); + $query->matchTermId(new phpkit_id_URNInetId('urn:inet:middlebury.edu:term.200390.HBM'), true); $query->matchCourseId($this->physId, true); $offerings = $this->searchSession->getCourseOfferingsByQuery($query); $this->assertFalse($offerings->hasNext()); diff --git a/application/test/banner/course/Term/Catalog/SessionTest.php b/application/test/banner/course/Term/Catalog/SessionTest.php index b168e9b6..de2143df 100755 --- a/application/test/banner/course/Term/Catalog/SessionTest.php +++ b/application/test/banner/course/Term/Catalog/SessionTest.php @@ -38,11 +38,11 @@ protected function setUp(): void { $this->session = self::$courseManager->getTermCatalogSession(); - $this->mcugId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog/MCUG'); - $this->miisId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog/MIIS'); + $this->mcugId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog.MCUG'); + $this->miisId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog.MIIS'); $this->unknownId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:unknown_id'); - $this->termId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:term/200890'); + $this->termId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:term.200890'); } /** diff --git a/application/test/banner/course/Term/Lookup/CombinedSessionTest.php b/application/test/banner/course/Term/Lookup/CombinedSessionTest.php index e4b01d44..670ec779 100755 --- a/application/test/banner/course/Term/Lookup/CombinedSessionTest.php +++ b/application/test/banner/course/Term/Lookup/CombinedSessionTest.php @@ -31,11 +31,11 @@ protected function getSession() */ protected function setUp(): void { - $this->mcugId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog/MCUG'); + $this->mcugId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog.MCUG'); $this->unknownId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:unknown_id'); - $this->termId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:term/200890'); - $this->springTermId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:term/200920'); - $this->badTermId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:term/200866'); + $this->termId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:term.200890'); + $this->springTermId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:term.200920'); + $this->badTermId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:term.200866'); $this->session = self::$courseManager->getTermLookupSession(); $this->session->useComparativeView(); diff --git a/application/test/banner/course/Term/Lookup/SessionTest.php b/application/test/banner/course/Term/Lookup/SessionTest.php index 18061b9b..29ea475f 100755 --- a/application/test/banner/course/Term/Lookup/SessionTest.php +++ b/application/test/banner/course/Term/Lookup/SessionTest.php @@ -31,11 +31,11 @@ protected function getSession() */ protected function setUp(): void { - $this->mcugId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog/MCUG'); + $this->mcugId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog.MCUG'); $this->unknownId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:unknown_id'); - $this->termId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:term/200890'); - $this->springTermId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:term/200920'); - $this->badTermId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:term/200866'); + $this->termId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:term.200890'); + $this->springTermId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:term.200920'); + $this->badTermId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:term.200866'); $this->session = self::$courseManager->getTermLookupSessionForCatalog($this->mcugId); diff --git a/application/test/banner/course/TermTest.php b/application/test/banner/course/TermTest.php index cf947632..9538fade 100755 --- a/application/test/banner/course/TermTest.php +++ b/application/test/banner/course/TermTest.php @@ -31,9 +31,9 @@ protected function getObject() */ protected function setUp(): void { - $this->mcugId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog/MCUG'); + $this->mcugId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog.MCUG'); $this->unknownId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:unknown_id'); - $this->termId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:term/200890'); + $this->termId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:term.200890'); $this->session = self::$courseManager->getTermLookupSessionForCatalog($this->mcugId); $this->object = $this->session->getTerm($this->termId); diff --git a/application/test/banner/course/Topic/Lookup/CombinedSessionTest.php b/application/test/banner/course/Topic/Lookup/CombinedSessionTest.php index 1ee6c798..fd1a7993 100755 --- a/application/test/banner/course/Topic/Lookup/CombinedSessionTest.php +++ b/application/test/banner/course/Topic/Lookup/CombinedSessionTest.php @@ -33,45 +33,45 @@ protected function getSession() */ protected function setUp(): void { - $this->mcugId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog/MCUG'); - $this->miisId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog/MIIS'); + $this->mcugId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog.MCUG'); + $this->miisId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog.MIIS'); $this->unknownId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:unknown_id'); $this->session = self::$courseManager->getTopicLookupSession(); $this->session->useComparativeView(); $this->session->useFederatedCourseCatalogView(); - $this->physId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course/PHYS0201'); - $this->geolId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course/GEOL0300'); - $this->chemId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course/CHEM0104'); + $this->physId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course.PHYS0201'); + $this->geolId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course.GEOL0300'); + $this->chemId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course.CHEM0104'); - $this->physSubjId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic/subject/PHYS'); - $this->geolSubjId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic/subject/GEOL'); - $this->chemSubjId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic/subject/CHEM'); + $this->physSubjId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic.subject.PHYS'); + $this->geolSubjId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic.subject.GEOL'); + $this->chemSubjId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic.subject.CHEM'); - $this->physDeptId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic/department/PHYS'); - $this->geolDeptId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic/department/GEOL'); - $this->chemDeptId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic/department/CHEM'); + $this->physDeptId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic.department.PHYS'); + $this->geolDeptId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic.department.GEOL'); + $this->chemDeptId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic.department.CHEM'); - $this->dedReqId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic/requirement/DED'); - $this->sciReqId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic/requirement/SCI'); + $this->dedReqId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic.requirement.DED'); + $this->sciReqId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic.requirement.SCI'); - $this->ccBlockId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic/block/CC'); + $this->ccBlockId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic.block.CC'); - $this->nsciDivId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic/division/NSCI'); - $this->artsDivId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic/division/ARTS'); + $this->nsciDivId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic.division.NSCI'); + $this->artsDivId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic.division.ARTS'); - $this->subjectType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic/subject'); - $this->departmentType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic/department'); - $this->divisionType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic/division'); - $this->requirementType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic/requirement'); - $this->blockType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic/block'); + $this->subjectType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.subject'); + $this->departmentType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.department'); + $this->divisionType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.division'); + $this->requirementType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.requirement'); + $this->blockType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.block'); - $this->physOfferingId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:section/200893/90143'); - $this->geolOfferingId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:section/200420/20663'); - $this->unknownOfferingId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:section/178293/2101'); + $this->physOfferingId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:section.200893.90143'); + $this->geolOfferingId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:section.200420.20663'); + $this->unknownOfferingId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:section.178293.2101'); - $this->termId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:term/200893'); + $this->termId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:term.200893'); $this->unknownType = new phpkit_type_URNInetType('urn:inet:osid.org:unknown_type'); diff --git a/application/test/banner/course/Topic/Lookup/SessionTest.php b/application/test/banner/course/Topic/Lookup/SessionTest.php index 922aefdf..f120d5b6 100755 --- a/application/test/banner/course/Topic/Lookup/SessionTest.php +++ b/application/test/banner/course/Topic/Lookup/SessionTest.php @@ -33,46 +33,46 @@ protected function getSession() */ protected function setUp(): void { - $this->mcugId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog/MCUG'); - $this->miisId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog/MIIS'); + $this->mcugId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog.MCUG'); + $this->miisId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog.MIIS'); $this->unknownId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:unknown_id'); $this->session = self::$courseManager->getTopicLookupSessionForCatalog($this->mcugId); - $this->physId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course/PHYS0201'); - $this->geolId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course/GEOL0300'); - $this->chemId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course/CHEM0104'); + $this->physId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course.PHYS0201'); + $this->geolId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course.GEOL0300'); + $this->chemId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:course.CHEM0104'); - $this->physSubjId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic/subject/PHYS'); - $this->geolSubjId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic/subject/GEOL'); - $this->chemSubjId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic/subject/CHEM'); + $this->physSubjId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic.subject.PHYS'); + $this->geolSubjId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic.subject.GEOL'); + $this->chemSubjId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic.subject.CHEM'); - $this->physDeptId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic/department/PHYS'); - $this->geolDeptId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic/department/GEOL'); - $this->chemDeptId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic/department/CHEM'); + $this->physDeptId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic.department.PHYS'); + $this->geolDeptId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic.department.GEOL'); + $this->chemDeptId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic.department.CHEM'); - $this->dedReqId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic/requirement/DED'); - $this->sciReqId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic/requirement/SCI'); + $this->dedReqId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic.requirement.DED'); + $this->sciReqId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic.requirement.SCI'); - $this->ugLevelId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic/level/UG'); + $this->ugLevelId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic.level.UG'); - $this->ccBlockId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic/block/CC'); + $this->ccBlockId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic.block.CC'); - $this->nsciDivId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic/division/NSCI'); - $this->artsDivId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic/division/ARTS'); + $this->nsciDivId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic.division.NSCI'); + $this->artsDivId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic.division.ARTS'); - $this->subjectType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic/subject'); - $this->departmentType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic/department'); - $this->divisionType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic/division'); - $this->requirementType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic/requirement'); - $this->levelType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic/level'); - $this->blockType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic/block'); + $this->subjectType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.subject'); + $this->departmentType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.department'); + $this->divisionType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.division'); + $this->requirementType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.requirement'); + $this->levelType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.level'); + $this->blockType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.block'); - $this->physOfferingId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:section/200893/90143'); - $this->geolOfferingId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:section/200420/20663'); - $this->unknownOfferingId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:section/178293/2101'); + $this->physOfferingId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:section.200893.90143'); + $this->geolOfferingId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:section.200420.20663'); + $this->unknownOfferingId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:section.178293.2101'); - $this->termId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:term/200893'); + $this->termId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:term.200893'); $this->unknownType = new phpkit_type_URNInetType('urn:inet:osid.org:unknown_type'); diff --git a/application/test/banner/course/Topic/Search/OrderTest.php b/application/test/banner/course/Topic/Search/OrderTest.php index 7492f920..c499a11e 100755 --- a/application/test/banner/course/Topic/Search/OrderTest.php +++ b/application/test/banner/course/Topic/Search/OrderTest.php @@ -23,20 +23,20 @@ protected function setUp(): void { $this->wildcardStringMatchType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:search:wildcard'); - $this->mcugId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog/MCUG'); - $this->miisId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog/MIIS'); + $this->mcugId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog.MCUG'); + $this->miisId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog.MIIS'); $this->session = self::$courseManager->getTopicSearchSessionForCatalog($this->mcugId); $this->object = $this->session->getTopicSearchOrder(); - $this->termId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:term/200820'); + $this->termId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:term.200820'); $this->termType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:record:terms'); - $this->subjectType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic/subject'); - $this->departmentType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic/department'); - $this->divisionType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic/division'); - $this->requirementType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic/requirement'); + $this->subjectType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.subject'); + $this->departmentType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.department'); + $this->divisionType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.division'); + $this->requirementType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.requirement'); } /** diff --git a/application/test/banner/course/Topic/Search/QueryTest.php b/application/test/banner/course/Topic/Search/QueryTest.php index 6203ce5e..4208a6c4 100755 --- a/application/test/banner/course/Topic/Search/QueryTest.php +++ b/application/test/banner/course/Topic/Search/QueryTest.php @@ -23,22 +23,22 @@ protected function setUp(): void { $this->wildcardStringMatchType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:search:wildcard'); - $this->mcugId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog/MCUG'); - $this->miisId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog/MIIS'); + $this->mcugId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog.MCUG'); + $this->miisId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog.MIIS'); $this->session = self::$courseManager->getTopicSearchSessionForCatalog($this->mcugId); $this->object = $this->session->getTopicQuery(); - $this->termId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:term/200820'); + $this->termId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:term.200820'); $this->termType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:record:terms'); - $this->subjectType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic/subject'); - $this->departmentType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic/department'); - $this->divisionType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic/division'); - $this->requirementType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic/requirement'); - $this->levelType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic/level'); - $this->blockType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic/block'); + $this->subjectType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.subject'); + $this->departmentType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.department'); + $this->divisionType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.division'); + $this->requirementType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.requirement'); + $this->levelType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.level'); + $this->blockType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.block'); } /** diff --git a/application/test/banner/course/Topic/Search/SearchTest.php b/application/test/banner/course/Topic/Search/SearchTest.php index 7428639f..5bbffdcf 100755 --- a/application/test/banner/course/Topic/Search/SearchTest.php +++ b/application/test/banner/course/Topic/Search/SearchTest.php @@ -23,20 +23,20 @@ protected function setUp(): void { $this->wildcardStringMatchType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:search:wildcard'); - $this->mcugId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog/MCUG'); - $this->miisId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog/MIIS'); + $this->mcugId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog.MCUG'); + $this->miisId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog.MIIS'); $this->session = self::$courseManager->getTopicSearchSessionForCatalog($this->mcugId); $this->object = $this->session->getTopicSearch(); - $this->termId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:term/200820'); + $this->termId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:term.200820'); $this->termType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:record:terms'); - $this->subjectType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic/subject'); - $this->departmentType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic/department'); - $this->divisionType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic/division'); - $this->requirementType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic/requirement'); + $this->subjectType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.subject'); + $this->departmentType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.department'); + $this->divisionType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.division'); + $this->requirementType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.requirement'); } /** @@ -68,8 +68,8 @@ public function testSearchWithinTopicResults() public function testSearchAmongTopics() { $topicList = new phpkit_id_ArrayIdList([ - new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic/requirement/DED'), - new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic/requirement/SCI'), + new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic.requirement.DED'), + new phpkit_id_URNInetId('urn:inet:middlebury.edu:topic.requirement.SCI'), ]); $this->object->searchAmongTopics($topicList); diff --git a/application/test/banner/course/Topic/Search/SessionTest.php b/application/test/banner/course/Topic/Search/SessionTest.php index 1cfe2518..4a17f2fe 100755 --- a/application/test/banner/course/Topic/Search/SessionTest.php +++ b/application/test/banner/course/Topic/Search/SessionTest.php @@ -23,19 +23,19 @@ protected function setUp(): void { $this->wildcardStringMatchType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:search:wildcard'); - $this->mcugId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog/MCUG'); - $this->miisId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog/MIIS'); + $this->mcugId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog.MCUG'); + $this->miisId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog.MIIS'); $this->session = self::$courseManager->getTopicSearchSessionForCatalog($this->mcugId); - $this->termId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:term/200820'); + $this->termId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:term.200820'); $this->termType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:record:terms'); - $this->subjectType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic/subject'); - $this->departmentType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic/department'); - $this->divisionType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic/division'); - $this->requirementType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic/requirement'); + $this->subjectType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.subject'); + $this->departmentType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.department'); + $this->divisionType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.division'); + $this->requirementType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.requirement'); } /** diff --git a/application/test/banner/resource/Bin/Lookup/SessionTest.php b/application/test/banner/resource/Bin/Lookup/SessionTest.php index c548617b..97e3e4ad 100755 --- a/application/test/banner/resource/Bin/Lookup/SessionTest.php +++ b/application/test/banner/resource/Bin/Lookup/SessionTest.php @@ -37,8 +37,8 @@ protected function setUp(): void $this->manager = self::$courseManager->getResourceManager(); $this->session = $this->manager->getBinLookupSession(); - $this->mcugId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog/MCUG'); - $this->miisId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog/MIIS'); + $this->mcugId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog.MCUG'); + $this->miisId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog.MIIS'); $this->unknownId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:unknown_id'); $this->unknownType = new phpkit_type_URNInetType('urn:inet:osid.org:unknown_type'); diff --git a/application/test/banner/resource/Resource/Lookup/PerCatalogSessionTest.php b/application/test/banner/resource/Resource/Lookup/PerCatalogSessionTest.php index 5a8d3f25..8b51fb73 100755 --- a/application/test/banner/resource/Resource/Lookup/PerCatalogSessionTest.php +++ b/application/test/banner/resource/Resource/Lookup/PerCatalogSessionTest.php @@ -31,24 +31,24 @@ protected function getSession() */ protected function setUp(): void { - $this->mcugId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog/MCUG'); - $this->miisId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog/MIIS'); + $this->mcugId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog.MCUG'); + $this->miisId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog.MIIS'); - $this->allBinId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:resource/all'); + $this->allBinId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:resource.all'); $this->manager = self::$courseManager->getResourceManager(); $this->session = $this->manager->getResourceLookupSessionForBin($this->mcugId); - $this->personType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:resource/person'); - $this->roomType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:resource/place/room'); - $this->buildingType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:resource/place/building'); - $this->campusType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:resource/place/campus'); - $this->placeType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:resource/place'); + $this->personType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:resource.person'); + $this->roomType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:resource.place.room'); + $this->buildingType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:resource.place.building'); + $this->campusType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:resource.place.campus'); + $this->placeType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:resource.place'); - $this->person1Id = new phpkit_id_URNInetId('urn:inet:middlebury.edu:resource/person/WEBID1000002'); - $this->person2Id = new phpkit_id_URNInetId('urn:inet:middlebury.edu:resource/person/WEBID1000007'); - $this->campusId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:resource/place/campus/M'); - $this->buildingId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:resource/place/building/MBH'); - $this->roomId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:resource/place/room/MBH/538'); + $this->person1Id = new phpkit_id_URNInetId('urn:inet:middlebury.edu:resource.person.WEBID1000002'); + $this->person2Id = new phpkit_id_URNInetId('urn:inet:middlebury.edu:resource.person.WEBID1000007'); + $this->campusId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:resource.place.campus.M'); + $this->buildingId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:resource.place.building.MBH'); + $this->roomId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:resource.place.room.MBH.538'); $this->unknownType = new phpkit_type_URNInetType('urn:inet:osid.org:unknown_type'); $this->unknownId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:unknown_id'); @@ -146,7 +146,7 @@ public function testGetResourcesByPersonGenusType() $this->assertEquals(14, $resources->available()); $this->assertInstanceOf('osid_resource_Resource', $resources->getNextResource()); $resourceGenusType = $resources->getNextResource()->getGenusType(); - $this->assertEquals('genera:resource/person', $resourceGenusType->getIdentifier()); + $this->assertEquals('genera:resource.person', $resourceGenusType->getIdentifier()); $this->assertTrue($resourceGenusType->isEqual($this->personType)); } @@ -194,7 +194,7 @@ public function testGetResourcesByParentPersonGenusType() $this->assertEquals(14, $resources->available()); $this->assertInstanceOf('osid_resource_Resource', $resources->getNextResource()); $resourceGenusType = $resources->getNextResource()->getGenusType(); - $this->assertEquals('genera:resource/person', $resourceGenusType->getIdentifier()); + $this->assertEquals('genera:resource.person', $resourceGenusType->getIdentifier()); $this->assertTrue($resourceGenusType->isEqual($this->personType)); } diff --git a/application/test/banner/resource/Resource/Lookup/SessionTest.php b/application/test/banner/resource/Resource/Lookup/SessionTest.php index 8e28ae93..2c997561 100755 --- a/application/test/banner/resource/Resource/Lookup/SessionTest.php +++ b/application/test/banner/resource/Resource/Lookup/SessionTest.php @@ -31,21 +31,21 @@ protected function getSession() */ protected function setUp(): void { - $this->allBinId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:resource/all'); + $this->allBinId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:resource.all'); $this->manager = self::$courseManager->getResourceManager(); $this->session = $this->manager->getResourceLookupSession(); - $this->personType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:resource/person'); - $this->roomType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:resource/place/room'); - $this->buildingType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:resource/place/building'); - $this->campusType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:resource/place/campus'); - $this->placeType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:resource/place'); + $this->personType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:resource.person'); + $this->roomType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:resource.place.room'); + $this->buildingType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:resource.place.building'); + $this->campusType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:resource.place.campus'); + $this->placeType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:resource.place'); - $this->person1Id = new phpkit_id_URNInetId('urn:inet:middlebury.edu:resource/person/WEBID1000002'); - $this->person2Id = new phpkit_id_URNInetId('urn:inet:middlebury.edu:resource/person/WEBID1000007'); - $this->campusId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:resource/place/campus/M'); - $this->buildingId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:resource/place/building/MBH'); - $this->roomId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:resource/place/room/MBH/538'); + $this->person1Id = new phpkit_id_URNInetId('urn:inet:middlebury.edu:resource.person.WEBID1000002'); + $this->person2Id = new phpkit_id_URNInetId('urn:inet:middlebury.edu:resource.person.WEBID1000007'); + $this->campusId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:resource.place.campus.M'); + $this->buildingId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:resource.place.building.MBH'); + $this->roomId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:resource.place.room.MBH.538'); $this->unknownType = new phpkit_type_URNInetType('urn:inet:osid.org:unknown_type'); $this->unknownId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:unknown_id'); @@ -143,7 +143,7 @@ public function testGetResourcesByPersonGenusType() $this->assertEquals(14, $resources->available()); $this->assertInstanceOf('osid_resource_Resource', $resources->getNextResource()); $resourceGenusType = $resources->getNextResource()->getGenusType(); - $this->assertEquals('genera:resource/person', $resourceGenusType->getIdentifier()); + $this->assertEquals('genera:resource.person', $resourceGenusType->getIdentifier()); $this->assertTrue($resourceGenusType->isEqual($this->personType)); } @@ -191,7 +191,7 @@ public function testGetResourcesByParentPersonGenusType() $this->assertEquals(14, $resources->available()); $this->assertInstanceOf('osid_resource_Resource', $resources->getNextResource()); $resourceGenusType = $resources->getNextResource()->getGenusType(); - $this->assertEquals('genera:resource/person', $resourceGenusType->getIdentifier()); + $this->assertEquals('genera:resource.person', $resourceGenusType->getIdentifier()); $this->assertTrue($resourceGenusType->isEqual($this->personType)); } diff --git a/application/test/banner/resource/Resource/PersonTest.php b/application/test/banner/resource/Resource/PersonTest.php index 6de1b632..edd35b18 100755 --- a/application/test/banner/resource/Resource/PersonTest.php +++ b/application/test/banner/resource/Resource/PersonTest.php @@ -36,10 +36,10 @@ protected function setUp(): void { $this->namesType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:record:person_names'); $this->unknownType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:record:unknown'); - $this->personType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:resource/person'); + $this->personType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:resource.person'); $this->object = new banner_resource_Resource_Person( - new phpkit_id_Id('urn', 'middlebury.edu', 'person/12345'), + new phpkit_id_Id('urn', 'middlebury.edu', 'person.12345'), "O'Brien", 'Thaddeus', 'Peter Michael', @@ -50,7 +50,7 @@ protected function setUp(): void $this->names = $this->object->getResourceRecord($this->namesType); $this->object2 = new banner_resource_Resource_Person( - new phpkit_id_Id('urn', 'middlebury.edu', 'person/54321'), + new phpkit_id_Id('urn', 'middlebury.edu', 'person.54321'), 'Jones', 'Howard' ); @@ -147,7 +147,7 @@ public function testGetGenusType() $this->assertInstanceOf('osid_type_Type', $type); $this->assertEquals('urn', $type->getIdentifierNamespace()); $this->assertEquals('middlebury.edu', $type->getAuthority()); - $this->assertEquals('genera:resource/person', $type->getIdentifier()); + $this->assertEquals('genera:resource.person', $type->getIdentifier()); $this->assertTrue($type->isEqual($this->personType)); } } diff --git a/application/test/banner/resource/ResourceManagerTest.php b/application/test/banner/resource/ResourceManagerTest.php index cc255905..8e1ac4f4 100755 --- a/application/test/banner/resource/ResourceManagerTest.php +++ b/application/test/banner/resource/ResourceManagerTest.php @@ -31,7 +31,7 @@ protected function getManager() */ protected function setUp(): void { - $this->allBinId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:resource/all'); + $this->allBinId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:resource.all'); $this->manager = self::$courseManager->getResourceManager(); } diff --git a/application/views/scripts/offerings/search.phtml b/application/views/scripts/offerings/search.phtml index 97ab35f6..bb6153ff 100755 --- a/application/views/scripts/offerings/search.phtml +++ b/application/views/scripts/offerings/search.phtml @@ -443,7 +443,7 @@ print "\n\t
"; print "\n\t\t
Type:
"; print "\n\t\t
".$this->escape($section->getGenusType()->getDisplayName())."
"; -$topics = $this->filterTopicsByType($allTopics, new phpkit_type_URNInetType("urn:inet:middlebury.edu:genera:topic/instruction_method")); +$topics = $this->filterTopicsByType($allTopics, new phpkit_type_URNInetType("urn:inet:middlebury.edu:genera:topic.instruction_method")); if (!empty($topics)) { print "\n\t\t
Course Modality:
"; print "\n\t\t
"; @@ -464,7 +464,7 @@ print "\n\t\t
Term:
"; +print "\n\t\t"; print "\n\t\t
Department:
"; print "\n\t\t
"; -$topics = $this->filterTopicsByType($allTopics, new phpkit_type_URNInetType("urn:inet:middlebury.edu:genera:topic/department")); +$topics = $this->filterTopicsByType($allTopics, new phpkit_type_URNInetType("urn:inet:middlebury.edu:genera:topic.department")); foreach ($topics as $topic) { $topicParams['topic'] = $this->getStringFromOsidId($topic->getId()); print "url($topicParams)."\">"; @@ -475,7 +475,7 @@ print "
"; print "\n\t\t
Requirements Fulfilled:
"; print "\n\t\t
"; -$topics = $this->filterTopicsByType($allTopics, new phpkit_type_URNInetType("urn:inet:middlebury.edu:genera:topic/requirement")); +$topics = $this->filterTopicsByType($allTopics, new phpkit_type_URNInetType("urn:inet:middlebury.edu:genera:topic.requirement")); foreach ($topics as $topic) { $topicParams['topic'] = $this->getStringFromOsidId($topic->getId()); print "url($topicParams)."\">"; @@ -486,7 +486,7 @@ print "
"; print "\n\t
"; -$topics = $this->filterTopicsByType($allTopics, new phpkit_type_URNInetType("urn:inet:middlebury.edu:genera:topic/block")); +$topics = $this->filterTopicsByType($allTopics, new phpkit_type_URNInetType("urn:inet:middlebury.edu:genera:topic.block")); if (!empty($topics)) { print "\n\t\t
Additional Details:
"; print "\n\t\t
"; @@ -566,7 +566,7 @@ if (!empty($availabilityLink)) { // print "\n\t
Subject:
"; // print "\n\t\t
"; -// $topics = $this->filterTopicsByType($allTopics, new phpkit_type_URNInetType("urn:inet:middlebury.edu:genera:topic/subject")); +// $topics = $this->filterTopicsByType($allTopics, new phpkit_type_URNInetType("urn:inet:middlebury.edu:genera:topic.subject")); // foreach ($topics as $topic) { // $topicParams['topic'] = $this->getStringFromOsidId($topic->getId()); // print "url($topicParams)."\">"; @@ -577,7 +577,7 @@ if (!empty($availabilityLink)) { // print "\n\t\t
Division:
"; // print "\n\t\t
"; -// $topics = $this->filterTopicsByType($allTopics, new phpkit_type_URNInetType("urn:inet:middlebury.edu:genera:topic/division")); +// $topics = $this->filterTopicsByType($allTopics, new phpkit_type_URNInetType("urn:inet:middlebury.edu:genera:topic.division")); // foreach ($topics as $topic) { // $topicParams['topic'] = $this->getStringFromOsidId($topic->getId()); // print "url($topicParams)."\">"; diff --git a/application/views/scripts/offerings/searchxml.phtml b/application/views/scripts/offerings/searchxml.phtml index 14792cce..498a77c2 100755 --- a/application/views/scripts/offerings/searchxml.phtml +++ b/application/views/scripts/offerings/searchxml.phtml @@ -109,7 +109,7 @@ print " "; printTerm($this, $term); -$topicType = new phpkit_type_URNInetType("urn:inet:middlebury.edu:genera:topic/subject"); +$topicType = new phpkit_type_URNInetType("urn:inet:middlebury.edu:genera:topic.subject"); $topicTypeString = $this->getStringFromOsidType($topicType); $topics = $this->filterTopicsByType($allTopics, $topicType); foreach ($topics as $topic) { @@ -119,7 +119,7 @@ foreach ($topics as $topic) { print " "; } -$topicType = new phpkit_type_URNInetType("urn:inet:middlebury.edu:genera:topic/department"); +$topicType = new phpkit_type_URNInetType("urn:inet:middlebury.edu:genera:topic.department"); $topicTypeString = $this->getStringFromOsidType($topicType); $topics = $this->filterTopicsByType($allTopics, $topicType); foreach ($topics as $topic) { @@ -129,7 +129,7 @@ foreach ($topics as $topic) { print " "; } -$topicType = new phpkit_type_URNInetType("urn:inet:middlebury.edu:genera:topic/requirement"); +$topicType = new phpkit_type_URNInetType("urn:inet:middlebury.edu:genera:topic.requirement"); $topicTypeString = $this->getStringFromOsidType($topicType); $topics = $this->filterTopicsByType($allTopics, $topicType); foreach ($topics as $topic) { @@ -139,7 +139,7 @@ foreach ($topics as $topic) { print " "; } -$topicType = new phpkit_type_URNInetType("urn:inet:middlebury.edu:genera:topic/level"); +$topicType = new phpkit_type_URNInetType("urn:inet:middlebury.edu:genera:topic.level"); $topicTypeString = $this->getStringFromOsidType($topicType); $topics = $this->filterTopicsByType($allTopics, $topicType); foreach ($topics as $topic) { @@ -149,7 +149,7 @@ foreach ($topics as $topic) { print " "; } -$topicType = new phpkit_type_URNInetType("urn:inet:middlebury.edu:genera:topic/block"); +$topicType = new phpkit_type_URNInetType("urn:inet:middlebury.edu:genera:topic.block"); $topicTypeString = $this->getStringFromOsidType($topicType); $topics = $this->filterTopicsByType($allTopics, $topicType); foreach ($topics as $topic) { From 4086f33a7477ccc3ec7f434cccf568ccb26bf48f Mon Sep 17 00:00:00 2001 From: Adam Franco Date: Fri, 27 Sep 2024 14:42:01 -0400 Subject: [PATCH 014/173] Add phpmyadmin to local development environment. --- .lando.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.lando.yml b/.lando.yml index e2a9f83b..260515dd 100644 --- a/.lando.yml +++ b/.lando.yml @@ -38,3 +38,7 @@ services: # Install and enable OCI8 - echo "instantclient,/opt/oracle/instantclient_19_10" | pecl install oci8-3.2.1 - docker-php-ext-enable oci8 + phpmyadmin: + type: phpmyadmin + hosts: + - database From 2fc1b2525ae9904527672c4ebf626ffc2e52f698 Mon Sep 17 00:00:00 2001 From: Adam Franco Date: Fri, 27 Sep 2024 14:42:50 -0400 Subject: [PATCH 015/173] #47: Use pre-existing 'test' database available in local dev environment. --- application/test/apc/configuration.plist | 6 +++--- application/test/banner/configuration.plist | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/application/test/apc/configuration.plist b/application/test/apc/configuration.plist index 74d0dcf5..550fe949 100755 --- a/application/test/apc/configuration.plist +++ b/application/test/apc/configuration.plist @@ -7,11 +7,11 @@ urn:inet:middlebury.edu:config:banner_course.pdo_count_queries urn:inet:middlebury.edu:config:banner_course.pdo_dsn - mysql:dbname=afranco_catalog_test;host=localhost + mysql:dbname=test;host=database urn:inet:middlebury.edu:config:banner_course.pdo_password - testpassword + symfony urn:inet:middlebury.edu:config:banner_course.pdo_username - testuser + symfony urn:inet:middlebury.edu:config:apc_course.impl_class_name banner_course_CourseManager diff --git a/application/test/banner/configuration.plist b/application/test/banner/configuration.plist index bc1fe3f1..550fe949 100755 --- a/application/test/banner/configuration.plist +++ b/application/test/banner/configuration.plist @@ -7,7 +7,7 @@ urn:inet:middlebury.edu:config:banner_course.pdo_count_queries urn:inet:middlebury.edu:config:banner_course.pdo_dsn - mysql:dbname=symfony_test;host=database + mysql:dbname=test;host=database urn:inet:middlebury.edu:config:banner_course.pdo_password symfony urn:inet:middlebury.edu:config:banner_course.pdo_username From ec5c0fa8f4e7d1e53477b93fa86405dd0519a15f Mon Sep 17 00:00:00 2001 From: Adam Franco Date: Fri, 27 Sep 2024 14:43:30 -0400 Subject: [PATCH 016/173] #47: Fix Deprecated array access of boolean value error. --- .../library/banner/course/CourseOffering/Lookup/Session.php | 2 +- application/library/banner/course/Term/Lookup/Session.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/application/library/banner/course/CourseOffering/Lookup/Session.php b/application/library/banner/course/CourseOffering/Lookup/Session.php index af38f847..89497c39 100755 --- a/application/library/banner/course/CourseOffering/Lookup/Session.php +++ b/application/library/banner/course/CourseOffering/Lookup/Session.php @@ -264,7 +264,7 @@ public function getCourseOffering(osid_id_Id $courseOfferingId) $row = self::$getOffering_stmts[$catalogWhere]->fetch(PDO::FETCH_ASSOC); self::$getOffering_stmts[$catalogWhere]->closeCursor(); - if (!$row['SSBSECT_CRN'] || !$row['SSBSECT_TERM_CODE']) { + if (!$row || !$row['SSBSECT_CRN'] || !$row['SSBSECT_TERM_CODE']) { throw new osid_NotFoundException('Could not find a course offering matching the term code '.$this->getTermCodeFromOfferingId($courseOfferingId).' and the crn '.$this->getCrnFromOfferingId($courseOfferingId).'.'); } diff --git a/application/library/banner/course/Term/Lookup/Session.php b/application/library/banner/course/Term/Lookup/Session.php index 116ac0b0..e43e9b5c 100755 --- a/application/library/banner/course/Term/Lookup/Session.php +++ b/application/library/banner/course/Term/Lookup/Session.php @@ -250,7 +250,7 @@ protected function getBaseTerm($idString) $row = self::$getTerm_stmts[$catalogWhere]->fetch(PDO::FETCH_ASSOC); self::$getTerm_stmts[$catalogWhere]->closeCursor(); - if (!$row['STVTERM_CODE']) { + if (!$row || !$row['STVTERM_CODE']) { throw new osid_NotFoundException("Could not find a term matching the term code $idString."); } From 93a1767bb48d56e403b52f40f461c672a03e647a Mon Sep 17 00:00:00 2001 From: Adam Franco Date: Fri, 27 Sep 2024 14:44:01 -0400 Subject: [PATCH 017/173] Provide access to the database for test fixture setup/cleanup. --- application/library/apc/course/CourseManager.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/application/library/apc/course/CourseManager.php b/application/library/apc/course/CourseManager.php index 109fc2f8..0189df78 100755 --- a/application/library/apc/course/CourseManager.php +++ b/application/library/apc/course/CourseManager.php @@ -35,6 +35,16 @@ public function __construct() // The underlying course manager. private $manager; + /** + * Allow access to the underlying database for test setup/tear down. + * + * @return PDO + * The backing database. + */ + public function getDB() { + return $this->manager->getDB(); + } + /********************************************************* * From OsidManager *********************************************************/ From ed320b895095bffa3279640904f0c1202a2f7502 Mon Sep 17 00:00:00 2001 From: Adam Franco Date: Fri, 27 Sep 2024 15:54:47 -0400 Subject: [PATCH 018/173] #47: Update id-subcomponent separators missed in 8336afc9 --- README.md | 8 +-- configuration.plist-example | 14 ++-- frontend_config.ini-example | 130 ++++++++++++++++++------------------ 3 files changed, 76 insertions(+), 76 deletions(-) diff --git a/README.md b/README.md index 1235ac72..12ae2a7c 100644 --- a/README.md +++ b/README.md @@ -15,10 +15,10 @@ Examples Examples of the the Course-Catalog in action at Middlebury College: -* [Main Search UI](https://catalog.middlebury.edu/catalogs/view/catalog/catalog%2FMCUG) (catalog app) -* [Section Details Page](https://catalog.middlebury.edu/offerings/view/catalog/catalog%2FMCUG/offering/section%2F201090%2F91241) (catalog app) -* [Department "courses" RSS feed](https://catalog.middlebury.edu/courses/topicxml/catalog/catalog%2FMCUG/topic/topic%2Fdepartment%2FBIOL) (catalog app) -* [Departments listing to feed to the Drupal content type form](https://catalog.middlebury.edu/topics/listdepartmentstxt/catalog/catalog%2FMCUG/) (catalog app) +* [Main Search UI](https://catalog.middlebury.edu/catalogs/view/catalog/catalog.MCUG) (catalog app) +* [Section Details Page](https://catalog.middlebury.edu/offerings/view/catalog/catalog.MCUG/offering/section.201090.91241) (catalog app) +* [Department "courses" RSS feed](https://catalog.middlebury.edu/courses/topicxml/catalog/catalog.MCUG/topic/topic.department.BIOL) (catalog app) +* [Departments listing to feed to the Drupal content type form](https://catalog.middlebury.edu/topics/listdepartmentstxt/catalog/catalog.MCUG/) (catalog app) * [Department Course Listing](http://www.middlebury.edu/academics/bio/courses) (Drupal "courses" content-type displaying a feed from the catalog app) * [Department Section Listing](http://www.middlebury.edu/academics/bio/courses/offerings) (Drupal "courses" content-type displaying a feed from the catalog app) * [Faculty Profile](http://www.middlebury.edu/academics/bio/faculty/node/48111) (Drupal "profile" content-type displaying a feed from the catalog app) diff --git a/configuration.plist-example b/configuration.plist-example index 9d4d7f8a..6108af4d 100755 --- a/configuration.plist-example +++ b/configuration.plist-example @@ -2,11 +2,11 @@ - urn:inet:middlebury.edu:config:banner_course/id_authority + urn:inet:middlebury.edu:config:banner_course.id_authority middlebury.edu - urn:inet:middlebury.edu:config:banner_course/pdo_count_queries + urn:inet:middlebury.edu:config:banner_course.pdo_count_queries - urn:inet:middlebury.edu:config:banner_course/pdo_driver_options + urn:inet:middlebury.edu:config:banner_course.pdo_driver_options - urn:inet:middlebury.edu:config:banner_course/pdo_dsn + urn:inet:middlebury.edu:config:banner_course.pdo_dsn mysql:dbname=afranco_catalog;host=localhost - urn:inet:middlebury.edu:config:banner_course/pdo_password + urn:inet:middlebury.edu:config:banner_course.pdo_password testpassword - urn:inet:middlebury.edu:config:banner_course/pdo_username + urn:inet:middlebury.edu:config:banner_course.pdo_username testuser - urn:inet:middlebury.edu:config:apc_course/impl_class_name + urn:inet:middlebury.edu:config:apc_course.impl_class_name banner_course_CourseManager diff --git a/frontend_config.ini-example b/frontend_config.ini-example index 6babecda..b4f4a627 100755 --- a/frontend_config.ini-example +++ b/frontend_config.ini-example @@ -90,14 +90,14 @@ resources.layout.layout = midd ; Custom layouts to use for some catalogs ; ; Each entry must have a catalog Id and a layout. -catalog.layouts.MIIS.catalog_id = "urn:inet:middlebury.edu:catalog/MIIS" +catalog.layouts.MIIS.catalog_id = "urn:inet:middlebury.edu:catalog.MIIS" catalog.layouts.MIIS.layout = "miis" ; Default course offering types to select in the search UI. -catalog.default_offering_genus_types_to_search[] = "urn:inet:middlebury.edu:genera:offering/LCT" -catalog.default_offering_genus_types_to_search[] = "urn:inet:middlebury.edu:genera:offering/SEM" -catalog.default_offering_genus_types_to_search[] = "urn:inet:middlebury.edu:genera:offering/PRC" -catalog.default_offering_genus_types_to_search[] = "urn:inet:middlebury.edu:genera:offering/WKS" +catalog.default_offering_genus_types_to_search[] = "urn:inet:middlebury.edu:genera:offering.LCT" +catalog.default_offering_genus_types_to_search[] = "urn:inet:middlebury.edu:genera:offering.SEM" +catalog.default_offering_genus_types_to_search[] = "urn:inet:middlebury.edu:genera:offering.PRC" +catalog.default_offering_genus_types_to_search[] = "urn:inet:middlebury.edu:genera:offering.WKS" ; The Id authority to shorten for prettier URLs. catalog.shorten_ids_for_authority = "middlebury.edu" @@ -106,7 +106,7 @@ catalog.shorten_ids_for_authority = "middlebury.edu" catalog.banner_web_url = "https://ssb-prod.ec.middlebury.edu/PNTR/bwckschd.p_disp_detail_sched" ; Extra URLs to print in the sidebar -catalog.menu_links.MCUG.catalog_id = "urn:inet:middlebury.edu:catalog/MCUG" +catalog.menu_links.MCUG.catalog_id = "urn:inet:middlebury.edu:catalog.MCUG" catalog.menu_links.MCUG.links[] = "Courses & Requirements" ; A map of topics to external URLs. This allows linking out to external sites for @@ -114,67 +114,67 @@ catalog.menu_links.MCUG.links[] = " Date: Fri, 27 Sep 2024 16:52:37 -0400 Subject: [PATCH 019/173] #47: Get the Catalog list working with a redirect to offering search. Other actions are still a work in progress. --- config/services.yaml | 2 + src/Controller/Catalogs.php | 51 ++--- .../Controller/Offerings.php | 181 +++++++++++------- .../Service/Osid/TermHelper.php | 58 ++++-- templates/catalogs.html.twig | 2 +- 5 files changed, 182 insertions(+), 112 deletions(-) rename application/controllers/OfferingsController.php => src/Controller/Offerings.php (77%) rename application/resources/Catalog/Action/Helper/OsidTerms.php => src/Service/Osid/TermHelper.php (74%) diff --git a/config/services.yaml b/config/services.yaml index 70e52634..94b3690f 100644 --- a/config/services.yaml +++ b/config/services.yaml @@ -45,3 +45,5 @@ services: class: App\Service\Osid\IdMap osid.type_map: class: App\Service\Osid\TypeMap + osid.term_helper: + class: App\Service\Osid\TermHelper diff --git a/src/Controller/Catalogs.php b/src/Controller/Catalogs.php index ebf61a5e..2d2771f7 100755 --- a/src/Controller/Catalogs.php +++ b/src/Controller/Catalogs.php @@ -8,8 +8,9 @@ namespace App\Controller; -use App\Service\Osid\Runtime; use App\Service\Osid\IdMap; +use App\Service\Osid\Runtime; +use App\Service\Osid\TermHelper; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\Routing\Annotation\Route; @@ -35,20 +36,28 @@ class Catalogs extends AbstractController */ private $osidIdMap; + /** + * @var \App\Service\Osid\TermHelper + */ + private $osidTermHelper; + /** * Construct a new Catalogs controller. * * @param \App\Service\Osid\Runtime $osidRuntime * The osid.runtime service. - * @param \App\Service\Osid\Identifier $osidIdentifier - * The osid.identifier service. + * @param \App\Service\Osid\IdMap $osidIdMap + * The osid.id_map service. + * @param \App\Service\Osid\TermHelper $osidTermHelper + * The osid.term_helper service. */ - public function __construct(Runtime $osidRuntime, IdMap $osidIdMap) { + public function __construct(Runtime $osidRuntime, IdMap $osidIdMap, TermHelper $osidTermHelper) { $this->osidRuntime = $osidRuntime; $this->osidIdMap = $osidIdMap; + $this->osidTermHelper = $osidTermHelper; } - #[Route('/catalogs/', name: 'List all catalogs')] + #[Route('/catalogs/', name: 'list_catalogs')] public function listAction() { $lookupSession = $this->osidRuntime->getCourseManager()->getCourseCatalogLookupSession(); @@ -82,32 +91,26 @@ public function listxmlAction() $this->listAction(); } - /** - * View a catalog details. - * - * @return void - * - * @since 4/21/09 - */ - public function viewAction() + #[Route('/catalogs/view/{catalog}/{term}', name: 'view_catalog')] + public function viewAction(string $catalog, $term = NULL) { - $catalogId = $this->_helper->osidId->fromString($this->_getParam('catalog')); - if ($this->_getParam('term')) { + $catalogId = $this->osidIdMap->fromString($catalog); + if ($term) { try { // Verify that the term is valid in this catalog - $termLookup = $this->_helper->osid->getCourseManager()->getTermLookupSession(); + $termLookup = $this->osidRuntime->getCourseManager()->getTermLookupSession(); $termLookup->useFederatedCourseCatalogView(); - $termId = $termLookup->getTerm($this->_helper->osidId->fromString($this->_getParam('term')))->getId(); - } catch (osid_NotFoundException $e) { + $termId = $termLookup->getTerm($this->osidIdMap->fromString($term))->getId(); + } catch (\osid_NotFoundException $e) { } } if (!isset($termId)) { - $termId = $this->_helper->osidTerms->getNextOrLatestTermId($catalogId); + $termId = $this->osidTermHelper->getNextOrLatestTermId($catalogId); } - $this->_forward('search', 'Offerings', null, [ - 'catalog' => $this->_helper->osidId->toString($catalogId), - 'term' => $this->_helper->osidId->toString($termId), + return $this->redirectToRoute('search_offerings', [ + 'catalog' => $this->osidIdMap->toString($catalogId), + 'term' => $this->osidIdMap->toString($termId), ]); } @@ -121,9 +124,9 @@ public function viewxmlAction() $this->_helper->layout->disableLayout(); $this->getResponse()->setHeader('Content-Type', 'text/xml'); - $catalogId = $this->_helper->osidId->fromString($this->_getParam('catalog')); + $catalogId = $this->osidIdMap->fromString($this->_getParam('catalog')); - $lookupSession = $this->_helper->osid->getCourseManager()->getCourseCatalogLookupSession(); + $lookupSession = $this->runtime->getCourseManager()->getCourseCatalogLookupSession(); $catalog = $lookupSession->getCourseCatalog($catalogId); $this->view->catalogs = new phpkit_course_ArrayCourseCatalogList([$catalog]); diff --git a/application/controllers/OfferingsController.php b/src/Controller/Offerings.php similarity index 77% rename from application/controllers/OfferingsController.php rename to src/Controller/Offerings.php index 16815c9e..3a5934be 100755 --- a/application/controllers/OfferingsController.php +++ b/src/Controller/Offerings.php @@ -6,6 +6,16 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License (GPL) */ +namespace App\Controller; + +use App\Service\Osid\IdMap; +use App\Service\Osid\Runtime; +use App\Service\Osid\TermHelper; +use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\Routing\Annotation\Route; + + /** * A controller for working with courses. * @@ -14,8 +24,40 @@ * @copyright Copyright © 2009, Middlebury College * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License (GPL) */ -class OfferingsController extends AbstractCatalogController +class Offerings extends AbstractController { + + /** + * @var \App\Service\Osid\Runtime + */ + private $osidRuntime; + + /** + * @var \App\Service\Osid\IdMap + */ + private $osidIdMap; + + /** + * @var \App\Service\Osid\TermHelper + */ + private $osidTermHelper; + + /** + * Construct a new Catalogs controller. + * + * @param \App\Service\Osid\Runtime $osidRuntime + * The osid.runtime service. + * @param \App\Service\Osid\IdMap $osidIdMap + * The osid.id_map service. + * @param \App\Service\Osid\TermHelper $osidTermHelper + * The osid.term_helper service. + */ + public function __construct(Runtime $osidRuntime, IdMap $osidIdMap, TermHelper $osidTermHelper) { + $this->osidRuntime = $osidRuntime; + $this->osidIdMap = $osidIdMap; + $this->osidTermHelper = $osidTermHelper; + } + /** * Initialize object. * @@ -25,27 +67,27 @@ class OfferingsController extends AbstractCatalogController */ public function init() { - $this->wildcardStringMatchType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:search:wildcard'); - $this->booleanStringMatchType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:search:boolean'); - $this->instructorType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:record:instructors'); - $this->enrollmentType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:record:enrollment'); - $this->locationType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:record:location'); - $this->alternateType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:record:alternates'); - $this->weeklyScheduleType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:record:weekly_schedule'); + $this->wildcardStringMatchType = new \phpkit_type_URNInetType('urn:inet:middlebury.edu:search:wildcard'); + $this->booleanStringMatchType = new \phpkit_type_URNInetType('urn:inet:middlebury.edu:search:boolean'); + $this->instructorType = new \phpkit_type_URNInetType('urn:inet:middlebury.edu:record:instructors'); + $this->enrollmentType = new \phpkit_type_URNInetType('urn:inet:middlebury.edu:record:enrollment'); + $this->locationType = new \phpkit_type_URNInetType('urn:inet:middlebury.edu:record:location'); + $this->alternateType = new \phpkit_type_URNInetType('urn:inet:middlebury.edu:record:alternates'); + $this->weeklyScheduleType = new \phpkit_type_URNInetType('urn:inet:middlebury.edu:record:weekly_schedule'); parent::init(); - $this->subjectType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.subject'); - $this->departmentType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.department'); - $this->divisionType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.division'); - $this->requirementType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.requirement'); - $this->levelType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.level'); - $this->blockType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.block'); - $this->instructionMethodType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.instruction_method'); + $this->subjectType = new \phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.subject'); + $this->departmentType = new \phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.department'); + $this->divisionType = new \phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.division'); + $this->requirementType = new \phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.requirement'); + $this->levelType = new \phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.level'); + $this->blockType = new \phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.block'); + $this->instructionMethodType = new \phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.instruction_method'); - $this->termType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:record:terms'); + $this->termType = new \phpkit_type_URNInetType('urn:inet:middlebury.edu:record:terms'); - $this->campusType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:resource.place.campus'); + $this->campusType = new \phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:resource.place.campus'); } /** @@ -57,25 +99,25 @@ public function init() */ public function listAction() { - if ($this->_getParam('catalog')) { - $catalogId = $this->_helper->osidId->fromString($this->_getParam('catalog')); - $lookupSession = $this->_helper->osid->getCourseManager()->getCourseOfferingLookupSessionForCatalog($catalogId); + if ($catalog) { + $catalogId = $this->osidRuntimeId->fromString($catalog); + $lookupSession = $this->osidRuntime->getCourseManager()->getCourseOfferingLookupSessionForCatalog($catalogId); $this->view->title = $lookupSession->getCourseCatalog()->getDisplayName(); } else { - $lookupSession = $this->_helper->osid->getCourseManager()->getCourseOfferingLookupSession(); + $lookupSession = $this->osidRuntime->getCourseManager()->getCourseOfferingLookupSession(); $this->view->title = 'All Catalogs'; } $lookupSession->useFederatedCourseCatalogView(); // Add our parameters to the search query - if ($this->_getParam('term')) { - if ('CURRENT' == $this->_getParam('term')) { - $termId = $this->_helper->osidTerms->getNextOrLatestTermId(); + if ($term) { + if ('CURRENT' == $term) { + $termId = $this->osidRuntimeTerms->getNextOrLatestTermId(); } else { - $termId = $this->_helper->osidId->fromString($this->_getParam('term')); + $termId = $this->osidRuntimeId->fromString($term); } - $termLookupSession = $this->_helper->osid->getCourseManager()->getTermLookupSession(); + $termLookupSession = $this->osidRuntime->getCourseManager()->getTermLookupSession(); $termLookupSession->useFederatedCourseCatalogView(); $this->view->term = $termLookupSession->getTerm($termId); @@ -108,12 +150,13 @@ public function listAction() * * @since 10/21/09 */ - public function searchxmlAction() + #[Route('/offerings/searchxml/{catalog}/{term}', name: 'search_offerings')] + public function searchxml(string $catalog = NULL, $term = NULL) { $this->_helper->layout->disableLayout(); $this->getResponse()->setHeader('Content-Type', 'text/xml'); - $this->searchAction(); + $this->search($catalog, $term); $this->view->sections = $this->searchSession->getCourseOfferingsByQuery($this->query); // Set the next and previous terms @@ -147,29 +190,23 @@ public function searchxmlAction() $this->postDispatch(); } - /** - * Display a search form and search results. - * - * @return void - * - * @since 6/1/09 - */ - public function searchAction() + #[Route('/offerings/search/{catalog}/{term}', name: 'search_offerings')] + public function search(string $catalog = NULL, $term = NULL) { - if ($this->_getParam('catalog')) { - $catalogId = $this->_helper->osidId->fromString($this->_getParam('catalog')); - $offeringSearchSession = $this->_helper->osid->getCourseManager()->getCourseOfferingSearchSessionForCatalog($catalogId); - $offeringLookupSession = $this->_helper->osid->getCourseManager()->getCourseOfferingLookupSessionForCatalog($catalogId); - $topicSearchSession = $this->_helper->osid->getCourseManager()->getTopicSearchSessionForCatalog($catalogId); - $termLookupSession = $this->_helper->osid->getCourseManager()->getTermLookupSessionForCatalog($catalogId); - $resourceLookupSession = $this->_helper->osid->getCourseManager()->getResourceManager()->getResourceLookupSessionForBin($catalogId); + if ($catalog) { + $catalogId = $catalogId = $this->osidIdMap->fromString($catalog); + $offeringSearchSession = $this->osidRuntime->getCourseManager()->getCourseOfferingSearchSessionForCatalog($catalogId); + $offeringLookupSession = $this->osidRuntime->getCourseManager()->getCourseOfferingLookupSessionForCatalog($catalogId); + $topicSearchSession = $this->osidRuntime->getCourseManager()->getTopicSearchSessionForCatalog($catalogId); + $termLookupSession = $this->osidRuntime->getCourseManager()->getTermLookupSessionForCatalog($catalogId); + $resourceLookupSession = $this->osidRuntime->getCourseManager()->getResourceManager()->getResourceLookupSessionForBin($catalogId); $this->view->title = 'Search in '.$offeringSearchSession->getCourseCatalog()->getDisplayName(); } else { - $offeringSearchSession = $this->_helper->osid->getCourseManager()->getCourseOfferingSearchSession(); - $offeringLookupSession = $this->_helper->osid->getCourseManager()->getCourseOfferingLookupSession(); - $topicSearchSession = $this->_helper->osid->getCourseManager()->getTopicSearchSession(); - $termLookupSession = $this->_helper->osid->getCourseManager()->getTermLookupSession(); - $resourceLookupSession = $this->_helper->osid->getCourseManager()->getResourceManager()->getResourceLookupSession(); + $offeringSearchSession = $this->osidRuntime->getCourseManager()->getCourseOfferingSearchSession(); + $offeringLookupSession = $this->osidRuntime->getCourseManager()->getCourseOfferingLookupSession(); + $topicSearchSession = $this->osidRuntime->getCourseManager()->getTopicSearchSession(); + $termLookupSession = $this->osidRuntime->getCourseManager()->getTermLookupSession(); + $resourceLookupSession = $this->osidRuntime->getCourseManager()->getResourceManager()->getResourceLookupSession(); $this->view->title = 'Search in All Catalogs'; } $termLookupSession->useFederatedCourseCatalogView(); @@ -180,18 +217,18 @@ public function searchAction() *********************************************************/ // Term - if ('ANY' == $this->_getParam('term')) { + if ('ANY' == $term) { // Don't set a term - } elseif (!$this->_getParam('term') || 'CURRENT' == $this->_getParam('term')) { + } elseif (!$term || 'CURRENT' == $term) { // When accessing the "current" term via xml, use the term we are in. // When displaying the search interface, use the next upcoming term. if ('searchxml' == $this->_getParam('action')) { - $termId = $this->_helper->osidTerms->getCurrentTermId($offeringSearchSession->getCourseCatalogId()); + $termId = $this->osidRuntimeTerms->getCurrentTermId($offeringSearchSession->getCourseCatalogId()); } else { - $termId = $this->_helper->osidTerms->getNextOrLatestTermId($offeringSearchSession->getCourseCatalogId()); + $termId = $this->osidRuntimeTerms->getNextOrLatestTermId($offeringSearchSession->getCourseCatalogId()); } } else { - $termId = $this->_helper->osidId->fromString($this->_getParam('term')); + $termId = $this->osidRuntimeId->fromString($term); } // Topics @@ -282,13 +319,13 @@ public function searchAction() $this->view->terms = $termLookupSession->getTerms(); // Add our parameters to the search query - if ($this->_getParam('term')) { - $this->view->searchParams['term'] = $this->_getParam('term'); + if ($term) { + $this->view->searchParams['term'] = $term; if (isset($termId)) { $query->matchTermId($termId, true); - $termLookupSession = $this->_helper->osid->getCourseManager()->getTermLookupSession(); + $termLookupSession = $this->osidRuntime->getCourseManager()->getTermLookupSession(); $termLookupSession->useFederatedCourseCatalogView(); $this->view->term = $termLookupSession->getTerm($termId); $this->view->selectedTermId = $termId; @@ -306,7 +343,7 @@ public function searchAction() if (count($departments)) { foreach ($departments as $idString) { - $id = $this->_helper->osidId->fromString($idString); + $id = $this->osidRuntimeId->fromString($idString); $query->matchTopicId($id, true); // set the first as the selected one if multiple. if (!isset($this->view->selectedDepartmentId)) { @@ -326,7 +363,7 @@ public function searchAction() if (count($subjects)) { foreach ($subjects as $idString) { - $id = $this->_helper->osidId->fromString($idString); + $id = $this->osidRuntimeId->fromString($idString); $query->matchTopicId($id, true); // set the first as the selected one if multiple. if (!isset($this->view->selectedSubjectId)) { @@ -346,7 +383,7 @@ public function searchAction() if (count($divisions)) { foreach ($divisions as $idString) { - $id = $this->_helper->osidId->fromString($idString); + $id = $this->osidRuntimeId->fromString($idString); $query->matchTopicId($id, true); // set the first as the selected one if multiple. if (!isset($this->view->selectedDivisionId)) { @@ -367,7 +404,7 @@ public function searchAction() if (count($requirements)) { foreach ($requirements as $idString) { - $id = $this->_helper->osidId->fromString($idString); + $id = $this->osidRuntimeId->fromString($idString); $query->matchTopicId($id, true); $this->view->selectedRequirementIds[] = $id; } @@ -385,7 +422,7 @@ public function searchAction() if (count($levels)) { foreach ($levels as $idString) { - $id = $this->_helper->osidId->fromString($idString); + $id = $this->osidRuntimeId->fromString($idString); $query->matchTopicId($id, true); $this->view->selectedLevelIds[] = $id; } @@ -403,7 +440,7 @@ public function searchAction() if (count($blocks)) { foreach ($blocks as $idString) { - $id = $this->_helper->osidId->fromString($idString); + $id = $this->osidRuntimeId->fromString($idString); $query->matchTopicId($id, true); $this->view->selectedBlockIds[] = $id; } @@ -421,7 +458,7 @@ public function searchAction() if (count($instructionMethods)) { foreach ($instructionMethods as $idString) { - $id = $this->_helper->osidId->fromString($idString); + $id = $this->osidRuntimeId->fromString($idString); $query->matchTopicId($id, true); $this->view->selectedInstructionMethodIds[] = $id; } @@ -439,7 +476,7 @@ public function searchAction() if (count($genusTypes)) { foreach ($genusTypes as $typeString) { - $genusType = $this->_helper->osidType->fromString($typeString); + $genusType = $this->osidRuntimeType->fromString($typeString); $query->matchGenusType($genusType, true); $this->view->selectedGenusTypes[] = $genusType; } @@ -458,7 +495,7 @@ public function searchAction() if (count($campuses)) { foreach ($campuses as $idString) { - $id = $this->_helper->osidId->fromString($idString); + $id = $this->osidRuntimeId->fromString($idString); $query->matchLocationId($id, true); $this->view->selectedCampusIds[] = $id; } @@ -468,7 +505,7 @@ public function searchAction() // Set the default selection to lecture/seminar if the is a new search if (!$this->_getParam('search') && !count($this->view->selectedGenusTypes)) { - $this->view->selectedGenusTypes = $this->_helper->osidTypes->getDefaultGenusTypes(); + $this->view->selectedGenusTypes = $this->osidRuntimeTypes->getDefaultGenusTypes(); } if ($query->hasRecordType($this->weeklyScheduleType)) { @@ -583,7 +620,7 @@ public function searchAction() if ($this->_getParam('instructor')) { if ($query->hasRecordType($this->instructorType)) { $queryRecord = $query->getCourseOfferingQueryRecord($this->instructorType); - $queryRecord->matchInstructorId($this->_helper->osidId->fromString($this->_getParam('instructor')), true); + $queryRecord->matchInstructorId($this->osidRuntimeId->fromString($this->_getParam('instructor')), true); } $this->view->searchParams['instructor'] = $this->_getParam('instructor'); } @@ -639,8 +676,8 @@ public function viewAction() protected function viewBase() { - $id = $this->_helper->osidId->fromString($this->_getParam('offering')); - $lookupSession = $this->_helper->osid->getCourseManager()->getCourseOfferingLookupSession(); + $id = $this->osidRuntimeId->fromString($this->_getParam('offering')); + $lookupSession = $this->osidRuntime->getCourseManager()->getCourseOfferingLookupSession(); $lookupSession->useFederatedCourseCatalogView(); $this->view->offering = $lookupSession->getCourseOffering($id); @@ -648,7 +685,7 @@ protected function viewBase() $this->loadTopics($this->view->offering->getTopics()); // Set the selected Catalog Id. - $catalogSession = $this->_helper->osid->getCourseManager()->getCourseOfferingCatalogSession(); + $catalogSession = $this->osidRuntime->getCourseManager()->getCourseOfferingCatalogSession(); $catalogIds = $catalogSession->getCatalogIdsByCourseOffering($id); if ($catalogIds->hasNext()) { $this->setSelectedCatalogId($catalogIds->getNextId()); @@ -693,8 +730,8 @@ public function viewxmlAction() $this->viewBase(); $this->view->feedTitle = $this->view->title; - $this->view->feedLink = $this->_helper->pathAsAbsoluteUrl('/offerings/view/'.$this->_getParam('catalog').'/offering/'.$this->_getParam('offering')); - $this->view->sections = new phpkit_course_ArrayCourseOfferingList([$this->view->offering]); + $this->view->feedLink = $this->_helper->pathAsAbsoluteUrl('/offerings/view/'.$catalog.'/offering/'.$this->_getParam('offering')); + $this->view->sections = new \phpkit_course_ArrayCourseOfferingList([$this->view->offering]); $this->postDispatch(); } } diff --git a/application/resources/Catalog/Action/Helper/OsidTerms.php b/src/Service/Osid/TermHelper.php similarity index 74% rename from application/resources/Catalog/Action/Helper/OsidTerms.php rename to src/Service/Osid/TermHelper.php index 6257f290..013fa697 100755 --- a/application/resources/Catalog/Action/Helper/OsidTerms.php +++ b/src/Service/Osid/TermHelper.php @@ -1,5 +1,7 @@ runtime = $runtime; + $this->idMap = $idMap; + } + /** * Answer the "current" termId for the catalog passed. If multiple terms overlap * to be 'current', only one will be returned. @@ -20,20 +48,20 @@ class Catalog_Action_Helper_OsidTerms extends Catalog_Action_Helper_AbstractOsid * * @since 6/11/09 */ - public function getNextOrLatestTermId(osid_id_Id $catalogId) + public function getNextOrLatestTermId(\osid_id_Id $catalogId) { - $catalogIdString = Zend_Controller_Action_HelperBroker::getStaticHelper('OsidId')->toString($catalogId); + $catalogIdString = $this->idMap->toString($catalogId); $cacheKey = 'upcoming_term::'.$catalogIdString; $currentTerm = self::cache_get($cacheKey); if (!$currentTerm) { - $manager = Zend_Controller_Action_HelperBroker::getStaticHelper('Osid')->getCourseManager(); + $manager = $this->runtime->getCourseManager(); if (!$manager->supportsTermLookup()) { - throw new osid_NotFoundException('Could not determine a current term id. The manager does not support term lookup.'); + throw new \osid_NotFoundException('Could not determine a current term id. The manager does not support term lookup.'); } $termLookup = $manager->getTermLookupSessionForCatalog($catalogId); $currentTerm = $this->findNextOrLatestTermId($termLookup->getTerms()); if (!$currentTerm) { - throw new osid_NotFoundException('Could not determine an upcoming term id for the catalog passed.'); + throw new \osid_NotFoundException('Could not determine an upcoming term id for the catalog passed.'); } self::cache_set($cacheKey, $currentTerm); @@ -52,20 +80,20 @@ public function getNextOrLatestTermId(osid_id_Id $catalogId) * * @since 6/11/09 */ - public function getCurrentTermId(osid_id_Id $catalogId) + public function getCurrentTermId(\osid_id_Id $catalogId) { - $catalogIdString = Zend_Controller_Action_HelperBroker::getStaticHelper('OsidId')->toString($catalogId); + $catalogIdString = $this->idMap->toString($catalogId); $cacheKey = 'current_term::'.$catalogIdString; $currentTerm = self::cache_get($cacheKey); if (!$currentTerm) { - $manager = Zend_Controller_Action_HelperBroker::getStaticHelper('Osid')->getCourseManager(); + $manager = $this->runtime->getCourseManager(); if (!$manager->supportsTermLookup()) { - throw new osid_NotFoundException('Could not determine a current term id. The manager does not support term lookup.'); + throw new \osid_NotFoundException('Could not determine a current term id. The manager does not support term lookup.'); } $termLookup = $manager->getTermLookupSessionForCatalog($catalogId); $currentTerm = $this->findClosestTermId($termLookup->getTerms()); if (!$currentTerm) { - throw new osid_NotFoundException('Could not determine a current term id for the catalog passed.'); + throw new \osid_NotFoundException('Could not determine a current term id for the catalog passed.'); } self::cache_set($cacheKey, $currentTerm); @@ -132,7 +160,7 @@ private static function cache_set($key, $value) * * @since 2/07/13 */ - public function findNextOrLatestTermId(osid_course_TermList $terms, ?DateTime $date = null) + public function findNextOrLatestTermId(\osid_course_TermList $terms, ?DateTime $date = null) { $upcomingIds = []; $upcomingDates = []; @@ -146,7 +174,7 @@ public function findNextOrLatestTermId(osid_course_TermList $terms, ?DateTime $d } if (!$terms->hasNext()) { - throw new osid_NotFoundException('Could not determine a current term id. No terms found.'); + throw new \osid_NotFoundException('Could not determine a current term id. No terms found.'); } while ($terms->hasNext()) { @@ -188,7 +216,7 @@ public function findNextOrLatestTermId(osid_course_TermList $terms, ?DateTime $d * * @since 6/11/09 */ - public function findClosestTermId(osid_course_TermList $terms, ?DateTime $date = null) + public function findClosestTermId(\osid_course_TermList $terms, ?DateTime $date = null) { $ids = []; $diffs = []; @@ -200,7 +228,7 @@ public function findClosestTermId(osid_course_TermList $terms, ?DateTime $date = } if (!$terms->hasNext()) { - throw new osid_NotFoundException('Could not determine a current term id. No terms found.'); + throw new \osid_NotFoundException('Could not determine a current term id. No terms found.'); } while ($terms->hasNext()) { diff --git a/templates/catalogs.html.twig b/templates/catalogs.html.twig index e34022c4..555055cf 100755 --- a/templates/catalogs.html.twig +++ b/templates/catalogs.html.twig @@ -1,4 +1,4 @@ {% for catalog in catalogs %} -

{{ catalog.display_name }}

+

{{ catalog.display_name }}

{{ catalog.description }}
{% endfor %} From 7fdc42e4387244adff18a14ca87e2a06fd769b6e Mon Sep 17 00:00:00 2001 From: Adam Franco Date: Tue, 1 Oct 2024 17:31:14 -0400 Subject: [PATCH 020/173] #47: Port the offering view action. --- .../library/AbstractCatalogController.php | 28 --- .../Catalog/Action/Helper/Topics.php | 50 ---- .../views/scripts/offerings/view.phtml | 226 ------------------ config/services.yaml | 2 + .../Controller/Courses.php | 76 ++++-- src/Controller/Offerings.php | 136 +++++++---- .../Controller/Resources.php | 83 ++++--- .../Controller/Terms.php | 73 ++++-- .../Controller/Topics.php | 105 ++++---- src/Service/Osid/TopicHelper.php | 99 ++++++++ templates/offering.html.twig | 128 ++++++++++ 11 files changed, 544 insertions(+), 462 deletions(-) delete mode 100755 application/resources/Catalog/Action/Helper/Topics.php delete mode 100755 application/views/scripts/offerings/view.phtml rename application/controllers/CoursesController.php => src/Controller/Courses.php (93%) rename application/controllers/ResourcesController.php => src/Controller/Resources.php (62%) rename application/controllers/TermsController.php => src/Controller/Terms.php (58%) rename application/controllers/TopicsController.php => src/Controller/Topics.php (71%) create mode 100755 src/Service/Osid/TopicHelper.php create mode 100755 templates/offering.html.twig diff --git a/application/library/AbstractCatalogController.php b/application/library/AbstractCatalogController.php index ea3cdcd2..8ec8ea25 100755 --- a/application/library/AbstractCatalogController.php +++ b/application/library/AbstractCatalogController.php @@ -83,34 +83,6 @@ protected function getSelectedCatalogId() return $this->view->menuCatalogSelectedId; } - /** - * Load topics into our view. - * - * @param osid_course_TopicList - * - * @return void - * - * @since 4/28/09 - */ - protected function loadTopics(osid_course_TopicList $topicList) - { - $topics = $this->_helper->topics->topicListAsArray($topicList); - - $this->view->subjectTopics = $this->_helper->topics->filterTopicsByType($topics, new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.subject')); - - $this->view->departmentTopics = $this->_helper->topics->filterTopicsByType($topics, new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.department')); - - $this->view->divisionTopics = $this->_helper->topics->filterTopicsByType($topics, new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.division')); - - $this->view->requirementTopics = $this->_helper->topics->filterTopicsByType($topics, new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.requirement')); - - $this->view->levelTopics = $this->_helper->topics->filterTopicsByType($topics, new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.level')); - - $this->view->blockTopics = $this->_helper->topics->filterTopicsByType($topics, new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.block')); - - $this->view->instructionMethodTopics = $this->_helper->topics->filterTopicsByType($topics, new phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.instruction_method')); - } - private $startTime; /** diff --git a/application/resources/Catalog/Action/Helper/Topics.php b/application/resources/Catalog/Action/Helper/Topics.php deleted file mode 100755 index fe4a7394..00000000 --- a/application/resources/Catalog/Action/Helper/Topics.php +++ /dev/null @@ -1,50 +0,0 @@ -hasNext()) { - $topics[] = $topicList->getNextTopic(); - } - - return $topics; - } - - /** - * Return an array of topics matching a type. - * - * @return array - * - * @since 4/28/09 - * - * @static - */ - public static function filterTopicsByType(array $topics, osid_type_Type $type) - { - $matching = []; - foreach ($topics as $topic) { - if ($topic->getGenusType()->isEqual($type)) { - $matching[] = $topic; - } - } - - return $matching; - } -} diff --git a/application/views/scripts/offerings/view.phtml b/application/views/scripts/offerings/view.phtml deleted file mode 100755 index 03be6099..00000000 --- a/application/views/scripts/offerings/view.phtml +++ /dev/null @@ -1,226 +0,0 @@ -render('schedules/bookmark_control.phtml'); - -// print "\n\t
".$this->escape($this->offering->getDisplayName())."
"; -print "\n\t

".nl2br($this->escape($this->offering->getTitle()))."

"; -if ($this->offering->getDescription()) - print "\n\t
".$this->offering->getDescription()."
"; - -$term = $this->offering->getTerm(); - -$resourceParams = array( - 'controller' => 'resources', - 'action' => 'view', - 'offering' => null, - 'term' => $this->getStringFromOsidId($term->getId()), - ); - -$termUrl = $this->url(array( - 'controller' => 'terms', - 'action' => 'view', - 'term' => $this->getStringFromOsidId($term->getId()), - 'offering' => null - )); -$offeringParams = array( - 'controller' => 'offerings', - 'action' => 'view', - 'course' => null - ); - -print "\n\t"; - - -print "\n\t
"; -$properties = $this->offering->getProperties(); -while ($properties->hasNext()) { - $property = $properties->getNextProperty(); - print "\n\t\t
"; - print $property->getDisplayName(); - if ($property->getDisplayName() != $property->getDisplayLabel()) - print " (".$property->getDisplayLabel().")"; - print ":
"; - print "\n\t\t
".$property->getValue()."
"; -} -print "\n\t
"; - -print "\n
"; - -$course = $this->offering->getCourse(); -$courseParams = array( - 'controller' => 'courses', - 'action' => 'view', - 'course' => $this->getStringFromOsidId($course->getId()), - 'offering' => null - ); -print "\n\t

Course

"; -print "\n\t"; - - -if (isset($this->parentOffering)) { - $offeringParams['offering'] = $this->getStringFromOsidId($this->parentOffering->getId()); - print "\n\t

Offering

"; -print "\n\t\t"; -} diff --git a/config/services.yaml b/config/services.yaml index 94b3690f..a8c70bce 100644 --- a/config/services.yaml +++ b/config/services.yaml @@ -47,3 +47,5 @@ services: class: App\Service\Osid\TypeMap osid.term_helper: class: App\Service\Osid\TermHelper + osid.topic_helper: + class: App\Service\Osid\TopicHelper diff --git a/application/controllers/CoursesController.php b/src/Controller/Courses.php similarity index 93% rename from application/controllers/CoursesController.php rename to src/Controller/Courses.php index 2e604c41..3e5648a1 100755 --- a/application/controllers/CoursesController.php +++ b/src/Controller/Courses.php @@ -1,21 +1,67 @@ osidRuntime = $osidRuntime; + $this->osidIdMap = $osidIdMap; + $this->osidTermHelper = $osidTermHelper; + $this->osidTopicHelper = $osidTopicHelper; + } + /** * Initialize object. * @@ -57,16 +103,10 @@ public function listAction() $this->view->menuIsCourses = true; } - /** - * View a catalog details. - * - * @return void - * - * @since 4/21/09 - */ - public function viewAction() + #[Route('/courses/view/{course}/{term}', name: 'view_course')] + public function view($course, $term = NULL) { - $id = $this->_helper->osidId->fromString($this->_getParam('course')); + $id = $this->_helper->osidId->fromString($course); $lookupSession = $this->_helper->osid->getCourseManager()->getCourseLookupSession(); $lookupSession->useFederatedCourseCatalogView(); $this->view->course = $lookupSession->getCourse($id); @@ -96,8 +136,8 @@ public function viewAction() } // Term - if ($this->_getParam('term')) { - $termId = $this->_helper->osidId->fromString($this->_getParam('term')); + if ($term) { + $termId = $this->_helper->osidId->fromString($term); $termLookupSession = $this->_helper->osid->getCourseManager()->getTermLookupSession(); $termLookupSession->useFederatedCourseCatalogView(); $this->view->term = $termLookupSession->getTerm($termId); diff --git a/src/Controller/Offerings.php b/src/Controller/Offerings.php index 3a5934be..6e6bc874 100755 --- a/src/Controller/Offerings.php +++ b/src/Controller/Offerings.php @@ -1,8 +1,6 @@ osidRuntime = $osidRuntime; $this->osidIdMap = $osidIdMap; $this->osidTermHelper = $osidTermHelper; + $this->osidTopicHelper = $osidTopicHelper; } /** @@ -235,8 +240,8 @@ public function search(string $catalog = NULL, $term = NULL) $topicQuery = $topicSearchSession->getTopicQuery(); $topicQuery->matchGenusType($this->departmentType, true); // if (isset($termId) && $topicQuery->hasRecordType($this->termType)) { - // $record = $topicQuery->getTopicQueryRecord($this->termType); - // $record->matchTermId($termId, true); + // $record = $topicQuery->getTopicQueryRecord($this->termType); + // $record->matchTermId($termId, true); // } $search = $topicSearchSession->getTopicSearch(); $order = $topicSearchSession->getTopicSearchOrder(); @@ -248,8 +253,8 @@ public function search(string $catalog = NULL, $term = NULL) $topicQuery = $topicSearchSession->getTopicQuery(); $topicQuery->matchGenusType($this->subjectType, true); // if (isset($termId) && $topicQuery->hasRecordType($this->termType)) { - // $record = $topicQuery->getTopicQueryRecord($this->termType); - // $record->matchTermId($termId, true); + // $record = $topicQuery->getTopicQueryRecord($this->termType); + // $record->matchTermId($termId, true); // } $search = $topicSearchSession->getTopicSearch(); $order = $topicSearchSession->getTopicSearchOrder(); @@ -654,64 +659,103 @@ public function search(string $catalog = NULL, $term = NULL) $this->view->menuIsSearch = true; } - /** - * View a catalog details. - * - * @return void - * - * @since 4/21/09 - */ - public function viewAction() + #[Route('/offerings/view/{id}', name: 'view_offering')] + public function viewAction($id) { - $this->viewBase(); + $data = $this->viewBase($id); // Bookmarked Courses and Schedules - $this->view->bookmarks_CourseId = $this->view->offering->getCourseId(); + $data['bookmarks_CourseId'] = $data['offering']->getCourseId(); - $this->view->menuIsOfferings = true; + $data['menuIsOfferings'] = true; - $this->render(); - $this->render('offerings', null, true); + return $this->render('offering.html.twig', $data); } - protected function viewBase() + protected function viewBase($idString) { - $id = $this->osidRuntimeId->fromString($this->_getParam('offering')); + $data = []; + $id = $this->osidIdMap->fromString($idString); $lookupSession = $this->osidRuntime->getCourseManager()->getCourseOfferingLookupSession(); $lookupSession->useFederatedCourseCatalogView(); - $this->view->offering = $lookupSession->getCourseOffering($id); + $offering = $data['offering'] = $lookupSession->getCourseOffering($id); // Load the topics into our view - $this->loadTopics($this->view->offering->getTopics()); + $data = array_merge( + $data, + $this->osidTopicHelper->asTypedArray($offering->getTopics()) + ); // Set the selected Catalog Id. $catalogSession = $this->osidRuntime->getCourseManager()->getCourseOfferingCatalogSession(); $catalogIds = $catalogSession->getCatalogIdsByCourseOffering($id); if ($catalogIds->hasNext()) { - $this->setSelectedCatalogId($catalogIds->getNextId()); + $catalogId = $catalogIds->getNextId(); + $data['menuCatalogSelectedId'] = $catalogId; + $data['menuCatalogSelected'] = $this->osidRuntime->getCourseManager()->getCourseCatalogLookupSession()->getCourseCatalog($catalogId); } - // Set the title - $this->view->title = $this->view->offering->getDisplayName(); - $this->view->headTitle($this->view->title); + $data['title'] = $offering->getDisplayName(); - // Term - $this->view->term = $this->view->offering->getTerm(); + $data['term'] = $offering->getTerm(); - // Other offerings - $this->view->offeringsTitle = 'All Sections'; - $this->view->offerings = $lookupSession->getCourseOfferingsByTermForCourse( - $this->view->offering->getTermId(), - $this->view->offering->getCourseId() - ); + $data['location'] = NULL; + if ($offering->hasLocation()) { + $data['location'] = $offering->getLocation(); + } + + // Instructors + $data['instructors'] = NULL; + $instructorsType = new \phpkit_type_URNInetType('urn:inet:middlebury.edu:record:instructors'); + if ($offering->hasRecordType($instructorsType)) { + $instructorsRecord = $offering->getCourseOfferingRecord($instructorsType); + $instructors = $instructorsRecord->getInstructors(); + $data['instructors'] = []; + while ($instructors->hasNext()) { + $data['instructors'][] = $instructors->getNextResource(); + } + } - // Alternates - if ($this->view->offering->hasRecordType($this->alternateType)) { - $record = $this->view->offering->getCourseOfferingRecord($this->alternateType); + // Alternates. + $data['alternates'] = NULL; + if ($offering->hasRecordType($this->getAlternateType())) { + $record = $offering->getCourseOfferingRecord($this->getAlternateType()); if ($record->hasAlternates()) { - $this->view->alternates = $record->getAlternates(); + $data['alternates'] = []; + $alternates = $record->getAlternates(); + while ($alternates->hasNext()) { + $alternate = $alternates->getNextCourseOffering(); + $alternate->is_primary = FALSE; + if ($alternate->hasRecordType($this->getAlternateType())) { + $alternateRecord = $alternate->getCourseOfferingRecord($this->getAlternateType()); + if ($alternateRecord->isPrimary()) { + $alternate->is_primary = TRUE; + } + } + $data['alternates'][] = $alternate; + } + } } + + // Availability link. @todo + $data['availabilityLink'] = NULL; + //$this->getAvailabilityLink($this->offering); + + $data['properties'] = []; + $properties = $offering->getProperties(); + while ($properties->hasNext()) { + $data['properties'][] = $properties->getNextProperty(); + } + + // Other offerings + $data['offeringsTitle'] = 'All Sections'; + $data['offerings'] = $lookupSession->getCourseOfferingsByTermForCourse( + $offering->getTermId(), + $offering->getCourseId() + ); + + return $data; } /** @@ -734,4 +778,8 @@ public function viewxmlAction() $this->view->sections = new \phpkit_course_ArrayCourseOfferingList([$this->view->offering]); $this->postDispatch(); } + + protected function getAlternateType() { + return new \phpkit_type_URNInetType('urn:inet:middlebury.edu:record:alternates'); + } } diff --git a/application/controllers/ResourcesController.php b/src/Controller/Resources.php similarity index 62% rename from application/controllers/ResourcesController.php rename to src/Controller/Resources.php index 77af7c19..c4f3498e 100755 --- a/application/controllers/ResourcesController.php +++ b/src/Controller/Resources.php @@ -1,21 +1,50 @@ osidRuntime = $osidRuntime; + $this->osidIdMap = $osidIdMap; + } + /** * Initialize object. * @@ -38,11 +67,11 @@ public function init() // */ // public function listAction () { // if ($this->_getParam('catalog')) { - // $catalogId = $this->_helper->osidId->fromString($this->_getParam('catalog')); - // $lookupSession = $this->_helper->osid->getCourseManager()->getTopicLookupSessionForCatalog($catalogId); + // $catalogId = $this->osidIdMap->fromString($this->_getParam('catalog')); + // $lookupSession = $this->osidRuntime->getCourseManager()->getTopicLookupSessionForCatalog($catalogId); // $this->view->title = 'Topics in '.$lookupSession->getCourseCatalog()->getDisplayName(); // } else { - // $lookupSession = $this->_helper->osid->getCourseManager()->getTopicLookupSession(); + // $lookupSession = $this->osidRuntime->getCourseManager()->getTopicLookupSession(); // $this->view->title = 'Topics in All Catalogs'; // } // $lookupSession->useFederatedCourseCatalogView(); @@ -53,30 +82,24 @@ public function init() // $this->view->headTitle($this->view->title); // } - /** - * View a catalog details. - * - * @return void - * - * @since 4/21/09 - */ - public function viewAction() + #[Route('/resources/view/{resource}/{term}', name: 'view_resource')] + public function viewAction($resource, $term = NULL) { - $id = $this->_helper->osidId->fromString($this->_getParam('resource')); - $lookupSession = $this->_helper->osid->getCourseManager()->getResourceManager()->getResourceLookupSession(); + $id = $this->osidIdMap->fromString($resource); + $lookupSession = $this->osidRuntime->getCourseManager()->getResourceManager()->getResourceLookupSession(); $lookupSession->useFederatedBinView(); $this->view->resource = $lookupSession->getResource($id); - $offeringSearchSession = $this->_helper->osid->getCourseManager()->getCourseOfferingSearchSession(); + $offeringSearchSession = $this->osidRuntime->getCourseManager()->getCourseOfferingSearchSession(); $offeringSearchSession->useFederatedCourseCatalogView(); $query = $offeringSearchSession->getCourseOfferingQuery(); - if ($this->_getParam('term')) { - $termId = $this->_helper->osidId->fromString($this->_getParam('term')); + if ($term) { + $termId = $this->osidIdMap->fromString($term); $query->matchTermId($termId, true); - $termLookupSession = $this->_helper->osid->getCourseManager()->getTermLookupSession(); + $termLookupSession = $this->osidRuntime->getCourseManager()->getTermLookupSession(); $termLookupSession->useFederatedCourseCatalogView(); $this->view->term = $termLookupSession->getTerm($termId); } @@ -99,7 +122,7 @@ public function viewAction() $allParams = []; $allParams['resource'] = $this->_getParam('resource'); if ($this->getSelectedCatalogId()) { - $allParams['catalog'] = $this->_helper->osidId->toString($this->getSelectedCatalogId()); + $allParams['catalog'] = $this->osidIdMap->toString($this->getSelectedCatalogId()); } $this->view->offeringsForAllTermsUrl = $this->_helper->url('view', 'resources', null, $allParams); @@ -110,7 +133,7 @@ public function viewAction() // Set the selected Catalog Id. if ($this->_getParam('catalog')) { - $this->setSelectedCatalogId($this->_helper->osidId->fromString($this->_getParam('catalog'))); + $this->setSelectedCatalogId($this->osidIdMap->fromString($this->_getParam('catalog'))); } // Set the title @@ -142,11 +165,11 @@ private function renderTextList(osid_type_Type $genusType) header('Content-Type: text/plain'); if ($this->_getParam('catalog')) { - $catalogId = $this->_helper->osidId->fromString($this->_getParam('catalog')); - $lookupSession = $this->_helper->osid->getCourseManager()->getResourceManager()->getResourceLookupSessionForBin($catalogId); + $catalogId = $this->osidIdMap->fromString($this->_getParam('catalog')); + $lookupSession = $this->osidRuntime->getCourseManager()->getResourceManager()->getResourceLookupSessionForBin($catalogId); $this->view->title = 'Resources in '.$lookupSession->getBin()->getDisplayName(); } else { - $lookupSession = $this->_helper->osid->getCourseManager()->getResourceManager()->getResourceLookupSession(); + $lookupSession = $this->osidRuntime->getCourseManager()->getResourceManager()->getResourceLookupSession(); $this->view->title = 'Resources in All Bins'; } $lookupSession->useFederatedBinView(); @@ -155,7 +178,7 @@ private function renderTextList(osid_type_Type $genusType) while ($resources->hasNext()) { $resource = $resources->getNextResource(); - echo $this->_helper->osidId->toString($resource->getId()).'|'.$this->_helper->osidId->toString($resource->getId()).' - '.$resource->getDisplayName()."\n"; + echo $this->osidIdMap->toString($resource->getId()).'|'.$this->osidIdMap->toString($resource->getId()).' - '.$resource->getDisplayName()."\n"; } // var_dump($lookupSession); // var_dump($resources); diff --git a/application/controllers/TermsController.php b/src/Controller/Terms.php similarity index 58% rename from application/controllers/TermsController.php rename to src/Controller/Terms.php index 55ed07e9..7372276c 100755 --- a/application/controllers/TermsController.php +++ b/src/Controller/Terms.php @@ -1,21 +1,50 @@ osidRuntime = $osidRuntime; + $this->osidIdMap = $osidIdMap; + } + /** * Print out a list of all terms. * @@ -26,11 +55,11 @@ class TermsController extends AbstractCatalogController public function listAction() { if ($this->_getParam('catalog')) { - $catalogId = $this->_helper->osidId->fromString($this->_getParam('catalog')); - $lookupSession = $this->_helper->osid->getCourseManager()->getTermLookupSessionForCatalog($catalogId); + $catalogId = $this->osidIdMap->fromString($this->_getParam('catalog')); + $lookupSession = $this->osidRuntime->getCourseManager()->getTermLookupSessionForCatalog($catalogId); $this->view->title = 'Terms in '.$lookupSession->getCourseCatalog()->getDisplayName(); } else { - $lookupSession = $this->_helper->osid->getCourseManager()->getTermLookupSession(); + $lookupSession = $this->osidRuntime->getCourseManager()->getTermLookupSession(); $this->view->title = 'Terms in All Catalogs'; } $lookupSession->useFederatedCourseCatalogView(); @@ -56,26 +85,20 @@ public function listxmlAction() $this->listAction(); } - /** - * View a catalog details. - * - * @return void - * - * @since 4/21/09 - */ - public function viewAction() + #[Route('/terms/view/{id}', name: 'view_term')] + public function viewAction($id) { - $id = $this->_helper->osidId->fromString($this->_getParam('term')); - $lookupSession = $this->_helper->osid->getCourseManager()->getTermLookupSession(); + $id = $this->osidIdMap->fromString($this->_getParam('term')); + $lookupSession = $this->osidRuntime->getCourseManager()->getTermLookupSession(); $lookupSession->useFederatedCourseCatalogView(); $this->view->term = $lookupSession->getTerm($id); - $lookupSession = $this->_helper->osid->getCourseManager()->getCourseOfferingLookupSession(); + $lookupSession = $this->osidRuntime->getCourseManager()->getCourseOfferingLookupSession(); $lookupSession->useFederatedCourseCatalogView(); $this->view->offerings = $lookupSession->getCourseOfferingsByTerm($id); // Set the selected Catalog Id. - $catalogSession = $this->_helper->osid->getCourseManager()->getTermCatalogSession(); + $catalogSession = $this->osidRuntime->getCourseManager()->getTermCatalogSession(); $catalogIds = $catalogSession->getCatalogIdsByTerm($id); if ($catalogIds->hasNext()) { $this->setSelectedCatalogId($catalogIds->getNextId()); @@ -95,13 +118,13 @@ public function viewAction() */ public function detailsAction() { - $id = $this->_helper->osidId->fromString($this->_getParam('term')); - $lookupSession = $this->_helper->osid->getCourseManager()->getTermLookupSession(); + $id = $this->osidIdMap->fromString($this->_getParam('term')); + $lookupSession = $this->osidRuntime->getCourseManager()->getTermLookupSession(); $lookupSession->useFederatedCourseCatalogView(); $this->view->term = $lookupSession->getTerm($id); // Set the selected Catalog Id. - $catalogSession = $this->_helper->osid->getCourseManager()->getTermCatalogSession(); + $catalogSession = $this->osidRuntime->getCourseManager()->getTermCatalogSession(); $catalogIds = $catalogSession->getCatalogIdsByTerm($id); if ($catalogIds->hasNext()) { $this->setSelectedCatalogId($catalogIds->getNextId()); diff --git a/application/controllers/TopicsController.php b/src/Controller/Topics.php similarity index 71% rename from application/controllers/TopicsController.php rename to src/Controller/Topics.php index 453bb5fa..018e9daf 100755 --- a/application/controllers/TopicsController.php +++ b/src/Controller/Topics.php @@ -1,21 +1,50 @@ osidRuntime = $osidRuntime; + $this->osidIdMap = $osidIdMap; + } + /** * Print out a list of all topics. * @@ -26,17 +55,17 @@ class TopicsController extends AbstractCatalogController public function listAction() { if ($this->_getParam('catalog')) { - $catalogId = $this->_helper->osidId->fromString($this->_getParam('catalog')); - $lookupSession = $this->_helper->osid->getCourseManager()->getTopicLookupSessionForCatalog($catalogId); + $catalogId = $this->osidIdMap->fromString($this->_getParam('catalog')); + $lookupSession = $this->osidRuntime->getCourseManager()->getTopicLookupSessionForCatalog($catalogId); $this->view->title = 'Topics in '.$lookupSession->getCourseCatalog()->getDisplayName(); } else { - $lookupSession = $this->_helper->osid->getCourseManager()->getTopicLookupSession(); + $lookupSession = $this->osidRuntime->getCourseManager()->getTopicLookupSession(); $this->view->title = 'Topics in All Catalogs'; } $lookupSession->useFederatedCourseCatalogView(); if ($this->_getParam('type')) { - $genusType = $this->_helper->osidType->fromString($this->_getParam('type')); + $genusType = $this->osidRuntimeType->fromString($this->_getParam('type')); $topics = $lookupSession->getTopicsByGenusType($genusType); $this->view->title .= ' of type '.$this->_getParam('type'); } else { @@ -72,13 +101,13 @@ public function listxmlAction() public function recentAction() { if ($this->_getParam('catalog')) { - $catalogId = $this->_helper->osidId->fromString($this->_getParam('catalog')); - $searchSession = $this->_helper->osid->getCourseManager()->getTopicSearchSessionForCatalog($catalogId); - $termLookupSession = $this->_helper->osid->getCourseManager()->getTermLookupSessionForCatalog($catalogId); + $catalogId = $this->osidIdMap->fromString($this->_getParam('catalog')); + $searchSession = $this->osidRuntime->getCourseManager()->getTopicSearchSessionForCatalog($catalogId); + $termLookupSession = $this->osidRuntime->getCourseManager()->getTermLookupSessionForCatalog($catalogId); $this->view->title = 'Topics in '.$searchSession->getCourseCatalog()->getDisplayName(); } else { - $searchSession = $this->_helper->osid->getCourseManager()->getTopicSearchSession(); - $termLookupSession = $this->_helper->osid->getCourseManager()->getTermLookupSession(); + $searchSession = $this->osidRuntime->getCourseManager()->getTopicSearchSession(); + $termLookupSession = $this->osidRuntime->getCourseManager()->getTermLookupSession(); $this->view->title = 'Topics in All Catalogs'; } @@ -99,7 +128,7 @@ public function recentAction() } if ($this->_getParam('type')) { - $genusType = $this->_helper->osidType->fromString($this->_getParam('type')); + $genusType = $this->osidRuntimeType->fromString($this->_getParam('type')); $query->matchGenusType($genusType, true); $this->view->title .= ' of type '.$this->_getParam('type'); } @@ -144,27 +173,21 @@ public function recentxmlAction() $this->_helper->viewRenderer->setRender('topics/listxml', null, true); } - /** - * View a catalog details. - * - * @return void - * - * @since 4/21/09 - */ - public function viewAction() + #[Route('/topics/view/{topic}/{term}', name: 'view_topic')] + public function view($topic, $term = NULL) { - $id = $this->_helper->osidId->fromString($this->_getParam('topic')); - $lookupSession = $this->_helper->osid->getCourseManager()->getTopicLookupSession(); + $id = $this->osidIdMap->fromString($topic); + $lookupSession = $this->osidRuntime->getCourseManager()->getTopicLookupSession(); $lookupSession->useFederatedCourseCatalogView(); $this->view->topic = $lookupSession->getTopic($id); - $lookupSession = $this->_helper->osid->getCourseManager()->getCourseOfferingLookupSession(); + $lookupSession = $this->osidRuntime->getCourseManager()->getCourseOfferingLookupSession(); $lookupSession->useFederatedCourseCatalogView(); if ($this->_getParam('term')) { - $termId = $this->_helper->osidId->fromString($this->_getParam('term')); + $termId = $this->osidIdMap->fromString($term); $this->view->offerings = $lookupSession->getCourseOfferingsByTermByTopic($termId, $id); - $termLookupSession = $this->_helper->osid->getCourseManager()->getTermLookupSession(); + $termLookupSession = $this->osidRuntime->getCourseManager()->getTermLookupSession(); $termLookupSession->useFederatedCourseCatalogView(); $this->view->term = $termLookupSession->getTerm($termId); } else { @@ -179,7 +202,7 @@ public function viewAction() // Set the selected Catalog Id. if ($this->_getParam('catalog')) { - $this->setSelectedCatalogId($this->_helper->osidId->fromString($this->_getParam('catalog'))); + $this->setSelectedCatalogId($this->osidIdMap->fromString($this->_getParam('catalog'))); } // Set the title @@ -191,7 +214,7 @@ public function viewAction() $allParams = []; $allParams['topic'] = $this->_getParam('topic'); if ($this->getSelectedCatalogId()) { - $allParams['catalog'] = $this->_helper->osidId->toString($this->getSelectedCatalogId()); + $allParams['catalog'] = $this->osidIdMap->toString($this->getSelectedCatalogId()); } $this->view->offeringsForAllTermsUrl = $this->_helper->url('view', 'topics', null, $allParams); @@ -209,16 +232,16 @@ public function viewxmlAction() $this->getResponse()->setHeader('Content-Type', 'text/xml'); if ($this->_getParam('catalog')) { - $catalogId = $this->_helper->osidId->fromString($this->_getParam('catalog')); - $lookupSession = $this->_helper->osid->getCourseManager()->getTopicLookupSessionForCatalog($catalogId); + $catalogId = $this->osidIdMap->fromString($this->_getParam('catalog')); + $lookupSession = $this->osidRuntime->getCourseManager()->getTopicLookupSessionForCatalog($catalogId); $this->view->title = 'Topics in '.$lookupSession->getCourseCatalog()->getDisplayName(); } else { - $lookupSession = $this->_helper->osid->getCourseManager()->getTopicLookupSession(); + $lookupSession = $this->osidRuntime->getCourseManager()->getTopicLookupSession(); $this->view->title = 'Topics in All Catalogs'; } $lookupSession->useFederatedCourseCatalogView(); - $topicId = $this->_helper->osidId->fromString($this->_getParam('topic')); + $topicId = $this->osidIdMap->fromString($this->_getParam('topic')); $topic = $lookupSession->getTopic($topicId); $topics = new phpkit_course_ArrayTopicList([$topic]); @@ -316,11 +339,11 @@ private function renderTextList(osid_type_Type $genusType) header('Content-Type: text/plain'); if ($this->_getParam('catalog')) { - $catalogId = $this->_helper->osidId->fromString($this->_getParam('catalog')); - $lookupSession = $this->_helper->osid->getCourseManager()->getTopicLookupSessionForCatalog($catalogId); + $catalogId = $this->osidIdMap->fromString($this->_getParam('catalog')); + $lookupSession = $this->osidRuntime->getCourseManager()->getTopicLookupSessionForCatalog($catalogId); $this->view->title = 'Topics in '.$lookupSession->getCourseCatalog()->getDisplayName(); } else { - $lookupSession = $this->_helper->osid->getCourseManager()->getTopicLookupSession(); + $lookupSession = $this->osidRuntime->getCourseManager()->getTopicLookupSession(); $this->view->title = 'Topics in All Catalogs'; } $lookupSession->useFederatedCourseCatalogView(); @@ -329,7 +352,7 @@ private function renderTextList(osid_type_Type $genusType) while ($topics->hasNext()) { $topic = $topics->getNextTopic(); - echo $this->_helper->osidId->toString($topic->getId()).'|'.$this->_helper->osidId->toString($topic->getId()).' - '.$topic->getDisplayName()."\n"; + echo $this->osidIdMap->toString($topic->getId()).'|'.$this->osidIdMap->toString($topic->getId()).' - '.$topic->getDisplayName()."\n"; } exit; diff --git a/src/Service/Osid/TopicHelper.php b/src/Service/Osid/TopicHelper.php new file mode 100755 index 00000000..dfdb245e --- /dev/null +++ b/src/Service/Osid/TopicHelper.php @@ -0,0 +1,99 @@ +hasNext()) { + $topics[] = $topicList->getNextTopic(); + } + + return $topics; + } + + /** + * Return an array of topics matching a type. + * + * @param array $topics + * An array of osid_course_TopicList objects. + * @param osid_type_Type $type + * The type of topic to filter for. + * + * @return array + */ + public function filterTopicsByType(array $topics, \osid_type_Type $type) + { + $matching = []; + foreach ($topics as $topic) { + if ($topic->getGenusType()->isEqual($type)) { + $matching[] = $topic; + } + } + + return $matching; + } + + /** + * Return an array of topics organized by type. + * + * @param osid_course_TopicList $topicList + * + * @return array + * + */ + public function asTypedArray(\osid_course_TopicList $topicList) + { + $topics = $this->topicListAsArray($topicList); + $typedArray = []; + + $typedArray['subjectTopics'] = $this->filterTopicsByType( + $topics, + new \phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.subject') + ); + $typedArray['departmentTopics'] = $this->filterTopicsByType( + $topics, + new \phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.department') + ); + $typedArray['divisionTopics'] = $this->filterTopicsByType( + $topics, + new \phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.division') + ); + $typedArray['requirementTopics'] = $this->filterTopicsByType( + $topics, + new \phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.requirement') + ); + $typedArray['levelTopics'] = $this->filterTopicsByType( + $topics, + new \phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.level') + ); + $typedArray['blockTopics'] = $this->filterTopicsByType( + $topics, + new \phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.block') + ); + $typedArray['instructionMethodTopics'] = $this->filterTopicsByType( + $topics, + new \phpkit_type_URNInetType('urn:inet:middlebury.edu:genera:topic.instruction_method') + ); + + return $typedArray; + } +} diff --git a/templates/offering.html.twig b/templates/offering.html.twig new file mode 100755 index 00000000..502b2c01 --- /dev/null +++ b/templates/offering.html.twig @@ -0,0 +1,128 @@ +print $this->render('schedules/bookmark_control.phtml'); + +
{{ offering.displayname }}
+

{{ offering.title|nl2br }}

+{% if offering.description %} +
{{ offering.description|raw }}
+{% endif %} + + + +
+{% for property in properties %} +
{{ property.displayname }}{{ property.displayname != property.displaylabel ? " (#{property.displaylabel})" }}:
+
{{ property.value }}
+{% endfor %} +
+ +
+ +

Course

+ From 024361b49b4e761a8bee70b26cce51efebd028ee Mon Sep 17 00:00:00 2001 From: Adam Franco Date: Tue, 1 Oct 2024 17:33:09 -0400 Subject: [PATCH 021/173] #47: Add twig extensions to allow building of URLs from osid_Id objects. --- .../views/helpers/FormatScheduleInfo.php | 24 ----------- config/services.yaml | 8 ++++ src/Twig/NoWrapParentheticals.php | 21 ++++++++++ src/Twig/OsidIdExtension.php | 40 +++++++++++++++++++ 4 files changed, 69 insertions(+), 24 deletions(-) delete mode 100755 application/views/helpers/FormatScheduleInfo.php create mode 100644 src/Twig/NoWrapParentheticals.php create mode 100644 src/Twig/OsidIdExtension.php diff --git a/application/views/helpers/FormatScheduleInfo.php b/application/views/helpers/FormatScheduleInfo.php deleted file mode 100755 index cb60d856..00000000 --- a/application/views/helpers/FormatScheduleInfo.php +++ /dev/null @@ -1,24 +0,0 @@ -view->escape($scheduleInfo)); - $scheduleInfo = preg_replace('/\([^\)]+\)/', '$0', $scheduleInfo); - - return $scheduleInfo; - } -} diff --git a/config/services.yaml b/config/services.yaml index a8c70bce..5262ce94 100644 --- a/config/services.yaml +++ b/config/services.yaml @@ -38,6 +38,14 @@ services: arguments: $idAuthorityToShorten: '%app.osid.id.authority_to_shorten%' + App\Twig\OsidIdExtension: + tags: + - { name: 'twig.extension' } + + App\Twig\NoWrapParentheticals: + tags: + - { name: 'twig.extension' } + # Service aliases. osid.runtime: class: App\Service\Osid\Runtime diff --git a/src/Twig/NoWrapParentheticals.php b/src/Twig/NoWrapParentheticals.php new file mode 100644 index 00000000..243feadc --- /dev/null +++ b/src/Twig/NoWrapParentheticals.php @@ -0,0 +1,21 @@ +$0', $input); + } +} diff --git a/src/Twig/OsidIdExtension.php b/src/Twig/OsidIdExtension.php new file mode 100644 index 00000000..230f28f7 --- /dev/null +++ b/src/Twig/OsidIdExtension.php @@ -0,0 +1,40 @@ +idMap = $idMap; + } + + public function getFunctions(): array + { + return [ + new TwigFunction('osidIdToString', [$this, 'osidIdToString']), + ]; + } + + public function osidIdToString(\osid_id_Id $id): string + { + return $this->idMap->toString($id); + } +} From 77e13560f1654fa68dffcd4cb5dfc45793e8c144 Mon Sep 17 00:00:00 2001 From: Adam Franco Date: Tue, 1 Oct 2024 17:33:43 -0400 Subject: [PATCH 022/173] #47: Ensure that the FSMParser and Harmoni Primitives classes are available --- application/library/banner/course/Course.php | 3 --- composer.json | 6 +++++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/application/library/banner/course/Course.php b/application/library/banner/course/Course.php index 4d905f64..e809754a 100755 --- a/application/library/banner/course/Course.php +++ b/application/library/banner/course/Course.php @@ -6,9 +6,6 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License (GPL) */ -include_once 'fsmparserclass.inc.php'; -include_once 'harmoni/Primitives/Collections-Text/HtmlString.class.php'; - /** *

A Course represents a canonical learning unit. A * Course is instantiated at a time and place through the creation of diff --git a/composer.json b/composer.json index 8835e682..c3dcdc4b 100644 --- a/composer.json +++ b/composer.json @@ -35,7 +35,11 @@ "osid_": "library/osid-phpkit/", "phpkit_": "library/osid-phpkit/", "": "application/library/" - } + }, + "classmap": [ + "library/fsmparser/", + "application/library/harmoni/Primitives/" + ] }, "autoload-dev": { "psr-4": { From df1de2cdef2f1f1f3171a374dd09913049e06e87 Mon Sep 17 00:00:00 2001 From: Adam Franco Date: Wed, 2 Oct 2024 14:00:26 -0400 Subject: [PATCH 023/173] #47: Use subdirectories for template files to aid organization. --- src/Controller/Catalogs.php | 2 +- src/Controller/Offerings.php | 2 +- templates/{catalogs.html.twig => catalogs/list.html.twig} | 0 templates/{offering.html.twig => offerings/view.html.twig} | 0 4 files changed, 2 insertions(+), 2 deletions(-) rename templates/{catalogs.html.twig => catalogs/list.html.twig} (100%) rename templates/{offering.html.twig => offerings/view.html.twig} (100%) diff --git a/src/Controller/Catalogs.php b/src/Controller/Catalogs.php index 2d2771f7..88b72081 100755 --- a/src/Controller/Catalogs.php +++ b/src/Controller/Catalogs.php @@ -72,7 +72,7 @@ public function listAction() "description" => $catalog->getDescription(), ]; } - return $this->render('catalogs.html.twig', [ + return $this->render('catalogs/list.html.twig', [ 'title' => 'Available Catalogs', 'catalogs' => $catalogData, ]); diff --git a/src/Controller/Offerings.php b/src/Controller/Offerings.php index 6e6bc874..2ed78ec4 100755 --- a/src/Controller/Offerings.php +++ b/src/Controller/Offerings.php @@ -669,7 +669,7 @@ public function viewAction($id) $data['menuIsOfferings'] = true; - return $this->render('offering.html.twig', $data); + return $this->render('offerings/view.html.twig', $data); } protected function viewBase($idString) diff --git a/templates/catalogs.html.twig b/templates/catalogs/list.html.twig similarity index 100% rename from templates/catalogs.html.twig rename to templates/catalogs/list.html.twig diff --git a/templates/offering.html.twig b/templates/offerings/view.html.twig similarity index 100% rename from templates/offering.html.twig rename to templates/offerings/view.html.twig From 4cb59994701088b160fc4096094aafaf8866af50 Mon Sep 17 00:00:00 2001 From: Adam Franco Date: Thu, 3 Oct 2024 13:45:57 -0400 Subject: [PATCH 024/173] #47: Add single-section XML view. --- .../views/scripts/offerings/searchxml.phtml | 220 ------------------ config/services.yaml | 4 + src/Controller/Offerings.php | 39 ++-- src/Service/Osid/IdMap.php | 40 ++++ src/Twig/DateRangeFormatter.php | 24 ++ src/Twig/OsidIdExtension.php | 6 + templates/offerings/search.xml.twig | 83 +++++++ templates/partials/term.xml.twig | 1 + 8 files changed, 180 insertions(+), 237 deletions(-) delete mode 100755 application/views/scripts/offerings/searchxml.phtml create mode 100644 src/Twig/DateRangeFormatter.php create mode 100755 templates/offerings/search.xml.twig create mode 100644 templates/partials/term.xml.twig diff --git a/application/views/scripts/offerings/searchxml.phtml b/application/views/scripts/offerings/searchxml.phtml deleted file mode 100755 index 498a77c2..00000000 --- a/application/views/scripts/offerings/searchxml.phtml +++ /dev/null @@ -1,220 +0,0 @@ -pathAsAbsoluteUrl($view->url(array( - 'controller' => 'terms', - 'action' => 'view', - 'term' => $view->getStringFromOsidId($term->getId()), - 'offering' => null - ))); - - $start_date = $term->getStartTime()->format('Y-m-d'); - $end_date = $term->getEndTime()->format('Y-m-d'); - // PHP >= 5.3 -// $span = $term->getEndTime()->diff($term->getStartTime()); -// $weeks = ceil($span->days / 7); - // PHP < 5.3 - $weeks = ceil(abs($term->getEndTime()->format('U') - $term->getStartTime()->format('U'))/60/60/24/7); - - print "\n".$tabs."getStringFromOsidId($term->getId())."\" href=\"".$termUrl."\" start_date=\"".$start_date."\" end_date=\"".$end_date."\" weeks=\"".$weeks."\">"; - print $view->escape($term->getDisplayName()); - print " "; -} - -print ' - - - '.$this->feedTitle.' - '.$this->feedLink.' - - '.date('r').' - Course Catalog - http://blogs.law.harvard.edu/tech/rss -'; - -if (isset($this->previousTerm)) - printTerm($this, $this->previousTerm, 'previous_term', "\t\t"); -if (isset($this->term)) - printTerm($this, $this->term, 'chosen_term', "\t\t"); -if (isset($this->nextTerm)) - printTerm($this, $this->nextTerm, 'next_term', "\t\t"); - - -if (isset($this->terms)) { - print "\n\t\t"; - while ($this->terms->hasNext()) { - printTerm($this, $this->terms->getNextTerm()); - } - print "\n\t\t"; -} - -print "\n"; - -$alternateType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:record:alternates'); -while ($this->sections->hasNext()) { - $section = $this->sections->getNextCourseOffering(); - - $offeringParams = array( - 'controller' => 'offerings', - 'action' => 'view', - 'offering' => $this->getStringFromOsidId($section->getId()) - ); - $resourceParams = array( - 'controller' => 'resources', - 'action' => 'view', - 'offering' => null - ); - - $term = $section->getTerm(); - $topicParams = array( - 'controller' => 'topics', - 'action' => 'view', - 'offering' => null, - 'term' => $this->getStringFromOsidId($term->getId()) - ); - - // Topics - $allTopics = $this->topicListAsArray($section->getTopics()); -?> - - - <?php print $this->escape($section->getDisplayName()); ?> - pathAsAbsoluteUrl($this->url($offeringParams)); ?> - getDescription(); ?>]]> - escape($section->getTitle()); ?> - escape($this->getStringFromOsidId($section->getId())); ?> -hasRecordType($alternateType)) { - $record = $section->getCourseOfferingRecord($alternateType); - print "\n\t\t\t"; - print $record->isPrimary()?"true":"false"; - print " "; - if ($record->hasAlternates()) { - $alternates = $record->getAlternates(); - while ($alternates->hasNext()) { - $alternate = $alternates->getNextCourseOffering(); - $offeringParams['offering'] = $this->getStringFromOsidId($alternate->getId()); - print "\n\t\t\tgetStringFromOsidId($alternate->getId())."\" href=\"".$this->pathAsAbsoluteUrl($this->url($offeringParams))."\">"; - print $this->escape($alternate->getDisplayName()); - print " "; - } - } -} - -print "\n\t\t\tgetStringFromOsidType($section->getGenusType())."\" "; -print "href=\"".$this->pathAsAbsoluteUrl($this->url($offeringParams))."\">"; -print $this->escape($section->getGenusType()->getDisplayName()); -print " "; - -printTerm($this, $term); - -$topicType = new phpkit_type_URNInetType("urn:inet:middlebury.edu:genera:topic.subject"); -$topicTypeString = $this->getStringFromOsidType($topicType); -$topics = $this->filterTopicsByType($allTopics, $topicType); -foreach ($topics as $topic) { - $topicParams['topic'] = $this->getStringFromOsidId($topic->getId()); - print "\n\t\t\tgetStringFromOsidId($topic->getId())."\" href=\"".$this->pathAsAbsoluteUrl($this->url($topicParams))."\">"; - print $this->escape($topic->getDisplayName()); - print " "; -} - -$topicType = new phpkit_type_URNInetType("urn:inet:middlebury.edu:genera:topic.department"); -$topicTypeString = $this->getStringFromOsidType($topicType); -$topics = $this->filterTopicsByType($allTopics, $topicType); -foreach ($topics as $topic) { - $topicParams['topic'] = $this->getStringFromOsidId($topic->getId()); - print "\n\t\t\tgetStringFromOsidId($topic->getId())."\" href=\"".$this->pathAsAbsoluteUrl($this->url($topicParams))."\">"; - print $this->escape($topic->getDisplayName()); - print " "; -} - -$topicType = new phpkit_type_URNInetType("urn:inet:middlebury.edu:genera:topic.requirement"); -$topicTypeString = $this->getStringFromOsidType($topicType); -$topics = $this->filterTopicsByType($allTopics, $topicType); -foreach ($topics as $topic) { - $topicParams['topic'] = $this->getStringFromOsidId($topic->getId()); - print "\n\t\t\tgetStringFromOsidId($topic->getId())."\" href=\"".$this->pathAsAbsoluteUrl($this->url($topicParams))."\">"; - print $this->escape($topic->getDisplayName()); - print " "; -} - -$topicType = new phpkit_type_URNInetType("urn:inet:middlebury.edu:genera:topic.level"); -$topicTypeString = $this->getStringFromOsidType($topicType); -$topics = $this->filterTopicsByType($allTopics, $topicType); -foreach ($topics as $topic) { - $topicParams['topic'] = $this->getStringFromOsidId($topic->getId()); - print "\n\t\t\tgetStringFromOsidId($topic->getId())."\" href=\"".$this->pathAsAbsoluteUrl($this->url($topicParams))."\">"; - print $this->escape($topic->getDisplayName()); - print " "; -} - -$topicType = new phpkit_type_URNInetType("urn:inet:middlebury.edu:genera:topic.block"); -$topicTypeString = $this->getStringFromOsidType($topicType); -$topics = $this->filterTopicsByType($allTopics, $topicType); -foreach ($topics as $topic) { - $topicParams['topic'] = $this->getStringFromOsidId($topic->getId()); - print "\n\t\t\tgetStringFromOsidId($topic->getId())."\" href=\"".$this->pathAsAbsoluteUrl($this->url($topicParams))."\">"; - print $this->escape($topic->getDisplayName()); - print " "; -} - - -$instructorsType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:record:instructors'); -if ($section->hasRecordType($instructorsType)) { - $instructorsRecord = $section->getCourseOfferingRecord($instructorsType); - $instructors = $instructorsRecord->getInstructors(); - while ($instructors->hasNext()) { - $instructor = $instructors->getNextResource(); - $resourceParams['resource'] = $this->getStringFromOsidId($instructor->getId()); - print "\n\t\t\tgetStringFromOsidId($instructor->getId())."\" href=\"".$this->pathAsAbsoluteUrl($this->url($resourceParams))."\">"; - print $this->escape($instructor->getDisplayName()); - print " "; - } -} - -if ($section->hasLocation()) { - try { - $locationResource = $section->getLocation(); - $resourceParams['resource'] = $this->getStringFromOsidId($locationResource->getId()); - print "\n\t\t\tgetStringFromOsidId($locationResource->getId())."\" href=\"".$this->pathAsAbsoluteUrl($this->url($resourceParams))."\">"; - print $this->escape($locationResource->getDisplayName()); - print " "; -// if ($locationResource->getDescription()) -// print "(".$this->escape($locationResource->getDescription()).")"; -// print "\n\t\t

"; - } catch (osid_OperationFailedException $e) { - print "\n\t\t\t".$this->escape($section->getLocationInfo()).""; - } -} else if ($section->getLocationInfo()) { - print "\n\t\t\t".$this->escape($section->getLocationInfo()).""; -} -print "\n\t\t\thasRecordType($weeklyScheduleType)) { - $scheduleRecord = $section->getCourseOfferingRecord($weeklyScheduleType); - if ($scheduleRecord->hasMeetingStartDate()) { - print ' meeting_start_date="' . $scheduleRecord->getMeetingStartDate()->format('Y-m-d') . '"'; - } - if ($scheduleRecord->hasMeetingEndDate()) { - print ' meeting_end_date="' . $scheduleRecord->getMeetingEndDate()->format('Y-m-d') . '"'; - } -} -print ">".$this->escape($section->getScheduleInfo()).""; - -$properties = $section->getProperties(); -while ($properties->hasNext()) { - $property = $properties->getNextProperty(); - print "\n\t\t\t"; - print "\n\t\t\t\t".$property->getDisplayName().""; - print "\n\t\t\t\t".$property->getDisplayLabel().""; - print "\n\t\t\t\tgetDescription()."]]>"; - print "\n\t\t\t\tgetValue()."]]>"; - print "\n\t\t\t"; -} -?> - - - - - diff --git a/config/services.yaml b/config/services.yaml index 5262ce94..7e46208b 100644 --- a/config/services.yaml +++ b/config/services.yaml @@ -46,6 +46,10 @@ services: tags: - { name: 'twig.extension' } + App\Twig\DateRangeFormatter: + tags: + - { name: 'twig.extension' } + # Service aliases. osid.runtime: class: App\Service\Osid\Runtime diff --git a/src/Controller/Offerings.php b/src/Controller/Offerings.php index 2ed78ec4..eb20d4de 100755 --- a/src/Controller/Offerings.php +++ b/src/Controller/Offerings.php @@ -13,7 +13,7 @@ use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\Routing\Annotation\Route; - +use Symfony\Component\Routing\Generator\UrlGeneratorInterface; /** * A controller for working with courses. @@ -697,13 +697,22 @@ protected function viewBase($idString) $data['title'] = $offering->getDisplayName(); + $data['previousTerm'] = NULL; $data['term'] = $offering->getTerm(); + $data['nextTerm'] = NULL; + $data['terms'] = NULL; $data['location'] = NULL; if ($offering->hasLocation()) { $data['location'] = $offering->getLocation(); } + $data['weekly_schedule'] = NULL; + $weeklyScheduleType = new \phpkit_type_URNInetType('urn:inet:middlebury.edu:record:weekly_schedule'); + if ($offering->hasRecordType($weeklyScheduleType)) { + $data['weekly_schedule'] = $offering->getCourseOfferingRecord($weeklyScheduleType); + } + // Instructors $data['instructors'] = NULL; $instructorsType = new \phpkit_type_URNInetType('urn:inet:middlebury.edu:record:instructors'); @@ -717,9 +726,11 @@ protected function viewBase($idString) } // Alternates. + $data['is_primary'] = TRUE; $data['alternates'] = NULL; if ($offering->hasRecordType($this->getAlternateType())) { $record = $offering->getCourseOfferingRecord($this->getAlternateType()); + $data['is_primary'] = $record->isPrimary(); if ($record->hasAlternates()) { $data['alternates'] = []; $alternates = $record->getAlternates(); @@ -758,25 +769,19 @@ protected function viewBase($idString) return $data; } - /** - * Answer search results as an xml feed. - * - * @return void - * - * @since 10/21/09 - */ - public function viewxmlAction() + #[Route('/offerings/viewxml/{id}', name: 'view_offering_xml')] + public function viewxmlAction($id) { - $this->_helper->layout->disableLayout(); - $this->_helper->viewRenderer->setRender('searchxml'); - $this->getResponse()->setHeader('Content-Type', 'text/xml'); + $data = $this->viewBase($id); - $this->viewBase(); + $data['feedLink'] = $this->generateUrl('view_offering', ['id' => $id], UrlGeneratorInterface::ABSOLUTE_URL); - $this->view->feedTitle = $this->view->title; - $this->view->feedLink = $this->_helper->pathAsAbsoluteUrl('/offerings/view/'.$catalog.'/offering/'.$this->_getParam('offering')); - $this->view->sections = new \phpkit_course_ArrayCourseOfferingList([$this->view->offering]); - $this->postDispatch(); + + $data['sections'] = [$data['offering']]; + + $response = new Response($this->renderView('offerings/search.xml.twig', $data)); + $response->headers->set('Content-Type', 'text/xml; charset=utf-8'); + return $response; } protected function getAlternateType() { diff --git a/src/Service/Osid/IdMap.php b/src/Service/Osid/IdMap.php index c22f7007..2402e02d 100755 --- a/src/Service/Osid/IdMap.php +++ b/src/Service/Osid/IdMap.php @@ -50,4 +50,44 @@ public function toString(\osid_id_Id $id) return \phpkit_id_URNInetId::getInetURNString($id); } } + + /** + * Get and OSID Type object from a string. + * + * @param string $typeString + * + * @return osid_type_Type + * + * @since 4/21/09 + */ + public function typeFromString($typeString) + { + try { + return new \phpkit_type_URNInetType($typeString); + } catch (\osid_InvalidArgumentException $e) { + if ($this->getIdAuthorityToShorten()) { + return new \phpkit_type_Type($this->getIdAuthorityToShorten(), 'urn', $typeString); + } else { + throw $e; + } + } + } + + /** + * Answer a string representation of an OSID type object. + * + * @return string + * + * @since 4/21/09 + */ + public function typeToString(\osid_type_Type $type) + { + if ($this->getIdAuthorityToShorten() + && 'urn' == strtolower($type->getIdentifierNamespace()) + && strtolower($type->getAuthority()) == $this->getIdAuthorityToShorten()) { + return $type->getIdentifier(); + } else { + return \phpkit_type_URNInetType::getInetURNString($type); + } + } } diff --git a/src/Twig/DateRangeFormatter.php b/src/Twig/DateRangeFormatter.php new file mode 100644 index 00000000..eb0b8f74 --- /dev/null +++ b/src/Twig/DateRangeFormatter.php @@ -0,0 +1,24 @@ +format('U') - $start->format('U'))/60/60/24/7); + } +} diff --git a/src/Twig/OsidIdExtension.php b/src/Twig/OsidIdExtension.php index 230f28f7..0b9bcb69 100644 --- a/src/Twig/OsidIdExtension.php +++ b/src/Twig/OsidIdExtension.php @@ -30,6 +30,7 @@ public function getFunctions(): array { return [ new TwigFunction('osidIdToString', [$this, 'osidIdToString']), + new TwigFunction('osidTypeToString', [$this, 'osidTypeToString']), ]; } @@ -37,4 +38,9 @@ public function osidIdToString(\osid_id_Id $id): string { return $this->idMap->toString($id); } + + public function osidTypeToString(\osid_type_Type $type): string + { + return $this->idMap->typeToString($type); + } } diff --git a/templates/offerings/search.xml.twig b/templates/offerings/search.xml.twig new file mode 100755 index 00000000..4ea4987c --- /dev/null +++ b/templates/offerings/search.xml.twig @@ -0,0 +1,83 @@ + + + + {{ title }} + {{ feedLink }} + + {{ 'now' | date('r') }} + Course Catalog + http://blogs.law.harvard.edu/tech/rss + {% if previousTerm %}{{ include('partials/term.xml.twig', {term: previousTerm, key: 'previous_term'}) }}{% endif %} + {% if term %}{{ include('partials/term.xml.twig', {term: term, key: 'chosen_term'}) }}{% endif %} + {% if nextTerm %}{{ include('partials/term.xml.twig', {term: nextTerm, key: 'next_term'}) }}{% endif %} +{% if terms %} + + {% for t in terms %} + {{ include('partials/term.xml.twig', {term: t, key: 'term'}) }} + {% endfor %} + +{% endif %} + +{% for section in sections %} + + {{ section.displayname }} + {{ url('view_offering', {'id': osidIdToString(section.id)}) }} + + {{ section.title }} + {{ osidIdToString(section.id) }} + {%~ if is_primary is not null %} + {{ is_primary ? 'true':'false' }} + {% endif ~%} +{%- if alternates is not empty %} +{%- for alternate in alternates %} + {{ alternate.displayname }} +{% endfor ~%} +{% endif %} + {{ offering.genustype.displayname }} + {{ include('partials/term.xml.twig', {term: section.term, key: 'term'}) }} + +{%- for topic in subjectTopics %} + {{ topic.displayname }} +{% endfor %} +{%- for topic in departmentTopics %} + {{ topic.displayname }} +{% endfor %} +{%- for topic in divisionTopics %} + {{ topic.displayname }} +{% endfor %} +{%- for topic in requirementTopics %} + {{ topic.displayname }} +{% endfor %} +{%- if blockTopics is not empty %} + {%- for topic in blockTopics %} + {{ topic.displayname }} + {% endfor %} +{% endif %} +{%- if levelTopics is not empty %} + {%- for topic in levelTopics %} + {{ topic.displayname }} + {% endfor ~%} +{% endif %} +{%- if instructors is not null %} + {%- for instructor in instructors %} + {{ instructor.displayname }} + {% endfor %} +{% endif %} +{%- if location %} + {{ location.displayname }} +{% elseif offering.locationinfo %} + {{ offering.locationinfo }} +{% endif %} + {{ offering.scheduleinfo|raw }} +{% for property in properties %} + + {{ property.displayname }} + {{ property.displaylabel}} + + + +{% endfor %} +{% endfor %} + + + diff --git a/templates/partials/term.xml.twig b/templates/partials/term.xml.twig new file mode 100644 index 00000000..e3a771c7 --- /dev/null +++ b/templates/partials/term.xml.twig @@ -0,0 +1 @@ +{{ term.displayname }} From f2c7e69e40cefff568e19aabb19b4f631d923d75 Mon Sep 17 00:00:00 2001 From: Adam Franco Date: Thu, 3 Oct 2024 14:18:40 -0400 Subject: [PATCH 025/173] #47: Reorganize offering XML template code into a self-contained partial. --- src/Controller/Offerings.php | 54 +++++++++++++----------- templates/offerings/search.xml.twig | 62 +--------------------------- templates/offerings/view.html.twig | 24 +++++------ templates/partials/offering.xml.twig | 59 ++++++++++++++++++++++++++ 4 files changed, 103 insertions(+), 96 deletions(-) create mode 100644 templates/partials/offering.xml.twig diff --git a/src/Controller/Offerings.php b/src/Controller/Offerings.php index eb20d4de..c772e34f 100755 --- a/src/Controller/Offerings.php +++ b/src/Controller/Offerings.php @@ -662,23 +662,38 @@ public function search(string $catalog = NULL, $term = NULL) #[Route('/offerings/view/{id}', name: 'view_offering')] public function viewAction($id) { - $data = $this->viewBase($id); + $data = $this->getOfferingDataByIdString($id); // Bookmarked Courses and Schedules $data['bookmarks_CourseId'] = $data['offering']->getCourseId(); $data['menuIsOfferings'] = true; + // Set the selected Catalog Id. + $catalogSession = $this->osidRuntime->getCourseManager()->getCourseOfferingCatalogSession(); + $catalogIds = $catalogSession->getCatalogIdsByCourseOffering($data['offering']->getId()); + if ($catalogIds->hasNext()) { + $catalogId = $catalogIds->getNextId(); + $data['menuCatalogSelectedId'] = $catalogId; + $data['menuCatalogSelected'] = $this->osidRuntime->getCourseManager()->getCourseCatalogLookupSession()->getCourseCatalog($catalogId); + } + return $this->render('offerings/view.html.twig', $data); } - protected function viewBase($idString) + protected function getOfferingDataByIdString($idString) { - $data = []; $id = $this->osidIdMap->fromString($idString); $lookupSession = $this->osidRuntime->getCourseManager()->getCourseOfferingLookupSession(); $lookupSession->useFederatedCourseCatalogView(); - $offering = $data['offering'] = $lookupSession->getCourseOffering($id); + return $this->getOfferingData($lookupSession->getCourseOffering($id)); + } + + protected function getOfferingData(\osid_course_CourseOffering $offering) { + $id = $offering->getId(); + + // Templates can access basic getter methods on the offering itself. + $data = ['offering' => $offering]; // Load the topics into our view $data = array_merge( @@ -686,22 +701,6 @@ protected function viewBase($idString) $this->osidTopicHelper->asTypedArray($offering->getTopics()) ); - // Set the selected Catalog Id. - $catalogSession = $this->osidRuntime->getCourseManager()->getCourseOfferingCatalogSession(); - $catalogIds = $catalogSession->getCatalogIdsByCourseOffering($id); - if ($catalogIds->hasNext()) { - $catalogId = $catalogIds->getNextId(); - $data['menuCatalogSelectedId'] = $catalogId; - $data['menuCatalogSelected'] = $this->osidRuntime->getCourseManager()->getCourseCatalogLookupSession()->getCourseCatalog($catalogId); - } - - $data['title'] = $offering->getDisplayName(); - - $data['previousTerm'] = NULL; - $data['term'] = $offering->getTerm(); - $data['nextTerm'] = NULL; - $data['terms'] = NULL; - $data['location'] = NULL; if ($offering->hasLocation()) { $data['location'] = $offering->getLocation(); @@ -759,7 +758,9 @@ protected function viewBase($idString) $data['properties'][] = $properties->getNextProperty(); } - // Other offerings + // Other offerings. + $lookupSession = $this->osidRuntime->getCourseManager()->getCourseOfferingLookupSession(); + $lookupSession->useFederatedCourseCatalogView(); $data['offeringsTitle'] = 'All Sections'; $data['offerings'] = $lookupSession->getCourseOfferingsByTermForCourse( $offering->getTermId(), @@ -772,12 +773,17 @@ protected function viewBase($idString) #[Route('/offerings/viewxml/{id}', name: 'view_offering_xml')] public function viewxmlAction($id) { - $data = $this->viewBase($id); + $data = []; + $data['offerings'] = [$this->getOfferingDataByIdString($id)]; + $offering = $data['offerings'][0]['offering']; + $data['title'] = $offering->getDisplayName(); $data['feedLink'] = $this->generateUrl('view_offering', ['id' => $id], UrlGeneratorInterface::ABSOLUTE_URL); - - $data['sections'] = [$data['offering']]; + $data['previousTerm'] = NULL; + $data['term'] = $offering->getTerm(); + $data['nextTerm'] = NULL; + $data['terms'] = NULL; $response = new Response($this->renderView('offerings/search.xml.twig', $data)); $response->headers->set('Content-Type', 'text/xml; charset=utf-8'); diff --git a/templates/offerings/search.xml.twig b/templates/offerings/search.xml.twig index 4ea4987c..4dc74c5f 100755 --- a/templates/offerings/search.xml.twig +++ b/templates/offerings/search.xml.twig @@ -18,66 +18,8 @@ {% endif %} -{% for section in sections %} - - {{ section.displayname }} - {{ url('view_offering', {'id': osidIdToString(section.id)}) }} - - {{ section.title }} - {{ osidIdToString(section.id) }} - {%~ if is_primary is not null %} - {{ is_primary ? 'true':'false' }} - {% endif ~%} -{%- if alternates is not empty %} -{%- for alternate in alternates %} - {{ alternate.displayname }} -{% endfor ~%} -{% endif %} - {{ offering.genustype.displayname }} - {{ include('partials/term.xml.twig', {term: section.term, key: 'term'}) }} - -{%- for topic in subjectTopics %} - {{ topic.displayname }} -{% endfor %} -{%- for topic in departmentTopics %} - {{ topic.displayname }} -{% endfor %} -{%- for topic in divisionTopics %} - {{ topic.displayname }} -{% endfor %} -{%- for topic in requirementTopics %} - {{ topic.displayname }} -{% endfor %} -{%- if blockTopics is not empty %} - {%- for topic in blockTopics %} - {{ topic.displayname }} - {% endfor %} -{% endif %} -{%- if levelTopics is not empty %} - {%- for topic in levelTopics %} - {{ topic.displayname }} - {% endfor ~%} -{% endif %} -{%- if instructors is not null %} - {%- for instructor in instructors %} - {{ instructor.displayname }} - {% endfor %} -{% endif %} -{%- if location %} - {{ location.displayname }} -{% elseif offering.locationinfo %} - {{ offering.locationinfo }} -{% endif %} - {{ offering.scheduleinfo|raw }} -{% for property in properties %} - - {{ property.displayname }} - {{ property.displaylabel}} - - - -{% endfor %} +{% for offering in offerings %} +{{ include('partials/offering.xml.twig', offering, with_context = false) }} {% endfor %} - diff --git a/templates/offerings/view.html.twig b/templates/offerings/view.html.twig index 502b2c01..235b10ca 100755 --- a/templates/offerings/view.html.twig +++ b/templates/offerings/view.html.twig @@ -8,12 +8,12 @@ print $this->render('schedules/bookmark_control.phtml');