验证规则
@return array
761540
public function rules()
    {
        return ArrayHelper::merge(parent::rules(), [
            // nickname rules
            'nicknameRequired' => ['nickname', 'required', 'on' => [self::SCENARIO_EMAIL_REGISTER, self::SCENARIO_CONNECT]],
            // email rules
            'emailRequired' => ['email', 'required', 'on' => [self::SCENARIO_EMAIL_REGISTER]],
            //mobile rules
            'mobileRequired' => ['mobile', 'required', 'on' => [self::SCENARIO_MOBILE_REGISTER]],
            // password rules
            'passwordRequired' => ['password', 'required', 'on' => [self::SCENARIO_EMAIL_REGISTER, self::SCENARIO_MOBILE_REGISTER]],
            // tags rules
            'tags' => ['tagValues', 'safe'],

            'transfer_balance' => ['transfer_balance', 'number'],
            'balance' => ['balance', 'number'],
        ]);
    }
1291848
public function getData()
    {
        $result = [
            'content_type' => $this->type
        ];

        switch($this->type)
        {
            case self::TYPE_LOCATION:
                $result['image_url'] = $this->image_url;
                break;

            case self::TYPE_TEXT:
                $result['payload'] = $this->payload;
                $result['title'] = $this->title;
                $result['image_url'] = $this->image_url;
                break;
                
            case self::TYPE_USER_PHONE_NUMBER:
                $result['payload'] = $this->payload;
                break;
                
            case self::TYPE_USER_EMAIL:
                $result['payload'] = $this->payload;
                break;
        }

        return $result;
    }
1343933
public function getFields()
    {
        $fields = $this->getInput('fields');

        if (! is_array($fields)) {
            return [];
        }

        return array_map(function ($fields) {
            return explode(',', $fields);
        }, $fields);
    }
678950
public function getAttributes()
    {
        return [
            'name'        => $this->name,
            'shortcut'    => $this->shortcut,
            'mode'        => $this->mode,
            'description' => $this->description,
            'default'     => $this->default,
        ];
    }
328655
public function toArray(): array
    {
        return [
            'name' => $this->name,
            'method' => $this->method,
            'url' => $this->url,
            'model' => $this->model,
            'view' => $this->view,
            'controller' => $this->controller,
            'action' => $this->action,
            'default' => $this->default,
            'param' => $this->param,
            'callback' => $this->callback
        ];
    }
435377
public function get()
    {
        $result = [];

        foreach ($this->map as $attribute => $key) {
            $value = $this->getByKey($key);
            $result[$attribute] = $value;
        }

        return $result;
    }
14830
protected function getData()
    {
        if ($this->argument('user')) {
            return [
                'name' => $this->argument('name'),
                'user' => $this->argument('user'),
                'password' => $this->argument('password')
            ];
        } else {
            return [
                'name' => $this->argument('name')
            ];
        }
    }
191084
public function toArray()
    {
        return [
            'userAgent'          => $this->userAgent,
            'browser'            => $this->browser,
            'version'            => $this->version,
            'majorVersion'       => $this->majorVersion,
            'minorVersion'       => $this->minorVersion,
            'browserWithVersion' => $this->browserWithVersion,
            'publisher'          => $this->publisher,
            'platform'           => $this->platform,
            'device'             => $this->device,
            'devicePointer'      => $this->devicePointer,
            'isMobile'           => $this->isMobile,
            'isTablet'           => $this->isTablet(),
            'isCrawler'          => $this->isCrawler,
        ];
    }
891925
public function getData() : array
    {
        $data = [];

        if ($this->getRequest()->getMethod() == Request::METHOD_POST) {
            $data = $_POST ?: [];
        }

        return $data;
    }
1147638
public function get(): array
    {
        $data = [];

        foreach ($this->data as $row) {
            $data[] = $row->get();
        }

        return $data;
    }
1193975
public function getAttributes()
    {
        $return = [];
        foreach ($this->attr as $attr => $info) {
            $return[$attr] = $this->getAttribute($attr);
        }

        return $return;
    }
761038
public function getError()
    {
        if ($this->errorCode !== null || $this->success === false) {
            return [
                'code'    => $this->errorCode === null ? self::UNKNOWN_ERROR_CODE : $this->errorCode,
                'message' => $this->errorMessage === null ? self::UNKNOWN_ERROR_MSG : $this->errorMessage
            ];
        } else {
            return null;
        }
    }
642698
public function getValues(): array
    {
        $result = array();

        foreach ($this->_definition as $key => $value) {
            $result[$key] = $this->$key;
        }

        return $result;
    }
776823
public function getHeadersAsArray()
    {
        $headers = array();
        foreach ($this->getHeaders() as $headerNode) {
            $header = array(
                'type' => $headerNode->getType(),
                'name' => $headerNode->getName(),
                'value' => $headerNode->getValue(),
                'uri' => $headerNode->getUri(),
                'override' => $headerNode->getOverride(),
                'append' => $headerNode->getAppend()
            );
            $headers[$headerNode->getType()][] = $header;
        }
        return $headers;
    }
244423
public function toArray()
	{
		$price = $this->_price;
		$locale = $this->_locale;

		return array(
			'order.base.id' => $this->getId(),
			'order.base.siteid' => $this->getSiteId(),
			'order.base.sitecode' => $this->getSiteCode(),
			'order.base.languageid' => $locale->getLanguageId(),
			'order.base.comment' => $this->getComment(),
			'order.base.customerid' => $this->getCustomerId(),
			'order.base.price' => $price->getValue(),
			'order.base.costs' => $price->getCosts(),
			'order.base.rebate' => $price->getRebate(),
			'order.base.currencyid' => $price->getCurrencyId(),
			'order.base.status' => $this->getStatus(),
			'order.base.mtime' => $this->getTimeModified(),
			'order.base.ctime' => $this->getTimeCreated(),
			'order.base.editor' => $this->getEditor(),
		);
	}
849966
public function data()
    {
        return [
            'property'    => $this->property(),
            'table'       => $this->table(),
            'value'       => $this->value(),
            'func'        => $this->func(),
            'operator'    => $this->operator(),
            'conjunction' => $this->conjunction(),
            'filters'     => $this->filters(),
            'condition'   => $this->condition(),
            'active'      => $this->active(),
            'name'        => $this->name(),
        ];
    }
543947
public function getValues() {
        $result = array();

        foreach ($this->items as $key => $entry) {
            $result[] = $entry->value;
        }

        return $result;
    }