$this->DefaultState
@return void
330149
private function DefaultState()
	{
		$this->SkipWhitespace();
		$this->BeginToken();
		$c = $this->Peek( 0 );
		if ( $c == '\0' )
			$this->ConsumeToken1( 0 ); // EOF
		else if ( $c == '.' )
		{
			if ( $this->Peek( 1 ) == '.' )
			{
				$this->Read();
				$this->Read();
				$this->EndToken();
				$this->ConsumeToken1( Token::DOUBLE_PERIOD );
			}
			// else if ( XmlCharType.Instance.IsDigit( $this->Peek( 1 ) ) )
			else if ( preg_match( "/\d/", $this->Peek( 1 ) ) )
			{
				$this->ConsumeNumber();
			}
			else
				$this->ConsumeChar( $this->Read() );
			$this->m_state = LexerState::Operator;
		}
		else if ( $c == ')' )
		{
		    $this->ConsumeChar( $this->Read() );
		    $this->SkipWhitespace();
		    $this->BeginToken();
		    $this->m_state = LexerState::Operator;
		}
		else if ( $c == '*' )
		{
		    $this->ConsumeChar( $this->Read() );
		    if ( $this->Peek( 0 ) == ':' )
		    {
		        $this->BeginToken();
		        $this->ConsumeChar( $this->Read() );
		        $c = $this->Peek( 0 );
		        if ( $c != 0 && preg_match( "/[\p{L}_]/u", $s[0] ) ) // NCName Start char
		            $this->ConsumeNCName();
		        else
		            throw XPath2Exception::withErrorCode( "XPST0003", Resources::ExpectedNCName );
		    }
		    $this->m_state = LexerState::Operator;
		}
		else if ( $c == ';' || $c == ',' || $c == '(' || $c == '-' || $c == '+' || $c == '@' || $c == '~' )
		    $this->ConsumeChar( $this->Read() );
		else if ( $c == '/' )
		{
		    if ( $this->Peek( 1 ) == '/' )
		    {
		        $this->Read();
		        $this->Read();
		        $this->EndToken();
		        $this->ConsumeToken1( Token::DOUBLE_SLASH );
		    }
		    else
		        $this->ConsumeChar( $this->Read() );
		}
		else if ( $this->MatchIdentifer( array( "if", '(' ) ) )
		{
		    $this->EndToken( "if" );
		    $this->ConsumeToken1( Token::IF_TOKEN );
		    $this->BeginToken( $this->m_bookmark[1] );
		    $this->ConsumeChar( '(' );
		}
		else if ( $this->MatchIdentifer( "for" ) )
		{
		    $this->EndToken();
		    $this->ConsumeToken1( Token::FOR_TOKEN );
		    $this->SkipWhitespace();
		    $this->BeginToken();
		    if ( $this->Peek( 0 ) == '$' )
		        $this->ConsumeChar( $this->Read() );
		    else
		        throw XPath2Exception::withErrorCodeAndParam( "XPST0003", Resources::ExpectedVariablePrefix, "for" );
		    $this->m_state = LexerState::VarName;
		}
		else if ( $this->MatchIdentifer( "some" ) )
		{
		    $this->EndToken();
		    $this->ConsumeToken1( Token::SOME );
		    $this->SkipWhitespace();
		    $this->BeginToken();
		    if ( $this->Peek( 0 ) == '$' )
		        $this->ConsumeChar( $this->Read() );
		    else
		        throw XPath2Exception::withErrorCodeAndParam( "XPST0003", Resources::ExpectedVariablePrefix, "some" );
		    $this->m_state = LexerState::VarName;
		}
		else if ( $this->MatchIdentifer( "every" ) )
		{
		    $this->EndToken();
		    $this->ConsumeToken1( Token::EVERY );
		    $this->SkipWhitespace();
		    $this->BeginToken();
		    if ( $this->Peek( 0 ) == '$' )
		        $this->ConsumeChar( $this->Read() );
		    else
		        throw XPath2Exception::withErrorCodeAndParam( "XPST0003", Resources::ExpectedVariablePrefix, "every" );
		    $this->m_state = LexerState::VarName;
		}
		else if ( $c == '$' )
		{
		    $this->ConsumeChar( $this->Read() );
		    $this->m_state = LexerState::VarName;
		}
		else if ( $this->MatchIdentifer( array( "element", '(' ) ) )
		{
		    $this->EndToken( "element" );
		    $this->ConsumeToken1( Token::ELEMENT );
		    $this->BeginToken( $this->m_bookmark[1] );
		    $this->ConsumeChar( '(' );
		    array_push( $this->m_states, LexerState::Operator );
		    $this->m_state = LexerState::KindTest;
		}
		else if ( $this->MatchIdentifer( array( "attribute", '(' ) ) )
		{
		    $this->EndToken( "attribute" );
		    $this->ConsumeToken1( Token::ATTRIBUTE );
		    $this->BeginToken( $this->m_bookmark[1] );
		    $this->ConsumeChar( '(' );
		    array_push( $this->m_states, LexerState::Operator );
		    $this->m_state = LexerState::KindTest;
		}
		else if ( $this->MatchIdentifer( array( "schema-element", '(' ) ) )
		{
		    $this->EndToken( "schema-element" );
		    $this->ConsumeToken1( Token::SCHEMA_ELEMENT );
		    $this->BeginToken( $this->m_bookmark[1] );
		    $this->ConsumeChar( '(' );
		    array_push( $this->m_states, LexerState::Operator );
		    $this->m_state = LexerState::KindTest;
		}
		else if ( $this->MatchIdentifer( array( "schema-attribute", '(' ) ) )
		{
		    $this->EndToken( "schema-attribute" );
		    $this->ConsumeToken1( Token::SCHEMA_ATTRIBUTE );
		    $this->BeginToken( $this->m_bookmark[1] );
		    $this->ConsumeChar( '(' );
		    array_push( $this->m_states, LexerState::Operator );
		    $this->m_state = LexerState::KindTest;
		}
		else if ( $this->MatchIdentifer( array( "comment", '(' ) ) )
		{
		    $this->EndToken( "comment" );
		    $this->ConsumeToken1( Token::COMMENT );
		    $this->BeginToken( $this->m_bookmark[1] );
		    $this->ConsumeChar( '(' );
		    array_push( $this->m_states, LexerState::Operator );
		    $this->m_state = LexerState::KindTest;
		}
		else if ( $this->MatchIdentifer( array( "text", '(' ) ) )
		{
		    $this->EndToken( "text" );
		    $this->ConsumeToken1( Token::TEXT );
		    $this->BeginToken( $this->m_bookmark[1] );
		    $this->ConsumeChar( '(' );
		    array_push( $this->m_states, LexerState::Operator );
		    $this->m_state = LexerState::KindTest;
		}
		else if ( $this->MatchIdentifer( array( "node", '(' ) ) )
		{
		    $this->EndToken( "node" );
		    $this->ConsumeToken1( Token::NODE );
		    $this->BeginToken( $this->m_bookmark[1] );
		    $this->ConsumeChar( '(' );
		    array_push( $this->m_states, LexerState::Operator );
		    $this->m_state = LexerState::KindTest;
		}
		else if ( $this->MatchIdentifer( array( "document-node", '(' ) ) )
		{
		    $this->EndToken( "document-node" );
		    $this->ConsumeToken1( Token::DOCUMENT_NODE );
		    $this->BeginToken( $this->m_bookmark[1] );
		    $this->ConsumeChar( '(' );
		    array_push( $this->m_states, LexerState::Operator );
		    $this->m_state = LexerState::KindTest;
		}
		else if ( $this->MatchIdentifer( array( "processing-instruction", '(' ) ) )
		{
		    $this->EndToken( "processing-instruction" );
		    $this->ConsumeToken1( Token::PROCESSING_INSTRUCTION );
		    $this->BeginToken( $this->m_bookmark[1] );
		    $this->ConsumeChar( '(' );
		    array_push( $this->m_states, LexerState::Operator );
		    $this->m_state = LexerState::KindTestForPi;
		}
		else if ( $this->MatchIdentifer( array( "ancestor-or-self", "::" ) ) )
		{
		    $this->EndToken();
		    $this->ConsumeToken1( Token::AXIS_ANCESTOR_OR_SELF );
		}
		else if ( $this->MatchIdentifer( array( "ancestor", "::" ) ) )
		{
		    $this->EndToken();
		    $this->ConsumeToken1( Token::AXIS_ANCESTOR );
		}
		else if ( $this->MatchIdentifer( array( "attribute", "::" ) ) )
		{
		    $this->EndToken();
		    $this->ConsumeToken1( Token::AXIS_ATTRIBUTE );
		}
		else if ( $this->MatchIdentifer( array( "child", "::" ) ) )
		{
		    $this->EndToken();
		    $this->ConsumeToken1( Token::AXIS_CHILD );
		}
		else if ( $this->MatchIdentifer( array( "descendant-or-self", "::" ) ) )
		{
		    $this->EndToken();
		    $this->ConsumeToken1( Token::AXIS_DESCENDANT_OR_SELF );
		}
		else if ( $this->MatchIdentifer( array( "descendant", "::" ) ) )
		{
		    $this->EndToken();
		    $this->ConsumeToken1( Token::AXIS_DESCENDANT );
		}
		else if ( $this->MatchIdentifer( array( "following-sibling", "::" ) ) )
		{
		    $this->EndToken();
		    $this->ConsumeToken1( Token::AXIS_FOLLOWING_SIBLING );
		}
		else if ( $this->MatchIdentifer( array( "following", "::" ) ) )
		{
		    $this->EndToken();
		    $this->ConsumeToken1( Token::AXIS_FOLLOWING );
		}
		else if ( $this->MatchIdentifer( array( "parent", "::" ) ) )
		{
		    $this->EndToken();
		    $this->ConsumeToken1( Token::AXIS_PARENT );
		}
		else if ( $this->MatchIdentifer( array( "preceding-sibling", "::" ) ) )
		{
		    $this->EndToken();
		    $this->ConsumeToken1( Token::AXIS_PRECEDING_SIBLING );
		}
		else if ( $this->MatchIdentifer( array( "preceding", "::" ) ) )
		{
		    $this->EndToken();
		    $this->ConsumeToken1( Token::AXIS_PRECEDING );
		}
		else if ( $this->MatchIdentifer( array( "self", "::" ) ) )
		{
		    $this->EndToken();
		    $this->ConsumeToken1( Token::AXIS_SELF );
		}
		else if ( $this->MatchIdentifer( array( "namespace", "::" ) ) )
		{
		    $this->EndToken();
		    $this->ConsumeToken1( Token::AXIS_NAMESPACE );
		}
		else if ( $c == '"' || $c == '\'' )
		{
		    $this->ConsumeLiteral();
		    $this->m_state = LexerState::Operator;
		}
		// else if ( XmlCharType.Instance.IsDigit( $c ) )
		else if ( preg_match( "/\d/", $c ) )
		{
		    $this->ConsumeNumber();
		    $this->m_state = LexerState::Operator;
		}
		else if ( preg_match( "/[\p{L}_]/u", $c ) ) // Start NCName char
		{
		    $sb = array();
		    while ( ( $c = $this->Peek( 0 ) ) && ord( $c ) != 0 && preg_match( "/[\p{L}\p{N}_\-.]/u", $c ) ) // NCName
		        $sb[] = $this->Read();
		    if ( $this->Peek( 0 ) == ':' )
		    {
		        if ( $this->Peek( 1 ) == '*' )
		        {
		            $this->EndToken();
		            $this->ConsumeToken2( Token::NCName, implode( "", $sb ) );
		            $this->BeginToken();
		            $this->ConsumeChar( $this->Read() );
		            $this->BeginToken();
		            $this->ConsumeChar( $this->Read() );
		            $this->m_state = LexerState::Operator;
		        }
		        else
		        {
		            while ( ( $c = $this->Peek( 0 ) ) && ord( $c ) != 0 && preg_match( "/[\p{L}\p{N}_\-.:]/u", $c ) ) // Name char
		                $sb[] = $this->Read();
		            $this->EndToken();
		            $this->ConsumeToken2( Token::QName, implode( "", $sb ) );
		            $this->SkipWhitespace();
		            if ( $this->Peek( 0 ) != '(' )
		                $this->m_state = LexerState::Operator;
		        }
		    }
		    else
		    {
		        $this->EndToken();
		        // $anchor = $this->m_anchor;
		        $length = $this->m_length;
		        $ncname = implode( "", $sb );
		        $this->ConsumeToken2( Token::QName, $ncname );
		        $this->SkipWhitespace();
		        if ( $this->Peek( 0 ) != '(' )
		            $this->m_state = LexerState::Operator;
		    }
		}
		// BMS 2017-06-18	This is added because without it the tokenizer does not handle
		//					valid XPath query with a trailing slash in a filter such as
		//					fn:count($context[5 * /])
		else if ( $c == ']')
		{
			if ( isset( $this->m_priorToken ) )
			{
				if ( $this->m_priorToken->token == '/' )
				{
					$this->ConsumeChar( $this->Read() );
					$this->m_state = array_pop( $this->m_states );
				}
			}
		}
	}
