@param array $data

@return ScheduleInstruction
541707
public static function createFromData(array $data)
    {
        if (!isset($data['method'])) {
            throw new DomainException(self::REQUIRED_METHOD);
        }

        switch ($data['method']) {
            case self::AUTO:
                $scheduleInstruction = new AutoType($data);

                break;
            case self::DATE_INTERVAL:
                $scheduleInstruction = new DateIntervalType($data);

                break;
            case self::DAY_OF_MONTH:
                $scheduleInstruction = new DayOfMonthType($data);

                break;
            case self::DAY_OF_WEEK:
                $scheduleInstruction = new DayOfWeekType($data);

                break;
            case self::IMMEDIATELY:
                $scheduleInstruction = new ImmediatelyType($data);

                break;
            case self::INTELLIGENT:
                $scheduleInstruction = new IntelligentType($data);

                break;
            default:
                throw new DomainException(
                    sprintf(self::UNSUPPORTED_METHOD, implode(',', self::$availableMethods))
                );
        }

        return $scheduleInstruction;
    }
25829
public function fill(array $data)
    {
        $this->fields->each(function (Field $field) use ($data) {
            $field->fill($data);
        });

        return $this;
    }
298166
public function create(array $data = array())
    {
        if (!isset($data["configPathPrefix"])) {
            $data["configPathPrefix"] = $this->configPathPrefix;
        }
        return $this->_objectManager->create($this->_instanceName, $data);
    }
337739
public function setCache(array $data)
    {
        if (!$this->isCached) {
            $this->memcache->set(
                $this->config['key_prefix'] . '.storage',
                $data,
                false,
                $this->config['expiration_time']
            );
        }

        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;
    }
978130
private function setProperties(array $data)
    {
        foreach ($data as $key => $value) {
            $this->setProperty($key, $value);
        }

        return $this;
    }
447489
public function create(array $data)
  {
    $Period = new Period();
    $Period->setConnection($this->databaseConnectionName);
    $Period->fill($data)->save();

    return $Period;
  }
336383
final public function fromArray(Array $data): self
    {
        foreach ($data as $key => $value) {
            $method = 'set' . ucfirst($key);

            if (method_exists($this, $method)) {
                $this->$method($value);
            }
        }

        return $this;
    }
904633
public static function createFromData(array $data): self
    {
        if (!isset($data['method'])) {
            throw new DomainException(self::REQUIRED_METHOD);
        }

        switch ($data['method']) {
            case self::NONE:
                $paymentInstruction = new NoneType($data);

                break;
            case self::PARTIAL:
                $paymentInstruction = new PartialType($data);

                break;
            case self::DISCOUNT:
                $paymentInstruction = new DiscountType($data);

                break;
            default:
                throw new DomainException(
                    sprintf(self::UNSUPPORTED_METHOD, implode(',', self::$availableMethods))
                );
        }

        return $paymentInstruction;
    }
414629
public function update(array $data)
    {
        $todo = Basecamp::todos($this->bucket->id)->update($this->id, $data);

        $this->setAttributes($todo);

        return $todo;
    }
118236
public function setData(array $data)
    {
        $data = $this->setIdFromData($data);

        parent::setData($data);
        return $this;
    }
714477
public function setData($data = [])
    {
        $this->data = $data;
        $this->debug->info(__FUNCTION__, 'setData: ', $this->data);

        return $this;
    }
1207321
public function update(array $data)
    {
        $template = Basecamp::templates()->update($this->id, $data);

        $this->setAttributes($template);

        return $template;
    }
297526
public function setArray(array $data)
    {
        foreach ($data as $name => $value) {
            $this->set($name, $value);
        }
        return $this;
    }
1318528
public function populate(array $data)
    {
        foreach ($data as $property => $value) {
            if (property_exists($this, $property)) {
                $this->{$property} = $value;
            }
        }
        return $this;
    }
560285
public static function fromData(array $data)
    {
        $policies = [];
        foreach (isset($data['schedule']) ? $data['schedule'] : [] as $policyData) {
            $policies[] = new Policy($policyData['interval'], $policyData['count']);
        }

        return new static($policies, isset($data['manual_count']) ? $data['manual_count'] : 1);
    }
454917
public static function fromArray(array $data)
    {
        $iniSections = IniParser::i()->parseArray($data);

        return self::fromIniSections($iniSections);
    }