本文整理汇总了PHP中Currency::create方法的典型用法代码示例。如果您正苦于以下问题:PHP Currency::create方法的具体用法?PHP Currency::create怎么用?PHP Currency::create使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Currency
的用法示例。
在下文中一共展示了Currency::create方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct($controller, $name, Order $order)
{
$this->order = $order;
$fields = FieldList::create(HiddenField::create('OrderID', '', $order->ID));
$actions = FieldList::create();
//payment
if (self::config()->allow_paying && $order->canPay()) {
$gateways = GatewayInfo::get_supported_gateways();
//remove manual gateways
foreach ($gateways as $gateway => $gatewayname) {
if (GatewayInfo::is_manual($gateway)) {
unset($gateways[$gateway]);
}
}
if (!empty($gateways)) {
$fields->push(HeaderField::create("MakePaymentHeader", _t("OrderActionsForm.MAKEPAYMENT", "Make Payment")));
$outstandingfield = Currency::create();
$outstandingfield->setValue($order->TotalOutstanding());
$fields->push(LiteralField::create("Outstanding", sprintf(_t("OrderActionsForm.OUTSTANDING", "Outstanding: %s"), $outstandingfield->Nice())));
$fields->push(OptionsetField::create('PaymentMethod', _t("OrderActionsForm.PAYMENTMETHOD", "Payment Method"), $gateways, key($gateways)));
$actions->push(FormAction::create('dopayment', _t('OrderActionsForm.PAYORDER', 'Pay outstanding balance')));
}
}
//cancelling
if (self::config()->allow_cancelling && $order->canCancel()) {
$actions->push(FormAction::create('docancel', _t('OrderActionsForm.CANCELORDER', 'Cancel this order')));
}
parent::__construct($controller, $name, $fields, $actions);
$this->extend("updateForm", $order);
}
示例2: run
public function run()
{
Language::create(array('name' => 'Español', 'locale' => 'es'));
BranchType::create(array('name' => 'Productos'));
BranchType::create(array('name' => 'Servicios'));
PaymentType::create(array('name' => 'Efectivo'));
PaymentType::create(array('name' => 'Aplicar Crédito'));
PaymentType::create(array('name' => 'Transferencia Bancaria'));
PaymentType::create(array('name' => 'cheque'));
InvoiceStatus::create(array('name' => 'Emitido'));
InvoiceStatus::create(array('name' => 'Enviado'));
InvoiceStatus::create(array('name' => 'Visto'));
InvoiceStatus::create(array('name' => 'Parcial'));
InvoiceStatus::create(array('name' => 'Pagado'));
InvoiceStatus::create(array('name' => 'Anulado'));
Frequency::create(array('name' => 'Mensual'));
Frequency::create(array('name' => 'Trimestral'));
Frequency::create(array('name' => 'Semestral'));
Frequency::create(array('name' => 'Anual'));
Currency::create(array('name' => 'Bolivianos', 'code' => 'BS', 'symbol' => 'Bs', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.'));
DatetimeFormat::create(array('format' => 'd/M/Y g:i a', 'label' => '10/Mar/2013'));
DatetimeFormat::create(array('format' => 'd-M-Yk g:i a', 'label' => '10-Mar-2013'));
DatetimeFormat::create(array('format' => 'd/F/Y g:i a', 'label' => '10/March/2013'));
DatetimeFormat::create(array('format' => 'd-F-Y g:i a', 'label' => '10-March-2013'));
DatetimeFormat::create(array('format' => 'M j, Y g:i a', 'label' => 'Mar 10, 2013 6:15 pm'));
DatetimeFormat::create(array('format' => 'F j, Y g:i a', 'label' => 'March 10, 2013 6:15 pm'));
DatetimeFormat::create(array('format' => 'D M jS, Y g:ia', 'label' => 'Mon March 10th, 2013 6:15 pm'));
DateFormat::create(array('format' => 'd/M/Y', 'picker_format' => 'dd/M/yyyy', 'label' => '10/Mar/2013'));
DateFormat::create(array('format' => 'd-M-Y', 'picker_format' => 'dd-M-yyyy', 'label' => '10-Mar-2013'));
DateFormat::create(array('format' => 'd/F/Y', 'picker_format' => 'dd/MM/yyyy', 'label' => '10/March/2013'));
DateFormat::create(array('format' => 'd-F-Y', 'picker_format' => 'dd-MM-yyyy', 'label' => '10-March-2013'));
DateFormat::create(array('format' => 'M j, Y', 'picker_format' => 'M d, yyyy', 'label' => 'Mar 10, 2013'));
DateFormat::create(array('format' => 'F j, Y', 'picker_format' => 'MM d, yyyy', 'label' => 'March 10, 2013'));
DateFormat::create(array('format' => 'D M j, Y', 'picker_format' => 'D MM d, yyyy', 'label' => 'Mon March 10, 2013'));
/*
d, dd: Numeric date, no leading zero and leading zero, respectively. Eg, 5, 05.
D, DD: Abbreviated and full weekday names, respectively. Eg, Mon, Monday.
m, mm: Numeric month, no leading zero and leading zero, respectively. Eg, 7, 07.
M, MM: Abbreviated and full month names, respectively. Eg, Jan, January
yy, yyyy: 2- and 4-digit years, respectively. Eg, 12, 2012.)
*/
$timezones = array('Pacific/Midway' => "(GMT-11:00) Midway Island", 'US/Samoa' => "(GMT-11:00) Samoa", 'US/Hawaii' => "(GMT-10:00) Hawaii", 'US/Alaska' => "(GMT-09:00) Alaska", 'US/Pacific' => "(GMT-08:00) Pacific Time (US & Canada)", 'America/Tijuana' => "(GMT-08:00) Tijuana", 'US/Arizona' => "(GMT-07:00) Arizona", 'US/Mountain' => "(GMT-07:00) Mountain Time (US & Canada)", 'America/Chihuahua' => "(GMT-07:00) Chihuahua", 'America/Mazatlan' => "(GMT-07:00) Mazatlan", 'America/Mexico_City' => "(GMT-06:00) Mexico City", 'America/Monterrey' => "(GMT-06:00) Monterrey", 'Canada/Saskatchewan' => "(GMT-06:00) Saskatchewan", 'US/Central' => "(GMT-06:00) Central Time (US & Canada)", 'US/Eastern' => "(GMT-05:00) Eastern Time (US & Canada)", 'US/East-Indiana' => "(GMT-05:00) Indiana (East)", 'America/Bogota' => "(GMT-05:00) Bogota", 'America/Lima' => "(GMT-05:00) Lima", 'America/Caracas' => "(GMT-04:30) Caracas", 'Canada/Atlantic' => "(GMT-04:00) Atlantic Time (Canada)", 'America/La_Paz' => "(GMT-04:00) La Paz", 'America/Santiago' => "(GMT-04:00) Santiago", 'Canada/Newfoundland' => "(GMT-03:30) Newfoundland", 'America/Buenos_Aires' => "(GMT-03:00) Buenos Aires", 'Greenland' => "(GMT-03:00) Greenland", 'Atlantic/Stanley' => "(GMT-02:00) Stanley", 'Atlantic/Azores' => "(GMT-01:00) Azores", 'Atlantic/Cape_Verde' => "(GMT-01:00) Cape Verde Is.", 'Africa/Casablanca' => "(GMT) Casablanca", 'Europe/Dublin' => "(GMT) Dublin", 'Europe/Lisbon' => "(GMT) Lisbon", 'Europe/London' => "(GMT) London", 'Africa/Monrovia' => "(GMT) Monrovia", 'Europe/Amsterdam' => "(GMT+01:00) Amsterdam", 'Europe/Belgrade' => "(GMT+01:00) Belgrade", 'Europe/Berlin' => "(GMT+01:00) Berlin", 'Europe/Bratislava' => "(GMT+01:00) Bratislava", 'Europe/Brussels' => "(GMT+01:00) Brussels", 'Europe/Budapest' => "(GMT+01:00) Budapest", 'Europe/Copenhagen' => "(GMT+01:00) Copenhagen", 'Europe/Ljubljana' => "(GMT+01:00) Ljubljana", 'Europe/Madrid' => "(GMT+01:00) Madrid", 'Europe/Paris' => "(GMT+01:00) Paris", 'Europe/Prague' => "(GMT+01:00) Prague", 'Europe/Rome' => "(GMT+01:00) Rome", 'Europe/Sarajevo' => "(GMT+01:00) Sarajevo", 'Europe/Skopje' => "(GMT+01:00) Skopje", 'Europe/Stockholm' => "(GMT+01:00) Stockholm", 'Europe/Vienna' => "(GMT+01:00) Vienna", 'Europe/Warsaw' => "(GMT+01:00) Warsaw", 'Europe/Zagreb' => "(GMT+01:00) Zagreb", 'Europe/Athens' => "(GMT+02:00) Athens", 'Europe/Bucharest' => "(GMT+02:00) Bucharest", 'Africa/Cairo' => "(GMT+02:00) Cairo", 'Africa/Harare' => "(GMT+02:00) Harare", 'Europe/Helsinki' => "(GMT+02:00) Helsinki", 'Europe/Istanbul' => "(GMT+02:00) Istanbul", 'Asia/Jerusalem' => "(GMT+02:00) Jerusalem", 'Europe/Kiev' => "(GMT+02:00) Kyiv", 'Europe/Minsk' => "(GMT+02:00) Minsk", 'Europe/Riga' => "(GMT+02:00) Riga", 'Europe/Sofia' => "(GMT+02:00) Sofia", 'Europe/Tallinn' => "(GMT+02:00) Tallinn", 'Europe/Vilnius' => "(GMT+02:00) Vilnius", 'Asia/Baghdad' => "(GMT+03:00) Baghdad", 'Asia/Kuwait' => "(GMT+03:00) Kuwait", 'Africa/Nairobi' => "(GMT+03:00) Nairobi", 'Asia/Riyadh' => "(GMT+03:00) Riyadh", 'Asia/Tehran' => "(GMT+03:30) Tehran", 'Europe/Moscow' => "(GMT+04:00) Moscow", 'Asia/Baku' => "(GMT+04:00) Baku", 'Europe/Volgograd' => "(GMT+04:00) Volgograd", 'Asia/Muscat' => "(GMT+04:00) Muscat", 'Asia/Tbilisi' => "(GMT+04:00) Tbilisi", 'Asia/Yerevan' => "(GMT+04:00) Yerevan", 'Asia/Kabul' => "(GMT+04:30) Kabul", 'Asia/Karachi' => "(GMT+05:00) Karachi", 'Asia/Tashkent' => "(GMT+05:00) Tashkent", 'Asia/Kolkata' => "(GMT+05:30) Kolkata", 'Asia/Kathmandu' => "(GMT+05:45) Kathmandu", 'Asia/Yekaterinburg' => "(GMT+06:00) Ekaterinburg", 'Asia/Almaty' => "(GMT+06:00) Almaty", 'Asia/Dhaka' => "(GMT+06:00) Dhaka", 'Asia/Novosibirsk' => "(GMT+07:00) Novosibirsk", 'Asia/Bangkok' => "(GMT+07:00) Bangkok", 'Asia/Jakarta' => "(GMT+07:00) Jakarta", 'Asia/Krasnoyarsk' => "(GMT+08:00) Krasnoyarsk", 'Asia/Chongqing' => "(GMT+08:00) Chongqing", 'Asia/Hong_Kong' => "(GMT+08:00) Hong Kong", 'Asia/Kuala_Lumpur' => "(GMT+08:00) Kuala Lumpur", 'Australia/Perth' => "(GMT+08:00) Perth", 'Asia/Singapore' => "(GMT+08:00) Singapore", 'Asia/Taipei' => "(GMT+08:00) Taipei", 'Asia/Ulaanbaatar' => "(GMT+08:00) Ulaan Bataar", 'Asia/Urumqi' => "(GMT+08:00) Urumqi", 'Asia/Irkutsk' => "(GMT+09:00) Irkutsk", 'Asia/Seoul' => "(GMT+09:00) Seoul", 'Asia/Tokyo' => "(GMT+09:00) Tokyo", 'Australia/Adelaide' => "(GMT+09:30) Adelaide", 'Australia/Darwin' => "(GMT+09:30) Darwin", 'Asia/Yakutsk' => "(GMT+10:00) Yakutsk", 'Australia/Brisbane' => "(GMT+10:00) Brisbane", 'Australia/Canberra' => "(GMT+10:00) Canberra", 'Pacific/Guam' => "(GMT+10:00) Guam", 'Australia/Hobart' => "(GMT+10:00) Hobart", 'Australia/Melbourne' => "(GMT+10:00) Melbourne", 'Pacific/Port_Moresby' => "(GMT+10:00) Port Moresby", 'Australia/Sydney' => "(GMT+10:00) Sydney", 'Asia/Vladivostok' => "(GMT+11:00) Vladivostok", 'Asia/Magadan' => "(GMT+12:00) Magadan", 'Pacific/Auckland' => "(GMT+12:00) Auckland", 'Pacific/Fiji' => "(GMT+12:00) Fiji");
foreach ($timezones as $name => $location) {
Timezone::create(array('name' => $name, 'location' => $location));
}
}
示例3: __construct
public function __construct($controller, $name, Order $order)
{
$this->order = $order;
$fields = FieldList::create(HiddenField::create('OrderID', '', $order->ID));
$actions = FieldList::create();
//payment
if (self::config()->allow_paying && $order->canPay()) {
$gateways = GatewayInfo::getSupportedGateways();
//remove manual gateways
foreach ($gateways as $gateway => $gatewayname) {
if (GatewayInfo::isManual($gateway)) {
unset($gateways[$gateway]);
}
}
if (!empty($gateways)) {
$fields->push(HeaderField::create("MakePaymentHeader", _t("OrderActionsForm.MakePayment", "Make Payment")));
$outstandingfield = Currency::create();
$outstandingfield->setValue($order->TotalOutstanding(true));
$fields->push(LiteralField::create("Outstanding", _t('Order.OutstandingWithAmount', 'Outstanding: {Amount}', '', array('Amount' => $outstandingfield->Nice()))));
$fields->push(OptionsetField::create('PaymentMethod', _t("OrderActionsForm.PaymentMethod", "Payment Method"), $gateways, key($gateways)));
if ($ccFields = $this->getCCFields($gateways)) {
if ($this->config()->include_jquery) {
Requirements::javascript(THIRDPARTY_DIR . '/jquery/jquery.min.js');
}
Requirements::javascript(SHOP_DIR . '/javascript/OrderActionsForm.js');
$fields->push($ccFields);
}
$actions->push(FormAction::create('dopayment', _t('OrderActionsForm.PayOrder', 'Pay outstanding balance')));
}
}
//cancelling
if (self::config()->allow_cancelling && $order->canCancel()) {
$actions->push(FormAction::create('docancel', _t('OrderActionsForm.CancelOrder', 'Cancel this order')));
}
parent::__construct($controller, $name, $fields, $actions, OrderActionsForm_Validator::create(array('PaymentMethod')));
$this->extend("updateForm", $order);
}
示例4: run
/**
* Auto generated seed file
*
* @return void
*/
public function run()
{
\DB::table('currencies')->delete();
Currency::create(['country' => 'Albania', 'name' => 'Lek', 'code' => 'ALL', 'symbol' => 'Lek', 'hex' => '4c, 65, 6b']);
Currency::create(['country' => 'Afghanistan', 'name' => 'Afghani', 'code' => 'AFN', 'symbol' => '؋', 'hex' => '60b']);
Currency::create(['country' => 'Argentina', 'name' => 'Peso', 'code' => 'ARS', 'symbol' => '$', 'hex' => '24']);
Currency::create(['country' => 'Aruba', 'name' => 'Guilder', 'code' => 'AWG', 'symbol' => 'ƒ', 'hex' => '192']);
Currency::create(['country' => 'Australia', 'name' => 'Dollar', 'code' => 'AUD', 'symbol' => '$', 'hex' => '24']);
Currency::create(['country' => 'Azerbaijan', 'name' => 'Manat', 'code' => 'AZN', 'symbol' => 'ман', 'hex' => '43c, 430, 43d']);
Currency::create(['country' => 'Bahamas', 'name' => 'Dollar', 'code' => 'BSD', 'symbol' => '$', 'hex' => '24']);
Currency::create(['country' => 'Barbados', 'name' => 'Dollar', 'code' => 'BBD', 'symbol' => '$', 'hex' => '24']);
Currency::create(['country' => 'Belarus', 'name' => 'Ruble', 'code' => 'BYR', 'symbol' => 'p.', 'hex' => '70, 2e']);
Currency::create(['country' => 'Belize', 'name' => 'Dollar', 'code' => 'BZD', 'symbol' => 'BZ$', 'hex' => '42, 5a, 24']);
Currency::create(['country' => 'Bermuda', 'name' => 'Dollar', 'code' => 'BMD', 'symbol' => '$', 'hex' => '24']);
Currency::create(['country' => 'Bolivia', 'name' => 'Boliviano', 'code' => 'BOB', 'symbol' => '$b', 'hex' => '24, 62']);
Currency::create(['country' => 'Bosnia and Herzegovina', 'name' => 'Convertible Marka', 'code' => 'BAM', 'symbol' => 'KM', 'hex' => '4b, 4d']);
Currency::create(['country' => 'Botswana', 'name' => 'Pula', 'code' => 'BWP', 'symbol' => 'P', 'hex' => '50']);
Currency::create(['country' => 'Bulgaria', 'name' => 'Lev', 'code' => 'BGN', 'symbol' => 'лв', 'hex' => '43b, 432']);
Currency::create(['country' => 'Brazil', 'name' => 'Real', 'code' => 'BRL', 'symbol' => 'R$', 'hex' => '52, 24']);
Currency::create(['country' => 'Brunei', 'name' => 'Darussalam Dollar', 'code' => 'BND', 'symbol' => '$', 'hex' => '24']);
Currency::create(['country' => 'Cambodia', 'name' => 'Riel', 'code' => 'KHR', 'symbol' => '៛', 'hex' => '17db']);
Currency::create(['country' => 'Canada', 'name' => 'Dollar', 'code' => 'CAD', 'symbol' => '$', 'hex' => '24']);
Currency::create(['country' => 'Cayman', 'name' => 'Dollar', 'code' => 'KYD', 'symbol' => '$', 'hex' => '24']);
Currency::create(['country' => 'Chile', 'name' => 'Peso', 'code' => 'CLP', 'symbol' => '$', 'hex' => '24']);
Currency::create(['country' => 'China', 'name' => 'Yuan Renminbi', 'code' => 'CNY', 'symbol' => '¥', 'hex' => 'a5']);
Currency::create(['country' => 'Colombia', 'name' => 'Peso', 'code' => 'COP', 'symbol' => '$', 'hex' => '24']);
Currency::create(['country' => 'Costa Rica', 'name' => 'Colon', 'code' => 'CRC', 'symbol' => '₡', 'hex' => '20a1']);
Currency::create(['country' => 'Croatia', 'name' => 'Kuna', 'code' => 'HRK', 'symbol' => 'kn', 'hex' => '6b, 6e']);
Currency::create(['country' => 'Cuba', 'name' => 'Peso', 'code' => 'CUP', 'symbol' => '₱', 'hex' => '20b1']);
Currency::create(['country' => 'Czech Republic', 'name' => 'Koruna', 'code' => 'CZK', 'symbol' => 'Kč', 'hex' => '4b, 10d']);
Currency::create(['country' => 'Denmark', 'name' => 'Krone', 'code' => 'DKK', 'symbol' => 'kr', 'hex' => '6b, 72']);
Currency::create(['country' => 'Dominican Republic', 'name' => 'Peso', 'code' => 'DOP', 'symbol' => 'RD$', 'hex' => '52, 44, 24']);
Currency::create(['country' => 'East Caribbean', 'name' => 'Dollar', 'code' => 'XCD', 'symbol' => '$', 'hex' => '24']);
Currency::create(['country' => 'Egypt', 'name' => 'Pound', 'code' => 'EGP', 'symbol' => '£', 'hex' => 'a3']);
Currency::create(['country' => 'El Salvador', 'name' => 'Colon', 'code' => 'SVC', 'symbol' => '$', 'hex' => '24']);
Currency::create(['country' => 'Estonia', 'name' => 'Kroon', 'code' => 'EEK', 'symbol' => 'kr', 'hex' => '6b, 72']);
Currency::create(['country' => 'Euro Member', 'name' => 'Euro', 'code' => 'EUR', 'symbol' => '€', 'hex' => '20ac']);
Currency::create(['country' => 'Falkland Islands', 'name' => 'Pound', 'code' => 'FKP', 'symbol' => '£', 'hex' => 'a3']);
Currency::create(['country' => 'Fiji', 'name' => 'Dollar', 'code' => 'FJD', 'symbol' => '$', 'hex' => '24']);
Currency::create(['country' => 'Ghana', 'name' => 'Cedis', 'code' => 'GHC', 'symbol' => '¢', 'hex' => 'a2']);
Currency::create(['country' => 'Gibraltar', 'name' => 'Pound', 'code' => 'GIP', 'symbol' => '£', 'hex' => 'a3']);
Currency::create(['country' => 'Guatemala', 'name' => 'Quetzal', 'code' => 'GTQ', 'symbol' => 'Q', 'hex' => '51']);
Currency::create(['country' => 'Guernsey', 'name' => 'Pound', 'code' => 'GGP', 'symbol' => '£', 'hex' => 'a3']);
Currency::create(['country' => 'Guyana', 'name' => 'Dollar', 'code' => 'GYD', 'symbol' => '$', 'hex' => '24']);
Currency::create(['country' => 'Honduras', 'name' => 'Lempira', 'code' => 'HNL', 'symbol' => 'L', 'hex' => '4c']);
Currency::create(['country' => 'Hong Kong', 'name' => 'Dollar', 'code' => 'HKD', 'symbol' => '$', 'hex' => '24']);
Currency::create(['country' => 'Hungary', 'name' => 'Forint', 'code' => 'HUF', 'symbol' => 'Ft', 'hex' => '46, 74']);
Currency::create(['country' => 'Iceland', 'name' => 'Krona', 'code' => 'ISK', 'symbol' => 'kr', 'hex' => '6b, 72']);
Currency::create(['country' => 'India', 'name' => 'Rupee', 'code' => 'INR', 'symbol' => '₹', 'hex' => '20B9']);
Currency::create(['country' => 'Indonesia', 'name' => 'Rupiah', 'code' => 'IDR', 'symbol' => 'Rp', 'hex' => '52, 70']);
Currency::create(['country' => 'Iran', 'name' => 'Rial', 'code' => 'IRR', 'symbol' => '﷼', 'hex' => 'fdfc']);
Currency::create(['country' => 'Isle of Man', 'name' => 'Pound', 'code' => 'IMP', 'symbol' => '£', 'hex' => 'a3']);
Currency::create(['country' => 'Israel', 'name' => 'Shekel', 'code' => 'ILS', 'symbol' => '₪', 'hex' => '20aa']);
Currency::create(['country' => 'Jamaica', 'name' => 'Dollar', 'code' => 'JMD', 'symbol' => 'J$', 'hex' => '4a, 24']);
Currency::create(['country' => 'Japan', 'name' => 'Yen', 'code' => 'JPY', 'symbol' => '¥', 'hex' => 'a5']);
Currency::create(['country' => 'Jersey', 'name' => 'Pound', 'code' => 'JEP', 'symbol' => '£', 'hex' => 'a3']);
Currency::create(['country' => 'Kazakhstan', 'name' => 'Tenge', 'code' => 'KZT', 'symbol' => 'лв', 'hex' => '43b, 432']);
Currency::create(['country' => 'Korea (North)', 'name' => 'Won', 'code' => 'KPW', 'symbol' => '₩', 'hex' => '20a9']);
Currency::create(['country' => 'Korea (South)', 'name' => 'Won', 'code' => 'KRW', 'symbol' => '₩', 'hex' => '20a9']);
Currency::create(['country' => 'Kyrgyzstan', 'name' => 'Som', 'code' => 'KGS', 'symbol' => 'лв', 'hex' => '43b, 432']);
Currency::create(['country' => 'Laos', 'name' => 'Kip', 'code' => 'LAK', 'symbol' => '₭', 'hex' => '20ad']);
Currency::create(['country' => 'Latvia', 'name' => 'Lat', 'code' => 'LVL', 'symbol' => 'Ls', 'hex' => '4c, 73']);
Currency::create(['country' => 'Lebanon', 'name' => 'Pound', 'code' => 'LBP', 'symbol' => '£', 'hex' => 'a3']);
Currency::create(['country' => 'Liberia', 'name' => 'Dollar', 'code' => 'LRD', 'symbol' => '$', 'hex' => '24']);
Currency::create(['country' => 'Lithuania', 'name' => 'Litas', 'code' => 'LTL', 'symbol' => 'Lt', 'hex' => '4c, 74']);
Currency::create(['country' => 'Macedonia', 'name' => 'Denar', 'code' => 'MKD', 'symbol' => 'ден', 'hex' => '434, 435, 43d']);
Currency::create(['country' => 'Malaysia', 'name' => 'Ringgit', 'code' => 'MYR', 'symbol' => 'RM', 'hex' => '52, 4d']);
Currency::create(['country' => 'Mauritius', 'name' => 'Rupee', 'code' => 'MUR', 'symbol' => '₨', 'hex' => '20a8']);
Currency::create(['country' => 'Mexico', 'name' => 'Peso', 'code' => 'MXN', 'symbol' => '$', 'hex' => '24']);
Currency::create(['country' => 'Mongolia', 'name' => 'Tughrik', 'code' => 'MNT', 'symbol' => '₮', 'hex' => '20ae']);
Currency::create(['country' => 'Mozambique', 'name' => 'Metical', 'code' => 'MZN', 'symbol' => 'MT', 'hex' => '4d, 54']);
Currency::create(['country' => 'Namibia', 'name' => 'Dollar', 'code' => 'NAD', 'symbol' => '$', 'hex' => '24']);
Currency::create(['country' => 'Nepal', 'name' => 'Rupee', 'code' => 'NPR', 'symbol' => '₨', 'hex' => '20a8']);
Currency::create(['country' => 'Netherlands', 'name' => 'Antilles Guilder', 'code' => 'ANG', 'symbol' => 'ƒ', 'hex' => '192']);
Currency::create(['country' => 'New Zealand', 'name' => 'Dollar', 'code' => 'NZD', 'symbol' => '$', 'hex' => '24']);
Currency::create(['country' => 'Nicaragua', 'name' => 'Cordoba', 'code' => 'NIO', 'symbol' => 'C$', 'hex' => '43, 24']);
Currency::create(['country' => 'Nigeria', 'name' => 'Naira', 'code' => 'NGN', 'symbol' => '₦', 'hex' => '20a6']);
Currency::create(['country' => 'Norway', 'name' => 'Krone', 'code' => 'NOK', 'symbol' => 'kr', 'hex' => '6b, 72']);
Currency::create(['country' => 'Oman', 'name' => 'Rial', 'code' => 'OMR', 'symbol' => '﷼', 'hex' => 'fdfc']);
Currency::create(['country' => 'Pakistan', 'name' => 'Rupee', 'code' => 'PKR', 'symbol' => '₨', 'hex' => '20a8']);
Currency::create(['country' => 'Panama', 'name' => 'Balboa', 'code' => 'PAB', 'symbol' => 'B/.', 'hex' => '42, 2f, 2e']);
Currency::create(['country' => 'Paraguay', 'name' => 'Guarani', 'code' => 'PYG', 'symbol' => 'Gs', 'hex' => '47, 73']);
Currency::create(['country' => 'Peru', 'name' => 'Nuevo Sol', 'code' => 'PEN', 'symbol' => 'S/.', 'hex' => '53, 2f, 2e']);
Currency::create(['country' => 'Philippines', 'name' => 'Peso', 'code' => 'PHP', 'symbol' => '₱', 'hex' => '20b1']);
Currency::create(['country' => 'Poland', 'name' => 'Zloty', 'code' => 'PLN', 'symbol' => 'zł', 'hex' => '7a, 142']);
Currency::create(['country' => 'Qatar', 'name' => 'Riyal', 'code' => 'QAR', 'symbol' => '﷼', 'hex' => 'fdfc']);
Currency::create(['country' => 'Romania', 'name' => 'New Leu', 'code' => 'RON', 'symbol' => 'lei', 'hex' => '6c, 65, 69']);
Currency::create(['country' => 'Russia', 'name' => 'Ruble', 'code' => 'RUB', 'symbol' => 'руб', 'hex' => '440, 443, 431']);
Currency::create(['country' => 'Saint Helena', 'name' => 'Pound', 'code' => 'SHP', 'symbol' => '£', 'hex' => 'a3']);
Currency::create(['country' => 'Saudi Arabia', 'name' => 'Riyal', 'code' => 'SAR', 'symbol' => '﷼', 'hex' => 'fdfc']);
Currency::create(['country' => 'Serbia', 'name' => 'Dinar', 'code' => 'RSD', 'symbol' => 'Дин.', 'hex' => '414, 438, 43d, 2e']);
Currency::create(['country' => 'Seychelles', 'name' => 'Rupee', 'code' => 'SCR', 'symbol' => '₨', 'hex' => '20a8']);
Currency::create(['country' => 'Singapore', 'name' => 'Dollar', 'code' => 'SGD', 'symbol' => '$', 'hex' => '24']);
Currency::create(['country' => 'Solomon Islands', 'name' => 'Dollar', 'code' => 'SBD', 'symbol' => '$', 'hex' => '24']);
Currency::create(['country' => 'Somalia', 'name' => 'Shilling', 'code' => 'SOS', 'symbol' => 'S', 'hex' => '53']);
//.........这里部分代码省略.........
示例5: run
//.........这里部分代码省略.........
<tr style="line-height:0.9">
<td width="270" align="left"><font size="7">\'.$ciudad.\'</font></td>
</tr>
</table>
\';
}
$pdf->writeHTMLCell($w=0, $h=0, $x=\'46\', $y=\'15\', $datoEmpresa, $border=0, $ln=1, $fill=0, $reseth=true, $align=\'left\', $autopadding=true);
//actividad económica
$actividad=$invoice->economic_activity;
$pdf->SetFont(\'helvetica\', \'\', 10);
$actividadEmpresa = \'
<table>
<tr>
<td align="center">\'.$actividad.\'</td>
</tr>
</table>\';
$pdf->writeHTMLCell($w=0, $h=0, $x=\'135\', $y=\'36\', $actividadEmpresa, $border=0, $ln=1, $fill=0, $reseth=true, $align=\'left\', $autopadding=true);
//TABLA datos del cliente
$pdf->SetFont(\'helvetica\', \'\', 11);
$meses = array("","Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre");
$lenguage = \'es_ES.UTF-8\';
putenv("LANG=$lenguage");
setlocale(LC_ALL, $lenguage);
//$date =date("d/m/Y", strtotime($invoice->invoice_date));
//$date = DateTime::createFromFormat("d/m/Y", $date);
//$fecha=strftime("%d de %B de %Y",$date->getTimestamp());
$date = DateTime::createFromFormat("d/m/Y", $invoice->invoice_date);
if($date== null){
$date = DateTime::createFromFormat("Y-m-d", $invoice->invoice_date);
$fecha = strftime("%d de %B de %Y",$date->getTimestamp());
}
else
$fecha = strftime("%d de %B de %Y",$date->getTimestamp());
$fecha= $invoice->state.", ".$fecha;
$senor = $invoice->client_name;
$nit = $invoice->client_nit;
$datosCliente = \'
<table cellpadding="2" border="0">
<tr>
<td width="300"><b> Lugar y fecha :</b>\'.$fecha.\'</td>
<td width="220" align="right"><b>NIT/CI :</b>\'.$nit.\'</td>
</tr>
<tr>
<td colspan="2"><b> Señor(es):</b> \'.$senor .\'</td>
</tr>
</table>
\';
//$datosCliente="asdf";
$pdf->writeHTMLCell($w=0, $h=0, $x=\'\', $y=\'58\', $datosCliente, $border=0, $ln=1, $fill=0, $reseth=true, $align=\'left\', $autopadding=true);
//dibuja rectangulo datos del cliente
$pdf->SetLineStyle(array(\'width\' => 0.3, \'cap\' => \'butt\', \'join\' => \'miter\', \'dash\' => 0, \'color\' => array(0, 0, 0)));
$pdf->RoundedRect(16, 58, 184, 14, 1, \'1111\', null);
示例6: buildFacets
/**
* This is super-slow. I'm assuming if you're using facets you
* probably also ought to be using Solr or something else. Or
* maybe you have unlimited time and can refactor this feature
* and submit a pull request...
*
* TODO: If this is going to be used for categories we're going
* to have to really clean it up and speed it up.
* Suggestion:
* - option to turn off counts
* - switch order of nested array so we don't go through results unless needed
* - if not doing counts, min/max and link facets can be handled w/ queries
* - separate that bit out into a new function
* NOTE: This is partially done with the "faster_faceting" config
* option but more could be done, particularly by covering link facets as well.
*
* Output - list of ArrayData in the format:
* Label - name of the facet
* Source - field name of the facet
* Type - one of the ShopSearch::FACET_TYPE_XXXX constants
* Values - SS_List of possible values for this facet
*
* @param SS_List $matches
* @param array $facetSpec
* @param bool $autoFacetAttributes [optional]
* @return ArrayList
*/
public function buildFacets(SS_List $matches, array $facetSpec, $autoFacetAttributes = false)
{
$facets = $this->expandFacetSpec($facetSpec);
if (!$autoFacetAttributes && (empty($facets) || !$matches || !$matches->count())) {
return new ArrayList();
}
$fasterMethod = (bool) $this->config()->faster_faceting;
// fill them in
foreach ($facets as $field => &$facet) {
if (preg_match(self::config()->attribute_facet_regex, $field, $m)) {
$this->buildAttributeFacet($matches, $facet, $m[1]);
continue;
}
// NOTE: using this method range and checkbox facets don't get counts
if ($fasterMethod && $facet['Type'] != ShopSearch::FACET_TYPE_LINK) {
if ($facet['Type'] == ShopSearch::FACET_TYPE_RANGE) {
if (isset($facet['RangeMin'])) {
$facet['MinValue'] = $facet['RangeMin'];
}
if (isset($facet['RangeMax'])) {
$facet['MaxValue'] = $facet['RangeMax'];
}
}
continue;
}
foreach ($matches as $rec) {
// If it's a range facet, set up the min/max
if ($facet['Type'] == ShopSearch::FACET_TYPE_RANGE) {
if (isset($facet['RangeMin'])) {
$facet['MinValue'] = $facet['RangeMin'];
}
if (isset($facet['RangeMax'])) {
$facet['MaxValue'] = $facet['RangeMax'];
}
}
// If the field is accessible via normal methods, including
// a user-defined getter, prefer that
$fieldValue = $rec->relObject($field);
if (is_null($fieldValue) && $rec->hasMethod($meth = "get{$field}")) {
$fieldValue = $rec->{$meth}();
}
// If not, look for a VFI field
if (!$fieldValue && $rec->hasExtension('VirtualFieldIndex')) {
$fieldValue = $rec->getVFI($field);
}
// If we found something, process it
if (!empty($fieldValue)) {
// normalize so that it's iterable
if (!is_array($fieldValue) && !$fieldValue instanceof SS_List) {
$fieldValue = array($fieldValue);
}
foreach ($fieldValue as $obj) {
if (empty($obj)) {
continue;
}
// figure out the right label
if (is_object($obj) && $obj->hasMethod('Nice')) {
$lbl = $obj->Nice();
} elseif (is_object($obj) && !empty($obj->Title)) {
$lbl = $obj->Title;
} elseif (is_numeric($obj) && !empty($facet['LabelFormat']) && $facet['LabelFormat'] === 'Currency' && $facet['Type'] !== ShopSearch::FACET_TYPE_RANGE) {
$tmp = Currency::create($field);
$tmp->setValue($obj);
$lbl = $tmp->Nice();
} else {
$lbl = (string) $obj;
}
// figure out the value for sorting
if (is_object($obj) && $obj->hasMethod('getAmount')) {
$val = $obj->getAmount();
} elseif (is_object($obj) && !empty($obj->ID)) {
$val = $obj->ID;
} else {
//.........这里部分代码省略.........
示例7: run
public function run()
{
// TEST DATA
/*
$contact = new Contact;
$contact->first_name = 'Hillel';
$contact->last_name = 'Hillel';
$contact->email = 'hillelcoren@gmail.com';
$contact->last_name = '2125551234';
$client->contacts()->save($contact);
$invoice = new Invoice;
$invoice->invoice_number = '0001';
$client->invoices()->save($invoice);
$invoice = new Invoice;
$invoice->invoice_number = '0002';
$client->invoices()->save($invoice);
$invoice = new Invoice;
$invoice->invoice_number = '0003';
$client->invoices()->save($invoice);
$invoice = new Invoice;
$invoice->invoice_number = '0004';
$client->invoices()->save($invoice);
*/
PaymentType::create(array('name' => 'Apply Credit'));
PaymentType::create(array('name' => 'Bank Transfer'));
PaymentType::create(array('name' => 'Cash'));
PaymentType::create(array('name' => 'Debit'));
PaymentType::create(array('name' => 'ACH'));
PaymentType::create(array('name' => 'Visa Card'));
PaymentType::create(array('name' => 'MasterCard'));
PaymentType::create(array('name' => 'American Express'));
PaymentType::create(array('name' => 'Discover Card'));
PaymentType::create(array('name' => 'Diners Card'));
PaymentType::create(array('name' => 'EuroCard'));
PaymentType::create(array('name' => 'Nova'));
PaymentType::create(array('name' => 'Credit Card Other'));
PaymentType::create(array('name' => 'PayPal'));
PaymentType::create(array('name' => 'Google Wallet'));
PaymentType::create(array('name' => 'Check'));
Theme::create(array('name' => 'amelia'));
Theme::create(array('name' => 'cerulean'));
Theme::create(array('name' => 'cosmo'));
Theme::create(array('name' => 'cyborg'));
Theme::create(array('name' => 'flatly'));
Theme::create(array('name' => 'journal'));
Theme::create(array('name' => 'readable'));
Theme::create(array('name' => 'simplex'));
Theme::create(array('name' => 'slate'));
Theme::create(array('name' => 'spacelab'));
Theme::create(array('name' => 'united'));
Theme::create(array('name' => 'yeti'));
InvoiceStatus::create(array('name' => 'Draft'));
InvoiceStatus::create(array('name' => 'Sent'));
InvoiceStatus::create(array('name' => 'Viewed'));
InvoiceStatus::create(array('name' => 'Partial'));
InvoiceStatus::create(array('name' => 'Paid'));
Frequency::create(array('name' => 'Weekly'));
Frequency::create(array('name' => 'Two weeks'));
Frequency::create(array('name' => 'Four weeks'));
Frequency::create(array('name' => 'Monthly'));
Frequency::create(array('name' => 'Three months'));
Frequency::create(array('name' => 'Six months'));
Frequency::create(array('name' => 'Annually'));
Industry::create(array('name' => 'Accounting & Legal'));
Industry::create(array('name' => 'Advertising'));
Industry::create(array('name' => 'Aerospace'));
Industry::create(array('name' => 'Agriculture'));
Industry::create(array('name' => 'Automotive'));
Industry::create(array('name' => 'Banking & Finance'));
Industry::create(array('name' => 'Biotechnology'));
Industry::create(array('name' => 'Broadcasting'));
Industry::create(array('name' => 'Business Services'));
Industry::create(array('name' => 'Commodities & Chemicals'));
Industry::create(array('name' => 'Communications'));
Industry::create(array('name' => 'Computers & Hightech'));
Industry::create(array('name' => 'Defense'));
Industry::create(array('name' => 'Energy'));
Industry::create(array('name' => 'Entertainment'));
Industry::create(array('name' => 'Government'));
Industry::create(array('name' => 'Healthcare & Life Sciences'));
Industry::create(array('name' => 'Insurance'));
Industry::create(array('name' => 'Manufacturing'));
Industry::create(array('name' => 'Marketing'));
Industry::create(array('name' => 'Media'));
Industry::create(array('name' => 'Nonprofit & Higher Ed'));
Industry::create(array('name' => 'Pharmaceuticals'));
Industry::create(array('name' => 'Professional Services & Consulting'));
Industry::create(array('name' => 'Real Estate'));
Industry::create(array('name' => 'Retail & Wholesale'));
Industry::create(array('name' => 'Sports'));
Industry::create(array('name' => 'Transportation'));
Industry::create(array('name' => 'Travel & Luxury'));
Industry::create(array('name' => 'Other'));
Industry::create(array('name' => 'Photography'));
Size::create(array('name' => '1 - 3'));
Size::create(array('name' => '4 - 10'));
//.........这里部分代码省略.........
示例8: run
//.........这里部分代码省略.........
</tr>
<tr>
<td width="250" align="left">\'.$ciudad.\'</td>
</tr>
</table> \';
}
$pdf->writeHTMLCell($w=0, $h=0, $x=\'15\', $y=\'40\', $datoEmpresa, $border=0, $ln=1, $fill=0, $reseth=true, $align=\'left\', $autopadding=true);
//actividad económica
$actividad=$invoice->economic_activity;
$pdf->SetFont(\'helvetica\', \'\', 10);
$actividadEmpresa = \'
<table>
<tr>
<td align="center">\'.$actividad.\'</td>
</tr>
</table>\';
$pdf->writeHTMLCell($w=0, $h=0, $x=\'130\', $y=\'45\', $actividadEmpresa, $border=0, $ln=1, $fill=0, $reseth=true, $align=\'left\', $autopadding=true);
//TABLA datos del cliente
$pdf->SetFont(\'helvetica\', \'\', 11);
$meses = array("","Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre");
$lenguage = \'es_ES.UTF-8\';
putenv("LANG=$lenguage");
setlocale(LC_ALL, $lenguage);
//$date =date("d/m/Y", strtotime($invoice->invoice_date));
//$date = DateTime::createFromFormat("d/m/Y", $date);
//$fecha=strftime("%d de %B de %Y",$date->getTimestamp());
$date = DateTime::createFromFormat("d/m/Y", $invoice->invoice_date);
if($date== null){
$date = DateTime::createFromFormat("Y-m-d", $invoice->invoice_date);
$fecha = strftime("%d de %B de %Y",$date->getTimestamp());
}
else
$fecha = strftime("%d de %B de %Y",$date->getTimestamp());
$fecha= $invoice->state.", ".$fecha;
$senor = $invoice->client_name;
$nit = $invoice->client_nit;
$datosCliente = \'
<table cellpadding="2" border="0">
<tr>
<td width="300"><b> Lugar y fecha :</b>\'.$fecha.\'</td>
<td width="220" align="right"><b>NIT/CI :</b>\'.$nit.\'</td>
</tr>
<tr>
<td colspan="2"><b> Señor(es):</b> \'.$senor .\'</td>
</tr>
</table>
\';
//$datosCliente="asdf";
$pdf->writeHTMLCell($w=0, $h=0, $x=\'\', $y=\'62\', $datosCliente, $border=0, $ln=1, $fill=0, $reseth=true, $align=\'left\', $autopadding=true);
//dibuja rectangulo datos del cliente
$pdf->SetLineStyle(array(\'width\' => 0.3, \'cap\' => \'butt\', \'join\' => \'miter\', \'dash\' => 0, \'color\' => array(0, 0, 0)));
$pdf->RoundedRect(16, 62, 184, 14, 1, \'1111\', null);
示例9: run
public function run()
{
PriceType::create(array('name' => 'CIUDAD'));
PriceType::create(array('name' => 'VIAJERO'));
PriceType::create(array('name' => 'OTRO'));
BusinessType::create(array('cod' => 'A', 'name' => 'AGENCIA'));
BusinessType::create(array('cod' => 'B', 'name' => 'BANCO'));
BusinessType::create(array('cod' => 'C', 'name' => 'COLEGIO'));
BusinessType::create(array('cod' => 'CD', 'name' => 'CAMPO DEPORTIVO'));
BusinessType::create(array('cod' => 'D', 'name' => 'DISCOTECA'));
BusinessType::create(array('cod' => 'EE', 'name' => 'EMPRESA ESTATAL'));
BusinessType::create(array('cod' => 'EP', 'name' => 'EMPRESA PRIVADA'));
BusinessType::create(array('cod' => 'FA', 'name' => 'FARMACIA'));
BusinessType::create(array('cod' => 'I', 'name' => 'INSTITUTO'));
BusinessType::create(array('cod' => 'K', 'name' => 'KIOSCO'));
BusinessType::create(array('cod' => 'L', 'name' => 'LICORERIA'));
BusinessType::create(array('cod' => 'MM', 'name' => 'MICRO MARKET'));
BusinessType::create(array('cod' => 'S', 'name' => 'SNACK'));
BusinessType::create(array('cod' => 'P', 'name' => 'PENSION'));
BusinessType::create(array('cod' => 'SM', 'name' => 'SUPER MERCADO'));
BusinessType::create(array('cod' => 'PV', 'name' => 'PUESTO DE VENTA'));
BusinessType::create(array('cod' => 'HO', 'name' => 'HOSPITAL'));
BusinessType::create(array('cod' => 'H', 'name' => 'HOTEL'));
BusinessType::create(array('cod' => 'CL', 'name' => 'CLINICA'));
BusinessType::create(array('cod' => 'U', 'name' => 'UNIVERSIDAD'));
BusinessType::create(array('cod' => 'T', 'name' => 'TERMINAL'));
BusinessType::create(array('cod' => 'F', 'name' => 'FRIAL'));
BusinessType::create(array('cod' => 'R', 'name' => 'RESTAURANT'));
BusinessType::create(array('cod' => 'DP', 'name' => 'DOMICILIO PARTICULAR'));
BusinessType::create(array('cod' => 'TI', 'name' => 'TIENDA'));
BusinessType::create(array('cod' => 'IN', 'name' => 'INTERNET'));
BusinessType::create(array('cod' => 'PS', 'name' => 'PELUQUERIA/SALON DE BELLEZA'));
BusinessType::create(array('cod' => 'O', 'name' => 'OTROS'));
InvoiceStatus::create(array('name' => 'Emitido'));
InvoiceStatus::create(array('name' => 'Anulado'));
Frequency::create(array('name' => 'Semanal'));
Frequency::create(array('name' => 'Cada 2 Semanas'));
Frequency::create(array('name' => 'Cada 4 Semanas'));
Frequency::create(array('name' => 'Mensual'));
Frequency::create(array('name' => 'Trimestral'));
Frequency::create(array('name' => 'Semestral'));
Frequency::create(array('name' => 'Anual'));
Currency::create(array('name' => 'Bolivianos', 'code' => 'BS', 'symbol' => 'Bs', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.'));
Currency::create(array('name' => 'Aux', 'code' => ' ', 'symbol' => ' ', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.'));
DatetimeFormat::create(array('format' => 'd/M/Y g:i a', 'label' => '10/Mar/2013'));
DatetimeFormat::create(array('format' => 'd-M-Yk g:i a', 'label' => '10-Mar-2013'));
DatetimeFormat::create(array('format' => 'd/F/Y g:i a', 'label' => '10/March/2013'));
DatetimeFormat::create(array('format' => 'd-F-Y g:i a', 'label' => '10-March-2013'));
DatetimeFormat::create(array('format' => 'M j, Y g:i a', 'label' => 'Mar 10, 2013 6:15 pm'));
DatetimeFormat::create(array('format' => 'F j, Y g:i a', 'label' => 'March 10, 2013 6:15 pm'));
DatetimeFormat::create(array('format' => 'D M jS, Y g:ia', 'label' => 'Mon March 10th, 2013 6:15 pm'));
DateFormat::create(array('format' => 'd/M/Y', 'picker_format' => 'dd/M/yyyy', 'label' => '10/Mar/2013'));
DateFormat::create(array('format' => 'd-M-Y', 'picker_format' => 'dd-M-yyyy', 'label' => '10-Mar-2013'));
DateFormat::create(array('format' => 'd/F/Y', 'picker_format' => 'dd/MM/yyyy', 'label' => '10/March/2013'));
DateFormat::create(array('format' => 'd-F-Y', 'picker_format' => 'dd-MM-yyyy', 'label' => '10-March-2013'));
DateFormat::create(array('format' => 'M j, Y', 'picker_format' => 'M d, yyyy', 'label' => 'Mar 10, 2013'));
DateFormat::create(array('format' => 'F j, Y', 'picker_format' => 'MM d, yyyy', 'label' => 'March 10, 2013'));
DateFormat::create(array('format' => 'D M j, Y', 'picker_format' => 'D MM d, yyyy', 'label' => 'Mon March 10, 2013'));
/*
d, dd: Numeric date, no leading zero and leading zero, respectively. Eg, 5, 05.
D, DD: Abbreviated and full weekday names, respectively. Eg, Mon, Monday.
m, mm: Numeric month, no leading zero and leading zero, respectively. Eg, 7, 07.
M, MM: Abbreviated and full month names, respectively. Eg, Jan, January
yy, yyyy: 2- and 4-digit years, respectively. Eg, 12, 2012.)
*/
$timezones = array('Pacific/Midway' => "(GMT-11:00) Midway Island", 'US/Samoa' => "(GMT-11:00) Samoa", 'US/Hawaii' => "(GMT-10:00) Hawaii", 'US/Alaska' => "(GMT-09:00) Alaska", 'US/Pacific' => "(GMT-08:00) Pacific Time (US & Canada)", 'America/Tijuana' => "(GMT-08:00) Tijuana", 'US/Arizona' => "(GMT-07:00) Arizona", 'US/Mountain' => "(GMT-07:00) Mountain Time (US & Canada)", 'America/Chihuahua' => "(GMT-07:00) Chihuahua", 'America/Mazatlan' => "(GMT-07:00) Mazatlan", 'America/Mexico_City' => "(GMT-06:00) Mexico City", 'America/Monterrey' => "(GMT-06:00) Monterrey", 'Canada/Saskatchewan' => "(GMT-06:00) Saskatchewan", 'US/Central' => "(GMT-06:00) Central Time (US & Canada)", 'US/Eastern' => "(GMT-05:00) Eastern Time (US & Canada)", 'US/East-Indiana' => "(GMT-05:00) Indiana (East)", 'America/Bogota' => "(GMT-05:00) Bogota", 'America/Lima' => "(GMT-05:00) Lima", 'America/Caracas' => "(GMT-04:30) Caracas", 'Canada/Atlantic' => "(GMT-04:00) Atlantic Time (Canada)", 'America/La_Paz' => "(GMT-04:00) La Paz", 'America/Santiago' => "(GMT-04:00) Santiago", 'Canada/Newfoundland' => "(GMT-03:30) Newfoundland", 'America/Buenos_Aires' => "(GMT-03:00) Buenos Aires", 'Greenland' => "(GMT-03:00) Greenland", 'Atlantic/Stanley' => "(GMT-02:00) Stanley", 'Atlantic/Azores' => "(GMT-01:00) Azores", 'Atlantic/Cape_Verde' => "(GMT-01:00) Cape Verde Is.", 'Africa/Casablanca' => "(GMT) Casablanca", 'Europe/Dublin' => "(GMT) Dublin", 'Europe/Lisbon' => "(GMT) Lisbon", 'Europe/London' => "(GMT) London", 'Africa/Monrovia' => "(GMT) Monrovia", 'Europe/Amsterdam' => "(GMT+01:00) Amsterdam", 'Europe/Belgrade' => "(GMT+01:00) Belgrade", 'Europe/Berlin' => "(GMT+01:00) Berlin", 'Europe/Bratislava' => "(GMT+01:00) Bratislava", 'Europe/Brussels' => "(GMT+01:00) Brussels", 'Europe/Budapest' => "(GMT+01:00) Budapest", 'Europe/Copenhagen' => "(GMT+01:00) Copenhagen", 'Europe/Ljubljana' => "(GMT+01:00) Ljubljana", 'Europe/Madrid' => "(GMT+01:00) Madrid", 'Europe/Paris' => "(GMT+01:00) Paris", 'Europe/Prague' => "(GMT+01:00) Prague", 'Europe/Rome' => "(GMT+01:00) Rome", 'Europe/Sarajevo' => "(GMT+01:00) Sarajevo", 'Europe/Skopje' => "(GMT+01:00) Skopje", 'Europe/Stockholm' => "(GMT+01:00) Stockholm", 'Europe/Vienna' => "(GMT+01:00) Vienna", 'Europe/Warsaw' => "(GMT+01:00) Warsaw", 'Europe/Zagreb' => "(GMT+01:00) Zagreb", 'Europe/Athens' => "(GMT+02:00) Athens", 'Europe/Bucharest' => "(GMT+02:00) Bucharest", 'Africa/Cairo' => "(GMT+02:00) Cairo", 'Africa/Harare' => "(GMT+02:00) Harare", 'Europe/Helsinki' => "(GMT+02:00) Helsinki", 'Europe/Istanbul' => "(GMT+02:00) Istanbul", 'Asia/Jerusalem' => "(GMT+02:00) Jerusalem", 'Europe/Kiev' => "(GMT+02:00) Kyiv", 'Europe/Minsk' => "(GMT+02:00) Minsk", 'Europe/Riga' => "(GMT+02:00) Riga", 'Europe/Sofia' => "(GMT+02:00) Sofia", 'Europe/Tallinn' => "(GMT+02:00) Tallinn", 'Europe/Vilnius' => "(GMT+02:00) Vilnius", 'Asia/Baghdad' => "(GMT+03:00) Baghdad", 'Asia/Kuwait' => "(GMT+03:00) Kuwait", 'Africa/Nairobi' => "(GMT+03:00) Nairobi", 'Asia/Riyadh' => "(GMT+03:00) Riyadh", 'Asia/Tehran' => "(GMT+03:30) Tehran", 'Europe/Moscow' => "(GMT+04:00) Moscow", 'Asia/Baku' => "(GMT+04:00) Baku", 'Europe/Volgograd' => "(GMT+04:00) Volgograd", 'Asia/Muscat' => "(GMT+04:00) Muscat", 'Asia/Tbilisi' => "(GMT+04:00) Tbilisi", 'Asia/Yerevan' => "(GMT+04:00) Yerevan", 'Asia/Kabul' => "(GMT+04:30) Kabul", 'Asia/Karachi' => "(GMT+05:00) Karachi", 'Asia/Tashkent' => "(GMT+05:00) Tashkent", 'Asia/Kolkata' => "(GMT+05:30) Kolkata", 'Asia/Kathmandu' => "(GMT+05:45) Kathmandu", 'Asia/Yekaterinburg' => "(GMT+06:00) Ekaterinburg", 'Asia/Almaty' => "(GMT+06:00) Almaty", 'Asia/Dhaka' => "(GMT+06:00) Dhaka", 'Asia/Novosibirsk' => "(GMT+07:00) Novosibirsk", 'Asia/Bangkok' => "(GMT+07:00) Bangkok", 'Asia/Jakarta' => "(GMT+07:00) Jakarta", 'Asia/Krasnoyarsk' => "(GMT+08:00) Krasnoyarsk", 'Asia/Chongqing' => "(GMT+08:00) Chongqing", 'Asia/Hong_Kong' => "(GMT+08:00) Hong Kong", 'Asia/Kuala_Lumpur' => "(GMT+08:00) Kuala Lumpur", 'Australia/Perth' => "(GMT+08:00) Perth", 'Asia/Singapore' => "(GMT+08:00) Singapore", 'Asia/Taipei' => "(GMT+08:00) Taipei", 'Asia/Ulaanbaatar' => "(GMT+08:00) Ulaan Bataar", 'Asia/Urumqi' => "(GMT+08:00) Urumqi", 'Asia/Irkutsk' => "(GMT+09:00) Irkutsk", 'Asia/Seoul' => "(GMT+09:00) Seoul", 'Asia/Tokyo' => "(GMT+09:00) Tokyo", 'Australia/Adelaide' => "(GMT+09:30) Adelaide", 'Australia/Darwin' => "(GMT+09:30) Darwin", 'Asia/Yakutsk' => "(GMT+10:00) Yakutsk", 'Australia/Brisbane' => "(GMT+10:00) Brisbane", 'Australia/Canberra' => "(GMT+10:00) Canberra", 'Pacific/Guam' => "(GMT+10:00) Guam", 'Australia/Hobart' => "(GMT+10:00) Hobart", 'Australia/Melbourne' => "(GMT+10:00) Melbourne", 'Pacific/Port_Moresby' => "(GMT+10:00) Port Moresby", 'Australia/Sydney' => "(GMT+10:00) Sydney", 'Asia/Vladivostok' => "(GMT+11:00) Vladivostok", 'Asia/Magadan' => "(GMT+12:00) Magadan", 'Pacific/Auckland' => "(GMT+12:00) Auckland", 'Pacific/Fiji' => "(GMT+12:00) Fiji");
foreach ($timezones as $name => $location) {
Timezone::create(array('name' => $name, 'location' => $location));
}
}