Create CarbonPeriod from ISO 8601 string.

@param string   $iso
@param int|null $options

@return static
349874
public static function createFromIso($iso, $options = null)
    {
        $params = static::parseIso8601($iso);

        $instance = static::createFromArray($params);

        if ($options !== null) {
            $instance->setOptions($options);
        }

        return $instance;
    }
215802
public static function create(array $data, array $options = []) {
        /** @type \Titon\Model\Model $model */
        $model = new static();
        $model->fill($data);

        if ($model->save($options)) {
            return $model;
        }

        return null;
    }
745
public function build($dir, $quality, array $options = array())
    {
        // Alter default quality on demand
        if (isset($options['quality'])) {
            $quality = $options['quality'];
        }

        return new Thumb($dir, $options['dimensions'], $quality);
    }
413131
public static function create(array $tokens, array $options) {
        HashMap::assert($tokens, 'tokens');

        $format    = Format::create($options);
        $operation = SqlOperation::create($tokens);

        if ($operation === SqlOperations::INSERT) return $format->encode(InsertChangeSet::create($tokens));
        if ($operation === SqlOperations::UPDATE) return $format->encode(UpdateChangeSet::create($tokens));

        return null;
    }
412828
public static function createTemporary($extension = NULL) {
    $tmpfile = tempnam(sys_get_temp_dir(), mb_substr(uniqid(),0,3));

    if ($extension) {
      rename($tmpfile, $tmpfile = $tmpfile.'.'.ltrim($extension, '.'));
    }

    return new static($tmpfile);
  }
1092041
public function isoWeek($week = null, $dayOfWeek = null, $dayOfYear = null)
    {
        return $this->week(
            $week,
            $dayOfWeek ?? 1,
            $dayOfYear ?? 4
        );
    }
107497
public function setOptions($options)
    {
        $format = null;

        /** @noinspection UnSafeIsSetOverArrayInspection */
        if (isset($options['date_format'])) {
            $format = $options['date_format'];

            unset($options['date_format']);
        } /** @noinspection UnSafeIsSetOverArrayInspection */ elseif (isset($options['format'])) {
            $format = $options['format'];

            unset($options['format']);
        }

        if ($format) {
            $options['format'] = $format;
        }

        parent::setOptions($options);

        return $this;
    }
477853
public static function make($original, $options = null, $verify = false)
    {
        self::self($verify);

        return self::$driver->make($original, $options);
    }
772173
public function createForm($data = null, array $options = [])
    {
        return $this->formFactory->create(NodeFormType::class, $data, $options);
    }
924814
public function create(array $options)
    {
        $entityClass = $this->getClassName($options['entity-table']);
        $closureClass = $this->getClassName($options['closure-table']);
        $useInnoDB = $options['use-innodb'];
        $stubPrefix = $useInnoDB ? '-innodb' : '';

        $path = $this->getPath($options['entity-table'], $options['migrations-path']);
        $stub = $this->getStub('migration' . $stubPrefix, 'migrations');

        $this->filesystem->put(
            $path,
            $this->parseStub($stub, [
            'entity_table' => $options['entity-table'],
            'entity_class' => $entityClass,
            'closure_table' => $options['closure-table'],
            'closure_class' => $closureClass,
            ])
        );

        return [$path];
    }
965426
public static function createWithRecurrences(TimePoint $start, TimeInterval $interval, $recurrences, $options = 0)
    {
        $cur = $start;
        if ($options & DatePeriod::EXCLUDE_START_DATE) {
            $recurrences = $recurrences + 1;
        }
        for ($i = 0; $i < $recurrences; $i++) {
            $cur = $cur->add($interval);
        }
        return new self($start, $interval, $cur, $options);
    }
897392
public function getCountPerMonth(Carbon $from, Carbon $until = null, $locale = null, $query = null, $cacheKey = null)
    {
        return $this->getCountPer('Month', $from, $until, $locale, $query, $cacheKey);
    }
182484
def _iso_to_gregorian(iso_year, iso_week, iso_day):
    ""
    year_start = _iso_year_start(iso_year)
    return year_start + dt.timedelta(days=iso_day-1, weeks=iso_week-1)
1017317
protected static function parseIso8601($iso)
    {
        $result = [];

        $interval = null;
        $start = null;
        $end = null;

        foreach (explode('/', $iso) as $key => $part) {
            if ($key === 0 && preg_match('/^R([0-9]*)$/', $part, $match)) {
                $parsed = strlen($match[1]) ? (int) $match[1] : null;
            } elseif ($interval === null && $parsed = CarbonInterval::make($part)) {
                $interval = $part;
            } elseif ($start === null && $parsed = Carbon::make($part)) {
                $start = $part;
            } elseif ($end === null && $parsed = Carbon::make(static::addMissingParts($start, $part))) {
                $end = $part;
            } else {
                throw new InvalidArgumentException("Invalid ISO 8601 specification: $iso.");
            }

            $result[] = $parsed;
        }

        return $result;
    }
1199275
public function create($options = array()) {
        $options = new Values($options);

        $data = Values::of(array(
            'ExpirationDate' => Serialize::iso8601DateTime($options['expirationDate']),
            'Details' => $options['details'],
            'HiddenDetails' => $options['hiddenDetails'],
        ));

        $payload = $this->version->create(
            'POST',
            $this->uri,
            array(),
            $data
        );

        return new ChallengeInstance(
            $this->version,
            $payload,
            $this->solution['serviceSid'],
            $this->solution['identity'],
            $this->solution['factorSid']
        );
    }
672862
public static function getInstance( $options = [] )
	{
		if( is_null( self::$instance ) || !empty( $options ) ){
			self::$instance = new static( $options );
		}
		return self::$instance;
	}
1317742
protected function decodeMessage($binary, array $options = [])
    {
        $resolver = new OptionsResolver();
        $this->encoder->setDefaultOptions($resolver);
        $options = $resolver->resolve($options);

        return $this->encoder->decode($binary, $this->compressor, $options);
    }