Locker\Repository\Statement\EloquentStorer::store PHP Method

store() public method

Stores statements and attachments with the given options
public store ( array $statements, array $attachments, StoreOptions $opts ) : [String]
$statements array
$attachments array
$opts StoreOptions
return [String]
    public function store(array $statements, array $attachments, StoreOptions $opts)
    {
        $scopes = $opts->getOpt('scopes');
        if (!(in_array('all', $scopes) || in_array('statements/write', $scopes))) {
            throw new Exceptions\Exception('Unauthorized request.', 401);
        }
        $id_statements = $this->constructValidStatements($statements, $opts);
        $ids = array_keys($id_statements);
        $statements = array_values($id_statements);
        $this->inserter->insert($statements, $opts);
        $this->linker->updateReferences($statements, $opts);
        $this->voider->voidStatements($statements, $opts);
        $this->attacher->store($attachments, $this->hashes, $opts);
        $this->activateStatements($ids, $opts);
        return $ids;
    }