Browse Source

callback -> callable

this term is resolveable by the php docs when linking types in apidoc
tags/2.0.0-beta
Carsten Brandt 11 years ago
parent
commit
f7148c2d80
  1. 5
      framework/console/controllers/AssetController.php
  2. 2
      framework/widgets/DetailView.php
  3. 2
      framework/widgets/ListView.php

5
framework/console/controllers/AssetController.php

@ -62,7 +62,7 @@ class AssetController extends Controller
*/
public $targets = [];
/**
* @var string|callback JavaScript file compressor.
* @var string|callable JavaScript file compressor.
* If a string, it is treated as shell command template, which should contain
* placeholders {from} - source file name - and {to} - output file name.
* Otherwise, it is treated as PHP callback, which should perform the compression.
@ -72,7 +72,7 @@ class AssetController extends Controller
*/
public $jsCompressor = 'java -jar compiler.jar --js {from} --js_output_file {to}';
/**
* @var string|callback CSS file compressor.
* @var string|callable CSS file compressor.
* If a string, it is treated as shell command template, which should contain
* placeholders {from} - source file name - and {to} - output file name.
* Otherwise, it is treated as PHP callback, which should perform the compression.
@ -88,6 +88,7 @@ class AssetController extends Controller
*/
private $_assetManager = [];
/**
* Returns the asset manager instance.
* @throws \yii\console\Exception on invalid configuration.

2
framework/widgets/DetailView.php

@ -76,7 +76,7 @@ class DetailView extends Widget
*/
public $attributes;
/**
* @var string|callback the template used to render a single attribute. If a string, the token `{label}`
* @var string|callable the template used to render a single attribute. If a string, the token `{label}`
* and `{value}` will be replaced with the label and the value of the corresponding attribute.
* If a callback (e.g. an anonymous function), the signature must be as follows:
*

2
framework/widgets/ListView.php

@ -25,7 +25,7 @@ class ListView extends BaseListView
*/
public $itemOptions = [];
/**
* @var string|callback the name of the view for rendering each data item, or a callback (e.g. an anonymous function)
* @var string|callable the name of the view for rendering each data item, or a callback (e.g. an anonymous function)
* for rendering each data item. If it specifies a view name, the following variables will
* be available in the view:
*

Loading…
Cancel
Save