Commit 77368538 by Carsten Brandt

property code style extensions

parent 63b98dbc
......@@ -278,7 +278,7 @@ class PhpDocController extends Controller
}
if (trim($line) === '') {
unset($lines[$i]);
} elseif (ltrim($line)[0] !== '*' && strpos($line, 'function') !== false) {
} elseif (ltrim($line)[0] !== '*' && strpos($line, 'function ') !== false) {
break;
} elseif (trim($line) === '}') {
$propertiesOnly = true;
......@@ -309,32 +309,33 @@ class PhpDocController extends Controller
${'endof'.$property} = $i;
}
if (strncmp(trim($line), 'public $', 8) === 0 || strncmp(trim($line), 'public static $', 15) === 0) {
$line = trim($line);
if (strncmp($line, 'public $', 8) === 0 || strncmp($line, 'public static $', 15) === 0) {
$endofPublic = $i;
$property = 'Public';
$level = 0;
} elseif (strncmp(trim($line), 'protected $', 11) === 0 || strncmp(trim($line), 'protected static $', 18) === 0) {
} elseif (strncmp($line, 'protected $', 11) === 0 || strncmp($line, 'protected static $', 18) === 0) {
$endofProtected = $i;
$property = 'Protected';
$level = 0;
} elseif (strncmp(trim($line), 'private $', 9) === 0 || strncmp(trim($line), 'private static $', 16) === 0) {
} elseif (strncmp($line, 'private $', 9) === 0 || strncmp($line, 'private static $', 16) === 0) {
$endofPrivate = $i;
$property = 'Private';
$level = 0;
} elseif (substr(trim($line),0 , 6) === 'const ') {
} elseif (substr($line,0 , 6) === 'const ') {
$endofConst = $i;
$property = false;
} elseif (substr(trim($line),0 , 4) === 'use ') {
} elseif (substr($line,0 , 4) === 'use ') {
$endofUse = $i;
$property = false;
} elseif (ltrim($line)[0] === '*') {
} elseif (!empty($line) && $line[0] === '*') {
$property = false;
} elseif (ltrim($line)[0] !== '*' && strpos($line, 'function') !== false || trim($line) === '}') {
} elseif (!empty($line) && $line[0] !== '*' && strpos($line, 'function ') !== false || $line === '}') {
break;
}
// check for multi line array
if ($property !== false && strncmp(trim($line), "'SQLSTATE[", 10) !== 0) {
if ($property !== false && strncmp($line, "'SQLSTATE[", 10) !== 0) {
$level += substr_count($line, '[') - substr_count($line, ']');
}
}
......
......@@ -28,8 +28,8 @@ class ApiController extends BaseController
*/
public $guide;
// TODO add force update option
// TODO add force update option
/**
* Renders API documentation files
* @param array $sourceDirs
......
......@@ -28,6 +28,7 @@ class GuideController extends BaseController
*/
public $apiDocs;
/**
* Renders API documentation files
* @param array $sourceDirs
......
......@@ -30,6 +30,7 @@ abstract class BaseController extends Controller
*/
public $exclude;
protected function normalizeTargetDir($target)
{
$target = rtrim(Yii::getAlias($target), '\\/');
......
<?php
/**
*
*
* @author Carsten Brandt <mail@cebe.cc>
* @link http://www.yiiframework.com/
* @copyright Copyright (c) 2008 Yii Software LLC
* @license http://www.yiiframework.com/license/
*/
namespace yii\apidoc\helpers;
use cebe\jssearch\Indexer;
use cebe\jssearch\tokenizer\StandardTokenizer;
use cebe\jssearch\TokenizerInterface;
......
......@@ -31,6 +31,7 @@ class ApiMarkdown extends GithubMarkdown
protected $renderingContext;
/**
* Renders a code block
*/
......
......@@ -29,6 +29,7 @@ class ApiMarkdownLaTeX extends GithubMarkdown
protected $renderingContext;
protected function inlineMarkers()
{
return array_merge(parent::inlineMarkers(), [
......
......@@ -17,6 +17,7 @@ class IndexFileAnalyzer extends Markdown
private $_chapter = 0;
private $_chapters = [];
public function analyze($text)
{
$this->parse($text);
......
......@@ -24,24 +24,21 @@ class BaseDoc extends Object
* @var \phpDocumentor\Reflection\DocBlock\Context
*/
public $phpDocContext;
public $name;
public $sourceFile;
public $startLine;
public $endLine;
public $shortDescription;
public $description;
public $since;
public $deprecatedSince;
public $deprecatedReason;
/**
* @var \phpDocumentor\Reflection\DocBlock\Tag[]
*/
public $tags = [];
public function hasTag($name)
{
foreach ($this->tags as $tag) {
......
......@@ -18,10 +18,8 @@ namespace yii\apidoc\models;
class ClassDoc extends TypeDoc
{
public $parentClass;
public $isAbstract;
public $isFinal;
/**
* @var string[]
*/
......@@ -29,7 +27,6 @@ class ClassDoc extends TypeDoc
public $traits = [];
// will be set by Context::updateReferences()
public $subclasses = [];
/**
* @var EventDoc[]
*/
......@@ -39,6 +36,7 @@ class ClassDoc extends TypeDoc
*/
public $constants = [];
public function findSubject($subjectName)
{
if (($subject = parent::findSubject($subjectName)) !== null) {
......
......@@ -18,6 +18,7 @@ class ConstDoc extends BaseDoc
public $definedBy;
public $value;
/**
* @param \phpDocumentor\Reflection\ClassReflector\ConstantReflector $reflector
* @param Context $context
......
......@@ -33,9 +33,9 @@ class Context extends Component
* @var TraitDoc[]
*/
public $traits = [];
public $errors = [];
public function getType($type)
{
$type = ltrim($type, '\\');
......
......@@ -20,6 +20,7 @@ class EventDoc extends ConstDoc
public $type;
public $types;
/**
* @param \phpDocumentor\Reflection\ClassReflector\ConstantReflector $reflector
* @param Context $context
......
......@@ -30,6 +30,7 @@ class FunctionDoc extends BaseDoc
public $returnTypes;
public $isReturnByReference;
/**
* @param \phpDocumentor\Reflection\FunctionReflector $reflector
* @param Context $context
......
......@@ -16,10 +16,10 @@ namespace yii\apidoc\models;
class InterfaceDoc extends TypeDoc
{
public $parentInterfaces = [];
// will be set by Context::updateReferences()
public $implementedBy = [];
/**
* @param \phpDocumentor\Reflection\InterfaceReflector $reflector
* @param Context $context
......
......@@ -17,14 +17,12 @@ class MethodDoc extends FunctionDoc
{
public $isAbstract;
public $isFinal;
public $isStatic;
public $visibility;
// will be set by creating class
public $definedBy;
/**
* @param \phpDocumentor\Reflection\ClassReflector\MethodReflector $reflector
* @param Context $context
......
......@@ -23,13 +23,13 @@ class ParamDoc extends Object
public $isOptional;
public $defaultValue;
public $isPassedByReference;
// will be set by creating class
public $description;
public $type;
public $types;
public $sourceFile;
/**
* @param \phpDocumentor\Reflection\FunctionReflector\ArgumentReflector $reflector
* @param Context $context
......
......@@ -20,18 +20,16 @@ class PropertyDoc extends BaseDoc
{
public $visibility;
public $isStatic;
public $type;
public $types;
public $defaultValue;
// will be set by creating class
public $getter;
public $setter;
// will be set by creating class
public $definedBy;
public function getIsReadOnly()
{
return $this->getter !== null && $this->setter === null;
......
......@@ -18,9 +18,9 @@ class TraitDoc extends TypeDoc
// classes using the trait
// will be set by Context::updateReferences()
public $usedBy = [];
public $traits = [];
/**
* @param \phpDocumentor\Reflection\TraitReflector $reflector
* @param Context $context
......
......@@ -34,9 +34,9 @@ class TypeDoc extends BaseDoc
* @var PropertyDoc[]
*/
public $properties = [];
public $namespace;
public function findSubject($subjectName)
{
if ($subjectName[0] != '$') {
......
......@@ -42,10 +42,10 @@ abstract class BaseRenderer extends Component
* @var Controller the apidoc controller instance. Can be used to control output.
*/
public $controller;
public $guideUrl;
public $guideReferences = [];
public function init()
{
ApiMarkdown::$renderer = $this;
......
......@@ -24,6 +24,7 @@ class ApiRenderer extends \yii\apidoc\templates\html\ApiRenderer
public $layout = '@yii/apidoc/templates/bootstrap/layouts/api.php';
public $indexView = '@yii/apidoc/templates/bootstrap/views/index.php';
/**
* @inheritdoc
*/
......
......@@ -23,6 +23,7 @@ class GuideRenderer extends \yii\apidoc\templates\html\GuideRenderer
public $layout = '@yii/apidoc/templates/bootstrap/layouts/guide.php';
/**
* @inheritDoc
*/
......
......@@ -78,6 +78,7 @@ class SideNavWidget extends \yii\bootstrap\Widget
*/
public $activeUrl;
/**
* Initializes the widget.
*/
......
......@@ -46,12 +46,14 @@ class ApiRenderer extends BaseApiRenderer implements ViewContextInterface
* @var string path or alias of the view file to use for rendering the index page.
*/
public $indexView = '@yii/apidoc/templates/html/views/index.php';
/**
* @var View
*/
private $_view;
private $_targetDir;
public function init()
{
parent::init();
......
......@@ -34,6 +34,7 @@ abstract class GuideRenderer extends BaseGuideRenderer
private $_view;
private $_targetDir;
public function init()
{
parent::init();
......
......@@ -20,9 +20,9 @@ class ApiRenderer extends \yii\apidoc\templates\html\ApiRenderer
{
public $layout = false;
public $indexView = '@yii/apidoc/templates/online/views/index.php';
public $pageTitle = 'Yii Framework 2.0 API Documentation';
/**
* @inheritdoc
*/
......
......@@ -93,6 +93,8 @@ class AuthAction extends Action
* @var string the redirect url after unsuccessful authorization (e.g. user canceled).
*/
private $_cancelUrl = '';
/**
* @var string name or alias of the view file, which should be rendered in order to perform redirection.
* If not set default one will be used.
......
......@@ -58,6 +58,7 @@ abstract class BaseClient extends Component implements ClientInterface
*/
private $_viewOptions;
/**
* @param string $id service id.
*/
......
......@@ -39,12 +39,6 @@ abstract class BaseOAuth extends BaseClient implements ClientInterface
*/
public $version = '1.0';
/**
* @var string URL, which user will be redirected after authentication at the OAuth provider web site.
* Note: this should be absolute URL (with http:// or https:// leading).
* By default current URL will be used.
*/
private $_returnUrl;
/**
* @var string API base URL.
*/
public $apiBaseUrl;
......@@ -56,6 +50,13 @@ abstract class BaseOAuth extends BaseClient implements ClientInterface
* @var string auth request scope.
*/
public $scope;
/**
* @var string URL, which user will be redirected after authentication at the OAuth provider web site.
* Note: this should be absolute URL (with http:// or https:// leading).
* By default current URL will be used.
*/
private $_returnUrl;
/**
* @var array cURL request options. Option values from this field will overwrite corresponding
* values from [[defaultCurlOptions()]].
......@@ -70,6 +71,7 @@ abstract class BaseOAuth extends BaseClient implements ClientInterface
*/
private $_signatureMethod = [];
/**
* @param string $returnUrl return URL
*/
......
......@@ -47,6 +47,7 @@ class Collection extends Component
*/
private $_clients = [];
/**
* @param array $clients list of auth clients
*/
......
......@@ -26,6 +26,7 @@ class InvalidResponseException extends Exception
*/
public $responseBody = '';
/**
* Constructor.
* @param array $responseHeaders response headers
......
......@@ -62,6 +62,7 @@ class OAuth1 extends BaseOAuth
*/
public $accessTokenMethod = 'GET';
/**
* Fetches the OAuth request token.
* @param array $params additional request params.
......
......@@ -50,6 +50,7 @@ class OAuth2 extends BaseOAuth
*/
public $tokenUrl;
/**
* Composes user authorization URL.
* @param array $params additional auth GET params.
......
......@@ -43,6 +43,8 @@ class OAuthToken extends Object
* @var array token parameters.
*/
private $_params = [];
/**
* @var integer object creation timestamp.
*/
......
......@@ -68,7 +68,6 @@ class OpenId extends BaseClient implements ClientInterface
* ~~~
*/
public $optionalAttributes = [];
/**
* @var boolean whether to verify the peer's certificate.
*/
......@@ -83,7 +82,6 @@ class OpenId extends BaseClient implements ClientInterface
* This value will take effect only if [[verifyPeer]] is set.
*/
public $cainfo;
/**
* @var string authentication return URL.
*/
......@@ -96,6 +94,8 @@ class OpenId extends BaseClient implements ClientInterface
* @var string client trust root (realm), by default [[\yii\web\Request::hostInfo]] value will be used.
*/
private $_trustRoot;
/**
* @var array data, which should be used to retrieve the OpenID response.
* If not set combination of GET and POST will be used.
......
......@@ -57,6 +57,7 @@ class Facebook extends OAuth2
*/
public $scope = 'email';
/**
* @inheritdoc
*/
......
......@@ -53,6 +53,7 @@ class GitHub extends OAuth2
*/
public $apiBaseUrl = 'https://api.github.com';
/**
* @inheritdoc
*/
......
......@@ -55,6 +55,7 @@ class GoogleOAuth extends OAuth2
*/
public $apiBaseUrl = 'https://www.googleapis.com/plus/v1';
/**
* @inheritdoc
*/
......
......@@ -48,6 +48,7 @@ class GoogleOpenId extends OpenId
'pref/language',
];
/**
* @inheritdoc
*/
......
......@@ -56,6 +56,7 @@ class LinkedIn extends OAuth2
*/
public $apiBaseUrl = 'https://api.linkedin.com/v1';
/**
* @inheritdoc
*/
......
......@@ -53,6 +53,7 @@ class Live extends OAuth2
*/
public $apiBaseUrl = 'https://apis.live.net/v5.0';
/**
* @inheritdoc
*/
......
......@@ -65,6 +65,7 @@ class Twitter extends OAuth1
*/
public $apiBaseUrl = 'https://api.twitter.com/1.1';
/**
* @inheritdoc
*/
......
......@@ -53,6 +53,7 @@ class VKontakte extends OAuth2
*/
public $apiBaseUrl = 'https://api.vk.com/method';
/**
* @inheritdoc
*/
......
......@@ -53,6 +53,7 @@ class YandexOAuth extends OAuth2
*/
public $apiBaseUrl = 'https://login.yandex.ru';
/**
* @inheritdoc
*/
......
......@@ -46,6 +46,7 @@ class YandexOpenId extends OpenId
'contact/email',
];
/**
* @inheritdoc
*/
......
......@@ -33,6 +33,8 @@ class RsaSha1 extends BaseMethod
* This value can be fetched from file specified by [[publicCertificateFile]].
*/
protected $_publicCertificate;
/**
* @var string path to the file, which holds private key certificate.
*/
......
......@@ -96,6 +96,7 @@ class AuthChoice extends Widget
*/
private $_clients;
/**
* @param ClientInterface[] $clients auth providers
*/
......
......@@ -95,17 +95,14 @@ class ActiveField extends \yii\widgets\ActiveField
* @var bool whether to render [[checkboxList()]] and [[radioList()]] inline.
*/
public $inline = false;
/**
* @var string|null optional template to render the `{input}` placeholder content
*/
public $inputTemplate;
/**
* @var array options for the wrapper tag, used in the `{beginWrapper}` placeholder
*/
public $wrapperOptions = [];
/**
* @var null|array CSS grid classes for horizontal layout. This must be an array with these keys:
* - 'offset' the offset grid class to append to the wrapper if no label is rendered
......@@ -115,47 +112,40 @@ class ActiveField extends \yii\widgets\ActiveField
* - 'hint' the hint grid class
*/
public $horizontalCssClasses;
/**
* @var string the template for checkboxes in default layout
*/
public $checkboxTemplate = "<div class=\"checkbox\">\n{beginLabel}\n{input}\n{labelTitle}\n{endLabel}\n{error}\n{hint}\n</div>";
/**
* @var string the template for radios in default layout
*/
public $radioTemplate = "<div class=\"radio\">\n{beginLabel}\n{input}\n{labelTitle}\n{endLabel}\n{error}\n{hint}\n</div>";
/**
* @var string the template for checkboxes in horizontal layout
*/
public $horizontalCheckboxTemplate = "{beginWrapper}\n<div class=\"checkbox\">\n{beginLabel}\n{input}\n{labelTitle}\n{endLabel}\n</div>\n{error}\n{endWrapper}\n{hint}";
/**
* @var string the template for radio buttons in horizontal layout
*/
public $horizontalRadioTemplate = "{beginWrapper}\n<div class=\"radio\">\n{beginLabel}\n{input}\n{labelTitle}\n{endLabel}\n</div>\n{error}\n{endWrapper}\n{hint}";
/**
* @var string the template for inline checkboxLists
*/
public $inlineCheckboxListTemplate = "{label}\n{beginWrapper}\n{input}\n{error}\n{endWrapper}\n{hint}";
/**
* @var string the template for inline radioLists
*/
public $inlineRadioListTemplate = "{label}\n{beginWrapper}\n{input}\n{error}\n{endWrapper}\n{hint}";
/**
* @var bool whether to render the error. Default is `true` except for layout `inline`.
*/
public $enableError = true;
/**
* @var bool whether to render the label. Default is `true`.
*/
public $enableLabel = true;
/**
* @inheritdoc
*/
......
......@@ -69,7 +69,6 @@ class ActiveForm extends \yii\widgets\ActiveForm
* @var array HTML attributes for the form tag. Default is `['role' => 'form']`.
*/
public $options = ['role' => 'form'];
/**
* @var string the form layout. Either 'default', 'horizontal' or 'inline'.
* By choosing a layout, an appropriate default field configuration is applied. This will
......@@ -79,6 +78,7 @@ class ActiveForm extends \yii\widgets\ActiveForm
*/
public $layout = 'default';
/**
* @inheritdoc
*/
......
......@@ -68,6 +68,7 @@ class Alert extends Widget
*/
public $closeButton = [];
/**
* Initializes the widget.
*/
......
......@@ -39,6 +39,7 @@ class Button extends Widget
*/
public $encodeLabel = true;
/**
* Initializes the widget.
* If you override this method, make sure you call the parent implementation first.
......
......@@ -59,6 +59,7 @@ class ButtonDropdown extends Widget
*/
public $encodeLabel = true;
/**
* Renders the widget.
*/
......
......@@ -52,6 +52,7 @@ class ButtonGroup extends Widget
*/
public $encodeLabels = true;
/**
* Initializes the widget.
* If you override this method, make sure you call the parent implementation first.
......
......@@ -66,6 +66,7 @@ class Carousel extends Widget
*/
public $items = [];
/**
* Initializes the widget.
*/
......
......@@ -59,6 +59,7 @@ class Collapse extends Widget
*/
public $items = [];
/**
* Initializes the widget.
*/
......
......@@ -45,7 +45,8 @@ class Dropdown extends Widget
* @see \yii\helpers\Html::renderTagAttributes() for details on how attributes are being rendered.
*/
protected $_containerOptions = [];
/**
* Initializes the widget.
* If you override this method, make sure you call the parent implementation first.
......
......@@ -82,6 +82,7 @@ class Modal extends Widget
*/
public $toggleButton;
/**
* Initializes the widget.
*/
......
......@@ -93,6 +93,7 @@ class Nav extends Widget
*/
public $params;
/**
* Initializes the widget.
*/
......
......@@ -85,6 +85,7 @@ class NavBar extends Widget
*/
public $innerContainerOptions = [];
/**
* Initializes the widget.
*/
......
......@@ -89,6 +89,7 @@ class Progress extends Widget
*/
public $bars;
/**
* Initializes the widget.
* If you override this method, make sure you call the parent implementation first.
......
......@@ -102,6 +102,7 @@ class Tabs extends Widget
*/
public $navType = 'nav-tabs';
/**
* Initializes the widget.
*/
......
......@@ -39,6 +39,7 @@ class Widget extends \yii\base\Widget
*/
public $clientEvents = [];
/**
* Initializes the widget.
* This method will register the bootstrap asset bundle. If you override this method,
......
......@@ -27,11 +27,13 @@ abstract class BasePage extends Component
* the route and the rest of the name-value pairs are treated as GET parameters, e.g. `array('site/page', 'name' => 'about')`.
*/
public $route;
/**
* @var \Codeception\AbstractGuy the testing guy object
*/
protected $guy;
/**
* Constructor.
*
......
......@@ -33,6 +33,7 @@ class TestCase extends Test
*/
public $appConfig = '@tests/unit/_config.php';
/**
* Returns the value of an object property.
*
......
......@@ -23,9 +23,9 @@ class Installer extends LibraryInstaller
const EXTRA_WRITABLE = 'writable';
const EXTRA_EXECUTABLE = 'executable';
const EXTRA_CONFIG = 'config';
const EXTENSION_FILE = 'yiisoft/extensions.php';
/**
* @inheritdoc
*/
......
......@@ -25,6 +25,7 @@ class LogTarget extends Target
public $module;
public $tag;
/**
* @param \yii\debug\Module $module
* @param array $config
......
......@@ -49,6 +49,7 @@ class Panel extends Component
*/
public $actions = [];
/**
* @return string name of the panel
*/
......
......@@ -23,6 +23,7 @@ class Filter extends Component
*/
protected $rules = [];
/**
* Adds data filtering rule.
*
......
......@@ -22,6 +22,7 @@ abstract class Base extends Component implements MatcherInterface
*/
protected $baseValue;
/**
* @inheritdoc
*/
......
......@@ -20,6 +20,7 @@ class SameAs extends Base
*/
public $partial = false;
/**
* @inheritdoc
*/
......
......@@ -33,6 +33,7 @@ class DefaultController extends Controller
*/
public $summary;
/**
* @inheritdoc
*/
......
......@@ -23,12 +23,12 @@ class Db extends Base
* @var string type of the input search value
*/
public $type;
/**
* @var integer query attribute input search value
*/
public $query;
/**
* @inheritdoc
*/
......
......@@ -23,47 +23,40 @@ class Debug extends Base
* @var string tag attribute input search value
*/
public $tag;
/**
* @var string ip attribute input search value
*/
public $ip;
/**
* @var string method attribute input search value
*/
public $method;
/**
* @var integer ajax attribute input search value
*/
public $ajax;
/**
* @var string url attribute input search value
*/
public $url;
/**
* @var string status code attribute input search value
*/
public $statusCode;
/**
* @var integer sql count attribute input search value
*/
public $sqlCount;
/**
* @var integer total mail count attribute input search value
*/
public $mailCount;
/**
* @var array critical codes, used to determine grid row options.
*/
public $criticalCodes = [400, 404, 500];
/**
* @inheritdoc
*/
......
......@@ -23,17 +23,16 @@ class Log extends Base
* @var string ip attribute input search value
*/
public $level;
/**
* @var string method attribute input search value
*/
public $category;
/**
* @var integer message attribute input search value
*/
public $message;
/**
* @inheritdoc
*/
......
......@@ -22,52 +22,44 @@ class Mail extends Base
* @var string from attribute input search value
*/
public $from;
/**
* @var string to attribute input search value
*/
public $to;
/**
* @var string reply attribute input search value
*/
public $reply;
/**
* @var string cc attribute input search value
*/
public $cc;
/**
* @var string bcc attribute input search value
*/
public $bcc;
/**
* @var string subject attribute input search value
*/
public $subject;
/**
* @var string body attribute input search value
*/
public $body;
/**
* @var string charset attribute input search value
*/
public $charset;
/**
* @var string headers attribute input search value
*/
public $headers;
/**
* @var string file attribute input search value
*/
public $file;
public function rules()
{
return [
......
......@@ -23,12 +23,12 @@ class Profile extends Base
* @var string method attribute input search value
*/
public $category;
/**
* @var integer info attribute input search value
*/
public $info;
/**
* @inheritdoc
*/
......
......@@ -28,16 +28,17 @@ class DbPanel extends Panel
* the execution is considered taking critical number of DB queries.
*/
public $criticalQueryThreshold;
/**
* @var array db queries info extracted to array as models, to use with data provider.
*/
private $_models;
/**
* @var array current database request timings
*/
private $_timings;
/**
* @inheritdoc
*/
......
......@@ -25,6 +25,7 @@ class LogPanel extends Panel
*/
private $_models;
/**
* @inheritdoc
*/
......
......@@ -29,11 +29,13 @@ class MailPanel extends Panel
* @var string path where all emails will be saved. should be an alias.
*/
public $mailPath = '@runtime/debug/mail';
/**
* @var array current request sent messages
*/
private $_messages = [];
/**
* @inheritdoc
*/
......
......@@ -25,6 +25,7 @@ class ProfilingPanel extends Panel
*/
private $_models;
/**
* @inheritdoc
*/
......
......@@ -56,6 +56,7 @@ class ActiveRecord extends BaseActiveRecord
private $_version;
private $_highlight;
/**
* Returns the database connection used by this AR class.
* By default, the "elasticsearch" application component is used as the database connection.
......
......@@ -43,9 +43,9 @@ class Command extends Component
* @see http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-request-highlighting.html
*/
public $highlight;
public $options = [];
/**
* @param array $options
* @return mixed
......
......@@ -46,7 +46,6 @@ class Connection extends Component
* @var array the active node. key of [[nodes]]. Will be randomly selected on [[open()]].
*/
public $activeNode;
// TODO http://www.elasticsearch.org/guide/en/elasticsearch/client/php-api/current/_configuration.html#_example_configuring_http_basic_auth
public $auth = [];
/**
......@@ -62,6 +61,7 @@ class Connection extends Component
*/
public $dataTimeout = null;
public function init()
{
foreach ($this->nodes as $node) {
......
......@@ -36,6 +36,7 @@ class DebugAction extends Action
*/
public $controller;
public function run($logId, $tag)
{
$this->controller->loadData($tag);
......
......@@ -24,6 +24,7 @@ class DebugPanel extends Panel
{
public $db = 'elasticsearch';
public function init()
{
$this->actions['elasticsearch-query'] = [
......
......@@ -137,7 +137,6 @@ class Query extends Component implements QueryInterface
* on one or more fields.
*/
public $highlight;
public $facets = [];
......
......@@ -24,6 +24,7 @@ class QueryBuilder extends \yii\base\Object
*/
public $db;
/**
* Constructor.
* @param Connection $connection the database connection.
......
......@@ -164,6 +164,7 @@ class FixtureController extends \yii\console\controllers\FixtureController
* More info in [Faker](https://github.com/fzaninotto/Faker.) library docs.
*/
public $providers = [];
/**
* @var \Faker\Generator Faker generator instance
*/
......
......@@ -54,6 +54,7 @@ class CodeFile extends Object
*/
public $operation;
/**
* Constructor.
* @param string $path the file path that the new code should be saved to.
......
......@@ -58,6 +58,7 @@ abstract class Generator extends Model
*/
public $messageCategory = 'app';
/**
* @return string name of the code generator
*/
......
......@@ -21,6 +21,7 @@ class ActiveField extends \yii\widgets\ActiveField
*/
public $model;
/**
* @inheritdoc
*/
......
......@@ -27,6 +27,7 @@ class DefaultController extends Controller
*/
public $generator;
public function actionIndex()
{
$this->layout = 'main';
......
......@@ -46,6 +46,7 @@ class Generator extends \yii\gii\Generator
*/
public $actions = 'index';
/**
* @inheritdoc
*/
......
......@@ -38,6 +38,7 @@ class Generator extends \yii\gii\Generator
public $indexWidgetType = 'grid';
public $searchModelClass = '';
/**
* @inheritdoc
*/
......
......@@ -34,6 +34,7 @@ class Generator extends \yii\gii\Generator
public $authorName;
public $authorEmail;
/**
* @inheritdoc
*/
......
<?php
/**
* This is just an example.
*/
echo "<?php\n";
?>
<?= "<?php\n" ?>
namespace <?= substr($generator->namespace, 0, -1) ?>;
/**
* This is just an example.
*/
class AutoloadExample extends \yii\base\Widget
{
public function run()
......
......@@ -26,6 +26,7 @@ class Generator extends \yii\gii\Generator
public $viewName;
public $scenarioName;
/**
* @inheritdoc
*/
......
......@@ -32,6 +32,7 @@ class Generator extends \yii\gii\Generator
public $generateLabelsFromComments = false;
public $useTablePrefix = false;
/**
* @inheritdoc
*/
......
......@@ -26,6 +26,7 @@ class Generator extends \yii\gii\Generator
public $moduleClass;
public $moduleID;
/**
* @inheritdoc
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment