PHP Class Youshido\GraphQL\Relay\Connection\ArrayConnection

Show file Open project: youshido/graphql Class Usage Examples

Public Methods

Method Description
connectionFromArray ( array $data, array $args = [] )
connectionFromArraySlice ( array $data, array $args, $sliceStart, $arrayLength )
cursorForObjectInConnection ( $data, $object )
cursorToOffset ( $cursor ) : integer | null
cursorToOffsetWithDefault ( $cursor, $default )
edgeForObjectWithIndex ( $object, $index )
offsetToCursor ( $offset ) : string

Method Details

connectionFromArray() public static method

public static connectionFromArray ( array $data, array $args = [] )
$data array
$args array

connectionFromArraySlice() public static method

public static connectionFromArraySlice ( array $data, array $args, $sliceStart, $arrayLength )
$data array
$args array

cursorForObjectInConnection() public static method

public static cursorForObjectInConnection ( $data, $object )

cursorToOffset() public static method

public static cursorToOffset ( $cursor ) : integer | null
$cursor string
return integer | null

cursorToOffsetWithDefault() public static method

public static cursorToOffsetWithDefault ( $cursor, $default )

edgeForObjectWithIndex() public static method

public static edgeForObjectWithIndex ( $object, $index )

offsetToCursor() public static method

public static offsetToCursor ( $offset ) : string
$offset int
return string