1176176
public function setDefault()
    {
        if($this->settings->getValue(InputSettings::DEFAULTS_PARAM)) {
            $this->element->setDefault($this->settings->getValue(InputSettings::DEFAULTS_PARAM));
        }
    }
954211
public function reset()
    {
        $this->values[self::SEQUENCE] = null;
        $this->values[self::LOCALBASEKEY] = null;
        $this->values[self::LOCALBASEKEYPRIVATE] = null;
        $this->values[self::LOCALRATCHETKEY] = null;
        $this->values[self::LOCALRATCHETKEYPRIVATE] = null;
        $this->values[self::LOCALIDENTITYKEY] = null;
        $this->values[self::LOCALIDENTITYKEYPRIVATE] = null;
    }
194594
public function setInitialState()
    {
        $this->setAttribute($this->getStateColumn(), $this->getInitialState());
        $this->token = hash_hmac('sha256', str_random(40), env('APP_KEY'));
    }
701420
protected function initDefaults()
    {
        if ($this->properties['header'] === null) {
            $this->setHeader($this->name);
        }
        if ($this->properties['type'] === null) {
            $this->setType(ColumnType::createType(ColumnType::TYPE_STRING));
        }
    }
680127
public function initialize()
    {
        if (is_null($value = $this->getValue())) {
            $value = request()->input($this->getAlias());
        }

        $this->setValue($value);
    }
