Skip to content

Commit

Permalink
yiisoft#197 find and replace
Browse files Browse the repository at this point in the history
  • Loading branch information
alexkart committed Jul 22, 2019
1 parent daaee2d commit 9a8b4db
Show file tree
Hide file tree
Showing 20 changed files with 355 additions and 355 deletions.
2 changes: 1 addition & 1 deletion docs/documentation_style_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ containing the translations. The following shows an example for German:
- Refer to classes using the full namespace: `yii\base\Model`
- Refer to class properties using the static syntax even if they are not static: `yii\base\Model::$validators`
- Refer to class methods using the static syntax even if they are not static and include parenthesis to make it clear, that it is a method: `yii\base\Model::validate()`
- references to code objects should be writting in `[[]]` to generate links to the API documentation. E.g. `[[yii\base\Model]]`, `[[yii\base\Model::$validators]]`, or `[[yii\base\Model::validate()]]`.
- references to code objects should be writting in `{@see }` to generate links to the API documentation. E.g. `{@see yii\base\Model}`, `{@see yii\base\Model::$validators}`, or `{@see yii\base\Model::validate()}`.

## Capitalizations

Expand Down
14 changes: 7 additions & 7 deletions docs/internals/core-code-style.md
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ Documentation
* Returns the errors for all attribute or a single attribute.
* @param string $attribute attribute name. Use null to retrieve errors for all attributes.
* @property array An array of errors for all attributes. Empty array is returned if no error.
* The result is a two-dimensional array. See [[getErrors()]] for detailed description.
* The result is a two-dimensional array. See {@see getErrors()} for detailed description.
* @return array errors for all attributes or the specified attribute. Empty array is returned if no error.
* Note that when returning errors for all attributes, the result is a two-dimensional array, like the following:
* ...
Expand Down Expand Up @@ -421,7 +421,7 @@ class Component extends \yii\base\BaseObject
```php
/**
* Returns the list of attached event handlers for an event.
* You may manipulate the returned [[Vector]] object by adding or removing handlers.
* You may manipulate the returned {@see Vector} object by adding or removing handlers.
* For example,
*
* ```
Expand All @@ -448,15 +448,15 @@ As you can see in the examples above we use markdown to format the phpDoc commen

There is additional syntax for cross linking between classes, methods and properties in the documentation:

- `[[canSetProperty]]` will create a link to the `canSetProperty` method or property of the same class.
- `[[Component::canSetProperty]]` will create a link to `canSetProperty` method of the class `Component` in the same namespace.
- `[[yii\base\Component::canSetProperty]]` will create a link to `canSetProperty` method of the class `Component` in namespace `yii\base`.
- `[[Component]]` will create a link to the `Component` class in the same namespace. Adding namespace to the class name is also possible here.
- `{@see canSetProperty}` will create a link to the `canSetProperty` method or property of the same class.
- `{@see Component::canSetProperty}` will create a link to `canSetProperty` method of the class `Component` in the same namespace.
- `{@see yii\base\Component::canSetProperty}` will create a link to `canSetProperty` method of the class `Component` in namespace `yii\base`.
- `{@see Component}` will create a link to the `Component` class in the same namespace. Adding namespace to the class name is also possible here.

To give one of the above mentioned links another label than the class or method name you can use the syntax shown in the following example:

```
... as displayed in the [[header|header cell]].
... as displayed in the {@see header|header cell}.
```

The part before the | is the method, property or class reference while the part after | is the link label.
Expand Down
4 changes: 2 additions & 2 deletions src/helpers/BaseFormatConverter.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
use yii\helpers\Yii;

