Updating documentation to improve code completion

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8114 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
renan.saddam 2009-03-17 21:10:28 +00:00
parent de5907326e
commit 76e0f17dbc
22 changed files with 116 additions and 116 deletions

View file

@ -36,7 +36,7 @@ class AclShell extends Shell {
/**
* Contains instance of AclComponent
*
* @var object
* @var AclComponent
* @access public
*/
var $Acl;

View file

@ -34,7 +34,7 @@ class Shell extends Object {
/**
* An instance of the ShellDispatcher object that loaded this script
*
* @var object
* @var ShellDispatcher
* @access public
*/
var $Dispatch = null;
@ -49,7 +49,7 @@ class Shell extends Object {
* Holds the DATABASE_CONFIG object for the app. Null if database.php could not be found,
* or the app does not exist.
*
* @var object
* @var DATABASE_CONFIG
* @access public
*/
var $DbConfig = null;

View file

@ -33,7 +33,7 @@ class Cache extends Object {
/**
* Cache engine to use
*
* @var object
* @var CacheEngine
* @access protected
*/
var $_Engine = null;

View file

@ -34,7 +34,7 @@ class FileEngine extends CacheEngine {
/**
* Instance of File class
*
* @var object
* @var File
* @access private
*/
var $__File = null;

View file

@ -33,7 +33,7 @@ class MemcacheEngine extends CacheEngine {
/**
* Memcache wrapper.
*
* @var object
* @var Memcache
* @access private
*/
var $__Memcache = null;

View file

@ -39,7 +39,7 @@ class Scaffold extends Object {
/**
* Controller object
*
* @var object
* @var Controller
* @access public
*/
var $controller = null;

View file

@ -70,7 +70,7 @@ class ErrorHandler extends Object {
/**
* Controller instance.
*
* @var object
* @var Controller
* @access public
*/
var $controller = null;

View file

@ -42,7 +42,7 @@ class File extends Object {
/**
* Folder object of the File
*
* @var object
* @var Folder
* @access public
*/
var $Folder = null;
@ -376,7 +376,7 @@ class File extends Object {
}
/**
* Returns the full path of the File.
*
*
* @return string Full path to file
* @access public
*/

View file

@ -40,7 +40,7 @@ class I18n extends Object {
/**
* Instance of the I10n class for localization
*
* @var object
* @var I10n
* @access public
*/
var $l10n = null;

View file

@ -205,11 +205,11 @@ class ModelBehavior extends Object {
* @subpackage cake.cake.libs.model
*/
class BehaviorCollection extends Object {
/**
* Stores a reference to the attached name
*
* @var object
* @var string
* @access public
*/
var $modelName = null;
/**

View file

@ -3,7 +3,7 @@
/**
* Datasource connection manager
*
* Provides an interface for loading and enumerating connections defined in app/config/database.php
* Provides an interface for loading and enumerating connections defined in app/config/database.php
*
* PHP versions 4 and 5
*
@ -39,7 +39,7 @@ class ConnectionManager extends Object {
/**
* Holds a loaded instance of the Connections object
*
* @var object
* @var DATABASE_CONFIG
* @access public
*/
var $config = null;

View file

@ -221,7 +221,7 @@ class Model extends Overloadable {
/**
* Holds the Behavior objects currently bound to this model.
*
* @var object
* @var BehaviorCollection
* @access public
*/
var $Behaviors = null;

View file

@ -38,7 +38,7 @@ class Object {
/**
* Log object
*
* @var object
* @var CakeLog
* @access protected
*/
var $_log = null;

View file

@ -42,14 +42,14 @@ class AjaxHelper extends AppHelper {
/**
* HtmlHelper instance
*
* @var object
* @var HtmlHelper
* @access public
*/
var $Html = null;
/**
* JavaScriptHelper instance
*
* @var object
* @var JavaScriptHelper
* @access public
*/
var $Javascript = null;
@ -901,7 +901,7 @@ class AjaxHelper extends AppHelper {
}
if (isset($options['bind'])) {
$bind = $options['bind'];
$hasBinding = (
(is_array($bind) && in_array($callback, $bind)) ||
(is_string($bind) && strpos($bind, $callback) !== false)

View file

@ -52,7 +52,7 @@ class CacheHelper extends AppHelper {
/**
* holds the View object passed in final call to CacheHelper::cache()
*
* @var object
* @var View
* @access public
*/
var $view;

View file

@ -34,7 +34,7 @@ class MagicDbTest extends UnitTestCase {
/**
* The MagicDb instance to be tested
*
* @var object
* @var MagicDb
* @access public
*/
var $Db = null;

View file

@ -182,7 +182,7 @@ class DboAdodbTest extends CakeTestCase {
/**
* The Dbo instance to be tested
*
* @var object
* @var DboSource
* @access public
*/
var $db = null;

View file

@ -54,7 +54,7 @@ class DboMssqlTestDb extends DboMssql {
var $simulated = array();
/**
* fetchAllResultsStack
*
*
* @var array
* @access public
*/
@ -72,8 +72,8 @@ class DboMssqlTestDb extends DboMssql {
}
/**
* fetchAll method
*
* @param mixed $sql
*
* @param mixed $sql
* @access protected
* @return void
*/
@ -82,8 +82,8 @@ class DboMssqlTestDb extends DboMssql {
}
/**
* fetchAll method
*
* @param mixed $sql
*
* @param mixed $sql
* @access protected
* @return void
*/
@ -192,7 +192,7 @@ class DboMssqlTest extends CakeTestCase {
/**
* The Dbo instance to be tested
*
* @var object
* @var DboSource
* @access public
*/
var $db = null;
@ -284,7 +284,7 @@ class DboMssqlTest extends CakeTestCase {
}
/**
* testDescribe method
*
*
* @access public
* @return void
*/

View file

@ -156,7 +156,7 @@ class DboMysqlTest extends CakeTestCase {
/**
* The Dbo instance to be tested
*
* @var object
* @var DboSource
* @access public
*/
var $Db = null;
@ -372,76 +372,76 @@ class DboMysqlTest extends CakeTestCase {
$name = $this->db->fullTableName('simple');
$mockDbo =& new QueryMockDboMysql($this);
$columnData = array(
$columnData = array(
array('0' => array(
'Table' => 'with_compound_keys',
'Non_unique' => '0',
'Key_name' => 'PRIMARY',
'Seq_in_index' => '1',
'Column_name' => 'id',
'Collation' => 'A',
'Cardinality' => '0',
'Sub_part' => NULL,
'Packed' => NULL,
'Null' => '',
'Index_type' => 'BTREE',
'Comment' => ''
)),
array('0' => array(
'Table' => 'with_compound_keys',
'Non_unique' => '1',
'Key_name' => 'pointless_bool',
'Seq_in_index' => '1',
'Column_name' => 'bool',
'Collation' => 'A',
'Cardinality' => NULL,
'Sub_part' => NULL,
'Packed' => NULL,
'Null' => 'YES',
'Index_type' => 'BTREE',
'Table' => 'with_compound_keys',
'Non_unique' => '0',
'Key_name' => 'PRIMARY',
'Seq_in_index' => '1',
'Column_name' => 'id',
'Collation' => 'A',
'Cardinality' => '0',
'Sub_part' => NULL,
'Packed' => NULL,
'Null' => '',
'Index_type' => 'BTREE',
'Comment' => ''
)),
array('0' => array(
'Table' => 'with_compound_keys',
'Non_unique' => '1',
'Key_name' => 'pointless_small_int',
'Seq_in_index' => '1',
'Column_name' => 'small_int',
'Collation' => 'A',
'Cardinality' => NULL,
'Sub_part' => NULL,
'Packed' => NULL,
'Null' => 'YES',
'Index_type' => 'BTREE',
'Table' => 'with_compound_keys',
'Non_unique' => '1',
'Key_name' => 'pointless_bool',
'Seq_in_index' => '1',
'Column_name' => 'bool',
'Collation' => 'A',
'Cardinality' => NULL,
'Sub_part' => NULL,
'Packed' => NULL,
'Null' => 'YES',
'Index_type' => 'BTREE',
'Comment' => ''
)),
)),
array('0' => array(
'Table' => 'with_compound_keys',
'Non_unique' => '1',
'Key_name' => 'one_way',
'Seq_in_index' => '1',
'Column_name' => 'bool',
'Collation' => 'A',
'Cardinality' => NULL,
'Sub_part' => NULL,
'Packed' => NULL,
'Null' => 'YES',
'Index_type' => 'BTREE',
'Table' => 'with_compound_keys',
'Non_unique' => '1',
'Key_name' => 'pointless_small_int',
'Seq_in_index' => '1',
'Column_name' => 'small_int',
'Collation' => 'A',
'Cardinality' => NULL,
'Sub_part' => NULL,
'Packed' => NULL,
'Null' => 'YES',
'Index_type' => 'BTREE',
'Comment' => ''
)),
)),
array('0' => array(
'Table' => 'with_compound_keys',
'Non_unique' => '1',
'Key_name' => 'one_way',
'Seq_in_index' => '2',
'Column_name' => 'small_int',
'Collation' => 'A',
'Cardinality' => NULL,
'Sub_part' => NULL,
'Packed' => NULL,
'Null' => 'YES',
'Index_type' => 'BTREE',
'Comment' => ''
'Table' => 'with_compound_keys',
'Non_unique' => '1',
'Key_name' => 'one_way',
'Seq_in_index' => '1',
'Column_name' => 'bool',
'Collation' => 'A',
'Cardinality' => NULL,
'Sub_part' => NULL,
'Packed' => NULL,
'Null' => 'YES',
'Index_type' => 'BTREE',
'Comment' => ''
)),
array('0' => array(
'Table' => 'with_compound_keys',
'Non_unique' => '1',
'Key_name' => 'one_way',
'Seq_in_index' => '2',
'Column_name' => 'small_int',
'Collation' => 'A',
'Cardinality' => NULL,
'Sub_part' => NULL,
'Packed' => NULL,
'Null' => 'YES',
'Index_type' => 'BTREE',
'Comment' => ''
))
);
$mockDbo->setReturnValue('query', $columnData, array('SHOW INDEX FROM ' . $name));
@ -504,7 +504,7 @@ class DboMysqlTest extends CakeTestCase {
}
/**
* testAlterSchemaIndexes method
*
*
* @access public
* @return void
*/
@ -538,10 +538,10 @@ class DboMysqlTest extends CakeTestCase {
'PRIMARY' => array('column' => 'id', 'unique' => 1))
)));
$this->db->query($this->db->alterSchema($schema2->compare($schema1)));
$indexes = $this->db->index('altertest');
$this->assertEqual($schema2->tables['altertest']['indexes'], $indexes);
// Change three indexes, delete one and add another one
$schema3 =& new CakeSchema(array(
'name' => 'AlterTest3',
@ -552,7 +552,7 @@ class DboMysqlTest extends CakeTestCase {
'group1' => array('type' => 'integer', 'null' => true),
'group2' => array('type' => 'integer', 'null' => true),
'indexes' => array(
'name_idx' => array('column' => 'name', 'unique' => 1),
'name_idx' => array('column' => 'name', 'unique' => 1),
'group_idx' => array('column' => 'group2', 'unique' => 0),
'compound_idx' => array('column' => array('group2', 'group1'), 'unique' => 0),
'id_name_idx' => array('column' => array('id', 'name'), 'unique' => 0))

View file

@ -159,7 +159,7 @@ class DboMysqliTest extends CakeTestCase {
/**
* The Dbo instance to be tested
*
* @var object
* @var DboSource
* @access public
*/
var $Db = null;

View file

@ -159,19 +159,19 @@ class DboPostgresTest extends CakeTestCase {
* @var object
* @access public
*/
var $fixtures = array('core.user', 'core.binary_test', 'core.comment', 'core.article',
var $fixtures = array('core.user', 'core.binary_test', 'core.comment', 'core.article',
'core.tag', 'core.articles_tag', 'core.attachment', 'core.person', 'core.post', 'core.author');
/**
* Actual DB connection used in testing
*
* @var object
* @var DboSource
* @access public
*/
var $db = null;
/**
* Simulated DB connection used in testing
*
* @var object
* @var DboSource
* @access public
*/
var $db2 = null;
@ -479,7 +479,7 @@ class DboPostgresTest extends CakeTestCase {
$db1->query('DROP TABLE ' . $db1->fullTableName('datatypes'));
}
/**
* Test index generation from table info.
*
@ -498,7 +498,7 @@ class DboPostgresTest extends CakeTestCase {
);
$result = $this->db->index($name);
$this->assertEqual($expected, $result);
$this->db->query('DROP TABLE ' . $name);
$name = $this->db->fullTableName('index_test_2', false);
$this->db->query('CREATE TABLE ' . $name . ' ("id" serial NOT NULL PRIMARY KEY, "bool" integer, "small_char" varchar(50), "description" varchar(40) )');
@ -532,7 +532,7 @@ class DboPostgresTest extends CakeTestCase {
)
));
$this->db->query($this->db->createSchema($Old));
$New =& new CakeSchema(array(
'connection' => 'test_suite',
'name' => 'AlterPosts',
@ -547,13 +547,13 @@ class DboPostgresTest extends CakeTestCase {
)
));
$this->db->query($this->db->alterSchema($New->compare($Old), 'alter_posts'));
$model = new CakeTestModel(array('table' => 'alter_posts', 'ds' => 'test_suite'));
$result = $model->schema();
$this->assertTrue(isset($result['status']));
$this->assertFalse(isset($result['published']));
$this->assertEqual($result['body']['type'], 'string');
$this->db->query($this->db->dropSchema($New));
}
/**
@ -561,7 +561,7 @@ class DboPostgresTest extends CakeTestCase {
*
* @access public
* @return void
*/
*/
function testAlterIndexes() {
$this->db->cacheSources = false;
@ -594,10 +594,10 @@ class DboPostgresTest extends CakeTestCase {
)
));
$this->db->query($this->db->alterSchema($schema2->compare($schema1)));
$indexes = $this->db->index('altertest');
$this->assertEqual($schema2->tables['altertest']['indexes'], $indexes);
// Change three indexes, delete one and add another one
$schema3 =& new CakeSchema(array(
'name' => 'AlterTest3',
@ -608,7 +608,7 @@ class DboPostgresTest extends CakeTestCase {
'group1' => array('type' => 'integer', 'null' => true),
'group2' => array('type' => 'integer', 'null' => true),
'indexes' => array(
'name_idx' => array('column' => 'name', 'unique' => 1),
'name_idx' => array('column' => 'name', 'unique' => 1),
'group_idx' => array('column' => 'group2', 'unique' => 0),
'compound_idx' => array('column' => array('group2', 'group1'), 'unique' => 0),
'another_idx' => array('column' => array('group1', 'name'), 'unique' => 0))

View file

@ -83,14 +83,14 @@ class DboSqliteTest extends CakeTestCase {
/**
* Actual DB connection used in testing
*
* @var object
* @var DboSource
* @access public
*/
var $db = null;
/**
* Simulated DB connection used in testing
*
* @var object
* @var DboSource
* @access public
*/
var $db2 = null;
@ -150,7 +150,7 @@ class DboSqliteTest extends CakeTestCase {
*
* @access public
* @return void
*/
*/
function testIndex() {
$name = $this->db->fullTableName('with_a_key');
$this->db->query('CREATE TABLE ' . $name . ' ("id" int(11) PRIMARY KEY, "bool" int(1), "small_char" varchar(50), "description" varchar(40) );');
@ -160,12 +160,12 @@ class DboSqliteTest extends CakeTestCase {
'PRIMARY' => array('column' => 'id', 'unique' => 1),
'pointless_bool' => array('column' => 'bool', 'unique' => 0),
'char_index' => array('column' => 'small_char', 'unique' => 1),
);
$result = $this->db->index($name);
$this->assertEqual($expected, $result);
$this->db->query('DROP TABLE ' . $name);
$this->db->query('CREATE TABLE ' . $name . ' ("id" int(11) PRIMARY KEY, "bool" int(1), "small_char" varchar(50), "description" varchar(40) );');
$this->db->query('CREATE UNIQUE INDEX multi_col ON ' . $name . '("small_char", "bool")');
$expected = array(
@ -199,7 +199,7 @@ class DboSqliteTest extends CakeTestCase {
$db->cacheSources = false;
$fileName = '_' . preg_replace('/[^A-Za-z0-9_\-+]/', '_', TMP . $dbName) . '_list';
$result = Cache::read($fileName, '_cake_model_');
$this->assertEqual($result, array('test_list'));