Hello my dear, I am using cakephp 1.3.5 and I have the behavior that you are talking about. It has never changed so far as far as I am concerned.
On Wed, Dec 1, 2010 at 10:57 AM, Amit Badkas <[email protected]>wrote: > Hi, > > Yes, in 1.2 underscored variables automatically changed to camelCased by > controller's set() method but in 1.3, that behavior no longer exists as per > http://book.cakephp.org/view/1564/Controller-Components. > > Amit Badkas > > PHP Applications for E-Biz: http://www.sanisoft.com > > > > On Wed, Dec 1, 2010 at 3:40 PM, Hans Wiriya Tsai <[email protected]>wrote: > >> btw, one more thing, what happen to $book_title where in 1.2.x we can >> write it as $bookTitle (in view), as they say CamelCase? >> >> On Wed, Dec 1, 2010 at 4:01 PM, Hans Wiriya Tsai <[email protected]> >> wrote: >> > thx! u just rescued a lot of my time :) >> > so glad to find out this group is so helpful for a beginner like me. >> > >> > On Wed, Dec 1, 2010 at 2:31 PM, Amit Badkas <[email protected]> >> wrote: >> >> Hi, >> >> Whenever you access URL like /books then it automatically goes to >> >> /books/index internally. It means if you want to provide parameter in >> URL >> >> for 'index' action of controller then your URL should be like >> /books/index/1 >> >> instead of /books/1. Otherwise you need to use route to point URLs like >> >> /books/1 to /books/index/1 internally, more help is >> >> at http://book.cakephp.org/view/945/Routes-Configuration >> >> Amit Badkas >> >> PHP Applications for E-Biz: http://www.sanisoft.com >> >> >> >> >> >> On Wed, Dec 1, 2010 at 8:20 AM, Hans Wiriya Tsai <[email protected]> >> wrote: >> >>> >> >>> I m trying to make a controller and a view without model. Here are the >> >>> code: >> >>> Controller: >> >>> <?php >> >>> class BooksController extends AppController { >> >>> var $name = 'Books'; >> >>> var $uses = array(); >> >>> >> >>> function index($id = 0) { >> >>> $books = array ( >> >>> '0' => array( >> >>> 'book_title' => 'OOP >> with >> >>> PHP5', >> >>> 'author' => 'Hasin >> Hayder', >> >>> 'isbn' => '1847192564', >> >>> 'release_date' => >> 'December >> >>> 2007' >> >>> ), >> >>> '1' => array( >> >>> 'book_title' => >> 'Building >> >>> website with Joomla', >> >>> 'author' => 'Hagen >> Grraf', >> >>> 'isbn' => '1847192577', >> >>> 'release_date' => >> 'March >> >>> 2006' >> >>> ) >> >>> ); >> >>> $id = intval($id); >> >>> if($id < 0 || $id >= count($books)) { >> >>> $id = 0; >> >>> } >> >>> $this->set($books[$id]); >> >>> $this->set('page_heading', 'Book Store'); >> >>> $this->pageTitle = 'Welcome to the Packt Book Store!'; >> >>> } >> >>> } >> >>> >> >>> View: >> >>> >> >>> <h2><?php echo $page_heading; ?></h2> >> >>> <dl> >> >>> <lh><?php echo $book_title; ?></lh> >> >>> <dt>Author:</dt><dd><?php echo $author; ?></dd> >> >>> <dt>ISBN:</dt><dd><?php echo $isbn; ?></dd> >> >>> <dt>Release Date:</dt><dd><?php echo $releaseDate; ?></dd> >> >>> </dl> >> >>> >> >>> Those are example from CakePHP Application Development, but >> >>> unfortunately the book was using Cake 1.2.x while I have 1.3.6 >> >>> version. If I try to open it via >> >>> http://http://localhost/applogic/books/ looks OK, but if I try >> >>> http://http://localhost/applogic/books/1 an error occur like: >> >>> >> >>> Missing Method in BooksController >> >>> Error: The action 1 is not defined in controller BooksController >> >>> >> >>> Error: Create BooksController::1() in file: >> >>> app/controllers/books_controller.php. >> >>> >> >>> <?php >> >>> class BooksController extends AppController { >> >>> >> >>> var $name = 'Books'; >> >>> >> >>> >> >>> function 1() { >> >>> >> >>> } >> >>> >> >>> } >> >>> ?> >> >>> >> >>> Something not compatible between those 2 version? >> >>> >> >>> 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 [email protected] >> >>> To unsubscribe from this group, send email to >> >>> [email protected]<cake-php%[email protected]>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 [email protected] >> >> To unsubscribe from this group, send email to >> >> [email protected]<cake-php%[email protected]>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 [email protected] >> To unsubscribe from this group, send email to >> [email protected]<cake-php%[email protected]>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 [email protected] > To unsubscribe from this group, send email to > [email protected]<cake-php%[email protected]>For > more options, visit this group at > http://groups.google.com/group/cake-php?hl=en > -- Arsene Tochemey GANDOTE Web Application Developer Systems Administration Bsc Mathematics 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 [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
