Signup a new account with the given parameters

todo interface for identity
@param  array $input Array containing 'username', 'email' and 'password'.

@return  Entity User object that may or may not be saved successfully. Check the id to make sure.
164222
public function register($input)
    {
        $account = $this->model()->fill($input);

        $account->password_confirmation = array_get($input, 'password_confirmation');

        // Generate a random confirmation code
        $account->confirmation_code = md5(uniqid(mt_rand(), true));

        // Save if valid. Password field will be hashed before save
        return $this->save($account);
    }
144610
public function temporaryPost(array $input) : array {
		$input[\Object\Form\Parent2::BUTTON_SUBMIT_SAVE] = true;
		$input[\Object\Form\Parent2::BUTTON_SUBMIT_TEMPORARY_POST] = true;
		$this->form->form_object->addInput($input);
		$this->form->form_object->process();
		return $this->form->form_object->apiResult();
	}
1180282
public function prepare($input)
    {
        foreach ($input as $key => $record) {
            $this->setFieldOriginalValue($key);
            $input[$key] = $this->prepareRecord($record);
        }

        return $input;
    }
376812
public static function getCreateOperation($input, $fields) {
		$operation = new CreateTransactionOperation(static::getClass(), $input, $fields);
		$operation->setSQLAdapter(static::getSQLAdapter());
		return $operation;
	}
608407
public static function create(array $input = [])
    {
        DB::beginTransaction();

        try {
            LaravelEvent::fire(static::$name.'.creating');
            static::beforeCreate($input);
            $return = parent::create($input);
            static::afterCreate($input, $return);
            LaravelEvent::fire(static::$name.'.created');

            DB::commit();
        } catch (\Exception $e) {
            DB::rollBack();
            throw $e;
        }

        return $return;
    }
782458
public function unserialize($input)
	{
		$input = unserialize($input);

		if (!($input instanceof Input))
		{
			throw new \UnexpectedValueException(sprintf('%s would not accept a `%s`.', __METHOD__, \gettype($this->input)));
		}

		$this->setInput($input);

		return $this;
	}
67812
public static function toMap($input)
    {
        Arguments::define(Boa::map())->check($input);

        if ($input instanceof MapInterface) {
            return $input;
        }

        if (is_array($input) || $input instanceof ArrayObject) {
            return new ArrayMap($input);
        }

        if ($input instanceof ArrayAccess) {
            return new ArrayAccessMap($input);
        }

        throw new CoreException('Unable to build Map');
    }
170272
public function openPeriod(array $input)
  {
    $this->DB->transaction(function() use ($input)
    {
      $loggedUserId = $this->AuthenticationManager->getLoggedUserId();
      $organizationId = $this->AuthenticationManager->getCurrentUserOrganization('id');

      $Period = $this->Period->byId($input['id']);
      $Journal = $this->Journal->create(array('journalized_id' => $input['id'], 'journalized_type' => $this->Period->getTable(), 'user_id' => $loggedUserId, 'organization_id' => $organizationId));
      // $this->Journal->attachDetail($Journal->id, array('field' => $this->Lang->get('decima-accounting::journal-management.status'), 'field_lang_key' => 'decima-accounting::journal-management.status', 'old_value' => $this->Lang->get('decima-accounting::period-management.closed'), 'new_value' => $this->Lang->get('decima-accounting::period-management.opened')), $Journal);
      $this->Journal->attachDetail($Journal->id, array('note' => $this->Lang->get('decima-accounting::period-management.periodOpenedJournal', array('period' => $this->Lang->get('decima-accounting::period-management.' . $Period->month))), $Journal));
      $this->Period->update(array('is_closed' => false), $Period);
    });

    return json_encode(array('success' => $this->Lang->get('form.defaultSuccessOperationMessage'), 'periods' => $this->getPeriods(), 'periodsFilter' => $this->getPeriods2()));
  }
