/** * @todo need to check for duplicate migration names */ protected function parse_args(array $args) { if (count($args) != 1) { throw new \InvalidArgumentException("Usage: script/generate migration migration_name"); } $this->migration_name = $args[0]; $this->migration_class_prefix = \Inflector::camelize($this->migration_name); $now = new \Date_Time(); $this->utc_timestamp = $now->to_utc()->timestamp(); }
public function quote_utc_date_time($value) { if ($value === NULL) { return 'NULL'; } if (!is_object($value)) { $value = new Date_Time($value); } return $this->quote_string($value->to_utc()->iso_date_time()); }