Class not Found for namespace - attempting to override core
Permalink
I would like to override the default sharing icons.
I'm getting the following error message
The file is located at
I'm attempting to call this from a controller
I've had some help over at this threadhttp://www.concrete5.org/community/forums/5-7-discussion/helpers/... but I'm still struggling to get this working and can not see what I am doing incorrectly.
Can anybody help with this?
I'm getting the following error message
Class 'Application\Src\Sharing\ShareThisPage\Service' not found
The file is located at
{root}/application/Src/Sharing/ShareThisPage/Service.php
//namespace namespace Application\Src\Sharing\ShareThisPage; use Concrete\Core\Sharing\SocialNetwork\Service as SocialNetworkService; use Config; class Service extends SocialNetworkService { //Code stuff }
I'm attempting to call this from a controller
namespace Application\Block\ShareThisPage; use Application\Src\Sharing\ShareThisPage\ServiceList; //Works use Application\Src\Sharing\ShareThisPage\Service; //Does not work, and returns the error //use Concrete\Core\Sharing\ShareThisPage\Service; //Works use Concrete\Block\ShareThisPage\Controller as BlockController; class Controller extends BlockController { //More code }
I've had some help over at this threadhttp://www.concrete5.org/community/forums/5-7-discussion/helpers/... but I'm still struggling to get this working and can not see what I am doing incorrectly.
Can anybody help with this?
`Src` and `src` but my IDE was treating it as a single directory therefore files in /src/ where placed in /Src/ there was a mixture of where the files had being placed, thus some classes working whilst others did not.
Tracing through the ClassLoader I noticed that DIRNAME_CLASSES is set as 'src' so checked my local and trying to rename it noticed an exception with a folder already existing error. Checked the finder and notice that two folders exist, moved the files over to the `src` folder deleted the `Src` version and tried again and voila.
TLDR: check the case
Src != src