记录动作测算耗时.
@param string $value
480044
private function action($value = 'start')
    {
        if ($value == 'start') {
            $this->useTime = microtime(true);
        } else {
            $this->useTime = (int)((microtime(true) - $this->useTime) * 1000);
        }
    }
1278287
public function setTitle($value)
    {
        $this->_validateNotNull('Title', $value);
        $this->_validateString('Title', $value);

        if ($this->data['title'] === $value) {
            return;
        }

        $this->data['title'] = $value;

        $this->_setModified('title');
    }
784720
public function setValue($value)
    {
        if ($this->value instanceof Binding && !($value instanceof Binding)) {
            $this->value->setValue($value);
        } else {
            $this->value = $value;
        }
    }
752644
public function setValue($value)
    {
        if (!is_string($value) && !is_array($value) && !is_object($value) &&!is_bool($value) &&!is_int($value)) {
            throw new TypeException('$value must be of type string, array or object.');
        }
        $this->value = $value;
    }
1151981
public function setValue($value)
    {
        foreach ((array)$this as $element) {
            if ($value == $element->getElement()->getValue()) {
                $element->getElement()->check();
            } else {
                $element->getElement()->check(false);
            }
        }
    }
16144
public function set($key, $value)
    {
        if (strpos($key, '.') !== false) {
            $this->setSubValue($key, $value);
        } else {
            $this->setByKey($key, $value);
        }

        $this->resetLang();
    }
1152353
public function _resolve($value) {
        if ($this->state === self::PENDING) {
            $this->value = $value;
            for ($i = 0; $i < count($this->success_pending); $i++) {
                $callback = $this->success_pending[$i];
                $callback($value);
            }
            $this->state = self::RESOLVED;
        }
    }
1071212
public function validate(string $value)
    {
        if (!$value || $value <= $this->maximumValue) {
            return;
        }

        $this->error['max.%'] = [$this->maximumValue];
    }
420856
public final function setValue($value) {
		$this->assetConstraints($value);

		$this->value = $value;
		$this->valueLoaded = true;
	}
143327
public static function isIdentity(&$value) {
        if ( $value == '' ) return true;
        if ( strlen($value) != 15 && strlen($value) != 18 )
            return false;
        //如果是15位的身份证号码则转换位18位的身份证号码
        if ( strlen($value) == 15 ) $value = self::idcard_15to18($value);

        return self::idcard_checksum18($value);
    }
454169
public function setValue($value) : void
    {
        if (is_object($value) && !($value instanceof ArrayObject)) {
            $this->class = $value;
            if (isset($this->value)) {
                $old = clone $this->value;
                $work = clone $value;
                if ($work instanceof JsonSerializable) {
                    $work = $work->jsonSerialize();
                }
                foreach ($work as $prop => $status) {
                    $value->$prop = isset($old->$prop) ? $old->$prop : false;
                }
            }
            $this->value = $value;
        }
        if (!isset($this->value)) {
            $this->value = clone $this->class;
        }
        if (is_array($value) || $value instanceof ArrayObject) {
            $work = clone $this->value;
            if ($work instanceof JsonSerializable) {
                $work = $work->jsonSerialize();
            }
            foreach ($work as $prop => $status) {
                $this->value->$prop = false;
            }
            foreach ($value as $prop) {
                if (is_string($prop) && $this->hasBit($prop) && isset($this->value->$prop)) {
                    $this->value->$prop = true;
                }
            }
        }
        $found = [];
        foreach ((array)$this as $element) {
            if ($element->getElement() instanceof Hidden) {
                continue;
            }
            $check = $element->getElement()->getValue();
            if (isset($this->value->$check) && $this->value->$check) {
                $element->getElement()->check();
            } else {
                $element->getElement()->check(false);
            }
            $found[] = $check;
        }
    }
1042540
private static function _parseStringArray($value)
    {
        if (strlen($value)) {
            $vals = explode(',', $value);
            if ($vals === false)
                return false;
//            $vals = array_unique($vals); // 不需要去重, 不影响结果. 程序员不应该写出重复的字符串
        } else
            $vals = [''];
        if (count($vals) === 0)
            return false;
        return $vals;
    }
1114866
public function setStringValue($value = null)
    {
        if ($value !== null && ! $value instanceof \Protobuf\Stream) {
            $value = \Protobuf\Stream::wrap($value);
        }

        $this->string_value = $value;
    }
225345
public function validate($value)
    {
        try {
            $this->_validate($value);
        } catch (RootException $e) {
            if ($e instanceof ValidationFailedExceptionInterface) {
                throw $e;
            }

            $this->_throwValidationException($this->__('Problem validating'), null, $e, true);
        }
    }
500495
public function set($property, $value)
    {
        $properties = $this->getValue('properties', []);
        $properties[$property] = [$value];
        $this->setValue('properties', $properties);
    }
1059229
public function post($value)
    {
        if (!isset($this->post[$value])) {
            return false;
        } else {
            return $this->post[$value];
        }
    }
1276220
public function setValue($value, $default = false)
    {
        if ($value != $this->value && !$default) {
            $this->valueChanged = true;
        }

        if (is_string($value) || is_int($value) || is_float($value)) {
            $this->value = (string)$value;
        } else {
            $this->value = null;
        }
    }