Documentation suggestion: Web service example

On the Web Service doc page, second example, the Post model is shown as:




class Post extends CActiveRecord {

    /**

     * @var integer post ID

     * @soap

     */

    public $id;

    /**

     * @var string post title

     * @soap

     */

    public $title;

}



I suggest adding the following mandatory line:




  public static function model($className=__CLASS__) {

    return parent::model($className);

  }



I just got tripped up with this. Although it was useful learning how to debug SOAP in Yii.

Well, you can always add it as a comment at the bottom of the page. But of course you are right, it would be better if it was directly in the doc page.

I agree about adding to the the comments, but I’m not sure that anyone is sweeping up the comments and adding them to the docs themselves.

That said, is there a reason why the docs aren’t a wiki? It would be much easier to fix things as we go.

Thank you for your suggestion. Fixed in SVN.