@param array $data

@return KeyCreated
338041
public static function createFromArray(array $data)
    {
        $self = new self();

        if (isset($data['id'])) {
            $self->setId($data['id']);
        }
        if (isset($data['name'])) {
            $self->setName($data['name']);
        }
        if (isset($data['description'])) {
            $self->setDescription($data['description']);
        }
        if (isset($data['name_hash'])) {
            $self->setNameHash($data['name_hash']);
        }
        if (isset($data['plural'])) {
            $self->setPlural($data['plural']);
        }
        if (isset($data['name_plural'])) {
            $self->setNamePlural($data['name_plural']);
        }
        if (isset($data['created_at'])) {
            $self->setCreatedAt($data['created_at']);
        }
        if (isset($data['updated_at'])) {
            $self->setUpdatedAt($data['updated_at']);
        }
        if (isset($data['data_type'])) {
            $self->setDataType($data['data_type']);
        }
        if (isset($data['tags'])) {
            $self->setTags($data['tags']);
        }

        return $self;
    }
701419
static public function create(array $data)
    {
        $class = static::$modelClass;

        /** @var \Illuminate\Database\Eloquent\Model $model */
        $model = new $class;

        // set primarye key
        if(static::isUuid() && empty($data[$model->getKeyName()])) {
            $data[$model->getKeyName()] = uuid();
        }

        $model = $class::create($data);

        return static::get($model->getKey());
    }
1330376
public function create(array $data)
    {
        $user = User::create([
            'name'                  => $data['name'],
            'email'                 => $data['email'],
            'password'              => bcrypt($data['password']),
            'birthday_at'           => $data['birthday_at'],
            'locale'                => $data['locale'],
            'gender'                => $data['gender'],
            'city'                  => $data['city'],
            'about'                 => $data['about'],
            'profession'            => $data['profession'],
            'hobbies'               => $data['hobbies'],
            'homepage'              => $data['homepage'],
            'skype'                 => $data['skype'],
            'facebook'              => $data['facebook'],
            'twitter'               => $data['twitter'],
            'main_character'        => $data['main_character'],
            'main_guild'            => $data['main_guild'],
            'favorite_race'         => $data['favorite_race'],
            'favorite_spec'         => $data['favorite_spec'],
            'favorite_instance'     => $data['favorite_instance'],
            'favorite_battleground' => $data['favorite_battleground'],
        ]);

        return $user;
    }
734859
protected function makeDataScript(array $data)
    {
        $script = '';
        foreach ($data as $key => $value) {
            $script .= PHP_EOL . "data.{$key} = '{$value}';";
        }

        return $script;
    }
603918
public function create(array $data = [], $key = null)
    {
        $type = self::resolveImageType($key);

        return $this->hydrate($type, $data);
    }
1374610
public function createRequestToken(array $data = [])
    {
        $token = new RequestToken();

        if (array_key_exists('expires_at', $data)) {
            $token->setExpiresAt(new \DateTime($data['expires_at']));
        }

        if (array_key_exists('request_token', $data)) {
            $token->setToken($data['request_token']);
        }

        if (array_key_exists('success', $data)) {
            $token->setSuccess($data['success']);
        }

        return $token;
    }
1101347
public static function createFromArray(array $data): RetryMap
    {
        $retryMap = new RetryMap();
        foreach ($data as $entry) {
            $retryMap->addRetry(Retry::createFromArray($entry));
        }

        return $retryMap;
    }
564136
public function set(array $data)
    {
        foreach ($data as $key => $value) {
            if (method_exists($this, 'set' . $key)) {
                $this->{'set' . $key}($value);
            } else if ($this->customParamsPrefix . $this->shopCommissionCustomParamKey === $key) {
                $this->setShopCommission($value);
            } else if (0 === strpos($key, $this->customParamsPrefix)) {
                $this->setCustomParam(substr($key, 4), $value);
            }
        }

        $this->auth->set($data);
        $this->client->set($data);

        return $this;
    }
161833
public static function createFromArray($key, array $data = [])
    {
        $webFormBody = new static($key);

        if (isset($data['formParameters'])) {
            foreach ($data['formParameters'] as $namedParam => $namedParamData) {
                if (\is_array($namedParamData)) {
                    $webFormBody->addParameter(NamedParameter::createFromArray($namedParam, $namedParamData));
                }
            }
        }

        return $webFormBody;
    }
921049
public function toObject(array $data)
    {
        $data = json_decode(json_encode($data));

        if ($data === []) {
            $data = new \StdClass();
        }

        return $data;
    }
1216289
public function fromArray($data)
    {
        if (empty($data)) {
            return $this;
        }
        if (isset($data['type']) && $data['type']) {
            $this->setType($data['type']);
        }
        if (isset($data[$this->getType()]) && $data[$this->getType()]) {
            $this->setValue($data[$this->getType()]);
        }
        return $this;
    }
108316
protected function buildStatusCodes(array $data)
    {
        if (isset($data['statusCodes'])) {
            $this->initializeStatusCodes();
            foreach ($data['statusCodes'] as $key => $element) {
                if ((int) $key < 200) {
                    $this->statusCodes($element);
                } else {
                    $this->statusCodes($key, $element);
                }
            }
        }

        return $this;
    }
142709
public static function fromArray(array $data)
    {
        $cookieJar = null;
        if (isset($data['cookies'])) {
            $cookieJar = new CookieJar();
            foreach ($data['cookies'] as $cookie) {
                $cookieJar->setCookie(new SetCookie($cookie));
            }
        }

        return new static($data['ptWebQQ'], $data['vfWebQQ'],
            $data['pSessionId'], $data['uin'], $data['clientId'],
            $cookieJar
        );
    }
369268
public function factory(array $data = [])
    {
        $model = $this->newQuery()->getModel()->newInstance();

        $this->setModelData($model, $data);

        return $model;
    }
1037912
public function createSignatureCredentials(array $data)
    {
        $credentials = new SymmetricCredentials();
        $credentials->setMacId($data['access_token']);
        $credentials->setAlgorithm($data['mac_algorithm']);
        $credentials->setSharedKey($data['mac_key']);
        return $credentials;
    }
1097427
public function make($data)
	{
		$payload = array_merge($this->payload, $data);
		return $this->auth->make($payload, $this->secretKey);
	}
1165688
public static function make(array $data)
    {
        # Convert values to ArrayObject instances
        foreach ($data as &$value) {
            if (is_array($value)) {
                $value = static::make($value);
            }
        }
        unset($value);

        return new self($data, \ArrayObject::ARRAY_AS_PROPS);
    }