Set which data to include in the data object, additionally
search for an available ACF field if a method can't be
found directly.

@param array $data An array of meta-data slugs
@return Ultra\Mutator\Mutator The mutated data object
977717
public function with(array $data)
    {
        foreach($data as $method)
        {
            if(method_exists($this, $method))
            {
                $this->$method();
            }
            elseif(taxonomy_exists($method))
            {
                $this->taxonomy($method);
            }
            elseif(function_exists('get_field'))
            {
                $this->field($method);
            }
        }

        return $this;
    }
921713
private function setData(array $data = null)
    {
        if (null === $data || count($data) === 0) {
            $data = new \stdClass();
        }

        $this->data = $data;

        return $this;
    }
1008998
public function setColumns(array $data)
    {
        unset($this->query['columns']);
        foreach ($data as $field => $value) {
            $this->addColumn($field, $value);
        }
        return $this;
    }
30090
public function data(array $data)
        {
            foreach ($data as $key => $value) {
                $this->attributes['data-'.$key] = $value;
            }
            return $this;
        }
745132
protected function setBladeData($data)
    {
        // Get __blade/__debugger key
        $this->data = $data['__data']['__blade'];

        // Only worry about rewriting data if we have more than one class
        if (count($this->data) > 1) {
            // Get first item from data array
            $first = reset($this->data);

            // Get last item from data array
            $last = end($this->data);

            // If last item does not inherit tree and first class is App
            if (!$last->tree && $first->class === 'App') {
                // Rewrite $this->data with first (App) and last item in array
                $this->data = [$first, $last];
            // Else if $last does not inherit tree
            } elseif (!$last->tree) {
                // Rewrite $this->data with last item in array
                $this->data = $last;
            }
        }

        return $this;
    }
271337
public function set(array $data)
    {
        foreach ($data as $key => $value) {
            if (method_exists($this, 'set' . $key)) {
                $this->{'set' . $key}($value);
            }
        }

        return $this;
    }
1048793
public static function set_meta_data($data)
    {
        if (is_array($data)) {
            foreach ($data as $key => $value) {
                self::$meta_data[strtolower($key)] = $value;
            }
        } else {
            user_error("set_meta_data must be passed an array", E_USER_ERROR);
        }
    }
30238
public function initFromArray(array $data) {

        $unknownFields = [];

        foreach ($data as $k => $v) {

            if (empty($v)) {
                continue;
            }

            $setter = 'set' . ucfirst(str_replace('_', '', ucwords($k, '_')));

            if (method_exists($this, $setter)) {
                $this->{$setter}($v);
                continue;
            }

            $unknownFields[$k] = $v;

        }

        if (!empty($unknownFields)) {
            trigger_error('Encountered unknown fields in response: ' . json_encode($unknownFields));
        }

        return $this;

    }
1293393
public function setData(array $data)
    {
        $this->isMergingData = true;
        /**
         * @todo Kinda hacky, but works with the concept of form.
         *     Should work embeded in a form group or in a dashboard.
         */
        $data = array_merge($_GET, $data);

        parent::setData($data);

        /** Merge any available presets */
        $data = $this->mergePresets($data);

        parent::setData($data);

        $this->isMergingData = false;

        if ($this->lang()) {
            $this->translator()->setLocale($this->lang());
        }

        return $this;
    }
869192
public function addMetadata($data)
    {
        if (is_array($data)) {
            foreach ($data as $k => $v) {
                $this->metadata[$k] = $v;
            }
        }
        else {
            $this->metadata[] = $data;
        }

        return $this;
    }
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;
    }
1069423
private function setValues(array $data)
    {
        foreach ($data as $key => $datum) {
            $this->set($key, $datum);
        }
        return $this;
    }
246773
protected function setRequestData(array $data = [])
    {
        if (($this->post instanceof Collection) && (!$this->post->isEmpty())) {
            unset($this->post);
        }

        $this->post = new Collection($data);

        return $this->post;
    }
102848
public function setData(array $data)
    {
        if (isset($data['name'])) {
            $this->setName($data['name']);
        }

        if (isset($data['active'])) {
            $this->setActive($data['active']);
        }

        return $this;
    }
443782
public function setExtraData($data)
    {
        if (is_a($data, Arrayable::class)) {
            $data = $data->toArray();
        }

        if ( ! is_array($data)) {
            $data = [ $data ];
        }

        $this->extraData = $data;

        return $this;
    }
1166295
public function setAllData($data)
    {
        array_walk(
            $data,
            function ($value, $key) {
                $this->{$key} = $value;
            }
        );

        return $this;
    }
727918
public function setValues($data)
    {
        if (!is_array($data)) {
            return $this;
        }

        foreach ($data as $key => $value) {
            $this->$key = $value;
        }
    }