/**
* BaseFormatConverter provides concrete implementation for [[FormatConverter]].
* BaseFormatConverter provides concrete implementation for {@see FormatConverter}.
*
* Do not use BaseFormatConverter. Use [[FormatConverter]] instead.
* Do not use BaseFormatConverter. Use {@see FormatConverter} instead.
*
* @author Carsten Brandt <[email protected]>
* @author Enrica Ruedin <[email protected]>
Expand Down
332 changes: 166 additions & 166 deletions src/helpers/BaseHtml.php

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/helpers/BaseHtmlPurifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
use Yiisoft\Strings\StringHelper;

/**
* BaseHtmlPurifier provides concrete implementation for [[HtmlPurifier]].
* BaseHtmlPurifier provides concrete implementation for {@see HtmlPurifier}.
*
* Do not use BaseHtmlPurifier. Use [[HtmlPurifier]] instead.
* Do not use BaseHtmlPurifier. Use {@see HtmlPurifier} instead.
*
* This helper requires `ezyang/htmlpurifier` library to be installed. This can be done via composer:
*
Expand Down
6 changes: 3 additions & 3 deletions src/helpers/BaseIpHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
namespace yii\helpers;

/**
* Class BaseIpHelper provides concrete implementation for [[IpHelper]]
* Class BaseIpHelper provides concrete implementation for {@see IpHelper}
*
* Do not use BaseIpHelper, use [[IpHelper]] instead.
* Do not use BaseIpHelper, use {@see IpHelper} instead.
*
* @author Dmytro Naumenko <[email protected]>
* @since 2.0.14
Expand All @@ -33,7 +33,7 @@ class BaseIpHelper
* Gets the IP version. Does not perform IP address validation.
*
* @param string $ip the valid IPv4 or IPv6 address.
* @return int [[IPV4]] or [[IPV6]]
* @return int {@see IPV4} or {@see IPV6}
*/
public static function getIpVersion($ip)
{
Expand Down
10 changes: 5 additions & 5 deletions src/helpers/BaseJson.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
use Yiisoft\Arrays\ArrayHelper;

/**
* BaseJson provides concrete implementation for [[Json]].
* BaseJson provides concrete implementation for {@see Json}.
*
* Do not use BaseJson. Use [[Json]] instead.
* Do not use BaseJson. Use {@see Json} instead.
*
* @author Qiang Xue <[email protected]>
* @since 2.0
Expand Down Expand Up @@ -45,7 +45,7 @@ class BaseJson
*
* The method enhances `json_encode()` by supporting JavaScript expressions.
* In particular, the method will not encode a JavaScript expression that is
* represented in terms of a [[JsExpression]] object.
* represented in terms of a {@see JsExpression} object.
*
* Note that data encoded as JSON must be UTF-8 encoded according to the JSON specification.
* You must ensure strings passed to this method have proper encoding before passing them.
Expand Down Expand Up @@ -76,7 +76,7 @@ public static function encode($value, $options = 320, $depth = 512)
*
* The method enhances `json_encode()` by supporting JavaScript expressions.
* In particular, the method will not encode a JavaScript expression that is
* represented in terms of a [[JsExpression]] object.
* represented in terms of a {@see JsExpression} object.
*
* Note that data encoded as JSON must be UTF-8 encoded according to the JSON specification.
* You must ensure strings passed to this method have proper encoding before passing them.
Expand Down Expand Up @@ -114,7 +114,7 @@ public static function decode($json, $asArray = true, $depth = 512, $options = 0
}

/**
* Handles [[encode()]] and [[decode()]] errors by throwing exceptions with the respective error message.
* Handles {@see encode()} and {@see decode()} errors by throwing exceptions with the respective error message.
*
* @param int $lastError error code from [json_last_error()](http://php.net/manual/en/function.json-last-error.php).
* @throws InvalidArgumentException if there is any encoding/decoding error.
Expand Down
48 changes: 24 additions & 24 deletions src/helpers/BaseUrl.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
use yii\helpers\Yii;

/**
* BaseUrl provides concrete implementation for [[Url]].
* BaseUrl provides concrete implementation for {@see Url}.
*
* Do not use BaseUrl. Use [[Url]] instead.
* Do not use BaseUrl. Use {@see Url} instead.
*
* @author Alexander Makarov <[email protected]>
* @since 2.0
Expand All @@ -30,7 +30,7 @@ class BaseUrl
/**
* Creates a URL for the given route.
*
* This method will use [[\yii\web\UrlManager]] to create a URL.
* This method will use {@see \yii\web\UrlManager} to create a URL.
*
* You may specify the route as a string, e.g., `site/index`. You may also use an array
* if you want to specify additional query parameters for the URL being created. The
Expand All @@ -53,11 +53,11 @@ class BaseUrl
* while a relative route has none (e.g. `site/index` or `index`). A relative route will be converted
* into an absolute one by the following rules:
*
* - If the route is an empty string, the current [[\yii\web\Controller::route|route]] will be used;
* - If the route is an empty string, the current {@see \yii\web\Controller::route|route} will be used;
* - If the route contains no slashes at all (e.g. `index`), it is considered to be an action ID
* of the current controller and will be prepended with [[\yii\web\Controller::uniqueId]];
* of the current controller and will be prepended with {@see \yii\web\Controller::uniqueId};
* - If the route has no leading slash (e.g. `site/index`), it is considered to be a route relative
* to the current module and will be prepended with the module's [[\yii\base\Module::uniqueId|uniqueId]].
* to the current module and will be prepended with the module's {@see \yii\base\Module::uniqueId|uniqueId}.
*
* Starting from version 2.0.2, a route can also be specified as an alias. In this case, the alias
* will be converted into the actual route first before conducting the above transformation steps.
Expand Down Expand Up @@ -86,7 +86,7 @@ class BaseUrl
* @param bool|string $scheme the URI scheme to use in the generated URL:
*
* - `false` (default): generating a relative URL.
* - `true`: returning an absolute base URL whose scheme is the same as that in [[\yii\web\UrlManager::$hostInfo]].
* - `true`: returning an absolute base URL whose scheme is the same as that in {@see \yii\web\UrlManager::$hostInfo}.
* - string: generating an absolute URL with the specified scheme (either `http`, `https` or empty string
* for protocol-relative URL).
*
Expand All @@ -111,9 +111,9 @@ public static function toRoute($route, $scheme = false)
*
* A relative route is a route without a leading slash, such as "view", "post/view".
*
* - If the route is an empty string, the current [[\yii\web\Controller::route|route]] will be used;
* - If the route is an empty string, the current {@see \yii\web\Controller::route|route} will be used;
* - If the route contains no slashes at all, it is considered to be an action ID
* of the current controller and will be prepended with [[\yii\web\Controller::uniqueId]];
* of the current controller and will be prepended with {@see \yii\web\Controller::uniqueId};
* - If the route has no leading slash, it is considered to be a route relative
* to the current module and will be prepended with the module's uniqueId.
*
Expand Down Expand Up @@ -149,20 +149,20 @@ protected static function normalizeRoute($route)
/**
* Creates a URL based on the given parameters.
*
* This method is very similar to [[toRoute()]]. The only difference is that this method
* This method is very similar to {@see toRoute()}. The only difference is that this method
* requires a route to be specified as an array only. If a string is given, it will be treated as a URL.
* In particular, if `$url` is
*
* - an array: [[toRoute()]] will be called to generate the URL. For example:
* `['site/index']`, `['post/index', 'page' => 2]`. Please refer to [[toRoute()]] for more details
* - an array: {@see toRoute()} will be called to generate the URL. For example:
* `['site/index']`, `['post/index', 'page' => 2]`. Please refer to {@see toRoute()} for more details
* on how to specify a route.
* - a string with a leading `@`: it is treated as an alias, and the corresponding aliased string
* will be returned.
* - an empty string: the currently requested URL will be returned;
* - a normal string: it will be returned as is.
*
* When `$scheme` is specified (either a string or `true`), an absolute URL with host info (obtained from
* [[\yii\web\UrlManager::$hostInfo]]) will be returned. If `$url` is already an absolute URL, its scheme
* {@see \yii\web\UrlManager::$hostInfo}) will be returned. If `$url` is already an absolute URL, its scheme
* will be replaced with the specified one.
*
* Below are some examples of using this method:
Expand Down Expand Up @@ -201,7 +201,7 @@ protected static function normalizeRoute($route)
* @param bool|string $scheme the URI scheme to use in the generated URL:
*
* - `false` (default): generating a relative URL.
* - `true`: returning an absolute base URL whose scheme is the same as that in [[\yii\web\UrlManager::$hostInfo]].
* - `true`: returning an absolute base URL whose scheme is the same as that in {@see \yii\web\UrlManager::$hostInfo}.
* - string: generating an absolute URL with the specified scheme (either `http`, `https` or empty string
* for protocol-relative URL).
*
Expand Down Expand Up @@ -269,7 +269,7 @@ public static function ensureScheme($url, $scheme)
* @param bool|string $scheme the URI scheme to use in the returned base URL:
*
* - `false` (default): returning the base URL without host info.
* - `true`: returning an absolute base URL whose scheme is the same as that in [[\yii\web\UrlManager::$hostInfo]].
* - `true`: returning an absolute base URL whose scheme is the same as that in {@see \yii\web\UrlManager::$hostInfo}.
* - string: returning an absolute base URL with the specified scheme (either `http`, `https` or empty string
* for protocol-relative URL).
* @return string
Expand All @@ -286,12 +286,12 @@ public static function base($scheme = false)
}

/**
* Remembers the specified URL so that it can be later fetched back by [[previous()]].
* Remembers the specified URL so that it can be later fetched back by {@see previous()}.
*
* @param string|array $url the URL to remember. Please refer to [[to()]] for acceptable formats.
* @param string|array $url the URL to remember. Please refer to {@see to()} for acceptable formats.
* If this parameter is not specified, the currently requested URL will be used.
* @param string $name the name associated with the URL to be remembered. This can be used
* later by [[previous()]]. If not set, [[\yii\web\User::setReturnUrl()]] will be used with passed URL.
* later by {@see previous()}. If not set, {@see \yii\web\User::setReturnUrl()} will be used with passed URL.
* @see previous()
* @see \yii\web\User::setReturnUrl()
*/
Expand All @@ -307,10 +307,10 @@ public static function remember($url = '', $name = null)
}

