Fixed docs for createTable and dropTable methods #2067

Merged
merged 2 commits into from Feb 4, 2013

Conversation

Projects
None yet
2 participants

Ragazzo commented Feb 1, 2013

Fix for the issue #1969
@mdomba please see this PR, is docs clear in this format or need to be written in somehow else format (i mean add more explanations)?
Btw. need to check method renameTable i guess it also returns 0.

framework/db/CDbCommand.php
@@ -1313,7 +1313,7 @@ public function delete($table, $conditions='', $params=array())
* @param string $table the name of the table to be created. The name will be properly quoted by the method.
* @param array $columns the columns (name=>definition) in the new table.
* @param string $options additional SQL fragment that will be appended to the generated SQL.
- * @return integer number of rows affected by the execution.
+ * @return integer 0 is always returned (see PDO docs for more information http://php.net/manual/en/pdostatement.rowcount.php).
@mdomba

mdomba Feb 3, 2013

Member

As the documentation is processed you need to put the "link tag" to actually get the link in the documentation output, The tag is {@link thelink}. For an existing example check the CController::redirect() method - http://www.yiiframework.com/doc/api/1.1/CController#redirect-detail

So in your example it would be (with a bit of refrasing)

0 is always returned. See {@link http://php.net/manual/en/pdostatement.rowcount.php} for more information.

@Ragazzo

Ragazzo Feb 3, 2013

yes, at first i did it like u said (i know phpdoc =) ), but netbeans ignores link tags that use external resource (http-links, not class declaration like {@link Someclass::somemethod}).

@mdomba

mdomba Feb 3, 2013

Member

This is not because of NetBeans, it's because of the yii documentation builder

Ragazzo commented Feb 4, 2013

@mdomba is this one right?)

mdomba added a commit that referenced this pull request Feb 4, 2013

Merge pull request #2067 from Ragazzo/CDbCommand-dropTable-createTabl…
…e-fix

Fixed docs for createTable and dropTable methods
[ci skip]

@mdomba mdomba merged commit 8ead9e7 into yiisoft:master Feb 4, 2013

Member

mdomba commented Feb 4, 2013

The text is good... merged... thanks for working on this...

@Ragazzo Ragazzo deleted the Ragazzo:CDbCommand-dropTable-createTable-fix branch Feb 4, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment