### Install Project Dependencies Source: https://github.com/collectiveaccess/providence/blob/master/assets/universalviewer/README.md Install Node.js and Bower dependencies for the Universal Viewer project after cloning the repository. ```bash npm install bower install ``` -------------------------------- ### Install Universal Viewer via Bower Source: https://github.com/collectiveaccess/providence/blob/master/assets/universalviewer/README.md Install the Universal Viewer using Bower, a package manager for the web. ```bash bower install uv ``` -------------------------------- ### Install Composer Source: https://github.com/collectiveaccess/providence/blob/master/support/scripts/install_composer.sh.txt Installs Composer to the COMPOSER_HOME directory and then removes the installer script. The exit code of the Composer installation is preserved. ```shell export COMPOSER_HOME=$COLLECTIVEACCESS_HOME/app/tmp php $COLLECTIVEACCESS_HOME/app/tmp/composer-setup.php -q --install-dir $COMPOSER_HOME RESULT=$? rm $COLLECTIVEACCESS_HOME/app/tmp/composer-setup.php exit $RESULT ``` -------------------------------- ### Serve Examples Source: https://github.com/collectiveaccess/providence/blob/master/assets/universalviewer/README.md Run a local development server to view the Universal Viewer examples. This command is useful for testing and development. ```bash grunt serve ``` -------------------------------- ### Install Distribution via Bower Source: https://github.com/collectiveaccess/providence/blob/master/assets/universalviewer/README.md Install the distribution version of the Universal Viewer directly into your project's bower_components folder. ```bash bower install uv --save ``` -------------------------------- ### Install Development Dependencies Source: https://github.com/collectiveaccess/providence/blob/master/app/lib/Parsers/hoa/consistency/README.md Before running tests, install the necessary development dependencies using Composer. ```sh $ composer install ``` -------------------------------- ### Install Development Dependencies Source: https://github.com/collectiveaccess/providence/blob/master/app/lib/Parsers/hoa/compiler/README.md Install development dependencies required for running test suites. ```sh composer install ``` -------------------------------- ### Install Universal Viewer via npm Source: https://github.com/collectiveaccess/providence/blob/master/assets/universalviewer/README.md Install the Universal Viewer using npm. This is a common package manager for Node.js projects. ```bash npm install universalviewer ``` -------------------------------- ### Download Composer Installer Source: https://github.com/collectiveaccess/providence/blob/master/support/scripts/install_composer.sh.txt Downloads the Composer installer script to the temporary directory specified by COLLECTIVEACCESS_HOME. ```shell export COMPOSER_SETUP=/composer-setup.php export COMPOSER_SETUP_PATH=$COLLECTIVEACCESS_HOME/app/tmp$COMPOSER_SETUP php -r "copy('https://getcomposer.org/installer', '$COMPOSER_SETUP_PATH');" ``` -------------------------------- ### Install Grunt CLI Source: https://github.com/collectiveaccess/providence/blob/master/assets/universalviewer/README.md Install the Grunt command line interface globally. Grunt is used for automating build tasks. ```bash npm install -g grunt-cli ``` -------------------------------- ### Install Composer Dependencies Source: https://github.com/collectiveaccess/providence/blob/master/README.md Install all required third-party software libraries for Providence using Composer. Ensure Composer is installed on your server first. ```bash composer.phar install ``` -------------------------------- ### Verify Composer Installer Signature Source: https://github.com/collectiveaccess/providence/blob/master/support/scripts/install_composer.sh.txt Calculates the SHA384 hash of the downloaded installer and compares it with the expected signature to ensure integrity. ```shell ACTUAL_SIGNATURE=$(php -r "echo hash_file('SHA384', '$COMPOSER_SETUP_PATH');") if [ "$EXPECTED_SIGNATURE" != "$ACTUAL_SIGNATURE" ] then >&2 echo 'ERROR: Invalid installer signature' rm composer-setup.php exit 1 fi ``` -------------------------------- ### Generating Documentation Locally Source: https://github.com/collectiveaccess/providence/blob/master/app/lib/Parsers/hoa/exception/README.md Commands to install the necessary development tools and generate the documentation for the Hoa\Exception library locally. ```sh $ composer require --dev hoa/devtools $ vendor/bin/hoa devtools:documentation --open ``` -------------------------------- ### Instantiate BasicFile Stream Source: https://github.com/collectiveaccess/providence/blob/master/app/lib/Parsers/hoa/stream/README.md Create an instance of the BasicFile stream. This example shows the basic instantiation without any specific context. ```php $file = new BasicFile('/path/to/file'); ``` -------------------------------- ### Install Dependencies and Build Leaflet.MarkerCluster Source: https://github.com/collectiveaccess/providence/blob/master/assets/leaflet/markercluster/CONTRIBUTING.md Installs necessary dependencies using npm and then builds the project. The output will be located in the dist/ directory. ```bash npm install -g jake npm install jake ``` -------------------------------- ### Run Test Suites Source: https://github.com/collectiveaccess/providence/blob/master/app/lib/Parsers/hoa/event/README.md Install development dependencies and run all test suites for the Hoa Event library. ```sh $ composer install $ vendor/bin/hoa test:run ``` -------------------------------- ### Generate Documentation Locally Source: https://github.com/collectiveaccess/providence/blob/master/app/lib/Parsers/hoa/event/README.md Installs the hoa/devtools package and generates local documentation for the Hoa Event library, opening it automatically. ```sh $ composer require --dev hoa/devtools $ vendor/bin/hoa devtools:documentation --open ``` -------------------------------- ### Run Hoa Math Test Suites Source: https://github.com/collectiveaccess/providence/blob/master/app/lib/Parsers/hoa/math/README.md Install development dependencies and run all test suites for the hoa/math library. ```sh $ composer install $ vendor/bin/hoa test:run ``` -------------------------------- ### Default Settings Source: https://github.com/collectiveaccess/providence/blob/master/assets/jquery/circular-slider/README.md Provides an example of initializing the Circular Slider with all default properties. ```APIDOC ## Default Settings ### Description This example demonstrates how to initialize the Circular Slider with its default configuration values. ### Example ```javascript var slider = $('#slider').CircularSlider({ radius: 75, innerCircleRatio: '0.5', handleDist: 100, min: 0, max: 359, value: 0, clockwise: true, labelSuffix: "", labelPrefix: "", shape: "Circle", touch: true, animate: true, animateDuration : 360, selectable: false, slide: function(ui, value) { /* custom slide logic */ }, formLabel: undefined }); ``` ``` -------------------------------- ### Install Bower Source: https://github.com/collectiveaccess/providence/blob/master/assets/universalviewer/README.md Install Bower globally. Bower is a package manager for the web, used here for front-end dependencies. ```bash npm install -g bower ``` -------------------------------- ### Install Hoa Protocol with Composer Source: https://github.com/collectiveaccess/providence/blob/master/app/lib/Parsers/hoa/protocol/README.md Use Composer to add the hoa/protocol library to your project dependencies. ```sh $ composer require hoa/protocol '~1.0' ``` -------------------------------- ### Install Hoa Visitor with Composer Source: https://github.com/collectiveaccess/providence/blob/master/app/lib/Parsers/hoa/visitor/README.md Use Composer to add the hoa/visitor library to your project dependencies. Ensure you are using a compatible version. ```sh $ composer require hoa/visitor '~2.0' ``` -------------------------------- ### Install Hoa\Regex with Composer Source: https://github.com/collectiveaccess/providence/blob/master/app/lib/Parsers/hoa/regex/README.md Use Composer to add the hoa/regex library to your project dependencies. ```sh $ composer require hoa/regex '~1.0' ``` -------------------------------- ### Install Hoa Math with Composer Source: https://github.com/collectiveaccess/providence/blob/master/app/lib/Parsers/hoa/math/README.md Use Composer to add the hoa/math library to your project dependencies. ```sh $ composer require hoa/math '~1.0' ``` -------------------------------- ### Install Hoa Compiler with Composer Source: https://github.com/collectiveaccess/providence/blob/master/app/lib/Parsers/hoa/compiler/README.md Use Composer to add the hoa/compiler library to your project dependencies. ```sh composer require hoa/compiler '~3.0' ``` -------------------------------- ### Install Hoa\Zformat with Composer Source: https://github.com/collectiveaccess/providence/blob/master/app/lib/Parsers/hoa/zformat/README.md Use Composer to add the hoa/zformat library to your project dependencies. Ensure you are using the correct version constraint. ```sh $ composer require hoa/zformat '~1.0' ``` -------------------------------- ### Install Hoa Event with Composer Source: https://github.com/collectiveaccess/providence/blob/master/app/lib/Parsers/hoa/event/README.md Use Composer to add the hoa/event library to your project dependencies. ```sh $ composer require hoa/event '~1.0' ``` -------------------------------- ### Sync Project Files Source: https://github.com/collectiveaccess/providence/blob/master/assets/universalviewer/README.md Run the grunt sync task. This task is part of the initial setup to synchronize project files. ```bash grunt sync ``` -------------------------------- ### Run Hoa Exception Test Suites Source: https://github.com/collectiveaccess/providence/blob/master/app/lib/Parsers/hoa/exception/README.md Install development dependencies and run all test suites for the Hoa Exception library. ```sh composer install vendor/bin/hoa test:run ``` -------------------------------- ### Install Hoa Stream with Composer Source: https://github.com/collectiveaccess/providence/blob/master/app/lib/Parsers/hoa/stream/README.md To include this library in your project dependencies, use the composer require command. ```sh composer require hoa/stream '~1.0' ``` -------------------------------- ### Install Hoa\Consistency with Composer Source: https://github.com/collectiveaccess/providence/blob/master/app/lib/Parsers/hoa/consistency/README.md Use Composer to add the hoa/consistency library to your project dependencies. This command ensures you are using a compatible version. ```sh $ composer require hoa/consistency '~1.0' ``` -------------------------------- ### Limit Iterator Output with Hoa\Iterator\Limit Source: https://github.com/collectiveaccess/providence/blob/master/app/lib/Parsers/hoa/iterator/README.md Iterate a specific number of elements from an iterator starting at a given offset using Hoa\Iterator\Limit. This example retrieves three elements starting from the second element. ```php $foobar = new Hoa\Iterator\Map(['f', 'o', 'o', 'b', 'a', 'r']); $limit = new Hoa\Iterator\Limit($foobar, 2, 3); foreach ($limit as $value) { echo $value; } /** * Will output: * oba */ ``` -------------------------------- ### Build Distribution Version Source: https://github.com/collectiveaccess/providence/blob/master/assets/universalviewer/README.md Compile and compress the Universal Viewer into a distribution-ready format. This creates versioned folders and zip/tar files in the /dist directory. ```bash grunt build ``` -------------------------------- ### PP Language Token Unification Example Source: https://github.com/collectiveaccess/providence/blob/master/app/lib/Parsers/hoa/compiler/README.md Demonstrates token unification using indexed tokens (e.g., quote[0]) to enforce that multiple instances of the same token within a rule must have identical values. ```pp %token quote "|' %token handle \w+ string: ::quote:: ::quote:: ``` ```pp string: ::quote[0]:: ::quote[0]:: ``` -------------------------------- ### Initialize Hoa\Ustring Objects Source: https://github.com/collectiveaccess/providence/blob/master/app/lib/Parsers/hoa/ustring/README.md Demonstrates how to create Hoa\Ustring objects from different UTF-8 strings. ```php $french = new Hoa\Ustring\Ustring('Je t\'aime'); $arabic = new Hoa\Ustring\Ustring('أحبك'); $japanese = new Hoa\Ustring\Ustring('私はあなたを愛して'); ``` -------------------------------- ### Download Composer Installer Signature Source: https://github.com/collectiveaccess/providence/blob/master/support/scripts/install_composer.sh.txt Downloads the expected signature of the Composer installer using either curl or wget. This is used for verification. ```shell if command -v curl > /dev/null then EXPECTED_SIGNATURE=$(curl -s https://composer.github.io/installer.sig) else EXPECTED_SIGNATURE=$(wget -q -O - https://composer.github.io/installer.sig) fi ``` -------------------------------- ### GET Record by IDNO String Source: https://context7.com/collectiveaccess/providence/llms.txt Retrieve a record by its unique identifier string (IDNO) using a GET request to the item endpoint. An authToken is required. ```bash # --- GET a record by idno string --- curl -X GET \ -H "authToken: " \ "https://your-ca-instance.org/service.php/item/ca_objects/2023.001.1" ``` -------------------------------- ### Run Test Suites Source: https://github.com/collectiveaccess/providence/blob/master/app/lib/Parsers/hoa/compiler/README.md Execute all test suites using the provided vendor script. ```sh vendor/bin/hoa test:run ``` -------------------------------- ### Instantiate Stream with Context Source: https://github.com/collectiveaccess/providence/blob/master/app/lib/Parsers/hoa/stream/README.md Instantiate a stream, such as BasicFile, and associate it with a previously defined context ID. This ensures the stream uses the specified options and parameters. ```php $basicFile = new BasicFile('/path/to/file', $contextId); ``` -------------------------------- ### GET Full Item Summary Source: https://context7.com/collectiveaccess/providence/llms.txt Retrieve all fields for a record by sending a GET request to the item endpoint without a request body. An authToken is required. ```bash # --- GET a full item summary (all fields, no bundles body) --- curl -X GET \ -H "authToken: " \ "https://your-ca-instance.org/service.php/item/ca_objects/42" ``` -------------------------------- ### Authenticate and Get Session Token Source: https://context7.com/collectiveaccess/providence/llms.txt Obtain an authentication token by sending a GET request with username and password to the auth/login endpoint. This token is required for subsequent API calls. ```bash # --- Authenticate (get session key) --- curl -X GET \ "https://your-ca-instance.org/service.php/auth/login?username=admin&password=secret" ``` -------------------------------- ### Get Full System Statistics Source: https://context7.com/collectiveaccess/providence/llms.txt Retrieve comprehensive system statistics by making a GET request to the Statistics service. Authentication is required via an authToken header. The response is cached for one hour by default. ```bash # Get full system statistics curl -X GET \ -H "authToken: " \ "https://your-ca-instance.org/service.php/Statistics" ``` -------------------------------- ### Initialize and Log Messages in PHP Source: https://github.com/collectiveaccess/providence/blob/master/app/lib/Logging/KLogger/README.markdown Instantiate KLogger with a log directory and use its methods to log messages. Supports logging objects with a dump. ```php $log = new KLogger('/var/log/'); # Specify the log directory $log->logInfo('Returned a million search results'); //Prints to the log file $log->logFatal('Oh dear.'); //Prints to the log file $log->logInfo('Here is an object', $obj); //Prints to the log file with a dump of the object ``` -------------------------------- ### Install Hoa\Iterator with Composer Source: https://github.com/collectiveaccess/providence/blob/master/app/lib/Parsers/hoa/iterator/README.md Include the hoa/iterator library in your project dependencies using Composer. ```sh $ composer require hoa/iterator '~2.0' ``` -------------------------------- ### Generating Documentation Locally Source: https://github.com/collectiveaccess/providence/blob/master/app/lib/Parsers/hoa/iterator/README.md Commands to set up the development environment and generate local documentation for the Hoa library. Requires the hoa/devtools composer package. ```sh $ composer require --dev hoa/devtools $ vendor/bin/devtools:documentation --open ``` -------------------------------- ### BrowseEngine (PHP API — Faceted Browse) Source: https://context7.com/collectiveaccess/providence/llms.txt The BrowseEngine facilitates faceted browsing over primary tables. You can instantiate it, add criteria for facets, execute the browse, and then retrieve results or facet information. It supports resuming previous browse sessions. ```APIDOC ## BrowseEngine (PHP API — Faceted Browse) `BrowseEngine` implements faceted browsing over any primary table. Instantiate it with a subject table name, optionally pre-load an existing browse session by ID, add facet criteria, execute, and then paginate through results or load facet content. Facets are configured in `app/conf/browse.conf`. ### Method Signature `BrowseEngine(string $tableName, ?string $browseID = null)` `addCriteria(string $facetName, array $values)` `execute(array $options = [])` `getResults(): SearchResult` `getInfoForFacetsWithContent(): array` `getFacet(string $facetName): array` `getBrowseID(): string` ### Parameters - **BrowseEngine constructor**: - **tableName** (string) - The name of the primary table to browse (e.g., 'ca_objects'). - **browseID** (string, optional) - The ID of an existing browse session to resume. - **addCriteria**: - **facetName** (string) - The name of the facet to add criteria for. - **values** (array) - An array of values to filter the facet by. - **execute**: - **options** (array, optional) - An associative array of options: - **'checkAccess'** (array) - Array of access values to filter by. - **'sort'** (string) - Field to sort results by (e.g., 'ca_objects.idno'). - **'limit'** (int) - Maximum number of results to return. - **'start'** (int) - The starting offset for results. ### Request Example (PHP) ```php addCriteria('type_facet', [3, 7]); // Add another criteria: filter by an entity relationship facet $browse->addCriteria('entity_facet', [88]); // Execute the browse $browse->execute([ 'checkAccess' => [1, 2], 'sort' => 'ca_objects.idno', 'limit' => 20, 'start' => 0 ]); // Get result count $results = $browse->getResults(); echo "Browse returned " . $results->numHits() . " records\n"; while ($results->nextHit()) { echo $results->get('ca_objects.idno') . ": " . $results->get('ca_objects.preferred_labels') . "\n"; } // Get available facets with content for the current browse state $facets_with_content = $browse->getInfoForFacetsWithContent(); foreach ($facets_with_content as $facet_name => $facet_info) { echo "Facet: {$facet_name} ({$facet_info['label']})\n"; $facet = $browse->getFacet($facet_name); foreach ($facet as $item) { echo " [{$item['id']}] {$item['label']} ({$item['content_count']} records)\n"; } } // Resume a previous browse session by ID $browse_id = $browse->getBrowseID(); $resumed = new BrowseEngine('ca_objects', $browse_id); $resumed->execute(); ?> ``` ### Response - **SearchResult object** - Returned by `getResults()`, can be iterated to get browse records. - **array** - Returned by `getInfoForFacetsWithContent()` and `getFacet()`, containing information about available facets and their content. ``` -------------------------------- ### Perform Faceted Browse with BrowseEngine (PHP) Source: https://context7.com/collectiveaccess/providence/llms.txt Implements faceted browsing over any primary table. Instantiate with a subject table name, add facet criteria, execute, and paginate through results or load facet content. Facets are configured in app/conf/browse.conf. Use for resuming a previous browse session. ```php addCriteria('type_facet', [3, 7]); // Add another criteria: filter by an entity relationship facet $browse->addCriteria('entity_facet', [88]); // Execute the browse $browse->execute([ 'checkAccess' => [1, 2], 'sort' => 'ca_objects.idno', 'limit' => 20, 'start' => 0 ]); // Get result count $results = $browse->getResults(); echo "Browse returned " . $results->numHits() . " records\n"; while ($results->nextHit()) { echo $results->get('ca_objects.idno') . ": " . $results->get('ca_objects.preferred_labels') . "\n"; } // Get available facets with content for the current browse state $facets_with_content = $browse->getInfoForFacetsWithContent(); foreach ($facets_with_content as $facet_name => $facet_info) { echo "Facet: {$facet_name} ({$facet_info['label']})\n"; $facet = $browse->getFacet($facet_name); foreach ($facet as $item) { echo " [{$item['id']}] {$item['label']} ({$item['content_count']} records)\n"; } } // Resume a previous browse session by ID $browse_id = $browse->getBrowseID(); $resumed = new BrowseEngine('ca_objects', $browse_id); $resumed->execute(); ?> ``` -------------------------------- ### Install Hoa Exception with Composer Source: https://github.com/collectiveaccess/providence/blob/master/app/lib/Parsers/hoa/exception/README.md Use Composer to add the hoa/exception library to your project dependencies. ```sh composer require hoa/exception '~1.0' ``` -------------------------------- ### Import Media Files with caUtils CLI (Bash) Source: https://context7.com/collectiveaccess/providence/llms.txt Imports media files from a specified directory, with options for matching and logging. Use for batch importing associated media assets. ```bash # --- Import media files from a directory --- ./support/bin/caUtils import-media \ --source /media/incoming/scans/ \ --username importer_user \ --import-mode TRY_TO_MATCH \ --match-mode FILE_NAME \ --log /var/log/ca_import/ ``` -------------------------------- ### Clone Providence Repository Source: https://github.com/collectiveaccess/providence/blob/master/README.md Clone the Providence repository from GitHub to your desired location to begin installation. ```bash git clone https://github.com/collectiveaccess/providence ``` -------------------------------- ### Iterate with Hoa\Iterator\Map Source: https://github.com/collectiveaccess/providence/blob/master/app/lib/Parsers/hoa/iterator/README.md Use Hoa\Iterator\Map to iterate over an array. This example demonstrates iterating through characters of a string. ```php $foobar = new Hoa\Iterator\Map(['f', 'o', 'o', 'b', 'a', 'r']); foreach ($foobar as $value) { echo $value; } /** * Will output: * foobar */ ``` -------------------------------- ### Initialize Handsontable Instance Source: https://github.com/collectiveaccess/providence/blob/master/assets/handsontable/README.md Create a Handsontable instance by referencing an HTML container element and providing an optional data source. This sets up the basic grid functionality. ```html
``` ```javascript var data = [ ["", "Kia", "Nissan", "Toyota", "Honda"], ["2008", 10, 11, 12, 13], ["2009", 20, 11, 14, 13], ["2010", 30, 15, 12, 13] ]; var container = document.getElementById('example'); var hot = new Handsontable(container, { data: data }); ``` -------------------------------- ### Epiclock Countup Mode Source: https://github.com/collectiveaccess/providence/blob/master/app/widgets/clock/epiclock/epiclock.html Configure a countup timer that starts from one day before the page load. ```javascript $('#countup').epiclock({mode: $.epiclock.modes.countup, offset: {days: 1}}); ``` -------------------------------- ### Initialize FullCalendar with Default Events Source: https://github.com/collectiveaccess/providence/blob/master/assets/jquery/fullcalendar/demos/default.html Use this snippet to set up a basic FullCalendar instance. It configures the default date, enables editing, and populates the calendar with sample events. ```javascript $(document).ready(function() { $('#calendar').fullCalendar({ defaultDate: '2014-06-12', editable: true, events: [ { title: 'All Day Event', start: '2014-06-01' }, { title: 'Long Event', start: '2014-06-07', end: '2014-06-10' }, { id: 999, title: 'Repeating Event', start: '2014-06-09T16:00:00' }, { id: 999, title: 'Repeating Event', start: '2014-06-16T16:00:00' }, { title: 'Meeting', start: '2014-06-12T10:30:00', end: '2014-06-12T12:30:00' }, { title: 'Lunch', start: '2014-06-12T12:00:00' }, { title: 'Birthday Party', start: '2014-06-13T07:00:00' }, { title: 'Click for Google', url: 'http://google.com/', start: '2014-06-28' } ] }); }); ``` -------------------------------- ### Initialize FullCalendar with Basic Views Source: https://github.com/collectiveaccess/providence/blob/master/assets/jquery/fullcalendar/demos/basic-views.html Configures a FullCalendar instance with header controls for navigation and basic view options. Includes sample event data. ```javascript $(document).ready(function() { $('#calendar').fullCalendar({ header: { left: 'prev,next today', center: 'title', right: 'month,basicWeek,basicDay' }, defaultDate: '2014-06-12', editable: true, events: [ { title: 'All Day Event', start: '2014-06-01' }, { title: 'Long Event', start: '2014-06-07', end: '2014-06-10' }, { id: 999, title: 'Repeating Event', start: '2014-06-09T16:00:00' }, { id: 999, title: 'Repeating Event', start: '2014-06-16T16:00:00' }, { title: 'Meeting', start: '2014-06-12T10:30:00', end: '2014-06-12T12:30:00' }, { title: 'Lunch', start: '2014-06-12T12:00:00' }, { title: 'Birthday Party', start: '2014-06-13T07:00:00' }, { title: 'Click for Google', url: 'http://google.com/', start: '2014-06-28' } ] }); }); ``` -------------------------------- ### Get Length of UTF-8 Strings Source: https://github.com/collectiveaccess/providence/blob/master/app/lib/Parsers/hoa/ustring/README.md Calculates the number of characters in a UTF-8 string using the count function. ```php var_dump( count($french), // int(9) count($arabic), // int(4) count($japanese) // int(9) ); ``` -------------------------------- ### Creating and Nesting Exception Groups Source: https://github.com/collectiveaccess/providence/blob/master/app/lib/Parsers/hoa/exception/README.md Demonstrates how to create a group of exceptions and nest other groups within it. Use this when an exceptional behavior stems from multiple distinct causes. ```php // A group of exceptions. $group = new Hoa\Exception\Group('Failed because of several reasons.'); $group['first'] = new Hoa\Exception\Exception('First reason'); $group['second'] = new Hoa\Exception\Exception('Second reason'); // Can nest another group. $group['third'] = new Hoa\Exception\Group('Third reason'); $group['third']['fourth'] = new Hoa\Exception\Exception('Fourth reason'); echo $group->raise(true); /** * Will output: * {main}: (0) Failed because of several reasons. * in … at line …. * * Contains the following exceptions: * * • {main}: (0) First reason * in … at line …. * * • {main}: (0) Second reason * in … at line …. * * • {main}: (0) Third reason * in … at line …. * * Contains the following exceptions: * * • {main}: (0) Fourth reason * in … at line …. */ ``` -------------------------------- ### Basic Usage Source: https://github.com/collectiveaccess/providence/blob/master/assets/jquery/circular-slider/README.md Demonstrates the fundamental way to initialize the Circular Slider on an HTML element. ```APIDOC ## Basic Usage ### Description Initialize the Circular Slider on a div element. ### Method ```javascript $('#slider').CircularSlider(); ``` ### Parameters This method accepts an optional configuration object. See 'Properties' section for available options. ``` -------------------------------- ### Get Single Record by OAI Identifier Source: https://context7.com/collectiveaccess/providence/llms.txt Retrieve a specific record using its OAI identifier with the GetRecord verb. ```bash curl "https://your-ca-instance.org/service.php/OaiPmh?verb=GetRecord&metadataPrefix=oai_dc&identifier=oai:your-ca-instance.org:ca_objects:42" ``` -------------------------------- ### Initialize FullCalendar with Theming Source: https://github.com/collectiveaccess/providence/blob/master/assets/jquery/fullcalendar/demos/theme.html Use the 'theme: true' option to enable theming for FullCalendar. This requires a theme CSS file to be included in your project. ```javascript $(document).ready(function() { $('#calendar').fullCalendar({ theme: true, header: { left: 'prev,next today', center: 'title', right: 'month,agendaWeek,agendaDay' }, defaultDate: '2014-06-12', editable: true, events: [ { title: 'All Day Event', start: '2014-06-01' }, { title: 'Long Event', start: '2014-06-07', end: '2014-06-10' }, { id: 999, title: 'Repeating Event', start: '2014-06-09T16:00:00' }, { id: 999, title: 'Repeating Event', start: '2014-06-16T16:00:00' }, { title: 'Meeting', start: '2014-06-12T10:30:00', end: '2014-06-12T12:30:00' }, { title: 'Lunch', start: '2014-06-12T12:00:00' }, { title: 'Birthday Party', start: '2014-06-13T07:00:00' }, { title: 'Click for Google', url: 'http://google.com/', start: '2014-06-28' } ] }); }); ``` -------------------------------- ### Get Hoa Protocol Instance Source: https://github.com/collectiveaccess/providence/blob/master/app/lib/Parsers/hoa/protocol/README.md Retrieve the singleton instance of the Hoa Protocol manager to interact with the protocol tree. ```php echo Hoa\Protocol\Protocol::getInstance(); /** * Might output: * Application * Public * Data * Etc * Configuration * Locale * Lost+found * Temporary * Variable * Cache * Database * Log * Private * Run * Test * Library */ ```