PHP Class GraphQL\Language\Printer

Show file Open project: webonyx/graphql-php Class Usage Examples

Public Methods

Method Description
block ( $array ) Given array, print each item on its own line, wrapped in an indented "{ }" block.
doPrint ( $ast )
indent ( $maybeString )
join ( $maybeArray, $separator = '' )
length ( $maybeArray )
manyList ( $start, $list, $separator, $end )
printAST ( $ast )
wrap ( $start, $maybeString, $end = '' ) If maybeString is not null or empty, then wrap with start and end, otherwise print an empty string.

Protected Methods

Method Description
__construct ( )

Method Details

__construct() protected method

protected __construct ( )

block() public method

Given array, print each item on its own line, wrapped in an indented "{ }" block.
public block ( $array )

doPrint() public static method

public static doPrint ( $ast )

indent() public method

public indent ( $maybeString )

join() public method

public join ( $maybeArray, $separator = '' )

length() public method

public length ( $maybeArray )

manyList() public method

public manyList ( $start, $list, $separator, $end )

printAST() public method

public printAST ( $ast )

wrap() public method

If maybeString is not null or empty, then wrap with start and end, otherwise print an empty string.
public wrap ( $start, $maybeString, $end = '' )