只允许字母和数字
@return $this
326545
public function isAlphaNum() {
        $this->check_role = 'alphaNum';
        $result = $this->checkRegex($this->value, '/^[A-Za-z0-9]+$/');
        $this->checkResult($result);
        return $this;
    }
971389
function init() {
        if (is_null($this->conf)) {
            $this->conf = [];
        }
        
        $yp = parse_ini_file("yunpian.ini");
        foreach ($yp as $key => $value) {
            $this->conf[$key] = $value;
        }
        return $this;
    }
1222313
public function reset()
	{
		$this->_current_cfg = [];
		$this->_cfg = [];
    $this->_root_element = false;
    $this->_current_element = false;
		foreach ( $this->_defaults as $k => $v ){
			$this->_current_cfg[$k] = $v;
		}
    return $this;
	}
661034
public function delete(){

        foreach($this->_items as $key => $item){
            if($item->exists()){
                $deleted = $item->delete();
                if($deleted){
                   unset($this->_items[$key]);
                }
            }
        }

        return $this;

    }
654538
public function active()
    {
        if(!\Yii::$app->user->isGuest && !\Yii::$app->user->identity->isAdmin)
        {
            $this->andWhere(['deleted_at' => NULL]);
        }
        return $this;
    }
855915
public function start()
    {
        foreach ($this->items as $run) {
            if (!$run->hasStarted()) {
                $run->start();
            }
        }
        return $this;
    }
202940
public function remove(): self
    {
        if ($this->_parent) {
            $id = spl_object_hash($this);
            unset($this->_parent->_children[$id]);
            unset($this->_parent);
        }
        return $this;
    }
83862
public function init()
    {
        $this->setupSupportedArgs($this->supportedArgs);
        $this->parseArgv($this->argv);
        return $this;
    }
629982
public function makeUse()
    {
        ++$this->used;

        if ($this->count > 0 && $this->count <= $this->used) {
            $this->enabled = false;
        }

        return $this;
    }
624002
public function populate()
    {
        $password = \Yii::$app->security->generateRandomString(6);

        $this->generateUsername();
        $this->setPassword($password);
        $this->generateAuthKey();

        return $this;
    }
1064683
public function clear()
    {
        $keys = array_keys($this->values);
        foreach ($keys as $key)
            unset($this->values[$key]);
        return $this;
    }
112706
public function reset()
    {
        $this->_data     = array();
        $this->_modified = array();

        if ($this->isConnected()) {
            $this->_data = $this->getTable()->getDefaults();
        }

        return $this;
    }
1314616
public function overload(): self
    {
        $this->loader = new Loader($this->files);
        $this->loader->load();

        return $this;
    }
543833
public function multi()
    {
        if ($this->state->check(MultiExecState::INITIALIZED | MultiExecState::CAS)) {
            $this->state->unflag(MultiExecState::CAS);
            $this->call('MULTI');
        } else {
            $this->initialize();
        }

        return $this;
    }
852575
public function disable(): self
    {
        if (!empty($this->logs)) {
            $this->logs->removeListener($this);
        }

        return $this;
    }
398212
public function cleanup(): self
    {
        foreach ($this->original as $key => $value) {
            ini_set($key, $value);
        }

        $this->original = [];

        return $this;
    }
1219551
public static function init() {
		if ( is_null( self::$instance ) ) {
			self::$instance = new self();
			self::hooks( self::$instance );
		}
		return self::$instance;
	}