public static function factory( $post_id, $type = 'post' ) {
		$type         = papi_get_meta_type( $type );
		$class_suffix = '_' . ucfirst( $type ) . '_Store';
		$class_name   = 'Papi' . $class_suffix;

		if ( ! class_exists( $class_name ) ) {
			return;
		}

		$post_id = papi_get_post_id( $post_id );
		$page    = new $class_name( $post_id );

		if ( ! $page->valid() ) {
			return;
		}

		return $page;
	}
public static function factory( $post_id, $type = 'post' ) {
		$type         = papi_get_meta_type( $type );
		$class_suffix = '_' . ucfirst( $type ) . '_Store';
		$class_name   = 'Papi' . $class_suffix;

		if ( ! class_exists( $class_name ) ) {
			return;
		}

		$post_id = papi_get_post_id( $post_id );
		$page    = new $class_name( $post_id );

		if ( ! $page->valid() ) {
			return;
		}

		return $page;
	}
public static function factory ( $ post_id , $ type = 'post' ) { $ type = papi_get_meta_type ( $ type ) ; $ class_suffix = '_' . ucfirst ( $ type ) . '_Store' ; $ class_name = 'Papi' . $ class_suffix ; if ( ! class_exists ( $ class_name ) ) { return ; } $ post_id = papi_get_post_id ( $ post_id ) ; $ page = new $ class_name ( $ post_id ) ; if ( ! $ page -> valid ( ) ) { return ; } return $ page ; }
Get store from factory.

@param  int    $post_id
@param  string $type

@return mixed
Get store from factory .