Oihana PHP Arango

edgeEndKeys.php

Table of Contents

Functions

edgeEndKeys()  : array<int, string>
Returns the distinct `_key`s of one end of a list of edges (`_from` or `_to`).

Functions

edgeEndKeys()

Returns the distinct `_key`s of one end of a list of edges (`_from` or `_to`).

edgeEndKeys(iterable<string|int, mixed> $edges, string $end) : array<int, string>

Each edge is read by edgeEndKey() ; an edge without that end is skipped. The keys keep their first order and stay strings, even when they look like numbers.

Parameters
$edges : iterable<string|int, mixed>

The edges, as objects or arrays.

$end : string

The end to read : Schema::_FROM or Schema::_TO.

Tags
example
use org\schema\constants\Schema ;

edgeEndKeys
([
    [ '_from' => 'roles/42' , '_to' => 'policies/p1' ] ,
    [ '_from' => 'roles/42' , '_to' => 'policies/p2' ] ,
    [ '_from' => 'roles/7'  , '_to' => 'policies/p1' ] ,
] , Schema::_FROM ) ; // [ '42' , '7' ]
author

Marc Alcaraz

Return values
array<int, string> —

The distinct keys.

On this page

Search results