Skip to content
This repository has been archived by the owner on Aug 12, 2024. It is now read-only.

Develop

Nick Freear edited this page Aug 21, 2015 · 2 revisions

Code organization

What was a monolithic code-base has been split into several separate packages:

  • open-media-player – branch 2.x, CodeIgniter-based web application, containing CodeIgniter code (system directory), extensions to CI, controllers, models, views;
  • open-media-player-core – All base classes/interfaces (for Media Player themes, oEmbed providers, etc.), some third-party libraries, utility libraries (for example, Http); oEmbed provider library for OU-podcast;
  • open-media-player-themes – Media player themes – PHP + Javascript + CSS;
  • open-media-player-extend – Controller extensions – work in progress;
  • open-oembed-providers – Other oEmbed providers, including YouTube, Prezi, Google Docs, etc.

Items that have not yet been dis-aggregated from open-media-player:

Other code:

  • ou-media-player-test – Remote integration tests for Open Media Player, built on Node.js & Mocha;
  • mediaelement-demo – Tests and demonstrations for IET-OU enhancements and fixes to MediaElement.js;

PHP coding standards

  • As close as possible to PSR-2, with accomodations for CodeIgniter 2, including:
    • Underscores within PHP class names (ie. not camel-case);
    • Underscores within and at start of method names (not camel-case), eg. protected methods in controllers;
    • Controller classes do not use PHP namespaces, and their filenames start with a lower-case letter;
  • Compatibility with PHP 5.3, including:
    • Original short PHP array syntax (not the short array syntax of PHP 5.4);
    • Long <?php echo $x ?>, as opposed to <?= $x ?>;
  • Note, PHP 5.3 compatibility will be dropped (soon);
  • Tested via CodeSniffer, based on definition in phpcs.xml;
  • Use the .editorconfig file to help enforce this in your editor/IDE;
Clone this wiki locally