#6199: Missing API documentation for
Controller::modelClass/modelKey/validationErrors
--------------------------+-------------------------------------------------
    Reporter:  deizel     |          Type:  Documentation 
      Status:  new        |      Priority:  Medium        
   Milestone:  1.2.x.x    |     Component:  Controller    
     Version:  1.2 Final  |      Severity:  Normal        
    Keywords:             |   Php_version:  PHP 4 >= 4.3.2
Cake_version:             |  
--------------------------+-------------------------------------------------
 Below is a simple fix for `/cake/libs/controller/controller.php` which
 should add these missing class properties into the API.

 Over the past few months, I have noticed the question "How do I get the
 current model name from a controller?" It would help to have `modelClass`
 documented as, without this, people may incorrectly assume that the
 `modelNames` (or even `uses`) array is the place to start looking.

 Feel free to change the DocBlock descriptions if they don't meet coding
 standards or don't make sense.

 {{{
 /**
  * This controller's model class name, derived from the controller's $name
 property.
  *
  * Example: For a controller named 'ArticleComments', the modelClass would
 be 'ArticleComment'
  *
  * @var string
  * @access public
  * @link
  */
         var $modelClass = null;
 /**
  * This controller's model key name, derived from the controller's
 $modelClass property.
  *
  * Example: For a controller named 'ArticleComments', the modelKey would
 be 'article_comment'
  *
  * @var string
  * @access public
  * @link
  */
         var $modelKey = null;
 /**
  * Holds any validation errors from last call of the validateErrors()
 method
  *
  * @var array Validation errors, or false if none
  * @access public
  * @link
  */
         var $validationErrors = null;
 }}}

-- 
Ticket URL: <https://trac.cakephp.org/ticket/6199>
CakePHP : The Rapid Development Framework for PHP <https://trac.cakephp.org/>
Cake is a rapid development framework for PHP which uses commonly known design 
patterns like ActiveRecord, Association Data Mapping, Front Controller and MVC. 
Our primary goal is to provide a structured framework that enables PHP users at 
all levels to rapidly develop robust web applications, without any loss to 
flexibility.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"tickets cakephp" group.
To post to this group, send email to tickets-cakephp@googlegroups.com
To unsubscribe from this group, send email to 
tickets-cakephp+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/tickets-cakephp?hl=en
-~----------~----~----~----~------~----~------~--~---

  • [CakePHP : The Rapid Dev... CakePHP : The Rapid Development Framework for PHP

Reply via email to