. // }}} namespace Component\Link; use App\Core\DB\DB; use App\Core\Event; use App\Core\Modules\Component; use App\Entity; use App\Entity\NoteToLink; use App\Util\Common; use InvalidArgumentException; class Link extends Component { /** * "Perfect URL Regex", courtesy of https://urlregex.com/ */ const URL_REGEX = <<getId(); DB::persist(NoteToLink::create(['link_id' => $link_id, 'note_id' => $note_id])); } catch (InvalidArgumentException) { continue; } } } return Event::next; } }