Sunday, August 29, 2010

Re: Function documentation?

There is no documentation for an index() method in the API docs
because no such method exists. Its a method you create as part of the
tutorial to handle requests for a list of posts. Controller actions,
or controller methods are accessible by the url. Generally these
methods are created by you the application developer.

-Mark

On Aug 29, 10:31 pm, geoB <truckeetr...@yahoo.com> wrote:
> "When someone browsers to /controller/index, it calls the index()
> method for
> the controller, which usually contains a find call for the model
> associated
> with the controller and sets a variable which is available in the
> index view
> for the controller in question. "
>
> This is the kind of information I was looking for.  I am more of a
> deductive than inductive logic person.  The use of the method in the
> tutorial doesn't explain to me what it's doing there or how it is
> used.  (I've not found any mention of an index() method in any
> controller.  Why is that?)
>
> Thanks immensely for clearing this up.
>
> George
>
> On Aug 29, 7:01 pm, Greg Skerman <gsker...@gmail.com> wrote:
>
>
>
>
>
>
>
> > the index() method in your controllers wont have any parameters...or maybe
> > it will - its up to you.
>
> > Hell you don't even have to define one if you don't want to.
>
> > When someone browsers to /controller/index, it calls the index() method for
> > the controller, which usually contains a find call for the model associated
> > with the controller and sets a variable which is available in the index view
> > for the controller in question.
>
> > Take a look at the blog tutorial in the book - it'll show you exactly how
> > this works.
>
> > On Mon, Aug 30, 2010 at 10:57 AM, geoB <truckeetr...@yahoo.com> wrote:
> > > I have searched Google, CakePHP Google Group, API Controller
> > > documentation (versions 1.2, 1.3), API AppController documentation
> > > (versions 1.2, 1.3) and have found no useful information on the
> > > parameters used by the index method.  Search terms include "index
> > > method", "index method" & documentation, "Index method" & syntax.  I
> > > ain't no dummy, and I don't expect to be spoon-fed.
>
> > > Sure, my understanding isn't what it could be.  That's why I read the
> > > documentation.  But reading alone does not create comprehension.
> > > Actual use of the material to observe its effects is required as
> > > well.  But I can't try to recreate something I cannot find
> > > documentation on.
>
> > > Perhaps a more specific reference would be useful.  I have read the
> > > manual at least twice now, and I know I'm not ready for the exam.
>
> > > g
>
> > > On Aug 29, 1:18 pm, "j.blotus" <j.blo...@gmail.com> wrote:
> > > > i think you need to start again from the beginning of the manual.
> > > > index() is controller action. It gets records from the Model and sends
> > > > them to the view. It sounds like you don't really understand the way
> > > > CakePHP uses MVC. Also, the core has an extensive API  for versions
> > > > 1.1, 1.2, and 1.3.
>
> > > > On Aug 28, 1:08 pm, geoB <truckeetr...@yahoo.com> wrote:
>
> > > > > I am trying to get started with CakePHP and am experiencing some
> > > > > frustration with the documentation.  (fwiw, I am moderately well
> > > > > experienced with PHP.)  For example, I was following the blog tutorial
> > > > > at the CakePHP website, only trying to adapt it to the database I
> > > > > intend to work with.  I learned that the index() function was
> > > > > referring to an index of a table.  So I started to look for the syntax
> > > > > of the index() function to no avail.  There does not appear to be a
> > > > > function reference anywhere that I can find.
>
> > > > > In general, how does one learn the syntax of a specific function?  I
> > > > > hope it's not trial and error.  Please point me in the right direction
> > > > > for documentation resources.
>
> > > > > Thanks.
>
> > > > > George
>
> > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp others
> > > with their CakePHP related questions.
>
> > > You received this message because you are subscribed to the Google Groups
> > > "CakePHP" group.
> > > To post to this group, send email to cake-php@googlegroups.com
> > > To unsubscribe from this group, send email to
> > > cake-php+unsubscribe@googlegroups.com<cake-php%2Bunsubscribe@googlegroups.c om>For more options, visit this group at
> > >http://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

No comments: