for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* _ __ __ _____ _____ ___ ____ _____
* | | / // // ___//_ _// || __||_ _|
* | |/ // /(__ ) / / / /| || | | |
* |___//_//____/ /_/ /_/ |_||_| |_|
* @link https://vistart.me/
* @copyright Copyright (c) 2016 - 2017 vistart
* @license https://vistart.me/license/
*/
namespace rhosocial\base\models\queries;
* Description of BaseUserQuery
*
* @version 1.0
* @author vistart <[email protected]>
class BaseUserQuery extends BaseEntityQuery
{
* Specify active status.
* @param integer $active
* @return static
public function active($active)
$model = $this->noInitModel;
if (!is_string($model->statusAttribute)) {
return $this;
}
return $this->andWhere([$model->statusAttribute => $active]);
* Specify source.
* @param null|string|array $source
public function source($source = null)
if (!is_string($model->sourceAttribute)) {
if (!is_string($source)) {
$modelClass = $this->modelClass;
$source = $modelClass::$sourceSelf;
return $this->andWhere([$model->sourceAttribute => $source]);