Yii Framework Forum: Phpdoc @property in yiic model - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Phpdoc @property in yiic model Rate Topic: -----

#1 User is offline   robak 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 41
  • Joined: 25-November 08

Posted 28 November 2008 - 09:09 AM

This will make code completion for ActiveRecords in some IDEs such as Eclipse.

in cli/commands/shell/ModelCommand.php - generateModel()

...
$rules='';
+ $properties= "/** n";
if(($db=Yii::app()->getDb())!==null)
...
foreach($table->columns as $column)
{
+ $properties .= " * @property $column->type $$column->namen";
if($column->isPrimaryKey && $table->sequenceName!==null)
...
echo "Warning
+ $properties .= " */ n";
$tr=array(
+ '{Properties}'=>$properties,
'{ClassName}'=>$className,


in cli/views/shell/model/model.php:

<?php
+{Properties}
class {ClassName} extends CActiveRecord
...

0

#2 User is offline   qiang 

  • Yii Project Lead
  • Yii
  • Group: Yii Dev Team
  • Posts: 5,879
  • Joined: 04-October 08
  • Location:DC, USA

Posted 29 November 2008 - 10:59 PM

Could you please submit a feature request at http://code.google.c...yii/issues/list ?
We will consider this for 1.1 release.
0

#3 User is offline   robak 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 41
  • Joined: 25-November 08

Posted 30 November 2008 - 05:59 AM

Done.
But I couldn't find how to set type of issue other than Defect.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users