public static function from_query( array $attributes = array() ) {

		$instance = new static( new \stdClass() );
		$instance->set_raw_attributes( $attributes, true );
		$instance->_exists = true;

		if ( static::$_cache && ! static::is_data_cached( $instance->get_pk() ) ) {
			Cache::update( $instance );
		}

		return $instance;
	}
public static function from_query( array $attributes = array() ) {

		$instance = new static( new \stdClass() );
		$instance->set_raw_attributes( $attributes, true );
		$instance->_exists = true;

		if ( static::$_cache && ! static::is_data_cached( $instance->get_pk() ) ) {
			Cache::update( $instance );
		}

		return $instance;
	}
public static function from_query ( array $ attributes = array ( ) ) { $ instance = new static ( new \ stdClass ( ) ) ; $ instance -> set_raw_attributes ( $ attributes , true ) ; $ instance -> _exists = true ; if ( static :: $ _cache && ! static :: is_data_cached ( $ instance -> get_pk ( ) ) ) { Cache :: update ( $ instance ) ; } return $ instance ; }
Create a new object from a query builder.

This is used to bypass guarding when retrieve model data from the database.

@since 2.0

@param array $attributes

@return static
Create a new object from a query builder .