Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Let's get documenting.
  • Today on twitter there was a request by the dev team to help documenting Fuel so they could hurry and finish up on other coding issues. I thought about documenting the DB class and maybe the the DBUtil class tonight. Anyone want to join by documenting something else?
  • I want to, but my english skills are too poor. (( Maybe I could help in some other way??
  • Saw the tweet, did you see my commits? ;)
  • Wow, you've been bussy! I made a pull request on fuel/fuel for the db docs. Have a look if you like :P
  • For a quick look the commit is here!
  • Harro Verton wrote on 2011-03-24:
    Saw the tweet, did you see my commits? ;)
    Ouch I was busy writing the docs for modules only to see you've already finished them. Perhaps you could merge the following:
      <h2>What is a module?</h2>
    
      <p>A module is a group of independent MVC elements. The use of modules allows for re-usability and encapsulation of your code. A module typically resides within an application sub-directory named <strong>modules</strong>. It is suggested to take advantage of modules whenever you're working on a large project, of which you believe it's code-base will be more than just a few lines of code. It will help you to keep things neatly in order.</p>
    
      <p class="note"><strong>Please Note:</strong> Do not confuse modules with packages, as these are two seperate entities. The main difference between modules and packages is that packages are an extension of the core of the Fuel framework, whereas modules are to be viewed as an extension of your application.</p>
    
      <h2>Activating modules</h2>
      <p>In order to use modules, Fuel will need to know where our modules are located. We can do this by uncommenting a line within the application config file <strong>app/config/config.php</strong>:
    
      <pre><code>'module_paths' => array(
       //APPPATH.'modules'.DS
    
       // Remove the slashes to activate:
       APPPATH.'modules'.DS
      ),</code></pre>
    
      <h3>Custom module paths</h3>
      <p>Fuel allows you to set up multiple custom modules paths as well, so for example, if you would like Fuel to search for modules one level higher than the <strong>app</strong> folder, you simply add the following:
    
      <pre><code>'module_paths' => array(
       APPPATH.'modules'.DS,
       '../my_nice_looking_modules'
      ),</code></pre>
    
      <p>In the above example, Fuel will first look for any placed modules within the default <strong>app/modules</strong> folder, and subsequently look for any placed modules within the <strong>my_nice_looking_modules</strong> folder.
    

    Perhaps you could rename "Module folder structure" to "Creating a module". And perhaps explain how it's necessary to include the '\' sign when calling core classes within a module (ie. show a more full example of a module controller). If no one has any plans to document Models, I'd be willing to do a commit for this, upcoming weekend. It'd be a good idea to post in this thread which topics are currently being covered by people, so that no work gets double submitted.
  • Added some of your texts to the Module docs. Models are all yours.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion