Including a new custom class - Class Not Found issue
Permalink
Hi everyone! I'm very new to Concrete5 and I'm building my first theme. I'm trying to include a custom class that I have placed at \Application\Src\Derp\Derp.php. Here are its contents:
From my theme page, I am attempting to call my class like so:
I'm sure it's some kind of issue with namespacing or referencing the class' location, but after an hour of trying, I'm ready to ask for help! Thank you!
namespace Application\Src\Derp; use Concrete\Core\Database\Connection\Connection; class Derp { return 'Hello'; }
From my theme page, I am attempting to call my class like so:
use Application\Src\Derp; $derp = new Derp(); var_dump($derp);
I'm sure it's some kind of issue with namespacing or referencing the class' location, but after an hour of trying, I'm ready to ask for help! Thank you!
use Application\Src\Derp\Derp;