Skip to main content

Timeline for xautoload classes in subfolders

Current License: CC BY-SA 3.0

14 events
when toggle format what by license comment
Feb 13, 2019 at 10:07 history edited avpaderno
edited tags
Apr 4, 2014 at 16:59 comment added yeahman Fatal error: Class 'Drupal\myentity\subfolder\InsertQuery' not found in \includes\database\mysql\query.inc on line 14 i am getting that error whenever I call my class.. it's like other classes are trying to resolve to a namespace...
Apr 2, 2014 at 18:36 comment added yeahman thx! will check this out. another question.. i want to extend my class from a class of another namespace namespace Drupal\mymodule\classes; class People extends \Drupal\mymodule\MyEntity { } I am getting an error that it cannot find \Drupal\mymodule\MyEntity edit: never mind i think i got some naming wrong
Mar 31, 2014 at 22:59 history tweeted twitter.com/#!/StackDrupal/status/450769460803432448
Mar 31, 2014 at 19:11 comment added donquixote Don't get confused by the module name being "nestedbox_core" instead of just "nestedbox". This is some paranoia on my side..
Mar 31, 2014 at 19:10 comment added donquixote Btw this thing is quite close to your use case I think .. github.com/donquixote/drupal-nestedbox uses PSR-4 instead of PSR-0 but still..
Mar 31, 2014 at 18:39 comment added yeahman hehe glad I was somehow "useful" haha
Mar 31, 2014 at 18:36 comment added donquixote This code features so many different mistakes that it would be a good candidate for a "troubleshooting" link for the xautoload module :)
Mar 31, 2014 at 18:31 vote accept yeahman
Mar 31, 2014 at 18:05 comment added donquixote drupal.org/node/2229605 is this you?
Mar 31, 2014 at 18:03 comment added donquixote Yes, it uses PSR-0 (and optionally PSR-4).
Mar 31, 2014 at 18:00 answer added donquixote timeline score: 2
Mar 31, 2014 at 17:59 comment added Steven I may be wrong as I don't know what xautoload does, but composer is PSR which means it autoloads based upon class name -> path. So if you call is Drupal\myentity\class\MyEntity it will autoload sites\all\modules\Drupal\myentity\class\MyEntity.php I believe you can tell it to look in a different folder, but the same sort of "structure" will apply.
Mar 31, 2014 at 17:56 history asked yeahman CC BY-SA 3.0