/**
* Returns the URL previously [[remember()|remembered]].
* Returns the URL previously {@see remember()|remembered}.
*
* @param string $name the named associated with the URL that was remembered previously.
* If not set, [[\yii\web\User::getReturnUrl()]] will be used to obtain remembered URL.
* If not set, {@see \yii\web\User::getReturnUrl()} will be used to obtain remembered URL.
* @return string|null the URL previously remembered. Null is returned if no URL was remembered with the given name
* and `$name` is not specified.
* @see remember()
Expand All @@ -328,8 +328,8 @@ public static function previous($name = null)
/**
* Returns the canonical URL of the currently requested page.
*
* The canonical URL is constructed using the current controller's [[\yii\web\Controller::route]] and
* [[\yii\web\Controller::actionParams]]. You may use the following code in the layout view to add a link tag
* The canonical URL is constructed using the current controller's {@see \yii\web\Controller::route} and
* {@see \yii\web\Controller::actionParams}. You may use the following code in the layout view to add a link tag
* about canonical URL:
*
* ```php
Expand All @@ -352,7 +352,7 @@ public static function canonical()
* @param bool|string $scheme the URI scheme to use for the returned URL:
*
* - `false` (default): returning a relative URL.
* - `true`: returning an absolute base URL whose scheme is the same as that in [[\yii\web\UrlManager::$hostInfo]].
* - `true`: returning an absolute base URL whose scheme is the same as that in {@see \yii\web\UrlManager::$hostInfo}.
* - string: returning an absolute URL with the specified scheme (either `http`, `https` or empty string
* for protocol-relative URL).
*
Expand Down Expand Up @@ -418,7 +418,7 @@ public static function isRelative($url)
* @param bool|string $scheme the URI scheme to use in the generated URL:
*
* - `false` (default): generating a relative URL.
* - `true`: returning an absolute base URL whose scheme is the same as that in [[\yii\web\UrlManager::$hostInfo]].
* - `true`: returning an absolute base URL whose scheme is the same as that in {@see \yii\web\UrlManager::$hostInfo}.
* - string: generating an absolute URL with the specified scheme (either `http`, `https` or empty string
* for protocol-relative URL).
*
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/Html.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*
* Nearly all of the methods in this class allow setting additional html attributes for the html
* tags they generate. You can specify, for example, `class`, `style` or `id` for an html element
* using the `$options` parameter. See the documentation of the [[tag()]] method for more details.
* using the `$options` parameter. See the documentation of the {@see tag()} method for more details.
*
* For more details and usage information on Html, see the [guide article on html helpers](guide:helper-html).
*
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/IpHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* Class IpHelper provides a set of IP-related static methods.
*
* Methods expect correct IP addresses.
* To validate IP addresses use [[\yii\validators\IpValidator|IpValidator]].
* To validate IP addresses use {@see \yii\validators\IpValidator|IpValidator}.
*
* @author Dmytro Naumenko <[email protected]>
* @since 2.0.14
Expand Down
Loading

0 comments on commit 9a8b4db

Please sign in to comment.