Check whether the attribute is init datetime.
@param mixed $attribute
@return boolean
494009
protected function isInitDatetime($attribute)
    {
        if ($this->timeFormat === static::$timeFormatDatetime) {
            return $attribute == static::$initDatetime || $attribute == null;
        }
        if ($this->timeFormat === static::$timeFormatTimestamp) {
            return $attribute == static::$initTimestamp || $attribute == null;
        }
        return false;
    }
556991
public function getAttribute($attribute)
    {
        switch ($attribute) {
            case self::PROPEL_ATTR_CACHE_PREPARES:
                return $this->isCachePreparedStatements;
                break;
            default:
                return $this->connection->getAttribute($attribute);
        }
    }
1037523
protected function isDerivedAttribute(Attribute $attribute)
    {
        return preg_match($this->getAgePattern(), $attribute->getName()) ? true : false;
    }
1357200
public function validateTimeZone($attribute)
    {
        if (!in_array($this->$attribute, timezone_identifiers_list())) {
            $this->addError($attribute, Yii::t('yuncms', 'Time zone is not valid'));
        }
    }
629019
public function isHashed($attribute)
    {
        if ( ! array_key_exists($attribute, $this->attributes)) {
            return false;
        }

        $info = password_get_info($this->attributes[$attribute]);

        return (bool) ($info['algo'] !== 0);
    }
108967
public function __isset($attr)
    {
        if ($attr === 'name') {
            return $this->firstSetNameLocale() === null ? false : true;
        }

        return parent::__isset($attr);
    }
1267214
public function validateTimezone($attribute, $value)
    {
        try {
            new DateTimeZone($value);
        } catch (Exception $e) {
            return false;
        } catch (Throwable $e) {
            return false;
        }

        return true;
    }
671733
public static function isISODate($val)
    {
        if(!is_string($val)) {
            return false;
        }

        // Use DateTime support to check for valid dates.
        try
        {
            $date = new DateTime($val);
        }
        catch(Exception $e)
        {
            return false;
        }

        return true;
    }
467398
public function hasErrors($attribute = null)
    {
        if (!count($this->_errors)) {
            return false;
        }
        if ($attribute && isset($this->_errors[$attribute]) && count($this->_errors[$attribute])) {
            return true;
        } elseif ($attribute) {
            return false;
        }
        return true;
    }
804212
public function was_changed( $attributes = null ) {
		return $this->has_changes(
			$this->get_changes(), is_array( $attributes ) ? $attributes : func_get_args()
		);
	}
1256780
protected function validateTagAttribute(string $attribute) : bool
    {
        if (!empty($this->attributePattern)) {
            $matches = [];
            return preg_match($this->attributePattern, $attribute, $matches);
        } else {
            return empty($attribute);
        }
    }
637370
final public function hasAttribute (string $attribute) : bool
	{
		$objectAttributes = $this->attributes();
		return array_key_exists($attribute, $objectAttributes);
	}
370222
public function datetime($value): bool
    {
        if (!is_scalar($value)) {
            return false;
        }

        if (is_numeric($value)) {
            return true;
        }

        return (int)strtotime($value) != 0;
    }
729846
public function validateFilled($attribute, $value)
    {
        if (Arr::has($this->data, $attribute)) {
            return $this->validateRequired($attribute, $value);
        }

        return true;
    }
800251
public static function isDate($object)
    {
        return $object instanceof \DateTime || (static::isString($object) && strtotime((string)$object) !== false);
    }
354160
public function isDue(\DateTime $date = null)
    {
        // The execution time is being defaulted if not defined
        if (!$this->executionTime) {
            $this->at('* * * * *');
        }

        $date = $date ?? $this->creationTime;

        return $this->executionTime->isDue($date);
    }
1312987
public function is_dirty( $attributes = null ) {
		return $this->has_changes(
			$this->get_dirty(), is_array( $attributes ) ? $attributes : func_get_args()
		);
	}