public static function addMarker()
 {
     $film = new Film(null, "a film", "http://www.cnn.com");
     $updatedFilm = FilmDAO::insert($film);
     $user = new User(null, "*****@*****.**", "john doe", User::hash("password"));
     $updatedUser = UserDAO::add($user);
     $markerType = MarkerTypeDAO::getByName('Event');
     UserDAO::addFilm($updatedUser->getUserId(), $updatedFilm->getId());
     $myVideos = UserDAO::getFilms($updatedUser->getUserId());
     var_dump($myVideos);
     $array = array("id" => NULL, "filmId" => $updatedFilm->getId(), "markerId" => $markerType->getId(), "start" => 0.5, "end" => 0.6, "text" => "this is stuff", "target" => "target", "userId" => $updatedUser->getUserId());
     $marker = new FilmMarker($array);
     $markerWithId = FilmMarkerDAO::insertMarker($marker);
     //var_dump($markerWithId);
     UserDAO::removeFilm($updatedUser->getUserId(), $updatedFilm->getId());
     FilmMarkerDAO::delete($markerWithId->getId());
     UserDAO::delete($updatedUser->getUserId());
     FilmDAO::delete($film->getId());
 }
<?php

include_once '../markerType.php';
header("content-type:application/json");
error_reporting(E_ALL | E_STRICT);
ini_set("display_errors", 2);
$postAction = filter_input(INPUT_POST, 'action');
if ($postAction == 'getForm') {
    $formTop = MarkerTypeDAO::getMarkerFormTopLevel();
    $formButton = MarkerTypeDAO::getMarkerFormButtons();
    $groupArray = [];
    $buttonArray = [];
    foreach ($formTop as $form) {
        $id = $form['id'];
        $name = $form['name'];
        $nameDashed = str_replace(' ', '-', $name);
        $lowerName = strtolower($nameDashed);
        $groupArray[$id] = $lowerName;
    }
    foreach ($formButton as $button) {
        $category = $button['category'];
        $categoryId = $button['category_id'];
        $markerId = $button['id'];
        $name = $button['name'];
        $description = $button['description'];
        $categoryDashed = str_replace(' ', '-', $category);
        $lowerCategory = strtolower($categoryDashed);
        $nameDashed = str_replace(' ', '-', $name);
        $lowerName = strtolower($nameDashed);
        if ($description != NULL) {
            $buttonHtml = '<li><button value="' . $markerId . '" id="' . $lowerCategory . '-color">' . $name . '</button></li>';
<?php

include_once '../marker.php';
$code = 21;
$name = 'Opening Credits Start';
$description = "When a film's opening credits begin";
$category = "credits";
$myMarkerType = new MarkerType($code, $name, $description, $category);
//$cat = $myMarkerType->getCat();
$insert = MarkerTypeDAO::insertMarkerType($myMarkerType);