870622
protected function createModel($input)
    {
        if (!$this->option('without-model')) {
            $this->call(
                'create:model',
                [
                    'model-name' => $input->modelName,
                    '--table-name' => $input->table,
                    '--primary-key' => $input->primaryKey,
                    '--resource-file' => $input->resourceFile,
                    '--model-directory' => $input->modelDirectory,
                    '--with-soft-delete' => $input->withSoftDelete,
                    '--without-timestamps' => $input->withoutTimeStamps,
                    '--template-name' => $input->template,
                    '--force' => $input->force,
                ]
            );
        }

        return $this;
    }
241093
public function input($input) {
        if(isset($this->inputs->$input)) 
            return $this->inputs->$input;
        return null;
    }
215072
public function setInput($input)
    {
        $this->input = ProcessUtils::validateInput(sprintf('%s::%s', __CLASS__, __FUNCTION__), $input);

        return $this;
    }
74171
public static function load($input)
    {
        $config = '';
        if (isset($input['config'])) {
            // set the location of the configuration file
            $config = $input['config'];
        }
        $instance = new self($config);
        $instance->loadUserInput($input);
        $instance->go();
        return $instance;
    }
622096
protected function registerUser(array $input)
    {
        $this->dispatch(new RegisterUserJob(array_get($input, 'name'),
                                            array_get($input, 'email'),
                                            array_get($input, 'password')));
        $this->info(trans('authentication::user.console.created', $input));
    }
446181
public function addInput(Input $input)
    {
        $reflection = new \ReflectionClass($input);

        $method = 'add'.$reflection->getShortName();

        if (method_exists($this, $method)) {
            $this->$method(...array_values($input->getAttributes()));
        }
    }
779383
private function captureUserAndPassword(Input $input)
    {
        $text = trim(preg_replace('|\W+|', ' ', $input->text));

        return explode(' ', $text);
    }
1161645
public final function prepareIdentifier(string $input, $inputParam): string
    {
        if (empty($inputParam)) {
            if (strpos($input, '%n') !== false) {
                throw new AgentException('Found %n operator but no replacement parameter given!');
            } elseif (strpos($input, '??') !== false) {
                throw new AgentException('Found ?? operator but no replacement parameter given!');
            }
        } else {
            $input = $this->prepare($input, (array) $inputParam);

            // eg: ('@a.id=?', 1), ('@a.id=@b.id')
            // eg: ('??=?', ['a.id',1]), ('??=??', ['a.id','b.id'])
            // eg: ('a.id=?, a.b=?', [1,2]), ('a.id=??, a.b=?', ['b.id',2])
            if (strpos($input, '=')) {
                $input = implode(', ', array_map(function ($input) {
                    $input = trim($input);
                    if ($input != '') {
                        $input = array_map('trim', explode('=', $input));
                        $input = $this->escapeIdentifier($input[0]) .' = '. (
                            ($input[1] && $input[1][0] == '@' )
                                ? $this->escapeIdentifier($input[1]) : $input[1]
                        );
                        return $input;
                    }
                }, explode(',', $input)));
            }

            return $input;
        }

        // eg: (a.id = 1), (a.id = @b.id)
        if (strpos($input, '=')) {
            $input = implode(', ', array_map(function ($input) {
                $input = trim($input);
                if ($input != '') {
                    $input = array_map('trim', explode('=', $input));
                    $input = $this->escapeIdentifier($input[0]) .' = '. (
                        ($input[1] && $input[1][0] == '@' )
                            ? $this->escapeIdentifier($input[1]) : $this->escape($input[1])
                    );
                    return $input;
                }
            }, explode(',', $input)));
        } else {
            // eg: a.id
            $input = $this->escapeIdentifier($input);
        }

        return $input;
    }
851834
private function convert($input)
    {
        if (is_array($data = json_decode($input, true))) {
            if (array_key_exists('signatures', $data) || array_key_exists('recipients', $data)) {
                return $data;
            } elseif (array_key_exists('signature', $data)) {
                return $this->fromFlattenedSerializationSignatureToSerialization($data);
            } elseif (array_key_exists('ciphertext', $data)) {
                return $this->fromFlattenedSerializationRecipientToSerialization($data);
            }
        } elseif (is_string($input)) {
            return $this->fromCompactSerializationToSerialization($input);
        }

        throw new \InvalidArgumentException('Unsupported input');
    }