[WIP] Add additional structure and comments to create more of a skeleton #14

Closed
wants to merge 1 commit into
from

Projects

None yet

5 participants

arse commented Aug 3, 2012
  • Added data directory with suggestion of filenames
  • Added public directory with readme.md and js and css sub-dirs.
  • Added few more comments to ease the burden of the initially frightening config file
  • Added description to module class file
tr added data, public directories with readme.md and added few more comm…
…ents to ease the burden of the initially frightening config file, and description to module class file
4d21c93
@weierophinney weierophinney commented on the diff Aug 3, 2012
Module.php
$moduleRouteListener = new ModuleRouteListener();
$moduleRouteListener->attach($eventManager);
}
+
+/*
+ public function init($moduleManager)
+ {
+ // Any module dependencies your module relies on could be placed here
+ // load will throw an exception if the module can't be loaded
+ // $moduleManager->load('someModule');
+
+ }
+*/
weierophinney
weierophinney Aug 3, 2012 Owner

I wouldn't add this. onBootstrap is more likely to be utilized at this point, and we don't want to encourage using init() as it will get triggered for every page.

EvanDotPro
EvanDotPro Aug 3, 2012 Member

@weierophinney, Well, for the specific feature that he has commented out here, init() would be the proper place to do it (bootstrap is too late for this to work properly). That said, we really just need to document it in the docs, where we can appropriately add more warnings about the potential performance pitfalls of doing stuff in init().

arse
arse Aug 7, 2012

note to self, this should be changed to $mm->loadModule

RWOverdijk
RWOverdijk Aug 8, 2012

Also look at your indentation @ line 54

@weierophinney weierophinney commented on the diff Aug 3, 2012
data/README.md
@@ -0,0 +1,22 @@
+
+Data Directory
+=================
+
+Sql files for your module can be placed here with a filename: "name.dbtype.sql"
weierophinney
weierophinney Aug 3, 2012 Owner

More than just sql files -- you might want to put default keys, sqlite databases, and more in this directory -- it's data the module may need to consume, but not necessarily restricted to databases.

arse
arse Aug 7, 2012

also need to add when using sqlite, directory needs to be writable so journal files can be created by sqlite else a cryptic message is created.

EvanDotPro
EvanDotPro Aug 10, 2012 Member

I'd argue that we should not necessarily promote putting anything in here that would be written to at runtime.

Member
Maks3w commented Jan 18, 2013

Closed due inactivity

@Maks3w Maks3w closed this Jan 18, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment