Skip to content

Commit 729991a

Browse files
author
Joan He
committed
MAGETWO-35005: Investigate and Annotate @api to classes and/or methods
1 parent 252c85f commit 729991a

File tree

8 files changed

+124
-24
lines changed

8 files changed

+124
-24
lines changed

app/code/Magento/Sales/Controller/Adminhtml/Order/EditInterface.php

Lines changed: 0 additions & 11 deletions
This file was deleted.

lib/internal/Magento/Framework/App/Resource.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ public function __construct(
8686
*
8787
* @param string $resourceName
8888
* @return \Magento\Framework\DB\Adapter\AdapterInterface|false
89+
* @api
8990
*/
9091
public function getConnection($resourceName)
9192
{
@@ -128,6 +129,7 @@ public function getConnectionByName($connectionName)
128129
* @param string|string[] $modelEntity
129130
* @param string $connectionName
130131
* @return string
132+
* @api
131133
*/
132134
public function getTableName($modelEntity, $connectionName = self::DEFAULT_READ_RESOURCE)
133135
{

lib/internal/Magento/Framework/App/Route/ConfigInterface.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
<?php
22
/**
3-
* Routes configuration interface
4-
*
53
* Copyright © 2015 Magento. All rights reserved.
64
* See COPYING.txt for license details.
75
*/
86
namespace Magento\Framework\App\Route;
97

8+
/**
9+
* Routes configuration interface
10+
*
11+
* @api
12+
*/
1013
interface ConfigInterface
1114
{
1215
/**
@@ -32,7 +35,7 @@ public function getRouteByFrontName($frontName, $scope = null);
3235
*
3336
* @param string $frontName
3437
* @param string $scope
35-
* @return array
38+
* @return string[]
3639
*/
3740
public function getModulesByFrontName($frontName, $scope = null);
3841
}

lib/internal/Magento/Framework/DB/Adapter/AdapterInterface.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
* Magento Database Adapter Interface
1212
*
1313
* @author Magento Core Team <core@magentocommerce.com>
14+
* @api
1415
*/
1516
interface AdapterInterface
1617
{

lib/internal/Magento/Framework/DB/Ddl/Table.php

Lines changed: 104 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,68 +16,147 @@
1616
class Table
1717
{
1818
/**
19-
* Types of columns
19+
* Column type boolean
20+
* @api
2021
*/
2122
const TYPE_BOOLEAN = 'boolean';
2223

24+
/**
25+
* Column type smallint
26+
* @api
27+
*/
2328
const TYPE_SMALLINT = 'smallint';
2429

30+
/**
31+
* Column type integer
32+
* @api
33+
*/
2534
const TYPE_INTEGER = 'integer';
2635

36+
/**
37+
* Column type bigint
38+
* @api
39+
*/
2740
const TYPE_BIGINT = 'bigint';
2841

42+
/**
43+
* Column type float
44+
* @api
45+
*/
2946
const TYPE_FLOAT = 'float';
3047

48+
/**
49+
* Column type numeric
50+
* @api
51+
*/
3152
const TYPE_NUMERIC = 'numeric';
3253

54+
/**
55+
* Column type decimal
56+
* @api
57+
*/
3358
const TYPE_DECIMAL = 'decimal';
3459

60+
/**
61+
* Column type date
62+
* @api
63+
*/
3564
const TYPE_DATE = 'date';
3665

66+
/**
67+
* Column type timestamp
68+
* @api
69+
*/
3770
const TYPE_TIMESTAMP = 'timestamp';
3871

39-
// Capable to support date-time from 1970 + auto-triggers in some RDBMS
72+
/**
73+
* Column type datetime, capable to support date-time from 1970 + auto-triggers in some RDBMS
74+
* @api
75+
*/
4076
const TYPE_DATETIME = 'datetime';
4177

42-
// Capable to support long date-time before 1970
78+
/**
79+
* Column type text, capable to support long date-time before 1970
80+
* @api
81+
*/
4382
const TYPE_TEXT = 'text';
4483

84+
/**
85+
* Column type blob
86+
* @api
87+
*/
4588
const TYPE_BLOB = 'blob';
4689

47-
// Used for back compatibility, when query param can't use statement options
90+
/**
91+
* Column type varbinary, used for back compatibility, when query param can't use statement options
92+
* @api
93+
*/
4894
const TYPE_VARBINARY = 'varbinary';
4995

50-
// A real blob, stored as binary inside DB
51-
5296
/**
53-
* Default and maximal TEXT and BLOB columns sizes we can support for different DB systems.
97+
* Default TEXT columns sizes
98+
* @api
5499
*/
55100
const DEFAULT_TEXT_SIZE = 1024;
56101

102+
/**
103+
* Maximal TEXT columns sizes
104+
* @api
105+
*/
57106
const MAX_TEXT_SIZE = 2147483648;
58107

108+
/**
109+
* Maximal BLOB columns sizes
110+
* @api
111+
*/
59112
const MAX_VARBINARY_SIZE = 2147483648;
60113

61114
/**
62-
* Default values for timestampses - fill with current timestamp on inserting record, on changing and both cases
115+
* Default value for timestamps - fill with current timestamp on inserting record, on changing and both cases
116+
* @api
63117
*/
64118
const TIMESTAMP_INIT_UPDATE = 'TIMESTAMP_INIT_UPDATE';
65119

120+
/**
121+
* Default value for timestamps - fill with current timestamp only on inserting record
122+
* @api
123+
*/
66124
const TIMESTAMP_INIT = 'TIMESTAMP_INIT';
67125

126+
/**
127+
* Default value for timestamps - fill with current timestamp only on changing record
128+
* @api
129+
*/
68130
const TIMESTAMP_UPDATE = 'TIMESTAMP_UPDATE';
69131

70132
/**
71-
* Actions used for foreign keys
133+
* Cascade action used for foreign keys
134+
* @api
72135
*/
73136
const ACTION_CASCADE = 'CASCADE';
74137

138+
/**
139+
* Set null action used for foreign keys
140+
* @api
141+
*/
75142
const ACTION_SET_NULL = 'SET NULL';
76143

144+
/**
145+
* No action action used for foreign keys
146+
* @api
147+
*/
77148
const ACTION_NO_ACTION = 'NO ACTION';
78149

150+
/**
151+
* Restrict action used for foreign keys
152+
* @api
153+
*/
79154
const ACTION_RESTRICT = 'RESTRICT';
80155

156+
/**
157+
* Set default action used for foreign keys
158+
* @api
159+
*/
81160
const ACTION_SET_DEFAULT = 'SET DEFAULT';
82161

83162
/**
@@ -182,6 +261,7 @@ class Table
182261
*
183262
* @param string $name
184263
* @return $this
264+
* @api
185265
*/
186266
public function setName($name)
187267
{
@@ -197,6 +277,7 @@ public function setName($name)
197277
*
198278
* @param string $name
199279
* @return $this
280+
* @api
200281
*/
201282
public function setSchema($name)
202283
{
@@ -209,6 +290,7 @@ public function setSchema($name)
209290
*
210291
* @param string $comment
211292
* @return $this
293+
* @api
212294
*/
213295
public function setComment($comment)
214296
{
@@ -221,6 +303,7 @@ public function setComment($comment)
221303
*
222304
* @return string
223305
* @throws \Zend_Db_Exception
306+
* @api
224307
*/
225308
public function getName()
226309
{
@@ -234,6 +317,7 @@ public function getName()
234317
* Get schema name
235318
*
236319
* @return string|null
320+
* @api
237321
*/
238322
public function getSchema()
239323
{
@@ -244,6 +328,7 @@ public function getSchema()
244328
* Return comment for table
245329
*
246330
* @return string
331+
* @api
247332
*/
248333
public function getComment()
249334
{
@@ -273,6 +358,7 @@ public function getComment()
273358
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
274359
* @SuppressWarnings(PHPMD.NPathComplexity)
275360
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
361+
* @api
276362
*/
277363
public function addColumn($name, $type, $size = null, $options = [], $comment = null)
278364
{
@@ -409,6 +495,7 @@ public function addColumn($name, $type, $size = null, $options = [], $comment =
409495
* @return $this
410496
* @throws \Zend_Db_Exception
411497
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
498+
* @api
412499
*/
413500
public function addForeignKey($fkName, $column, $refTable, $refColumn, $onDelete = null, $onUpdate = null)
414501
{
@@ -460,6 +547,7 @@ public function addForeignKey($fkName, $column, $refTable, $refColumn, $onDelete
460547
* @return $this
461548
* @throws \Zend_Db_Exception
462549
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
550+
* @api
463551
*/
464552
public function addIndex($indexName, $fields, $options = [])
465553
{
@@ -527,6 +615,7 @@ public function addIndex($indexName, $fields, $options = [])
527615
* @param bool $normalized
528616
* @see $this->_columns
529617
* @return array
618+
* @api
530619
*/
531620
public function getColumns($normalized = true)
532621
{
@@ -542,6 +631,7 @@ public function getColumns($normalized = true)
542631
* @param array $column
543632
* @see $this->_columns
544633
* @return $this
634+
* @api
545635
*/
546636
public function setColumn($column)
547637
{
@@ -555,6 +645,7 @@ public function setColumn($column)
555645
*
556646
* @see $this->_indexes
557647
* @return array
648+
* @api
558649
*/
559650
public function getIndexes()
560651
{
@@ -566,6 +657,7 @@ public function getIndexes()
566657
*
567658
* @see $this->_foreignKeys
568659
* @return array
660+
* @api
569661
*/
570662
public function getForeignKeys()
571663
{
@@ -578,6 +670,7 @@ public function getForeignKeys()
578670
* @param string $key
579671
* @param string $value
580672
* @return $this
673+
* @api
581674
*/
582675
public function setOption($key, $value)
583676
{
@@ -591,6 +684,7 @@ public function setOption($key, $value)
591684
*
592685
* @param string $key
593686
* @return null|string
687+
* @api
594688
*/
595689
public function getOption($key)
596690
{
@@ -604,6 +698,7 @@ public function getOption($key)
604698
* Retrieve array of table options
605699
*
606700
* @return array
701+
* @api
607702
*/
608703
public function getOptions()
609704
{

lib/internal/Magento/Framework/Model/Resource/AbstractResource.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,20 +47,23 @@ abstract protected function _construct();
4747
* Retrieve connection for read data
4848
*
4949
* @return \Magento\Framework\DB\Adapter\AdapterInterface
50+
* @api
5051
*/
5152
abstract protected function _getReadAdapter();
5253

5354
/**
5455
* Retrieve connection for write data
5556
*
5657
* @return \Magento\Framework\DB\Adapter\AdapterInterface
58+
* @api
5759
*/
5860
abstract protected function _getWriteAdapter();
5961

6062
/**
6163
* Start resource transaction
6264
*
6365
* @return $this
66+
* @api
6467
*/
6568
public function beginTransaction()
6669
{
@@ -73,6 +76,7 @@ public function beginTransaction()
7376
*
7477
* @param array $callback
7578
* @return $this
79+
* @api
7680
*/
7781
public function addCommitCallback($callback)
7882
{
@@ -85,6 +89,7 @@ public function addCommitCallback($callback)
8589
* Commit resource transaction
8690
*
8791
* @return $this
92+
* @api
8893
*/
8994
public function commit()
9095
{
@@ -109,6 +114,7 @@ public function commit()
109114
* Roll back resource transaction
110115
*
111116
* @return $this
117+
* @api
112118
*/
113119
public function rollBack()
114120
{

0 commit comments

Comments
 (0)