Skip to content

Including in your project

Dylan Anderson edited this page May 24, 2016 · 3 revisions

Feedback can be included 3 ways - either by directly require()ing the class file, auto-loading it, or Composer.

require()

Since pretty much every page in your project could be capable of generating errors, it could make sense to simply require() the class file in your index.php or bootstrap.php file.

auto-load

How you auto-load determines how you would incorporate Feedback into your auto-load procedure. One common approach is to map namespaces to directories in your project. For this purpose, Feedback lives in the "\Component" namespace.

Composer

Add this to your composer.json file:

{
    "require": {
        "university-of-alberta/feedback": "*"
    }
}