402511
public function initDefaults() {
        /**
         * @var Tree $this
         */
        $module = Yii::$app->controller->module;
        $iconTypeAttribute = null;
        extract($module->dataStructure);
        $this->setDefault($iconTypeAttribute, TreeView::ICON_CSS);
        foreach (static::$boolAttribs as $attr) {
            $val = in_array($attr, static::$falseAttribs) ? false : true;
            $this->setDefault($attr, $val);
        }
    }
747080
public function reset()
    {
        $this->values[self::PREKEYID] = null;
        $this->values[self::SIGNEDPREKEYID] = null;
        $this->values[self::BASEKEY] = null;
    }
1248152
public function defaults($defaults) {
        $this->defaults = $defaults;

        foreach ($defaults as $k => $v) {
            if (property_exists($this, $k)) {
                $this->{$k} = $v;
            }
        }
    }
1104726
public function init() {

		parent::init();

		$this->tabStatus	= [ 'basic' => self::STATUS_BASIC, 'media' => self::STATUS_MEDIA, 'attributes' => self::STATUS_ATTRIBUTES, 'settings' => self::STATUS_SETTINGS, 'review' => self::STATUS_REVIEW ];

		$this->nextStatus	= [ self::STATUS_BASIC => self::STATUS_MEDIA, self::STATUS_MEDIA => self::STATUS_ATTRIBUTES, self::STATUS_ATTRIBUTES => self::STATUS_SETTINGS, self::STATUS_SETTINGS => self::STATUS_REVIEW ];

		$this->previousTab	= [ 'media' => 'basic', 'attributes' => 'media', 'settings' => 'attributes', 'review' => 'settings' ];

		$this->nextTab		= [ 'basic' => 'media', 'media' => 'attributes', 'attributes' => 'settings', 'settings' => 'review' ];
	}
