phaseDoneJS = array_pad($this->phaseDoneJS, 3, []); $this->ID = 'R'.++self::$count; $this->type = $type; $this->resourceURL = $resourceURL; } #=============================================================================== # Return the unique ID #=============================================================================== public function getID() { return $this->ID; } #=============================================================================== # Return the resource type #=============================================================================== public function getType() { return $this->type; } #=============================================================================== # Return the resource URL #=============================================================================== public function getURL() { return $this->resourceURL; } #=============================================================================== # Attach a PhaseDoneJS callback #=============================================================================== public function addPhaseDoneJS($phase, $callback) { return $this->phaseDoneJS[$phase][] = removeLineBreaksAndTabs($callback); } #=============================================================================== # Return all registered PhaseDoneJS callbacks #=============================================================================== public function getPhaseDoneJS() { return $this->phaseDoneJS; } } ?>