Retrieves http response from Trello api for batch collection.

@param  array  $attributes

@return object
@throws Exception
515407
public function getBatch($attributes = [])
    {
        $this->parseBatchAttributes($attributes);

        try {
            $result = $this->getHttp()->get('batch', ['urls' => $this->batchUrls]);
            $this->batchUrls = [];

            return $result;
        } catch (Exception $e) {
            throw $e;
        }
    }
1297832
public function make(array $attributes = [])
    {
        if ($this->amount === null) {
            return $this->makeInstance($attributes);
        } else {
            $results = [];

            for ($i = 0; $i < $this->amount; $i++) {
                $results[] = $this->makeInstance($attributes);
            }
            
            return new Collection($results);
        }
    }
1147987
public static function fromArray(array $attributes) {
		unset($attributes['id']);
		
		$attributesObject = new self();
		
		foreach ($attributes as $key => $value) {
			$attributesObject->add($key, $value);
		}
		
		return $attributesObject;
	}
767481
protected function createQuery(array $attributes = null): Query
    {
        return Query::insert()->into(static::$tableName)
            ->set($attributes ?? $this->getFieldsValues());
    }
542139
public function getFilterByName($name, $attributes = [])
    {
        $filter = null;
        $name = str_replace('\\', DS, ucfirst($name)) . 'Filter.php';
        $file = $this->loader->findFirst($this->application->config('directory.filter') . DS . $name);
        if ($file) {
            $class = $file->getClassName();
            $filter = new $class();
        }

        // not found.
        if (! $filter) {
            throw new Exception\NotFoundException('No such filter. -> ' . $name);
        }
        
        $filter->setAttributes($attributes);
        $filter->setContainer($this->container);
        $this->container->injectDependency($filter);
        return $filter;
    }
496920
public function get($object)
    {
        // search for the correct serializer
        if (is_string($object)) {
            if ($meta = $this->om->getClassMetaData($object)) {
                $object = $meta->name;
            }
        }

        foreach ($this->serializers as $serializer) {
            $className = $this->getSerializerHandledClass($serializer);

            if ($object instanceof $className || $object === $className) {
                return $serializer;
            }
        }

        $className = is_object($object) ? get_class($object) : $object;

        throw new \Exception(
            sprintf('No serializer found for class "%s" Maybe you forgot to add the "claroline.serializer" tag to your serializer.', is_string($object) ? $object : get_class($object))
        );
    }
305715
public function getHtml(array $attributes = []): string
    {
        return self::buildTag('input', null,
            array_merge(
                [
                    'type'     => 'file',
                    'name'     => $this->getName(),
                    'required' => $this->isRequired(),
                ],
                $attributes
            )
        );
    }
824666
public function fill(array $attributes = [])
    {
        $this->raw = $attributes;

        $excludes = config("api.excludes");

        foreach ($attributes as $key => $attribute) {
            // Guarded attributes should be removed
            if (in_array($key, $excludes)) {
                unset($attributes[$key]);
            }
            else if (method_exists($this, $key) && ((is_array($attribute) || is_null($attribute)))) {
                // Its a relation
                $this->relationAttributes[$key] = $attribute;

                // For belongs to relation, while filling, we need to set relation key.
                $relation = call_user_func([$this, $key]);

                if ($relation instanceof BelongsTo) {
                    $primaryKey = $relation->getRelated()->getKeyName();

                    if ($attribute !== null) {
                        // If key value is not set in request, we create new object
                        if (!isset($attribute[$primaryKey])) {
                            throw new RelatedResourceNotFoundException('Resource for relation "' . $key . '" not found');
                        }
                        else {
                            $model = $relation->getRelated()->find($attribute[$primaryKey]);

                            if (!$model) {
                                // Resource not found
                                throw new ResourceNotFoundException();
                            }
                        }
                    }

                    $relationKey = $relation->getForeignKey();

                    $this->setAttribute($relationKey, ($attribute === null) ? null : $model->getKey());
                }

                unset($attributes[$key]);
            }
        }

        return parent::fill($attributes);
    }
278517
public function getHashableString($attributes)
    {
        $string = null;
        if(!empty($this->hashableAttributes)) { // check if set
            foreach ($this->hashableAttributes as $value) {
                if(isset($attributes[$value])) $string .= $attributes[$value];
                else return null;
            }
        }
        return $string;
    }
442293
public function loadContactAttributes(array $attributes)
    {
        // run validation
        $validator = $this->validateContact($attributes);

        if ($validator->fails()) {
            $errors = $validator->errors()->all();
            $error  = '[Addresses] '. implode(' ', $errors);

            throw new FailedValidationException($error);
        }

        return $attributes;
    }
706891
public function edit($attributes = array())
    {
        $url = $this->getEntityUrl() . $this->id;

        return $this->request(Requests::PATCH, $url, $attributes);
    }
85196
public function getHtml(array $attributes = []): string
    {
        return self::buildTag('input', null,
            array_merge(
                [
                    'type'    => 'radio',
                    'name'    => $this->name !== '' ? $this->name : false,
                    'value'   => $this->value,
                    'checked' => $this->isSelected,
                ],
                $attributes
            )
        );
    }
837863
final public function sort(array $attributes = array())
    {
        $product        = $this->find($attributes['movingId']);
        $positionEntity = $this->find($attributes['movedId']);

        if ($product instanceof Product) {
            if ($this->fireEvent('sorting', array($product)) === false) {
                return false;
            }

            $product->setCaller($this);
            $product->{$attributes['type']}($positionEntity);

            $this->fireEvent('sorted', array($product));

            return $product;
        }

        throw new Exception(sprintf(Exception::CANT_UPDATE_MODEL,
            'Subbly\\Model\\Product',
            $this->name()
        ));
    }
676701
public function sendSubscribeRequest($attributes)
    {
        $token = isset($attributes['access_token']) ? $attributes['access_token'] : $this->getAccessToken();
        
        $page_id = $attributes['page_id'];
        $end_point = $this->getResource() . '/' . $page_id . '/subscribed_apps?access_token=' . $token;

        return giga_remote_post($end_point, [
            'subscribed_fields' => $attributes['subscribed_fields']
        ]);
    }
542379
final public function sort(array $attributes = array())
    {
        $category       = $this->find($attributes['movingId']);
        $positionEntity = $this->find($attributes['movedId']);

        if ($category instanceof Category) {
            if ($this->fireEvent('sorting', array($category)) === false) {
                return false;
            }

            $category->setCaller($this);
            $category->{$attributes['type']}($positionEntity);

            $this->fireEvent('sorted', array($category));

            return $category;
        }

        throw new Exception(sprintf(Exception::CANT_UPDATE_MODEL,
            'Subbly\\Model\\Category',
            $this->name()
        ));
    }
125083
public function getByAttributes(array $attributes) : ?Model
    {
        if (empty($attributes)) {
            return null;
        }

        // First we will add each credential element to the query as a where clause.
        // Then we can execute the query and, if we found a user, return it in a
        // Eloquent User "model" that will be utilized by the Guard instances.
        $query = $this->getModel()->newQuery();

        foreach ($attributes as $key => $value) {
            $query->where($key, $value);
        }

        return $query->first();
    }
231079
public function withAttributes(array $attributes): self
    {
        $result = clone $this;
        $result->attributes = new ParameterCollection($attributes);

        return $result;
    }