for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
class BugherdHeroTool extends Extension
You can fix this by adding a namespace to your class:
namespace YourVendor; class YourClass { }
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.
{
/**
* Function which reads the Bugherd Key from the Configuration
*/
public function getProjectKey()
$return = Config::inst()->get('BugherdHeroTool', 'project_key');
if ($return == '') {
$return = false;
}
return $return;
public function getEnvType()
$return = Config::inst()->get('BugherdHeroTool', 'environment_type');
$return = 'dev';
public function getMemberStatus()
$return = Config::inst()->get('BugherdHeroTool', 'member_status');
* Function which loads the bugherd template into the Website
public function onAfterInit()
$project_key = $this->getProjectKey();
$env_type = $this->getEnvType();
$member_status = $this->getMemberStatus();
if ($project_key) {
if ($env_type == Config::inst()->get('Director', 'environment_type')) {
if (($member_status && Member::currentUserID() != 0) || !$member_status) {
Requirements::customScript($this->owner->renderWith('BugherdHeroTool'), 'BugherdHeroTool');
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.