init
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
<?php namespace Lucent\Edge;
|
||||
|
||||
use Lucent\LucentException;
|
||||
|
||||
class EdgeService
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @throws LucentException
|
||||
*/
|
||||
public static function create(
|
||||
string $source,
|
||||
string $target,
|
||||
string $sourceSchema,
|
||||
string $targetSchema,
|
||||
string $field,
|
||||
string $rank,
|
||||
): Edge
|
||||
{
|
||||
|
||||
|
||||
$edge = new Edge(
|
||||
|
||||
source: $source,
|
||||
target: $target,
|
||||
sourceSchema: $sourceSchema,
|
||||
targetSchema: $targetSchema,
|
||||
field: $field,
|
||||
rank: $rank,
|
||||
);
|
||||
EdgeRepo::insert($edge);
|
||||
return $edge;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user