protected function __modify( $action, $arguments )
	{
		$tokens = $arguments;
		$method = "__{$action}";

		if ( 1 === count( $arguments ) ) {
			$tokens = reset( $tokens );

			if ( is_string( $tokens ) ) {
				$tokens = explode( ' ', $tokens );
			}
		}

		if ( is_array( $tokens ) ) {
			$tokens = array_map( 'strval', $tokens );
			$tokens = array_filter( $tokens, 'strlen' );
		}

		array_walk( $tokens, [ $this, '__validate' ] );

		if ( method_exists( $this, $method ) ) {
			call_user_func( [ $this, $method ], $tokens );
		}

		return $this;
	}
protected function __modify( $action, $arguments )
	{
		$tokens = $arguments;
		$method = "__{$action}";

		if ( 1 === count( $arguments ) ) {
			$tokens = reset( $tokens );

			if ( is_string( $tokens ) ) {
				$tokens = explode( ' ', $tokens );
			}
		}

		if ( is_array( $tokens ) ) {
			$tokens = array_map( 'strval', $tokens );
			$tokens = array_filter( $tokens, 'strlen' );
		}

		array_walk( $tokens, [ $this, '__validate' ] );

		if ( method_exists( $this, $method ) ) {
			call_user_func( [ $this, $method ], $tokens );
		}

		return $this;
	}
protected function __modify ( $ action , $ arguments ) { $ tokens = $ arguments ; $ method = "__{$action}" ; if ( 1 === count ( $ arguments ) ) { $ tokens = reset ( $ tokens ) ; if ( is_string ( $ tokens ) ) { $ tokens = explode ( ' ' , $ tokens ) ; } } if ( is_array ( $ tokens ) ) { $ tokens = array_map ( 'strval' , $ tokens ) ; $ tokens = array_filter ( $ tokens , 'strlen' ) ; } array_walk ( $ tokens , [ $ this , '__validate' ] ) ; if ( method_exists ( $ this , $ method ) ) { call_user_func ( [ $ this , $ method ] , $ tokens ) ; } return $ this ; }
Alters the list of tokens.

When adding, if token(s) already exists in the list of tokens,
it will not add the token again.

When removing, errors are not thrown If the token does not exist.

@param string|string[] $tokens One or more case-sensitive tokens.

@return $this
Alters the list of tokens .