-
Notifications
You must be signed in to change notification settings - Fork 84
[WIP] Add additional structure and comments to create more of a skeleton #14
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
Sample, skeleton module for use with the ZF2 MVC layer. | ||
Sample skeleton module for use with the ZF2 MVC layer. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
|
||
Data Directory | ||
================= | ||
|
||
Sql files for your module can be placed here with a filename: "name.dbtype.sql" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 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. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 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. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd argue that we should not necessarily promote putting anything in here that would be written to at runtime. |
||
|
||
name: The name can be anything. It's suggested you use the name 'schema' for sql files | ||
which create compulsory sql, and any other name for optional sql code. | ||
|
||
dbtype: This denotes what engine the sql code is for: | ||
sqlite | ||
mysql | ||
postgresql | ||
sqlserver | ||
sql92 | ||
|
||
Examples | ||
--------- | ||
|
||
* schema.mysql.sql compulsory sql code that the modules needs to run | ||
|
||
* featurefoo.sqlite.sql optional sql code for sqlite which the module can use to add extra feature/s |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|
||
Public | ||
======== | ||
|
||
This directory is for the benefit of the users of your module. Place files you need for public web access | ||
inside here with the structure you need. Users can either symlink / copy files as necessary. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
|
||
CSS Files | ||
========== | ||
|
||
Place CSS files here |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
|
||
js | ||
==== | ||
|
||
Place javascript files in here |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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().
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note to self, this should be changed to $mm->loadModule
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also look at your indentation @ line 54