881800
protected function setDefaultOptions() : void
    {
        $type = $this->getType();
        if (! empty($this->defaultOptions[$type])) {
            $this->options = $this->defaultOptions[$type];
        }
    }
1108621
public function reset()
  {
    $this->turnOff();
    $this->counter            = null;
    $this->startedAt          = null;
    $this->expiresAt          = null;
    $this->name               = $this->origStatus['name'];
    $this->metric             = $this->origStatus['metric'];
    $this->globalThreshold    = $this->origStatus['globalThreshold'];
    $this->componentThreshold = $this->origStatus['componentThreshold'];
    $this->metricFactor       = $this->origStatus['metricFactor'];
    $this->components         = $this->origStatus['components'];
  }
1115624
public function initDefaultProperties()
    {
        if (isset($this->schema) && $this->setPropertyDefaultValue($this->schema)) {
            $this->property_value = $this->schema->default;
        }
    }
644201
public function initDefaultProperties()
    {
        if (!empty($this->schema->properties)) {
            foreach ($this->schema->properties as $property_name => $property) {
                if ($this->setPropertyDefaultValue($property)) {
                    $this->property_values->$property_name = $this->getFactory()->create($property, $this->schema_path);
                }
            }
        }
    }
1108419
public function initialize()
    {
        $this->getButtons()->setHtmlAttribute('class', 'panel-footer');

        $this->setHtmlAttribute('class', 'panel panel-default '.$this->getPanelClass());

        parent::initialize();
    }
1333271
public function setDefault($default)
    {
        // Since SQL types cannot be completely mapped to PHP types, a loose
        // comparision is required, but changes to/from NULL must be taken into
        // account.
        if (
            $this->_default === null and $default !== null or
            $this->_default !== null and $default === null or
            $this->_default != $default
        ) {
            $this->_default = $default;
            if ($this->_table) {
                $this->_setDefault();
            }
        }
    }
805597
private function defaultLevelIncrement(): void
  {
    if (!empty($this->defaultLevel))
    {
      $this->defaultLevel[sizeof($this->defaultLevel) - 1]++;
    }
  }