Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
913eb622
Commit
913eb622
authored
Nov 08, 2013
by
Carsten Brandt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated phpdoc and fixed generator read/write-only annotation
parent
998cf7e6
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
56 additions
and
7 deletions
+56
-7
PhpDocController.php
build/controllers/PhpDocController.php
+28
-4
Application.php
framework/yii/base/Application.php
+2
-0
ActiveRecord.php
framework/yii/db/ActiveRecord.php
+2
-0
BaseMailer.php
framework/yii/mail/BaseMailer.php
+2
-1
BaseMessage.php
framework/yii/mail/BaseMessage.php
+1
-1
Controller.php
framework/yii/web/Controller.php
+2
-0
Request.php
framework/yii/web/Request.php
+19
-1
No files found.
build/controllers/PhpDocController.php
View file @
913eb622
...
...
@@ -278,11 +278,35 @@ class PhpDocController extends Controller
.
' See [[get'
.
ucfirst
(
$propName
)
.
'()]] and [[set'
.
ucfirst
(
$propName
)
.
'()]] for details.'
;
}
}
elseif
(
isset
(
$prop
[
'get'
]))
{
$note
=
' This property is read-only.'
;
// $docline .= '-read';
// check if parent class has setter defined
$c
=
$className
;
$parentSetter
=
false
;
while
(
$parent
=
get_parent_class
(
$c
))
{
if
(
method_exists
(
$parent
,
'set'
.
ucfirst
(
$propName
)))
{
$parentSetter
=
true
;
break
;
}
$c
=
$parent
;
}
if
(
!
$parentSetter
)
{
$note
=
' This property is read-only.'
;
// $docline .= '-read';
}
}
elseif
(
isset
(
$prop
[
'set'
]))
{
$note
=
' This property is write-only.'
;
// $docline .= '-write';
// check if parent class has getter defined
$c
=
$className
;
$parentGetter
=
false
;
while
(
$parent
=
get_parent_class
(
$c
))
{
if
(
method_exists
(
$parent
,
'set'
.
ucfirst
(
$propName
)))
{
$parentGetter
=
true
;
break
;
}
$c
=
$parent
;
}
if
(
!
$parentGetter
)
{
$note
=
' This property is write-only.'
;
// $docline .= '-write';
}
}
else
{
continue
;
}
...
...
framework/yii/base/Application.php
View file @
913eb622
...
...
@@ -15,6 +15,7 @@ use yii\web\HttpException;
* Application is the base class for all application classes.
*
* @property \yii\rbac\Manager $authManager The auth manager for this application. This property is read-only.
* @property string $basePath The root directory of the application.
* @property \yii\caching\Cache $cache The cache application component. Null if the component is not enabled.
* This property is read-only.
* @property \yii\db\Connection $db The database connection. This property is read-only.
...
...
@@ -261,6 +262,7 @@ abstract class Application extends Module
* Sets the root directory of the applicaition and the @app alias.
* This method can only be invoked at the beginning of the constructor.
* @param string $path the root directory of the application.
* @property string the root directory of the application.
* @throws InvalidParamException if the directory does not exist.
*/
public
function
setBasePath
(
$path
)
...
...
framework/yii/db/ActiveRecord.php
View file @
913eb622
...
...
@@ -29,6 +29,8 @@ use yii\helpers\Inflector;
* @property mixed $oldPrimaryKey The old primary key value. An array (column name => column value) is
* returned if the primary key is composite or `$asArray` is true. A string is returned otherwise (null will be
* returned if the key value is null). This property is read-only.
* @property array $populatedRelations An array of relation data indexed by relation names. This property is
* read-only.
* @property mixed $primaryKey The primary key value. An array (column name => column value) is returned if
* the primary key is composite or `$asArray` is true. A string is returned otherwise (null will be returned if
* the key value is null). This property is read-only.
...
...
framework/yii/mail/BaseMailer.php
View file @
913eb622
...
...
@@ -20,7 +20,8 @@ use yii\web\View;
*
* @see BaseMessage
*
* @property View|array $view view instance or its array configuration.
* @property View $view View instance. Note that the type of this property differs in getter and setter. See
* [[getView()]] and [[setView()]] for details.
*
* @author Paul Klimov <klimov.paul@gmail.com>
* @since 2.0
...
...
framework/yii/mail/BaseMessage.php
View file @
913eb622
...
...
@@ -18,7 +18,7 @@ use Yii;
*
* @see BaseMailer
*
* @property
BaseMailer $mailer mailer component instance
. This property is read-only.
* @property
MailerInterface $mailer The mailer component
. This property is read-only.
*
* @author Paul Klimov <klimov.paul@gmail.com>
* @since 2.0
...
...
framework/yii/web/Controller.php
View file @
913eb622
...
...
@@ -14,6 +14,8 @@ use yii\helpers\Html;
/**
* Controller is the base class of web controllers.
*
* @property string $canonicalUrl This property is read-only.
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0
*/
...
...
framework/yii/web/Request.php
View file @
913eb622
...
...
@@ -31,6 +31,8 @@ use yii\helpers\Security;
* @property string $csrfToken The random token for CSRF validation. This property is read-only.
* @property string $csrfTokenFromHeader The CSRF token sent via [[CSRF_HEADER]] by browser. Null is returned
* if no such header is sent. This property is read-only.
* @property array $delete The DELETE request parameter values. This property is read-only.
* @property array $get The GET request parameter values. This property is read-only.
* @property string $hostInfo Schema and hostname part (with port number if needed) of the request URL (e.g.
* `http://www.yiiframework.com`).
* @property boolean $isAjax Whether this is an AJAX (XMLHttpRequest) request. This property is read-only.
...
...
@@ -47,11 +49,14 @@ use yii\helpers\Security;
* read-only.
* @property string $method Request method, such as GET, POST, HEAD, PUT, PATCH, DELETE. The value returned is
* turned into upper case. This property is read-only.
* @property array $patch The PATCH request parameter values. This property is read-only.
* @property string $pathInfo Part of the request URL that is after the entry script and before the question
* mark. Note, the returned path info is already URL-decoded.
* @property integer $port Port number for insecure requests.
* @property array $post The POST request parameter values. This property is read-only.
* @property string $preferredLanguage The language that the application should use. Null is returned if both
* [[getAcceptedLanguages()]] and `$languages` are empty. This property is read-only.
* @property array $put The PUT request parameter values. This property is read-only.
* @property string $queryString Part of the request URL that is after the question mark. This property is
* read-only.
* @property string $rawBody The request body. This property is read-only.
...
...
@@ -304,12 +309,22 @@ class Request extends \yii\base\Request
}
/**
* Returns the GET request parameter values.
* @return array the GET request parameter values
*/
public
function
getGet
()
{
return
$_GET
;
}
/**
* Returns the named POST parameter value.
* If the POST parameter does not exist, the second parameter to this method will be returned.
* @param string $name the POST parameter name. If not specified, whole $_POST is returned.
* @param mixed $defaultValue the default parameter value if the POST parameter does not exist.
* @property array the POST request parameter values
* @return mixed the POST parameter value
* @see get
Param
* @see get
*/
public
function
getPost
(
$name
=
null
,
$defaultValue
=
null
)
{
...
...
@@ -323,6 +338,7 @@ class Request extends \yii\base\Request
* Returns the named DELETE parameter value.
* @param string $name the DELETE parameter name. If not specified, an array of DELETE parameters is returned.
* @param mixed $defaultValue the default parameter value if the DELETE parameter does not exist.
* @property array the DELETE request parameter values
* @return mixed the DELETE parameter value
*/
public
function
getDelete
(
$name
=
null
,
$defaultValue
=
null
)
...
...
@@ -337,6 +353,7 @@ class Request extends \yii\base\Request
* Returns the named PUT parameter value.
* @param string $name the PUT parameter name. If not specified, an array of PUT parameters is returned.
* @param mixed $defaultValue the default parameter value if the PUT parameter does not exist.
* @property array the PUT request parameter values
* @return mixed the PUT parameter value
*/
public
function
getPut
(
$name
=
null
,
$defaultValue
=
null
)
...
...
@@ -351,6 +368,7 @@ class Request extends \yii\base\Request
* Returns the named PATCH parameter value.
* @param string $name the PATCH parameter name. If not specified, an array of PATCH parameters is returned.
* @param mixed $defaultValue the default parameter value if the PATCH parameter does not exist.
* @property array the PATCH request parameter values
* @return mixed the PATCH parameter value
*/
public
function
getPatch
(
$name
=
null
,
$defaultValue
=
null
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment