Load a new package from the `ASSETS_DB_FILENAME` entry

@param array $entries
@return self
18716
public function loadFromArray(array $entries)
     {
         foreach ($entries as $var=>$val) {
             switch ($var) {
                case 'name': $this->setName($val); break;
                case 'version': $this->setVersion($val); break;
                case 'relative_path': $this->setRelativePath($val); break;
                case 'assets_path':
                case 'path':
                    $this->setAssetsPath($val); break;
                case 'assets_presets': $this->setAssetsPresets($val); break;
            }
         }
         return $this;
     }
620119
public function addDependency($packages)
    {
        $packages = is_array($packages) ? $packages : func_get_args();

        foreach ($packages as $package) {
            $this->dependency[] = $package;
        }

        return $this;
    }
436071
public function load(array $files = null) : ApplicationInterface
    {
        $this->callLoad($files) || parent::load($files);

        return $this;
    }
1013769
public function load($paths): self
    {
        $paths = Arr::toArray($paths);

        $router = $this;

        foreach ($paths as $path) {
            $files = \Windwalker\glob($path);

            foreach ($files as $file) {
                require $file;
            }
        }

        return $this;
    }
45232
public function from($tables)
    {
        if (is_string($tables)) {
            $tables = $this->splitParts($tables);
        }
        foreach ($tables as $k => $table) {
            if ($alias = $this->matchAlias($table)) {
                $tables[$k] = $this->db->quoteTable($alias[0]) . ' AS ' . $this->db->quoteTable($alias[1]);
            } else {
                $tables[$k] = $this->db->quoteTable($table);
            }
        }

        $this->query['from'] = implode(', ', $tables);

        return $this;
    }
897615
public function fillFromExistingOrNew(array $attributes = [])
    {
        $this->fill($attributes);

        $this->exists = ! empty($attributes[$this->getKeyName()]);

        return $this;
    }
1207688
public function addActions(array $actions): self
    {
        foreach ($actions as $action) {
            $this->addAction($action);
        }

        return $this;
    }
857445
public function replace(array $items): self {
        foreach ($items as $key => $value) {
            $this->has($key) && $this->set($key, $value);
        }
        return $this;
    }
240092
public function fromProtoBuf($entries)
    {
        $values = [];

        foreach ($entries as $entry) {
            $field = $entry->getField();
            $name  = $field->getName();
            $value = $this->convertMapEntry($entry);

            $values[$name] = $value;
        }

        return $values;
    }
4603
public function add($files = '.')
    {
        if (is_array($files)) {
            $files = implode(' ', array_map('escapeshellarg', $files));
        } else {
            $files = escapeshellarg($files);
        }

        $this->getClient()->run($this, "add $files");

        return $this;
    }
553614
public function load(array $paths)
    {
        $finder = new Finder();
        $finder->in($paths);
        $finder->name('*Fixture.php');

        foreach ($finder as $file) {
            $declaredClasses = get_declared_classes();
            require_once $file;
            $declaredClassesDiff = array_diff(get_declared_classes(), $declaredClasses);
            $fixtureClass = array_pop($declaredClassesDiff);

            if (!$fixtureClass) {
                throw new \InvalidArgumentException(sprintf(
                    'Could not determine class from included file "%s". Class detection will only work once per request.',
                    $file
                ));
            }

            $refl = new \ReflectionClass($fixtureClass);

            if ($refl->isAbstract()) {
                continue;
            }

            if (false === $refl->isSubclassOf(DocumentFixtureInterface::class)) {
                continue;
            }

            $fixture = new $fixtureClass();

            if ($fixture instanceof ContainerAwareInterface) {
                $fixture->setContainer($this->container);
            }

            $fixtures[] = $fixture;
        }

        usort($fixtures, function(DocumentFixtureInterface $fixture1, DocumentFixtureInterface $fixture2) {
            return $fixture1->getOrder() > $fixture2->getOrder();
        });

        return $fixtures;
    }
1261832
private function setDependencies(array $packages): self
    {
        $dependencies = [];
        foreach ($packages as $package) {
            foreach ($package->getRequires() as $link) {
                $dependencies[$link->getTarget()][$link->getSource()] = $link->getSource();
            }
        }

        $this->dependencies = $dependencies;

        return $this;
    }
1119444
public function load(array $fields)
    {
        $this->quote->setStoreId($this->storeManager->getStore()->getId());

        foreach ($fields as $rawFields) {
            $method = 'set' . SimpleDataObjectConverter::snakeCaseToUpperCamelCase($rawFields);
            $this->log->debug('Starting method ' . $method);
            $this->{$method}();
            $this->log->debug('Finished method ' . $method);
        }

        return $this->quote;
    }
1102058
public function loadFile($with = array())
    {
        return $this->getManager()->loadModel($this->owner->{$this->idAttribute}, $with);
    }
73788
public function setEntries($entries)
    {
        foreach ($entries as $key => $dtoData) {
            $this->entries[$key] = new LeagueItemDto($dtoData);
        }
    
        return $this;
    }
1254135
public function addDescriptors(array $descriptors): self
    {
        $this->descriptors = array_values(
            array_unique(
                array_merge($this->descriptors, $descriptors)
            )
        );

        return $this;
    }
838832
public function loadFromArray(array $array)
    {
        if (isset($array['filename'])) {
            $this->filename = $array['filename'];
        }

        if (isset($array['size'])) {
            $this->size = $array['size'];
        }

        if (isset($array['type'])) {
            $this->type = $array['type'];
        }

        if (isset($array['cid'])) {
            $this->cid = $array['cid'];
        }

        if (isset($array['href'])) {
            $this->href = $array['href'];
        }

        return $this;
    }