repository_name
stringlengths 5
67
| func_path_in_repository
stringlengths 4
234
| func_name
stringlengths 0
314
| whole_func_string
stringlengths 52
3.87M
| language
stringclasses 6
values | func_code_string
stringlengths 52
3.87M
| func_code_tokens
sequencelengths 15
672k
| func_documentation_string
stringlengths 1
47.2k
| func_documentation_tokens
sequencelengths 1
3.92k
| split_name
stringclasses 1
value | func_code_url
stringlengths 85
339
|
---|---|---|---|---|---|---|---|---|---|---|
jnaxo/country-codes | database/seeds/WorldCountriesSeeder.php | WorldCountriesSeeder.run | public function run()
{
DB::table('ctrystore_countries')->delete();
$today = date('Y-m-d H:i:s');
DB::table('ctrystore_countries')->insert([
'id'=>20,
'zone_id'=>1,
'name'=>"Andorra",
'alpha2'=>"AD",
'alpha3'=>"AND",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>784,
'zone_id'=>2,
'name'=>"United Arab Emirates",
'alpha2'=>"AE",
'alpha3'=>"ARE",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>4,
'zone_id'=>2,
'name'=>"Afghanistan",
'alpha2'=>"AF",
'alpha3'=>"AFG",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>28,
'zone_id'=>3,
'name'=>"Antigua and Barbuda",
'alpha2'=>"AG",
'alpha3'=>"ATG",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>660,
'zone_id'=>3,
'name'=>"Anguilla",
'alpha2'=>"AI",
'alpha3'=>"AIA",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>8,
'zone_id'=>1,
'name'=>"Albania",
'alpha2'=>"AL",
'alpha3'=>"ALB",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>51,
'zone_id'=>2,
'name'=>"Armenia",
'alpha2'=>"AM",
'alpha3'=>"ARM",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>530,
'zone_id'=>3,
'name'=>"Nederlandse Antillen",
'alpha2'=>"AN",
'alpha3'=>"ANT",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>24,
'zone_id'=>4,
'name'=>"Angola",
'alpha2'=>"AO",
'alpha3'=>"AGO",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>10,
'zone_id'=>5,
'name'=>"Antarctica",
'alpha2'=>"AQ",
'alpha3'=>"ATA",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>32,
'zone_id'=>6,
'name'=>"Argentina",
'alpha2'=>"AR",
'alpha3'=>"ARG",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>16,
'zone_id'=>7,
'name'=>"American Samoa",
'alpha2'=>"AS",
'alpha3'=>"ASM",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>40,
'zone_id'=>1,
'name'=>"Austria",
'alpha2'=>"AT",
'alpha3'=>"AUT",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>36,
'zone_id'=>7,
'name'=>"Australia",
'alpha2'=>"AU",
'alpha3'=>"AUS",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>533,
'zone_id'=>3,
'name'=>"Aruba",
'alpha2'=>"AW",
'alpha3'=>"ABW",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>248,
'zone_id'=>1,
'name'=>"Åland Islands",
'alpha2'=>"AX",
'alpha3'=>"ALA",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>31,
'zone_id'=>2,
'name'=>"Azerbaijan",
'alpha2'=>"AZ",
'alpha3'=>"AZE",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>70,
'zone_id'=>1,
'name'=>"Bosnia and Herzegovina",
'alpha2'=>"BA",
'alpha3'=>"BIH",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>52,
'zone_id'=>3,
'name'=>"Barbados",
'alpha2'=>"BB",
'alpha3'=>"BRB",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>50,
'zone_id'=>8,
'name'=>"Bangladesh",
'alpha2'=>"BD",
'alpha3'=>"BGD",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>56,
'zone_id'=>1,
'name'=>"Belgium",
'alpha2'=>"BE",
'alpha3'=>"BEL",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>854,
'zone_id'=>4,
'name'=>"Burkina Faso",
'alpha2'=>"BF",
'alpha3'=>"BFA",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>100,
'zone_id'=>1,
'name'=>"Bulgaria",
'alpha2'=>"BG",
'alpha3'=>"BGR",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>48,
'zone_id'=>2,
'name'=>"Bahrain",
'alpha2'=>"BH",
'alpha3'=>"BHR",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>108,
'zone_id'=>4,
'name'=>"Burundi",
'alpha2'=>"BI",
'alpha3'=>"BDI",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>204,
'zone_id'=>4,
'name'=>"Benin",
'alpha2'=>"BJ",
'alpha3'=>"BEN",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>652,
'zone_id'=>3,
'name'=>"Saint Barthélemy",
'alpha2'=>"BL",
'alpha3'=>"BLM",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>60,
'zone_id'=>3,
'name'=>"Bermudas",
'alpha2'=>"BM",
'alpha3'=>"BMU",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>96,
'zone_id'=>9,
'name'=>"Brunei Darussalam",
'alpha2'=>"BN",
'alpha3'=>"BRN",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>68,
'zone_id'=>6,
'name'=>"Bolivia",
'alpha2'=>"BO",
'alpha3'=>"BOL",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>535,
'zone_id'=>3,
'name'=>"Bonaire,
Sint Eustatius and Saba",
'alpha2'=>"BQ",
'alpha3'=>"BES",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>76,
'zone_id'=>6,
'name'=>"Brazil",
'alpha2'=>"BR",
'alpha3'=>"BRA",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>44,
'zone_id'=>3,
'name'=>"Bahamas",
'alpha2'=>"BS",
'alpha3'=>"BHS",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>64,
'zone_id'=>8,
'name'=>"Bhutan",
'alpha2'=>"BT",
'alpha3'=>"BTN",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>74,
'zone_id'=>10,
'name'=>"Bouvet Island",
'alpha2'=>"BV",
'alpha3'=>"BVT",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>72,
'zone_id'=>4,
'name'=>"Botswana",
'alpha2'=>"BW",
'alpha3'=>"BWA",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>112,
'zone_id'=>1,
'name'=>"Belarus",
'alpha2'=>"BY",
'alpha3'=>"BLR",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>84,
'zone_id'=>3,
'name'=>"Belize",
'alpha2'=>"BZ",
'alpha3'=>"BLZ",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>124,
'zone_id'=>11,
'name'=>"Canada",
'alpha2'=>"CA",
'alpha3'=>"CAN",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>166,
'zone_id'=>8,
'name'=>"Cocos Islands",
'alpha2'=>"CC",
'alpha3'=>"CCK",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>180,
'zone_id'=>4,
'name'=>"The Democratic Republic of the Congo",
'alpha2'=>"CD",
'alpha3'=>"COD",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>140,
'zone_id'=>4,
'name'=>"Central African Republic",
'alpha2'=>"CF",
'alpha3'=>"CAF",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>178,
'zone_id'=>4,
'name'=>"Congo",
'alpha2'=>"CG",
'alpha3'=>"COG",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>756,
'zone_id'=>1,
'name'=>"Switzerland",
'alpha2'=>"CH",
'alpha3'=>"CHE",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>384,
'zone_id'=>4,
'name'=>"Côte d'Ivoire",
'alpha2'=>"CI",
'alpha3'=>"CIV",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>184,
'zone_id'=>10,
'name'=>"Cook Islands",
'alpha2'=>"CK",
'alpha3'=>"COK",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>152,
'zone_id'=>6,
'name'=>"Chile",
'alpha2'=>"CL",
'alpha3'=>"CHL",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>120,
'zone_id'=>4,
'name'=>"Cameroon",
'alpha2'=>"CM",
'alpha3'=>"CMR",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>156,
'zone_id'=>9,
'name'=>"China",
'alpha2'=>"CN",
'alpha3'=>"CHN",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>170,
'zone_id'=>6,
'name'=>"Colombia",
'alpha2'=>"CO",
'alpha3'=>"COL",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>188,
'zone_id'=>6,
'name'=>"Costa Rica",
'alpha2'=>"CR",
'alpha3'=>"CRI",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>200,
'zone_id'=>1,
'name'=>"Czechoslovakia",
'alpha2'=>"CS",
'alpha3'=>"CSK",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>128,
'zone_id'=>7,
'name'=>"Canton and Enderbury Islands",
'alpha2'=>"CT",
'alpha3'=>"CTE",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>192,
'zone_id'=>6,
'name'=>"Cuba",
'alpha2'=>"CU",
'alpha3'=>"CUB",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>132,
'zone_id'=>10,
'name'=>"Cabo Verde",
'alpha2'=>"CV",
'alpha3'=>"CPV",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>531,
'zone_id'=>3,
'name'=>"Curaçao",
'alpha2'=>"CW",
'alpha3'=>"CXR",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>162,
'zone_id'=>15,
'name'=>"Christmas Island",
'alpha2'=>"CX",
'alpha3'=>"CXR",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>196,
'zone_id'=>2,
'name'=>"Cyprus",
'alpha2'=>"CY",
'alpha3'=>"CYP",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>203,
'zone_id'=>1,
'name'=>"Czech Republic",
'alpha2'=>"CZ",
'alpha3'=>"CZE",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>276,
'zone_id'=>1,
'name'=>"Germany",
'alpha2'=>"DE",
'alpha3'=>"DEU",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>262,
'zone_id'=>4,
'name'=>"Djibouti",
'alpha2'=>"DJ",
'alpha3'=>"DJI",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>208,
'zone_id'=>1,
'name'=>"Denmark",
'alpha2'=>"DK",
'alpha3'=>"DNK",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>212,
'zone_id'=>3,
'name'=>"Dominica",
'alpha2'=>"DM",
'alpha3'=>"DMA",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>214,
'zone_id'=>6,
'name'=>"Dominican Republic",
'alpha2'=>"DO",
'alpha3'=>"DOM",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>12,
'zone_id'=>12,
'name'=>"Algeria",
'alpha2'=>"DZ",
'alpha3'=>"DZA",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>218,
'zone_id'=>6,
'name'=>"Ecuador",
'alpha2'=>"EC",
'alpha3'=>"ECU",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>233,
'zone_id'=>1,
'name'=>"Estonia",
'alpha2'=>"EE",
'alpha3'=>"EST",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>818,
'zone_id'=>2,
'name'=>"Egypt",
'alpha2'=>"EG",
'alpha3'=>"EGY",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>732,
'zone_id'=>16,
'name'=>"Western Sahara",
'alpha2'=>"EH",
'alpha3'=>"ESH",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>232,
'zone_id'=>4,
'name'=>"Eritrea",
'alpha2'=>"ER",
'alpha3'=>"ERI",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>724,
'zone_id'=>1,
'name'=>"Spain",
'alpha2'=>"ES",
'alpha3'=>"ESP",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>231,
'zone_id'=>4,
'name'=>"Ethiopia",
'alpha2'=>"ET",
'alpha3'=>"ETH",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>246,
'zone_id'=>1,
'name'=>"Finland",
'alpha2'=>"FI",
'alpha3'=>"FIN",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>242,
'zone_id'=>7,
'name'=>"Fiji",
'alpha2'=>"FJ",
'alpha3'=>"FJI",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>238,
'zone_id'=>10,
'name'=>"Falkland Islands [Malvinas
]",
'alpha2'=>"FK",
'alpha3'=>"KLK",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>583,
'zone_id'=>7,
'name'=>"Micronesia",
'alpha2'=>"FM",
'alpha3'=>"FSM",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>234,
'zone_id'=>1,
'name'=>"Faroe Island",
'alpha2'=>"FO",
'alpha3'=>"FRO",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>250,
'zone_id'=>1,
'name'=>"France",
'alpha2'=>"FR",
'alpha3'=>"FRA",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>266,
'zone_id'=>4,
'name'=>"Gabon",
'alpha2'=>"GA",
'alpha3'=>"GAB",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>826,
'zone_id'=>1,
'name'=>"United Kingdom of Great Britain and Northern Ireland",
'alpha2'=>"GB",
'alpha3'=>"GBR",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>308,
'zone_id'=>3,
'name'=>"Grenada",
'alpha2'=>"GD",
'alpha3'=>"GRD",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>268,
'zone_id'=>2,
'name'=>"Georgia",
'alpha2'=>"GE",
'alpha3'=>"GEO",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>254,
'zone_id'=>6,
'name'=>"French Guiana",
'alpha2'=>"GF",
'alpha3'=>"GUF",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>831,
'zone_id'=>1,
'name'=>"Guernsey",
'alpha2'=>"GG",
'alpha3'=>"GGY",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>288,
'zone_id'=>4,
'name'=>"Ghana",
'alpha2'=>"GH",
'alpha3'=>"GHA",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>292,
'zone_id'=>1,
'name'=>"Gibraltar",
'alpha2'=>"GI",
'alpha3'=>"GIB",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>304,
'zone_id'=>13,
'name'=>"Greenland",
'alpha2'=>"GL",
'alpha3'=>"GRL",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>270,
'zone_id'=>4,
'name'=>"Gambia",
'alpha2'=>"GM",
'alpha3'=>"GMB",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>324,
'zone_id'=>4,
'name'=>"Guinea",
'alpha2'=>"GN",
'alpha3'=>"GIN",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>312,
'zone_id'=>3,
'name'=>"Guadeloupe",
'alpha2'=>"GP",
'alpha3'=>"GLP",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>226,
'zone_id'=>4,
'name'=>"Equatorial Guinea",
'alpha2'=>"GQ",
'alpha3'=>"GNQ",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>300,
'zone_id'=>1,
'name'=>"Greece",
'alpha2'=>"GR",
'alpha3'=>"GRC",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>239,
'zone_id'=>10,
'name'=>"South Georgia and the South Sandwich Islands",
'alpha2'=>"GS",
'alpha3'=>"SGS",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>320,
'zone_id'=>6,
'name'=>"Guatemala",
'alpha2'=>"GT",
'alpha3'=>"GTM",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>316,
'zone_id'=>7,
'name'=>"Guam",
'alpha2'=>"GU",
'alpha3'=>"GUM",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>624,
'zone_id'=>4,
'name'=>"Guinea-Bissau",
'alpha2'=>"GW",
'alpha3'=>"GNB",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>328,
'zone_id'=>6,
'name'=>"Guyana",
'alpha2'=>"GY",
'alpha3'=>"GUY",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>344,
'zone_id'=>9,
'name'=>"Hong Kong",
'alpha2'=>"HK",
'alpha3'=>"HKG",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>334,
'zone_id'=>10,
'name'=>"Heard Island and McDonald Islands",
'alpha2'=>"HM",
'alpha3'=>"HMD",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>340,
'zone_id'=>6,
'name'=>"Honduras",
'alpha2'=>"HN",
'alpha3'=>"HND",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>191,
'zone_id'=>1,
'name'=>"Croatia",
'alpha2'=>"HR",
'alpha3'=>"HRV",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>332,
'zone_id'=>6,
'name'=>"Haiti",
'alpha2'=>"HT",
'alpha3'=>"HTI",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>348,
'zone_id'=>1,
'name'=>"Hungary",
'alpha2'=>"HU",
'alpha3'=>"HUN",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>360,
'zone_id'=>9,
'name'=>"Indonesia",
'alpha2'=>"ID",
'alpha3'=>"IDN",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>372,
'zone_id'=>1,
'name'=>"Ireland",
'alpha2'=>"IE",
'alpha3'=>"IRL",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>376,
'zone_id'=>2,
'name'=>"Israel",
'alpha2'=>"IL",
'alpha3'=>"ISR",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>833,
'zone_id'=>1,
'name'=>"Isle of Man",
'alpha2'=>"IM",
'alpha3'=>"IMN",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>356,
'zone_id'=>8,
'name'=>"India",
'alpha2'=>"IN",
'alpha3'=>"IND",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>86,
'zone_id'=>7,
'name'=>"British Indian Ocean Territory",
'alpha2'=>"IO",
'alpha3'=>"IOT",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>368,
'zone_id'=>2,
'name'=>"Iraq",
'alpha2'=>"IQ",
'alpha3'=>"IRQ",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>364,
'zone_id'=>4,
'name'=>"Iran",
'alpha2'=>"IR",
'alpha3'=>"IRN",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>352,
'zone_id'=>10,
'name'=>"Iceland",
'alpha2'=>"IS",
'alpha3'=>"ISL",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>380,
'zone_id'=>1,
'name'=>"Italy",
'alpha2'=>"IT",
'alpha3'=>"ITA",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>832,
'zone_id'=>1,
'name'=>"Jersey",
'alpha2'=>"JE",
'alpha3'=>"JEY",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>388,
'zone_id'=>6,
'name'=>"Jamaica",
'alpha2'=>"JM",
'alpha3'=>"JAM",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>400,
'zone_id'=>2,
'name'=>"Jordan",
'alpha2'=>"JO",
'alpha3'=>"JOR",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>392,
'zone_id'=>9,
'name'=>"Japan",
'alpha2'=>"JP",
'alpha3'=>"JPN",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>404,
'zone_id'=>4,
'name'=>"Kenya",
'alpha2'=>"KE",
'alpha3'=>"KEN",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>417,
'zone_id'=>2,
'name'=>"Kyrgyzstan",
'alpha2'=>"KG",
'alpha3'=>"KGZ",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>116,
'zone_id'=>9,
'name'=>"Cambodia",
'alpha2'=>"KH",
'alpha3'=>"KHM",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>296,
'zone_id'=>7,
'name'=>"Kiribati",
'alpha2'=>"KI",
'alpha3'=>"KIR",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>174,
'zone_id'=>4,
'name'=>"Comoros",
'alpha2'=>"KM",
'alpha3'=>"COM",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>659,
'zone_id'=>3,
'name'=>"Saint Kitts and Nevis",
'alpha2'=>"KN",
'alpha3'=>"KNA",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>408,
'zone_id'=>9,
'name'=>"Democratic People's Republic of Korea",
'alpha2'=>"KP",
'alpha3'=>"PRK",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>410,
'zone_id'=>9,
'name'=>"Republic of Korea ",
'alpha2'=>"KR",
'alpha3'=>"KOR",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>414,
'zone_id'=>2,
'name'=>"Kuwait",
'alpha2'=>"KW",
'alpha3'=>"KWT",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>136,
'zone_id'=>3,
'name'=>"Cayman Island",
'alpha2'=>"KY",
'alpha3'=>"CYM",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>398,
'zone_id'=>2,
'name'=>"Kazakhstan",
'alpha2'=>"KZ",
'alpha3'=>"KAZ",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>418,
'zone_id'=>9,
'name'=>"Lao People's Democratic Republic",
'alpha2'=>"LA",
'alpha3'=>"LAO",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>422,
'zone_id'=>2,
'name'=>"Lebanon",
'alpha2'=>"LB",
'alpha3'=>"LBN",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>662,
'zone_id'=>3,
'name'=>"Saint Lucia",
'alpha2'=>"LC",
'alpha3'=>"LCA",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>438,
'zone_id'=>1,
'name'=>"Liechtenstein",
'alpha2'=>"LI",
'alpha3'=>"LIE",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>144,
'zone_id'=>15,
'name'=>"Sri Lanka",
'alpha2'=>"LK",
'alpha3'=>"LKA",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>430,
'zone_id'=>4,
'name'=>"Liberia",
'alpha2'=>"LR",
'alpha3'=>"LBR",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>426,
'zone_id'=>4,
'name'=>"Lesotho",
'alpha2'=>"LS",
'alpha3'=>"LSO",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>440,
'zone_id'=>1,
'name'=>"Lithuania",
'alpha2'=>"LT",
'alpha3'=>"LTU",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>442,
'zone_id'=>1,
'name'=>"Luxembourg",
'alpha2'=>"LU",
'alpha3'=>"LUX",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>428,
'zone_id'=>1,
'name'=>"Latvia",
'alpha2'=>"LV",
'alpha3'=>"LVA",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>434,
'zone_id'=>12,
'name'=>"Libya",
'alpha2'=>"LY",
'alpha3'=>"LBY",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>504,
'zone_id'=>12,
'name'=>"Morocco",
'alpha2'=>"MA",
'alpha3'=>"MAR",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>492,
'zone_id'=>1,
'name'=>"Monaco",
'alpha2'=>"MC",
'alpha3'=>"MCO",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>498,
'zone_id'=>1,
'name'=>"Moldova",
'alpha2'=>"MD",
'alpha3'=>"MDA",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>499,
'zone_id'=>1,
'name'=>"Montenegro",
'alpha2'=>"ME",
'alpha3'=>"MNE",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>450,
'zone_id'=>4,
'name'=>"Madagascar",
'alpha2'=>"MG",
'alpha3'=>"MDG",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>584,
'zone_id'=>7,
'name'=>"Marshall Islands",
'alpha2'=>"MH",
'alpha3'=>"MHL",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>807,
'zone_id'=>1,
'name'=>"Macedonia",
'alpha2'=>"MK",
'alpha3'=>"MKD",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>466,
'zone_id'=>4,
'name'=>"Mali",
'alpha2'=>"ML",
'alpha3'=>"MLI",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>104,
'zone_id'=>9,
'name'=>"Myanmar",
'alpha2'=>"MM",
'alpha3'=>"MMR",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>496,
'zone_id'=>9,
'name'=>"Mongolia",
'alpha2'=>"MN",
'alpha3'=>"MNG",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>446,
'zone_id'=>9,
'name'=>"Macao",
'alpha2'=>"MO",
'alpha3'=>"MAC",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>474,
'zone_id'=>3,
'name'=>"Martinique",
'alpha2'=>"MQ",
'alpha3'=>"MTQ",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>478,
'zone_id'=>12,
'name'=>"Mauritania",
'alpha2'=>"MR",
'alpha3'=>"MRT",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>500,
'zone_id'=>3,
'name'=>"Montserrat",
'alpha2'=>"MS",
'alpha3'=>"MSR",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>470,
'zone_id'=>1,
'name'=>"Malta",
'alpha2'=>"MT",
'alpha3'=>"MLT",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>480,
'zone_id'=>4,
'name'=>"Mauritius",
'alpha2'=>"MU",
'alpha3'=>"MUS",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>462,
'zone_id'=>15,
'name'=>"Maldives",
'alpha2'=>"MV",
'alpha3'=>"MDV",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>454,
'zone_id'=>4,
'name'=>"Malawi",
'alpha2'=>"MW",
'alpha3'=>"MWI",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>484,
'zone_id'=>6,
'name'=>"Mexico",
'alpha2'=>"MX",
'alpha3'=>"MEX",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>458,
'zone_id'=>9,
'name'=>"Malaysia",
'alpha2'=>"MY",
'alpha3'=>"MYS",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>508,
'zone_id'=>4,
'name'=>"Mozambique",
'alpha2'=>"MZ",
'alpha3'=>"MOZ",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>516,
'zone_id'=>4,
'name'=>"Namibia",
'alpha2'=>"NA",
'alpha3'=>"NAM",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>540,
'zone_id'=>7,
'name'=>"New Caledonia",
'alpha2'=>"NC",
'alpha3'=>"NCL",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>562,
'zone_id'=>4,
'name'=>"Niger",
'alpha2'=>"NE",
'alpha3'=>"NER",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>574,
'zone_id'=>7,
'name'=>"Norfolk Island",
'alpha2'=>"NF",
'alpha3'=>"NFK",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>566,
'zone_id'=>4,
'name'=>"Nigeria",
'alpha2'=>"NG",
'alpha3'=>"NGA",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>558,
'zone_id'=>6,
'name'=>"Nicaragua",
'alpha2'=>"NI",
'alpha3'=>"NIC",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>528,
'zone_id'=>1,
'name'=>"Netherlands",
'alpha2'=>"NL",
'alpha3'=>"NLD",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>578,
'zone_id'=>7,
'name'=>"Norway",
'alpha2'=>"NO",
'alpha3'=>"NOR",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>524,
'zone_id'=>8,
'name'=>"Nepal",
'alpha2'=>"NP",
'alpha3'=>"NPL",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>520,
'zone_id'=>7,
'name'=>"Nauru",
'alpha2'=>"NR",
'alpha3'=>"NRU",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>570,
'zone_id'=>7,
'name'=>"Niue",
'alpha2'=>"NU",
'alpha3'=>"NIU",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>554,
'zone_id'=>7,
'name'=>"New Zealand",
'alpha2'=>"NZ",
'alpha3'=>"NZL",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>512,
'zone_id'=>2,
'name'=>"Oman",
'alpha2'=>"OM",
'alpha3'=>"OMN",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>591,
'zone_id'=>6,
'name'=>"Panama",
'alpha2'=>"PA",
'alpha3'=>"PAN",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>604,
'zone_id'=>6,
'name'=>"Peru",
'alpha2'=>"PE",
'alpha3'=>"PER",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>258,
'zone_id'=>10,
'name'=>"French Polynesia",
'alpha2'=>"PF",
'alpha3'=>"PYF",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>598,
'zone_id'=>9,
'name'=>"Papua New Guinea",
'alpha2'=>"PG",
'alpha3'=>"PNG",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>608,
'zone_id'=>9,
'name'=>"Philippines",
'alpha2'=>"PH",
'alpha3'=>"PHL",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>586,
'zone_id'=>2,
'name'=>"Pakistan",
'alpha2'=>"PK",
'alpha3'=>"PAK",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>616,
'zone_id'=>1,
'name'=>"Poland",
'alpha2'=>"PL",
'alpha3'=>"POL",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>666,
'zone_id'=>1,
'name'=>"Saint Pierre and Miquelon",
'alpha2'=>"PM",
'alpha3'=>"SPM",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>612,
'zone_id'=>10,
'name'=>"Pitcairn",
'alpha2'=>"PN",
'alpha3'=>"PCN",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>630,
'zone_id'=>6,
'name'=>"Puerto Rico",
'alpha2'=>"PR",
'alpha3'=>"PRI",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>275,
'zone_id'=>2,
'name'=>"Palestine",
'alpha2'=>"PS",
'alpha3'=>"PSE",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>620,
'zone_id'=>1,
'name'=>"Portugal",
'alpha2'=>"PT",
'alpha3'=>"PRT",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>585,
'zone_id'=>1,
'name'=>"Palau",
'alpha2'=>"PW",
'alpha3'=>"PLW",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>600,
'zone_id'=>6,
'name'=>"Paraguay",
'alpha2'=>"PY",
'alpha3'=>"PRY",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>634,
'zone_id'=>2,
'name'=>"Qatar",
'alpha2'=>"QA",
'alpha3'=>"QAT",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>638,
'zone_id'=>14,
'name'=>"Reunión",
'alpha2'=>"RE",
'alpha3'=>"REU",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>642,
'zone_id'=>1,
'name'=>"Romania",
'alpha2'=>"RO",
'alpha3'=>"ROU",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>688,
'zone_id'=>1,
'name'=>"Serbia",
'alpha2'=>"RS",
'alpha3'=>"SRB",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>643,
'zone_id'=>9,
'name'=>"Russia",
'alpha2'=>"RU",
'alpha3'=>"RUS",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>646,
'zone_id'=>4,
'name'=>"Rwanda",
'alpha2'=>"RW",
'alpha3'=>"RWA",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>682,
'zone_id'=>2,
'name'=>"Saudi Arabia",
'alpha2'=>"SA",
'alpha3'=>"SAU",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>90,
'zone_id'=>7,
'name'=>"Solomon Islands",
'alpha2'=>"SB",
'alpha3'=>"SLB",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>690,
'zone_id'=>4,
'name'=>"Seychelles",
'alpha2'=>"SC",
'alpha3'=>"SYC",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>736,
'zone_id'=>4,
'name'=>"Sudan",
'alpha2'=>"SD",
'alpha3'=>"SDN",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>752,
'zone_id'=>1,
'name'=>"Sweden",
'alpha2'=>"SE",
'alpha3'=>"SWE",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>702,
'zone_id'=>9,
'name'=>"Singapore",
'alpha2'=>"SG",
'alpha3'=>"SGP",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>654,
'zone_id'=>10,
'name'=>"Saint Helena",
'alpha2'=>"SH",
'alpha3'=>"SHN",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>705,
'zone_id'=>1,
'name'=>"Slovenia",
'alpha2'=>"SI",
'alpha3'=>"SVN",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>744,
'zone_id'=>1,
'name'=>"Svalbard Island and Jan Mayen",
'alpha2'=>"SJ",
'alpha3'=>"SJM",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>703,
'zone_id'=>1,
'name'=>"Slovakia",
'alpha2'=>"SK",
'alpha3'=>"SVK",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>694,
'zone_id'=>4,
'name'=>"Sierra Leone",
'alpha2'=>"SL",
'alpha3'=>"SLE",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>674,
'zone_id'=>1,
'name'=>"San Marino",
'alpha2'=>"SM",
'alpha3'=>"SMR",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>686,
'zone_id'=>4,
'name'=>"Senegal",
'alpha2'=>"SN",
'alpha3'=>"SEN",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>706,
'zone_id'=>4,
'name'=>"Somalia",
'alpha2'=>"SO",
'alpha3'=>"SOM",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>740,
'zone_id'=>6,
'name'=>"Suriname",
'alpha2'=>"SM",
'alpha3'=>"SUR",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>678,
'zone_id'=>4,
'name'=>"Sao Tome and Principe",
'alpha2'=>"ST",
'alpha3'=>"STP",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>222,
'zone_id'=>6,
'name'=>"El Salvador",
'alpha2'=>"SV",
'alpha3'=>"SLV",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>760,
'zone_id'=>2,
'name'=>"Syria",
'alpha2'=>"SY",
'alpha3'=>"SYR",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>748,
'zone_id'=>4,
'name'=>"Swaziland",
'alpha2'=>"SZ",
'alpha3'=>"SWZ",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>796,
'zone_id'=>1,
'name'=>"Turks and Caicos Islands",
'alpha2'=>"TC",
'alpha3'=>"TCA",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>148,
'zone_id'=>4,
'name'=>"Chad",
'alpha2'=>"TD",
'alpha3'=>"TCD",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>260,
'zone_id'=>1,
'name'=>"French Southern Territories",
'alpha2'=>"TF",
'alpha3'=>"ATF",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>768,
'zone_id'=>4,
'name'=>"Togo",
'alpha2'=>"TG",
'alpha3'=>"TGO",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>764,
'zone_id'=>9,
'name'=>"Thailand",
'alpha2'=>"TH",
'alpha3'=>"THA",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>762,
'zone_id'=>2,
'name'=>"Tajikistan",
'alpha2'=>"TJ",
'alpha3'=>"TJK",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>772,
'zone_id'=>7,
'name'=>"Tokelau",
'alpha2'=>"TK",
'alpha3'=>"TKL",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>626,
'zone_id'=>9,
'name'=>"Timor-Leste",
'alpha2'=>"TL",
'alpha3'=>"TLS",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>795,
'zone_id'=>2,
'name'=>"Turkmenistan",
'alpha2'=>"TM",
'alpha3'=>"TKM",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>788,
'zone_id'=>12,
'name'=>"Tunisia",
'alpha2'=>"TN",
'alpha3'=>"TUN",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>776,
'zone_id'=>7,
'name'=>"Tonga",
'alpha2'=>"TO",
'alpha3'=>"TON",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>792,
'zone_id'=>2,
'name'=>"Turkey",
'alpha2'=>"TR",
'alpha3'=>"TUR",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>780,
'zone_id'=>3,
'name'=>"Trinidad and Tobago",
'alpha2'=>"TT",
'alpha3'=>"TTO",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>798,
'zone_id'=>7,
'name'=>"Tuvalu",
'alpha2'=>"TV",
'alpha3'=>"TUV",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>158,
'zone_id'=>9,
'name'=>"Taiwan",
'alpha2'=>"TW",
'alpha3'=>"TWN",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>834,
'zone_id'=>4,
'name'=>"Tanzania",
'alpha2'=>"TZ",
'alpha3'=>"TZA",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>804,
'zone_id'=>1,
'name'=>"Ukraine",
'alpha2'=>"UA",
'alpha3'=>"UKR",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>800,
'zone_id'=>4,
'name'=>"Uganda",
'alpha2'=>"UG",
'alpha3'=>"UGA",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>840,
'zone_id'=>11,
'name'=>"United States of America",
'alpha2'=>"US",
'alpha3'=>"USA",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>858,
'zone_id'=>6,
'name'=>"Uruguay",
'alpha2'=>"UY",
'alpha3'=>"URY",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>860,
'zone_id'=>2,
'name'=>"Uzbekistan",
'alpha2'=>"UZ",
'alpha3'=>"UZB",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>336,
'zone_id'=>1,
'name'=>"Holy See",
'alpha2'=>"VA",
'alpha3'=>"VAT",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>670,
'zone_id'=>3,
'name'=>"Saint Vicent and the Grenadines",
'alpha2'=>"VC",
'alpha3'=>"VCT",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>862,
'zone_id'=>6,
'name'=>"Venezuela",
'alpha2'=>"VE",
'alpha3'=>"VEN",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>92,
'zone_id'=>4,
'name'=>"Virgin Islands (British)",
'alpha2'=>"VG",
'alpha3'=>"VGN",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>850,
'zone_id'=>3,
'name'=>"Virgin Islands (U.S.A)",
'alpha2'=>"VI",
'alpha3'=>"VIR",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>704,
'zone_id'=>9,
'name'=>"Viet Nam",
'alpha2'=>"VN",
'alpha3'=>"VNM",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>548,
'zone_id'=>7,
'name'=>"Vanuatu",
'alpha2'=>"VU",
'alpha3'=>"VUT",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>876,
'zone_id'=>7,
'name'=>"Wallis and Futuna",
'alpha2'=>"WF",
'alpha3'=>"WLF",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>882,
'zone_id'=>7,
'name'=>"Samoa",
'alpha2'=>"WS",
'alpha3'=>"WSM",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>887,
'zone_id'=>2,
'name'=>"Yemen",
'alpha2'=>"YE",
'alpha3'=>"YEM",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>175,
'zone_id'=>14,
'name'=>"Mayotte",
'alpha2'=>"YT",
'alpha3'=>"MYT",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>710,
'zone_id'=>4,
'name'=>"South Africa",
'alpha2'=>"ZA",
'alpha3'=>"ZAF",
'created_at' => $today,
'updated_at' => $today,
]);
} | php | public function run()
{
DB::table('ctrystore_countries')->delete();
$today = date('Y-m-d H:i:s');
DB::table('ctrystore_countries')->insert([
'id'=>20,
'zone_id'=>1,
'name'=>"Andorra",
'alpha2'=>"AD",
'alpha3'=>"AND",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>784,
'zone_id'=>2,
'name'=>"United Arab Emirates",
'alpha2'=>"AE",
'alpha3'=>"ARE",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>4,
'zone_id'=>2,
'name'=>"Afghanistan",
'alpha2'=>"AF",
'alpha3'=>"AFG",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>28,
'zone_id'=>3,
'name'=>"Antigua and Barbuda",
'alpha2'=>"AG",
'alpha3'=>"ATG",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>660,
'zone_id'=>3,
'name'=>"Anguilla",
'alpha2'=>"AI",
'alpha3'=>"AIA",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>8,
'zone_id'=>1,
'name'=>"Albania",
'alpha2'=>"AL",
'alpha3'=>"ALB",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>51,
'zone_id'=>2,
'name'=>"Armenia",
'alpha2'=>"AM",
'alpha3'=>"ARM",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>530,
'zone_id'=>3,
'name'=>"Nederlandse Antillen",
'alpha2'=>"AN",
'alpha3'=>"ANT",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>24,
'zone_id'=>4,
'name'=>"Angola",
'alpha2'=>"AO",
'alpha3'=>"AGO",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>10,
'zone_id'=>5,
'name'=>"Antarctica",
'alpha2'=>"AQ",
'alpha3'=>"ATA",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>32,
'zone_id'=>6,
'name'=>"Argentina",
'alpha2'=>"AR",
'alpha3'=>"ARG",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>16,
'zone_id'=>7,
'name'=>"American Samoa",
'alpha2'=>"AS",
'alpha3'=>"ASM",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>40,
'zone_id'=>1,
'name'=>"Austria",
'alpha2'=>"AT",
'alpha3'=>"AUT",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>36,
'zone_id'=>7,
'name'=>"Australia",
'alpha2'=>"AU",
'alpha3'=>"AUS",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>533,
'zone_id'=>3,
'name'=>"Aruba",
'alpha2'=>"AW",
'alpha3'=>"ABW",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>248,
'zone_id'=>1,
'name'=>"Åland Islands",
'alpha2'=>"AX",
'alpha3'=>"ALA",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>31,
'zone_id'=>2,
'name'=>"Azerbaijan",
'alpha2'=>"AZ",
'alpha3'=>"AZE",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>70,
'zone_id'=>1,
'name'=>"Bosnia and Herzegovina",
'alpha2'=>"BA",
'alpha3'=>"BIH",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>52,
'zone_id'=>3,
'name'=>"Barbados",
'alpha2'=>"BB",
'alpha3'=>"BRB",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>50,
'zone_id'=>8,
'name'=>"Bangladesh",
'alpha2'=>"BD",
'alpha3'=>"BGD",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>56,
'zone_id'=>1,
'name'=>"Belgium",
'alpha2'=>"BE",
'alpha3'=>"BEL",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>854,
'zone_id'=>4,
'name'=>"Burkina Faso",
'alpha2'=>"BF",
'alpha3'=>"BFA",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>100,
'zone_id'=>1,
'name'=>"Bulgaria",
'alpha2'=>"BG",
'alpha3'=>"BGR",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>48,
'zone_id'=>2,
'name'=>"Bahrain",
'alpha2'=>"BH",
'alpha3'=>"BHR",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>108,
'zone_id'=>4,
'name'=>"Burundi",
'alpha2'=>"BI",
'alpha3'=>"BDI",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>204,
'zone_id'=>4,
'name'=>"Benin",
'alpha2'=>"BJ",
'alpha3'=>"BEN",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>652,
'zone_id'=>3,
'name'=>"Saint Barthélemy",
'alpha2'=>"BL",
'alpha3'=>"BLM",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>60,
'zone_id'=>3,
'name'=>"Bermudas",
'alpha2'=>"BM",
'alpha3'=>"BMU",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>96,
'zone_id'=>9,
'name'=>"Brunei Darussalam",
'alpha2'=>"BN",
'alpha3'=>"BRN",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>68,
'zone_id'=>6,
'name'=>"Bolivia",
'alpha2'=>"BO",
'alpha3'=>"BOL",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>535,
'zone_id'=>3,
'name'=>"Bonaire,
Sint Eustatius and Saba",
'alpha2'=>"BQ",
'alpha3'=>"BES",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>76,
'zone_id'=>6,
'name'=>"Brazil",
'alpha2'=>"BR",
'alpha3'=>"BRA",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>44,
'zone_id'=>3,
'name'=>"Bahamas",
'alpha2'=>"BS",
'alpha3'=>"BHS",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>64,
'zone_id'=>8,
'name'=>"Bhutan",
'alpha2'=>"BT",
'alpha3'=>"BTN",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>74,
'zone_id'=>10,
'name'=>"Bouvet Island",
'alpha2'=>"BV",
'alpha3'=>"BVT",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>72,
'zone_id'=>4,
'name'=>"Botswana",
'alpha2'=>"BW",
'alpha3'=>"BWA",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>112,
'zone_id'=>1,
'name'=>"Belarus",
'alpha2'=>"BY",
'alpha3'=>"BLR",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>84,
'zone_id'=>3,
'name'=>"Belize",
'alpha2'=>"BZ",
'alpha3'=>"BLZ",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>124,
'zone_id'=>11,
'name'=>"Canada",
'alpha2'=>"CA",
'alpha3'=>"CAN",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>166,
'zone_id'=>8,
'name'=>"Cocos Islands",
'alpha2'=>"CC",
'alpha3'=>"CCK",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>180,
'zone_id'=>4,
'name'=>"The Democratic Republic of the Congo",
'alpha2'=>"CD",
'alpha3'=>"COD",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>140,
'zone_id'=>4,
'name'=>"Central African Republic",
'alpha2'=>"CF",
'alpha3'=>"CAF",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>178,
'zone_id'=>4,
'name'=>"Congo",
'alpha2'=>"CG",
'alpha3'=>"COG",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>756,
'zone_id'=>1,
'name'=>"Switzerland",
'alpha2'=>"CH",
'alpha3'=>"CHE",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>384,
'zone_id'=>4,
'name'=>"Côte d'Ivoire",
'alpha2'=>"CI",
'alpha3'=>"CIV",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>184,
'zone_id'=>10,
'name'=>"Cook Islands",
'alpha2'=>"CK",
'alpha3'=>"COK",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>152,
'zone_id'=>6,
'name'=>"Chile",
'alpha2'=>"CL",
'alpha3'=>"CHL",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>120,
'zone_id'=>4,
'name'=>"Cameroon",
'alpha2'=>"CM",
'alpha3'=>"CMR",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>156,
'zone_id'=>9,
'name'=>"China",
'alpha2'=>"CN",
'alpha3'=>"CHN",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>170,
'zone_id'=>6,
'name'=>"Colombia",
'alpha2'=>"CO",
'alpha3'=>"COL",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>188,
'zone_id'=>6,
'name'=>"Costa Rica",
'alpha2'=>"CR",
'alpha3'=>"CRI",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>200,
'zone_id'=>1,
'name'=>"Czechoslovakia",
'alpha2'=>"CS",
'alpha3'=>"CSK",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>128,
'zone_id'=>7,
'name'=>"Canton and Enderbury Islands",
'alpha2'=>"CT",
'alpha3'=>"CTE",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>192,
'zone_id'=>6,
'name'=>"Cuba",
'alpha2'=>"CU",
'alpha3'=>"CUB",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>132,
'zone_id'=>10,
'name'=>"Cabo Verde",
'alpha2'=>"CV",
'alpha3'=>"CPV",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>531,
'zone_id'=>3,
'name'=>"Curaçao",
'alpha2'=>"CW",
'alpha3'=>"CXR",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>162,
'zone_id'=>15,
'name'=>"Christmas Island",
'alpha2'=>"CX",
'alpha3'=>"CXR",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>196,
'zone_id'=>2,
'name'=>"Cyprus",
'alpha2'=>"CY",
'alpha3'=>"CYP",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>203,
'zone_id'=>1,
'name'=>"Czech Republic",
'alpha2'=>"CZ",
'alpha3'=>"CZE",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>276,
'zone_id'=>1,
'name'=>"Germany",
'alpha2'=>"DE",
'alpha3'=>"DEU",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>262,
'zone_id'=>4,
'name'=>"Djibouti",
'alpha2'=>"DJ",
'alpha3'=>"DJI",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>208,
'zone_id'=>1,
'name'=>"Denmark",
'alpha2'=>"DK",
'alpha3'=>"DNK",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>212,
'zone_id'=>3,
'name'=>"Dominica",
'alpha2'=>"DM",
'alpha3'=>"DMA",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>214,
'zone_id'=>6,
'name'=>"Dominican Republic",
'alpha2'=>"DO",
'alpha3'=>"DOM",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>12,
'zone_id'=>12,
'name'=>"Algeria",
'alpha2'=>"DZ",
'alpha3'=>"DZA",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>218,
'zone_id'=>6,
'name'=>"Ecuador",
'alpha2'=>"EC",
'alpha3'=>"ECU",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>233,
'zone_id'=>1,
'name'=>"Estonia",
'alpha2'=>"EE",
'alpha3'=>"EST",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>818,
'zone_id'=>2,
'name'=>"Egypt",
'alpha2'=>"EG",
'alpha3'=>"EGY",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>732,
'zone_id'=>16,
'name'=>"Western Sahara",
'alpha2'=>"EH",
'alpha3'=>"ESH",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>232,
'zone_id'=>4,
'name'=>"Eritrea",
'alpha2'=>"ER",
'alpha3'=>"ERI",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>724,
'zone_id'=>1,
'name'=>"Spain",
'alpha2'=>"ES",
'alpha3'=>"ESP",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>231,
'zone_id'=>4,
'name'=>"Ethiopia",
'alpha2'=>"ET",
'alpha3'=>"ETH",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>246,
'zone_id'=>1,
'name'=>"Finland",
'alpha2'=>"FI",
'alpha3'=>"FIN",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>242,
'zone_id'=>7,
'name'=>"Fiji",
'alpha2'=>"FJ",
'alpha3'=>"FJI",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>238,
'zone_id'=>10,
'name'=>"Falkland Islands [Malvinas
]",
'alpha2'=>"FK",
'alpha3'=>"KLK",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>583,
'zone_id'=>7,
'name'=>"Micronesia",
'alpha2'=>"FM",
'alpha3'=>"FSM",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>234,
'zone_id'=>1,
'name'=>"Faroe Island",
'alpha2'=>"FO",
'alpha3'=>"FRO",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>250,
'zone_id'=>1,
'name'=>"France",
'alpha2'=>"FR",
'alpha3'=>"FRA",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>266,
'zone_id'=>4,
'name'=>"Gabon",
'alpha2'=>"GA",
'alpha3'=>"GAB",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>826,
'zone_id'=>1,
'name'=>"United Kingdom of Great Britain and Northern Ireland",
'alpha2'=>"GB",
'alpha3'=>"GBR",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>308,
'zone_id'=>3,
'name'=>"Grenada",
'alpha2'=>"GD",
'alpha3'=>"GRD",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>268,
'zone_id'=>2,
'name'=>"Georgia",
'alpha2'=>"GE",
'alpha3'=>"GEO",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>254,
'zone_id'=>6,
'name'=>"French Guiana",
'alpha2'=>"GF",
'alpha3'=>"GUF",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>831,
'zone_id'=>1,
'name'=>"Guernsey",
'alpha2'=>"GG",
'alpha3'=>"GGY",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>288,
'zone_id'=>4,
'name'=>"Ghana",
'alpha2'=>"GH",
'alpha3'=>"GHA",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>292,
'zone_id'=>1,
'name'=>"Gibraltar",
'alpha2'=>"GI",
'alpha3'=>"GIB",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>304,
'zone_id'=>13,
'name'=>"Greenland",
'alpha2'=>"GL",
'alpha3'=>"GRL",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>270,
'zone_id'=>4,
'name'=>"Gambia",
'alpha2'=>"GM",
'alpha3'=>"GMB",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>324,
'zone_id'=>4,
'name'=>"Guinea",
'alpha2'=>"GN",
'alpha3'=>"GIN",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>312,
'zone_id'=>3,
'name'=>"Guadeloupe",
'alpha2'=>"GP",
'alpha3'=>"GLP",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>226,
'zone_id'=>4,
'name'=>"Equatorial Guinea",
'alpha2'=>"GQ",
'alpha3'=>"GNQ",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>300,
'zone_id'=>1,
'name'=>"Greece",
'alpha2'=>"GR",
'alpha3'=>"GRC",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>239,
'zone_id'=>10,
'name'=>"South Georgia and the South Sandwich Islands",
'alpha2'=>"GS",
'alpha3'=>"SGS",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>320,
'zone_id'=>6,
'name'=>"Guatemala",
'alpha2'=>"GT",
'alpha3'=>"GTM",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>316,
'zone_id'=>7,
'name'=>"Guam",
'alpha2'=>"GU",
'alpha3'=>"GUM",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>624,
'zone_id'=>4,
'name'=>"Guinea-Bissau",
'alpha2'=>"GW",
'alpha3'=>"GNB",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>328,
'zone_id'=>6,
'name'=>"Guyana",
'alpha2'=>"GY",
'alpha3'=>"GUY",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>344,
'zone_id'=>9,
'name'=>"Hong Kong",
'alpha2'=>"HK",
'alpha3'=>"HKG",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>334,
'zone_id'=>10,
'name'=>"Heard Island and McDonald Islands",
'alpha2'=>"HM",
'alpha3'=>"HMD",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>340,
'zone_id'=>6,
'name'=>"Honduras",
'alpha2'=>"HN",
'alpha3'=>"HND",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>191,
'zone_id'=>1,
'name'=>"Croatia",
'alpha2'=>"HR",
'alpha3'=>"HRV",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>332,
'zone_id'=>6,
'name'=>"Haiti",
'alpha2'=>"HT",
'alpha3'=>"HTI",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>348,
'zone_id'=>1,
'name'=>"Hungary",
'alpha2'=>"HU",
'alpha3'=>"HUN",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>360,
'zone_id'=>9,
'name'=>"Indonesia",
'alpha2'=>"ID",
'alpha3'=>"IDN",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>372,
'zone_id'=>1,
'name'=>"Ireland",
'alpha2'=>"IE",
'alpha3'=>"IRL",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>376,
'zone_id'=>2,
'name'=>"Israel",
'alpha2'=>"IL",
'alpha3'=>"ISR",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>833,
'zone_id'=>1,
'name'=>"Isle of Man",
'alpha2'=>"IM",
'alpha3'=>"IMN",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>356,
'zone_id'=>8,
'name'=>"India",
'alpha2'=>"IN",
'alpha3'=>"IND",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>86,
'zone_id'=>7,
'name'=>"British Indian Ocean Territory",
'alpha2'=>"IO",
'alpha3'=>"IOT",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>368,
'zone_id'=>2,
'name'=>"Iraq",
'alpha2'=>"IQ",
'alpha3'=>"IRQ",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>364,
'zone_id'=>4,
'name'=>"Iran",
'alpha2'=>"IR",
'alpha3'=>"IRN",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>352,
'zone_id'=>10,
'name'=>"Iceland",
'alpha2'=>"IS",
'alpha3'=>"ISL",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>380,
'zone_id'=>1,
'name'=>"Italy",
'alpha2'=>"IT",
'alpha3'=>"ITA",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>832,
'zone_id'=>1,
'name'=>"Jersey",
'alpha2'=>"JE",
'alpha3'=>"JEY",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>388,
'zone_id'=>6,
'name'=>"Jamaica",
'alpha2'=>"JM",
'alpha3'=>"JAM",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>400,
'zone_id'=>2,
'name'=>"Jordan",
'alpha2'=>"JO",
'alpha3'=>"JOR",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>392,
'zone_id'=>9,
'name'=>"Japan",
'alpha2'=>"JP",
'alpha3'=>"JPN",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>404,
'zone_id'=>4,
'name'=>"Kenya",
'alpha2'=>"KE",
'alpha3'=>"KEN",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>417,
'zone_id'=>2,
'name'=>"Kyrgyzstan",
'alpha2'=>"KG",
'alpha3'=>"KGZ",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>116,
'zone_id'=>9,
'name'=>"Cambodia",
'alpha2'=>"KH",
'alpha3'=>"KHM",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>296,
'zone_id'=>7,
'name'=>"Kiribati",
'alpha2'=>"KI",
'alpha3'=>"KIR",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>174,
'zone_id'=>4,
'name'=>"Comoros",
'alpha2'=>"KM",
'alpha3'=>"COM",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>659,
'zone_id'=>3,
'name'=>"Saint Kitts and Nevis",
'alpha2'=>"KN",
'alpha3'=>"KNA",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>408,
'zone_id'=>9,
'name'=>"Democratic People's Republic of Korea",
'alpha2'=>"KP",
'alpha3'=>"PRK",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>410,
'zone_id'=>9,
'name'=>"Republic of Korea ",
'alpha2'=>"KR",
'alpha3'=>"KOR",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>414,
'zone_id'=>2,
'name'=>"Kuwait",
'alpha2'=>"KW",
'alpha3'=>"KWT",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>136,
'zone_id'=>3,
'name'=>"Cayman Island",
'alpha2'=>"KY",
'alpha3'=>"CYM",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>398,
'zone_id'=>2,
'name'=>"Kazakhstan",
'alpha2'=>"KZ",
'alpha3'=>"KAZ",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>418,
'zone_id'=>9,
'name'=>"Lao People's Democratic Republic",
'alpha2'=>"LA",
'alpha3'=>"LAO",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>422,
'zone_id'=>2,
'name'=>"Lebanon",
'alpha2'=>"LB",
'alpha3'=>"LBN",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>662,
'zone_id'=>3,
'name'=>"Saint Lucia",
'alpha2'=>"LC",
'alpha3'=>"LCA",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>438,
'zone_id'=>1,
'name'=>"Liechtenstein",
'alpha2'=>"LI",
'alpha3'=>"LIE",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>144,
'zone_id'=>15,
'name'=>"Sri Lanka",
'alpha2'=>"LK",
'alpha3'=>"LKA",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>430,
'zone_id'=>4,
'name'=>"Liberia",
'alpha2'=>"LR",
'alpha3'=>"LBR",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>426,
'zone_id'=>4,
'name'=>"Lesotho",
'alpha2'=>"LS",
'alpha3'=>"LSO",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>440,
'zone_id'=>1,
'name'=>"Lithuania",
'alpha2'=>"LT",
'alpha3'=>"LTU",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>442,
'zone_id'=>1,
'name'=>"Luxembourg",
'alpha2'=>"LU",
'alpha3'=>"LUX",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>428,
'zone_id'=>1,
'name'=>"Latvia",
'alpha2'=>"LV",
'alpha3'=>"LVA",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>434,
'zone_id'=>12,
'name'=>"Libya",
'alpha2'=>"LY",
'alpha3'=>"LBY",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>504,
'zone_id'=>12,
'name'=>"Morocco",
'alpha2'=>"MA",
'alpha3'=>"MAR",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>492,
'zone_id'=>1,
'name'=>"Monaco",
'alpha2'=>"MC",
'alpha3'=>"MCO",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>498,
'zone_id'=>1,
'name'=>"Moldova",
'alpha2'=>"MD",
'alpha3'=>"MDA",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>499,
'zone_id'=>1,
'name'=>"Montenegro",
'alpha2'=>"ME",
'alpha3'=>"MNE",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>450,
'zone_id'=>4,
'name'=>"Madagascar",
'alpha2'=>"MG",
'alpha3'=>"MDG",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>584,
'zone_id'=>7,
'name'=>"Marshall Islands",
'alpha2'=>"MH",
'alpha3'=>"MHL",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>807,
'zone_id'=>1,
'name'=>"Macedonia",
'alpha2'=>"MK",
'alpha3'=>"MKD",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>466,
'zone_id'=>4,
'name'=>"Mali",
'alpha2'=>"ML",
'alpha3'=>"MLI",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>104,
'zone_id'=>9,
'name'=>"Myanmar",
'alpha2'=>"MM",
'alpha3'=>"MMR",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>496,
'zone_id'=>9,
'name'=>"Mongolia",
'alpha2'=>"MN",
'alpha3'=>"MNG",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>446,
'zone_id'=>9,
'name'=>"Macao",
'alpha2'=>"MO",
'alpha3'=>"MAC",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>474,
'zone_id'=>3,
'name'=>"Martinique",
'alpha2'=>"MQ",
'alpha3'=>"MTQ",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>478,
'zone_id'=>12,
'name'=>"Mauritania",
'alpha2'=>"MR",
'alpha3'=>"MRT",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>500,
'zone_id'=>3,
'name'=>"Montserrat",
'alpha2'=>"MS",
'alpha3'=>"MSR",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>470,
'zone_id'=>1,
'name'=>"Malta",
'alpha2'=>"MT",
'alpha3'=>"MLT",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>480,
'zone_id'=>4,
'name'=>"Mauritius",
'alpha2'=>"MU",
'alpha3'=>"MUS",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>462,
'zone_id'=>15,
'name'=>"Maldives",
'alpha2'=>"MV",
'alpha3'=>"MDV",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>454,
'zone_id'=>4,
'name'=>"Malawi",
'alpha2'=>"MW",
'alpha3'=>"MWI",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>484,
'zone_id'=>6,
'name'=>"Mexico",
'alpha2'=>"MX",
'alpha3'=>"MEX",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>458,
'zone_id'=>9,
'name'=>"Malaysia",
'alpha2'=>"MY",
'alpha3'=>"MYS",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>508,
'zone_id'=>4,
'name'=>"Mozambique",
'alpha2'=>"MZ",
'alpha3'=>"MOZ",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>516,
'zone_id'=>4,
'name'=>"Namibia",
'alpha2'=>"NA",
'alpha3'=>"NAM",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>540,
'zone_id'=>7,
'name'=>"New Caledonia",
'alpha2'=>"NC",
'alpha3'=>"NCL",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>562,
'zone_id'=>4,
'name'=>"Niger",
'alpha2'=>"NE",
'alpha3'=>"NER",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>574,
'zone_id'=>7,
'name'=>"Norfolk Island",
'alpha2'=>"NF",
'alpha3'=>"NFK",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>566,
'zone_id'=>4,
'name'=>"Nigeria",
'alpha2'=>"NG",
'alpha3'=>"NGA",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>558,
'zone_id'=>6,
'name'=>"Nicaragua",
'alpha2'=>"NI",
'alpha3'=>"NIC",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>528,
'zone_id'=>1,
'name'=>"Netherlands",
'alpha2'=>"NL",
'alpha3'=>"NLD",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>578,
'zone_id'=>7,
'name'=>"Norway",
'alpha2'=>"NO",
'alpha3'=>"NOR",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>524,
'zone_id'=>8,
'name'=>"Nepal",
'alpha2'=>"NP",
'alpha3'=>"NPL",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>520,
'zone_id'=>7,
'name'=>"Nauru",
'alpha2'=>"NR",
'alpha3'=>"NRU",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>570,
'zone_id'=>7,
'name'=>"Niue",
'alpha2'=>"NU",
'alpha3'=>"NIU",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>554,
'zone_id'=>7,
'name'=>"New Zealand",
'alpha2'=>"NZ",
'alpha3'=>"NZL",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>512,
'zone_id'=>2,
'name'=>"Oman",
'alpha2'=>"OM",
'alpha3'=>"OMN",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>591,
'zone_id'=>6,
'name'=>"Panama",
'alpha2'=>"PA",
'alpha3'=>"PAN",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>604,
'zone_id'=>6,
'name'=>"Peru",
'alpha2'=>"PE",
'alpha3'=>"PER",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>258,
'zone_id'=>10,
'name'=>"French Polynesia",
'alpha2'=>"PF",
'alpha3'=>"PYF",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>598,
'zone_id'=>9,
'name'=>"Papua New Guinea",
'alpha2'=>"PG",
'alpha3'=>"PNG",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>608,
'zone_id'=>9,
'name'=>"Philippines",
'alpha2'=>"PH",
'alpha3'=>"PHL",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>586,
'zone_id'=>2,
'name'=>"Pakistan",
'alpha2'=>"PK",
'alpha3'=>"PAK",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>616,
'zone_id'=>1,
'name'=>"Poland",
'alpha2'=>"PL",
'alpha3'=>"POL",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>666,
'zone_id'=>1,
'name'=>"Saint Pierre and Miquelon",
'alpha2'=>"PM",
'alpha3'=>"SPM",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>612,
'zone_id'=>10,
'name'=>"Pitcairn",
'alpha2'=>"PN",
'alpha3'=>"PCN",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>630,
'zone_id'=>6,
'name'=>"Puerto Rico",
'alpha2'=>"PR",
'alpha3'=>"PRI",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>275,
'zone_id'=>2,
'name'=>"Palestine",
'alpha2'=>"PS",
'alpha3'=>"PSE",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>620,
'zone_id'=>1,
'name'=>"Portugal",
'alpha2'=>"PT",
'alpha3'=>"PRT",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>585,
'zone_id'=>1,
'name'=>"Palau",
'alpha2'=>"PW",
'alpha3'=>"PLW",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>600,
'zone_id'=>6,
'name'=>"Paraguay",
'alpha2'=>"PY",
'alpha3'=>"PRY",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>634,
'zone_id'=>2,
'name'=>"Qatar",
'alpha2'=>"QA",
'alpha3'=>"QAT",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>638,
'zone_id'=>14,
'name'=>"Reunión",
'alpha2'=>"RE",
'alpha3'=>"REU",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>642,
'zone_id'=>1,
'name'=>"Romania",
'alpha2'=>"RO",
'alpha3'=>"ROU",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>688,
'zone_id'=>1,
'name'=>"Serbia",
'alpha2'=>"RS",
'alpha3'=>"SRB",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>643,
'zone_id'=>9,
'name'=>"Russia",
'alpha2'=>"RU",
'alpha3'=>"RUS",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>646,
'zone_id'=>4,
'name'=>"Rwanda",
'alpha2'=>"RW",
'alpha3'=>"RWA",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>682,
'zone_id'=>2,
'name'=>"Saudi Arabia",
'alpha2'=>"SA",
'alpha3'=>"SAU",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>90,
'zone_id'=>7,
'name'=>"Solomon Islands",
'alpha2'=>"SB",
'alpha3'=>"SLB",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>690,
'zone_id'=>4,
'name'=>"Seychelles",
'alpha2'=>"SC",
'alpha3'=>"SYC",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>736,
'zone_id'=>4,
'name'=>"Sudan",
'alpha2'=>"SD",
'alpha3'=>"SDN",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>752,
'zone_id'=>1,
'name'=>"Sweden",
'alpha2'=>"SE",
'alpha3'=>"SWE",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>702,
'zone_id'=>9,
'name'=>"Singapore",
'alpha2'=>"SG",
'alpha3'=>"SGP",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>654,
'zone_id'=>10,
'name'=>"Saint Helena",
'alpha2'=>"SH",
'alpha3'=>"SHN",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>705,
'zone_id'=>1,
'name'=>"Slovenia",
'alpha2'=>"SI",
'alpha3'=>"SVN",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>744,
'zone_id'=>1,
'name'=>"Svalbard Island and Jan Mayen",
'alpha2'=>"SJ",
'alpha3'=>"SJM",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>703,
'zone_id'=>1,
'name'=>"Slovakia",
'alpha2'=>"SK",
'alpha3'=>"SVK",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>694,
'zone_id'=>4,
'name'=>"Sierra Leone",
'alpha2'=>"SL",
'alpha3'=>"SLE",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>674,
'zone_id'=>1,
'name'=>"San Marino",
'alpha2'=>"SM",
'alpha3'=>"SMR",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>686,
'zone_id'=>4,
'name'=>"Senegal",
'alpha2'=>"SN",
'alpha3'=>"SEN",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>706,
'zone_id'=>4,
'name'=>"Somalia",
'alpha2'=>"SO",
'alpha3'=>"SOM",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>740,
'zone_id'=>6,
'name'=>"Suriname",
'alpha2'=>"SM",
'alpha3'=>"SUR",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>678,
'zone_id'=>4,
'name'=>"Sao Tome and Principe",
'alpha2'=>"ST",
'alpha3'=>"STP",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>222,
'zone_id'=>6,
'name'=>"El Salvador",
'alpha2'=>"SV",
'alpha3'=>"SLV",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>760,
'zone_id'=>2,
'name'=>"Syria",
'alpha2'=>"SY",
'alpha3'=>"SYR",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>748,
'zone_id'=>4,
'name'=>"Swaziland",
'alpha2'=>"SZ",
'alpha3'=>"SWZ",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>796,
'zone_id'=>1,
'name'=>"Turks and Caicos Islands",
'alpha2'=>"TC",
'alpha3'=>"TCA",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>148,
'zone_id'=>4,
'name'=>"Chad",
'alpha2'=>"TD",
'alpha3'=>"TCD",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>260,
'zone_id'=>1,
'name'=>"French Southern Territories",
'alpha2'=>"TF",
'alpha3'=>"ATF",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>768,
'zone_id'=>4,
'name'=>"Togo",
'alpha2'=>"TG",
'alpha3'=>"TGO",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>764,
'zone_id'=>9,
'name'=>"Thailand",
'alpha2'=>"TH",
'alpha3'=>"THA",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>762,
'zone_id'=>2,
'name'=>"Tajikistan",
'alpha2'=>"TJ",
'alpha3'=>"TJK",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>772,
'zone_id'=>7,
'name'=>"Tokelau",
'alpha2'=>"TK",
'alpha3'=>"TKL",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>626,
'zone_id'=>9,
'name'=>"Timor-Leste",
'alpha2'=>"TL",
'alpha3'=>"TLS",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>795,
'zone_id'=>2,
'name'=>"Turkmenistan",
'alpha2'=>"TM",
'alpha3'=>"TKM",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>788,
'zone_id'=>12,
'name'=>"Tunisia",
'alpha2'=>"TN",
'alpha3'=>"TUN",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>776,
'zone_id'=>7,
'name'=>"Tonga",
'alpha2'=>"TO",
'alpha3'=>"TON",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>792,
'zone_id'=>2,
'name'=>"Turkey",
'alpha2'=>"TR",
'alpha3'=>"TUR",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>780,
'zone_id'=>3,
'name'=>"Trinidad and Tobago",
'alpha2'=>"TT",
'alpha3'=>"TTO",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>798,
'zone_id'=>7,
'name'=>"Tuvalu",
'alpha2'=>"TV",
'alpha3'=>"TUV",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>158,
'zone_id'=>9,
'name'=>"Taiwan",
'alpha2'=>"TW",
'alpha3'=>"TWN",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>834,
'zone_id'=>4,
'name'=>"Tanzania",
'alpha2'=>"TZ",
'alpha3'=>"TZA",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>804,
'zone_id'=>1,
'name'=>"Ukraine",
'alpha2'=>"UA",
'alpha3'=>"UKR",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>800,
'zone_id'=>4,
'name'=>"Uganda",
'alpha2'=>"UG",
'alpha3'=>"UGA",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>840,
'zone_id'=>11,
'name'=>"United States of America",
'alpha2'=>"US",
'alpha3'=>"USA",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>858,
'zone_id'=>6,
'name'=>"Uruguay",
'alpha2'=>"UY",
'alpha3'=>"URY",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>860,
'zone_id'=>2,
'name'=>"Uzbekistan",
'alpha2'=>"UZ",
'alpha3'=>"UZB",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>336,
'zone_id'=>1,
'name'=>"Holy See",
'alpha2'=>"VA",
'alpha3'=>"VAT",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>670,
'zone_id'=>3,
'name'=>"Saint Vicent and the Grenadines",
'alpha2'=>"VC",
'alpha3'=>"VCT",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>862,
'zone_id'=>6,
'name'=>"Venezuela",
'alpha2'=>"VE",
'alpha3'=>"VEN",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>92,
'zone_id'=>4,
'name'=>"Virgin Islands (British)",
'alpha2'=>"VG",
'alpha3'=>"VGN",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>850,
'zone_id'=>3,
'name'=>"Virgin Islands (U.S.A)",
'alpha2'=>"VI",
'alpha3'=>"VIR",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>704,
'zone_id'=>9,
'name'=>"Viet Nam",
'alpha2'=>"VN",
'alpha3'=>"VNM",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>548,
'zone_id'=>7,
'name'=>"Vanuatu",
'alpha2'=>"VU",
'alpha3'=>"VUT",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>876,
'zone_id'=>7,
'name'=>"Wallis and Futuna",
'alpha2'=>"WF",
'alpha3'=>"WLF",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>882,
'zone_id'=>7,
'name'=>"Samoa",
'alpha2'=>"WS",
'alpha3'=>"WSM",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>887,
'zone_id'=>2,
'name'=>"Yemen",
'alpha2'=>"YE",
'alpha3'=>"YEM",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>175,
'zone_id'=>14,
'name'=>"Mayotte",
'alpha2'=>"YT",
'alpha3'=>"MYT",
'created_at' => $today,
'updated_at' => $today,
]);
DB::table('ctrystore_countries')->insert([
'id'=>710,
'zone_id'=>4,
'name'=>"South Africa",
'alpha2'=>"ZA",
'alpha3'=>"ZAF",
'created_at' => $today,
'updated_at' => $today,
]);
} | [
"public",
"function",
"run",
"(",
")",
"{",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"delete",
"(",
")",
";",
"$",
"today",
"=",
"date",
"(",
"'Y-m-d H:i:s'",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"20",
",",
"'zone_id'",
"=>",
"1",
",",
"'name'",
"=>",
"\"Andorra\"",
",",
"'alpha2'",
"=>",
"\"AD\"",
",",
"'alpha3'",
"=>",
"\"AND\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"784",
",",
"'zone_id'",
"=>",
"2",
",",
"'name'",
"=>",
"\"United Arab Emirates\"",
",",
"'alpha2'",
"=>",
"\"AE\"",
",",
"'alpha3'",
"=>",
"\"ARE\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"4",
",",
"'zone_id'",
"=>",
"2",
",",
"'name'",
"=>",
"\"Afghanistan\"",
",",
"'alpha2'",
"=>",
"\"AF\"",
",",
"'alpha3'",
"=>",
"\"AFG\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"28",
",",
"'zone_id'",
"=>",
"3",
",",
"'name'",
"=>",
"\"Antigua and Barbuda\"",
",",
"'alpha2'",
"=>",
"\"AG\"",
",",
"'alpha3'",
"=>",
"\"ATG\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"660",
",",
"'zone_id'",
"=>",
"3",
",",
"'name'",
"=>",
"\"Anguilla\"",
",",
"'alpha2'",
"=>",
"\"AI\"",
",",
"'alpha3'",
"=>",
"\"AIA\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"8",
",",
"'zone_id'",
"=>",
"1",
",",
"'name'",
"=>",
"\"Albania\"",
",",
"'alpha2'",
"=>",
"\"AL\"",
",",
"'alpha3'",
"=>",
"\"ALB\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"51",
",",
"'zone_id'",
"=>",
"2",
",",
"'name'",
"=>",
"\"Armenia\"",
",",
"'alpha2'",
"=>",
"\"AM\"",
",",
"'alpha3'",
"=>",
"\"ARM\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"530",
",",
"'zone_id'",
"=>",
"3",
",",
"'name'",
"=>",
"\"Nederlandse Antillen\"",
",",
"'alpha2'",
"=>",
"\"AN\"",
",",
"'alpha3'",
"=>",
"\"ANT\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"24",
",",
"'zone_id'",
"=>",
"4",
",",
"'name'",
"=>",
"\"Angola\"",
",",
"'alpha2'",
"=>",
"\"AO\"",
",",
"'alpha3'",
"=>",
"\"AGO\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"10",
",",
"'zone_id'",
"=>",
"5",
",",
"'name'",
"=>",
"\"Antarctica\"",
",",
"'alpha2'",
"=>",
"\"AQ\"",
",",
"'alpha3'",
"=>",
"\"ATA\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"32",
",",
"'zone_id'",
"=>",
"6",
",",
"'name'",
"=>",
"\"Argentina\"",
",",
"'alpha2'",
"=>",
"\"AR\"",
",",
"'alpha3'",
"=>",
"\"ARG\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"16",
",",
"'zone_id'",
"=>",
"7",
",",
"'name'",
"=>",
"\"American Samoa\"",
",",
"'alpha2'",
"=>",
"\"AS\"",
",",
"'alpha3'",
"=>",
"\"ASM\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"40",
",",
"'zone_id'",
"=>",
"1",
",",
"'name'",
"=>",
"\"Austria\"",
",",
"'alpha2'",
"=>",
"\"AT\"",
",",
"'alpha3'",
"=>",
"\"AUT\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"36",
",",
"'zone_id'",
"=>",
"7",
",",
"'name'",
"=>",
"\"Australia\"",
",",
"'alpha2'",
"=>",
"\"AU\"",
",",
"'alpha3'",
"=>",
"\"AUS\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"533",
",",
"'zone_id'",
"=>",
"3",
",",
"'name'",
"=>",
"\"Aruba\"",
",",
"'alpha2'",
"=>",
"\"AW\"",
",",
"'alpha3'",
"=>",
"\"ABW\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"248",
",",
"'zone_id'",
"=>",
"1",
",",
"'name'",
"=>",
"\"Åland Islands\",",
"",
"'alpha2'",
"=>",
"\"AX\"",
",",
"'alpha3'",
"=>",
"\"ALA\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"31",
",",
"'zone_id'",
"=>",
"2",
",",
"'name'",
"=>",
"\"Azerbaijan\"",
",",
"'alpha2'",
"=>",
"\"AZ\"",
",",
"'alpha3'",
"=>",
"\"AZE\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"70",
",",
"'zone_id'",
"=>",
"1",
",",
"'name'",
"=>",
"\"Bosnia and Herzegovina\"",
",",
"'alpha2'",
"=>",
"\"BA\"",
",",
"'alpha3'",
"=>",
"\"BIH\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"52",
",",
"'zone_id'",
"=>",
"3",
",",
"'name'",
"=>",
"\"Barbados\"",
",",
"'alpha2'",
"=>",
"\"BB\"",
",",
"'alpha3'",
"=>",
"\"BRB\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"50",
",",
"'zone_id'",
"=>",
"8",
",",
"'name'",
"=>",
"\"Bangladesh\"",
",",
"'alpha2'",
"=>",
"\"BD\"",
",",
"'alpha3'",
"=>",
"\"BGD\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"56",
",",
"'zone_id'",
"=>",
"1",
",",
"'name'",
"=>",
"\"Belgium\"",
",",
"'alpha2'",
"=>",
"\"BE\"",
",",
"'alpha3'",
"=>",
"\"BEL\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"854",
",",
"'zone_id'",
"=>",
"4",
",",
"'name'",
"=>",
"\"Burkina Faso\"",
",",
"'alpha2'",
"=>",
"\"BF\"",
",",
"'alpha3'",
"=>",
"\"BFA\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"100",
",",
"'zone_id'",
"=>",
"1",
",",
"'name'",
"=>",
"\"Bulgaria\"",
",",
"'alpha2'",
"=>",
"\"BG\"",
",",
"'alpha3'",
"=>",
"\"BGR\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"48",
",",
"'zone_id'",
"=>",
"2",
",",
"'name'",
"=>",
"\"Bahrain\"",
",",
"'alpha2'",
"=>",
"\"BH\"",
",",
"'alpha3'",
"=>",
"\"BHR\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"108",
",",
"'zone_id'",
"=>",
"4",
",",
"'name'",
"=>",
"\"Burundi\"",
",",
"'alpha2'",
"=>",
"\"BI\"",
",",
"'alpha3'",
"=>",
"\"BDI\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"204",
",",
"'zone_id'",
"=>",
"4",
",",
"'name'",
"=>",
"\"Benin\"",
",",
"'alpha2'",
"=>",
"\"BJ\"",
",",
"'alpha3'",
"=>",
"\"BEN\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"652",
",",
"'zone_id'",
"=>",
"3",
",",
"'name'",
"=>",
"\"Saint Barthélemy\"",
",",
"'alpha2'",
"=>",
"\"BL\"",
",",
"'alpha3'",
"=>",
"\"BLM\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"60",
",",
"'zone_id'",
"=>",
"3",
",",
"'name'",
"=>",
"\"Bermudas\"",
",",
"'alpha2'",
"=>",
"\"BM\"",
",",
"'alpha3'",
"=>",
"\"BMU\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"96",
",",
"'zone_id'",
"=>",
"9",
",",
"'name'",
"=>",
"\"Brunei Darussalam\"",
",",
"'alpha2'",
"=>",
"\"BN\"",
",",
"'alpha3'",
"=>",
"\"BRN\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"68",
",",
"'zone_id'",
"=>",
"6",
",",
"'name'",
"=>",
"\"Bolivia\"",
",",
"'alpha2'",
"=>",
"\"BO\"",
",",
"'alpha3'",
"=>",
"\"BOL\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"535",
",",
"'zone_id'",
"=>",
"3",
",",
"'name'",
"=>",
"\"Bonaire,\n Sint Eustatius and Saba\"",
",",
"'alpha2'",
"=>",
"\"BQ\"",
",",
"'alpha3'",
"=>",
"\"BES\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"76",
",",
"'zone_id'",
"=>",
"6",
",",
"'name'",
"=>",
"\"Brazil\"",
",",
"'alpha2'",
"=>",
"\"BR\"",
",",
"'alpha3'",
"=>",
"\"BRA\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"44",
",",
"'zone_id'",
"=>",
"3",
",",
"'name'",
"=>",
"\"Bahamas\"",
",",
"'alpha2'",
"=>",
"\"BS\"",
",",
"'alpha3'",
"=>",
"\"BHS\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"64",
",",
"'zone_id'",
"=>",
"8",
",",
"'name'",
"=>",
"\"Bhutan\"",
",",
"'alpha2'",
"=>",
"\"BT\"",
",",
"'alpha3'",
"=>",
"\"BTN\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"74",
",",
"'zone_id'",
"=>",
"10",
",",
"'name'",
"=>",
"\"Bouvet Island\"",
",",
"'alpha2'",
"=>",
"\"BV\"",
",",
"'alpha3'",
"=>",
"\"BVT\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"72",
",",
"'zone_id'",
"=>",
"4",
",",
"'name'",
"=>",
"\"Botswana\"",
",",
"'alpha2'",
"=>",
"\"BW\"",
",",
"'alpha3'",
"=>",
"\"BWA\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"112",
",",
"'zone_id'",
"=>",
"1",
",",
"'name'",
"=>",
"\"Belarus\"",
",",
"'alpha2'",
"=>",
"\"BY\"",
",",
"'alpha3'",
"=>",
"\"BLR\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"84",
",",
"'zone_id'",
"=>",
"3",
",",
"'name'",
"=>",
"\"Belize\"",
",",
"'alpha2'",
"=>",
"\"BZ\"",
",",
"'alpha3'",
"=>",
"\"BLZ\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"124",
",",
"'zone_id'",
"=>",
"11",
",",
"'name'",
"=>",
"\"Canada\"",
",",
"'alpha2'",
"=>",
"\"CA\"",
",",
"'alpha3'",
"=>",
"\"CAN\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"166",
",",
"'zone_id'",
"=>",
"8",
",",
"'name'",
"=>",
"\"Cocos Islands\"",
",",
"'alpha2'",
"=>",
"\"CC\"",
",",
"'alpha3'",
"=>",
"\"CCK\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"180",
",",
"'zone_id'",
"=>",
"4",
",",
"'name'",
"=>",
"\"The Democratic Republic of the Congo\"",
",",
"'alpha2'",
"=>",
"\"CD\"",
",",
"'alpha3'",
"=>",
"\"COD\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"140",
",",
"'zone_id'",
"=>",
"4",
",",
"'name'",
"=>",
"\"Central African Republic\"",
",",
"'alpha2'",
"=>",
"\"CF\"",
",",
"'alpha3'",
"=>",
"\"CAF\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"178",
",",
"'zone_id'",
"=>",
"4",
",",
"'name'",
"=>",
"\"Congo\"",
",",
"'alpha2'",
"=>",
"\"CG\"",
",",
"'alpha3'",
"=>",
"\"COG\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"756",
",",
"'zone_id'",
"=>",
"1",
",",
"'name'",
"=>",
"\"Switzerland\"",
",",
"'alpha2'",
"=>",
"\"CH\"",
",",
"'alpha3'",
"=>",
"\"CHE\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"384",
",",
"'zone_id'",
"=>",
"4",
",",
"'name'",
"=>",
"\"Côte d'Ivoire\",",
"",
"'alpha2'",
"=>",
"\"CI\"",
",",
"'alpha3'",
"=>",
"\"CIV\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"184",
",",
"'zone_id'",
"=>",
"10",
",",
"'name'",
"=>",
"\"Cook Islands\"",
",",
"'alpha2'",
"=>",
"\"CK\"",
",",
"'alpha3'",
"=>",
"\"COK\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"152",
",",
"'zone_id'",
"=>",
"6",
",",
"'name'",
"=>",
"\"Chile\"",
",",
"'alpha2'",
"=>",
"\"CL\"",
",",
"'alpha3'",
"=>",
"\"CHL\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"120",
",",
"'zone_id'",
"=>",
"4",
",",
"'name'",
"=>",
"\"Cameroon\"",
",",
"'alpha2'",
"=>",
"\"CM\"",
",",
"'alpha3'",
"=>",
"\"CMR\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"156",
",",
"'zone_id'",
"=>",
"9",
",",
"'name'",
"=>",
"\"China\"",
",",
"'alpha2'",
"=>",
"\"CN\"",
",",
"'alpha3'",
"=>",
"\"CHN\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"170",
",",
"'zone_id'",
"=>",
"6",
",",
"'name'",
"=>",
"\"Colombia\"",
",",
"'alpha2'",
"=>",
"\"CO\"",
",",
"'alpha3'",
"=>",
"\"COL\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"188",
",",
"'zone_id'",
"=>",
"6",
",",
"'name'",
"=>",
"\"Costa Rica\"",
",",
"'alpha2'",
"=>",
"\"CR\"",
",",
"'alpha3'",
"=>",
"\"CRI\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"200",
",",
"'zone_id'",
"=>",
"1",
",",
"'name'",
"=>",
"\"Czechoslovakia\"",
",",
"'alpha2'",
"=>",
"\"CS\"",
",",
"'alpha3'",
"=>",
"\"CSK\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"128",
",",
"'zone_id'",
"=>",
"7",
",",
"'name'",
"=>",
"\"Canton and Enderbury Islands\"",
",",
"'alpha2'",
"=>",
"\"CT\"",
",",
"'alpha3'",
"=>",
"\"CTE\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"192",
",",
"'zone_id'",
"=>",
"6",
",",
"'name'",
"=>",
"\"Cuba\"",
",",
"'alpha2'",
"=>",
"\"CU\"",
",",
"'alpha3'",
"=>",
"\"CUB\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"132",
",",
"'zone_id'",
"=>",
"10",
",",
"'name'",
"=>",
"\"Cabo Verde\"",
",",
"'alpha2'",
"=>",
"\"CV\"",
",",
"'alpha3'",
"=>",
"\"CPV\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"531",
",",
"'zone_id'",
"=>",
"3",
",",
"'name'",
"=>",
"\"Curaçao\",",
"",
"'alpha2'",
"=>",
"\"CW\"",
",",
"'alpha3'",
"=>",
"\"CXR\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"162",
",",
"'zone_id'",
"=>",
"15",
",",
"'name'",
"=>",
"\"Christmas Island\"",
",",
"'alpha2'",
"=>",
"\"CX\"",
",",
"'alpha3'",
"=>",
"\"CXR\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"196",
",",
"'zone_id'",
"=>",
"2",
",",
"'name'",
"=>",
"\"Cyprus\"",
",",
"'alpha2'",
"=>",
"\"CY\"",
",",
"'alpha3'",
"=>",
"\"CYP\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"203",
",",
"'zone_id'",
"=>",
"1",
",",
"'name'",
"=>",
"\"Czech Republic\"",
",",
"'alpha2'",
"=>",
"\"CZ\"",
",",
"'alpha3'",
"=>",
"\"CZE\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"276",
",",
"'zone_id'",
"=>",
"1",
",",
"'name'",
"=>",
"\"Germany\"",
",",
"'alpha2'",
"=>",
"\"DE\"",
",",
"'alpha3'",
"=>",
"\"DEU\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"262",
",",
"'zone_id'",
"=>",
"4",
",",
"'name'",
"=>",
"\"Djibouti\"",
",",
"'alpha2'",
"=>",
"\"DJ\"",
",",
"'alpha3'",
"=>",
"\"DJI\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"208",
",",
"'zone_id'",
"=>",
"1",
",",
"'name'",
"=>",
"\"Denmark\"",
",",
"'alpha2'",
"=>",
"\"DK\"",
",",
"'alpha3'",
"=>",
"\"DNK\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"212",
",",
"'zone_id'",
"=>",
"3",
",",
"'name'",
"=>",
"\"Dominica\"",
",",
"'alpha2'",
"=>",
"\"DM\"",
",",
"'alpha3'",
"=>",
"\"DMA\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"214",
",",
"'zone_id'",
"=>",
"6",
",",
"'name'",
"=>",
"\"Dominican Republic\"",
",",
"'alpha2'",
"=>",
"\"DO\"",
",",
"'alpha3'",
"=>",
"\"DOM\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"12",
",",
"'zone_id'",
"=>",
"12",
",",
"'name'",
"=>",
"\"Algeria\"",
",",
"'alpha2'",
"=>",
"\"DZ\"",
",",
"'alpha3'",
"=>",
"\"DZA\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"218",
",",
"'zone_id'",
"=>",
"6",
",",
"'name'",
"=>",
"\"Ecuador\"",
",",
"'alpha2'",
"=>",
"\"EC\"",
",",
"'alpha3'",
"=>",
"\"ECU\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"233",
",",
"'zone_id'",
"=>",
"1",
",",
"'name'",
"=>",
"\"Estonia\"",
",",
"'alpha2'",
"=>",
"\"EE\"",
",",
"'alpha3'",
"=>",
"\"EST\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"818",
",",
"'zone_id'",
"=>",
"2",
",",
"'name'",
"=>",
"\"Egypt\"",
",",
"'alpha2'",
"=>",
"\"EG\"",
",",
"'alpha3'",
"=>",
"\"EGY\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"732",
",",
"'zone_id'",
"=>",
"16",
",",
"'name'",
"=>",
"\"Western Sahara\"",
",",
"'alpha2'",
"=>",
"\"EH\"",
",",
"'alpha3'",
"=>",
"\"ESH\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"232",
",",
"'zone_id'",
"=>",
"4",
",",
"'name'",
"=>",
"\"Eritrea\"",
",",
"'alpha2'",
"=>",
"\"ER\"",
",",
"'alpha3'",
"=>",
"\"ERI\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"724",
",",
"'zone_id'",
"=>",
"1",
",",
"'name'",
"=>",
"\"Spain\"",
",",
"'alpha2'",
"=>",
"\"ES\"",
",",
"'alpha3'",
"=>",
"\"ESP\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"231",
",",
"'zone_id'",
"=>",
"4",
",",
"'name'",
"=>",
"\"Ethiopia\"",
",",
"'alpha2'",
"=>",
"\"ET\"",
",",
"'alpha3'",
"=>",
"\"ETH\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"246",
",",
"'zone_id'",
"=>",
"1",
",",
"'name'",
"=>",
"\"Finland\"",
",",
"'alpha2'",
"=>",
"\"FI\"",
",",
"'alpha3'",
"=>",
"\"FIN\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"242",
",",
"'zone_id'",
"=>",
"7",
",",
"'name'",
"=>",
"\"Fiji\"",
",",
"'alpha2'",
"=>",
"\"FJ\"",
",",
"'alpha3'",
"=>",
"\"FJI\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"238",
",",
"'zone_id'",
"=>",
"10",
",",
"'name'",
"=>",
"\"Falkland Islands [Malvinas\n ]\"",
",",
"'alpha2'",
"=>",
"\"FK\"",
",",
"'alpha3'",
"=>",
"\"KLK\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"583",
",",
"'zone_id'",
"=>",
"7",
",",
"'name'",
"=>",
"\"Micronesia\"",
",",
"'alpha2'",
"=>",
"\"FM\"",
",",
"'alpha3'",
"=>",
"\"FSM\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"234",
",",
"'zone_id'",
"=>",
"1",
",",
"'name'",
"=>",
"\"Faroe Island\"",
",",
"'alpha2'",
"=>",
"\"FO\"",
",",
"'alpha3'",
"=>",
"\"FRO\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"250",
",",
"'zone_id'",
"=>",
"1",
",",
"'name'",
"=>",
"\"France\"",
",",
"'alpha2'",
"=>",
"\"FR\"",
",",
"'alpha3'",
"=>",
"\"FRA\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"266",
",",
"'zone_id'",
"=>",
"4",
",",
"'name'",
"=>",
"\"Gabon\"",
",",
"'alpha2'",
"=>",
"\"GA\"",
",",
"'alpha3'",
"=>",
"\"GAB\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"826",
",",
"'zone_id'",
"=>",
"1",
",",
"'name'",
"=>",
"\"United Kingdom of Great Britain and Northern Ireland\"",
",",
"'alpha2'",
"=>",
"\"GB\"",
",",
"'alpha3'",
"=>",
"\"GBR\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"308",
",",
"'zone_id'",
"=>",
"3",
",",
"'name'",
"=>",
"\"Grenada\"",
",",
"'alpha2'",
"=>",
"\"GD\"",
",",
"'alpha3'",
"=>",
"\"GRD\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"268",
",",
"'zone_id'",
"=>",
"2",
",",
"'name'",
"=>",
"\"Georgia\"",
",",
"'alpha2'",
"=>",
"\"GE\"",
",",
"'alpha3'",
"=>",
"\"GEO\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"254",
",",
"'zone_id'",
"=>",
"6",
",",
"'name'",
"=>",
"\"French Guiana\"",
",",
"'alpha2'",
"=>",
"\"GF\"",
",",
"'alpha3'",
"=>",
"\"GUF\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"831",
",",
"'zone_id'",
"=>",
"1",
",",
"'name'",
"=>",
"\"Guernsey\"",
",",
"'alpha2'",
"=>",
"\"GG\"",
",",
"'alpha3'",
"=>",
"\"GGY\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"288",
",",
"'zone_id'",
"=>",
"4",
",",
"'name'",
"=>",
"\"Ghana\"",
",",
"'alpha2'",
"=>",
"\"GH\"",
",",
"'alpha3'",
"=>",
"\"GHA\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"292",
",",
"'zone_id'",
"=>",
"1",
",",
"'name'",
"=>",
"\"Gibraltar\"",
",",
"'alpha2'",
"=>",
"\"GI\"",
",",
"'alpha3'",
"=>",
"\"GIB\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"304",
",",
"'zone_id'",
"=>",
"13",
",",
"'name'",
"=>",
"\"Greenland\"",
",",
"'alpha2'",
"=>",
"\"GL\"",
",",
"'alpha3'",
"=>",
"\"GRL\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"270",
",",
"'zone_id'",
"=>",
"4",
",",
"'name'",
"=>",
"\"Gambia\"",
",",
"'alpha2'",
"=>",
"\"GM\"",
",",
"'alpha3'",
"=>",
"\"GMB\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"324",
",",
"'zone_id'",
"=>",
"4",
",",
"'name'",
"=>",
"\"Guinea\"",
",",
"'alpha2'",
"=>",
"\"GN\"",
",",
"'alpha3'",
"=>",
"\"GIN\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"312",
",",
"'zone_id'",
"=>",
"3",
",",
"'name'",
"=>",
"\"Guadeloupe\"",
",",
"'alpha2'",
"=>",
"\"GP\"",
",",
"'alpha3'",
"=>",
"\"GLP\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"226",
",",
"'zone_id'",
"=>",
"4",
",",
"'name'",
"=>",
"\"Equatorial Guinea\"",
",",
"'alpha2'",
"=>",
"\"GQ\"",
",",
"'alpha3'",
"=>",
"\"GNQ\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"300",
",",
"'zone_id'",
"=>",
"1",
",",
"'name'",
"=>",
"\"Greece\"",
",",
"'alpha2'",
"=>",
"\"GR\"",
",",
"'alpha3'",
"=>",
"\"GRC\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"239",
",",
"'zone_id'",
"=>",
"10",
",",
"'name'",
"=>",
"\"South Georgia and the South Sandwich Islands\"",
",",
"'alpha2'",
"=>",
"\"GS\"",
",",
"'alpha3'",
"=>",
"\"SGS\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"320",
",",
"'zone_id'",
"=>",
"6",
",",
"'name'",
"=>",
"\"Guatemala\"",
",",
"'alpha2'",
"=>",
"\"GT\"",
",",
"'alpha3'",
"=>",
"\"GTM\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"316",
",",
"'zone_id'",
"=>",
"7",
",",
"'name'",
"=>",
"\"Guam\"",
",",
"'alpha2'",
"=>",
"\"GU\"",
",",
"'alpha3'",
"=>",
"\"GUM\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"624",
",",
"'zone_id'",
"=>",
"4",
",",
"'name'",
"=>",
"\"Guinea-Bissau\"",
",",
"'alpha2'",
"=>",
"\"GW\"",
",",
"'alpha3'",
"=>",
"\"GNB\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"328",
",",
"'zone_id'",
"=>",
"6",
",",
"'name'",
"=>",
"\"Guyana\"",
",",
"'alpha2'",
"=>",
"\"GY\"",
",",
"'alpha3'",
"=>",
"\"GUY\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"344",
",",
"'zone_id'",
"=>",
"9",
",",
"'name'",
"=>",
"\"Hong Kong\"",
",",
"'alpha2'",
"=>",
"\"HK\"",
",",
"'alpha3'",
"=>",
"\"HKG\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"334",
",",
"'zone_id'",
"=>",
"10",
",",
"'name'",
"=>",
"\"Heard Island and McDonald Islands\"",
",",
"'alpha2'",
"=>",
"\"HM\"",
",",
"'alpha3'",
"=>",
"\"HMD\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"340",
",",
"'zone_id'",
"=>",
"6",
",",
"'name'",
"=>",
"\"Honduras\"",
",",
"'alpha2'",
"=>",
"\"HN\"",
",",
"'alpha3'",
"=>",
"\"HND\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"191",
",",
"'zone_id'",
"=>",
"1",
",",
"'name'",
"=>",
"\"Croatia\"",
",",
"'alpha2'",
"=>",
"\"HR\"",
",",
"'alpha3'",
"=>",
"\"HRV\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"332",
",",
"'zone_id'",
"=>",
"6",
",",
"'name'",
"=>",
"\"Haiti\"",
",",
"'alpha2'",
"=>",
"\"HT\"",
",",
"'alpha3'",
"=>",
"\"HTI\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"348",
",",
"'zone_id'",
"=>",
"1",
",",
"'name'",
"=>",
"\"Hungary\"",
",",
"'alpha2'",
"=>",
"\"HU\"",
",",
"'alpha3'",
"=>",
"\"HUN\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"360",
",",
"'zone_id'",
"=>",
"9",
",",
"'name'",
"=>",
"\"Indonesia\"",
",",
"'alpha2'",
"=>",
"\"ID\"",
",",
"'alpha3'",
"=>",
"\"IDN\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"372",
",",
"'zone_id'",
"=>",
"1",
",",
"'name'",
"=>",
"\"Ireland\"",
",",
"'alpha2'",
"=>",
"\"IE\"",
",",
"'alpha3'",
"=>",
"\"IRL\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"376",
",",
"'zone_id'",
"=>",
"2",
",",
"'name'",
"=>",
"\"Israel\"",
",",
"'alpha2'",
"=>",
"\"IL\"",
",",
"'alpha3'",
"=>",
"\"ISR\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"833",
",",
"'zone_id'",
"=>",
"1",
",",
"'name'",
"=>",
"\"Isle of Man\"",
",",
"'alpha2'",
"=>",
"\"IM\"",
",",
"'alpha3'",
"=>",
"\"IMN\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"356",
",",
"'zone_id'",
"=>",
"8",
",",
"'name'",
"=>",
"\"India\"",
",",
"'alpha2'",
"=>",
"\"IN\"",
",",
"'alpha3'",
"=>",
"\"IND\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"86",
",",
"'zone_id'",
"=>",
"7",
",",
"'name'",
"=>",
"\"British Indian Ocean Territory\"",
",",
"'alpha2'",
"=>",
"\"IO\"",
",",
"'alpha3'",
"=>",
"\"IOT\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"368",
",",
"'zone_id'",
"=>",
"2",
",",
"'name'",
"=>",
"\"Iraq\"",
",",
"'alpha2'",
"=>",
"\"IQ\"",
",",
"'alpha3'",
"=>",
"\"IRQ\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"364",
",",
"'zone_id'",
"=>",
"4",
",",
"'name'",
"=>",
"\"Iran\"",
",",
"'alpha2'",
"=>",
"\"IR\"",
",",
"'alpha3'",
"=>",
"\"IRN\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"352",
",",
"'zone_id'",
"=>",
"10",
",",
"'name'",
"=>",
"\"Iceland\"",
",",
"'alpha2'",
"=>",
"\"IS\"",
",",
"'alpha3'",
"=>",
"\"ISL\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"380",
",",
"'zone_id'",
"=>",
"1",
",",
"'name'",
"=>",
"\"Italy\"",
",",
"'alpha2'",
"=>",
"\"IT\"",
",",
"'alpha3'",
"=>",
"\"ITA\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"832",
",",
"'zone_id'",
"=>",
"1",
",",
"'name'",
"=>",
"\"Jersey\"",
",",
"'alpha2'",
"=>",
"\"JE\"",
",",
"'alpha3'",
"=>",
"\"JEY\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"388",
",",
"'zone_id'",
"=>",
"6",
",",
"'name'",
"=>",
"\"Jamaica\"",
",",
"'alpha2'",
"=>",
"\"JM\"",
",",
"'alpha3'",
"=>",
"\"JAM\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"400",
",",
"'zone_id'",
"=>",
"2",
",",
"'name'",
"=>",
"\"Jordan\"",
",",
"'alpha2'",
"=>",
"\"JO\"",
",",
"'alpha3'",
"=>",
"\"JOR\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"392",
",",
"'zone_id'",
"=>",
"9",
",",
"'name'",
"=>",
"\"Japan\"",
",",
"'alpha2'",
"=>",
"\"JP\"",
",",
"'alpha3'",
"=>",
"\"JPN\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"404",
",",
"'zone_id'",
"=>",
"4",
",",
"'name'",
"=>",
"\"Kenya\"",
",",
"'alpha2'",
"=>",
"\"KE\"",
",",
"'alpha3'",
"=>",
"\"KEN\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"417",
",",
"'zone_id'",
"=>",
"2",
",",
"'name'",
"=>",
"\"Kyrgyzstan\"",
",",
"'alpha2'",
"=>",
"\"KG\"",
",",
"'alpha3'",
"=>",
"\"KGZ\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"116",
",",
"'zone_id'",
"=>",
"9",
",",
"'name'",
"=>",
"\"Cambodia\"",
",",
"'alpha2'",
"=>",
"\"KH\"",
",",
"'alpha3'",
"=>",
"\"KHM\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"296",
",",
"'zone_id'",
"=>",
"7",
",",
"'name'",
"=>",
"\"Kiribati\"",
",",
"'alpha2'",
"=>",
"\"KI\"",
",",
"'alpha3'",
"=>",
"\"KIR\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"174",
",",
"'zone_id'",
"=>",
"4",
",",
"'name'",
"=>",
"\"Comoros\"",
",",
"'alpha2'",
"=>",
"\"KM\"",
",",
"'alpha3'",
"=>",
"\"COM\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"659",
",",
"'zone_id'",
"=>",
"3",
",",
"'name'",
"=>",
"\"Saint Kitts and Nevis\"",
",",
"'alpha2'",
"=>",
"\"KN\"",
",",
"'alpha3'",
"=>",
"\"KNA\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"408",
",",
"'zone_id'",
"=>",
"9",
",",
"'name'",
"=>",
"\"Democratic People's Republic of Korea\"",
",",
"'alpha2'",
"=>",
"\"KP\"",
",",
"'alpha3'",
"=>",
"\"PRK\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"410",
",",
"'zone_id'",
"=>",
"9",
",",
"'name'",
"=>",
"\"Republic of Korea \"",
",",
"'alpha2'",
"=>",
"\"KR\"",
",",
"'alpha3'",
"=>",
"\"KOR\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"414",
",",
"'zone_id'",
"=>",
"2",
",",
"'name'",
"=>",
"\"Kuwait\"",
",",
"'alpha2'",
"=>",
"\"KW\"",
",",
"'alpha3'",
"=>",
"\"KWT\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"136",
",",
"'zone_id'",
"=>",
"3",
",",
"'name'",
"=>",
"\"Cayman Island\"",
",",
"'alpha2'",
"=>",
"\"KY\"",
",",
"'alpha3'",
"=>",
"\"CYM\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"398",
",",
"'zone_id'",
"=>",
"2",
",",
"'name'",
"=>",
"\"Kazakhstan\"",
",",
"'alpha2'",
"=>",
"\"KZ\"",
",",
"'alpha3'",
"=>",
"\"KAZ\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"418",
",",
"'zone_id'",
"=>",
"9",
",",
"'name'",
"=>",
"\"Lao People's Democratic Republic\"",
",",
"'alpha2'",
"=>",
"\"LA\"",
",",
"'alpha3'",
"=>",
"\"LAO\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"422",
",",
"'zone_id'",
"=>",
"2",
",",
"'name'",
"=>",
"\"Lebanon\"",
",",
"'alpha2'",
"=>",
"\"LB\"",
",",
"'alpha3'",
"=>",
"\"LBN\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"662",
",",
"'zone_id'",
"=>",
"3",
",",
"'name'",
"=>",
"\"Saint Lucia\"",
",",
"'alpha2'",
"=>",
"\"LC\"",
",",
"'alpha3'",
"=>",
"\"LCA\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"438",
",",
"'zone_id'",
"=>",
"1",
",",
"'name'",
"=>",
"\"Liechtenstein\"",
",",
"'alpha2'",
"=>",
"\"LI\"",
",",
"'alpha3'",
"=>",
"\"LIE\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"144",
",",
"'zone_id'",
"=>",
"15",
",",
"'name'",
"=>",
"\"Sri Lanka\"",
",",
"'alpha2'",
"=>",
"\"LK\"",
",",
"'alpha3'",
"=>",
"\"LKA\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"430",
",",
"'zone_id'",
"=>",
"4",
",",
"'name'",
"=>",
"\"Liberia\"",
",",
"'alpha2'",
"=>",
"\"LR\"",
",",
"'alpha3'",
"=>",
"\"LBR\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"426",
",",
"'zone_id'",
"=>",
"4",
",",
"'name'",
"=>",
"\"Lesotho\"",
",",
"'alpha2'",
"=>",
"\"LS\"",
",",
"'alpha3'",
"=>",
"\"LSO\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"440",
",",
"'zone_id'",
"=>",
"1",
",",
"'name'",
"=>",
"\"Lithuania\"",
",",
"'alpha2'",
"=>",
"\"LT\"",
",",
"'alpha3'",
"=>",
"\"LTU\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"442",
",",
"'zone_id'",
"=>",
"1",
",",
"'name'",
"=>",
"\"Luxembourg\"",
",",
"'alpha2'",
"=>",
"\"LU\"",
",",
"'alpha3'",
"=>",
"\"LUX\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"428",
",",
"'zone_id'",
"=>",
"1",
",",
"'name'",
"=>",
"\"Latvia\"",
",",
"'alpha2'",
"=>",
"\"LV\"",
",",
"'alpha3'",
"=>",
"\"LVA\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"434",
",",
"'zone_id'",
"=>",
"12",
",",
"'name'",
"=>",
"\"Libya\"",
",",
"'alpha2'",
"=>",
"\"LY\"",
",",
"'alpha3'",
"=>",
"\"LBY\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"504",
",",
"'zone_id'",
"=>",
"12",
",",
"'name'",
"=>",
"\"Morocco\"",
",",
"'alpha2'",
"=>",
"\"MA\"",
",",
"'alpha3'",
"=>",
"\"MAR\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"492",
",",
"'zone_id'",
"=>",
"1",
",",
"'name'",
"=>",
"\"Monaco\"",
",",
"'alpha2'",
"=>",
"\"MC\"",
",",
"'alpha3'",
"=>",
"\"MCO\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"498",
",",
"'zone_id'",
"=>",
"1",
",",
"'name'",
"=>",
"\"Moldova\"",
",",
"'alpha2'",
"=>",
"\"MD\"",
",",
"'alpha3'",
"=>",
"\"MDA\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"499",
",",
"'zone_id'",
"=>",
"1",
",",
"'name'",
"=>",
"\"Montenegro\"",
",",
"'alpha2'",
"=>",
"\"ME\"",
",",
"'alpha3'",
"=>",
"\"MNE\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"450",
",",
"'zone_id'",
"=>",
"4",
",",
"'name'",
"=>",
"\"Madagascar\"",
",",
"'alpha2'",
"=>",
"\"MG\"",
",",
"'alpha3'",
"=>",
"\"MDG\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"584",
",",
"'zone_id'",
"=>",
"7",
",",
"'name'",
"=>",
"\"Marshall Islands\"",
",",
"'alpha2'",
"=>",
"\"MH\"",
",",
"'alpha3'",
"=>",
"\"MHL\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"807",
",",
"'zone_id'",
"=>",
"1",
",",
"'name'",
"=>",
"\"Macedonia\"",
",",
"'alpha2'",
"=>",
"\"MK\"",
",",
"'alpha3'",
"=>",
"\"MKD\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"466",
",",
"'zone_id'",
"=>",
"4",
",",
"'name'",
"=>",
"\"Mali\"",
",",
"'alpha2'",
"=>",
"\"ML\"",
",",
"'alpha3'",
"=>",
"\"MLI\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"104",
",",
"'zone_id'",
"=>",
"9",
",",
"'name'",
"=>",
"\"Myanmar\"",
",",
"'alpha2'",
"=>",
"\"MM\"",
",",
"'alpha3'",
"=>",
"\"MMR\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"496",
",",
"'zone_id'",
"=>",
"9",
",",
"'name'",
"=>",
"\"Mongolia\"",
",",
"'alpha2'",
"=>",
"\"MN\"",
",",
"'alpha3'",
"=>",
"\"MNG\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"446",
",",
"'zone_id'",
"=>",
"9",
",",
"'name'",
"=>",
"\"Macao\"",
",",
"'alpha2'",
"=>",
"\"MO\"",
",",
"'alpha3'",
"=>",
"\"MAC\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"474",
",",
"'zone_id'",
"=>",
"3",
",",
"'name'",
"=>",
"\"Martinique\"",
",",
"'alpha2'",
"=>",
"\"MQ\"",
",",
"'alpha3'",
"=>",
"\"MTQ\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"478",
",",
"'zone_id'",
"=>",
"12",
",",
"'name'",
"=>",
"\"Mauritania\"",
",",
"'alpha2'",
"=>",
"\"MR\"",
",",
"'alpha3'",
"=>",
"\"MRT\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"500",
",",
"'zone_id'",
"=>",
"3",
",",
"'name'",
"=>",
"\"Montserrat\"",
",",
"'alpha2'",
"=>",
"\"MS\"",
",",
"'alpha3'",
"=>",
"\"MSR\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"470",
",",
"'zone_id'",
"=>",
"1",
",",
"'name'",
"=>",
"\"Malta\"",
",",
"'alpha2'",
"=>",
"\"MT\"",
",",
"'alpha3'",
"=>",
"\"MLT\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"480",
",",
"'zone_id'",
"=>",
"4",
",",
"'name'",
"=>",
"\"Mauritius\"",
",",
"'alpha2'",
"=>",
"\"MU\"",
",",
"'alpha3'",
"=>",
"\"MUS\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"462",
",",
"'zone_id'",
"=>",
"15",
",",
"'name'",
"=>",
"\"Maldives\"",
",",
"'alpha2'",
"=>",
"\"MV\"",
",",
"'alpha3'",
"=>",
"\"MDV\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"454",
",",
"'zone_id'",
"=>",
"4",
",",
"'name'",
"=>",
"\"Malawi\"",
",",
"'alpha2'",
"=>",
"\"MW\"",
",",
"'alpha3'",
"=>",
"\"MWI\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"484",
",",
"'zone_id'",
"=>",
"6",
",",
"'name'",
"=>",
"\"Mexico\"",
",",
"'alpha2'",
"=>",
"\"MX\"",
",",
"'alpha3'",
"=>",
"\"MEX\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"458",
",",
"'zone_id'",
"=>",
"9",
",",
"'name'",
"=>",
"\"Malaysia\"",
",",
"'alpha2'",
"=>",
"\"MY\"",
",",
"'alpha3'",
"=>",
"\"MYS\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"508",
",",
"'zone_id'",
"=>",
"4",
",",
"'name'",
"=>",
"\"Mozambique\"",
",",
"'alpha2'",
"=>",
"\"MZ\"",
",",
"'alpha3'",
"=>",
"\"MOZ\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"516",
",",
"'zone_id'",
"=>",
"4",
",",
"'name'",
"=>",
"\"Namibia\"",
",",
"'alpha2'",
"=>",
"\"NA\"",
",",
"'alpha3'",
"=>",
"\"NAM\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"540",
",",
"'zone_id'",
"=>",
"7",
",",
"'name'",
"=>",
"\"New Caledonia\"",
",",
"'alpha2'",
"=>",
"\"NC\"",
",",
"'alpha3'",
"=>",
"\"NCL\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"562",
",",
"'zone_id'",
"=>",
"4",
",",
"'name'",
"=>",
"\"Niger\"",
",",
"'alpha2'",
"=>",
"\"NE\"",
",",
"'alpha3'",
"=>",
"\"NER\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"574",
",",
"'zone_id'",
"=>",
"7",
",",
"'name'",
"=>",
"\"Norfolk Island\"",
",",
"'alpha2'",
"=>",
"\"NF\"",
",",
"'alpha3'",
"=>",
"\"NFK\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"566",
",",
"'zone_id'",
"=>",
"4",
",",
"'name'",
"=>",
"\"Nigeria\"",
",",
"'alpha2'",
"=>",
"\"NG\"",
",",
"'alpha3'",
"=>",
"\"NGA\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"558",
",",
"'zone_id'",
"=>",
"6",
",",
"'name'",
"=>",
"\"Nicaragua\"",
",",
"'alpha2'",
"=>",
"\"NI\"",
",",
"'alpha3'",
"=>",
"\"NIC\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"528",
",",
"'zone_id'",
"=>",
"1",
",",
"'name'",
"=>",
"\"Netherlands\"",
",",
"'alpha2'",
"=>",
"\"NL\"",
",",
"'alpha3'",
"=>",
"\"NLD\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"578",
",",
"'zone_id'",
"=>",
"7",
",",
"'name'",
"=>",
"\"Norway\"",
",",
"'alpha2'",
"=>",
"\"NO\"",
",",
"'alpha3'",
"=>",
"\"NOR\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"524",
",",
"'zone_id'",
"=>",
"8",
",",
"'name'",
"=>",
"\"Nepal\"",
",",
"'alpha2'",
"=>",
"\"NP\"",
",",
"'alpha3'",
"=>",
"\"NPL\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"520",
",",
"'zone_id'",
"=>",
"7",
",",
"'name'",
"=>",
"\"Nauru\"",
",",
"'alpha2'",
"=>",
"\"NR\"",
",",
"'alpha3'",
"=>",
"\"NRU\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"570",
",",
"'zone_id'",
"=>",
"7",
",",
"'name'",
"=>",
"\"Niue\"",
",",
"'alpha2'",
"=>",
"\"NU\"",
",",
"'alpha3'",
"=>",
"\"NIU\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"554",
",",
"'zone_id'",
"=>",
"7",
",",
"'name'",
"=>",
"\"New Zealand\"",
",",
"'alpha2'",
"=>",
"\"NZ\"",
",",
"'alpha3'",
"=>",
"\"NZL\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"512",
",",
"'zone_id'",
"=>",
"2",
",",
"'name'",
"=>",
"\"Oman\"",
",",
"'alpha2'",
"=>",
"\"OM\"",
",",
"'alpha3'",
"=>",
"\"OMN\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"591",
",",
"'zone_id'",
"=>",
"6",
",",
"'name'",
"=>",
"\"Panama\"",
",",
"'alpha2'",
"=>",
"\"PA\"",
",",
"'alpha3'",
"=>",
"\"PAN\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"604",
",",
"'zone_id'",
"=>",
"6",
",",
"'name'",
"=>",
"\"Peru\"",
",",
"'alpha2'",
"=>",
"\"PE\"",
",",
"'alpha3'",
"=>",
"\"PER\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"258",
",",
"'zone_id'",
"=>",
"10",
",",
"'name'",
"=>",
"\"French Polynesia\"",
",",
"'alpha2'",
"=>",
"\"PF\"",
",",
"'alpha3'",
"=>",
"\"PYF\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"598",
",",
"'zone_id'",
"=>",
"9",
",",
"'name'",
"=>",
"\"Papua New Guinea\"",
",",
"'alpha2'",
"=>",
"\"PG\"",
",",
"'alpha3'",
"=>",
"\"PNG\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"608",
",",
"'zone_id'",
"=>",
"9",
",",
"'name'",
"=>",
"\"Philippines\"",
",",
"'alpha2'",
"=>",
"\"PH\"",
",",
"'alpha3'",
"=>",
"\"PHL\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"586",
",",
"'zone_id'",
"=>",
"2",
",",
"'name'",
"=>",
"\"Pakistan\"",
",",
"'alpha2'",
"=>",
"\"PK\"",
",",
"'alpha3'",
"=>",
"\"PAK\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"616",
",",
"'zone_id'",
"=>",
"1",
",",
"'name'",
"=>",
"\"Poland\"",
",",
"'alpha2'",
"=>",
"\"PL\"",
",",
"'alpha3'",
"=>",
"\"POL\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"666",
",",
"'zone_id'",
"=>",
"1",
",",
"'name'",
"=>",
"\"Saint Pierre and Miquelon\"",
",",
"'alpha2'",
"=>",
"\"PM\"",
",",
"'alpha3'",
"=>",
"\"SPM\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"612",
",",
"'zone_id'",
"=>",
"10",
",",
"'name'",
"=>",
"\"Pitcairn\"",
",",
"'alpha2'",
"=>",
"\"PN\"",
",",
"'alpha3'",
"=>",
"\"PCN\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"630",
",",
"'zone_id'",
"=>",
"6",
",",
"'name'",
"=>",
"\"Puerto Rico\"",
",",
"'alpha2'",
"=>",
"\"PR\"",
",",
"'alpha3'",
"=>",
"\"PRI\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"275",
",",
"'zone_id'",
"=>",
"2",
",",
"'name'",
"=>",
"\"Palestine\"",
",",
"'alpha2'",
"=>",
"\"PS\"",
",",
"'alpha3'",
"=>",
"\"PSE\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"620",
",",
"'zone_id'",
"=>",
"1",
",",
"'name'",
"=>",
"\"Portugal\"",
",",
"'alpha2'",
"=>",
"\"PT\"",
",",
"'alpha3'",
"=>",
"\"PRT\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"585",
",",
"'zone_id'",
"=>",
"1",
",",
"'name'",
"=>",
"\"Palau\"",
",",
"'alpha2'",
"=>",
"\"PW\"",
",",
"'alpha3'",
"=>",
"\"PLW\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"600",
",",
"'zone_id'",
"=>",
"6",
",",
"'name'",
"=>",
"\"Paraguay\"",
",",
"'alpha2'",
"=>",
"\"PY\"",
",",
"'alpha3'",
"=>",
"\"PRY\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"634",
",",
"'zone_id'",
"=>",
"2",
",",
"'name'",
"=>",
"\"Qatar\"",
",",
"'alpha2'",
"=>",
"\"QA\"",
",",
"'alpha3'",
"=>",
"\"QAT\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"638",
",",
"'zone_id'",
"=>",
"14",
",",
"'name'",
"=>",
"\"Reunión\"",
",",
"'alpha2'",
"=>",
"\"RE\"",
",",
"'alpha3'",
"=>",
"\"REU\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"642",
",",
"'zone_id'",
"=>",
"1",
",",
"'name'",
"=>",
"\"Romania\"",
",",
"'alpha2'",
"=>",
"\"RO\"",
",",
"'alpha3'",
"=>",
"\"ROU\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"688",
",",
"'zone_id'",
"=>",
"1",
",",
"'name'",
"=>",
"\"Serbia\"",
",",
"'alpha2'",
"=>",
"\"RS\"",
",",
"'alpha3'",
"=>",
"\"SRB\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"643",
",",
"'zone_id'",
"=>",
"9",
",",
"'name'",
"=>",
"\"Russia\"",
",",
"'alpha2'",
"=>",
"\"RU\"",
",",
"'alpha3'",
"=>",
"\"RUS\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"646",
",",
"'zone_id'",
"=>",
"4",
",",
"'name'",
"=>",
"\"Rwanda\"",
",",
"'alpha2'",
"=>",
"\"RW\"",
",",
"'alpha3'",
"=>",
"\"RWA\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"682",
",",
"'zone_id'",
"=>",
"2",
",",
"'name'",
"=>",
"\"Saudi Arabia\"",
",",
"'alpha2'",
"=>",
"\"SA\"",
",",
"'alpha3'",
"=>",
"\"SAU\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"90",
",",
"'zone_id'",
"=>",
"7",
",",
"'name'",
"=>",
"\"Solomon Islands\"",
",",
"'alpha2'",
"=>",
"\"SB\"",
",",
"'alpha3'",
"=>",
"\"SLB\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"690",
",",
"'zone_id'",
"=>",
"4",
",",
"'name'",
"=>",
"\"Seychelles\"",
",",
"'alpha2'",
"=>",
"\"SC\"",
",",
"'alpha3'",
"=>",
"\"SYC\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"736",
",",
"'zone_id'",
"=>",
"4",
",",
"'name'",
"=>",
"\"Sudan\"",
",",
"'alpha2'",
"=>",
"\"SD\"",
",",
"'alpha3'",
"=>",
"\"SDN\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"752",
",",
"'zone_id'",
"=>",
"1",
",",
"'name'",
"=>",
"\"Sweden\"",
",",
"'alpha2'",
"=>",
"\"SE\"",
",",
"'alpha3'",
"=>",
"\"SWE\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"702",
",",
"'zone_id'",
"=>",
"9",
",",
"'name'",
"=>",
"\"Singapore\"",
",",
"'alpha2'",
"=>",
"\"SG\"",
",",
"'alpha3'",
"=>",
"\"SGP\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"654",
",",
"'zone_id'",
"=>",
"10",
",",
"'name'",
"=>",
"\"Saint Helena\"",
",",
"'alpha2'",
"=>",
"\"SH\"",
",",
"'alpha3'",
"=>",
"\"SHN\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"705",
",",
"'zone_id'",
"=>",
"1",
",",
"'name'",
"=>",
"\"Slovenia\"",
",",
"'alpha2'",
"=>",
"\"SI\"",
",",
"'alpha3'",
"=>",
"\"SVN\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"744",
",",
"'zone_id'",
"=>",
"1",
",",
"'name'",
"=>",
"\"Svalbard Island and Jan Mayen\"",
",",
"'alpha2'",
"=>",
"\"SJ\"",
",",
"'alpha3'",
"=>",
"\"SJM\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"703",
",",
"'zone_id'",
"=>",
"1",
",",
"'name'",
"=>",
"\"Slovakia\"",
",",
"'alpha2'",
"=>",
"\"SK\"",
",",
"'alpha3'",
"=>",
"\"SVK\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"694",
",",
"'zone_id'",
"=>",
"4",
",",
"'name'",
"=>",
"\"Sierra Leone\"",
",",
"'alpha2'",
"=>",
"\"SL\"",
",",
"'alpha3'",
"=>",
"\"SLE\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"674",
",",
"'zone_id'",
"=>",
"1",
",",
"'name'",
"=>",
"\"San Marino\"",
",",
"'alpha2'",
"=>",
"\"SM\"",
",",
"'alpha3'",
"=>",
"\"SMR\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"686",
",",
"'zone_id'",
"=>",
"4",
",",
"'name'",
"=>",
"\"Senegal\"",
",",
"'alpha2'",
"=>",
"\"SN\"",
",",
"'alpha3'",
"=>",
"\"SEN\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"706",
",",
"'zone_id'",
"=>",
"4",
",",
"'name'",
"=>",
"\"Somalia\"",
",",
"'alpha2'",
"=>",
"\"SO\"",
",",
"'alpha3'",
"=>",
"\"SOM\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"740",
",",
"'zone_id'",
"=>",
"6",
",",
"'name'",
"=>",
"\"Suriname\"",
",",
"'alpha2'",
"=>",
"\"SM\"",
",",
"'alpha3'",
"=>",
"\"SUR\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"678",
",",
"'zone_id'",
"=>",
"4",
",",
"'name'",
"=>",
"\"Sao Tome and Principe\"",
",",
"'alpha2'",
"=>",
"\"ST\"",
",",
"'alpha3'",
"=>",
"\"STP\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"222",
",",
"'zone_id'",
"=>",
"6",
",",
"'name'",
"=>",
"\"El Salvador\"",
",",
"'alpha2'",
"=>",
"\"SV\"",
",",
"'alpha3'",
"=>",
"\"SLV\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"760",
",",
"'zone_id'",
"=>",
"2",
",",
"'name'",
"=>",
"\"Syria\"",
",",
"'alpha2'",
"=>",
"\"SY\"",
",",
"'alpha3'",
"=>",
"\"SYR\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"748",
",",
"'zone_id'",
"=>",
"4",
",",
"'name'",
"=>",
"\"Swaziland\"",
",",
"'alpha2'",
"=>",
"\"SZ\"",
",",
"'alpha3'",
"=>",
"\"SWZ\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"796",
",",
"'zone_id'",
"=>",
"1",
",",
"'name'",
"=>",
"\"Turks and Caicos Islands\"",
",",
"'alpha2'",
"=>",
"\"TC\"",
",",
"'alpha3'",
"=>",
"\"TCA\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"148",
",",
"'zone_id'",
"=>",
"4",
",",
"'name'",
"=>",
"\"Chad\"",
",",
"'alpha2'",
"=>",
"\"TD\"",
",",
"'alpha3'",
"=>",
"\"TCD\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"260",
",",
"'zone_id'",
"=>",
"1",
",",
"'name'",
"=>",
"\"French Southern Territories\"",
",",
"'alpha2'",
"=>",
"\"TF\"",
",",
"'alpha3'",
"=>",
"\"ATF\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"768",
",",
"'zone_id'",
"=>",
"4",
",",
"'name'",
"=>",
"\"Togo\"",
",",
"'alpha2'",
"=>",
"\"TG\"",
",",
"'alpha3'",
"=>",
"\"TGO\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"764",
",",
"'zone_id'",
"=>",
"9",
",",
"'name'",
"=>",
"\"Thailand\"",
",",
"'alpha2'",
"=>",
"\"TH\"",
",",
"'alpha3'",
"=>",
"\"THA\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"762",
",",
"'zone_id'",
"=>",
"2",
",",
"'name'",
"=>",
"\"Tajikistan\"",
",",
"'alpha2'",
"=>",
"\"TJ\"",
",",
"'alpha3'",
"=>",
"\"TJK\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"772",
",",
"'zone_id'",
"=>",
"7",
",",
"'name'",
"=>",
"\"Tokelau\"",
",",
"'alpha2'",
"=>",
"\"TK\"",
",",
"'alpha3'",
"=>",
"\"TKL\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"626",
",",
"'zone_id'",
"=>",
"9",
",",
"'name'",
"=>",
"\"Timor-Leste\"",
",",
"'alpha2'",
"=>",
"\"TL\"",
",",
"'alpha3'",
"=>",
"\"TLS\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"795",
",",
"'zone_id'",
"=>",
"2",
",",
"'name'",
"=>",
"\"Turkmenistan\"",
",",
"'alpha2'",
"=>",
"\"TM\"",
",",
"'alpha3'",
"=>",
"\"TKM\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"788",
",",
"'zone_id'",
"=>",
"12",
",",
"'name'",
"=>",
"\"Tunisia\"",
",",
"'alpha2'",
"=>",
"\"TN\"",
",",
"'alpha3'",
"=>",
"\"TUN\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"776",
",",
"'zone_id'",
"=>",
"7",
",",
"'name'",
"=>",
"\"Tonga\"",
",",
"'alpha2'",
"=>",
"\"TO\"",
",",
"'alpha3'",
"=>",
"\"TON\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"792",
",",
"'zone_id'",
"=>",
"2",
",",
"'name'",
"=>",
"\"Turkey\"",
",",
"'alpha2'",
"=>",
"\"TR\"",
",",
"'alpha3'",
"=>",
"\"TUR\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"780",
",",
"'zone_id'",
"=>",
"3",
",",
"'name'",
"=>",
"\"Trinidad and Tobago\"",
",",
"'alpha2'",
"=>",
"\"TT\"",
",",
"'alpha3'",
"=>",
"\"TTO\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"798",
",",
"'zone_id'",
"=>",
"7",
",",
"'name'",
"=>",
"\"Tuvalu\"",
",",
"'alpha2'",
"=>",
"\"TV\"",
",",
"'alpha3'",
"=>",
"\"TUV\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"158",
",",
"'zone_id'",
"=>",
"9",
",",
"'name'",
"=>",
"\"Taiwan\"",
",",
"'alpha2'",
"=>",
"\"TW\"",
",",
"'alpha3'",
"=>",
"\"TWN\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"834",
",",
"'zone_id'",
"=>",
"4",
",",
"'name'",
"=>",
"\"Tanzania\"",
",",
"'alpha2'",
"=>",
"\"TZ\"",
",",
"'alpha3'",
"=>",
"\"TZA\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"804",
",",
"'zone_id'",
"=>",
"1",
",",
"'name'",
"=>",
"\"Ukraine\"",
",",
"'alpha2'",
"=>",
"\"UA\"",
",",
"'alpha3'",
"=>",
"\"UKR\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"800",
",",
"'zone_id'",
"=>",
"4",
",",
"'name'",
"=>",
"\"Uganda\"",
",",
"'alpha2'",
"=>",
"\"UG\"",
",",
"'alpha3'",
"=>",
"\"UGA\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"840",
",",
"'zone_id'",
"=>",
"11",
",",
"'name'",
"=>",
"\"United States of America\"",
",",
"'alpha2'",
"=>",
"\"US\"",
",",
"'alpha3'",
"=>",
"\"USA\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"858",
",",
"'zone_id'",
"=>",
"6",
",",
"'name'",
"=>",
"\"Uruguay\"",
",",
"'alpha2'",
"=>",
"\"UY\"",
",",
"'alpha3'",
"=>",
"\"URY\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"860",
",",
"'zone_id'",
"=>",
"2",
",",
"'name'",
"=>",
"\"Uzbekistan\"",
",",
"'alpha2'",
"=>",
"\"UZ\"",
",",
"'alpha3'",
"=>",
"\"UZB\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"336",
",",
"'zone_id'",
"=>",
"1",
",",
"'name'",
"=>",
"\"Holy See\"",
",",
"'alpha2'",
"=>",
"\"VA\"",
",",
"'alpha3'",
"=>",
"\"VAT\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"670",
",",
"'zone_id'",
"=>",
"3",
",",
"'name'",
"=>",
"\"Saint Vicent and the Grenadines\"",
",",
"'alpha2'",
"=>",
"\"VC\"",
",",
"'alpha3'",
"=>",
"\"VCT\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"862",
",",
"'zone_id'",
"=>",
"6",
",",
"'name'",
"=>",
"\"Venezuela\"",
",",
"'alpha2'",
"=>",
"\"VE\"",
",",
"'alpha3'",
"=>",
"\"VEN\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"92",
",",
"'zone_id'",
"=>",
"4",
",",
"'name'",
"=>",
"\"Virgin Islands (British)\"",
",",
"'alpha2'",
"=>",
"\"VG\"",
",",
"'alpha3'",
"=>",
"\"VGN\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"850",
",",
"'zone_id'",
"=>",
"3",
",",
"'name'",
"=>",
"\"Virgin Islands (U.S.A)\"",
",",
"'alpha2'",
"=>",
"\"VI\"",
",",
"'alpha3'",
"=>",
"\"VIR\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"704",
",",
"'zone_id'",
"=>",
"9",
",",
"'name'",
"=>",
"\"Viet Nam\"",
",",
"'alpha2'",
"=>",
"\"VN\"",
",",
"'alpha3'",
"=>",
"\"VNM\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"548",
",",
"'zone_id'",
"=>",
"7",
",",
"'name'",
"=>",
"\"Vanuatu\"",
",",
"'alpha2'",
"=>",
"\"VU\"",
",",
"'alpha3'",
"=>",
"\"VUT\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"876",
",",
"'zone_id'",
"=>",
"7",
",",
"'name'",
"=>",
"\"Wallis and Futuna\"",
",",
"'alpha2'",
"=>",
"\"WF\"",
",",
"'alpha3'",
"=>",
"\"WLF\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"882",
",",
"'zone_id'",
"=>",
"7",
",",
"'name'",
"=>",
"\"Samoa\"",
",",
"'alpha2'",
"=>",
"\"WS\"",
",",
"'alpha3'",
"=>",
"\"WSM\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"887",
",",
"'zone_id'",
"=>",
"2",
",",
"'name'",
"=>",
"\"Yemen\"",
",",
"'alpha2'",
"=>",
"\"YE\"",
",",
"'alpha3'",
"=>",
"\"YEM\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"175",
",",
"'zone_id'",
"=>",
"14",
",",
"'name'",
"=>",
"\"Mayotte\"",
",",
"'alpha2'",
"=>",
"\"YT\"",
",",
"'alpha3'",
"=>",
"\"MYT\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"DB",
"::",
"table",
"(",
"'ctrystore_countries'",
")",
"->",
"insert",
"(",
"[",
"'id'",
"=>",
"710",
",",
"'zone_id'",
"=>",
"4",
",",
"'name'",
"=>",
"\"South Africa\"",
",",
"'alpha2'",
"=>",
"\"ZA\"",
",",
"'alpha3'",
"=>",
"\"ZAF\"",
",",
"'created_at'",
"=>",
"$",
"today",
",",
"'updated_at'",
"=>",
"$",
"today",
",",
"]",
")",
";",
"}"
] | Run the database seeds.
@return void | [
"Run",
"the",
"database",
"seeds",
"."
] | train | https://github.com/jnaxo/country-codes/blob/ab1f24886e1b49eef5fd4b4eb4fb37aa7faeacd9/database/seeds/WorldCountriesSeeder.php#L13-L2470 |
LeaseCloud/leasecloud-php-sdk | src/Order.php | Order.status | public static function status($orderId)
{
$url = static::classUrl();
$url = $url . '/' . $orderId . '/status';
list($ret) = parent::staticRequest('get', $url, []);
return $ret;
} | php | public static function status($orderId)
{
$url = static::classUrl();
$url = $url . '/' . $orderId . '/status';
list($ret) = parent::staticRequest('get', $url, []);
return $ret;
} | [
"public",
"static",
"function",
"status",
"(",
"$",
"orderId",
")",
"{",
"$",
"url",
"=",
"static",
"::",
"classUrl",
"(",
")",
";",
"$",
"url",
"=",
"$",
"url",
".",
"'/'",
".",
"$",
"orderId",
".",
"'/status'",
";",
"list",
"(",
"$",
"ret",
")",
"=",
"parent",
"::",
"staticRequest",
"(",
"'get'",
",",
"$",
"url",
",",
"[",
"]",
")",
";",
"return",
"$",
"ret",
";",
"}"
] | Get status information about an order
@param string $orderId
@return mixed | [
"Get",
"status",
"information",
"about",
"an",
"order"
] | train | https://github.com/LeaseCloud/leasecloud-php-sdk/blob/091b073dd4f79ba915a68c0ed151bd9bfa61e7ca/src/Order.php#L27-L34 |
LeaseCloud/leasecloud-php-sdk | src/Order.php | Order.cancel | public static function cancel($orderId)
{
$url = static::classUrl();
$url = $url . '/' . $orderId . '/cancel';
list($ret, $code) = parent::staticRequest('post', $url, []);
return (object)[
'code' => $code,
'status' => $code === 200? 'success' : 'failed'
];
} | php | public static function cancel($orderId)
{
$url = static::classUrl();
$url = $url . '/' . $orderId . '/cancel';
list($ret, $code) = parent::staticRequest('post', $url, []);
return (object)[
'code' => $code,
'status' => $code === 200? 'success' : 'failed'
];
} | [
"public",
"static",
"function",
"cancel",
"(",
"$",
"orderId",
")",
"{",
"$",
"url",
"=",
"static",
"::",
"classUrl",
"(",
")",
";",
"$",
"url",
"=",
"$",
"url",
".",
"'/'",
".",
"$",
"orderId",
".",
"'/cancel'",
";",
"list",
"(",
"$",
"ret",
",",
"$",
"code",
")",
"=",
"parent",
"::",
"staticRequest",
"(",
"'post'",
",",
"$",
"url",
",",
"[",
"]",
")",
";",
"return",
"(",
"object",
")",
"[",
"'code'",
"=>",
"$",
"code",
",",
"'status'",
"=>",
"$",
"code",
"===",
"200",
"?",
"'success'",
":",
"'failed'",
"]",
";",
"}"
] | Cancel an order
@param string $orderId
@return object | [
"Cancel",
"an",
"order"
] | train | https://github.com/LeaseCloud/leasecloud-php-sdk/blob/091b073dd4f79ba915a68c0ed151bd9bfa61e7ca/src/Order.php#L42-L52 |
LeaseCloud/leasecloud-php-sdk | src/Order.php | Order.shipped | public static function shipped($orderId, $shippedAt = 0)
{
$url = static::classUrl();
$url = $url . '/' . $orderId . '/shipped';
list($ret, $code) = parent::staticRequest('post', $url, [
'shippedAt' => date('c', $shippedAt ? $shippedAt : time()),
]);
return (object)[
'code' => $code,
'status' => $code === 204? 'success' : 'failed'
];
} | php | public static function shipped($orderId, $shippedAt = 0)
{
$url = static::classUrl();
$url = $url . '/' . $orderId . '/shipped';
list($ret, $code) = parent::staticRequest('post', $url, [
'shippedAt' => date('c', $shippedAt ? $shippedAt : time()),
]);
return (object)[
'code' => $code,
'status' => $code === 204? 'success' : 'failed'
];
} | [
"public",
"static",
"function",
"shipped",
"(",
"$",
"orderId",
",",
"$",
"shippedAt",
"=",
"0",
")",
"{",
"$",
"url",
"=",
"static",
"::",
"classUrl",
"(",
")",
";",
"$",
"url",
"=",
"$",
"url",
".",
"'/'",
".",
"$",
"orderId",
".",
"'/shipped'",
";",
"list",
"(",
"$",
"ret",
",",
"$",
"code",
")",
"=",
"parent",
"::",
"staticRequest",
"(",
"'post'",
",",
"$",
"url",
",",
"[",
"'shippedAt'",
"=>",
"date",
"(",
"'c'",
",",
"$",
"shippedAt",
"?",
"$",
"shippedAt",
":",
"time",
"(",
")",
")",
",",
"]",
")",
";",
"return",
"(",
"object",
")",
"[",
"'code'",
"=>",
"$",
"code",
",",
"'status'",
"=>",
"$",
"code",
"===",
"204",
"?",
"'success'",
":",
"'failed'",
"]",
";",
"}"
] | Tell LeaseCloud that an order is shipped
@param string $orderId
@param int $shippedAt Unix timestamp
@return object | [
"Tell",
"LeaseCloud",
"that",
"an",
"order",
"is",
"shipped"
] | train | https://github.com/LeaseCloud/leasecloud-php-sdk/blob/091b073dd4f79ba915a68c0ed151bd9bfa61e7ca/src/Order.php#L61-L73 |
ntd/silverstripe-carousel | code/CarouselPage.php | CarouselImageExtension.generateMaybeCroppedImage | public function generateMaybeCroppedImage(Image_Backend $backend, $width, $height)
{
if ($width > 0 && $height > 0) {
return $backend->croppedResize($width, $height);
} elseif ($width > 0) {
return $backend->resizeByWidth($width);
} elseif ($height > 0) {
return $backend->resizeByHeight($height);
} else {
return $backend;
}
} | php | public function generateMaybeCroppedImage(Image_Backend $backend, $width, $height)
{
if ($width > 0 && $height > 0) {
return $backend->croppedResize($width, $height);
} elseif ($width > 0) {
return $backend->resizeByWidth($width);
} elseif ($height > 0) {
return $backend->resizeByHeight($height);
} else {
return $backend;
}
} | [
"public",
"function",
"generateMaybeCroppedImage",
"(",
"Image_Backend",
"$",
"backend",
",",
"$",
"width",
",",
"$",
"height",
")",
"{",
"if",
"(",
"$",
"width",
">",
"0",
"&&",
"$",
"height",
">",
"0",
")",
"{",
"return",
"$",
"backend",
"->",
"croppedResize",
"(",
"$",
"width",
",",
"$",
"height",
")",
";",
"}",
"elseif",
"(",
"$",
"width",
">",
"0",
")",
"{",
"return",
"$",
"backend",
"->",
"resizeByWidth",
"(",
"$",
"width",
")",
";",
"}",
"elseif",
"(",
"$",
"height",
">",
"0",
")",
"{",
"return",
"$",
"backend",
"->",
"resizeByHeight",
"(",
"$",
"height",
")",
";",
"}",
"else",
"{",
"return",
"$",
"backend",
";",
"}",
"}"
] | Low level function for CarouselImageExtension::MaybeCroppedImage().
@param Image_Backend $backend
@param integer $width
@param integer $height
@return Image_Backend | [
"Low",
"level",
"function",
"for",
"CarouselImageExtension",
"::",
"MaybeCroppedImage",
"()",
"."
] | train | https://github.com/ntd/silverstripe-carousel/blob/1475f48f404b702b58480eacb2fea01011b30e55/code/CarouselPage.php#L41-L52 |
ntd/silverstripe-carousel | code/CarouselPage.php | CarouselImageExtension.getCarouselEditFields | public function getCarouselEditFields()
{
// This is *required* otherwise TinyMCE in SilverStripe 3.3 will
// not be enabled and the <textarea> will simply disappear
// without apparent reasons
if (method_exists('HtmlEditorConfig', 'require_js')) {
HtmlEditorConfig::require_js();
}
$fields = FieldList::create();
$fields->push(CarouselCaptionField::create('Content', _t('CarouselPage.Caption')));
return $fields;
} | php | public function getCarouselEditFields()
{
// This is *required* otherwise TinyMCE in SilverStripe 3.3 will
// not be enabled and the <textarea> will simply disappear
// without apparent reasons
if (method_exists('HtmlEditorConfig', 'require_js')) {
HtmlEditorConfig::require_js();
}
$fields = FieldList::create();
$fields->push(CarouselCaptionField::create('Content', _t('CarouselPage.Caption')));
return $fields;
} | [
"public",
"function",
"getCarouselEditFields",
"(",
")",
"{",
"// This is *required* otherwise TinyMCE in SilverStripe 3.3 will",
"// not be enabled and the <textarea> will simply disappear",
"// without apparent reasons",
"if",
"(",
"method_exists",
"(",
"'HtmlEditorConfig'",
",",
"'require_js'",
")",
")",
"{",
"HtmlEditorConfig",
"::",
"require_js",
"(",
")",
";",
"}",
"$",
"fields",
"=",
"FieldList",
"::",
"create",
"(",
")",
";",
"$",
"fields",
"->",
"push",
"(",
"CarouselCaptionField",
"::",
"create",
"(",
"'Content'",
",",
"_t",
"(",
"'CarouselPage.Caption'",
")",
")",
")",
";",
"return",
"$",
"fields",
";",
"}"
] | Retrieve the fields used by SortableUploadField internal form.
@return FieldList | [
"Retrieve",
"the",
"fields",
"used",
"by",
"SortableUploadField",
"internal",
"form",
"."
] | train | https://github.com/ntd/silverstripe-carousel/blob/1475f48f404b702b58480eacb2fea01011b30e55/code/CarouselPage.php#L59-L71 |
ntd/silverstripe-carousel | code/CarouselPage.php | CarouselPage.getClassFolder | protected function getClassFolder()
{
for ($class = $this->class; $class; $class = get_parent_class($class)) {
$folder = preg_replace('/Page$/', '', $class);
if ($folder != $class && is_dir(ASSETS_PATH . '/' . $folder)) {
return $folder;
}
}
// Why false? Because false is the proper value to set in
// setFolderName() to get the default folder (i.e. 'Uploads').
return false;
} | php | protected function getClassFolder()
{
for ($class = $this->class; $class; $class = get_parent_class($class)) {
$folder = preg_replace('/Page$/', '', $class);
if ($folder != $class && is_dir(ASSETS_PATH . '/' . $folder)) {
return $folder;
}
}
// Why false? Because false is the proper value to set in
// setFolderName() to get the default folder (i.e. 'Uploads').
return false;
} | [
"protected",
"function",
"getClassFolder",
"(",
")",
"{",
"for",
"(",
"$",
"class",
"=",
"$",
"this",
"->",
"class",
";",
"$",
"class",
";",
"$",
"class",
"=",
"get_parent_class",
"(",
"$",
"class",
")",
")",
"{",
"$",
"folder",
"=",
"preg_replace",
"(",
"'/Page$/'",
",",
"''",
",",
"$",
"class",
")",
";",
"if",
"(",
"$",
"folder",
"!=",
"$",
"class",
"&&",
"is_dir",
"(",
"ASSETS_PATH",
".",
"'/'",
".",
"$",
"folder",
")",
")",
"{",
"return",
"$",
"folder",
";",
"}",
"}",
"// Why false? Because false is the proper value to set in",
"// setFolderName() to get the default folder (i.e. 'Uploads').",
"return",
"false",
";",
"}"
] | Search the first class name (that must have a 'Page' suffix) in
the object hierarchy that has a correspoding folder in
ASSETS_PATH, that is a folder with the same name with the 'Page'
suffix stripped out. This folder will be returned and used as
custom folder in the upload field.
For example, if this class is `HomePage` and it is inherited from
`CarouselPage`, this function will check for `Home` first and
`Carousel` after.
If no valid folders are found, `false` is returned.
@return string|false | [
"Search",
"the",
"first",
"class",
"name",
"(",
"that",
"must",
"have",
"a",
"Page",
"suffix",
")",
"in",
"the",
"object",
"hierarchy",
"that",
"has",
"a",
"correspoding",
"folder",
"in",
"ASSETS_PATH",
"that",
"is",
"a",
"folder",
"with",
"the",
"same",
"name",
"with",
"the",
"Page",
"suffix",
"stripped",
"out",
".",
"This",
"folder",
"will",
"be",
"returned",
"and",
"used",
"as",
"custom",
"folder",
"in",
"the",
"upload",
"field",
"."
] | train | https://github.com/ntd/silverstripe-carousel/blob/1475f48f404b702b58480eacb2fea01011b30e55/code/CarouselPage.php#L161-L173 |
ntd/silverstripe-carousel | code/CarouselPage.php | CarouselPage.getCMSFields | public function getCMSFields()
{
$fields = parent::getCMSFields();
$field = SortableUploadField::create('Images', _t('CarouselPage.db_Images'));
$field->setFolderName($this->getClassFolder());
$field->setFileEditFields('getCarouselEditFields');
$root = $fields->fieldByName('Root');
$tab = $root->fieldByName('Images');
if (! $tab) {
$tab = Tab::create('Images');
$tab->setTitle(_t('CarouselPage.db_Images'));
$root->insertAfter($tab, 'Main');
}
$tab->push($field);
return $fields;
} | php | public function getCMSFields()
{
$fields = parent::getCMSFields();
$field = SortableUploadField::create('Images', _t('CarouselPage.db_Images'));
$field->setFolderName($this->getClassFolder());
$field->setFileEditFields('getCarouselEditFields');
$root = $fields->fieldByName('Root');
$tab = $root->fieldByName('Images');
if (! $tab) {
$tab = Tab::create('Images');
$tab->setTitle(_t('CarouselPage.db_Images'));
$root->insertAfter($tab, 'Main');
}
$tab->push($field);
return $fields;
} | [
"public",
"function",
"getCMSFields",
"(",
")",
"{",
"$",
"fields",
"=",
"parent",
"::",
"getCMSFields",
"(",
")",
";",
"$",
"field",
"=",
"SortableUploadField",
"::",
"create",
"(",
"'Images'",
",",
"_t",
"(",
"'CarouselPage.db_Images'",
")",
")",
";",
"$",
"field",
"->",
"setFolderName",
"(",
"$",
"this",
"->",
"getClassFolder",
"(",
")",
")",
";",
"$",
"field",
"->",
"setFileEditFields",
"(",
"'getCarouselEditFields'",
")",
";",
"$",
"root",
"=",
"$",
"fields",
"->",
"fieldByName",
"(",
"'Root'",
")",
";",
"$",
"tab",
"=",
"$",
"root",
"->",
"fieldByName",
"(",
"'Images'",
")",
";",
"if",
"(",
"!",
"$",
"tab",
")",
"{",
"$",
"tab",
"=",
"Tab",
"::",
"create",
"(",
"'Images'",
")",
";",
"$",
"tab",
"->",
"setTitle",
"(",
"_t",
"(",
"'CarouselPage.db_Images'",
")",
")",
";",
"$",
"root",
"->",
"insertAfter",
"(",
"$",
"tab",
",",
"'Main'",
")",
";",
"}",
"$",
"tab",
"->",
"push",
"(",
"$",
"field",
")",
";",
"return",
"$",
"fields",
";",
"}"
] | Add the "Images" tab to the content form of the page.
The images are linked to the page with a many-many relationship,
so if an image is shared among different carousels there is no
need to upload it multiple times.
@return FieldList | [
"Add",
"the",
"Images",
"tab",
"to",
"the",
"content",
"form",
"of",
"the",
"page",
"."
] | train | https://github.com/ntd/silverstripe-carousel/blob/1475f48f404b702b58480eacb2fea01011b30e55/code/CarouselPage.php#L184-L202 |
ntd/silverstripe-carousel | code/CarouselPage.php | CarouselPage.getSettingsFields | public function getSettingsFields()
{
$fields = parent::getSettingsFields();
$settings = FieldGroup::create(
FieldGroup::create(
NumericField::create('Width', _t('CarouselPage.db_Width')),
NumericField::create('Height', _t('CarouselPage.db_Height')),
CheckboxField::create('Captions', _t('CarouselPage.db_Captions'))
)
);
$settings->setName('Carousel');
$settings->setTitle(_t('CarouselPage.SINGULARNAME'));
$fields->addFieldToTab('Root.Settings', $settings);
return $fields;
} | php | public function getSettingsFields()
{
$fields = parent::getSettingsFields();
$settings = FieldGroup::create(
FieldGroup::create(
NumericField::create('Width', _t('CarouselPage.db_Width')),
NumericField::create('Height', _t('CarouselPage.db_Height')),
CheckboxField::create('Captions', _t('CarouselPage.db_Captions'))
)
);
$settings->setName('Carousel');
$settings->setTitle(_t('CarouselPage.SINGULARNAME'));
$fields->addFieldToTab('Root.Settings', $settings);
return $fields;
} | [
"public",
"function",
"getSettingsFields",
"(",
")",
"{",
"$",
"fields",
"=",
"parent",
"::",
"getSettingsFields",
"(",
")",
";",
"$",
"settings",
"=",
"FieldGroup",
"::",
"create",
"(",
"FieldGroup",
"::",
"create",
"(",
"NumericField",
"::",
"create",
"(",
"'Width'",
",",
"_t",
"(",
"'CarouselPage.db_Width'",
")",
")",
",",
"NumericField",
"::",
"create",
"(",
"'Height'",
",",
"_t",
"(",
"'CarouselPage.db_Height'",
")",
")",
",",
"CheckboxField",
"::",
"create",
"(",
"'Captions'",
",",
"_t",
"(",
"'CarouselPage.db_Captions'",
")",
")",
")",
")",
";",
"$",
"settings",
"->",
"setName",
"(",
"'Carousel'",
")",
";",
"$",
"settings",
"->",
"setTitle",
"(",
"_t",
"(",
"'CarouselPage.SINGULARNAME'",
")",
")",
";",
"$",
"fields",
"->",
"addFieldToTab",
"(",
"'Root.Settings'",
",",
"$",
"settings",
")",
";",
"return",
"$",
"fields",
";",
"}"
] | Add carousel related fields to the page settings.
Every CarouselPage instance can have its own settings, that is
different pages can own carousels of different sizes.
@return FieldList | [
"Add",
"carousel",
"related",
"fields",
"to",
"the",
"page",
"settings",
"."
] | train | https://github.com/ntd/silverstripe-carousel/blob/1475f48f404b702b58480eacb2fea01011b30e55/code/CarouselPage.php#L212-L228 |
ntd/silverstripe-carousel | code/CarouselPage.php | CarouselPage.onTranslatableCreate | public function onTranslatableCreate($save)
{
// Chain up the parent method, if it exists
if (method_exists('Page', 'onTranslatableCreate')) {
parent::onTranslatableCreate($save);
}
$master = $this->getTranslation(Translatable::default_locale());
foreach ($master->Images() as $master_image) {
$image = $master_image->duplicate($save);
$this->Images()->add($image);
}
} | php | public function onTranslatableCreate($save)
{
// Chain up the parent method, if it exists
if (method_exists('Page', 'onTranslatableCreate')) {
parent::onTranslatableCreate($save);
}
$master = $this->getTranslation(Translatable::default_locale());
foreach ($master->Images() as $master_image) {
$image = $master_image->duplicate($save);
$this->Images()->add($image);
}
} | [
"public",
"function",
"onTranslatableCreate",
"(",
"$",
"save",
")",
"{",
"// Chain up the parent method, if it exists",
"if",
"(",
"method_exists",
"(",
"'Page'",
",",
"'onTranslatableCreate'",
")",
")",
"{",
"parent",
"::",
"onTranslatableCreate",
"(",
"$",
"save",
")",
";",
"}",
"$",
"master",
"=",
"$",
"this",
"->",
"getTranslation",
"(",
"Translatable",
"::",
"default_locale",
"(",
")",
")",
";",
"foreach",
"(",
"$",
"master",
"->",
"Images",
"(",
")",
"as",
"$",
"master_image",
")",
"{",
"$",
"image",
"=",
"$",
"master_image",
"->",
"duplicate",
"(",
"$",
"save",
")",
";",
"$",
"this",
"->",
"Images",
"(",
")",
"->",
"add",
"(",
"$",
"image",
")",
";",
"}",
"}"
] | Out of the box support for silverstripe/silverstripe-translatable.
Duplicate the image list whenever a new translation is created.
It the translatable module is not used, this will simply be a
dead method.
@param boolean $save Whether the new page should be saved to the
database. | [
"Out",
"of",
"the",
"box",
"support",
"for",
"silverstripe",
"/",
"silverstripe",
"-",
"translatable",
"."
] | train | https://github.com/ntd/silverstripe-carousel/blob/1475f48f404b702b58480eacb2fea01011b30e55/code/CarouselPage.php#L257-L270 |
Eresus/EresusCMS | src/core/Plugin/Controller/Admin/Content.php | Eresus_Plugin_Controller_Admin_Content.getHtml | public function getHtml(Eresus_CMS_Request $request)
{
$action = 'action' . $this->getAction($request);
if (!method_exists($this, $action))
{
throw new Eresus_CMS_Exception_NotFound;
}
return $this->{$action}($request);
} | php | public function getHtml(Eresus_CMS_Request $request)
{
$action = 'action' . $this->getAction($request);
if (!method_exists($this, $action))
{
throw new Eresus_CMS_Exception_NotFound;
}
return $this->{$action}($request);
} | [
"public",
"function",
"getHtml",
"(",
"Eresus_CMS_Request",
"$",
"request",
")",
"{",
"$",
"action",
"=",
"'action'",
".",
"$",
"this",
"->",
"getAction",
"(",
"$",
"request",
")",
";",
"if",
"(",
"!",
"method_exists",
"(",
"$",
"this",
",",
"$",
"action",
")",
")",
"{",
"throw",
"new",
"Eresus_CMS_Exception_NotFound",
";",
"}",
"return",
"$",
"this",
"->",
"{",
"$",
"action",
"}",
"(",
"$",
"request",
")",
";",
"}"
] | Возвращает разметку области контента
Метод вызывает{@link getAction()} чтобы определить запрошенное пользователем действие. К
полученному результату добавляется префикс «action», затем в классе ищется метод с
получившимся названием. Если такого метода нет, вбрасывается исключение. Если метод есть,
он вызывается, а его результат возвращается.
@param Eresus_CMS_Request $request
@throws Eresus_CMS_Exception_NotFound
@return string
@since 3.01 | [
"Возвращает",
"разметку",
"области",
"контента"
] | train | https://github.com/Eresus/EresusCMS/blob/b0afc661105f0a2f65d49abac13956cc93c5188d/src/core/Plugin/Controller/Admin/Content.php#L53-L62 |
Eresus/EresusCMS | src/core/Plugin/Controller/Admin/Content.php | Eresus_Plugin_Controller_Admin_Content.getAction | protected function getAction(Eresus_CMS_Request $request)
{
$args = $request->getMethod() == 'GET' ? $request->query : $request->request;
return $args->has('action') ? $args->get('action') : 'index';
} | php | protected function getAction(Eresus_CMS_Request $request)
{
$args = $request->getMethod() == 'GET' ? $request->query : $request->request;
return $args->has('action') ? $args->get('action') : 'index';
} | [
"protected",
"function",
"getAction",
"(",
"Eresus_CMS_Request",
"$",
"request",
")",
"{",
"$",
"args",
"=",
"$",
"request",
"->",
"getMethod",
"(",
")",
"==",
"'GET'",
"?",
"$",
"request",
"->",
"query",
":",
"$",
"request",
"->",
"request",
";",
"return",
"$",
"args",
"->",
"has",
"(",
"'action'",
")",
"?",
"$",
"args",
"->",
"get",
"(",
"'action'",
")",
":",
"'index'",
";",
"}"
] | Возвращает запрошенное пользователем действие
Действие определяется на основе аргумента «action» из запроса HTTP. Если аргумент не указан,
возвращается действие «index».
@param Eresus_CMS_Request $request
@return string
@since 3.01 | [
"Возвращает",
"запрошенное",
"пользователем",
"действие"
] | train | https://github.com/Eresus/EresusCMS/blob/b0afc661105f0a2f65d49abac13956cc93c5188d/src/core/Plugin/Controller/Admin/Content.php#L75-L79 |
unclecheese/silverstripe-blubber | code/CSSBlubberFile.php | CSSBlubberFile.parse | public function parse() {
$css = new Parser(file_get_contents($this->path));
$this->leanCSS = $css->parse();
$this->blubberCSS = clone $this->leanCSS;
} | php | public function parse() {
$css = new Parser(file_get_contents($this->path));
$this->leanCSS = $css->parse();
$this->blubberCSS = clone $this->leanCSS;
} | [
"public",
"function",
"parse",
"(",
")",
"{",
"$",
"css",
"=",
"new",
"Parser",
"(",
"file_get_contents",
"(",
"$",
"this",
"->",
"path",
")",
")",
";",
"$",
"this",
"->",
"leanCSS",
"=",
"$",
"css",
"->",
"parse",
"(",
")",
";",
"$",
"this",
"->",
"blubberCSS",
"=",
"clone",
"$",
"this",
"->",
"leanCSS",
";",
"}"
] | Begins parsing the CSS file | [
"Begins",
"parsing",
"the",
"CSS",
"file"
] | train | https://github.com/unclecheese/silverstripe-blubber/blob/f2549bd5eddeb0ca0303a3c09be4a8136fcc6661/code/CSSBlubberFile.php#L44-L49 |
unclecheese/silverstripe-blubber | code/CSSBlubberFile.php | CSSBlubberFile.saveBlubber | public function saveBlubber() {
$fh = fopen($this->getDirname().'/'.$this->getBlubberName(),'w');
fwrite($fh, $this->blubberCSS->render());
} | php | public function saveBlubber() {
$fh = fopen($this->getDirname().'/'.$this->getBlubberName(),'w');
fwrite($fh, $this->blubberCSS->render());
} | [
"public",
"function",
"saveBlubber",
"(",
")",
"{",
"$",
"fh",
"=",
"fopen",
"(",
"$",
"this",
"->",
"getDirname",
"(",
")",
".",
"'/'",
".",
"$",
"this",
"->",
"getBlubberName",
"(",
")",
",",
"'w'",
")",
";",
"fwrite",
"(",
"$",
"fh",
",",
"$",
"this",
"->",
"blubberCSS",
"->",
"render",
"(",
")",
")",
";",
"}"
] | Saves the "blubber" CSS to the filesystem | [
"Saves",
"the",
"blubber",
"CSS",
"to",
"the",
"filesystem"
] | train | https://github.com/unclecheese/silverstripe-blubber/blob/f2549bd5eddeb0ca0303a3c09be4a8136fcc6661/code/CSSBlubberFile.php#L102-L105 |
unclecheese/silverstripe-blubber | code/CSSBlubberFile.php | CSSBlubberFile.saveLean | public function saveLean() {
$fh = fopen($this->getDirname().'/'.$this->getLeanName(),'w');
fwrite($fh, $this->leanCSS->render());
} | php | public function saveLean() {
$fh = fopen($this->getDirname().'/'.$this->getLeanName(),'w');
fwrite($fh, $this->leanCSS->render());
} | [
"public",
"function",
"saveLean",
"(",
")",
"{",
"$",
"fh",
"=",
"fopen",
"(",
"$",
"this",
"->",
"getDirname",
"(",
")",
".",
"'/'",
".",
"$",
"this",
"->",
"getLeanName",
"(",
")",
",",
"'w'",
")",
";",
"fwrite",
"(",
"$",
"fh",
",",
"$",
"this",
"->",
"leanCSS",
"->",
"render",
"(",
")",
")",
";",
"}"
] | Saves the "lean" CSS to the filesystem | [
"Saves",
"the",
"lean",
"CSS",
"to",
"the",
"filesystem"
] | train | https://github.com/unclecheese/silverstripe-blubber/blob/f2549bd5eddeb0ca0303a3c09be4a8136fcc6661/code/CSSBlubberFile.php#L110-L113 |
Eresus/EresusCMS | src/core/Content/Helper/Replace.php | Eresus_Content_Helper_Replace.replace | public function replace($text)
{
preg_match_all($this->pattern, $text, $matches, PREG_SET_ORDER | PREG_OFFSET_CAPTURE);
$delta = 0;
foreach ($matches as $match)
{
$stringsOnly = array();
foreach ($match as $info)
{
$stringsOnly []= $info[0];
}
$replace = call_user_func($this->callback, $stringsOnly);
if (false === $replace || null === $replace)
{
continue;
}
$text = substr_replace($text, $replace, $match[0][1] + $delta, strlen($match[0][0]));
$delta += strlen($replace) - strlen($match[0][0]);
}
return $text;
} | php | public function replace($text)
{
preg_match_all($this->pattern, $text, $matches, PREG_SET_ORDER | PREG_OFFSET_CAPTURE);
$delta = 0;
foreach ($matches as $match)
{
$stringsOnly = array();
foreach ($match as $info)
{
$stringsOnly []= $info[0];
}
$replace = call_user_func($this->callback, $stringsOnly);
if (false === $replace || null === $replace)
{
continue;
}
$text = substr_replace($text, $replace, $match[0][1] + $delta, strlen($match[0][0]));
$delta += strlen($replace) - strlen($match[0][0]);
}
return $text;
} | [
"public",
"function",
"replace",
"(",
"$",
"text",
")",
"{",
"preg_match_all",
"(",
"$",
"this",
"->",
"pattern",
",",
"$",
"text",
",",
"$",
"matches",
",",
"PREG_SET_ORDER",
"|",
"PREG_OFFSET_CAPTURE",
")",
";",
"$",
"delta",
"=",
"0",
";",
"foreach",
"(",
"$",
"matches",
"as",
"$",
"match",
")",
"{",
"$",
"stringsOnly",
"=",
"array",
"(",
")",
";",
"foreach",
"(",
"$",
"match",
"as",
"$",
"info",
")",
"{",
"$",
"stringsOnly",
"[",
"]",
"=",
"$",
"info",
"[",
"0",
"]",
";",
"}",
"$",
"replace",
"=",
"call_user_func",
"(",
"$",
"this",
"->",
"callback",
",",
"$",
"stringsOnly",
")",
";",
"if",
"(",
"false",
"===",
"$",
"replace",
"||",
"null",
"===",
"$",
"replace",
")",
"{",
"continue",
";",
"}",
"$",
"text",
"=",
"substr_replace",
"(",
"$",
"text",
",",
"$",
"replace",
",",
"$",
"match",
"[",
"0",
"]",
"[",
"1",
"]",
"+",
"$",
"delta",
",",
"strlen",
"(",
"$",
"match",
"[",
"0",
"]",
"[",
"0",
"]",
")",
")",
";",
"$",
"delta",
"+=",
"strlen",
"(",
"$",
"replace",
")",
"-",
"strlen",
"(",
"$",
"match",
"[",
"0",
"]",
"[",
"0",
"]",
")",
";",
"}",
"return",
"$",
"text",
";",
"}"
] | Производит замены в переданном тексте и возвращает изменённый текст
@param string $text
@return string
@since 3.01 | [
"Производит",
"замены",
"в",
"переданном",
"тексте",
"и",
"возвращает",
"изменённый",
"текст"
] | train | https://github.com/Eresus/EresusCMS/blob/b0afc661105f0a2f65d49abac13956cc93c5188d/src/core/Content/Helper/Replace.php#L89-L111 |
antaresproject/notifications | src/Console/NotificationTypesCommand.php | NotificationTypesCommand.fire | public function fire()
{
$types = NotificationTypes::all();
$flatten = [];
foreach ($types as $type) {
$flatten[] = ['<info>' . $type->id . '</info>', '<fg=red>' . $type->name . '</fg=red>', '<info>' . $type->title . '</info>'];
}
if (count($flatten) > 0) {
$this->table(['Id', 'Name', 'Title'], $flatten);
} else {
$this->error('No types found');
}
} | php | public function fire()
{
$types = NotificationTypes::all();
$flatten = [];
foreach ($types as $type) {
$flatten[] = ['<info>' . $type->id . '</info>', '<fg=red>' . $type->name . '</fg=red>', '<info>' . $type->title . '</info>'];
}
if (count($flatten) > 0) {
$this->table(['Id', 'Name', 'Title'], $flatten);
} else {
$this->error('No types found');
}
} | [
"public",
"function",
"fire",
"(",
")",
"{",
"$",
"types",
"=",
"NotificationTypes",
"::",
"all",
"(",
")",
";",
"$",
"flatten",
"=",
"[",
"]",
";",
"foreach",
"(",
"$",
"types",
"as",
"$",
"type",
")",
"{",
"$",
"flatten",
"[",
"]",
"=",
"[",
"'<info>'",
".",
"$",
"type",
"->",
"id",
".",
"'</info>'",
",",
"'<fg=red>'",
".",
"$",
"type",
"->",
"name",
".",
"'</fg=red>'",
",",
"'<info>'",
".",
"$",
"type",
"->",
"title",
".",
"'</info>'",
"]",
";",
"}",
"if",
"(",
"count",
"(",
"$",
"flatten",
")",
">",
"0",
")",
"{",
"$",
"this",
"->",
"table",
"(",
"[",
"'Id'",
",",
"'Name'",
",",
"'Title'",
"]",
",",
"$",
"flatten",
")",
";",
"}",
"else",
"{",
"$",
"this",
"->",
"error",
"(",
"'No types found'",
")",
";",
"}",
"}"
] | Execute the console command.
@return void | [
"Execute",
"the",
"console",
"command",
"."
] | train | https://github.com/antaresproject/notifications/blob/60de743477b7e9cbb51de66da5fd9461adc9dd8a/src/Console/NotificationTypesCommand.php#L49-L62 |
oroinc/OroLayoutComponent | Extension/Theme/DataProvider/ThemeProvider.php | ThemeProvider.getStylesOutput | public function getStylesOutput($themeName, $sectionName = 'styles')
{
$assets = $this->getTheme($themeName)->getConfigByKey('assets');
if ($assets && array_key_exists($sectionName, $assets)) {
return array_key_exists('output', $assets[$sectionName]) ? $assets[$sectionName]['output'] : null;
}
$parentTheme = $this->getTheme($themeName)->getParentTheme();
if ($parentTheme) {
return $this->getStylesOutput($parentTheme, $sectionName);
}
return null;
} | php | public function getStylesOutput($themeName, $sectionName = 'styles')
{
$assets = $this->getTheme($themeName)->getConfigByKey('assets');
if ($assets && array_key_exists($sectionName, $assets)) {
return array_key_exists('output', $assets[$sectionName]) ? $assets[$sectionName]['output'] : null;
}
$parentTheme = $this->getTheme($themeName)->getParentTheme();
if ($parentTheme) {
return $this->getStylesOutput($parentTheme, $sectionName);
}
return null;
} | [
"public",
"function",
"getStylesOutput",
"(",
"$",
"themeName",
",",
"$",
"sectionName",
"=",
"'styles'",
")",
"{",
"$",
"assets",
"=",
"$",
"this",
"->",
"getTheme",
"(",
"$",
"themeName",
")",
"->",
"getConfigByKey",
"(",
"'assets'",
")",
";",
"if",
"(",
"$",
"assets",
"&&",
"array_key_exists",
"(",
"$",
"sectionName",
",",
"$",
"assets",
")",
")",
"{",
"return",
"array_key_exists",
"(",
"'output'",
",",
"$",
"assets",
"[",
"$",
"sectionName",
"]",
")",
"?",
"$",
"assets",
"[",
"$",
"sectionName",
"]",
"[",
"'output'",
"]",
":",
"null",
";",
"}",
"$",
"parentTheme",
"=",
"$",
"this",
"->",
"getTheme",
"(",
"$",
"themeName",
")",
"->",
"getParentTheme",
"(",
")",
";",
"if",
"(",
"$",
"parentTheme",
")",
"{",
"return",
"$",
"this",
"->",
"getStylesOutput",
"(",
"$",
"parentTheme",
",",
"$",
"sectionName",
")",
";",
"}",
"return",
"null",
";",
"}"
] | @param string $themeName
@param string $sectionName
@return string|null | [
"@param",
"string",
"$themeName",
"@param",
"string",
"$sectionName"
] | train | https://github.com/oroinc/OroLayoutComponent/blob/682a96672393d81c63728e47c4a4c3618c515be0/Extension/Theme/DataProvider/ThemeProvider.php#L43-L56 |
oroinc/OroLayoutComponent | Extension/Theme/DataProvider/ThemeProvider.php | ThemeProvider.getTheme | private function getTheme($themeName)
{
if (!array_key_exists($themeName, $this->themes)) {
$this->themes[$themeName] = $this->themeManager->getTheme($themeName);
}
return $this->themes[$themeName];
} | php | private function getTheme($themeName)
{
if (!array_key_exists($themeName, $this->themes)) {
$this->themes[$themeName] = $this->themeManager->getTheme($themeName);
}
return $this->themes[$themeName];
} | [
"private",
"function",
"getTheme",
"(",
"$",
"themeName",
")",
"{",
"if",
"(",
"!",
"array_key_exists",
"(",
"$",
"themeName",
",",
"$",
"this",
"->",
"themes",
")",
")",
"{",
"$",
"this",
"->",
"themes",
"[",
"$",
"themeName",
"]",
"=",
"$",
"this",
"->",
"themeManager",
"->",
"getTheme",
"(",
"$",
"themeName",
")",
";",
"}",
"return",
"$",
"this",
"->",
"themes",
"[",
"$",
"themeName",
"]",
";",
"}"
] | @param string $themeName
@return Theme | [
"@param",
"string",
"$themeName"
] | train | https://github.com/oroinc/OroLayoutComponent/blob/682a96672393d81c63728e47c4a4c3618c515be0/Extension/Theme/DataProvider/ThemeProvider.php#L63-L70 |
mothership-ec/composer | src/Composer/Console/Application.php | Application.doRun | public function doRun(InputInterface $input, OutputInterface $output)
{
$this->io = new ConsoleIO($input, $output, $this->getHelperSet());
ErrorHandler::register($this->io);
if (PHP_VERSION_ID < 50302) {
$this->getIO()->writeError('<warning>Composer only officially supports PHP 5.3.2 and above, you will most likely encounter problems with your PHP '.PHP_VERSION.', upgrading is strongly recommended.</warning>');
}
if (defined('COMPOSER_DEV_WARNING_TIME')) {
$commandName = '';
if ($name = $this->getCommandName($input)) {
try {
$commandName = $this->find($name)->getName();
} catch (\InvalidArgumentException $e) {
}
}
if ($commandName !== 'self-update' && $commandName !== 'selfupdate') {
if (time() > COMPOSER_DEV_WARNING_TIME) {
$this->getIO()->writeError(sprintf('<warning>Warning: This development build of composer is over 60 days old. It is recommended to update it by running "%s self-update" to get the latest version.</warning>', $_SERVER['PHP_SELF']));
}
}
}
if (getenv('COMPOSER_NO_INTERACTION')) {
$input->setInteractive(false);
}
// switch working dir
if ($newWorkDir = $this->getNewWorkingDir($input)) {
$oldWorkingDir = getcwd();
chdir($newWorkDir);
if ($this->getIO()->isDebug() >= 4) {
$this->getIO()->writeError('Changed CWD to ' . getcwd());
}
}
// add non-standard scripts as own commands
$file = Factory::getComposerFile();
if (is_file($file) && is_readable($file) && is_array($composer = json_decode(file_get_contents($file), true))) {
if (isset($composer['scripts']) && is_array($composer['scripts'])) {
foreach ($composer['scripts'] as $script => $dummy) {
if (!defined('Composer\Script\ScriptEvents::'.str_replace('-', '_', strtoupper($script)))) {
if ($this->has($script)) {
$this->getIO()->writeError('<warning>A script named '.$script.' would override a native Composer function and has been skipped</warning>');
} else {
$this->add(new Command\ScriptAliasCommand($script));
}
}
}
}
}
if ($input->hasParameterOption('--profile')) {
$startTime = microtime(true);
$this->io->enableDebugging($startTime);
}
$result = parent::doRun($input, $output);
if (isset($oldWorkingDir)) {
chdir($oldWorkingDir);
}
if (isset($startTime)) {
$this->getIO()->writeError('<info>Memory usage: '.round(memory_get_usage() / 1024 / 1024, 2).'MB (peak: '.round(memory_get_peak_usage() / 1024 / 1024, 2).'MB), time: '.round(microtime(true) - $startTime, 2).'s');
}
return $result;
} | php | public function doRun(InputInterface $input, OutputInterface $output)
{
$this->io = new ConsoleIO($input, $output, $this->getHelperSet());
ErrorHandler::register($this->io);
if (PHP_VERSION_ID < 50302) {
$this->getIO()->writeError('<warning>Composer only officially supports PHP 5.3.2 and above, you will most likely encounter problems with your PHP '.PHP_VERSION.', upgrading is strongly recommended.</warning>');
}
if (defined('COMPOSER_DEV_WARNING_TIME')) {
$commandName = '';
if ($name = $this->getCommandName($input)) {
try {
$commandName = $this->find($name)->getName();
} catch (\InvalidArgumentException $e) {
}
}
if ($commandName !== 'self-update' && $commandName !== 'selfupdate') {
if (time() > COMPOSER_DEV_WARNING_TIME) {
$this->getIO()->writeError(sprintf('<warning>Warning: This development build of composer is over 60 days old. It is recommended to update it by running "%s self-update" to get the latest version.</warning>', $_SERVER['PHP_SELF']));
}
}
}
if (getenv('COMPOSER_NO_INTERACTION')) {
$input->setInteractive(false);
}
// switch working dir
if ($newWorkDir = $this->getNewWorkingDir($input)) {
$oldWorkingDir = getcwd();
chdir($newWorkDir);
if ($this->getIO()->isDebug() >= 4) {
$this->getIO()->writeError('Changed CWD to ' . getcwd());
}
}
// add non-standard scripts as own commands
$file = Factory::getComposerFile();
if (is_file($file) && is_readable($file) && is_array($composer = json_decode(file_get_contents($file), true))) {
if (isset($composer['scripts']) && is_array($composer['scripts'])) {
foreach ($composer['scripts'] as $script => $dummy) {
if (!defined('Composer\Script\ScriptEvents::'.str_replace('-', '_', strtoupper($script)))) {
if ($this->has($script)) {
$this->getIO()->writeError('<warning>A script named '.$script.' would override a native Composer function and has been skipped</warning>');
} else {
$this->add(new Command\ScriptAliasCommand($script));
}
}
}
}
}
if ($input->hasParameterOption('--profile')) {
$startTime = microtime(true);
$this->io->enableDebugging($startTime);
}
$result = parent::doRun($input, $output);
if (isset($oldWorkingDir)) {
chdir($oldWorkingDir);
}
if (isset($startTime)) {
$this->getIO()->writeError('<info>Memory usage: '.round(memory_get_usage() / 1024 / 1024, 2).'MB (peak: '.round(memory_get_peak_usage() / 1024 / 1024, 2).'MB), time: '.round(microtime(true) - $startTime, 2).'s');
}
return $result;
} | [
"public",
"function",
"doRun",
"(",
"InputInterface",
"$",
"input",
",",
"OutputInterface",
"$",
"output",
")",
"{",
"$",
"this",
"->",
"io",
"=",
"new",
"ConsoleIO",
"(",
"$",
"input",
",",
"$",
"output",
",",
"$",
"this",
"->",
"getHelperSet",
"(",
")",
")",
";",
"ErrorHandler",
"::",
"register",
"(",
"$",
"this",
"->",
"io",
")",
";",
"if",
"(",
"PHP_VERSION_ID",
"<",
"50302",
")",
"{",
"$",
"this",
"->",
"getIO",
"(",
")",
"->",
"writeError",
"(",
"'<warning>Composer only officially supports PHP 5.3.2 and above, you will most likely encounter problems with your PHP '",
".",
"PHP_VERSION",
".",
"', upgrading is strongly recommended.</warning>'",
")",
";",
"}",
"if",
"(",
"defined",
"(",
"'COMPOSER_DEV_WARNING_TIME'",
")",
")",
"{",
"$",
"commandName",
"=",
"''",
";",
"if",
"(",
"$",
"name",
"=",
"$",
"this",
"->",
"getCommandName",
"(",
"$",
"input",
")",
")",
"{",
"try",
"{",
"$",
"commandName",
"=",
"$",
"this",
"->",
"find",
"(",
"$",
"name",
")",
"->",
"getName",
"(",
")",
";",
"}",
"catch",
"(",
"\\",
"InvalidArgumentException",
"$",
"e",
")",
"{",
"}",
"}",
"if",
"(",
"$",
"commandName",
"!==",
"'self-update'",
"&&",
"$",
"commandName",
"!==",
"'selfupdate'",
")",
"{",
"if",
"(",
"time",
"(",
")",
">",
"COMPOSER_DEV_WARNING_TIME",
")",
"{",
"$",
"this",
"->",
"getIO",
"(",
")",
"->",
"writeError",
"(",
"sprintf",
"(",
"'<warning>Warning: This development build of composer is over 60 days old. It is recommended to update it by running \"%s self-update\" to get the latest version.</warning>'",
",",
"$",
"_SERVER",
"[",
"'PHP_SELF'",
"]",
")",
")",
";",
"}",
"}",
"}",
"if",
"(",
"getenv",
"(",
"'COMPOSER_NO_INTERACTION'",
")",
")",
"{",
"$",
"input",
"->",
"setInteractive",
"(",
"false",
")",
";",
"}",
"// switch working dir",
"if",
"(",
"$",
"newWorkDir",
"=",
"$",
"this",
"->",
"getNewWorkingDir",
"(",
"$",
"input",
")",
")",
"{",
"$",
"oldWorkingDir",
"=",
"getcwd",
"(",
")",
";",
"chdir",
"(",
"$",
"newWorkDir",
")",
";",
"if",
"(",
"$",
"this",
"->",
"getIO",
"(",
")",
"->",
"isDebug",
"(",
")",
">=",
"4",
")",
"{",
"$",
"this",
"->",
"getIO",
"(",
")",
"->",
"writeError",
"(",
"'Changed CWD to '",
".",
"getcwd",
"(",
")",
")",
";",
"}",
"}",
"// add non-standard scripts as own commands",
"$",
"file",
"=",
"Factory",
"::",
"getComposerFile",
"(",
")",
";",
"if",
"(",
"is_file",
"(",
"$",
"file",
")",
"&&",
"is_readable",
"(",
"$",
"file",
")",
"&&",
"is_array",
"(",
"$",
"composer",
"=",
"json_decode",
"(",
"file_get_contents",
"(",
"$",
"file",
")",
",",
"true",
")",
")",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"composer",
"[",
"'scripts'",
"]",
")",
"&&",
"is_array",
"(",
"$",
"composer",
"[",
"'scripts'",
"]",
")",
")",
"{",
"foreach",
"(",
"$",
"composer",
"[",
"'scripts'",
"]",
"as",
"$",
"script",
"=>",
"$",
"dummy",
")",
"{",
"if",
"(",
"!",
"defined",
"(",
"'Composer\\Script\\ScriptEvents::'",
".",
"str_replace",
"(",
"'-'",
",",
"'_'",
",",
"strtoupper",
"(",
"$",
"script",
")",
")",
")",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"has",
"(",
"$",
"script",
")",
")",
"{",
"$",
"this",
"->",
"getIO",
"(",
")",
"->",
"writeError",
"(",
"'<warning>A script named '",
".",
"$",
"script",
".",
"' would override a native Composer function and has been skipped</warning>'",
")",
";",
"}",
"else",
"{",
"$",
"this",
"->",
"add",
"(",
"new",
"Command",
"\\",
"ScriptAliasCommand",
"(",
"$",
"script",
")",
")",
";",
"}",
"}",
"}",
"}",
"}",
"if",
"(",
"$",
"input",
"->",
"hasParameterOption",
"(",
"'--profile'",
")",
")",
"{",
"$",
"startTime",
"=",
"microtime",
"(",
"true",
")",
";",
"$",
"this",
"->",
"io",
"->",
"enableDebugging",
"(",
"$",
"startTime",
")",
";",
"}",
"$",
"result",
"=",
"parent",
"::",
"doRun",
"(",
"$",
"input",
",",
"$",
"output",
")",
";",
"if",
"(",
"isset",
"(",
"$",
"oldWorkingDir",
")",
")",
"{",
"chdir",
"(",
"$",
"oldWorkingDir",
")",
";",
"}",
"if",
"(",
"isset",
"(",
"$",
"startTime",
")",
")",
"{",
"$",
"this",
"->",
"getIO",
"(",
")",
"->",
"writeError",
"(",
"'<info>Memory usage: '",
".",
"round",
"(",
"memory_get_usage",
"(",
")",
"/",
"1024",
"/",
"1024",
",",
"2",
")",
".",
"'MB (peak: '",
".",
"round",
"(",
"memory_get_peak_usage",
"(",
")",
"/",
"1024",
"/",
"1024",
",",
"2",
")",
".",
"'MB), time: '",
".",
"round",
"(",
"microtime",
"(",
"true",
")",
"-",
"$",
"startTime",
",",
"2",
")",
".",
"'s'",
")",
";",
"}",
"return",
"$",
"result",
";",
"}"
] | {@inheritDoc} | [
"{"
] | train | https://github.com/mothership-ec/composer/blob/fa6ad031a939d8d33b211e428fdbdd28cfce238c/src/Composer/Console/Application.php#L88-L157 |
mothership-ec/composer | src/Composer/Console/Application.php | Application.renderException | public function renderException($exception, $output)
{
try {
$composer = $this->getComposer(false, true);
if ($composer) {
$config = $composer->getConfig();
$minSpaceFree = 1024*1024;
if ((($df = @disk_free_space($dir = $config->get('home'))) !== false && $df < $minSpaceFree)
|| (($df = @disk_free_space($dir = $config->get('vendor-dir'))) !== false && $df < $minSpaceFree)
|| (($df = @disk_free_space($dir = sys_get_temp_dir())) !== false && $df < $minSpaceFree)
) {
$this->getIO()->writeError('<error>The disk hosting '.$dir.' is full, this may be the cause of the following exception</error>');
}
}
} catch (\Exception $e) {
}
if (defined('PHP_WINDOWS_VERSION_BUILD') && false !== strpos($exception->getMessage(), 'The system cannot find the path specified')) {
$this->getIO()->writeError('<error>The following exception may be caused by a stale entry in your cmd.exe AutoRun</error>');
$this->getIO()->writeError('<error>Check https://getcomposer.org/doc/articles/troubleshooting.md#-the-system-cannot-find-the-path-specified-windows- for details</error>');
}
if (false !== strpos($exception->getMessage(), 'fork failed - Cannot allocate memory')) {
$this->getIO()->writeError('<error>The following exception is caused by a lack of memory and not having swap configured</error>');
$this->getIO()->writeError('<error>Check https://getcomposer.org/doc/articles/troubleshooting.md#proc-open-fork-failed-errors for details</error>');
}
if ($output instanceof ConsoleOutputInterface) {
parent::renderException($exception, $output->getErrorOutput());
} else {
parent::renderException($exception, $output);
}
} | php | public function renderException($exception, $output)
{
try {
$composer = $this->getComposer(false, true);
if ($composer) {
$config = $composer->getConfig();
$minSpaceFree = 1024*1024;
if ((($df = @disk_free_space($dir = $config->get('home'))) !== false && $df < $minSpaceFree)
|| (($df = @disk_free_space($dir = $config->get('vendor-dir'))) !== false && $df < $minSpaceFree)
|| (($df = @disk_free_space($dir = sys_get_temp_dir())) !== false && $df < $minSpaceFree)
) {
$this->getIO()->writeError('<error>The disk hosting '.$dir.' is full, this may be the cause of the following exception</error>');
}
}
} catch (\Exception $e) {
}
if (defined('PHP_WINDOWS_VERSION_BUILD') && false !== strpos($exception->getMessage(), 'The system cannot find the path specified')) {
$this->getIO()->writeError('<error>The following exception may be caused by a stale entry in your cmd.exe AutoRun</error>');
$this->getIO()->writeError('<error>Check https://getcomposer.org/doc/articles/troubleshooting.md#-the-system-cannot-find-the-path-specified-windows- for details</error>');
}
if (false !== strpos($exception->getMessage(), 'fork failed - Cannot allocate memory')) {
$this->getIO()->writeError('<error>The following exception is caused by a lack of memory and not having swap configured</error>');
$this->getIO()->writeError('<error>Check https://getcomposer.org/doc/articles/troubleshooting.md#proc-open-fork-failed-errors for details</error>');
}
if ($output instanceof ConsoleOutputInterface) {
parent::renderException($exception, $output->getErrorOutput());
} else {
parent::renderException($exception, $output);
}
} | [
"public",
"function",
"renderException",
"(",
"$",
"exception",
",",
"$",
"output",
")",
"{",
"try",
"{",
"$",
"composer",
"=",
"$",
"this",
"->",
"getComposer",
"(",
"false",
",",
"true",
")",
";",
"if",
"(",
"$",
"composer",
")",
"{",
"$",
"config",
"=",
"$",
"composer",
"->",
"getConfig",
"(",
")",
";",
"$",
"minSpaceFree",
"=",
"1024",
"*",
"1024",
";",
"if",
"(",
"(",
"(",
"$",
"df",
"=",
"@",
"disk_free_space",
"(",
"$",
"dir",
"=",
"$",
"config",
"->",
"get",
"(",
"'home'",
")",
")",
")",
"!==",
"false",
"&&",
"$",
"df",
"<",
"$",
"minSpaceFree",
")",
"||",
"(",
"(",
"$",
"df",
"=",
"@",
"disk_free_space",
"(",
"$",
"dir",
"=",
"$",
"config",
"->",
"get",
"(",
"'vendor-dir'",
")",
")",
")",
"!==",
"false",
"&&",
"$",
"df",
"<",
"$",
"minSpaceFree",
")",
"||",
"(",
"(",
"$",
"df",
"=",
"@",
"disk_free_space",
"(",
"$",
"dir",
"=",
"sys_get_temp_dir",
"(",
")",
")",
")",
"!==",
"false",
"&&",
"$",
"df",
"<",
"$",
"minSpaceFree",
")",
")",
"{",
"$",
"this",
"->",
"getIO",
"(",
")",
"->",
"writeError",
"(",
"'<error>The disk hosting '",
".",
"$",
"dir",
".",
"' is full, this may be the cause of the following exception</error>'",
")",
";",
"}",
"}",
"}",
"catch",
"(",
"\\",
"Exception",
"$",
"e",
")",
"{",
"}",
"if",
"(",
"defined",
"(",
"'PHP_WINDOWS_VERSION_BUILD'",
")",
"&&",
"false",
"!==",
"strpos",
"(",
"$",
"exception",
"->",
"getMessage",
"(",
")",
",",
"'The system cannot find the path specified'",
")",
")",
"{",
"$",
"this",
"->",
"getIO",
"(",
")",
"->",
"writeError",
"(",
"'<error>The following exception may be caused by a stale entry in your cmd.exe AutoRun</error>'",
")",
";",
"$",
"this",
"->",
"getIO",
"(",
")",
"->",
"writeError",
"(",
"'<error>Check https://getcomposer.org/doc/articles/troubleshooting.md#-the-system-cannot-find-the-path-specified-windows- for details</error>'",
")",
";",
"}",
"if",
"(",
"false",
"!==",
"strpos",
"(",
"$",
"exception",
"->",
"getMessage",
"(",
")",
",",
"'fork failed - Cannot allocate memory'",
")",
")",
"{",
"$",
"this",
"->",
"getIO",
"(",
")",
"->",
"writeError",
"(",
"'<error>The following exception is caused by a lack of memory and not having swap configured</error>'",
")",
";",
"$",
"this",
"->",
"getIO",
"(",
")",
"->",
"writeError",
"(",
"'<error>Check https://getcomposer.org/doc/articles/troubleshooting.md#proc-open-fork-failed-errors for details</error>'",
")",
";",
"}",
"if",
"(",
"$",
"output",
"instanceof",
"ConsoleOutputInterface",
")",
"{",
"parent",
"::",
"renderException",
"(",
"$",
"exception",
",",
"$",
"output",
"->",
"getErrorOutput",
"(",
")",
")",
";",
"}",
"else",
"{",
"parent",
"::",
"renderException",
"(",
"$",
"exception",
",",
"$",
"output",
")",
";",
"}",
"}"
] | {@inheritDoc} | [
"{"
] | train | https://github.com/mothership-ec/composer/blob/fa6ad031a939d8d33b211e428fdbdd28cfce238c/src/Composer/Console/Application.php#L177-L210 |
mothership-ec/composer | src/Composer/Console/Application.php | Application.getDefaultCommands | protected function getDefaultCommands()
{
$commands = parent::getDefaultCommands();
$commands[] = new Command\AboutCommand();
$commands[] = new Command\ConfigCommand();
$commands[] = new Command\DependsCommand();
$commands[] = new Command\InitCommand();
$commands[] = new Command\InstallCommand();
$commands[] = new Command\CreateProjectCommand();
$commands[] = new Command\UpdateCommand();
$commands[] = new Command\SearchCommand();
$commands[] = new Command\ValidateCommand();
$commands[] = new Command\ShowCommand();
$commands[] = new Command\RequireCommand();
$commands[] = new Command\DumpAutoloadCommand();
$commands[] = new Command\StatusCommand();
$commands[] = new Command\ArchiveCommand();
$commands[] = new Command\DiagnoseCommand();
$commands[] = new Command\RunScriptCommand();
$commands[] = new Command\LicensesCommand();
$commands[] = new Command\GlobalCommand();
$commands[] = new Command\ClearCacheCommand();
$commands[] = new Command\RemoveCommand();
$commands[] = new Command\HomeCommand();
if ('phar:' === substr(__FILE__, 0, 5)) {
$commands[] = new Command\SelfUpdateCommand();
}
return $commands;
} | php | protected function getDefaultCommands()
{
$commands = parent::getDefaultCommands();
$commands[] = new Command\AboutCommand();
$commands[] = new Command\ConfigCommand();
$commands[] = new Command\DependsCommand();
$commands[] = new Command\InitCommand();
$commands[] = new Command\InstallCommand();
$commands[] = new Command\CreateProjectCommand();
$commands[] = new Command\UpdateCommand();
$commands[] = new Command\SearchCommand();
$commands[] = new Command\ValidateCommand();
$commands[] = new Command\ShowCommand();
$commands[] = new Command\RequireCommand();
$commands[] = new Command\DumpAutoloadCommand();
$commands[] = new Command\StatusCommand();
$commands[] = new Command\ArchiveCommand();
$commands[] = new Command\DiagnoseCommand();
$commands[] = new Command\RunScriptCommand();
$commands[] = new Command\LicensesCommand();
$commands[] = new Command\GlobalCommand();
$commands[] = new Command\ClearCacheCommand();
$commands[] = new Command\RemoveCommand();
$commands[] = new Command\HomeCommand();
if ('phar:' === substr(__FILE__, 0, 5)) {
$commands[] = new Command\SelfUpdateCommand();
}
return $commands;
} | [
"protected",
"function",
"getDefaultCommands",
"(",
")",
"{",
"$",
"commands",
"=",
"parent",
"::",
"getDefaultCommands",
"(",
")",
";",
"$",
"commands",
"[",
"]",
"=",
"new",
"Command",
"\\",
"AboutCommand",
"(",
")",
";",
"$",
"commands",
"[",
"]",
"=",
"new",
"Command",
"\\",
"ConfigCommand",
"(",
")",
";",
"$",
"commands",
"[",
"]",
"=",
"new",
"Command",
"\\",
"DependsCommand",
"(",
")",
";",
"$",
"commands",
"[",
"]",
"=",
"new",
"Command",
"\\",
"InitCommand",
"(",
")",
";",
"$",
"commands",
"[",
"]",
"=",
"new",
"Command",
"\\",
"InstallCommand",
"(",
")",
";",
"$",
"commands",
"[",
"]",
"=",
"new",
"Command",
"\\",
"CreateProjectCommand",
"(",
")",
";",
"$",
"commands",
"[",
"]",
"=",
"new",
"Command",
"\\",
"UpdateCommand",
"(",
")",
";",
"$",
"commands",
"[",
"]",
"=",
"new",
"Command",
"\\",
"SearchCommand",
"(",
")",
";",
"$",
"commands",
"[",
"]",
"=",
"new",
"Command",
"\\",
"ValidateCommand",
"(",
")",
";",
"$",
"commands",
"[",
"]",
"=",
"new",
"Command",
"\\",
"ShowCommand",
"(",
")",
";",
"$",
"commands",
"[",
"]",
"=",
"new",
"Command",
"\\",
"RequireCommand",
"(",
")",
";",
"$",
"commands",
"[",
"]",
"=",
"new",
"Command",
"\\",
"DumpAutoloadCommand",
"(",
")",
";",
"$",
"commands",
"[",
"]",
"=",
"new",
"Command",
"\\",
"StatusCommand",
"(",
")",
";",
"$",
"commands",
"[",
"]",
"=",
"new",
"Command",
"\\",
"ArchiveCommand",
"(",
")",
";",
"$",
"commands",
"[",
"]",
"=",
"new",
"Command",
"\\",
"DiagnoseCommand",
"(",
")",
";",
"$",
"commands",
"[",
"]",
"=",
"new",
"Command",
"\\",
"RunScriptCommand",
"(",
")",
";",
"$",
"commands",
"[",
"]",
"=",
"new",
"Command",
"\\",
"LicensesCommand",
"(",
")",
";",
"$",
"commands",
"[",
"]",
"=",
"new",
"Command",
"\\",
"GlobalCommand",
"(",
")",
";",
"$",
"commands",
"[",
"]",
"=",
"new",
"Command",
"\\",
"ClearCacheCommand",
"(",
")",
";",
"$",
"commands",
"[",
"]",
"=",
"new",
"Command",
"\\",
"RemoveCommand",
"(",
")",
";",
"$",
"commands",
"[",
"]",
"=",
"new",
"Command",
"\\",
"HomeCommand",
"(",
")",
";",
"if",
"(",
"'phar:'",
"===",
"substr",
"(",
"__FILE__",
",",
"0",
",",
"5",
")",
")",
"{",
"$",
"commands",
"[",
"]",
"=",
"new",
"Command",
"\\",
"SelfUpdateCommand",
"(",
")",
";",
"}",
"return",
"$",
"commands",
";",
"}"
] | Initializes all the composer commands | [
"Initializes",
"all",
"the",
"composer",
"commands"
] | train | https://github.com/mothership-ec/composer/blob/fa6ad031a939d8d33b211e428fdbdd28cfce238c/src/Composer/Console/Application.php#L262-L292 |
mothership-ec/composer | src/Composer/Console/Application.php | Application.getLongVersion | public function getLongVersion()
{
if (Composer::BRANCH_ALIAS_VERSION) {
return sprintf(
'<info>%s</info> version <comment>%s (%s)</comment> %s',
$this->getName(),
Composer::BRANCH_ALIAS_VERSION,
$this->getVersion(),
Composer::RELEASE_DATE
);
}
return parent::getLongVersion() . ' ' . Composer::RELEASE_DATE;
} | php | public function getLongVersion()
{
if (Composer::BRANCH_ALIAS_VERSION) {
return sprintf(
'<info>%s</info> version <comment>%s (%s)</comment> %s',
$this->getName(),
Composer::BRANCH_ALIAS_VERSION,
$this->getVersion(),
Composer::RELEASE_DATE
);
}
return parent::getLongVersion() . ' ' . Composer::RELEASE_DATE;
} | [
"public",
"function",
"getLongVersion",
"(",
")",
"{",
"if",
"(",
"Composer",
"::",
"BRANCH_ALIAS_VERSION",
")",
"{",
"return",
"sprintf",
"(",
"'<info>%s</info> version <comment>%s (%s)</comment> %s'",
",",
"$",
"this",
"->",
"getName",
"(",
")",
",",
"Composer",
"::",
"BRANCH_ALIAS_VERSION",
",",
"$",
"this",
"->",
"getVersion",
"(",
")",
",",
"Composer",
"::",
"RELEASE_DATE",
")",
";",
"}",
"return",
"parent",
"::",
"getLongVersion",
"(",
")",
".",
"' '",
".",
"Composer",
"::",
"RELEASE_DATE",
";",
"}"
] | {@inheritDoc} | [
"{"
] | train | https://github.com/mothership-ec/composer/blob/fa6ad031a939d8d33b211e428fdbdd28cfce238c/src/Composer/Console/Application.php#L297-L310 |
robrogers3/laraldap-auth | src/HashServiceProvider.php | HashServiceProvider.register | public function register()
{
$this->app->singleton('hash', function ($app) {
return new AESHashManager($app);
});
$this->app->singleton('hash.driver', function ($app) {
return $app['hash']->driver();
});
} | php | public function register()
{
$this->app->singleton('hash', function ($app) {
return new AESHashManager($app);
});
$this->app->singleton('hash.driver', function ($app) {
return $app['hash']->driver();
});
} | [
"public",
"function",
"register",
"(",
")",
"{",
"$",
"this",
"->",
"app",
"->",
"singleton",
"(",
"'hash'",
",",
"function",
"(",
"$",
"app",
")",
"{",
"return",
"new",
"AESHashManager",
"(",
"$",
"app",
")",
";",
"}",
")",
";",
"$",
"this",
"->",
"app",
"->",
"singleton",
"(",
"'hash.driver'",
",",
"function",
"(",
"$",
"app",
")",
"{",
"return",
"$",
"app",
"[",
"'hash'",
"]",
"->",
"driver",
"(",
")",
";",
"}",
")",
";",
"}"
] | Register the service provider.
@return void | [
"Register",
"the",
"service",
"provider",
"."
] | train | https://github.com/robrogers3/laraldap-auth/blob/f1b8d001f8b230389c7fbc5fdd59e39663d8ad36/src/HashServiceProvider.php#L21-L30 |
php-lug/lug | src/Bundle/GridBundle/Form/DataTransformer/GridSortingTransformer.php | GridSortingTransformer.transform | public function transform($value)
{
if ($value === null) {
return;
}
if (!is_array($value)) {
throw new TransformationFailedException(sprintf(
'The grid sorting value should be an array, got "%s".',
is_object($value) ? get_class($value) : gettype($value)
));
}
$sorting = [];
foreach ($value as $key => $order) {
if (!in_array($order, [SorterInterface::ASC, SorterInterface::DESC], true)) {
throw new TransformationFailedException(sprintf(
'The grid sorting order should be "ASC" or "DESC", got "%s".',
$order
));
}
if ($order === SorterInterface::DESC) {
$key = '-'.$key;
}
$sorting[] = $key;
}
return implode(',', $sorting);
} | php | public function transform($value)
{
if ($value === null) {
return;
}
if (!is_array($value)) {
throw new TransformationFailedException(sprintf(
'The grid sorting value should be an array, got "%s".',
is_object($value) ? get_class($value) : gettype($value)
));
}
$sorting = [];
foreach ($value as $key => $order) {
if (!in_array($order, [SorterInterface::ASC, SorterInterface::DESC], true)) {
throw new TransformationFailedException(sprintf(
'The grid sorting order should be "ASC" or "DESC", got "%s".',
$order
));
}
if ($order === SorterInterface::DESC) {
$key = '-'.$key;
}
$sorting[] = $key;
}
return implode(',', $sorting);
} | [
"public",
"function",
"transform",
"(",
"$",
"value",
")",
"{",
"if",
"(",
"$",
"value",
"===",
"null",
")",
"{",
"return",
";",
"}",
"if",
"(",
"!",
"is_array",
"(",
"$",
"value",
")",
")",
"{",
"throw",
"new",
"TransformationFailedException",
"(",
"sprintf",
"(",
"'The grid sorting value should be an array, got \"%s\".'",
",",
"is_object",
"(",
"$",
"value",
")",
"?",
"get_class",
"(",
"$",
"value",
")",
":",
"gettype",
"(",
"$",
"value",
")",
")",
")",
";",
"}",
"$",
"sorting",
"=",
"[",
"]",
";",
"foreach",
"(",
"$",
"value",
"as",
"$",
"key",
"=>",
"$",
"order",
")",
"{",
"if",
"(",
"!",
"in_array",
"(",
"$",
"order",
",",
"[",
"SorterInterface",
"::",
"ASC",
",",
"SorterInterface",
"::",
"DESC",
"]",
",",
"true",
")",
")",
"{",
"throw",
"new",
"TransformationFailedException",
"(",
"sprintf",
"(",
"'The grid sorting order should be \"ASC\" or \"DESC\", got \"%s\".'",
",",
"$",
"order",
")",
")",
";",
"}",
"if",
"(",
"$",
"order",
"===",
"SorterInterface",
"::",
"DESC",
")",
"{",
"$",
"key",
"=",
"'-'",
".",
"$",
"key",
";",
"}",
"$",
"sorting",
"[",
"]",
"=",
"$",
"key",
";",
"}",
"return",
"implode",
"(",
"','",
",",
"$",
"sorting",
")",
";",
"}"
] | {@inheritdoc} | [
"{"
] | train | https://github.com/php-lug/lug/blob/81c109f187eba0a60f17e8cc59984ebb31841db7/src/Bundle/GridBundle/Form/DataTransformer/GridSortingTransformer.php#L26-L57 |
php-lug/lug | src/Bundle/GridBundle/Form/DataTransformer/GridSortingTransformer.php | GridSortingTransformer.reverseTransform | public function reverseTransform($value)
{
$exploded = explode(',', $value);
if ($exploded === false) {
throw new TransformationFailedException(sprintf(
'The grid sorting should be comma-separated, got "%s".',
$value
));
}
$sorting = [];
foreach (array_map('trim', $exploded) as $order) {
if (empty($order)) {
continue;
}
if ($order[0] === '-') {
$sorting[substr($order, 1)] = SorterInterface::DESC;
} else {
$sorting[$order] = SorterInterface::ASC;
}
}
return $sorting;
} | php | public function reverseTransform($value)
{
$exploded = explode(',', $value);
if ($exploded === false) {
throw new TransformationFailedException(sprintf(
'The grid sorting should be comma-separated, got "%s".',
$value
));
}
$sorting = [];
foreach (array_map('trim', $exploded) as $order) {
if (empty($order)) {
continue;
}
if ($order[0] === '-') {
$sorting[substr($order, 1)] = SorterInterface::DESC;
} else {
$sorting[$order] = SorterInterface::ASC;
}
}
return $sorting;
} | [
"public",
"function",
"reverseTransform",
"(",
"$",
"value",
")",
"{",
"$",
"exploded",
"=",
"explode",
"(",
"','",
",",
"$",
"value",
")",
";",
"if",
"(",
"$",
"exploded",
"===",
"false",
")",
"{",
"throw",
"new",
"TransformationFailedException",
"(",
"sprintf",
"(",
"'The grid sorting should be comma-separated, got \"%s\".'",
",",
"$",
"value",
")",
")",
";",
"}",
"$",
"sorting",
"=",
"[",
"]",
";",
"foreach",
"(",
"array_map",
"(",
"'trim'",
",",
"$",
"exploded",
")",
"as",
"$",
"order",
")",
"{",
"if",
"(",
"empty",
"(",
"$",
"order",
")",
")",
"{",
"continue",
";",
"}",
"if",
"(",
"$",
"order",
"[",
"0",
"]",
"===",
"'-'",
")",
"{",
"$",
"sorting",
"[",
"substr",
"(",
"$",
"order",
",",
"1",
")",
"]",
"=",
"SorterInterface",
"::",
"DESC",
";",
"}",
"else",
"{",
"$",
"sorting",
"[",
"$",
"order",
"]",
"=",
"SorterInterface",
"::",
"ASC",
";",
"}",
"}",
"return",
"$",
"sorting",
";",
"}"
] | {@inheritdoc} | [
"{"
] | train | https://github.com/php-lug/lug/blob/81c109f187eba0a60f17e8cc59984ebb31841db7/src/Bundle/GridBundle/Form/DataTransformer/GridSortingTransformer.php#L62-L88 |
mustardandrew/muan-laravel-acl | src/Commands/Permission/RenameCommand.php | RenameCommand.handle | public function handle()
{
$permissionName = $this->argument('permission');
$newPermissionName = $this->argument('newPermission');
if (! $permission = Permission::whereName($permissionName)->first()) {
$this->warn("Permission {$permissionName} not exists.");
return 1;
}
$permission->name = $newPermissionName;
if ($permission->save()) {
echo "Rename permission {$permissionName} to {$newPermissionName} successfully.", PHP_EOL;
} else {
$this->error("Rename permission {$permissionName} is fail!");
}
return 0;
} | php | public function handle()
{
$permissionName = $this->argument('permission');
$newPermissionName = $this->argument('newPermission');
if (! $permission = Permission::whereName($permissionName)->first()) {
$this->warn("Permission {$permissionName} not exists.");
return 1;
}
$permission->name = $newPermissionName;
if ($permission->save()) {
echo "Rename permission {$permissionName} to {$newPermissionName} successfully.", PHP_EOL;
} else {
$this->error("Rename permission {$permissionName} is fail!");
}
return 0;
} | [
"public",
"function",
"handle",
"(",
")",
"{",
"$",
"permissionName",
"=",
"$",
"this",
"->",
"argument",
"(",
"'permission'",
")",
";",
"$",
"newPermissionName",
"=",
"$",
"this",
"->",
"argument",
"(",
"'newPermission'",
")",
";",
"if",
"(",
"!",
"$",
"permission",
"=",
"Permission",
"::",
"whereName",
"(",
"$",
"permissionName",
")",
"->",
"first",
"(",
")",
")",
"{",
"$",
"this",
"->",
"warn",
"(",
"\"Permission {$permissionName} not exists.\"",
")",
";",
"return",
"1",
";",
"}",
"$",
"permission",
"->",
"name",
"=",
"$",
"newPermissionName",
";",
"if",
"(",
"$",
"permission",
"->",
"save",
"(",
")",
")",
"{",
"echo",
"\"Rename permission {$permissionName} to {$newPermissionName} successfully.\"",
",",
"PHP_EOL",
";",
"}",
"else",
"{",
"$",
"this",
"->",
"error",
"(",
"\"Rename permission {$permissionName} is fail!\"",
")",
";",
"}",
"return",
"0",
";",
"}"
] | Execute the console command.
@return mixed | [
"Execute",
"the",
"console",
"command",
"."
] | train | https://github.com/mustardandrew/muan-laravel-acl/blob/b5f23340b5536babb98d9fd0d727a7a3371c97d5/src/Commands/Permission/RenameCommand.php#L34-L53 |
ClementIV/yii-rest-rbac2.0 | models/BizRule.php | BizRule.classExists | public function classExists()
{
if (!class_exists($this->className)) {
return self::NOCLASS;
}
if (!is_subclass_of($this->className, Rule::className())) {
return $self::ERRORCLASS;
}
return self::RIGHTCLASS;
} | php | public function classExists()
{
if (!class_exists($this->className)) {
return self::NOCLASS;
}
if (!is_subclass_of($this->className, Rule::className())) {
return $self::ERRORCLASS;
}
return self::RIGHTCLASS;
} | [
"public",
"function",
"classExists",
"(",
")",
"{",
"if",
"(",
"!",
"class_exists",
"(",
"$",
"this",
"->",
"className",
")",
")",
"{",
"return",
"self",
"::",
"NOCLASS",
";",
"}",
"if",
"(",
"!",
"is_subclass_of",
"(",
"$",
"this",
"->",
"className",
",",
"Rule",
"::",
"className",
"(",
")",
")",
")",
"{",
"return",
"$",
"self",
"::",
"ERRORCLASS",
";",
"}",
"return",
"self",
"::",
"RIGHTCLASS",
";",
"}"
] | Validate class exists | [
"Validate",
"class",
"exists"
] | train | https://github.com/ClementIV/yii-rest-rbac2.0/blob/435ffceca8d51b4d369182db3a06c20f336e9ac4/models/BizRule.php#L77-L86 |
uiii/pw-core | src/PW/Composer/Installer.php | Installer.installCode | public function installCode(PackageInterface $package)
{
$downloadPath = $this->download($package);
$installPath = $this->getInstallPath($package);
if (! file_exists($installPath . '/site/assets/installed.php')) {
// site profile not created - creating new PW project
// copy files needed for installation
foreach(glob($downloadPath . '/site-*') as $dir) {
$this->copy($dir, $installPath . '/' . basename($dir), false);
}
$this->copy($downloadPath . '/install.php', $installPath . '/install.php', false);
}
$this->copy($downloadPath . '/wire', $installPath . '/wire', false);
$this->copy($downloadPath . '/index.php', $installPath . '/index.php');
$this->copy($downloadPath . '/htaccess.txt', $installPath . '/.htaccess');
$this->filesystem->remove($downloadPath);
} | php | public function installCode(PackageInterface $package)
{
$downloadPath = $this->download($package);
$installPath = $this->getInstallPath($package);
if (! file_exists($installPath . '/site/assets/installed.php')) {
// site profile not created - creating new PW project
// copy files needed for installation
foreach(glob($downloadPath . '/site-*') as $dir) {
$this->copy($dir, $installPath . '/' . basename($dir), false);
}
$this->copy($downloadPath . '/install.php', $installPath . '/install.php', false);
}
$this->copy($downloadPath . '/wire', $installPath . '/wire', false);
$this->copy($downloadPath . '/index.php', $installPath . '/index.php');
$this->copy($downloadPath . '/htaccess.txt', $installPath . '/.htaccess');
$this->filesystem->remove($downloadPath);
} | [
"public",
"function",
"installCode",
"(",
"PackageInterface",
"$",
"package",
")",
"{",
"$",
"downloadPath",
"=",
"$",
"this",
"->",
"download",
"(",
"$",
"package",
")",
";",
"$",
"installPath",
"=",
"$",
"this",
"->",
"getInstallPath",
"(",
"$",
"package",
")",
";",
"if",
"(",
"!",
"file_exists",
"(",
"$",
"installPath",
".",
"'/site/assets/installed.php'",
")",
")",
"{",
"// site profile not created - creating new PW project",
"// copy files needed for installation",
"foreach",
"(",
"glob",
"(",
"$",
"downloadPath",
".",
"'/site-*'",
")",
"as",
"$",
"dir",
")",
"{",
"$",
"this",
"->",
"copy",
"(",
"$",
"dir",
",",
"$",
"installPath",
".",
"'/'",
".",
"basename",
"(",
"$",
"dir",
")",
",",
"false",
")",
";",
"}",
"$",
"this",
"->",
"copy",
"(",
"$",
"downloadPath",
".",
"'/install.php'",
",",
"$",
"installPath",
".",
"'/install.php'",
",",
"false",
")",
";",
"}",
"$",
"this",
"->",
"copy",
"(",
"$",
"downloadPath",
".",
"'/wire'",
",",
"$",
"installPath",
".",
"'/wire'",
",",
"false",
")",
";",
"$",
"this",
"->",
"copy",
"(",
"$",
"downloadPath",
".",
"'/index.php'",
",",
"$",
"installPath",
".",
"'/index.php'",
")",
";",
"$",
"this",
"->",
"copy",
"(",
"$",
"downloadPath",
".",
"'/htaccess.txt'",
",",
"$",
"installPath",
".",
"'/.htaccess'",
")",
";",
"$",
"this",
"->",
"filesystem",
"->",
"remove",
"(",
"$",
"downloadPath",
")",
";",
"}"
] | {@inheritDoc} | [
"{"
] | train | https://github.com/uiii/pw-core/blob/503a5457c6f5ba33448996ab515a53e4cf2131e5/src/PW/Composer/Installer.php#L49-L70 |
uiii/pw-core | src/PW/Composer/Installer.php | Installer.removeCode | public function removeCode(PackageInterface $package)
{
$installPath = $this->getInstallPath($package);
foreach(glob($installPath . '/site-*') as $dir) {
$this->filesystem->remove($dir);
}
$this->filesystem->remove($installPath . '/wire');
$this->filesystem->remove($installPath . '/install.php');
$this->filesystem->rename($installPath . '/index.php', $installPath . '/index.php.bak');
$this->filesystem->rename($installPath . '/.htaccess', $installPath . '/.htaccess.bak');
} | php | public function removeCode(PackageInterface $package)
{
$installPath = $this->getInstallPath($package);
foreach(glob($installPath . '/site-*') as $dir) {
$this->filesystem->remove($dir);
}
$this->filesystem->remove($installPath . '/wire');
$this->filesystem->remove($installPath . '/install.php');
$this->filesystem->rename($installPath . '/index.php', $installPath . '/index.php.bak');
$this->filesystem->rename($installPath . '/.htaccess', $installPath . '/.htaccess.bak');
} | [
"public",
"function",
"removeCode",
"(",
"PackageInterface",
"$",
"package",
")",
"{",
"$",
"installPath",
"=",
"$",
"this",
"->",
"getInstallPath",
"(",
"$",
"package",
")",
";",
"foreach",
"(",
"glob",
"(",
"$",
"installPath",
".",
"'/site-*'",
")",
"as",
"$",
"dir",
")",
"{",
"$",
"this",
"->",
"filesystem",
"->",
"remove",
"(",
"$",
"dir",
")",
";",
"}",
"$",
"this",
"->",
"filesystem",
"->",
"remove",
"(",
"$",
"installPath",
".",
"'/wire'",
")",
";",
"$",
"this",
"->",
"filesystem",
"->",
"remove",
"(",
"$",
"installPath",
".",
"'/install.php'",
")",
";",
"$",
"this",
"->",
"filesystem",
"->",
"rename",
"(",
"$",
"installPath",
".",
"'/index.php'",
",",
"$",
"installPath",
".",
"'/index.php.bak'",
")",
";",
"$",
"this",
"->",
"filesystem",
"->",
"rename",
"(",
"$",
"installPath",
".",
"'/.htaccess'",
",",
"$",
"installPath",
".",
"'/.htaccess.bak'",
")",
";",
"}"
] | {@inheritDoc} | [
"{"
] | train | https://github.com/uiii/pw-core/blob/503a5457c6f5ba33448996ab515a53e4cf2131e5/src/PW/Composer/Installer.php#L83-L96 |
dlehren/omnipay-cardknox | src/Message/AbstractRequest.php | AbstractRequest.getBaseData | protected function getBaseData()
{
$data = array();
$data['xKey'] = $this->getCardknoxKey();
$data['xVersion'] = '4.5.4';
$data['xSoftwareName'] = 'omnipay';
$data['xSoftwareVersion'] = '1';
$data['xCommand'] = $this->action;
return $data;
} | php | protected function getBaseData()
{
$data = array();
$data['xKey'] = $this->getCardknoxKey();
$data['xVersion'] = '4.5.4';
$data['xSoftwareName'] = 'omnipay';
$data['xSoftwareVersion'] = '1';
$data['xCommand'] = $this->action;
return $data;
} | [
"protected",
"function",
"getBaseData",
"(",
")",
"{",
"$",
"data",
"=",
"array",
"(",
")",
";",
"$",
"data",
"[",
"'xKey'",
"]",
"=",
"$",
"this",
"->",
"getCardknoxKey",
"(",
")",
";",
"$",
"data",
"[",
"'xVersion'",
"]",
"=",
"'4.5.4'",
";",
"$",
"data",
"[",
"'xSoftwareName'",
"]",
"=",
"'omnipay'",
";",
"$",
"data",
"[",
"'xSoftwareVersion'",
"]",
"=",
"'1'",
";",
"$",
"data",
"[",
"'xCommand'",
"]",
"=",
"$",
"this",
"->",
"action",
";",
"return",
"$",
"data",
";",
"}"
] | Base data used only for the API. | [
"Base",
"data",
"used",
"only",
"for",
"the",
"API",
"."
] | train | https://github.com/dlehren/omnipay-cardknox/blob/69af1f5bffafa6e27957a7114bd6c9c454854985/src/Message/AbstractRequest.php#L81-L91 |
aobozhang/rongcloud-facades | src/RongCloudServiceProvider.php | RongCloudServiceProvider.register | public function register()
{
$this->publishes([
__DIR__.'/config/rongcloud.php' => config_path('rongcloud.php'),
]);
$this->app->singleton('rongcloud', function($app) {
return new RongCloudClass (
$app['config']['rongcloud']['AppKey'],
$app['config']['rongcloud']['AppSecret']
);
});
$this->app->booting( function($app){
$aliases = $app['config']['aliases'];
if(empty($aliases['RongCloud'])){
$loader = \Illuminate\Foundation\AliasLoader::getInstance();
$loader->alias('RongCloud','Aobo\RongCloud\Facades\RongCloud');
}
});
} | php | public function register()
{
$this->publishes([
__DIR__.'/config/rongcloud.php' => config_path('rongcloud.php'),
]);
$this->app->singleton('rongcloud', function($app) {
return new RongCloudClass (
$app['config']['rongcloud']['AppKey'],
$app['config']['rongcloud']['AppSecret']
);
});
$this->app->booting( function($app){
$aliases = $app['config']['aliases'];
if(empty($aliases['RongCloud'])){
$loader = \Illuminate\Foundation\AliasLoader::getInstance();
$loader->alias('RongCloud','Aobo\RongCloud\Facades\RongCloud');
}
});
} | [
"public",
"function",
"register",
"(",
")",
"{",
"$",
"this",
"->",
"publishes",
"(",
"[",
"__DIR__",
".",
"'/config/rongcloud.php'",
"=>",
"config_path",
"(",
"'rongcloud.php'",
")",
",",
"]",
")",
";",
"$",
"this",
"->",
"app",
"->",
"singleton",
"(",
"'rongcloud'",
",",
"function",
"(",
"$",
"app",
")",
"{",
"return",
"new",
"RongCloudClass",
"(",
"$",
"app",
"[",
"'config'",
"]",
"[",
"'rongcloud'",
"]",
"[",
"'AppKey'",
"]",
",",
"$",
"app",
"[",
"'config'",
"]",
"[",
"'rongcloud'",
"]",
"[",
"'AppSecret'",
"]",
")",
";",
"}",
")",
";",
"$",
"this",
"->",
"app",
"->",
"booting",
"(",
"function",
"(",
"$",
"app",
")",
"{",
"$",
"aliases",
"=",
"$",
"app",
"[",
"'config'",
"]",
"[",
"'aliases'",
"]",
";",
"if",
"(",
"empty",
"(",
"$",
"aliases",
"[",
"'RongCloud'",
"]",
")",
")",
"{",
"$",
"loader",
"=",
"\\",
"Illuminate",
"\\",
"Foundation",
"\\",
"AliasLoader",
"::",
"getInstance",
"(",
")",
";",
"$",
"loader",
"->",
"alias",
"(",
"'RongCloud'",
",",
"'Aobo\\RongCloud\\Facades\\RongCloud'",
")",
";",
"}",
"}",
")",
";",
"}"
] | Register the service provider.
@return void | [
"Register",
"the",
"service",
"provider",
"."
] | train | https://github.com/aobozhang/rongcloud-facades/blob/8b9a86f69f6fbf84ca204a7faeb6744edc910b8a/src/RongCloudServiceProvider.php#L23-L51 |
caffeinated/beverage | src/Vendor/Stringy.php | Stringy.namespacedStudly | public function namespacedStudly()
{
$str = implode('\\', array_map('studly_case', explode('/', $this->str)));
return static::create($str, $this->encoding);
} | php | public function namespacedStudly()
{
$str = implode('\\', array_map('studly_case', explode('/', $this->str)));
return static::create($str, $this->encoding);
} | [
"public",
"function",
"namespacedStudly",
"(",
")",
"{",
"$",
"str",
"=",
"implode",
"(",
"'\\\\'",
",",
"array_map",
"(",
"'studly_case'",
",",
"explode",
"(",
"'/'",
",",
"$",
"this",
"->",
"str",
")",
")",
")",
";",
"return",
"static",
"::",
"create",
"(",
"$",
"str",
",",
"$",
"this",
"->",
"encoding",
")",
";",
"}"
] | Studly Namespace
Transforms "vendor-name/package-name" into "VendorName/PackageName".
@return Stringy | [
"Studly",
"Namespace"
] | train | https://github.com/caffeinated/beverage/blob/c7d612a1d3bc1baddc97fec60ab17224550efaf3/src/Vendor/Stringy.php#L35-L40 |
canax/database-query-builder | src/DatabaseQueryBuilder/QueryBuilderTrait.php | QueryBuilderTrait.build | protected function build()
{
$sql = $this->start . "\n"
. ($this->from ? $this->from . "\n" : null)
. ($this->join ? $this->join : null)
. ($this->set ? $this->set . "\n" : null)
. ($this->where ? $this->where . "\n" : null)
. ($this->groupby ? $this->groupby . "\n" : null)
. ($this->orderby ? $this->orderby . "\n" : null)
. ($this->limit ? $this->limit . "\n" : null)
. ($this->offset ? $this->offset . "\n" : null)
. ";";
return $sql;
} | php | protected function build()
{
$sql = $this->start . "\n"
. ($this->from ? $this->from . "\n" : null)
. ($this->join ? $this->join : null)
. ($this->set ? $this->set . "\n" : null)
. ($this->where ? $this->where . "\n" : null)
. ($this->groupby ? $this->groupby . "\n" : null)
. ($this->orderby ? $this->orderby . "\n" : null)
. ($this->limit ? $this->limit . "\n" : null)
. ($this->offset ? $this->offset . "\n" : null)
. ";";
return $sql;
} | [
"protected",
"function",
"build",
"(",
")",
"{",
"$",
"sql",
"=",
"$",
"this",
"->",
"start",
".",
"\"\\n\"",
".",
"(",
"$",
"this",
"->",
"from",
"?",
"$",
"this",
"->",
"from",
".",
"\"\\n\"",
":",
"null",
")",
".",
"(",
"$",
"this",
"->",
"join",
"?",
"$",
"this",
"->",
"join",
":",
"null",
")",
".",
"(",
"$",
"this",
"->",
"set",
"?",
"$",
"this",
"->",
"set",
".",
"\"\\n\"",
":",
"null",
")",
".",
"(",
"$",
"this",
"->",
"where",
"?",
"$",
"this",
"->",
"where",
".",
"\"\\n\"",
":",
"null",
")",
".",
"(",
"$",
"this",
"->",
"groupby",
"?",
"$",
"this",
"->",
"groupby",
".",
"\"\\n\"",
":",
"null",
")",
".",
"(",
"$",
"this",
"->",
"orderby",
"?",
"$",
"this",
"->",
"orderby",
".",
"\"\\n\"",
":",
"null",
")",
".",
"(",
"$",
"this",
"->",
"limit",
"?",
"$",
"this",
"->",
"limit",
".",
"\"\\n\"",
":",
"null",
")",
".",
"(",
"$",
"this",
"->",
"offset",
"?",
"$",
"this",
"->",
"offset",
".",
"\"\\n\"",
":",
"null",
")",
".",
"\";\"",
";",
"return",
"$",
"sql",
";",
"}"
] | Build the SQL query from its parts.
@return string as SQL query | [
"Build",
"the",
"SQL",
"query",
"from",
"its",
"parts",
"."
] | train | https://github.com/canax/database-query-builder/blob/c26a8a1537a8d8c2dcee305167980a57384b4e77/src/DatabaseQueryBuilder/QueryBuilderTrait.php#L64-L78 |
canax/database-query-builder | src/DatabaseQueryBuilder/QueryBuilderTrait.php | QueryBuilderTrait.clear | protected function clear()
{
$this->sql = null;
$this->start = null;
$this->from = null;
$this->join = null;
$this->set = null;
$this->where = null;
$this->groupby = null;
$this->orderby = null;
$this->limit = null;
$this->offset = null;
} | php | protected function clear()
{
$this->sql = null;
$this->start = null;
$this->from = null;
$this->join = null;
$this->set = null;
$this->where = null;
$this->groupby = null;
$this->orderby = null;
$this->limit = null;
$this->offset = null;
} | [
"protected",
"function",
"clear",
"(",
")",
"{",
"$",
"this",
"->",
"sql",
"=",
"null",
";",
"$",
"this",
"->",
"start",
"=",
"null",
";",
"$",
"this",
"->",
"from",
"=",
"null",
";",
"$",
"this",
"->",
"join",
"=",
"null",
";",
"$",
"this",
"->",
"set",
"=",
"null",
";",
"$",
"this",
"->",
"where",
"=",
"null",
";",
"$",
"this",
"->",
"groupby",
"=",
"null",
";",
"$",
"this",
"->",
"orderby",
"=",
"null",
";",
"$",
"this",
"->",
"limit",
"=",
"null",
";",
"$",
"this",
"->",
"offset",
"=",
"null",
";",
"}"
] | Clear all previous sql-code.
@return void | [
"Clear",
"all",
"previous",
"sql",
"-",
"code",
"."
] | train | https://github.com/canax/database-query-builder/blob/c26a8a1537a8d8c2dcee305167980a57384b4e77/src/DatabaseQueryBuilder/QueryBuilderTrait.php#L87-L99 |
canax/database-query-builder | src/DatabaseQueryBuilder/QueryBuilderTrait.php | QueryBuilderTrait.update | public function update($table, $columns, $values = null)
{
$this->clear();
list($columns, $values) = $this->mapColumnsWithValues($columns, $values);
if (count($columns) != count($values)) {
throw new BuildException("Columns does not match values, not equal items.");
}
$cols = null;
$max = count($columns);
for ($i = 0; $i < $max; $i++) {
$cols .= "\t" . $columns[$i] . ' = ';
$val = $values[$i];
if ($val == '?') {
$cols .= $val . ",\n";
} else {
$cols .= (is_string($val)
? "'$val'"
: $val)
. ",\n";
}
}
$cols = substr($cols, 0, -2);
$this->start = "UPDATE "
. $this->prefix
. $table;
$this->set = "SET\n$cols";
return $this;
} | php | public function update($table, $columns, $values = null)
{
$this->clear();
list($columns, $values) = $this->mapColumnsWithValues($columns, $values);
if (count($columns) != count($values)) {
throw new BuildException("Columns does not match values, not equal items.");
}
$cols = null;
$max = count($columns);
for ($i = 0; $i < $max; $i++) {
$cols .= "\t" . $columns[$i] . ' = ';
$val = $values[$i];
if ($val == '?') {
$cols .= $val . ",\n";
} else {
$cols .= (is_string($val)
? "'$val'"
: $val)
. ",\n";
}
}
$cols = substr($cols, 0, -2);
$this->start = "UPDATE "
. $this->prefix
. $table;
$this->set = "SET\n$cols";
return $this;
} | [
"public",
"function",
"update",
"(",
"$",
"table",
",",
"$",
"columns",
",",
"$",
"values",
"=",
"null",
")",
"{",
"$",
"this",
"->",
"clear",
"(",
")",
";",
"list",
"(",
"$",
"columns",
",",
"$",
"values",
")",
"=",
"$",
"this",
"->",
"mapColumnsWithValues",
"(",
"$",
"columns",
",",
"$",
"values",
")",
";",
"if",
"(",
"count",
"(",
"$",
"columns",
")",
"!=",
"count",
"(",
"$",
"values",
")",
")",
"{",
"throw",
"new",
"BuildException",
"(",
"\"Columns does not match values, not equal items.\"",
")",
";",
"}",
"$",
"cols",
"=",
"null",
";",
"$",
"max",
"=",
"count",
"(",
"$",
"columns",
")",
";",
"for",
"(",
"$",
"i",
"=",
"0",
";",
"$",
"i",
"<",
"$",
"max",
";",
"$",
"i",
"++",
")",
"{",
"$",
"cols",
".=",
"\"\\t\"",
".",
"$",
"columns",
"[",
"$",
"i",
"]",
".",
"' = '",
";",
"$",
"val",
"=",
"$",
"values",
"[",
"$",
"i",
"]",
";",
"if",
"(",
"$",
"val",
"==",
"'?'",
")",
"{",
"$",
"cols",
".=",
"$",
"val",
".",
"\",\\n\"",
";",
"}",
"else",
"{",
"$",
"cols",
".=",
"(",
"is_string",
"(",
"$",
"val",
")",
"?",
"\"'$val'\"",
":",
"$",
"val",
")",
".",
"\",\\n\"",
";",
"}",
"}",
"$",
"cols",
"=",
"substr",
"(",
"$",
"cols",
",",
"0",
",",
"-",
"2",
")",
";",
"$",
"this",
"->",
"start",
"=",
"\"UPDATE \"",
".",
"$",
"this",
"->",
"prefix",
".",
"$",
"table",
";",
"$",
"this",
"->",
"set",
"=",
"\"SET\\n$cols\"",
";",
"return",
"$",
"this",
";",
"}"
] | Build an update-query.
@param string $table the table name.
@param array $columns to update or key=>value with columns and values.
@param array $values to update or empty if $columns has bot columns and values.
@throws \Anax\Database\BuildException
@return void | [
"Build",
"an",
"update",
"-",
"query",
"."
] | train | https://github.com/canax/database-query-builder/blob/c26a8a1537a8d8c2dcee305167980a57384b4e77/src/DatabaseQueryBuilder/QueryBuilderTrait.php#L272-L306 |
canax/database-query-builder | src/DatabaseQueryBuilder/QueryBuilderTrait.php | QueryBuilderTrait.deleteFrom | public function deleteFrom($table, $where = null)
{
$this->clear();
if (isset($where)) {
$this->where = "WHERE\n\t(" . $where . ")";
}
$this->start = "DELETE";
$this->from($table);
return $this;
} | php | public function deleteFrom($table, $where = null)
{
$this->clear();
if (isset($where)) {
$this->where = "WHERE\n\t(" . $where . ")";
}
$this->start = "DELETE";
$this->from($table);
return $this;
} | [
"public",
"function",
"deleteFrom",
"(",
"$",
"table",
",",
"$",
"where",
"=",
"null",
")",
"{",
"$",
"this",
"->",
"clear",
"(",
")",
";",
"if",
"(",
"isset",
"(",
"$",
"where",
")",
")",
"{",
"$",
"this",
"->",
"where",
"=",
"\"WHERE\\n\\t(\"",
".",
"$",
"where",
".",
"\")\"",
";",
"}",
"$",
"this",
"->",
"start",
"=",
"\"DELETE\"",
";",
"$",
"this",
"->",
"from",
"(",
"$",
"table",
")",
";",
"return",
"$",
"this",
";",
"}"
] | Build a delete-query.
@param string $table the table name.
@param array $where limit which rows are updated.
@return self | [
"Build",
"a",
"delete",
"-",
"query",
"."
] | train | https://github.com/canax/database-query-builder/blob/c26a8a1537a8d8c2dcee305167980a57384b4e77/src/DatabaseQueryBuilder/QueryBuilderTrait.php#L318-L329 |
canax/database-query-builder | src/DatabaseQueryBuilder/QueryBuilderTrait.php | QueryBuilderTrait.rightJoin | public function rightJoin($table, $condition)
{
if ($this->dialect == 'sqlite') {
throw new BuildException("SQLite does not support RIGHT JOIN");
}
return $this->createJoin($table, $condition, 'RIGHT OUTER');
} | php | public function rightJoin($table, $condition)
{
if ($this->dialect == 'sqlite') {
throw new BuildException("SQLite does not support RIGHT JOIN");
}
return $this->createJoin($table, $condition, 'RIGHT OUTER');
} | [
"public",
"function",
"rightJoin",
"(",
"$",
"table",
",",
"$",
"condition",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"dialect",
"==",
"'sqlite'",
")",
"{",
"throw",
"new",
"BuildException",
"(",
"\"SQLite does not support RIGHT JOIN\"",
")",
";",
"}",
"return",
"$",
"this",
"->",
"createJoin",
"(",
"$",
"table",
",",
"$",
"condition",
",",
"'RIGHT OUTER'",
")",
";",
"}"
] | Build the right join part.
@param string $table name of table.
@param string $condition to join.
@throws \Anax\Database\BuildException when dialect does not support.
@return $this | [
"Build",
"the",
"right",
"join",
"part",
"."
] | train | https://github.com/canax/database-query-builder/blob/c26a8a1537a8d8c2dcee305167980a57384b4e77/src/DatabaseQueryBuilder/QueryBuilderTrait.php#L390-L397 |
alevilar/ristorantino-vendor | Stats/Model/CustomQuery.php | CustomQuery.paginateCount | function paginateCount($conditions, $recursive){
$sql = $this->sql;
return count($this->query($sql));
} | php | function paginateCount($conditions, $recursive){
$sql = $this->sql;
return count($this->query($sql));
} | [
"function",
"paginateCount",
"(",
"$",
"conditions",
",",
"$",
"recursive",
")",
"{",
"$",
"sql",
"=",
"$",
"this",
"->",
"sql",
";",
"return",
"count",
"(",
"$",
"this",
"->",
"query",
"(",
"$",
"sql",
")",
")",
";",
"}"
] | Esta funcion sobreescribe a la del paginador. Como son
consultas guardadas en la tabla query, tengo que calcular
la cantidad de registros para que pagine bien.
@param $conditions, $recursive
@return cantidad de registro. | [
"Esta",
"funcion",
"sobreescribe",
"a",
"la",
"del",
"paginador",
".",
"Como",
"son",
"consultas",
"guardadas",
"en",
"la",
"tabla",
"query",
"tengo",
"que",
"calcular",
"la",
"cantidad",
"de",
"registros",
"para",
"que",
"pagine",
"bien",
"."
] | train | https://github.com/alevilar/ristorantino-vendor/blob/6b91a1e20cc0ba09a1968d77e3de6512cfa2d966/Stats/Model/CustomQuery.php#L25-L29 |
alevilar/ristorantino-vendor | Stats/Model/CustomQuery.php | CustomQuery.paginate | function paginate($conditions, $fields, $order, $limit, $page, $recursive){
$sql = $this->sql;
$sql .= " LIMIT " . $this->limit . " ";
$sql .= " OFFSET " . (($page - 1) * $this->limit);
return $this->query($sql);
} | php | function paginate($conditions, $fields, $order, $limit, $page, $recursive){
$sql = $this->sql;
$sql .= " LIMIT " . $this->limit . " ";
$sql .= " OFFSET " . (($page - 1) * $this->limit);
return $this->query($sql);
} | [
"function",
"paginate",
"(",
"$",
"conditions",
",",
"$",
"fields",
",",
"$",
"order",
",",
"$",
"limit",
",",
"$",
"page",
",",
"$",
"recursive",
")",
"{",
"$",
"sql",
"=",
"$",
"this",
"->",
"sql",
";",
"$",
"sql",
".=",
"\" LIMIT \"",
".",
"$",
"this",
"->",
"limit",
".",
"\" \"",
";",
"$",
"sql",
".=",
"\" OFFSET \"",
".",
"(",
"(",
"$",
"page",
"-",
"1",
")",
"*",
"$",
"this",
"->",
"limit",
")",
";",
"return",
"$",
"this",
"->",
"query",
"(",
"$",
"sql",
")",
";",
"}"
] | Esta funcion sobreescribe a la del paginador. Como son
consultas guardadas en la tabla query, tengo que
reescribir el limit y el offset para poder mostrar por pantalla
@param $conditions, $recursive
@return registros paginados. | [
"Esta",
"funcion",
"sobreescribe",
"a",
"la",
"del",
"paginador",
".",
"Como",
"son",
"consultas",
"guardadas",
"en",
"la",
"tabla",
"query",
"tengo",
"que",
"reescribir",
"el",
"limit",
"y",
"el",
"offset",
"para",
"poder",
"mostrar",
"por",
"pantalla"
] | train | https://github.com/alevilar/ristorantino-vendor/blob/6b91a1e20cc0ba09a1968d77e3de6512cfa2d966/Stats/Model/CustomQuery.php#L39-L46 |
jnaxo/country-codes | src/Store/ApiManager.php | ApiManager.respondWithItem | protected function respondWithItem(
$item,
$resource_name = '',
array $links = [],
array $included = []
) {
$resource = new Item($item, $resource_name, $links, $included);
return $this->respondWithArray($resource->toArray());
} | php | protected function respondWithItem(
$item,
$resource_name = '',
array $links = [],
array $included = []
) {
$resource = new Item($item, $resource_name, $links, $included);
return $this->respondWithArray($resource->toArray());
} | [
"protected",
"function",
"respondWithItem",
"(",
"$",
"item",
",",
"$",
"resource_name",
"=",
"''",
",",
"array",
"$",
"links",
"=",
"[",
"]",
",",
"array",
"$",
"included",
"=",
"[",
"]",
")",
"{",
"$",
"resource",
"=",
"new",
"Item",
"(",
"$",
"item",
",",
"$",
"resource_name",
",",
"$",
"links",
",",
"$",
"included",
")",
";",
"return",
"$",
"this",
"->",
"respondWithArray",
"(",
"$",
"resource",
"->",
"toArray",
"(",
")",
")",
";",
"}"
] | Response with item
@param Object $item
@param $resource_name
@param array $links
@param array $included
@return Json Object | [
"Response",
"with",
"item"
] | train | https://github.com/jnaxo/country-codes/blob/ab1f24886e1b49eef5fd4b4eb4fb37aa7faeacd9/src/Store/ApiManager.php#L20-L28 |
songshenzong/log | src/DataCollector/TimeDataCollector.php | TimeDataCollector.startMeasure | public function startMeasure($name, $label = null, $collector = null)
{
$start = microtime(true);
$this->startedMeasures[$name] = [
'label' => $label ?: $name,
'start' => $start,
'collector' => $collector,
];
} | php | public function startMeasure($name, $label = null, $collector = null)
{
$start = microtime(true);
$this->startedMeasures[$name] = [
'label' => $label ?: $name,
'start' => $start,
'collector' => $collector,
];
} | [
"public",
"function",
"startMeasure",
"(",
"$",
"name",
",",
"$",
"label",
"=",
"null",
",",
"$",
"collector",
"=",
"null",
")",
"{",
"$",
"start",
"=",
"microtime",
"(",
"true",
")",
";",
"$",
"this",
"->",
"startedMeasures",
"[",
"$",
"name",
"]",
"=",
"[",
"'label'",
"=>",
"$",
"label",
"?",
":",
"$",
"name",
",",
"'start'",
"=>",
"$",
"start",
",",
"'collector'",
"=>",
"$",
"collector",
",",
"]",
";",
"}"
] | Starts a measure
@param string $name Internal name, used to stop the measure
@param string|null $label Public name
@param string|null $collector The source of the collector | [
"Starts",
"a",
"measure"
] | train | https://github.com/songshenzong/log/blob/b1e01f7994da47737866eabf82367490eab17c46/src/DataCollector/TimeDataCollector.php#L63-L71 |
mainio/c5pkg_symfony_forms | src/Mainio/C5/Symfony/Form/Extension/Concrete5/DataTransformer/PageToIntegerTransformer.php | PageToIntegerTransformer.transform | public function transform($value)
{
if ($value === null || $value == '') {
return null;
}
if (!($value instanceof Page)) {
throw new TransformationFailedException('Expected an instance of a concrete5 page object.');
}
return intval($value->getCollectionID());
} | php | public function transform($value)
{
if ($value === null || $value == '') {
return null;
}
if (!($value instanceof Page)) {
throw new TransformationFailedException('Expected an instance of a concrete5 page object.');
}
return intval($value->getCollectionID());
} | [
"public",
"function",
"transform",
"(",
"$",
"value",
")",
"{",
"if",
"(",
"$",
"value",
"===",
"null",
"||",
"$",
"value",
"==",
"''",
")",
"{",
"return",
"null",
";",
"}",
"if",
"(",
"!",
"(",
"$",
"value",
"instanceof",
"Page",
")",
")",
"{",
"throw",
"new",
"TransformationFailedException",
"(",
"'Expected an instance of a concrete5 page object.'",
")",
";",
"}",
"return",
"intval",
"(",
"$",
"value",
"->",
"getCollectionID",
"(",
")",
")",
";",
"}"
] | Converts a concrete5 page object to an integer.
@param \Concrete\Core\Page\Page $value The page object value
@return int The integer value
@throws TransformationFailedException If the given value is not an
instance of Concrete\Core\Page\Page. | [
"Converts",
"a",
"concrete5",
"page",
"object",
"to",
"an",
"integer",
"."
] | train | https://github.com/mainio/c5pkg_symfony_forms/blob/41a93c293d986574ec5cade8a7c8700e083dbaaa/src/Mainio/C5/Symfony/Form/Extension/Concrete5/DataTransformer/PageToIntegerTransformer.php#L33-L42 |
mainio/c5pkg_symfony_forms | src/Mainio/C5/Symfony/Form/Extension/Concrete5/DataTransformer/PageToIntegerTransformer.php | PageToIntegerTransformer.reverseTransform | public function reverseTransform($cID)
{
if (!is_numeric($cID) || $cID == 0) {
return null;
}
$rep = $this->entityManager->getRepository('Concrete\Core\Page\Page');
$c = $rep->find($cID);
if (!is_object($c) || $c->isError()) {
throw new TransformationFailedException('Invalid page ID.');
}
return $c;
} | php | public function reverseTransform($cID)
{
if (!is_numeric($cID) || $cID == 0) {
return null;
}
$rep = $this->entityManager->getRepository('Concrete\Core\Page\Page');
$c = $rep->find($cID);
if (!is_object($c) || $c->isError()) {
throw new TransformationFailedException('Invalid page ID.');
}
return $c;
} | [
"public",
"function",
"reverseTransform",
"(",
"$",
"cID",
")",
"{",
"if",
"(",
"!",
"is_numeric",
"(",
"$",
"cID",
")",
"||",
"$",
"cID",
"==",
"0",
")",
"{",
"return",
"null",
";",
"}",
"$",
"rep",
"=",
"$",
"this",
"->",
"entityManager",
"->",
"getRepository",
"(",
"'Concrete\\Core\\Page\\Page'",
")",
";",
"$",
"c",
"=",
"$",
"rep",
"->",
"find",
"(",
"$",
"cID",
")",
";",
"if",
"(",
"!",
"is_object",
"(",
"$",
"c",
")",
"||",
"$",
"c",
"->",
"isError",
"(",
")",
")",
"{",
"throw",
"new",
"TransformationFailedException",
"(",
"'Invalid page ID.'",
")",
";",
"}",
"return",
"$",
"c",
";",
"}"
] | Converts an integer to a concrete5 page object.
@param int $cID
@return mixed The value
@throws TransformationFailedException If the given value is not a proper
concrete5 page ID. | [
"Converts",
"an",
"integer",
"to",
"a",
"concrete5",
"page",
"object",
"."
] | train | https://github.com/mainio/c5pkg_symfony_forms/blob/41a93c293d986574ec5cade8a7c8700e083dbaaa/src/Mainio/C5/Symfony/Form/Extension/Concrete5/DataTransformer/PageToIntegerTransformer.php#L52-L66 |
Opifer/EavBundle | DependencyInjection/OpiferEavExtension.php | OpiferEavExtension.getParameters | public function getParameters(array $config)
{
$params = [
'opifer_eav.attribute_class' => $config['attribute_class'],
'opifer_eav.media_class' => $config['media_class'],
'opifer_eav.nestable_class' => $config['nestable_class'],
'opifer_eav.option_class' => $config['option_class'],
'opifer_eav.schema_class' => $config['schema_class'],
'opifer_eav.valueset_class' => $config['valueset_class'],
];
foreach ($config['entities'] as $label => $entity) {
$params['opifer_eav.entities'][$label] = $entity;
}
return $params;
} | php | public function getParameters(array $config)
{
$params = [
'opifer_eav.attribute_class' => $config['attribute_class'],
'opifer_eav.media_class' => $config['media_class'],
'opifer_eav.nestable_class' => $config['nestable_class'],
'opifer_eav.option_class' => $config['option_class'],
'opifer_eav.schema_class' => $config['schema_class'],
'opifer_eav.valueset_class' => $config['valueset_class'],
];
foreach ($config['entities'] as $label => $entity) {
$params['opifer_eav.entities'][$label] = $entity;
}
return $params;
} | [
"public",
"function",
"getParameters",
"(",
"array",
"$",
"config",
")",
"{",
"$",
"params",
"=",
"[",
"'opifer_eav.attribute_class'",
"=>",
"$",
"config",
"[",
"'attribute_class'",
"]",
",",
"'opifer_eav.media_class'",
"=>",
"$",
"config",
"[",
"'media_class'",
"]",
",",
"'opifer_eav.nestable_class'",
"=>",
"$",
"config",
"[",
"'nestable_class'",
"]",
",",
"'opifer_eav.option_class'",
"=>",
"$",
"config",
"[",
"'option_class'",
"]",
",",
"'opifer_eav.schema_class'",
"=>",
"$",
"config",
"[",
"'schema_class'",
"]",
",",
"'opifer_eav.valueset_class'",
"=>",
"$",
"config",
"[",
"'valueset_class'",
"]",
",",
"]",
";",
"foreach",
"(",
"$",
"config",
"[",
"'entities'",
"]",
"as",
"$",
"label",
"=>",
"$",
"entity",
")",
"{",
"$",
"params",
"[",
"'opifer_eav.entities'",
"]",
"[",
"$",
"label",
"]",
"=",
"$",
"entity",
";",
"}",
"return",
"$",
"params",
";",
"}"
] | Simplifying parameter syntax
@param array $config
@return array | [
"Simplifying",
"parameter",
"syntax"
] | train | https://github.com/Opifer/EavBundle/blob/4236fdc28b7574dac43f420704d0fc3c04905a4c/DependencyInjection/OpiferEavExtension.php#L35-L51 |
Opifer/EavBundle | DependencyInjection/OpiferEavExtension.php | OpiferEavExtension.prepend | public function prepend(ContainerBuilder $container)
{
$configs = $container->getExtensionConfig($this->getAlias());
$config = $this->processConfiguration(new Configuration(), $configs);
$parameters = $this->getParameters($config);
foreach ($parameters as $key => $value) {
$container->setParameter($key, $value);
}
$resolvableEntities = [
'Opifer\EavBundle\Model\AttributeInterface' => $config['attribute_class'],
'Opifer\EavBundle\Model\OptionInterface' => $config['option_class'],
'Opifer\EavBundle\Model\SchemaInterface' => $config['schema_class'],
'Opifer\EavBundle\Model\ValueSetInterface' => $config['valueset_class'],
];
if ($config['nestable_class'] != '') {
$resolvableEntities['Opifer\EavBundle\Model\Nestable'] = $config['nestable_class'];
}
if ($config['media_class'] != '') {
$resolvableEntities['Opifer\EavBundle\Model\MediaInterface'] = $config['media_class'];
}
foreach ($container->getExtensions() as $name => $extension) {
switch ($name) {
case 'doctrine':
$container->prependExtensionConfig($name, [
'orm' => [
'resolve_target_entities' => $resolvableEntities,
],
]);
break;
}
}
} | php | public function prepend(ContainerBuilder $container)
{
$configs = $container->getExtensionConfig($this->getAlias());
$config = $this->processConfiguration(new Configuration(), $configs);
$parameters = $this->getParameters($config);
foreach ($parameters as $key => $value) {
$container->setParameter($key, $value);
}
$resolvableEntities = [
'Opifer\EavBundle\Model\AttributeInterface' => $config['attribute_class'],
'Opifer\EavBundle\Model\OptionInterface' => $config['option_class'],
'Opifer\EavBundle\Model\SchemaInterface' => $config['schema_class'],
'Opifer\EavBundle\Model\ValueSetInterface' => $config['valueset_class'],
];
if ($config['nestable_class'] != '') {
$resolvableEntities['Opifer\EavBundle\Model\Nestable'] = $config['nestable_class'];
}
if ($config['media_class'] != '') {
$resolvableEntities['Opifer\EavBundle\Model\MediaInterface'] = $config['media_class'];
}
foreach ($container->getExtensions() as $name => $extension) {
switch ($name) {
case 'doctrine':
$container->prependExtensionConfig($name, [
'orm' => [
'resolve_target_entities' => $resolvableEntities,
],
]);
break;
}
}
} | [
"public",
"function",
"prepend",
"(",
"ContainerBuilder",
"$",
"container",
")",
"{",
"$",
"configs",
"=",
"$",
"container",
"->",
"getExtensionConfig",
"(",
"$",
"this",
"->",
"getAlias",
"(",
")",
")",
";",
"$",
"config",
"=",
"$",
"this",
"->",
"processConfiguration",
"(",
"new",
"Configuration",
"(",
")",
",",
"$",
"configs",
")",
";",
"$",
"parameters",
"=",
"$",
"this",
"->",
"getParameters",
"(",
"$",
"config",
")",
";",
"foreach",
"(",
"$",
"parameters",
"as",
"$",
"key",
"=>",
"$",
"value",
")",
"{",
"$",
"container",
"->",
"setParameter",
"(",
"$",
"key",
",",
"$",
"value",
")",
";",
"}",
"$",
"resolvableEntities",
"=",
"[",
"'Opifer\\EavBundle\\Model\\AttributeInterface'",
"=>",
"$",
"config",
"[",
"'attribute_class'",
"]",
",",
"'Opifer\\EavBundle\\Model\\OptionInterface'",
"=>",
"$",
"config",
"[",
"'option_class'",
"]",
",",
"'Opifer\\EavBundle\\Model\\SchemaInterface'",
"=>",
"$",
"config",
"[",
"'schema_class'",
"]",
",",
"'Opifer\\EavBundle\\Model\\ValueSetInterface'",
"=>",
"$",
"config",
"[",
"'valueset_class'",
"]",
",",
"]",
";",
"if",
"(",
"$",
"config",
"[",
"'nestable_class'",
"]",
"!=",
"''",
")",
"{",
"$",
"resolvableEntities",
"[",
"'Opifer\\EavBundle\\Model\\Nestable'",
"]",
"=",
"$",
"config",
"[",
"'nestable_class'",
"]",
";",
"}",
"if",
"(",
"$",
"config",
"[",
"'media_class'",
"]",
"!=",
"''",
")",
"{",
"$",
"resolvableEntities",
"[",
"'Opifer\\EavBundle\\Model\\MediaInterface'",
"]",
"=",
"$",
"config",
"[",
"'media_class'",
"]",
";",
"}",
"foreach",
"(",
"$",
"container",
"->",
"getExtensions",
"(",
")",
"as",
"$",
"name",
"=>",
"$",
"extension",
")",
"{",
"switch",
"(",
"$",
"name",
")",
"{",
"case",
"'doctrine'",
":",
"$",
"container",
"->",
"prependExtensionConfig",
"(",
"$",
"name",
",",
"[",
"'orm'",
"=>",
"[",
"'resolve_target_entities'",
"=>",
"$",
"resolvableEntities",
",",
"]",
",",
"]",
")",
";",
"break",
";",
"}",
"}",
"}"
] | Prepend our config before other bundles, so we can preset
their config with our parameters
@param ContainerBuilder $container
@return void | [
"Prepend",
"our",
"config",
"before",
"other",
"bundles",
"so",
"we",
"can",
"preset",
"their",
"config",
"with",
"our",
"parameters"
] | train | https://github.com/Opifer/EavBundle/blob/4236fdc28b7574dac43f420704d0fc3c04905a4c/DependencyInjection/OpiferEavExtension.php#L61-L97 |
inhere/php-librarys | src/Files/Parsers/IniParser.php | IniParser.doParse | protected static function doParse($string, $enhancement = false, callable $pathHandler = null, $fileDir = '')
{
if (!$string) {
return [];
}
if (!\is_string($string)) {
throw new \InvalidArgumentException('parameter type error! must is string.');
}
/** @var array $array */
$array = parse_ini_string(trim($string), true);
/*
* Parse special keywords
*
* extend = ../parent.yml
* db = import#../db.yml
* [cache]
* debug = reference#debug
*/
if ($enhancement === true) {
if (isset($array[self::EXTEND_KEY]) && ($extendFile = $array[self::EXTEND_KEY])) {
// if needed custom handle $importFile path. e.g: Maybe it uses custom alias path
if ($pathHandler && \is_callable($pathHandler)) {
$extendFile = $pathHandler($extendFile);
}
// if $importFile is not exists AND $importFile is not a absolute path AND have $parentFile
if ($fileDir && !file_exists($extendFile) && $extendFile[0] !== '/') {
$extendFile = $fileDir . '/' . trim($extendFile, './');
}
// $importFile is file
if (is_file($extendFile)) {
$data = file_get_contents($extendFile);
$array = array_merge(parse_ini_string(trim($data), true), $array);
} else {
throw new \UnexpectedValueException("needed extended file [$extendFile] don't exists!");
}
}
foreach ($array as $key => $item) {
if (!\is_string($item)) {
continue;
}
if (0 === strpos($item, self::IMPORT_KEY . '#')) {
$importFile = trim(substr($item, 6));
// if needed custom handle $importFile path. e.g: Maybe it uses custom alias path
if ($pathHandler && \is_callable($pathHandler)) {
$importFile = $pathHandler($importFile);
}
// if $importFile is not exists AND $importFile is not a absolute path AND have $parentFile
if ($fileDir && !file_exists($importFile) && $importFile[0] !== '/') {
$importFile = $fileDir . '/' . trim($importFile, './');
}
// $importFile is file
if (is_file($importFile)) {
$data = file_get_contents($importFile);
$array[$key] = parse_ini_string(trim($data), true);
} else {
throw new \UnexpectedValueException("needed imported file [$importFile] don't exists!");
}
}
}
}
return $array;
} | php | protected static function doParse($string, $enhancement = false, callable $pathHandler = null, $fileDir = '')
{
if (!$string) {
return [];
}
if (!\is_string($string)) {
throw new \InvalidArgumentException('parameter type error! must is string.');
}
/** @var array $array */
$array = parse_ini_string(trim($string), true);
/*
* Parse special keywords
*
* extend = ../parent.yml
* db = import#../db.yml
* [cache]
* debug = reference#debug
*/
if ($enhancement === true) {
if (isset($array[self::EXTEND_KEY]) && ($extendFile = $array[self::EXTEND_KEY])) {
// if needed custom handle $importFile path. e.g: Maybe it uses custom alias path
if ($pathHandler && \is_callable($pathHandler)) {
$extendFile = $pathHandler($extendFile);
}
// if $importFile is not exists AND $importFile is not a absolute path AND have $parentFile
if ($fileDir && !file_exists($extendFile) && $extendFile[0] !== '/') {
$extendFile = $fileDir . '/' . trim($extendFile, './');
}
// $importFile is file
if (is_file($extendFile)) {
$data = file_get_contents($extendFile);
$array = array_merge(parse_ini_string(trim($data), true), $array);
} else {
throw new \UnexpectedValueException("needed extended file [$extendFile] don't exists!");
}
}
foreach ($array as $key => $item) {
if (!\is_string($item)) {
continue;
}
if (0 === strpos($item, self::IMPORT_KEY . '#')) {
$importFile = trim(substr($item, 6));
// if needed custom handle $importFile path. e.g: Maybe it uses custom alias path
if ($pathHandler && \is_callable($pathHandler)) {
$importFile = $pathHandler($importFile);
}
// if $importFile is not exists AND $importFile is not a absolute path AND have $parentFile
if ($fileDir && !file_exists($importFile) && $importFile[0] !== '/') {
$importFile = $fileDir . '/' . trim($importFile, './');
}
// $importFile is file
if (is_file($importFile)) {
$data = file_get_contents($importFile);
$array[$key] = parse_ini_string(trim($data), true);
} else {
throw new \UnexpectedValueException("needed imported file [$importFile] don't exists!");
}
}
}
}
return $array;
} | [
"protected",
"static",
"function",
"doParse",
"(",
"$",
"string",
",",
"$",
"enhancement",
"=",
"false",
",",
"callable",
"$",
"pathHandler",
"=",
"null",
",",
"$",
"fileDir",
"=",
"''",
")",
"{",
"if",
"(",
"!",
"$",
"string",
")",
"{",
"return",
"[",
"]",
";",
"}",
"if",
"(",
"!",
"\\",
"is_string",
"(",
"$",
"string",
")",
")",
"{",
"throw",
"new",
"\\",
"InvalidArgumentException",
"(",
"'parameter type error! must is string.'",
")",
";",
"}",
"/** @var array $array */",
"$",
"array",
"=",
"parse_ini_string",
"(",
"trim",
"(",
"$",
"string",
")",
",",
"true",
")",
";",
"/*\n * Parse special keywords\n *\n * extend = ../parent.yml\n * db = import#../db.yml\n * [cache]\n * debug = reference#debug\n */",
"if",
"(",
"$",
"enhancement",
"===",
"true",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"array",
"[",
"self",
"::",
"EXTEND_KEY",
"]",
")",
"&&",
"(",
"$",
"extendFile",
"=",
"$",
"array",
"[",
"self",
"::",
"EXTEND_KEY",
"]",
")",
")",
"{",
"// if needed custom handle $importFile path. e.g: Maybe it uses custom alias path",
"if",
"(",
"$",
"pathHandler",
"&&",
"\\",
"is_callable",
"(",
"$",
"pathHandler",
")",
")",
"{",
"$",
"extendFile",
"=",
"$",
"pathHandler",
"(",
"$",
"extendFile",
")",
";",
"}",
"// if $importFile is not exists AND $importFile is not a absolute path AND have $parentFile",
"if",
"(",
"$",
"fileDir",
"&&",
"!",
"file_exists",
"(",
"$",
"extendFile",
")",
"&&",
"$",
"extendFile",
"[",
"0",
"]",
"!==",
"'/'",
")",
"{",
"$",
"extendFile",
"=",
"$",
"fileDir",
".",
"'/'",
".",
"trim",
"(",
"$",
"extendFile",
",",
"'./'",
")",
";",
"}",
"// $importFile is file",
"if",
"(",
"is_file",
"(",
"$",
"extendFile",
")",
")",
"{",
"$",
"data",
"=",
"file_get_contents",
"(",
"$",
"extendFile",
")",
";",
"$",
"array",
"=",
"array_merge",
"(",
"parse_ini_string",
"(",
"trim",
"(",
"$",
"data",
")",
",",
"true",
")",
",",
"$",
"array",
")",
";",
"}",
"else",
"{",
"throw",
"new",
"\\",
"UnexpectedValueException",
"(",
"\"needed extended file [$extendFile] don't exists!\"",
")",
";",
"}",
"}",
"foreach",
"(",
"$",
"array",
"as",
"$",
"key",
"=>",
"$",
"item",
")",
"{",
"if",
"(",
"!",
"\\",
"is_string",
"(",
"$",
"item",
")",
")",
"{",
"continue",
";",
"}",
"if",
"(",
"0",
"===",
"strpos",
"(",
"$",
"item",
",",
"self",
"::",
"IMPORT_KEY",
".",
"'#'",
")",
")",
"{",
"$",
"importFile",
"=",
"trim",
"(",
"substr",
"(",
"$",
"item",
",",
"6",
")",
")",
";",
"// if needed custom handle $importFile path. e.g: Maybe it uses custom alias path",
"if",
"(",
"$",
"pathHandler",
"&&",
"\\",
"is_callable",
"(",
"$",
"pathHandler",
")",
")",
"{",
"$",
"importFile",
"=",
"$",
"pathHandler",
"(",
"$",
"importFile",
")",
";",
"}",
"// if $importFile is not exists AND $importFile is not a absolute path AND have $parentFile",
"if",
"(",
"$",
"fileDir",
"&&",
"!",
"file_exists",
"(",
"$",
"importFile",
")",
"&&",
"$",
"importFile",
"[",
"0",
"]",
"!==",
"'/'",
")",
"{",
"$",
"importFile",
"=",
"$",
"fileDir",
".",
"'/'",
".",
"trim",
"(",
"$",
"importFile",
",",
"'./'",
")",
";",
"}",
"// $importFile is file",
"if",
"(",
"is_file",
"(",
"$",
"importFile",
")",
")",
"{",
"$",
"data",
"=",
"file_get_contents",
"(",
"$",
"importFile",
")",
";",
"$",
"array",
"[",
"$",
"key",
"]",
"=",
"parse_ini_string",
"(",
"trim",
"(",
"$",
"data",
")",
",",
"true",
")",
";",
"}",
"else",
"{",
"throw",
"new",
"\\",
"UnexpectedValueException",
"(",
"\"needed imported file [$importFile] don't exists!\"",
")",
";",
"}",
"}",
"}",
"}",
"return",
"$",
"array",
";",
"}"
] | parse INI
@param string $string Waiting for the parse data
@param bool $enhancement 启用增强功能,支持通过关键字 继承、导入、参考
@param callable $pathHandler When the second param is true, this param is valid.
@param string $fileDir When the second param is true, this param is valid.
@return array
@throws \InvalidArgumentException
@throws \UnexpectedValueException | [
"parse",
"INI"
] | train | https://github.com/inhere/php-librarys/blob/e6ca598685469794f310e3ab0e2bc19519cd0ae6/src/Files/Parsers/IniParser.php#L27-L100 |
MASNathan/Parser | src/Type/Json.php | Json.encode | public static function encode($data, $prettyPrint = false)
{
if ($prettyPrint) {
// Check if the PHP version is >= 5.4 and has the JSON_PRETTY_PRINT constant
if (version_compare(PHP_VERSION, '5.4.0', '>=') && defined('JSON_PRETTY_PRINT')) {
return json_encode($data, JSON_PRETTY_PRINT);
} else {
$jsonPretty = new JsonPretty();
return $jsonPretty->prettify($data, null, ' ');
}
}
return json_encode($data);
} | php | public static function encode($data, $prettyPrint = false)
{
if ($prettyPrint) {
// Check if the PHP version is >= 5.4 and has the JSON_PRETTY_PRINT constant
if (version_compare(PHP_VERSION, '5.4.0', '>=') && defined('JSON_PRETTY_PRINT')) {
return json_encode($data, JSON_PRETTY_PRINT);
} else {
$jsonPretty = new JsonPretty();
return $jsonPretty->prettify($data, null, ' ');
}
}
return json_encode($data);
} | [
"public",
"static",
"function",
"encode",
"(",
"$",
"data",
",",
"$",
"prettyPrint",
"=",
"false",
")",
"{",
"if",
"(",
"$",
"prettyPrint",
")",
"{",
"// Check if the PHP version is >= 5.4 and has the JSON_PRETTY_PRINT constant",
"if",
"(",
"version_compare",
"(",
"PHP_VERSION",
",",
"'5.4.0'",
",",
"'>='",
")",
"&&",
"defined",
"(",
"'JSON_PRETTY_PRINT'",
")",
")",
"{",
"return",
"json_encode",
"(",
"$",
"data",
",",
"JSON_PRETTY_PRINT",
")",
";",
"}",
"else",
"{",
"$",
"jsonPretty",
"=",
"new",
"JsonPretty",
"(",
")",
";",
"return",
"$",
"jsonPretty",
"->",
"prettify",
"(",
"$",
"data",
",",
"null",
",",
"' '",
")",
";",
"}",
"}",
"return",
"json_encode",
"(",
"$",
"data",
")",
";",
"}"
] | Encodes an array to json strutcture
@param array $data Data to encode
@param boolean $prettyPrint True to output the encoded data a little bit more readable for the humans
@return string | [
"Encodes",
"an",
"array",
"to",
"json",
"strutcture"
] | train | https://github.com/MASNathan/Parser/blob/0f55402b99b1e071bdcd6277b9268f783ca25e34/src/Type/Json.php#L15-L28 |
MASNathan/Parser | src/Type/Json.php | Json.decode | public static function decode($string)
{
$result = json_decode($string, true);
switch (json_last_error()) {
case JSON_ERROR_NONE:
return $result;
case JSON_ERROR_DEPTH:
throw new \Exception("Maximum stack depth exceeded");
case JSON_ERROR_STATE_MISMATCH:
throw new \Exception("Underflow or the modes mismatch");
case JSON_ERROR_CTRL_CHAR:
throw new \Exception("Unexpected control character found");
case JSON_ERROR_SYNTAX:
throw new \Exception("Syntax error, malformed JSON");
case JSON_ERROR_UTF8:
throw new \Exception("Malformed UTF-8 characters, possibly incorrectly encoded");
default:
throw new \Exception("Unknown error on JSON file");
}
} | php | public static function decode($string)
{
$result = json_decode($string, true);
switch (json_last_error()) {
case JSON_ERROR_NONE:
return $result;
case JSON_ERROR_DEPTH:
throw new \Exception("Maximum stack depth exceeded");
case JSON_ERROR_STATE_MISMATCH:
throw new \Exception("Underflow or the modes mismatch");
case JSON_ERROR_CTRL_CHAR:
throw new \Exception("Unexpected control character found");
case JSON_ERROR_SYNTAX:
throw new \Exception("Syntax error, malformed JSON");
case JSON_ERROR_UTF8:
throw new \Exception("Malformed UTF-8 characters, possibly incorrectly encoded");
default:
throw new \Exception("Unknown error on JSON file");
}
} | [
"public",
"static",
"function",
"decode",
"(",
"$",
"string",
")",
"{",
"$",
"result",
"=",
"json_decode",
"(",
"$",
"string",
",",
"true",
")",
";",
"switch",
"(",
"json_last_error",
"(",
")",
")",
"{",
"case",
"JSON_ERROR_NONE",
":",
"return",
"$",
"result",
";",
"case",
"JSON_ERROR_DEPTH",
":",
"throw",
"new",
"\\",
"Exception",
"(",
"\"Maximum stack depth exceeded\"",
")",
";",
"case",
"JSON_ERROR_STATE_MISMATCH",
":",
"throw",
"new",
"\\",
"Exception",
"(",
"\"Underflow or the modes mismatch\"",
")",
";",
"case",
"JSON_ERROR_CTRL_CHAR",
":",
"throw",
"new",
"\\",
"Exception",
"(",
"\"Unexpected control character found\"",
")",
";",
"case",
"JSON_ERROR_SYNTAX",
":",
"throw",
"new",
"\\",
"Exception",
"(",
"\"Syntax error, malformed JSON\"",
")",
";",
"case",
"JSON_ERROR_UTF8",
":",
"throw",
"new",
"\\",
"Exception",
"(",
"\"Malformed UTF-8 characters, possibly incorrectly encoded\"",
")",
";",
"default",
":",
"throw",
"new",
"\\",
"Exception",
"(",
"\"Unknown error on JSON file\"",
")",
";",
"}",
"}"
] | Decodes a json file string
@param string $string File contents
@return array | [
"Decodes",
"a",
"json",
"file",
"string"
] | train | https://github.com/MASNathan/Parser/blob/0f55402b99b1e071bdcd6277b9268f783ca25e34/src/Type/Json.php#L35-L61 |
mslib/resource-proxy | Msl/ResourceProxy/Source/Email/AbstractAccount.php | AbstractAccount.setConfig | public function setConfig(SourceConfig $sourceConfig)
{
// Setting the source config
$this->sourceConfig = $sourceConfig;
// Setting object fields from configuration
$this->name = $sourceConfig->getName();
// Checking if crypt protocol is accepted
$cryptProtocol = $sourceConfig->getCryptProtocol();
if (!empty($cryptProtocol)) {
if ($cryptProtocol !== self::SSL_CRYPT_PROTOCOL && $cryptProtocol !== self::TSL_CRYPT_PROTOCOL) {
throw new Exception\BadSourceConfigurationException(
sprintf(
'Unrecognized cryptographic protocol \'%s\'. Accepted values are: \'%s\'.',
$cryptProtocol,
self::SSL_CRYPT_PROTOCOL
)
);
}
}
// Setting zend imap configuration
$storageConfig = array(
'host' => $sourceConfig->getHost(),
'user' => $sourceConfig->getUsername(),
'port' => $sourceConfig->getPort(),
'password' => $sourceConfig->getPassword()
);
if (!empty($cryptProtocol)) {
$storageConfig['ssl'] = $cryptProtocol;
}
if (!empty($this->folder)) {
$storageConfig['folder'] = $this->folder;
}
// Initializing zend imap instance
$this->storage = $this->getStorageInstance($storageConfig);
} | php | public function setConfig(SourceConfig $sourceConfig)
{
// Setting the source config
$this->sourceConfig = $sourceConfig;
// Setting object fields from configuration
$this->name = $sourceConfig->getName();
// Checking if crypt protocol is accepted
$cryptProtocol = $sourceConfig->getCryptProtocol();
if (!empty($cryptProtocol)) {
if ($cryptProtocol !== self::SSL_CRYPT_PROTOCOL && $cryptProtocol !== self::TSL_CRYPT_PROTOCOL) {
throw new Exception\BadSourceConfigurationException(
sprintf(
'Unrecognized cryptographic protocol \'%s\'. Accepted values are: \'%s\'.',
$cryptProtocol,
self::SSL_CRYPT_PROTOCOL
)
);
}
}
// Setting zend imap configuration
$storageConfig = array(
'host' => $sourceConfig->getHost(),
'user' => $sourceConfig->getUsername(),
'port' => $sourceConfig->getPort(),
'password' => $sourceConfig->getPassword()
);
if (!empty($cryptProtocol)) {
$storageConfig['ssl'] = $cryptProtocol;
}
if (!empty($this->folder)) {
$storageConfig['folder'] = $this->folder;
}
// Initializing zend imap instance
$this->storage = $this->getStorageInstance($storageConfig);
} | [
"public",
"function",
"setConfig",
"(",
"SourceConfig",
"$",
"sourceConfig",
")",
"{",
"// Setting the source config",
"$",
"this",
"->",
"sourceConfig",
"=",
"$",
"sourceConfig",
";",
"// Setting object fields from configuration",
"$",
"this",
"->",
"name",
"=",
"$",
"sourceConfig",
"->",
"getName",
"(",
")",
";",
"// Checking if crypt protocol is accepted",
"$",
"cryptProtocol",
"=",
"$",
"sourceConfig",
"->",
"getCryptProtocol",
"(",
")",
";",
"if",
"(",
"!",
"empty",
"(",
"$",
"cryptProtocol",
")",
")",
"{",
"if",
"(",
"$",
"cryptProtocol",
"!==",
"self",
"::",
"SSL_CRYPT_PROTOCOL",
"&&",
"$",
"cryptProtocol",
"!==",
"self",
"::",
"TSL_CRYPT_PROTOCOL",
")",
"{",
"throw",
"new",
"Exception",
"\\",
"BadSourceConfigurationException",
"(",
"sprintf",
"(",
"'Unrecognized cryptographic protocol \\'%s\\'. Accepted values are: \\'%s\\'.'",
",",
"$",
"cryptProtocol",
",",
"self",
"::",
"SSL_CRYPT_PROTOCOL",
")",
")",
";",
"}",
"}",
"// Setting zend imap configuration",
"$",
"storageConfig",
"=",
"array",
"(",
"'host'",
"=>",
"$",
"sourceConfig",
"->",
"getHost",
"(",
")",
",",
"'user'",
"=>",
"$",
"sourceConfig",
"->",
"getUsername",
"(",
")",
",",
"'port'",
"=>",
"$",
"sourceConfig",
"->",
"getPort",
"(",
")",
",",
"'password'",
"=>",
"$",
"sourceConfig",
"->",
"getPassword",
"(",
")",
")",
";",
"if",
"(",
"!",
"empty",
"(",
"$",
"cryptProtocol",
")",
")",
"{",
"$",
"storageConfig",
"[",
"'ssl'",
"]",
"=",
"$",
"cryptProtocol",
";",
"}",
"if",
"(",
"!",
"empty",
"(",
"$",
"this",
"->",
"folder",
")",
")",
"{",
"$",
"storageConfig",
"[",
"'folder'",
"]",
"=",
"$",
"this",
"->",
"folder",
";",
"}",
"// Initializing zend imap instance",
"$",
"this",
"->",
"storage",
"=",
"$",
"this",
"->",
"getStorageInstance",
"(",
"$",
"storageConfig",
")",
";",
"}"
] | Sets all the required parameters to configure a given Source instance.
@param SourceConfig $sourceConfig
@throws \Msl\ResourceProxy\Exception\BadSourceConfigurationException
@return void | [
"Sets",
"all",
"the",
"required",
"parameters",
"to",
"configure",
"a",
"given",
"Source",
"instance",
"."
] | train | https://github.com/mslib/resource-proxy/blob/be3f8589753f738f5114443a3465f5e84aecd156/Msl/ResourceProxy/Source/Email/AbstractAccount.php#L86-L124 |
heidelpay/PhpDoc | src/phpDocumentor/Transformer/ServiceProvider.php | ServiceProvider.register | public function register(Application $app)
{
if (!isset($app['descriptor.builder'])) {
throw new Exception\MissingDependencyException(
'The builder object that is used to construct the ProjectDescriptor is missing'
);
}
if (!isset($app['serializer'])) {
throw new Exception\MissingDependencyException(
'The serializer object that is used to read the template configuration with is missing'
);
}
// parameters
$app['linker.substitutions'] = array(
'phpDocumentor\Descriptor\ProjectDescriptor' => array('files'),
'phpDocumentor\Descriptor\FileDescriptor' => array(
'tags',
'classes',
'interfaces',
'traits',
'functions',
'constants'
),
'phpDocumentor\Descriptor\ClassDescriptor' => array(
'tags',
'parent',
'interfaces',
'constants',
'properties',
'methods',
'usedTraits',
),
'phpDocumentor\Descriptor\InterfaceDescriptor' => array(
'tags',
'parent',
'constants',
'methods',
),
'phpDocumentor\Descriptor\TraitDescriptor' => array(
'tags',
'properties',
'methods',
'usedTraits',
),
'phpDocumentor\Descriptor\FunctionDescriptor' => array('tags', 'arguments'),
'phpDocumentor\Descriptor\MethodDescriptor' => array('tags', 'arguments'),
'phpDocumentor\Descriptor\ArgumentDescriptor' => array('types'),
'phpDocumentor\Descriptor\PropertyDescriptor' => array('tags', 'types'),
'phpDocumentor\Descriptor\ConstantDescriptor' => array('tags', 'types'),
'phpDocumentor\Descriptor\Tag\ParamDescriptor' => array('types'),
'phpDocumentor\Descriptor\Tag\ReturnDescriptor' => array('types'),
'phpDocumentor\Descriptor\Tag\SeeDescriptor' => array('reference'),
'phpDocumentor\Descriptor\Type\CollectionDescriptor' => array('baseType', 'types', 'keyTypes'),
);
// services
$app['compiler'] = $app->share(
function ($container) {
$compiler = new Compiler();
$compiler->insert(new ElementsIndexBuilder(), ElementsIndexBuilder::COMPILER_PRIORITY);
$compiler->insert(new MarkerFromTagsExtractor(), MarkerFromTagsExtractor::COMPILER_PRIORITY);
$compiler->insert(
new ExampleTagsEnricher($container['parser.example.finder']),
ExampleTagsEnricher::COMPILER_PRIORITY
);
$compiler->insert(new PackageTreeBuilder(), PackageTreeBuilder::COMPILER_PRIORITY);
$compiler->insert(new NamespaceTreeBuilder(), NamespaceTreeBuilder::COMPILER_PRIORITY);
$compiler->insert(
new ResolveInlineLinkAndSeeTags($container['transformer.routing.queue']),
ResolveInlineLinkAndSeeTags::COMPILER_PRIORITY
);
$compiler->insert($container['linker'], Linker::COMPILER_PRIORITY);
$compiler->insert($container['transformer'], Transformer::COMPILER_PRIORITY);
$compiler->insert(
new Debug($container['monolog'], $container['descriptor.analyzer']),
Debug::COMPILER_PRIORITY
);
return $compiler;
}
);
$app['linker'] = $app->share(
function ($app) {
return new Linker($app['linker.substitutions']);
}
);
$app['transformer.behaviour.collection'] = $app->share(
function () {
return new Behaviour\Collection();
}
);
$app['transformer.routing.standard'] = $app->share(
function ($container) {
/** @var ProjectDescriptorBuilder $projectDescriptorBuilder */
$projectDescriptorBuilder = $container['descriptor.builder'];
return new Router\StandardRouter($projectDescriptorBuilder);
}
);
$app['transformer.routing.external'] = $app->share(
function ($container) {
return new Router\ExternalRouter($container['config']);
}
);
$app['transformer.routing.queue'] = $app->share(
function ($container) {
$queue = new Router\Queue();
// TODO: load from app configuration instead of hardcoded
$queue->insert($container['transformer.routing.external'], 10500);
$queue->insert($container['transformer.routing.standard'], 10000);
return $queue;
}
);
$app['transformer.writer.collection'] = $app->share(
function ($container) {
return new Writer\Collection($container['transformer.routing.queue']);
}
);
$this->provideTemplatingSystem($app);
$app['transformer'] = $app->share(
function ($container) {
$transformer = new Transformer(
$container['transformer.template.collection'],
$container['transformer.writer.collection']
);
/** @var Behaviour\Collection $behaviourCollection */
$behaviourCollection = $container['transformer.behaviour.collection'];
Dispatcher::getInstance()->addListener(
Transformer::EVENT_PRE_TRANSFORM,
function (PreTransformEvent $event) use ($behaviourCollection) {
$behaviourCollection->process($event->getProject());
}
);
return $transformer;
}
);
$app->command(new TransformCommand($app['descriptor.builder'], $app['transformer'], $app['compiler']));
$app->command(new ListCommand($app['transformer.template.factory']));
} | php | public function register(Application $app)
{
if (!isset($app['descriptor.builder'])) {
throw new Exception\MissingDependencyException(
'The builder object that is used to construct the ProjectDescriptor is missing'
);
}
if (!isset($app['serializer'])) {
throw new Exception\MissingDependencyException(
'The serializer object that is used to read the template configuration with is missing'
);
}
// parameters
$app['linker.substitutions'] = array(
'phpDocumentor\Descriptor\ProjectDescriptor' => array('files'),
'phpDocumentor\Descriptor\FileDescriptor' => array(
'tags',
'classes',
'interfaces',
'traits',
'functions',
'constants'
),
'phpDocumentor\Descriptor\ClassDescriptor' => array(
'tags',
'parent',
'interfaces',
'constants',
'properties',
'methods',
'usedTraits',
),
'phpDocumentor\Descriptor\InterfaceDescriptor' => array(
'tags',
'parent',
'constants',
'methods',
),
'phpDocumentor\Descriptor\TraitDescriptor' => array(
'tags',
'properties',
'methods',
'usedTraits',
),
'phpDocumentor\Descriptor\FunctionDescriptor' => array('tags', 'arguments'),
'phpDocumentor\Descriptor\MethodDescriptor' => array('tags', 'arguments'),
'phpDocumentor\Descriptor\ArgumentDescriptor' => array('types'),
'phpDocumentor\Descriptor\PropertyDescriptor' => array('tags', 'types'),
'phpDocumentor\Descriptor\ConstantDescriptor' => array('tags', 'types'),
'phpDocumentor\Descriptor\Tag\ParamDescriptor' => array('types'),
'phpDocumentor\Descriptor\Tag\ReturnDescriptor' => array('types'),
'phpDocumentor\Descriptor\Tag\SeeDescriptor' => array('reference'),
'phpDocumentor\Descriptor\Type\CollectionDescriptor' => array('baseType', 'types', 'keyTypes'),
);
// services
$app['compiler'] = $app->share(
function ($container) {
$compiler = new Compiler();
$compiler->insert(new ElementsIndexBuilder(), ElementsIndexBuilder::COMPILER_PRIORITY);
$compiler->insert(new MarkerFromTagsExtractor(), MarkerFromTagsExtractor::COMPILER_PRIORITY);
$compiler->insert(
new ExampleTagsEnricher($container['parser.example.finder']),
ExampleTagsEnricher::COMPILER_PRIORITY
);
$compiler->insert(new PackageTreeBuilder(), PackageTreeBuilder::COMPILER_PRIORITY);
$compiler->insert(new NamespaceTreeBuilder(), NamespaceTreeBuilder::COMPILER_PRIORITY);
$compiler->insert(
new ResolveInlineLinkAndSeeTags($container['transformer.routing.queue']),
ResolveInlineLinkAndSeeTags::COMPILER_PRIORITY
);
$compiler->insert($container['linker'], Linker::COMPILER_PRIORITY);
$compiler->insert($container['transformer'], Transformer::COMPILER_PRIORITY);
$compiler->insert(
new Debug($container['monolog'], $container['descriptor.analyzer']),
Debug::COMPILER_PRIORITY
);
return $compiler;
}
);
$app['linker'] = $app->share(
function ($app) {
return new Linker($app['linker.substitutions']);
}
);
$app['transformer.behaviour.collection'] = $app->share(
function () {
return new Behaviour\Collection();
}
);
$app['transformer.routing.standard'] = $app->share(
function ($container) {
/** @var ProjectDescriptorBuilder $projectDescriptorBuilder */
$projectDescriptorBuilder = $container['descriptor.builder'];
return new Router\StandardRouter($projectDescriptorBuilder);
}
);
$app['transformer.routing.external'] = $app->share(
function ($container) {
return new Router\ExternalRouter($container['config']);
}
);
$app['transformer.routing.queue'] = $app->share(
function ($container) {
$queue = new Router\Queue();
// TODO: load from app configuration instead of hardcoded
$queue->insert($container['transformer.routing.external'], 10500);
$queue->insert($container['transformer.routing.standard'], 10000);
return $queue;
}
);
$app['transformer.writer.collection'] = $app->share(
function ($container) {
return new Writer\Collection($container['transformer.routing.queue']);
}
);
$this->provideTemplatingSystem($app);
$app['transformer'] = $app->share(
function ($container) {
$transformer = new Transformer(
$container['transformer.template.collection'],
$container['transformer.writer.collection']
);
/** @var Behaviour\Collection $behaviourCollection */
$behaviourCollection = $container['transformer.behaviour.collection'];
Dispatcher::getInstance()->addListener(
Transformer::EVENT_PRE_TRANSFORM,
function (PreTransformEvent $event) use ($behaviourCollection) {
$behaviourCollection->process($event->getProject());
}
);
return $transformer;
}
);
$app->command(new TransformCommand($app['descriptor.builder'], $app['transformer'], $app['compiler']));
$app->command(new ListCommand($app['transformer.template.factory']));
} | [
"public",
"function",
"register",
"(",
"Application",
"$",
"app",
")",
"{",
"if",
"(",
"!",
"isset",
"(",
"$",
"app",
"[",
"'descriptor.builder'",
"]",
")",
")",
"{",
"throw",
"new",
"Exception",
"\\",
"MissingDependencyException",
"(",
"'The builder object that is used to construct the ProjectDescriptor is missing'",
")",
";",
"}",
"if",
"(",
"!",
"isset",
"(",
"$",
"app",
"[",
"'serializer'",
"]",
")",
")",
"{",
"throw",
"new",
"Exception",
"\\",
"MissingDependencyException",
"(",
"'The serializer object that is used to read the template configuration with is missing'",
")",
";",
"}",
"// parameters",
"$",
"app",
"[",
"'linker.substitutions'",
"]",
"=",
"array",
"(",
"'phpDocumentor\\Descriptor\\ProjectDescriptor'",
"=>",
"array",
"(",
"'files'",
")",
",",
"'phpDocumentor\\Descriptor\\FileDescriptor'",
"=>",
"array",
"(",
"'tags'",
",",
"'classes'",
",",
"'interfaces'",
",",
"'traits'",
",",
"'functions'",
",",
"'constants'",
")",
",",
"'phpDocumentor\\Descriptor\\ClassDescriptor'",
"=>",
"array",
"(",
"'tags'",
",",
"'parent'",
",",
"'interfaces'",
",",
"'constants'",
",",
"'properties'",
",",
"'methods'",
",",
"'usedTraits'",
",",
")",
",",
"'phpDocumentor\\Descriptor\\InterfaceDescriptor'",
"=>",
"array",
"(",
"'tags'",
",",
"'parent'",
",",
"'constants'",
",",
"'methods'",
",",
")",
",",
"'phpDocumentor\\Descriptor\\TraitDescriptor'",
"=>",
"array",
"(",
"'tags'",
",",
"'properties'",
",",
"'methods'",
",",
"'usedTraits'",
",",
")",
",",
"'phpDocumentor\\Descriptor\\FunctionDescriptor'",
"=>",
"array",
"(",
"'tags'",
",",
"'arguments'",
")",
",",
"'phpDocumentor\\Descriptor\\MethodDescriptor'",
"=>",
"array",
"(",
"'tags'",
",",
"'arguments'",
")",
",",
"'phpDocumentor\\Descriptor\\ArgumentDescriptor'",
"=>",
"array",
"(",
"'types'",
")",
",",
"'phpDocumentor\\Descriptor\\PropertyDescriptor'",
"=>",
"array",
"(",
"'tags'",
",",
"'types'",
")",
",",
"'phpDocumentor\\Descriptor\\ConstantDescriptor'",
"=>",
"array",
"(",
"'tags'",
",",
"'types'",
")",
",",
"'phpDocumentor\\Descriptor\\Tag\\ParamDescriptor'",
"=>",
"array",
"(",
"'types'",
")",
",",
"'phpDocumentor\\Descriptor\\Tag\\ReturnDescriptor'",
"=>",
"array",
"(",
"'types'",
")",
",",
"'phpDocumentor\\Descriptor\\Tag\\SeeDescriptor'",
"=>",
"array",
"(",
"'reference'",
")",
",",
"'phpDocumentor\\Descriptor\\Type\\CollectionDescriptor'",
"=>",
"array",
"(",
"'baseType'",
",",
"'types'",
",",
"'keyTypes'",
")",
",",
")",
";",
"// services",
"$",
"app",
"[",
"'compiler'",
"]",
"=",
"$",
"app",
"->",
"share",
"(",
"function",
"(",
"$",
"container",
")",
"{",
"$",
"compiler",
"=",
"new",
"Compiler",
"(",
")",
";",
"$",
"compiler",
"->",
"insert",
"(",
"new",
"ElementsIndexBuilder",
"(",
")",
",",
"ElementsIndexBuilder",
"::",
"COMPILER_PRIORITY",
")",
";",
"$",
"compiler",
"->",
"insert",
"(",
"new",
"MarkerFromTagsExtractor",
"(",
")",
",",
"MarkerFromTagsExtractor",
"::",
"COMPILER_PRIORITY",
")",
";",
"$",
"compiler",
"->",
"insert",
"(",
"new",
"ExampleTagsEnricher",
"(",
"$",
"container",
"[",
"'parser.example.finder'",
"]",
")",
",",
"ExampleTagsEnricher",
"::",
"COMPILER_PRIORITY",
")",
";",
"$",
"compiler",
"->",
"insert",
"(",
"new",
"PackageTreeBuilder",
"(",
")",
",",
"PackageTreeBuilder",
"::",
"COMPILER_PRIORITY",
")",
";",
"$",
"compiler",
"->",
"insert",
"(",
"new",
"NamespaceTreeBuilder",
"(",
")",
",",
"NamespaceTreeBuilder",
"::",
"COMPILER_PRIORITY",
")",
";",
"$",
"compiler",
"->",
"insert",
"(",
"new",
"ResolveInlineLinkAndSeeTags",
"(",
"$",
"container",
"[",
"'transformer.routing.queue'",
"]",
")",
",",
"ResolveInlineLinkAndSeeTags",
"::",
"COMPILER_PRIORITY",
")",
";",
"$",
"compiler",
"->",
"insert",
"(",
"$",
"container",
"[",
"'linker'",
"]",
",",
"Linker",
"::",
"COMPILER_PRIORITY",
")",
";",
"$",
"compiler",
"->",
"insert",
"(",
"$",
"container",
"[",
"'transformer'",
"]",
",",
"Transformer",
"::",
"COMPILER_PRIORITY",
")",
";",
"$",
"compiler",
"->",
"insert",
"(",
"new",
"Debug",
"(",
"$",
"container",
"[",
"'monolog'",
"]",
",",
"$",
"container",
"[",
"'descriptor.analyzer'",
"]",
")",
",",
"Debug",
"::",
"COMPILER_PRIORITY",
")",
";",
"return",
"$",
"compiler",
";",
"}",
")",
";",
"$",
"app",
"[",
"'linker'",
"]",
"=",
"$",
"app",
"->",
"share",
"(",
"function",
"(",
"$",
"app",
")",
"{",
"return",
"new",
"Linker",
"(",
"$",
"app",
"[",
"'linker.substitutions'",
"]",
")",
";",
"}",
")",
";",
"$",
"app",
"[",
"'transformer.behaviour.collection'",
"]",
"=",
"$",
"app",
"->",
"share",
"(",
"function",
"(",
")",
"{",
"return",
"new",
"Behaviour",
"\\",
"Collection",
"(",
")",
";",
"}",
")",
";",
"$",
"app",
"[",
"'transformer.routing.standard'",
"]",
"=",
"$",
"app",
"->",
"share",
"(",
"function",
"(",
"$",
"container",
")",
"{",
"/** @var ProjectDescriptorBuilder $projectDescriptorBuilder */",
"$",
"projectDescriptorBuilder",
"=",
"$",
"container",
"[",
"'descriptor.builder'",
"]",
";",
"return",
"new",
"Router",
"\\",
"StandardRouter",
"(",
"$",
"projectDescriptorBuilder",
")",
";",
"}",
")",
";",
"$",
"app",
"[",
"'transformer.routing.external'",
"]",
"=",
"$",
"app",
"->",
"share",
"(",
"function",
"(",
"$",
"container",
")",
"{",
"return",
"new",
"Router",
"\\",
"ExternalRouter",
"(",
"$",
"container",
"[",
"'config'",
"]",
")",
";",
"}",
")",
";",
"$",
"app",
"[",
"'transformer.routing.queue'",
"]",
"=",
"$",
"app",
"->",
"share",
"(",
"function",
"(",
"$",
"container",
")",
"{",
"$",
"queue",
"=",
"new",
"Router",
"\\",
"Queue",
"(",
")",
";",
"// TODO: load from app configuration instead of hardcoded",
"$",
"queue",
"->",
"insert",
"(",
"$",
"container",
"[",
"'transformer.routing.external'",
"]",
",",
"10500",
")",
";",
"$",
"queue",
"->",
"insert",
"(",
"$",
"container",
"[",
"'transformer.routing.standard'",
"]",
",",
"10000",
")",
";",
"return",
"$",
"queue",
";",
"}",
")",
";",
"$",
"app",
"[",
"'transformer.writer.collection'",
"]",
"=",
"$",
"app",
"->",
"share",
"(",
"function",
"(",
"$",
"container",
")",
"{",
"return",
"new",
"Writer",
"\\",
"Collection",
"(",
"$",
"container",
"[",
"'transformer.routing.queue'",
"]",
")",
";",
"}",
")",
";",
"$",
"this",
"->",
"provideTemplatingSystem",
"(",
"$",
"app",
")",
";",
"$",
"app",
"[",
"'transformer'",
"]",
"=",
"$",
"app",
"->",
"share",
"(",
"function",
"(",
"$",
"container",
")",
"{",
"$",
"transformer",
"=",
"new",
"Transformer",
"(",
"$",
"container",
"[",
"'transformer.template.collection'",
"]",
",",
"$",
"container",
"[",
"'transformer.writer.collection'",
"]",
")",
";",
"/** @var Behaviour\\Collection $behaviourCollection */",
"$",
"behaviourCollection",
"=",
"$",
"container",
"[",
"'transformer.behaviour.collection'",
"]",
";",
"Dispatcher",
"::",
"getInstance",
"(",
")",
"->",
"addListener",
"(",
"Transformer",
"::",
"EVENT_PRE_TRANSFORM",
",",
"function",
"(",
"PreTransformEvent",
"$",
"event",
")",
"use",
"(",
"$",
"behaviourCollection",
")",
"{",
"$",
"behaviourCollection",
"->",
"process",
"(",
"$",
"event",
"->",
"getProject",
"(",
")",
")",
";",
"}",
")",
";",
"return",
"$",
"transformer",
";",
"}",
")",
";",
"$",
"app",
"->",
"command",
"(",
"new",
"TransformCommand",
"(",
"$",
"app",
"[",
"'descriptor.builder'",
"]",
",",
"$",
"app",
"[",
"'transformer'",
"]",
",",
"$",
"app",
"[",
"'compiler'",
"]",
")",
")",
";",
"$",
"app",
"->",
"command",
"(",
"new",
"ListCommand",
"(",
"$",
"app",
"[",
"'transformer.template.factory'",
"]",
")",
")",
";",
"}"
] | Registers services on the given app.
@param Application $app An Application instance.
@throws Exception\MissingDependencyException if the application does not have a descriptor.builder service.
@throws Exception\MissingDependencyException if the application does not have a serializer service. | [
"Registers",
"services",
"on",
"the",
"given",
"app",
"."
] | train | https://github.com/heidelpay/PhpDoc/blob/5ac9e842cbd4cbb70900533b240c131f3515ee02/src/phpDocumentor/Transformer/ServiceProvider.php#L47-L198 |
heidelpay/PhpDoc | src/phpDocumentor/Transformer/ServiceProvider.php | ServiceProvider.provideTemplatingSystem | protected function provideTemplatingSystem(Application $app)
{
$templateDir = __DIR__ . '/../../../data/templates';
// when installed using composer the templates are in a different folder
$composerTemplatePath = __DIR__ . '/../../../../templates';
if (file_exists($composerTemplatePath)) {
$templateDir = $composerTemplatePath;
}
// parameters
$app['transformer.template.location'] = $templateDir;
// services
$app['transformer.template.path_resolver'] = $app->share(
function ($container) {
return new PathResolver($container['transformer.template.location']);
}
);
$app['transformer.template.factory'] = $app->share(
function ($container) {
return new Factory(
$container['transformer.template.path_resolver'],
$container['serializer']
);
}
);
$app['transformer.template.collection'] = $app->share(
function ($container) {
return new Template\Collection(
$container['transformer.template.factory'],
$container['transformer.writer.collection']
);
}
);
} | php | protected function provideTemplatingSystem(Application $app)
{
$templateDir = __DIR__ . '/../../../data/templates';
// when installed using composer the templates are in a different folder
$composerTemplatePath = __DIR__ . '/../../../../templates';
if (file_exists($composerTemplatePath)) {
$templateDir = $composerTemplatePath;
}
// parameters
$app['transformer.template.location'] = $templateDir;
// services
$app['transformer.template.path_resolver'] = $app->share(
function ($container) {
return new PathResolver($container['transformer.template.location']);
}
);
$app['transformer.template.factory'] = $app->share(
function ($container) {
return new Factory(
$container['transformer.template.path_resolver'],
$container['serializer']
);
}
);
$app['transformer.template.collection'] = $app->share(
function ($container) {
return new Template\Collection(
$container['transformer.template.factory'],
$container['transformer.writer.collection']
);
}
);
} | [
"protected",
"function",
"provideTemplatingSystem",
"(",
"Application",
"$",
"app",
")",
"{",
"$",
"templateDir",
"=",
"__DIR__",
".",
"'/../../../data/templates'",
";",
"// when installed using composer the templates are in a different folder",
"$",
"composerTemplatePath",
"=",
"__DIR__",
".",
"'/../../../../templates'",
";",
"if",
"(",
"file_exists",
"(",
"$",
"composerTemplatePath",
")",
")",
"{",
"$",
"templateDir",
"=",
"$",
"composerTemplatePath",
";",
"}",
"// parameters",
"$",
"app",
"[",
"'transformer.template.location'",
"]",
"=",
"$",
"templateDir",
";",
"// services",
"$",
"app",
"[",
"'transformer.template.path_resolver'",
"]",
"=",
"$",
"app",
"->",
"share",
"(",
"function",
"(",
"$",
"container",
")",
"{",
"return",
"new",
"PathResolver",
"(",
"$",
"container",
"[",
"'transformer.template.location'",
"]",
")",
";",
"}",
")",
";",
"$",
"app",
"[",
"'transformer.template.factory'",
"]",
"=",
"$",
"app",
"->",
"share",
"(",
"function",
"(",
"$",
"container",
")",
"{",
"return",
"new",
"Factory",
"(",
"$",
"container",
"[",
"'transformer.template.path_resolver'",
"]",
",",
"$",
"container",
"[",
"'serializer'",
"]",
")",
";",
"}",
")",
";",
"$",
"app",
"[",
"'transformer.template.collection'",
"]",
"=",
"$",
"app",
"->",
"share",
"(",
"function",
"(",
"$",
"container",
")",
"{",
"return",
"new",
"Template",
"\\",
"Collection",
"(",
"$",
"container",
"[",
"'transformer.template.factory'",
"]",
",",
"$",
"container",
"[",
"'transformer.writer.collection'",
"]",
")",
";",
"}",
")",
";",
"}"
] | Initializes the templating system in the container.
@param Application $app
@return void | [
"Initializes",
"the",
"templating",
"system",
"in",
"the",
"container",
"."
] | train | https://github.com/heidelpay/PhpDoc/blob/5ac9e842cbd4cbb70900533b240c131f3515ee02/src/phpDocumentor/Transformer/ServiceProvider.php#L207-L244 |
heidelpay/PhpDoc | src/phpDocumentor/Transformer/Transformation.php | Transformation.getParametersWithKey | public function getParametersWithKey($name)
{
$parameters = array();
/** @var Parameter $parameter */
foreach ($this->parameters as $parameter) {
if ($parameter->getKey() == $name) {
$parameters[] = $parameter;
}
}
return $parameters;
} | php | public function getParametersWithKey($name)
{
$parameters = array();
/** @var Parameter $parameter */
foreach ($this->parameters as $parameter) {
if ($parameter->getKey() == $name) {
$parameters[] = $parameter;
}
}
return $parameters;
} | [
"public",
"function",
"getParametersWithKey",
"(",
"$",
"name",
")",
"{",
"$",
"parameters",
"=",
"array",
"(",
")",
";",
"/** @var Parameter $parameter */",
"foreach",
"(",
"$",
"this",
"->",
"parameters",
"as",
"$",
"parameter",
")",
"{",
"if",
"(",
"$",
"parameter",
"->",
"getKey",
"(",
")",
"==",
"$",
"name",
")",
"{",
"$",
"parameters",
"[",
"]",
"=",
"$",
"parameter",
";",
"}",
"}",
"return",
"$",
"parameters",
";",
"}"
] | Returns a specific parameter, or $default if none exists.
@param string $name Name of the parameter to return.
@return Parameter | [
"Returns",
"a",
"specific",
"parameter",
"or",
"$default",
"if",
"none",
"exists",
"."
] | train | https://github.com/heidelpay/PhpDoc/blob/5ac9e842cbd4cbb70900533b240c131f3515ee02/src/phpDocumentor/Transformer/Transformation.php#L283-L295 |
j-d/draggy | src/Draggy/Autocode/Templates/Template.php | Template.getIndentationPrefix | public function getIndentationPrefix($times = 1)
{
if (!is_integer($times)) {
throw new \InvalidArgumentException('The times parameter has to be an integer');
}
$indentation = '';
for ($i = 0; $i < $times; $i++) {
$indentation .= $this->getTemplate()->getIndentation();
}
return $indentation;
} | php | public function getIndentationPrefix($times = 1)
{
if (!is_integer($times)) {
throw new \InvalidArgumentException('The times parameter has to be an integer');
}
$indentation = '';
for ($i = 0; $i < $times; $i++) {
$indentation .= $this->getTemplate()->getIndentation();
}
return $indentation;
} | [
"public",
"function",
"getIndentationPrefix",
"(",
"$",
"times",
"=",
"1",
")",
"{",
"if",
"(",
"!",
"is_integer",
"(",
"$",
"times",
")",
")",
"{",
"throw",
"new",
"\\",
"InvalidArgumentException",
"(",
"'The times parameter has to be an integer'",
")",
";",
"}",
"$",
"indentation",
"=",
"''",
";",
"for",
"(",
"$",
"i",
"=",
"0",
";",
"$",
"i",
"<",
"$",
"times",
";",
"$",
"i",
"++",
")",
"{",
"$",
"indentation",
".=",
"$",
"this",
"->",
"getTemplate",
"(",
")",
"->",
"getIndentation",
"(",
")",
";",
"}",
"return",
"$",
"indentation",
";",
"}"
] | Returns all the indentation that should be put before the current line
@param int $times
@return string
@throws \InvalidArgumentException | [
"Returns",
"all",
"the",
"indentation",
"that",
"should",
"be",
"put",
"before",
"the",
"current",
"line"
] | train | https://github.com/j-d/draggy/blob/97ffc66e1aacb5f685d7aac5251c4abb8888d4bb/src/Draggy/Autocode/Templates/Template.php#L88-L101 |
j-d/draggy | src/Draggy/Autocode/Templates/Template.php | Template.convertLinesToCode | public function convertLinesToCode(array $lines) {
if (0 === count($lines)) {
return '';
}
if (0 !== strlen($this->getTemplate()->getIndentationPrefix())) {
foreach ($lines as $lineNumber => $line) {
if (null === $line) {
unset($lines[$lineNumber]);
} elseif ('' === trim($line)) {
$lines[$lineNumber] = '';
}
}
}
return implode($this->getTemplate()->getEol(), $lines) . $this->getTemplate()->getEol();
} | php | public function convertLinesToCode(array $lines) {
if (0 === count($lines)) {
return '';
}
if (0 !== strlen($this->getTemplate()->getIndentationPrefix())) {
foreach ($lines as $lineNumber => $line) {
if (null === $line) {
unset($lines[$lineNumber]);
} elseif ('' === trim($line)) {
$lines[$lineNumber] = '';
}
}
}
return implode($this->getTemplate()->getEol(), $lines) . $this->getTemplate()->getEol();
} | [
"public",
"function",
"convertLinesToCode",
"(",
"array",
"$",
"lines",
")",
"{",
"if",
"(",
"0",
"===",
"count",
"(",
"$",
"lines",
")",
")",
"{",
"return",
"''",
";",
"}",
"if",
"(",
"0",
"!==",
"strlen",
"(",
"$",
"this",
"->",
"getTemplate",
"(",
")",
"->",
"getIndentationPrefix",
"(",
")",
")",
")",
"{",
"foreach",
"(",
"$",
"lines",
"as",
"$",
"lineNumber",
"=>",
"$",
"line",
")",
"{",
"if",
"(",
"null",
"===",
"$",
"line",
")",
"{",
"unset",
"(",
"$",
"lines",
"[",
"$",
"lineNumber",
"]",
")",
";",
"}",
"elseif",
"(",
"''",
"===",
"trim",
"(",
"$",
"line",
")",
")",
"{",
"$",
"lines",
"[",
"$",
"lineNumber",
"]",
"=",
"''",
";",
"}",
"}",
"}",
"return",
"implode",
"(",
"$",
"this",
"->",
"getTemplate",
"(",
")",
"->",
"getEol",
"(",
")",
",",
"$",
"lines",
")",
".",
"$",
"this",
"->",
"getTemplate",
"(",
")",
"->",
"getEol",
"(",
")",
";",
"}"
] | Converts an array of lines into code, including the current indentation
@param array $lines
@return string | [
"Converts",
"an",
"array",
"of",
"lines",
"into",
"code",
"including",
"the",
"current",
"indentation"
] | train | https://github.com/j-d/draggy/blob/97ffc66e1aacb5f685d7aac5251c4abb8888d4bb/src/Draggy/Autocode/Templates/Template.php#L110-L126 |
j-d/draggy | src/Draggy/Autocode/Templates/Template.php | Template.getBlurbLines | public function getBlurbLines()
{
$lines = [];
$lines[] = '';
$lines[] = '/************************************************************************************************';
$lines[] = ' ** THIS IS AN AUTOMATICALLY GENERATED BASE FILE AND SHOULD NOT BE MANUALLY EDITED **';
$lines[] = ' ** All user content should be placed within <user-additions' . ' part="(name)"></user-additions' . '> **';
$lines[] = ' ************************************************************************************************/';
$lines[] = '';
$lines[] = '/*';
$lines[] = ' * This file was automatically generated with \'Autocode\'';
$lines[] = ' * by Jose Diaz-Angulo <[email protected]>';
$lines[] = ' * ';
$lines[] = ' * For the full copyright and license information, please view the LICENSE';
$lines[] = ' * file that was distributed with the package\'s source code.';
$lines[] = ' */';
$lines[] = '';
return $lines;
} | php | public function getBlurbLines()
{
$lines = [];
$lines[] = '';
$lines[] = '/************************************************************************************************';
$lines[] = ' ** THIS IS AN AUTOMATICALLY GENERATED BASE FILE AND SHOULD NOT BE MANUALLY EDITED **';
$lines[] = ' ** All user content should be placed within <user-additions' . ' part="(name)"></user-additions' . '> **';
$lines[] = ' ************************************************************************************************/';
$lines[] = '';
$lines[] = '/*';
$lines[] = ' * This file was automatically generated with \'Autocode\'';
$lines[] = ' * by Jose Diaz-Angulo <[email protected]>';
$lines[] = ' * ';
$lines[] = ' * For the full copyright and license information, please view the LICENSE';
$lines[] = ' * file that was distributed with the package\'s source code.';
$lines[] = ' */';
$lines[] = '';
return $lines;
} | [
"public",
"function",
"getBlurbLines",
"(",
")",
"{",
"$",
"lines",
"=",
"[",
"]",
";",
"$",
"lines",
"[",
"]",
"=",
"''",
";",
"$",
"lines",
"[",
"]",
"=",
"'/************************************************************************************************'",
";",
"$",
"lines",
"[",
"]",
"=",
"' ** THIS IS AN AUTOMATICALLY GENERATED BASE FILE AND SHOULD NOT BE MANUALLY EDITED **'",
";",
"$",
"lines",
"[",
"]",
"=",
"' ** All user content should be placed within <user-additions'",
".",
"' part=\"(name)\"></user-additions'",
".",
"'> **'",
";",
"$",
"lines",
"[",
"]",
"=",
"' ************************************************************************************************/'",
";",
"$",
"lines",
"[",
"]",
"=",
"''",
";",
"$",
"lines",
"[",
"]",
"=",
"'/*'",
";",
"$",
"lines",
"[",
"]",
"=",
"' * This file was automatically generated with \\'Autocode\\''",
";",
"$",
"lines",
"[",
"]",
"=",
"' * by Jose Diaz-Angulo <[email protected]>'",
";",
"$",
"lines",
"[",
"]",
"=",
"' * '",
";",
"$",
"lines",
"[",
"]",
"=",
"' * For the full copyright and license information, please view the LICENSE'",
";",
"$",
"lines",
"[",
"]",
"=",
"' * file that was distributed with the package\\'s source code.'",
";",
"$",
"lines",
"[",
"]",
"=",
"' */'",
";",
"$",
"lines",
"[",
"]",
"=",
"''",
";",
"return",
"$",
"lines",
";",
"}"
] | Get the default Blurb
@return string | [
"Get",
"the",
"default",
"Blurb"
] | train | https://github.com/j-d/draggy/blob/97ffc66e1aacb5f685d7aac5251c4abb8888d4bb/src/Draggy/Autocode/Templates/Template.php#L133-L153 |
prooph/link-monitor | src/Service/DbalProcessLogger.php | DbalProcessLogger.getLastLoggedProcesses | public function getLastLoggedProcesses($offset = 0, $limit = 10)
{
$query = $this->connection->createQueryBuilder();
$query->select('*')->from(self::TABLE)->orderBy('started_at', 'DESC')->setFirstResult($offset)->setMaxResults($limit);
return $query->execute()->fetchAll();
} | php | public function getLastLoggedProcesses($offset = 0, $limit = 10)
{
$query = $this->connection->createQueryBuilder();
$query->select('*')->from(self::TABLE)->orderBy('started_at', 'DESC')->setFirstResult($offset)->setMaxResults($limit);
return $query->execute()->fetchAll();
} | [
"public",
"function",
"getLastLoggedProcesses",
"(",
"$",
"offset",
"=",
"0",
",",
"$",
"limit",
"=",
"10",
")",
"{",
"$",
"query",
"=",
"$",
"this",
"->",
"connection",
"->",
"createQueryBuilder",
"(",
")",
";",
"$",
"query",
"->",
"select",
"(",
"'*'",
")",
"->",
"from",
"(",
"self",
"::",
"TABLE",
")",
"->",
"orderBy",
"(",
"'started_at'",
",",
"'DESC'",
")",
"->",
"setFirstResult",
"(",
"$",
"offset",
")",
"->",
"setMaxResults",
"(",
"$",
"limit",
")",
";",
"return",
"$",
"query",
"->",
"execute",
"(",
")",
"->",
"fetchAll",
"(",
")",
";",
"}"
] | Orders process logs by started_at DESC
Returns array of process log entry arrays.
Each process log contains the information:
- process_id => UUID string
- status => running|succeed|failed
- start_message => string|null
- started_at => \DateTime::ISO8601 formatted
- finished_at => \DateTime::ISO8601 formatted
@param int $offset
@param int $limit
@return array | [
"Orders",
"process",
"logs",
"by",
"started_at",
"DESC",
"Returns",
"array",
"of",
"process",
"log",
"entry",
"arrays",
".",
"Each",
"process",
"log",
"contains",
"the",
"information",
":"
] | train | https://github.com/prooph/link-monitor/blob/5dd12a4bda48eb05471181bf4dab43938cf39df8/src/Service/DbalProcessLogger.php#L161-L168 |
frdl/webfan | .ApplicationComposer/lib/frdl/Flow/ComponentType.php | ComponentType.& | public function &__get($name)
{
$retval = null;
if('name' === $name){
return $this->name;
}elseif('dump' === $name){
$retval = $this->_dump();
return $retval;
}elseif (isset($this->data[$name])){
$retval = $this->data[$name];
return $retval;
}
return $retval;
} | php | public function &__get($name)
{
$retval = null;
if('name' === $name){
return $this->name;
}elseif('dump' === $name){
$retval = $this->_dump();
return $retval;
}elseif (isset($this->data[$name])){
$retval = $this->data[$name];
return $retval;
}
return $retval;
} | [
"public",
"function",
"&",
"__get",
"(",
"$",
"name",
")",
"{",
"$",
"retval",
"=",
"null",
";",
"if",
"(",
"'name'",
"===",
"$",
"name",
")",
"{",
"return",
"$",
"this",
"->",
"name",
";",
"}",
"elseif",
"(",
"'dump'",
"===",
"$",
"name",
")",
"{",
"$",
"retval",
"=",
"$",
"this",
"->",
"_dump",
"(",
")",
";",
"return",
"$",
"retval",
";",
"}",
"elseif",
"(",
"isset",
"(",
"$",
"this",
"->",
"data",
"[",
"$",
"name",
"]",
")",
")",
"{",
"$",
"retval",
"=",
"$",
"this",
"->",
"data",
"[",
"$",
"name",
"]",
";",
"return",
"$",
"retval",
";",
"}",
"return",
"$",
"retval",
";",
"}"
] | /*
public function __toString()
{
return $this->name;
} | [
"/",
"*",
"public",
"function",
"__toString",
"()",
"{",
"return",
"$this",
"-",
">",
"name",
";",
"}"
] | train | https://github.com/frdl/webfan/blob/84d270377685224e891cd9d571b103b36f05b845/.ApplicationComposer/lib/frdl/Flow/ComponentType.php#L62-L77 |
nabab/bbn | src/bbn/user/permissions.php | permissions.from_path | public function from_path(string $path, $type = 'page'): ?string
{
$parent = null;
if ( $root = $this->opt->from_code($type, self::$option_root_id) ){
$parts = explode('/', $path);
$parent = $root;
foreach ( $parts as $i => $p ){
$is_not_last = $i < (\count($parts) - 1);
if ( !empty($p) ){
$prev_parent = $parent;
// Adds a slash for each bit of the path except the last one
$parent = $this->opt->from_code($p.($is_not_last ? '/' : ''), $prev_parent);
// If not found looking for a subpermission
if ( !$parent && $is_not_last ){
$parent = $this->opt->from_code($p, $prev_parent);
}
}
}
}
return $parent ?: null;
} | php | public function from_path(string $path, $type = 'page'): ?string
{
$parent = null;
if ( $root = $this->opt->from_code($type, self::$option_root_id) ){
$parts = explode('/', $path);
$parent = $root;
foreach ( $parts as $i => $p ){
$is_not_last = $i < (\count($parts) - 1);
if ( !empty($p) ){
$prev_parent = $parent;
// Adds a slash for each bit of the path except the last one
$parent = $this->opt->from_code($p.($is_not_last ? '/' : ''), $prev_parent);
// If not found looking for a subpermission
if ( !$parent && $is_not_last ){
$parent = $this->opt->from_code($p, $prev_parent);
}
}
}
}
return $parent ?: null;
} | [
"public",
"function",
"from_path",
"(",
"string",
"$",
"path",
",",
"$",
"type",
"=",
"'page'",
")",
":",
"?",
"string",
"{",
"$",
"parent",
"=",
"null",
";",
"if",
"(",
"$",
"root",
"=",
"$",
"this",
"->",
"opt",
"->",
"from_code",
"(",
"$",
"type",
",",
"self",
"::",
"$",
"option_root_id",
")",
")",
"{",
"$",
"parts",
"=",
"explode",
"(",
"'/'",
",",
"$",
"path",
")",
";",
"$",
"parent",
"=",
"$",
"root",
";",
"foreach",
"(",
"$",
"parts",
"as",
"$",
"i",
"=>",
"$",
"p",
")",
"{",
"$",
"is_not_last",
"=",
"$",
"i",
"<",
"(",
"\\",
"count",
"(",
"$",
"parts",
")",
"-",
"1",
")",
";",
"if",
"(",
"!",
"empty",
"(",
"$",
"p",
")",
")",
"{",
"$",
"prev_parent",
"=",
"$",
"parent",
";",
"// Adds a slash for each bit of the path except the last one",
"$",
"parent",
"=",
"$",
"this",
"->",
"opt",
"->",
"from_code",
"(",
"$",
"p",
".",
"(",
"$",
"is_not_last",
"?",
"'/'",
":",
"''",
")",
",",
"$",
"prev_parent",
")",
";",
"// If not found looking for a subpermission",
"if",
"(",
"!",
"$",
"parent",
"&&",
"$",
"is_not_last",
")",
"{",
"$",
"parent",
"=",
"$",
"this",
"->",
"opt",
"->",
"from_code",
"(",
"$",
"p",
",",
"$",
"prev_parent",
")",
";",
"}",
"}",
"}",
"}",
"return",
"$",
"parent",
"?",
":",
"null",
";",
"}"
] | Returns the option's ID corresponds to the given path.
@param string $path
@param string $type
@return null|string | [
"Returns",
"the",
"option",
"s",
"ID",
"corresponds",
"to",
"the",
"given",
"path",
"."
] | train | https://github.com/nabab/bbn/blob/439fea2faa0de22fdaae2611833bab8061f40c37/src/bbn/user/permissions.php#L76-L96 |
nabab/bbn | src/bbn/user/permissions.php | permissions.options | public function options(string $id_option = null, string $type = 'page'): ?array
{
if (
($id_option = $this->_get_id_option($id_option, $type)) &&
($os = $this->opt->options(\func_get_args()))
){
$res = [];
foreach ( $os as $o ){
if ( $this->pref->has($o['id']) ){
$res[] = $o;
}
}
return $res;
}
return null;
} | php | public function options(string $id_option = null, string $type = 'page'): ?array
{
if (
($id_option = $this->_get_id_option($id_option, $type)) &&
($os = $this->opt->options(\func_get_args()))
){
$res = [];
foreach ( $os as $o ){
if ( $this->pref->has($o['id']) ){
$res[] = $o;
}
}
return $res;
}
return null;
} | [
"public",
"function",
"options",
"(",
"string",
"$",
"id_option",
"=",
"null",
",",
"string",
"$",
"type",
"=",
"'page'",
")",
":",
"?",
"array",
"{",
"if",
"(",
"(",
"$",
"id_option",
"=",
"$",
"this",
"->",
"_get_id_option",
"(",
"$",
"id_option",
",",
"$",
"type",
")",
")",
"&&",
"(",
"$",
"os",
"=",
"$",
"this",
"->",
"opt",
"->",
"options",
"(",
"\\",
"func_get_args",
"(",
")",
")",
")",
")",
"{",
"$",
"res",
"=",
"[",
"]",
";",
"foreach",
"(",
"$",
"os",
"as",
"$",
"o",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"pref",
"->",
"has",
"(",
"$",
"o",
"[",
"'id'",
"]",
")",
")",
"{",
"$",
"res",
"[",
"]",
"=",
"$",
"o",
";",
"}",
"}",
"return",
"$",
"res",
";",
"}",
"return",
"null",
";",
"}"
] | Returns the result of appui\options::options filtered with only the ones authorized to the current user.
@param string|null $id_option
@param string $type
@return array|null | [
"Returns",
"the",
"result",
"of",
"appui",
"\\",
"options",
"::",
"options",
"filtered",
"with",
"only",
"the",
"ones",
"authorized",
"to",
"the",
"current",
"user",
"."
] | train | https://github.com/nabab/bbn/blob/439fea2faa0de22fdaae2611833bab8061f40c37/src/bbn/user/permissions.php#L105-L120 |
nabab/bbn | src/bbn/user/permissions.php | permissions.full_options | public function full_options(string $id_option = null, string $type = 'page'): ?array
{
if (
($id_option = $this->_get_id_option($id_option, $type)) &&
($os = $this->opt->full_options(\func_get_args()))
){
$res = [];
foreach ( $os as $o ){
if ( ($ids = $this->pref->retrieve_ids($o['id'])) && ($cfg = $this->pref->get($ids[0])) ){
$res[] = bbn\x::merge_arrays($o, $cfg);
}
}
return $res;
}
return null;
} | php | public function full_options(string $id_option = null, string $type = 'page'): ?array
{
if (
($id_option = $this->_get_id_option($id_option, $type)) &&
($os = $this->opt->full_options(\func_get_args()))
){
$res = [];
foreach ( $os as $o ){
if ( ($ids = $this->pref->retrieve_ids($o['id'])) && ($cfg = $this->pref->get($ids[0])) ){
$res[] = bbn\x::merge_arrays($o, $cfg);
}
}
return $res;
}
return null;
} | [
"public",
"function",
"full_options",
"(",
"string",
"$",
"id_option",
"=",
"null",
",",
"string",
"$",
"type",
"=",
"'page'",
")",
":",
"?",
"array",
"{",
"if",
"(",
"(",
"$",
"id_option",
"=",
"$",
"this",
"->",
"_get_id_option",
"(",
"$",
"id_option",
",",
"$",
"type",
")",
")",
"&&",
"(",
"$",
"os",
"=",
"$",
"this",
"->",
"opt",
"->",
"full_options",
"(",
"\\",
"func_get_args",
"(",
")",
")",
")",
")",
"{",
"$",
"res",
"=",
"[",
"]",
";",
"foreach",
"(",
"$",
"os",
"as",
"$",
"o",
")",
"{",
"if",
"(",
"(",
"$",
"ids",
"=",
"$",
"this",
"->",
"pref",
"->",
"retrieve_ids",
"(",
"$",
"o",
"[",
"'id'",
"]",
")",
")",
"&&",
"(",
"$",
"cfg",
"=",
"$",
"this",
"->",
"pref",
"->",
"get",
"(",
"$",
"ids",
"[",
"0",
"]",
")",
")",
")",
"{",
"$",
"res",
"[",
"]",
"=",
"bbn",
"\\",
"x",
"::",
"merge_arrays",
"(",
"$",
"o",
",",
"$",
"cfg",
")",
";",
"}",
"}",
"return",
"$",
"res",
";",
"}",
"return",
"null",
";",
"}"
] | Returns the result of appui\options::full_options filtered with only the ones authorized to the current user.
@param string|null $id_option
@param string $type
@return array|null | [
"Returns",
"the",
"result",
"of",
"appui",
"\\",
"options",
"::",
"full_options",
"filtered",
"with",
"only",
"the",
"ones",
"authorized",
"to",
"the",
"current",
"user",
"."
] | train | https://github.com/nabab/bbn/blob/439fea2faa0de22fdaae2611833bab8061f40c37/src/bbn/user/permissions.php#L129-L144 |
nabab/bbn | src/bbn/user/permissions.php | permissions.get_all | public function get_all(string $id_option = null, string $type = 'page'): ?array
{
if ( $id_option = $this->_get_id_option($id_option, $type) ){
return $this->pref->options($id_option ?: $this->get_current());
}
return null;
} | php | public function get_all(string $id_option = null, string $type = 'page'): ?array
{
if ( $id_option = $this->_get_id_option($id_option, $type) ){
return $this->pref->options($id_option ?: $this->get_current());
}
return null;
} | [
"public",
"function",
"get_all",
"(",
"string",
"$",
"id_option",
"=",
"null",
",",
"string",
"$",
"type",
"=",
"'page'",
")",
":",
"?",
"array",
"{",
"if",
"(",
"$",
"id_option",
"=",
"$",
"this",
"->",
"_get_id_option",
"(",
"$",
"id_option",
",",
"$",
"type",
")",
")",
"{",
"return",
"$",
"this",
"->",
"pref",
"->",
"options",
"(",
"$",
"id_option",
"?",
":",
"$",
"this",
"->",
"get_current",
"(",
")",
")",
";",
"}",
"return",
"null",
";",
"}"
] | Returns the full list of permissions existing in the given option
@param null|string $id_option
@param string $type
@return null|array | [
"Returns",
"the",
"full",
"list",
"of",
"permissions",
"existing",
"in",
"the",
"given",
"option"
] | train | https://github.com/nabab/bbn/blob/439fea2faa0de22fdaae2611833bab8061f40c37/src/bbn/user/permissions.php#L153-L159 |
nabab/bbn | src/bbn/user/permissions.php | permissions.get_full | public function get_full($id_option = null, string $type = 'page'): ?array
{
if ( $id_option = $this->_get_id_option($id_option, $type) ){
return $this->pref->full_options($id_option ?: $this->get_current());
}
return null;
} | php | public function get_full($id_option = null, string $type = 'page'): ?array
{
if ( $id_option = $this->_get_id_option($id_option, $type) ){
return $this->pref->full_options($id_option ?: $this->get_current());
}
return null;
} | [
"public",
"function",
"get_full",
"(",
"$",
"id_option",
"=",
"null",
",",
"string",
"$",
"type",
"=",
"'page'",
")",
":",
"?",
"array",
"{",
"if",
"(",
"$",
"id_option",
"=",
"$",
"this",
"->",
"_get_id_option",
"(",
"$",
"id_option",
",",
"$",
"type",
")",
")",
"{",
"return",
"$",
"this",
"->",
"pref",
"->",
"full_options",
"(",
"$",
"id_option",
"?",
":",
"$",
"this",
"->",
"get_current",
"(",
")",
")",
";",
"}",
"return",
"null",
";",
"}"
] | Returns the full list of permissions existing in the given option with all the current user's preferences
@param null|string $id_option
@param string $type
@return array|bool|false | [
"Returns",
"the",
"full",
"list",
"of",
"permissions",
"existing",
"in",
"the",
"given",
"option",
"with",
"all",
"the",
"current",
"user",
"s",
"preferences"
] | train | https://github.com/nabab/bbn/blob/439fea2faa0de22fdaae2611833bab8061f40c37/src/bbn/user/permissions.php#L168-L174 |
nabab/bbn | src/bbn/user/permissions.php | permissions.get | public function get(string $id_option = null, string $type = 'page', bool $force = false): ?array
{
/*
if ( $all = $this->get_all($id_option, $type) ){
$r = [];
foreach ( $all as $a ){
if ( $this->has($a['id'], '', $force) ){
$r[] = $a;
}
}
return $r;
}
*/
if (
($id_option = $this->_get_id_option($id_option, $type)) &&
$this->has($id_option, $type, $force)
){
return $this->pref->option($id_option);
}
return null;
} | php | public function get(string $id_option = null, string $type = 'page', bool $force = false): ?array
{
/*
if ( $all = $this->get_all($id_option, $type) ){
$r = [];
foreach ( $all as $a ){
if ( $this->has($a['id'], '', $force) ){
$r[] = $a;
}
}
return $r;
}
*/
if (
($id_option = $this->_get_id_option($id_option, $type)) &&
$this->has($id_option, $type, $force)
){
return $this->pref->option($id_option);
}
return null;
} | [
"public",
"function",
"get",
"(",
"string",
"$",
"id_option",
"=",
"null",
",",
"string",
"$",
"type",
"=",
"'page'",
",",
"bool",
"$",
"force",
"=",
"false",
")",
":",
"?",
"array",
"{",
"/*\n if ( $all = $this->get_all($id_option, $type) ){\n $r = [];\n foreach ( $all as $a ){\n if ( $this->has($a['id'], '', $force) ){\n $r[] = $a;\n }\n }\n return $r;\n }\n */",
"if",
"(",
"(",
"$",
"id_option",
"=",
"$",
"this",
"->",
"_get_id_option",
"(",
"$",
"id_option",
",",
"$",
"type",
")",
")",
"&&",
"$",
"this",
"->",
"has",
"(",
"$",
"id_option",
",",
"$",
"type",
",",
"$",
"force",
")",
")",
"{",
"return",
"$",
"this",
"->",
"pref",
"->",
"option",
"(",
"$",
"id_option",
")",
";",
"}",
"return",
"null",
";",
"}"
] | Returns an option combined with its sole/first permission
@param string $id_option
@param string $type
@param bool $force
@return array|bool | [
"Returns",
"an",
"option",
"combined",
"with",
"its",
"sole",
"/",
"first",
"permission"
] | train | https://github.com/nabab/bbn/blob/439fea2faa0de22fdaae2611833bab8061f40c37/src/bbn/user/permissions.php#L184-L204 |
nabab/bbn | src/bbn/user/permissions.php | permissions.has | public function has(string $id_option = null, string $type = 'page', bool $force = false): bool
{
if ( !$force && $this->user && $this->user->is_dev() ){
return true;
}
if ( $id_option = $this->_get_id_option($id_option, $type) ){
$option = $this->opt->option($id_option);
if ( !empty($option['public']) ){
return true;
}
return $this->pref->has($id_option, $force);
}
return false;
} | php | public function has(string $id_option = null, string $type = 'page', bool $force = false): bool
{
if ( !$force && $this->user && $this->user->is_dev() ){
return true;
}
if ( $id_option = $this->_get_id_option($id_option, $type) ){
$option = $this->opt->option($id_option);
if ( !empty($option['public']) ){
return true;
}
return $this->pref->has($id_option, $force);
}
return false;
} | [
"public",
"function",
"has",
"(",
"string",
"$",
"id_option",
"=",
"null",
",",
"string",
"$",
"type",
"=",
"'page'",
",",
"bool",
"$",
"force",
"=",
"false",
")",
":",
"bool",
"{",
"if",
"(",
"!",
"$",
"force",
"&&",
"$",
"this",
"->",
"user",
"&&",
"$",
"this",
"->",
"user",
"->",
"is_dev",
"(",
")",
")",
"{",
"return",
"true",
";",
"}",
"if",
"(",
"$",
"id_option",
"=",
"$",
"this",
"->",
"_get_id_option",
"(",
"$",
"id_option",
",",
"$",
"type",
")",
")",
"{",
"$",
"option",
"=",
"$",
"this",
"->",
"opt",
"->",
"option",
"(",
"$",
"id_option",
")",
";",
"if",
"(",
"!",
"empty",
"(",
"$",
"option",
"[",
"'public'",
"]",
")",
")",
"{",
"return",
"true",
";",
"}",
"return",
"$",
"this",
"->",
"pref",
"->",
"has",
"(",
"$",
"id_option",
",",
"$",
"force",
")",
";",
"}",
"return",
"false",
";",
"}"
] | Checks if a user and/or a group has a permission.
@param mixed $id_option
@param string $type
@param bool $force
@return bool | [
"Checks",
"if",
"a",
"user",
"and",
"/",
"or",
"a",
"group",
"has",
"a",
"permission",
"."
] | train | https://github.com/nabab/bbn/blob/439fea2faa0de22fdaae2611833bab8061f40c37/src/bbn/user/permissions.php#L214-L227 |
nabab/bbn | src/bbn/user/permissions.php | permissions.is | public function is(string $path, string $type = 'page'): ?string
{
return $this->from_path($path, $type);
} | php | public function is(string $path, string $type = 'page'): ?string
{
return $this->from_path($path, $type);
} | [
"public",
"function",
"is",
"(",
"string",
"$",
"path",
",",
"string",
"$",
"type",
"=",
"'page'",
")",
":",
"?",
"string",
"{",
"return",
"$",
"this",
"->",
"from_path",
"(",
"$",
"path",
",",
"$",
"type",
")",
";",
"}"
] | Checks if an option corresponds to the given path.
@param string $path
@param string $type
@return null|string | [
"Checks",
"if",
"an",
"option",
"corresponds",
"to",
"the",
"given",
"path",
"."
] | train | https://github.com/nabab/bbn/blob/439fea2faa0de22fdaae2611833bab8061f40c37/src/bbn/user/permissions.php#L236-L239 |
nabab/bbn | src/bbn/user/permissions.php | permissions.customize | public function customize(array $arr): array
{
$res = [];
if ( isset($arr[0]) ){
foreach ( $arr as $a ){
if ( isset($a['id']) && $this->has($a['id']) ){
$res[] = $a;
}
}
}
else if ( isset($arr['items']) ){
$res = $arr;
unset($res['items']);
foreach ( $arr['items'] as $a ){
if ( isset($a['id']) && $this->has($a['id']) ){
if ( !isset($res['items']) ){
$res['items'] = [];
}
$res['items'][] = $a;
}
}
}
return $res;
} | php | public function customize(array $arr): array
{
$res = [];
if ( isset($arr[0]) ){
foreach ( $arr as $a ){
if ( isset($a['id']) && $this->has($a['id']) ){
$res[] = $a;
}
}
}
else if ( isset($arr['items']) ){
$res = $arr;
unset($res['items']);
foreach ( $arr['items'] as $a ){
if ( isset($a['id']) && $this->has($a['id']) ){
if ( !isset($res['items']) ){
$res['items'] = [];
}
$res['items'][] = $a;
}
}
}
return $res;
} | [
"public",
"function",
"customize",
"(",
"array",
"$",
"arr",
")",
":",
"array",
"{",
"$",
"res",
"=",
"[",
"]",
";",
"if",
"(",
"isset",
"(",
"$",
"arr",
"[",
"0",
"]",
")",
")",
"{",
"foreach",
"(",
"$",
"arr",
"as",
"$",
"a",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"a",
"[",
"'id'",
"]",
")",
"&&",
"$",
"this",
"->",
"has",
"(",
"$",
"a",
"[",
"'id'",
"]",
")",
")",
"{",
"$",
"res",
"[",
"]",
"=",
"$",
"a",
";",
"}",
"}",
"}",
"else",
"if",
"(",
"isset",
"(",
"$",
"arr",
"[",
"'items'",
"]",
")",
")",
"{",
"$",
"res",
"=",
"$",
"arr",
";",
"unset",
"(",
"$",
"res",
"[",
"'items'",
"]",
")",
";",
"foreach",
"(",
"$",
"arr",
"[",
"'items'",
"]",
"as",
"$",
"a",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"a",
"[",
"'id'",
"]",
")",
"&&",
"$",
"this",
"->",
"has",
"(",
"$",
"a",
"[",
"'id'",
"]",
")",
")",
"{",
"if",
"(",
"!",
"isset",
"(",
"$",
"res",
"[",
"'items'",
"]",
")",
")",
"{",
"$",
"res",
"[",
"'items'",
"]",
"=",
"[",
"]",
";",
"}",
"$",
"res",
"[",
"'items'",
"]",
"[",
"]",
"=",
"$",
"a",
";",
"}",
"}",
"}",
"return",
"$",
"res",
";",
"}"
] | Adapts a given array of options' to user's permissions
@param array $arr
@return array | [
"Adapts",
"a",
"given",
"array",
"of",
"options",
"to",
"user",
"s",
"permissions"
] | train | https://github.com/nabab/bbn/blob/439fea2faa0de22fdaae2611833bab8061f40c37/src/bbn/user/permissions.php#L247-L270 |
nabab/bbn | src/bbn/user/permissions.php | permissions.add | public function add(string $id_option, string $type = 'page'): ?int
{
if ( $id_option = $this->_get_id_option($id_option, $type) ){
return $this->pref->set_by_option($id_option, []);
}
return null;
} | php | public function add(string $id_option, string $type = 'page'): ?int
{
if ( $id_option = $this->_get_id_option($id_option, $type) ){
return $this->pref->set_by_option($id_option, []);
}
return null;
} | [
"public",
"function",
"add",
"(",
"string",
"$",
"id_option",
",",
"string",
"$",
"type",
"=",
"'page'",
")",
":",
"?",
"int",
"{",
"if",
"(",
"$",
"id_option",
"=",
"$",
"this",
"->",
"_get_id_option",
"(",
"$",
"id_option",
",",
"$",
"type",
")",
")",
"{",
"return",
"$",
"this",
"->",
"pref",
"->",
"set_by_option",
"(",
"$",
"id_option",
",",
"[",
"]",
")",
";",
"}",
"return",
"null",
";",
"}"
] | Grants a new permission to a user or a group
@param null|string $id_option
@param string $type
@return int | [
"Grants",
"a",
"new",
"permission",
"to",
"a",
"user",
"or",
"a",
"group"
] | train | https://github.com/nabab/bbn/blob/439fea2faa0de22fdaae2611833bab8061f40c37/src/bbn/user/permissions.php#L278-L284 |
nabab/bbn | src/bbn/user/permissions.php | permissions.remove | public function remove($id_option, string $type = 'page'): ?int
{
if ( $id_option = $this->_get_id_option($id_option, $type) ){
return $this->pref->delete($id_option);
}
return null;
} | php | public function remove($id_option, string $type = 'page'): ?int
{
if ( $id_option = $this->_get_id_option($id_option, $type) ){
return $this->pref->delete($id_option);
}
return null;
} | [
"public",
"function",
"remove",
"(",
"$",
"id_option",
",",
"string",
"$",
"type",
"=",
"'page'",
")",
":",
"?",
"int",
"{",
"if",
"(",
"$",
"id_option",
"=",
"$",
"this",
"->",
"_get_id_option",
"(",
"$",
"id_option",
",",
"$",
"type",
")",
")",
"{",
"return",
"$",
"this",
"->",
"pref",
"->",
"delete",
"(",
"$",
"id_option",
")",
";",
"}",
"return",
"null",
";",
"}"
] | Deletes a preference for a path or an ID.
@param null|string $id_option
@param string $type
@return null|int | [
"Deletes",
"a",
"preference",
"for",
"a",
"path",
"or",
"an",
"ID",
"."
] | train | https://github.com/nabab/bbn/blob/439fea2faa0de22fdaae2611833bab8061f40c37/src/bbn/user/permissions.php#L293-L299 |
nabab/bbn | src/bbn/user/permissions.php | permissions.read_option | public function read_option(string $id_option = null): ?bool
{
if ( bbn\str::is_uid($id_option) ){
$root = self::get_option_id('options');
$id_to_check = $this->opt->from_code('opt'.$id_option, $root);
return $this->has($id_to_check, 'options');
}
return null;
} | php | public function read_option(string $id_option = null): ?bool
{
if ( bbn\str::is_uid($id_option) ){
$root = self::get_option_id('options');
$id_to_check = $this->opt->from_code('opt'.$id_option, $root);
return $this->has($id_to_check, 'options');
}
return null;
} | [
"public",
"function",
"read_option",
"(",
"string",
"$",
"id_option",
"=",
"null",
")",
":",
"?",
"bool",
"{",
"if",
"(",
"bbn",
"\\",
"str",
"::",
"is_uid",
"(",
"$",
"id_option",
")",
")",
"{",
"$",
"root",
"=",
"self",
"::",
"get_option_id",
"(",
"'options'",
")",
";",
"$",
"id_to_check",
"=",
"$",
"this",
"->",
"opt",
"->",
"from_code",
"(",
"'opt'",
".",
"$",
"id_option",
",",
"$",
"root",
")",
";",
"return",
"$",
"this",
"->",
"has",
"(",
"$",
"id_to_check",
",",
"'options'",
")",
";",
"}",
"return",
"null",
";",
"}"
] | Checks if the category represented by the given option ID is readable by the current user
@param string|null $id_option
@return bool|null | [
"Checks",
"if",
"the",
"category",
"represented",
"by",
"the",
"given",
"option",
"ID",
"is",
"readable",
"by",
"the",
"current",
"user"
] | train | https://github.com/nabab/bbn/blob/439fea2faa0de22fdaae2611833bab8061f40c37/src/bbn/user/permissions.php#L307-L315 |
Erdiko/core | src/View.php | View.renderMustache | public function renderMustache($filename, $data) {
// This is for mustache compatibility
$data['getView'] = function($name, $data) {
return $this->getView($name, $data);
};
return parent::renderMustache($filename, $data);
} | php | public function renderMustache($filename, $data) {
// This is for mustache compatibility
$data['getView'] = function($name, $data) {
return $this->getView($name, $data);
};
return parent::renderMustache($filename, $data);
} | [
"public",
"function",
"renderMustache",
"(",
"$",
"filename",
",",
"$",
"data",
")",
"{",
"// This is for mustache compatibility",
"$",
"data",
"[",
"'getView'",
"]",
"=",
"function",
"(",
"$",
"name",
",",
"$",
"data",
")",
"{",
"return",
"$",
"this",
"->",
"getView",
"(",
"$",
"name",
",",
"$",
"data",
")",
";",
"}",
";",
"return",
"parent",
"::",
"renderMustache",
"(",
"$",
"filename",
",",
"$",
"data",
")",
";",
"}"
] | Attach getView function to the mustache view | [
"Attach",
"getView",
"function",
"to",
"the",
"mustache",
"view"
] | train | https://github.com/Erdiko/core/blob/c7947ee973b0ad2fd05a6d1d8ce45696618c8fa6/src/View.php#L31-L37 |
Erdiko/core | src/View.php | View.getView | public function getView($filename, $data = null)
{
// $data = ($data === null) ? $this->_data : $data;
return $this->getTemplateFile($this->getTemplateFolder().$filename, $data);
} | php | public function getView($filename, $data = null)
{
// $data = ($data === null) ? $this->_data : $data;
return $this->getTemplateFile($this->getTemplateFolder().$filename, $data);
} | [
"public",
"function",
"getView",
"(",
"$",
"filename",
",",
"$",
"data",
"=",
"null",
")",
"{",
"// $data = ($data === null) ? $this->_data : $data;",
"return",
"$",
"this",
"->",
"getTemplateFile",
"(",
"$",
"this",
"->",
"getTemplateFolder",
"(",
")",
".",
"$",
"filename",
",",
"$",
"data",
")",
";",
"}"
] | Get a view, for nesting views
This is a convenience wrapper for inherited getTemplateFile() method
Notes: expects this sub view to be in the same views folder (or nested below this folder relative to views/). | [
"Get",
"a",
"view",
"for",
"nesting",
"views",
"This",
"is",
"a",
"convenience",
"wrapper",
"for",
"inherited",
"getTemplateFile",
"()",
"method",
"Notes",
":",
"expects",
"this",
"sub",
"view",
"to",
"be",
"in",
"the",
"same",
"views",
"folder",
"(",
"or",
"nested",
"below",
"this",
"folder",
"relative",
"to",
"views",
"/",
")",
"."
] | train | https://github.com/Erdiko/core/blob/c7947ee973b0ad2fd05a6d1d8ce45696618c8fa6/src/View.php#L45-L49 |
stk2k/net-driver | src/NetDriver/Php/PhpNetDriver.php | PhpNetDriver.sendRequest | public function sendRequest(NetDriverHandleInterface $handle, HttpRequest $request)
{
$url = $request->getUrl();
try{
// fire event after received HTTP response
$request = $this->fireOnSendingRequest($request);
// context
$context = [];
$context['ignore_errors'] = true;
$context['header'] = [];
if ($request instanceof HttpPostRequest)
{
// data
$data = $request->getPostFields();
// header
$context['header'][] = [
"Content-Type: application/x-www-form-urlencoded",
"Content-Length: ".strlen($data)
];
// context
$context['content'] = $request->getPostFields();
}
// proxy
if ($request instanceof HttpProxyRequestInterface){
$proxy_server = $request->getProxyServer();
$proxy_port = $request->getProxyPort();
$context['proxy'] = "tcp://$proxy_server:$proxy_port";
$context['request_fulluri'] = true;
$proxy_auth = $request->getProxyAuth();
if (!empty($proxy_auth)){
$auth = base64_encode($request->getProxyUserPassword());
$context['header'][] = "Proxy-Authorization: Basic $auth";
}
}
// expand header
$context['header'] = implode("\r\n", $context['header']);
// context
$context['method'] = $request->getMethod();
$context = stream_context_create(['http' => $context]);
// send request
$body = file_get_contents($url, false, $context);
if ($body === false){
throw new NetDriverException('file_get_contents failed');
}
if (!preg_match('/HTTP\/1\.[0|1|x] ([0-9]{3})/', $http_response_header[0], $matches)){
throw new NetDriverException('invalid http response header: ' . $http_response_header[0]);
}
$status_code = intval($matches[1]);
$headers = new ResponseHeaders($http_response_header);
$response = new HttpResponse($status_code, $body, $headers);
// fire event after received HTTP response
$this->fireOnReceivedResponse($response);
return $response;
}
catch (\Exception $e){
throw new NetDriverException($url, $e);
}
} | php | public function sendRequest(NetDriverHandleInterface $handle, HttpRequest $request)
{
$url = $request->getUrl();
try{
// fire event after received HTTP response
$request = $this->fireOnSendingRequest($request);
// context
$context = [];
$context['ignore_errors'] = true;
$context['header'] = [];
if ($request instanceof HttpPostRequest)
{
// data
$data = $request->getPostFields();
// header
$context['header'][] = [
"Content-Type: application/x-www-form-urlencoded",
"Content-Length: ".strlen($data)
];
// context
$context['content'] = $request->getPostFields();
}
// proxy
if ($request instanceof HttpProxyRequestInterface){
$proxy_server = $request->getProxyServer();
$proxy_port = $request->getProxyPort();
$context['proxy'] = "tcp://$proxy_server:$proxy_port";
$context['request_fulluri'] = true;
$proxy_auth = $request->getProxyAuth();
if (!empty($proxy_auth)){
$auth = base64_encode($request->getProxyUserPassword());
$context['header'][] = "Proxy-Authorization: Basic $auth";
}
}
// expand header
$context['header'] = implode("\r\n", $context['header']);
// context
$context['method'] = $request->getMethod();
$context = stream_context_create(['http' => $context]);
// send request
$body = file_get_contents($url, false, $context);
if ($body === false){
throw new NetDriverException('file_get_contents failed');
}
if (!preg_match('/HTTP\/1\.[0|1|x] ([0-9]{3})/', $http_response_header[0], $matches)){
throw new NetDriverException('invalid http response header: ' . $http_response_header[0]);
}
$status_code = intval($matches[1]);
$headers = new ResponseHeaders($http_response_header);
$response = new HttpResponse($status_code, $body, $headers);
// fire event after received HTTP response
$this->fireOnReceivedResponse($response);
return $response;
}
catch (\Exception $e){
throw new NetDriverException($url, $e);
}
} | [
"public",
"function",
"sendRequest",
"(",
"NetDriverHandleInterface",
"$",
"handle",
",",
"HttpRequest",
"$",
"request",
")",
"{",
"$",
"url",
"=",
"$",
"request",
"->",
"getUrl",
"(",
")",
";",
"try",
"{",
"// fire event after received HTTP response",
"$",
"request",
"=",
"$",
"this",
"->",
"fireOnSendingRequest",
"(",
"$",
"request",
")",
";",
"// context",
"$",
"context",
"=",
"[",
"]",
";",
"$",
"context",
"[",
"'ignore_errors'",
"]",
"=",
"true",
";",
"$",
"context",
"[",
"'header'",
"]",
"=",
"[",
"]",
";",
"if",
"(",
"$",
"request",
"instanceof",
"HttpPostRequest",
")",
"{",
"// data",
"$",
"data",
"=",
"$",
"request",
"->",
"getPostFields",
"(",
")",
";",
"// header",
"$",
"context",
"[",
"'header'",
"]",
"[",
"]",
"=",
"[",
"\"Content-Type: application/x-www-form-urlencoded\"",
",",
"\"Content-Length: \"",
".",
"strlen",
"(",
"$",
"data",
")",
"]",
";",
"// context",
"$",
"context",
"[",
"'content'",
"]",
"=",
"$",
"request",
"->",
"getPostFields",
"(",
")",
";",
"}",
"// proxy",
"if",
"(",
"$",
"request",
"instanceof",
"HttpProxyRequestInterface",
")",
"{",
"$",
"proxy_server",
"=",
"$",
"request",
"->",
"getProxyServer",
"(",
")",
";",
"$",
"proxy_port",
"=",
"$",
"request",
"->",
"getProxyPort",
"(",
")",
";",
"$",
"context",
"[",
"'proxy'",
"]",
"=",
"\"tcp://$proxy_server:$proxy_port\"",
";",
"$",
"context",
"[",
"'request_fulluri'",
"]",
"=",
"true",
";",
"$",
"proxy_auth",
"=",
"$",
"request",
"->",
"getProxyAuth",
"(",
")",
";",
"if",
"(",
"!",
"empty",
"(",
"$",
"proxy_auth",
")",
")",
"{",
"$",
"auth",
"=",
"base64_encode",
"(",
"$",
"request",
"->",
"getProxyUserPassword",
"(",
")",
")",
";",
"$",
"context",
"[",
"'header'",
"]",
"[",
"]",
"=",
"\"Proxy-Authorization: Basic $auth\"",
";",
"}",
"}",
"// expand header",
"$",
"context",
"[",
"'header'",
"]",
"=",
"implode",
"(",
"\"\\r\\n\"",
",",
"$",
"context",
"[",
"'header'",
"]",
")",
";",
"// context",
"$",
"context",
"[",
"'method'",
"]",
"=",
"$",
"request",
"->",
"getMethod",
"(",
")",
";",
"$",
"context",
"=",
"stream_context_create",
"(",
"[",
"'http'",
"=>",
"$",
"context",
"]",
")",
";",
"// send request",
"$",
"body",
"=",
"file_get_contents",
"(",
"$",
"url",
",",
"false",
",",
"$",
"context",
")",
";",
"if",
"(",
"$",
"body",
"===",
"false",
")",
"{",
"throw",
"new",
"NetDriverException",
"(",
"'file_get_contents failed'",
")",
";",
"}",
"if",
"(",
"!",
"preg_match",
"(",
"'/HTTP\\/1\\.[0|1|x] ([0-9]{3})/'",
",",
"$",
"http_response_header",
"[",
"0",
"]",
",",
"$",
"matches",
")",
")",
"{",
"throw",
"new",
"NetDriverException",
"(",
"'invalid http response header: '",
".",
"$",
"http_response_header",
"[",
"0",
"]",
")",
";",
"}",
"$",
"status_code",
"=",
"intval",
"(",
"$",
"matches",
"[",
"1",
"]",
")",
";",
"$",
"headers",
"=",
"new",
"ResponseHeaders",
"(",
"$",
"http_response_header",
")",
";",
"$",
"response",
"=",
"new",
"HttpResponse",
"(",
"$",
"status_code",
",",
"$",
"body",
",",
"$",
"headers",
")",
";",
"// fire event after received HTTP response",
"$",
"this",
"->",
"fireOnReceivedResponse",
"(",
"$",
"response",
")",
";",
"return",
"$",
"response",
";",
"}",
"catch",
"(",
"\\",
"Exception",
"$",
"e",
")",
"{",
"throw",
"new",
"NetDriverException",
"(",
"$",
"url",
",",
"$",
"e",
")",
";",
"}",
"}"
] | Send HTTP request
@param NetDriverHandleInterface $handle
@param HttpRequest $request
@return HttpResponse
@throws NetDriverException | [
"Send",
"HTTP",
"request"
] | train | https://github.com/stk2k/net-driver/blob/75e0bc1a95ba430dd9ed9e69f6a0a5dd8f2e7b1c/src/NetDriver/Php/PhpNetDriver.php#L37-L111 |
Eresus/EresusCMS | src/core/FS/NameFilter.php | Eresus_FS_NameFilter.setAllowedChars | public function setAllowedChars($pcreCharSet)
{
assert('is_string($pcreCharSet)');
if (@preg_match('/[^' . $pcreCharSet . ']/', '') === false)
{
throw new InvalidArgumentException(
sprintf('"%s" must be a valid PCRE character class (without square brackets)',
$pcreCharSet));
}
$this->allowedChars = $pcreCharSet;
} | php | public function setAllowedChars($pcreCharSet)
{
assert('is_string($pcreCharSet)');
if (@preg_match('/[^' . $pcreCharSet . ']/', '') === false)
{
throw new InvalidArgumentException(
sprintf('"%s" must be a valid PCRE character class (without square brackets)',
$pcreCharSet));
}
$this->allowedChars = $pcreCharSet;
} | [
"public",
"function",
"setAllowedChars",
"(",
"$",
"pcreCharSet",
")",
"{",
"assert",
"(",
"'is_string($pcreCharSet)'",
")",
";",
"if",
"(",
"@",
"preg_match",
"(",
"'/[^'",
".",
"$",
"pcreCharSet",
".",
"']/'",
",",
"''",
")",
"===",
"false",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"sprintf",
"(",
"'\"%s\" must be a valid PCRE character class (without square brackets)'",
",",
"$",
"pcreCharSet",
")",
")",
";",
"}",
"$",
"this",
"->",
"allowedChars",
"=",
"$",
"pcreCharSet",
";",
"}"
] | Задаёт набор допустимых символов
Набор символов по умолчанию задан в {@link $allowedChars}.
Примеры:
- setAllowedChars('a-z') — только строчные латинские буквы
- setAllowedChars('0-1\-') — только цифры и дефис
@param string $pcreCharSet набор допустимых символов в формате PCRE
@throws InvalidArgumentException если указан неправильный символьный класс
@since 3.00 | [
"Задаёт",
"набор",
"допустимых",
"символов"
] | train | https://github.com/Eresus/EresusCMS/blob/b0afc661105f0a2f65d49abac13956cc93c5188d/src/core/FS/NameFilter.php#L62-L74 |
scaytrase/websms-php | src/ScayTrase/WebSMS/Connection/AbstractWebSMSConnection.php | AbstractWebSMSConnection.doSendRequest | protected function doSendRequest(MessageInterface $message)
{
$status = $this->driver->doSendRequest(
array(
static::PARAM_Username => $this->username,
static::PARAM_Password => $this->password,
static::PARAM_Test => $this->test,
static::PARAM_Recipients => $message->getRecipient(),
static::PARAM_Message => $message->getMessage(),
)
);
if ($status[DriverInterface::NORMALIZED_CODE] !== DriverInterface::STATUS_OK) {
throw new DeliveryException(
$message,
$status[DriverInterface::NORMALIZED_MESSAGE],
$status[DriverInterface::NORMALIZED_CODE]
);
}
$this->lastStatus = $status;
return true;
} | php | protected function doSendRequest(MessageInterface $message)
{
$status = $this->driver->doSendRequest(
array(
static::PARAM_Username => $this->username,
static::PARAM_Password => $this->password,
static::PARAM_Test => $this->test,
static::PARAM_Recipients => $message->getRecipient(),
static::PARAM_Message => $message->getMessage(),
)
);
if ($status[DriverInterface::NORMALIZED_CODE] !== DriverInterface::STATUS_OK) {
throw new DeliveryException(
$message,
$status[DriverInterface::NORMALIZED_MESSAGE],
$status[DriverInterface::NORMALIZED_CODE]
);
}
$this->lastStatus = $status;
return true;
} | [
"protected",
"function",
"doSendRequest",
"(",
"MessageInterface",
"$",
"message",
")",
"{",
"$",
"status",
"=",
"$",
"this",
"->",
"driver",
"->",
"doSendRequest",
"(",
"array",
"(",
"static",
"::",
"PARAM_Username",
"=>",
"$",
"this",
"->",
"username",
",",
"static",
"::",
"PARAM_Password",
"=>",
"$",
"this",
"->",
"password",
",",
"static",
"::",
"PARAM_Test",
"=>",
"$",
"this",
"->",
"test",
",",
"static",
"::",
"PARAM_Recipients",
"=>",
"$",
"message",
"->",
"getRecipient",
"(",
")",
",",
"static",
"::",
"PARAM_Message",
"=>",
"$",
"message",
"->",
"getMessage",
"(",
")",
",",
")",
")",
";",
"if",
"(",
"$",
"status",
"[",
"DriverInterface",
"::",
"NORMALIZED_CODE",
"]",
"!==",
"DriverInterface",
"::",
"STATUS_OK",
")",
"{",
"throw",
"new",
"DeliveryException",
"(",
"$",
"message",
",",
"$",
"status",
"[",
"DriverInterface",
"::",
"NORMALIZED_MESSAGE",
"]",
",",
"$",
"status",
"[",
"DriverInterface",
"::",
"NORMALIZED_CODE",
"]",
")",
";",
"}",
"$",
"this",
"->",
"lastStatus",
"=",
"$",
"status",
";",
"return",
"true",
";",
"}"
] | @param MessageInterface $message
@return bool
@throws DeliveryException | [
"@param",
"MessageInterface",
"$message"
] | train | https://github.com/scaytrase/websms-php/blob/afdce1b58cd1bda8a0a0130f8c937bd41b434731/src/ScayTrase/WebSMS/Connection/AbstractWebSMSConnection.php#L69-L92 |
technote-space/wordpress-plugin-base | src/classes/models/lib/input.php | Input.get | public function get( $key = null, $default = null ) {
return func_num_args() === 0 ? $_GET : $this->app->utility->array_get( $_GET, $key, $default );
} | php | public function get( $key = null, $default = null ) {
return func_num_args() === 0 ? $_GET : $this->app->utility->array_get( $_GET, $key, $default );
} | [
"public",
"function",
"get",
"(",
"$",
"key",
"=",
"null",
",",
"$",
"default",
"=",
"null",
")",
"{",
"return",
"func_num_args",
"(",
")",
"===",
"0",
"?",
"$",
"_GET",
":",
"$",
"this",
"->",
"app",
"->",
"utility",
"->",
"array_get",
"(",
"$",
"_GET",
",",
"$",
"key",
",",
"$",
"default",
")",
";",
"}"
] | @param string $key
@param mixed $default
@return mixed | [
"@param",
"string",
"$key",
"@param",
"mixed",
"$default"
] | train | https://github.com/technote-space/wordpress-plugin-base/blob/02cfcba358432a2539af07a69d9db00ff7c14eac/src/classes/models/lib/input.php#L66-L68 |
technote-space/wordpress-plugin-base | src/classes/models/lib/input.php | Input.post | public function post( $key = null, $default = null ) {
return func_num_args() === 0 ? $_POST : $this->app->utility->array_get( $_POST, $key, $default );
} | php | public function post( $key = null, $default = null ) {
return func_num_args() === 0 ? $_POST : $this->app->utility->array_get( $_POST, $key, $default );
} | [
"public",
"function",
"post",
"(",
"$",
"key",
"=",
"null",
",",
"$",
"default",
"=",
"null",
")",
"{",
"return",
"func_num_args",
"(",
")",
"===",
"0",
"?",
"$",
"_POST",
":",
"$",
"this",
"->",
"app",
"->",
"utility",
"->",
"array_get",
"(",
"$",
"_POST",
",",
"$",
"key",
",",
"$",
"default",
")",
";",
"}"
] | @param string $key
@param mixed $default
@return mixed | [
"@param",
"string",
"$key",
"@param",
"mixed",
"$default"
] | train | https://github.com/technote-space/wordpress-plugin-base/blob/02cfcba358432a2539af07a69d9db00ff7c14eac/src/classes/models/lib/input.php#L76-L78 |
technote-space/wordpress-plugin-base | src/classes/models/lib/input.php | Input.request | public function request( $key = null, $default = null ) {
return func_num_args() === 0 ? $_REQUEST : $this->app->utility->array_get( $_REQUEST, $key, $default );
} | php | public function request( $key = null, $default = null ) {
return func_num_args() === 0 ? $_REQUEST : $this->app->utility->array_get( $_REQUEST, $key, $default );
} | [
"public",
"function",
"request",
"(",
"$",
"key",
"=",
"null",
",",
"$",
"default",
"=",
"null",
")",
"{",
"return",
"func_num_args",
"(",
")",
"===",
"0",
"?",
"$",
"_REQUEST",
":",
"$",
"this",
"->",
"app",
"->",
"utility",
"->",
"array_get",
"(",
"$",
"_REQUEST",
",",
"$",
"key",
",",
"$",
"default",
")",
";",
"}"
] | @param string $key
@param mixed $default
@return mixed | [
"@param",
"string",
"$key",
"@param",
"mixed",
"$default"
] | train | https://github.com/technote-space/wordpress-plugin-base/blob/02cfcba358432a2539af07a69d9db00ff7c14eac/src/classes/models/lib/input.php#L86-L88 |
technote-space/wordpress-plugin-base | src/classes/models/lib/input.php | Input.file | public function file( $key = null, $default = null ) {
return func_num_args() === 0 ? $_FILES : $this->app->utility->array_get( $_FILES, $key, $default );
} | php | public function file( $key = null, $default = null ) {
return func_num_args() === 0 ? $_FILES : $this->app->utility->array_get( $_FILES, $key, $default );
} | [
"public",
"function",
"file",
"(",
"$",
"key",
"=",
"null",
",",
"$",
"default",
"=",
"null",
")",
"{",
"return",
"func_num_args",
"(",
")",
"===",
"0",
"?",
"$",
"_FILES",
":",
"$",
"this",
"->",
"app",
"->",
"utility",
"->",
"array_get",
"(",
"$",
"_FILES",
",",
"$",
"key",
",",
"$",
"default",
")",
";",
"}"
] | @param string $key
@param mixed $default
@return mixed | [
"@param",
"string",
"$key",
"@param",
"mixed",
"$default"
] | train | https://github.com/technote-space/wordpress-plugin-base/blob/02cfcba358432a2539af07a69d9db00ff7c14eac/src/classes/models/lib/input.php#L96-L98 |
technote-space/wordpress-plugin-base | src/classes/models/lib/input.php | Input.cookie | public function cookie( $key = null, $default = null ) {
return func_num_args() === 0 ? $_COOKIE : $this->app->utility->array_get( $_COOKIE, $key, $default );
} | php | public function cookie( $key = null, $default = null ) {
return func_num_args() === 0 ? $_COOKIE : $this->app->utility->array_get( $_COOKIE, $key, $default );
} | [
"public",
"function",
"cookie",
"(",
"$",
"key",
"=",
"null",
",",
"$",
"default",
"=",
"null",
")",
"{",
"return",
"func_num_args",
"(",
")",
"===",
"0",
"?",
"$",
"_COOKIE",
":",
"$",
"this",
"->",
"app",
"->",
"utility",
"->",
"array_get",
"(",
"$",
"_COOKIE",
",",
"$",
"key",
",",
"$",
"default",
")",
";",
"}"
] | @param string $key
@param mixed $default
@return mixed | [
"@param",
"string",
"$key",
"@param",
"mixed",
"$default"
] | train | https://github.com/technote-space/wordpress-plugin-base/blob/02cfcba358432a2539af07a69d9db00ff7c14eac/src/classes/models/lib/input.php#L106-L108 |
technote-space/wordpress-plugin-base | src/classes/models/lib/input.php | Input.server | public function server( $key = null, $default = null ) {
return func_num_args() === 0 ? $_SERVER : $this->app->utility->array_get( $_SERVER, strtoupper( $key ), $default );
} | php | public function server( $key = null, $default = null ) {
return func_num_args() === 0 ? $_SERVER : $this->app->utility->array_get( $_SERVER, strtoupper( $key ), $default );
} | [
"public",
"function",
"server",
"(",
"$",
"key",
"=",
"null",
",",
"$",
"default",
"=",
"null",
")",
"{",
"return",
"func_num_args",
"(",
")",
"===",
"0",
"?",
"$",
"_SERVER",
":",
"$",
"this",
"->",
"app",
"->",
"utility",
"->",
"array_get",
"(",
"$",
"_SERVER",
",",
"strtoupper",
"(",
"$",
"key",
")",
",",
"$",
"default",
")",
";",
"}"
] | @param string $key
@param mixed $default
@return mixed | [
"@param",
"string",
"$key",
"@param",
"mixed",
"$default"
] | train | https://github.com/technote-space/wordpress-plugin-base/blob/02cfcba358432a2539af07a69d9db00ff7c14eac/src/classes/models/lib/input.php#L116-L118 |
technote-space/wordpress-plugin-base | src/classes/models/lib/input.php | Input.get_current_url | public function get_current_url( $args = [] ) {
$url = $this->get_current_host() . $this->get_current_path();
if ( ! empty( $args ) ) {
$url = add_query_arg( $args, $url );
}
return $url;
} | php | public function get_current_url( $args = [] ) {
$url = $this->get_current_host() . $this->get_current_path();
if ( ! empty( $args ) ) {
$url = add_query_arg( $args, $url );
}
return $url;
} | [
"public",
"function",
"get_current_url",
"(",
"$",
"args",
"=",
"[",
"]",
")",
"{",
"$",
"url",
"=",
"$",
"this",
"->",
"get_current_host",
"(",
")",
".",
"$",
"this",
"->",
"get_current_path",
"(",
")",
";",
"if",
"(",
"!",
"empty",
"(",
"$",
"args",
")",
")",
"{",
"$",
"url",
"=",
"add_query_arg",
"(",
"$",
"args",
",",
"$",
"url",
")",
";",
"}",
"return",
"$",
"url",
";",
"}"
] | @param array $args
@return string | [
"@param",
"array",
"$args"
] | train | https://github.com/technote-space/wordpress-plugin-base/blob/02cfcba358432a2539af07a69d9db00ff7c14eac/src/classes/models/lib/input.php#L173-L180 |
PayBreak/foundation | src/Decision/Condition/AbstractCondition.php | AbstractCondition.availableTypes | public static function availableTypes()
{
return [
self::CONDITION_EQUAL,
self::CONDITION_NOT_EQUAL,
self::CONDITION_GREATER_THAN,
self::CONDITION_LESS_THAN,
self::CONDITION_GREATER_THAN_OR_EQUAL_TO,
self::CONDITION_LESS_THAN_OR_EQUAL_TO,
self::CONDITION_IF_EMPTY,
self::CONDITION_IF_NOT_EXISTS,
self::CONDITION_IS_DEFAULT,
];
} | php | public static function availableTypes()
{
return [
self::CONDITION_EQUAL,
self::CONDITION_NOT_EQUAL,
self::CONDITION_GREATER_THAN,
self::CONDITION_LESS_THAN,
self::CONDITION_GREATER_THAN_OR_EQUAL_TO,
self::CONDITION_LESS_THAN_OR_EQUAL_TO,
self::CONDITION_IF_EMPTY,
self::CONDITION_IF_NOT_EXISTS,
self::CONDITION_IS_DEFAULT,
];
} | [
"public",
"static",
"function",
"availableTypes",
"(",
")",
"{",
"return",
"[",
"self",
"::",
"CONDITION_EQUAL",
",",
"self",
"::",
"CONDITION_NOT_EQUAL",
",",
"self",
"::",
"CONDITION_GREATER_THAN",
",",
"self",
"::",
"CONDITION_LESS_THAN",
",",
"self",
"::",
"CONDITION_GREATER_THAN_OR_EQUAL_TO",
",",
"self",
"::",
"CONDITION_LESS_THAN_OR_EQUAL_TO",
",",
"self",
"::",
"CONDITION_IF_EMPTY",
",",
"self",
"::",
"CONDITION_IF_NOT_EXISTS",
",",
"self",
"::",
"CONDITION_IS_DEFAULT",
",",
"]",
";",
"}"
] | All Available ConditionInterface Types
@return array | [
"All",
"Available",
"ConditionInterface",
"Types"
] | train | https://github.com/PayBreak/foundation/blob/3dc5a5791e0c95abefa2a415a7f9fdb5abb62ca4/src/Decision/Condition/AbstractCondition.php#L166-L179 |
eghojansu/moe | src/Silet.php | Silet.render | function render($file,$mime='text/html',array $hive=NULL,$ttl=0) {
$fw=Base::instance();
$cache=Cache::instance();
if (!is_dir($tmp=$fw->get('TEMP')))
mkdir($tmp,Base::MODE,TRUE);
foreach ($fw->split($fw->get('UI')) as $dir) {
$cached=$cache->exists($hash=$fw->hash($dir.$file),$data);
if ($cached && $cached[0]+$ttl>microtime(TRUE))
return $data;
if (is_file($view=$fw->fixslashes($dir.$file))) {
if (!is_file($this->view=($tmp.
$fw->hash($fw->get('ROOT').$fw->get('BASE')).'.'.
$fw->hash($view).'.php')) ||
filemtime($this->view)<filemtime($view)) {
// Remove PHP code and comments
$text=preg_replace(
'/(?<!["\'])\h*<\?(?:php|\s*=).+?\?>\h*'.
'(?!["\'])|\{\*.+?\*\}/is','',
$fw->read($view));
$text = $this->parse($text);
$fw->write($this->view,$this->build($text));
}
if (isset($_COOKIE[session_name()]))
@session_start();
$fw->sync('SESSION');
if ($mime && PHP_SAPI!='cli' && !headers_sent())
header('Content-Type: '.($this->mime=$mime).'; '.
'charset='.$fw->get('ENCODING'));
$data=$this->sandbox($hive);
if(isset($this->trigger['afterrender']))
foreach ($this->trigger['afterrender'] as $func)
$data = $fw->call($func, $data);
if ($ttl)
$cache->set($hash,$data);
return $data;
}
}
user_error(sprintf(Base::E_Open,$file),E_USER_ERROR);
} | php | function render($file,$mime='text/html',array $hive=NULL,$ttl=0) {
$fw=Base::instance();
$cache=Cache::instance();
if (!is_dir($tmp=$fw->get('TEMP')))
mkdir($tmp,Base::MODE,TRUE);
foreach ($fw->split($fw->get('UI')) as $dir) {
$cached=$cache->exists($hash=$fw->hash($dir.$file),$data);
if ($cached && $cached[0]+$ttl>microtime(TRUE))
return $data;
if (is_file($view=$fw->fixslashes($dir.$file))) {
if (!is_file($this->view=($tmp.
$fw->hash($fw->get('ROOT').$fw->get('BASE')).'.'.
$fw->hash($view).'.php')) ||
filemtime($this->view)<filemtime($view)) {
// Remove PHP code and comments
$text=preg_replace(
'/(?<!["\'])\h*<\?(?:php|\s*=).+?\?>\h*'.
'(?!["\'])|\{\*.+?\*\}/is','',
$fw->read($view));
$text = $this->parse($text);
$fw->write($this->view,$this->build($text));
}
if (isset($_COOKIE[session_name()]))
@session_start();
$fw->sync('SESSION');
if ($mime && PHP_SAPI!='cli' && !headers_sent())
header('Content-Type: '.($this->mime=$mime).'; '.
'charset='.$fw->get('ENCODING'));
$data=$this->sandbox($hive);
if(isset($this->trigger['afterrender']))
foreach ($this->trigger['afterrender'] as $func)
$data = $fw->call($func, $data);
if ($ttl)
$cache->set($hash,$data);
return $data;
}
}
user_error(sprintf(Base::E_Open,$file),E_USER_ERROR);
} | [
"function",
"render",
"(",
"$",
"file",
",",
"$",
"mime",
"=",
"'text/html'",
",",
"array",
"$",
"hive",
"=",
"NULL",
",",
"$",
"ttl",
"=",
"0",
")",
"{",
"$",
"fw",
"=",
"Base",
"::",
"instance",
"(",
")",
";",
"$",
"cache",
"=",
"Cache",
"::",
"instance",
"(",
")",
";",
"if",
"(",
"!",
"is_dir",
"(",
"$",
"tmp",
"=",
"$",
"fw",
"->",
"get",
"(",
"'TEMP'",
")",
")",
")",
"mkdir",
"(",
"$",
"tmp",
",",
"Base",
"::",
"MODE",
",",
"TRUE",
")",
";",
"foreach",
"(",
"$",
"fw",
"->",
"split",
"(",
"$",
"fw",
"->",
"get",
"(",
"'UI'",
")",
")",
"as",
"$",
"dir",
")",
"{",
"$",
"cached",
"=",
"$",
"cache",
"->",
"exists",
"(",
"$",
"hash",
"=",
"$",
"fw",
"->",
"hash",
"(",
"$",
"dir",
".",
"$",
"file",
")",
",",
"$",
"data",
")",
";",
"if",
"(",
"$",
"cached",
"&&",
"$",
"cached",
"[",
"0",
"]",
"+",
"$",
"ttl",
">",
"microtime",
"(",
"TRUE",
")",
")",
"return",
"$",
"data",
";",
"if",
"(",
"is_file",
"(",
"$",
"view",
"=",
"$",
"fw",
"->",
"fixslashes",
"(",
"$",
"dir",
".",
"$",
"file",
")",
")",
")",
"{",
"if",
"(",
"!",
"is_file",
"(",
"$",
"this",
"->",
"view",
"=",
"(",
"$",
"tmp",
".",
"$",
"fw",
"->",
"hash",
"(",
"$",
"fw",
"->",
"get",
"(",
"'ROOT'",
")",
".",
"$",
"fw",
"->",
"get",
"(",
"'BASE'",
")",
")",
".",
"'.'",
".",
"$",
"fw",
"->",
"hash",
"(",
"$",
"view",
")",
".",
"'.php'",
")",
")",
"||",
"filemtime",
"(",
"$",
"this",
"->",
"view",
")",
"<",
"filemtime",
"(",
"$",
"view",
")",
")",
"{",
"// Remove PHP code and comments",
"$",
"text",
"=",
"preg_replace",
"(",
"'/(?<![\"\\'])\\h*<\\?(?:php|\\s*=).+?\\?>\\h*'",
".",
"'(?![\"\\'])|\\{\\*.+?\\*\\}/is'",
",",
"''",
",",
"$",
"fw",
"->",
"read",
"(",
"$",
"view",
")",
")",
";",
"$",
"text",
"=",
"$",
"this",
"->",
"parse",
"(",
"$",
"text",
")",
";",
"$",
"fw",
"->",
"write",
"(",
"$",
"this",
"->",
"view",
",",
"$",
"this",
"->",
"build",
"(",
"$",
"text",
")",
")",
";",
"}",
"if",
"(",
"isset",
"(",
"$",
"_COOKIE",
"[",
"session_name",
"(",
")",
"]",
")",
")",
"@",
"session_start",
"(",
")",
";",
"$",
"fw",
"->",
"sync",
"(",
"'SESSION'",
")",
";",
"if",
"(",
"$",
"mime",
"&&",
"PHP_SAPI",
"!=",
"'cli'",
"&&",
"!",
"headers_sent",
"(",
")",
")",
"header",
"(",
"'Content-Type: '",
".",
"(",
"$",
"this",
"->",
"mime",
"=",
"$",
"mime",
")",
".",
"'; '",
".",
"'charset='",
".",
"$",
"fw",
"->",
"get",
"(",
"'ENCODING'",
")",
")",
";",
"$",
"data",
"=",
"$",
"this",
"->",
"sandbox",
"(",
"$",
"hive",
")",
";",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"trigger",
"[",
"'afterrender'",
"]",
")",
")",
"foreach",
"(",
"$",
"this",
"->",
"trigger",
"[",
"'afterrender'",
"]",
"as",
"$",
"func",
")",
"$",
"data",
"=",
"$",
"fw",
"->",
"call",
"(",
"$",
"func",
",",
"$",
"data",
")",
";",
"if",
"(",
"$",
"ttl",
")",
"$",
"cache",
"->",
"set",
"(",
"$",
"hash",
",",
"$",
"data",
")",
";",
"return",
"$",
"data",
";",
"}",
"}",
"user_error",
"(",
"sprintf",
"(",
"Base",
"::",
"E_Open",
",",
"$",
"file",
")",
",",
"E_USER_ERROR",
")",
";",
"}"
] | Render template
@return string
@param $file string
@param $mime string
@param $hive array
@param $ttl int | [
"Render",
"template"
] | train | https://github.com/eghojansu/moe/blob/f58ec75a3116d1a572782256e2b38bb9aab95e3c/src/Silet.php#L48-L86 |
eghojansu/moe | src/Silet.php | Silet.esc | function esc($arg) {
$fw=Base::instance();
return $fw->recursive($arg,
function($val) use($fw) {
return is_string($val)?$fw->encode($val):$val;
}
);
} | php | function esc($arg) {
$fw=Base::instance();
return $fw->recursive($arg,
function($val) use($fw) {
return is_string($val)?$fw->encode($val):$val;
}
);
} | [
"function",
"esc",
"(",
"$",
"arg",
")",
"{",
"$",
"fw",
"=",
"Base",
"::",
"instance",
"(",
")",
";",
"return",
"$",
"fw",
"->",
"recursive",
"(",
"$",
"arg",
",",
"function",
"(",
"$",
"val",
")",
"use",
"(",
"$",
"fw",
")",
"{",
"return",
"is_string",
"(",
"$",
"val",
")",
"?",
"$",
"fw",
"->",
"encode",
"(",
"$",
"val",
")",
":",
"$",
"val",
";",
"}",
")",
";",
"}"
] | Encode characters to equivalent HTML entities
@return string
@param $arg mixed | [
"Encode",
"characters",
"to",
"equivalent",
"HTML",
"entities"
] | train | https://github.com/eghojansu/moe/blob/f58ec75a3116d1a572782256e2b38bb9aab95e3c/src/Silet.php#L93-L100 |
eghojansu/moe | src/Silet.php | Silet.raw | function raw($arg) {
$fw=Base::instance();
return $fw->recursive($arg,
function($val) use($fw) {
return is_string($val)?$fw->decode($val):$val;
}
);
} | php | function raw($arg) {
$fw=Base::instance();
return $fw->recursive($arg,
function($val) use($fw) {
return is_string($val)?$fw->decode($val):$val;
}
);
} | [
"function",
"raw",
"(",
"$",
"arg",
")",
"{",
"$",
"fw",
"=",
"Base",
"::",
"instance",
"(",
")",
";",
"return",
"$",
"fw",
"->",
"recursive",
"(",
"$",
"arg",
",",
"function",
"(",
"$",
"val",
")",
"use",
"(",
"$",
"fw",
")",
"{",
"return",
"is_string",
"(",
"$",
"val",
")",
"?",
"$",
"fw",
"->",
"decode",
"(",
"$",
"val",
")",
":",
"$",
"val",
";",
"}",
")",
";",
"}"
] | Decode HTML entities to equivalent characters
@return string
@param $arg mixed | [
"Decode",
"HTML",
"entities",
"to",
"equivalent",
"characters"
] | train | https://github.com/eghojansu/moe/blob/f58ec75a3116d1a572782256e2b38bb9aab95e3c/src/Silet.php#L107-L114 |
eghojansu/moe | src/Silet.php | Silet.filter | function filter($key=NULL,$func=NULL) {
if (!$key)
return array_keys($this->filter);
if (!$func)
return $this->filter[$key];
$this->filter[$key]=$func;
} | php | function filter($key=NULL,$func=NULL) {
if (!$key)
return array_keys($this->filter);
if (!$func)
return $this->filter[$key];
$this->filter[$key]=$func;
} | [
"function",
"filter",
"(",
"$",
"key",
"=",
"NULL",
",",
"$",
"func",
"=",
"NULL",
")",
"{",
"if",
"(",
"!",
"$",
"key",
")",
"return",
"array_keys",
"(",
"$",
"this",
"->",
"filter",
")",
";",
"if",
"(",
"!",
"$",
"func",
")",
"return",
"$",
"this",
"->",
"filter",
"[",
"$",
"key",
"]",
";",
"$",
"this",
"->",
"filter",
"[",
"$",
"key",
"]",
"=",
"$",
"func",
";",
"}"
] | register token filter
@param string $key
@param string $func
@return array | [
"register",
"token",
"filter"
] | train | https://github.com/eghojansu/moe/blob/f58ec75a3116d1a572782256e2b38bb9aab95e3c/src/Silet.php#L132-L138 |
eghojansu/moe | src/Silet.php | Silet._include | protected function _include(array $node) {
$attrib=$node['@attrib'];
$hive='get_defined_vars()';
$if = false;
$include = $attrib[0];
if (isset($attrib[1]) && strpos($attrib[0], 'if ')) {
$if = substr($attrib[0], 3);
$include = $attrib[1];
}
return
'<?php '.($if?
('if ('.$this->token($if).') '):'').
('echo $this->render('.
(preg_match('/@.*$/',$include)?
$this->token($include):
Base::instance()->stringify($include)).','.
'$this->mime,'.$hive.'); ?>');
} | php | protected function _include(array $node) {
$attrib=$node['@attrib'];
$hive='get_defined_vars()';
$if = false;
$include = $attrib[0];
if (isset($attrib[1]) && strpos($attrib[0], 'if ')) {
$if = substr($attrib[0], 3);
$include = $attrib[1];
}
return
'<?php '.($if?
('if ('.$this->token($if).') '):'').
('echo $this->render('.
(preg_match('/@.*$/',$include)?
$this->token($include):
Base::instance()->stringify($include)).','.
'$this->mime,'.$hive.'); ?>');
} | [
"protected",
"function",
"_include",
"(",
"array",
"$",
"node",
")",
"{",
"$",
"attrib",
"=",
"$",
"node",
"[",
"'@attrib'",
"]",
";",
"$",
"hive",
"=",
"'get_defined_vars()'",
";",
"$",
"if",
"=",
"false",
";",
"$",
"include",
"=",
"$",
"attrib",
"[",
"0",
"]",
";",
"if",
"(",
"isset",
"(",
"$",
"attrib",
"[",
"1",
"]",
")",
"&&",
"strpos",
"(",
"$",
"attrib",
"[",
"0",
"]",
",",
"'if '",
")",
")",
"{",
"$",
"if",
"=",
"substr",
"(",
"$",
"attrib",
"[",
"0",
"]",
",",
"3",
")",
";",
"$",
"include",
"=",
"$",
"attrib",
"[",
"1",
"]",
";",
"}",
"return",
"'<?php '",
".",
"(",
"$",
"if",
"?",
"(",
"'if ('",
".",
"$",
"this",
"->",
"token",
"(",
"$",
"if",
")",
".",
"') '",
")",
":",
"''",
")",
".",
"(",
"'echo $this->render('",
".",
"(",
"preg_match",
"(",
"'/@.*$/'",
",",
"$",
"include",
")",
"?",
"$",
"this",
"->",
"token",
"(",
"$",
"include",
")",
":",
"Base",
"::",
"instance",
"(",
")",
"->",
"stringify",
"(",
"$",
"include",
")",
")",
".",
"','",
".",
"'$this->mime,'",
".",
"$",
"hive",
".",
"'); ?>'",
")",
";",
"}"
] | Template -include- tag handler
@return string
@param $node array | [
"Template",
"-",
"include",
"-",
"tag",
"handler"
] | train | https://github.com/eghojansu/moe/blob/f58ec75a3116d1a572782256e2b38bb9aab95e3c/src/Silet.php#L261-L279 |
eghojansu/moe | src/Silet.php | Silet.buildString | protected function buildString($node) {
$self=$this;
return preg_replace_callback(
'/\{\-(.+?)\-\}|\{\{(.+?)\}\}(\n+)?/s',
function($expr) use($self) {
if ($expr[1])
return $expr[1];
$str=trim($self->token($expr[2]));
if (preg_match('/^([^|]+?)\h*\|(\h*\w+(?:\h*[,;]\h*\w+)*)/',
$str,$parts)) {
$str=$parts[1];
foreach (Base::instance()->split($parts[2]) as $func)
$str=$self->filter($func).'('.$str.')';
}
return '<?php echo '.$str.'; ?>'.
(isset($expr[3])?$expr[3]."\n":'');
},
preg_replace_callback(
'/\{~(.+?)~\}/s',
function($expr) use($self) {
return '<?php '.$self->token($expr[1]).' ?>';
},
$node
)
);
} | php | protected function buildString($node) {
$self=$this;
return preg_replace_callback(
'/\{\-(.+?)\-\}|\{\{(.+?)\}\}(\n+)?/s',
function($expr) use($self) {
if ($expr[1])
return $expr[1];
$str=trim($self->token($expr[2]));
if (preg_match('/^([^|]+?)\h*\|(\h*\w+(?:\h*[,;]\h*\w+)*)/',
$str,$parts)) {
$str=$parts[1];
foreach (Base::instance()->split($parts[2]) as $func)
$str=$self->filter($func).'('.$str.')';
}
return '<?php echo '.$str.'; ?>'.
(isset($expr[3])?$expr[3]."\n":'');
},
preg_replace_callback(
'/\{~(.+?)~\}/s',
function($expr) use($self) {
return '<?php '.$self->token($expr[1]).' ?>';
},
$node
)
);
} | [
"protected",
"function",
"buildString",
"(",
"$",
"node",
")",
"{",
"$",
"self",
"=",
"$",
"this",
";",
"return",
"preg_replace_callback",
"(",
"'/\\{\\-(.+?)\\-\\}|\\{\\{(.+?)\\}\\}(\\n+)?/s'",
",",
"function",
"(",
"$",
"expr",
")",
"use",
"(",
"$",
"self",
")",
"{",
"if",
"(",
"$",
"expr",
"[",
"1",
"]",
")",
"return",
"$",
"expr",
"[",
"1",
"]",
";",
"$",
"str",
"=",
"trim",
"(",
"$",
"self",
"->",
"token",
"(",
"$",
"expr",
"[",
"2",
"]",
")",
")",
";",
"if",
"(",
"preg_match",
"(",
"'/^([^|]+?)\\h*\\|(\\h*\\w+(?:\\h*[,;]\\h*\\w+)*)/'",
",",
"$",
"str",
",",
"$",
"parts",
")",
")",
"{",
"$",
"str",
"=",
"$",
"parts",
"[",
"1",
"]",
";",
"foreach",
"(",
"Base",
"::",
"instance",
"(",
")",
"->",
"split",
"(",
"$",
"parts",
"[",
"2",
"]",
")",
"as",
"$",
"func",
")",
"$",
"str",
"=",
"$",
"self",
"->",
"filter",
"(",
"$",
"func",
")",
".",
"'('",
".",
"$",
"str",
".",
"')'",
";",
"}",
"return",
"'<?php echo '",
".",
"$",
"str",
".",
"'; ?>'",
".",
"(",
"isset",
"(",
"$",
"expr",
"[",
"3",
"]",
")",
"?",
"$",
"expr",
"[",
"3",
"]",
".",
"\"\\n\"",
":",
"''",
")",
";",
"}",
",",
"preg_replace_callback",
"(",
"'/\\{~(.+?)~\\}/s'",
",",
"function",
"(",
"$",
"expr",
")",
"use",
"(",
"$",
"self",
")",
"{",
"return",
"'<?php '",
".",
"$",
"self",
"->",
"token",
"(",
"$",
"expr",
"[",
"1",
"]",
")",
".",
"' ?>'",
";",
"}",
",",
"$",
"node",
")",
")",
";",
"}"
] | Assemble markup
@return string
@param $node string | [
"Assemble",
"markup"
] | train | https://github.com/eghojansu/moe/blob/f58ec75a3116d1a572782256e2b38bb9aab95e3c/src/Silet.php#L301-L327 |
eghojansu/moe | src/Silet.php | Silet.parse | protected function parse($text) {
// Build tree structure
$in = array();
for ($ptr=0,$len=strlen($text),$tree=array(),$node=&$tree,
$stack=array(),$depth=0,$tmp='';$ptr<$len;)
if (preg_match('/^@(end)?('.$this->tags.')\b(.*)/i', substr($text,$ptr),$match)) {
$single = substr($match[3], strlen($match[3])-1)==='@';
!$single || $match[3] = substr($match[3], 0, strlen($match[3])-1);
if (strlen($tmp))
$node[] = $tmp;
// Element node
if ($match[1]) {
if ($in) {
// in element
for ($i=count($in)-1; $i > -1 ; --$i)
$in[$i][1] = array_pop($node);
$node['@in'] = $in;
$in = array();
}
// Find matching start tag
$save = $depth;
$found = false;
while ($depth>0) {
$depth--;
foreach ($stack[$depth] as $item)
if (is_array($item) && isset($item[$match[2]])) {
// Start tag found
$found = true;
break 2;
}
}
if (!$found)
// Unbalanced tag
$depth = $save;
$node =& $stack[$depth];
}
elseif ($this->intag($match[2])) {
$in[] = array($match[2], '@attrib'=>$this->parseAttrib($match[3]), '');
}
else {
// Start tag
$stack[$depth] =& $node;
$node =& $node[][$match[2]];
$node['@attrib'] = $this->parseAttrib($match[3]);
if ($single)
// single
$node =& $stack[$depth];
else
$depth++;
}
$tmp = '';
$ptr += strlen($match[0]);
}
else {
// Text node
$tmp .= substr($text,$ptr,1);
$ptr++;
}
if (strlen($tmp))
// Append trailing text
$node[] = $tmp;
// Break references
unset($node, $stack);
return $tree;
} | php | protected function parse($text) {
// Build tree structure
$in = array();
for ($ptr=0,$len=strlen($text),$tree=array(),$node=&$tree,
$stack=array(),$depth=0,$tmp='';$ptr<$len;)
if (preg_match('/^@(end)?('.$this->tags.')\b(.*)/i', substr($text,$ptr),$match)) {
$single = substr($match[3], strlen($match[3])-1)==='@';
!$single || $match[3] = substr($match[3], 0, strlen($match[3])-1);
if (strlen($tmp))
$node[] = $tmp;
// Element node
if ($match[1]) {
if ($in) {
// in element
for ($i=count($in)-1; $i > -1 ; --$i)
$in[$i][1] = array_pop($node);
$node['@in'] = $in;
$in = array();
}
// Find matching start tag
$save = $depth;
$found = false;
while ($depth>0) {
$depth--;
foreach ($stack[$depth] as $item)
if (is_array($item) && isset($item[$match[2]])) {
// Start tag found
$found = true;
break 2;
}
}
if (!$found)
// Unbalanced tag
$depth = $save;
$node =& $stack[$depth];
}
elseif ($this->intag($match[2])) {
$in[] = array($match[2], '@attrib'=>$this->parseAttrib($match[3]), '');
}
else {
// Start tag
$stack[$depth] =& $node;
$node =& $node[][$match[2]];
$node['@attrib'] = $this->parseAttrib($match[3]);
if ($single)
// single
$node =& $stack[$depth];
else
$depth++;
}
$tmp = '';
$ptr += strlen($match[0]);
}
else {
// Text node
$tmp .= substr($text,$ptr,1);
$ptr++;
}
if (strlen($tmp))
// Append trailing text
$node[] = $tmp;
// Break references
unset($node, $stack);
return $tree;
} | [
"protected",
"function",
"parse",
"(",
"$",
"text",
")",
"{",
"// Build tree structure",
"$",
"in",
"=",
"array",
"(",
")",
";",
"for",
"(",
"$",
"ptr",
"=",
"0",
",",
"$",
"len",
"=",
"strlen",
"(",
"$",
"text",
")",
",",
"$",
"tree",
"=",
"array",
"(",
")",
",",
"$",
"node",
"=",
"&",
"$",
"tree",
",",
"$",
"stack",
"=",
"array",
"(",
")",
",",
"$",
"depth",
"=",
"0",
",",
"$",
"tmp",
"=",
"''",
";",
"$",
"ptr",
"<",
"$",
"len",
";",
")",
"if",
"(",
"preg_match",
"(",
"'/^@(end)?('",
".",
"$",
"this",
"->",
"tags",
".",
"')\\b(.*)/i'",
",",
"substr",
"(",
"$",
"text",
",",
"$",
"ptr",
")",
",",
"$",
"match",
")",
")",
"{",
"$",
"single",
"=",
"substr",
"(",
"$",
"match",
"[",
"3",
"]",
",",
"strlen",
"(",
"$",
"match",
"[",
"3",
"]",
")",
"-",
"1",
")",
"===",
"'@'",
";",
"!",
"$",
"single",
"||",
"$",
"match",
"[",
"3",
"]",
"=",
"substr",
"(",
"$",
"match",
"[",
"3",
"]",
",",
"0",
",",
"strlen",
"(",
"$",
"match",
"[",
"3",
"]",
")",
"-",
"1",
")",
";",
"if",
"(",
"strlen",
"(",
"$",
"tmp",
")",
")",
"$",
"node",
"[",
"]",
"=",
"$",
"tmp",
";",
"// Element node",
"if",
"(",
"$",
"match",
"[",
"1",
"]",
")",
"{",
"if",
"(",
"$",
"in",
")",
"{",
"// in element",
"for",
"(",
"$",
"i",
"=",
"count",
"(",
"$",
"in",
")",
"-",
"1",
";",
"$",
"i",
">",
"-",
"1",
";",
"--",
"$",
"i",
")",
"$",
"in",
"[",
"$",
"i",
"]",
"[",
"1",
"]",
"=",
"array_pop",
"(",
"$",
"node",
")",
";",
"$",
"node",
"[",
"'@in'",
"]",
"=",
"$",
"in",
";",
"$",
"in",
"=",
"array",
"(",
")",
";",
"}",
"// Find matching start tag",
"$",
"save",
"=",
"$",
"depth",
";",
"$",
"found",
"=",
"false",
";",
"while",
"(",
"$",
"depth",
">",
"0",
")",
"{",
"$",
"depth",
"--",
";",
"foreach",
"(",
"$",
"stack",
"[",
"$",
"depth",
"]",
"as",
"$",
"item",
")",
"if",
"(",
"is_array",
"(",
"$",
"item",
")",
"&&",
"isset",
"(",
"$",
"item",
"[",
"$",
"match",
"[",
"2",
"]",
"]",
")",
")",
"{",
"// Start tag found",
"$",
"found",
"=",
"true",
";",
"break",
"2",
";",
"}",
"}",
"if",
"(",
"!",
"$",
"found",
")",
"// Unbalanced tag",
"$",
"depth",
"=",
"$",
"save",
";",
"$",
"node",
"=",
"&",
"$",
"stack",
"[",
"$",
"depth",
"]",
";",
"}",
"elseif",
"(",
"$",
"this",
"->",
"intag",
"(",
"$",
"match",
"[",
"2",
"]",
")",
")",
"{",
"$",
"in",
"[",
"]",
"=",
"array",
"(",
"$",
"match",
"[",
"2",
"]",
",",
"'@attrib'",
"=>",
"$",
"this",
"->",
"parseAttrib",
"(",
"$",
"match",
"[",
"3",
"]",
")",
",",
"''",
")",
";",
"}",
"else",
"{",
"// Start tag",
"$",
"stack",
"[",
"$",
"depth",
"]",
"=",
"&",
"$",
"node",
";",
"$",
"node",
"=",
"&",
"$",
"node",
"[",
"]",
"[",
"$",
"match",
"[",
"2",
"]",
"]",
";",
"$",
"node",
"[",
"'@attrib'",
"]",
"=",
"$",
"this",
"->",
"parseAttrib",
"(",
"$",
"match",
"[",
"3",
"]",
")",
";",
"if",
"(",
"$",
"single",
")",
"// single",
"$",
"node",
"=",
"&",
"$",
"stack",
"[",
"$",
"depth",
"]",
";",
"else",
"$",
"depth",
"++",
";",
"}",
"$",
"tmp",
"=",
"''",
";",
"$",
"ptr",
"+=",
"strlen",
"(",
"$",
"match",
"[",
"0",
"]",
")",
";",
"}",
"else",
"{",
"// Text node",
"$",
"tmp",
".=",
"substr",
"(",
"$",
"text",
",",
"$",
"ptr",
",",
"1",
")",
";",
"$",
"ptr",
"++",
";",
"}",
"if",
"(",
"strlen",
"(",
"$",
"tmp",
")",
")",
"// Append trailing text",
"$",
"node",
"[",
"]",
"=",
"$",
"tmp",
";",
"// Break references",
"unset",
"(",
"$",
"node",
",",
"$",
"stack",
")",
";",
"return",
"$",
"tree",
";",
"}"
] | Parse string for template directives and tokens
@return string|array
@param $text string | [
"Parse",
"string",
"for",
"template",
"directives",
"and",
"tokens"
] | train | https://github.com/eghojansu/moe/blob/f58ec75a3116d1a572782256e2b38bb9aab95e3c/src/Silet.php#L334-L399 |
eghojansu/moe | src/Silet.php | Silet.sandbox | protected function sandbox(array $hive=NULL) {
$this->level++;
$fw=Base::instance();
$implicit=false;
if ($hive === null) {
$implicit=true;
$hive=$fw->hive();
}
if ($this->level<2 || $implicit) {
if ($fw->get('ESCAPE'))
$hive=$this->esc($hive);
if (isset($hive['ALIASES']))
$hive['ALIASES']=$fw->build($hive['ALIASES']);
}
unset($fw, $implicit);
extract($hive);
unset($hive);
ob_start();
require($this->view);
$this->level--;
return ob_get_clean();
} | php | protected function sandbox(array $hive=NULL) {
$this->level++;
$fw=Base::instance();
$implicit=false;
if ($hive === null) {
$implicit=true;
$hive=$fw->hive();
}
if ($this->level<2 || $implicit) {
if ($fw->get('ESCAPE'))
$hive=$this->esc($hive);
if (isset($hive['ALIASES']))
$hive['ALIASES']=$fw->build($hive['ALIASES']);
}
unset($fw, $implicit);
extract($hive);
unset($hive);
ob_start();
require($this->view);
$this->level--;
return ob_get_clean();
} | [
"protected",
"function",
"sandbox",
"(",
"array",
"$",
"hive",
"=",
"NULL",
")",
"{",
"$",
"this",
"->",
"level",
"++",
";",
"$",
"fw",
"=",
"Base",
"::",
"instance",
"(",
")",
";",
"$",
"implicit",
"=",
"false",
";",
"if",
"(",
"$",
"hive",
"===",
"null",
")",
"{",
"$",
"implicit",
"=",
"true",
";",
"$",
"hive",
"=",
"$",
"fw",
"->",
"hive",
"(",
")",
";",
"}",
"if",
"(",
"$",
"this",
"->",
"level",
"<",
"2",
"||",
"$",
"implicit",
")",
"{",
"if",
"(",
"$",
"fw",
"->",
"get",
"(",
"'ESCAPE'",
")",
")",
"$",
"hive",
"=",
"$",
"this",
"->",
"esc",
"(",
"$",
"hive",
")",
";",
"if",
"(",
"isset",
"(",
"$",
"hive",
"[",
"'ALIASES'",
"]",
")",
")",
"$",
"hive",
"[",
"'ALIASES'",
"]",
"=",
"$",
"fw",
"->",
"build",
"(",
"$",
"hive",
"[",
"'ALIASES'",
"]",
")",
";",
"}",
"unset",
"(",
"$",
"fw",
",",
"$",
"implicit",
")",
";",
"extract",
"(",
"$",
"hive",
")",
";",
"unset",
"(",
"$",
"hive",
")",
";",
"ob_start",
"(",
")",
";",
"require",
"(",
"$",
"this",
"->",
"view",
")",
";",
"$",
"this",
"->",
"level",
"--",
";",
"return",
"ob_get_clean",
"(",
")",
";",
"}"
] | Create sandbox for template execution
@return string
@param $hive array | [
"Create",
"sandbox",
"for",
"template",
"execution"
] | train | https://github.com/eghojansu/moe/blob/f58ec75a3116d1a572782256e2b38bb9aab95e3c/src/Silet.php#L432-L453 |
alevilar/ristorantino-vendor | Printers/Controller/AfipFacturasController.php | AfipFacturasController.index | public function index() {
$this->AfipFactura->recursive = 0;
$this->AfipFactura->contain(array(
'Mesa' => array(
'Cliente' => array(
'TipoDocumento',
'IvaResponsabilidad'
),
'Mozo'
)
));
$this->set('afipFacturas', $this->Paginator->paginate());
} | php | public function index() {
$this->AfipFactura->recursive = 0;
$this->AfipFactura->contain(array(
'Mesa' => array(
'Cliente' => array(
'TipoDocumento',
'IvaResponsabilidad'
),
'Mozo'
)
));
$this->set('afipFacturas', $this->Paginator->paginate());
} | [
"public",
"function",
"index",
"(",
")",
"{",
"$",
"this",
"->",
"AfipFactura",
"->",
"recursive",
"=",
"0",
";",
"$",
"this",
"->",
"AfipFactura",
"->",
"contain",
"(",
"array",
"(",
"'Mesa'",
"=>",
"array",
"(",
"'Cliente'",
"=>",
"array",
"(",
"'TipoDocumento'",
",",
"'IvaResponsabilidad'",
")",
",",
"'Mozo'",
")",
")",
")",
";",
"$",
"this",
"->",
"set",
"(",
"'afipFacturas'",
",",
"$",
"this",
"->",
"Paginator",
"->",
"paginate",
"(",
")",
")",
";",
"}"
] | index method
@return void | [
"index",
"method"
] | train | https://github.com/alevilar/ristorantino-vendor/blob/6b91a1e20cc0ba09a1968d77e3de6512cfa2d966/Printers/Controller/AfipFacturasController.php#L44-L57 |
alevilar/ristorantino-vendor | Printers/Controller/AfipFacturasController.php | AfipFacturasController.view | public function view($id = null) {
$this->layout = 'Printers.factura';
if (!$this->AfipFactura->exists($id)) {
throw new NotFoundException(__('Factura inexistente'));
}
$options = array(
'conditions' => array(
'AfipFactura.' . $this->AfipFactura->primaryKey => $id
),
'contain' => array(
'Mesa' => array('Cliente' => array('TipoDocumento', 'IvaResponsabilidad'), 'Mozo')
)
);
$factura = $this->AfipFactura->find('first', $options);
$this->set('factura', $factura);
} | php | public function view($id = null) {
$this->layout = 'Printers.factura';
if (!$this->AfipFactura->exists($id)) {
throw new NotFoundException(__('Factura inexistente'));
}
$options = array(
'conditions' => array(
'AfipFactura.' . $this->AfipFactura->primaryKey => $id
),
'contain' => array(
'Mesa' => array('Cliente' => array('TipoDocumento', 'IvaResponsabilidad'), 'Mozo')
)
);
$factura = $this->AfipFactura->find('first', $options);
$this->set('factura', $factura);
} | [
"public",
"function",
"view",
"(",
"$",
"id",
"=",
"null",
")",
"{",
"$",
"this",
"->",
"layout",
"=",
"'Printers.factura'",
";",
"if",
"(",
"!",
"$",
"this",
"->",
"AfipFactura",
"->",
"exists",
"(",
"$",
"id",
")",
")",
"{",
"throw",
"new",
"NotFoundException",
"(",
"__",
"(",
"'Factura inexistente'",
")",
")",
";",
"}",
"$",
"options",
"=",
"array",
"(",
"'conditions'",
"=>",
"array",
"(",
"'AfipFactura.'",
".",
"$",
"this",
"->",
"AfipFactura",
"->",
"primaryKey",
"=>",
"$",
"id",
")",
",",
"'contain'",
"=>",
"array",
"(",
"'Mesa'",
"=>",
"array",
"(",
"'Cliente'",
"=>",
"array",
"(",
"'TipoDocumento'",
",",
"'IvaResponsabilidad'",
")",
",",
"'Mozo'",
")",
")",
")",
";",
"$",
"factura",
"=",
"$",
"this",
"->",
"AfipFactura",
"->",
"find",
"(",
"'first'",
",",
"$",
"options",
")",
";",
"$",
"this",
"->",
"set",
"(",
"'factura'",
",",
"$",
"factura",
")",
";",
"}"
] | view method
@throws NotFoundException
@param string $id
@return void | [
"view",
"method"
] | train | https://github.com/alevilar/ristorantino-vendor/blob/6b91a1e20cc0ba09a1968d77e3de6512cfa2d966/Printers/Controller/AfipFacturasController.php#L66-L81 |
alevilar/ristorantino-vendor | Printers/Controller/AfipFacturasController.php | AfipFacturasController.add | public function add() {
if ($this->request->is('post')) {
$this->AfipFactura->create();
if ($this->AfipFactura->save($this->request->data)) {
$this->Session->setFlash(__('The afip factura has been saved.'));
return $this->redirect(array('action' => 'index'));
} else {
$this->Session->setFlash(__('The afip factura could not be saved. Please, try again.'));
}
}
$mesas = $this->AfipFactura->Mesa->find('list');
$this->set(compact('mesas'));
} | php | public function add() {
if ($this->request->is('post')) {
$this->AfipFactura->create();
if ($this->AfipFactura->save($this->request->data)) {
$this->Session->setFlash(__('The afip factura has been saved.'));
return $this->redirect(array('action' => 'index'));
} else {
$this->Session->setFlash(__('The afip factura could not be saved. Please, try again.'));
}
}
$mesas = $this->AfipFactura->Mesa->find('list');
$this->set(compact('mesas'));
} | [
"public",
"function",
"add",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"request",
"->",
"is",
"(",
"'post'",
")",
")",
"{",
"$",
"this",
"->",
"AfipFactura",
"->",
"create",
"(",
")",
";",
"if",
"(",
"$",
"this",
"->",
"AfipFactura",
"->",
"save",
"(",
"$",
"this",
"->",
"request",
"->",
"data",
")",
")",
"{",
"$",
"this",
"->",
"Session",
"->",
"setFlash",
"(",
"__",
"(",
"'The afip factura has been saved.'",
")",
")",
";",
"return",
"$",
"this",
"->",
"redirect",
"(",
"array",
"(",
"'action'",
"=>",
"'index'",
")",
")",
";",
"}",
"else",
"{",
"$",
"this",
"->",
"Session",
"->",
"setFlash",
"(",
"__",
"(",
"'The afip factura could not be saved. Please, try again.'",
")",
")",
";",
"}",
"}",
"$",
"mesas",
"=",
"$",
"this",
"->",
"AfipFactura",
"->",
"Mesa",
"->",
"find",
"(",
"'list'",
")",
";",
"$",
"this",
"->",
"set",
"(",
"compact",
"(",
"'mesas'",
")",
")",
";",
"}"
] | add method
@return void | [
"add",
"method"
] | train | https://github.com/alevilar/ristorantino-vendor/blob/6b91a1e20cc0ba09a1968d77e3de6512cfa2d966/Printers/Controller/AfipFacturasController.php#L88-L100 |
alevilar/ristorantino-vendor | Printers/Controller/AfipFacturasController.php | AfipFacturasController.edit | public function edit($id = null) {
if (!$this->AfipFactura->exists($id)) {
throw new NotFoundException(__('Invalid afip factura'));
}
if ($this->request->is(array('post', 'put'))) {
if ($this->AfipFactura->save($this->request->data)) {
$this->Session->setFlash(__('The afip factura has been saved.'));
return $this->redirect(array('action' => 'index'));
} else {
$this->Session->setFlash(__('The afip factura could not be saved. Please, try again.'));
}
} else {
$options = array('conditions' => array('AfipFactura.' . $this->AfipFactura->primaryKey => $id));
$this->request->data = $this->AfipFactura->find('first', $options);
}
$mesas = $this->AfipFactura->Mesa->find('list');
$this->set(compact('mesas'));
} | php | public function edit($id = null) {
if (!$this->AfipFactura->exists($id)) {
throw new NotFoundException(__('Invalid afip factura'));
}
if ($this->request->is(array('post', 'put'))) {
if ($this->AfipFactura->save($this->request->data)) {
$this->Session->setFlash(__('The afip factura has been saved.'));
return $this->redirect(array('action' => 'index'));
} else {
$this->Session->setFlash(__('The afip factura could not be saved. Please, try again.'));
}
} else {
$options = array('conditions' => array('AfipFactura.' . $this->AfipFactura->primaryKey => $id));
$this->request->data = $this->AfipFactura->find('first', $options);
}
$mesas = $this->AfipFactura->Mesa->find('list');
$this->set(compact('mesas'));
} | [
"public",
"function",
"edit",
"(",
"$",
"id",
"=",
"null",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"AfipFactura",
"->",
"exists",
"(",
"$",
"id",
")",
")",
"{",
"throw",
"new",
"NotFoundException",
"(",
"__",
"(",
"'Invalid afip factura'",
")",
")",
";",
"}",
"if",
"(",
"$",
"this",
"->",
"request",
"->",
"is",
"(",
"array",
"(",
"'post'",
",",
"'put'",
")",
")",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"AfipFactura",
"->",
"save",
"(",
"$",
"this",
"->",
"request",
"->",
"data",
")",
")",
"{",
"$",
"this",
"->",
"Session",
"->",
"setFlash",
"(",
"__",
"(",
"'The afip factura has been saved.'",
")",
")",
";",
"return",
"$",
"this",
"->",
"redirect",
"(",
"array",
"(",
"'action'",
"=>",
"'index'",
")",
")",
";",
"}",
"else",
"{",
"$",
"this",
"->",
"Session",
"->",
"setFlash",
"(",
"__",
"(",
"'The afip factura could not be saved. Please, try again.'",
")",
")",
";",
"}",
"}",
"else",
"{",
"$",
"options",
"=",
"array",
"(",
"'conditions'",
"=>",
"array",
"(",
"'AfipFactura.'",
".",
"$",
"this",
"->",
"AfipFactura",
"->",
"primaryKey",
"=>",
"$",
"id",
")",
")",
";",
"$",
"this",
"->",
"request",
"->",
"data",
"=",
"$",
"this",
"->",
"AfipFactura",
"->",
"find",
"(",
"'first'",
",",
"$",
"options",
")",
";",
"}",
"$",
"mesas",
"=",
"$",
"this",
"->",
"AfipFactura",
"->",
"Mesa",
"->",
"find",
"(",
"'list'",
")",
";",
"$",
"this",
"->",
"set",
"(",
"compact",
"(",
"'mesas'",
")",
")",
";",
"}"
] | edit method
@throws NotFoundException
@param string $id
@return void | [
"edit",
"method"
] | train | https://github.com/alevilar/ristorantino-vendor/blob/6b91a1e20cc0ba09a1968d77e3de6512cfa2d966/Printers/Controller/AfipFacturasController.php#L109-L126 |
alevilar/ristorantino-vendor | Printers/Controller/AfipFacturasController.php | AfipFacturasController.delete | public function delete($id = null) {
$this->AfipFactura->id = $id;
if (!$this->AfipFactura->exists()) {
throw new NotFoundException(__('Invalid afip factura'));
}
$this->request->allowMethod('post', 'delete');
if ($this->AfipFactura->delete()) {
$this->Session->setFlash(__('The afip factura has been deleted.'));
} else {
$this->Session->setFlash(__('The afip factura could not be deleted. Please, try again.'));
}
return $this->redirect(array('action' => 'index'));
} | php | public function delete($id = null) {
$this->AfipFactura->id = $id;
if (!$this->AfipFactura->exists()) {
throw new NotFoundException(__('Invalid afip factura'));
}
$this->request->allowMethod('post', 'delete');
if ($this->AfipFactura->delete()) {
$this->Session->setFlash(__('The afip factura has been deleted.'));
} else {
$this->Session->setFlash(__('The afip factura could not be deleted. Please, try again.'));
}
return $this->redirect(array('action' => 'index'));
} | [
"public",
"function",
"delete",
"(",
"$",
"id",
"=",
"null",
")",
"{",
"$",
"this",
"->",
"AfipFactura",
"->",
"id",
"=",
"$",
"id",
";",
"if",
"(",
"!",
"$",
"this",
"->",
"AfipFactura",
"->",
"exists",
"(",
")",
")",
"{",
"throw",
"new",
"NotFoundException",
"(",
"__",
"(",
"'Invalid afip factura'",
")",
")",
";",
"}",
"$",
"this",
"->",
"request",
"->",
"allowMethod",
"(",
"'post'",
",",
"'delete'",
")",
";",
"if",
"(",
"$",
"this",
"->",
"AfipFactura",
"->",
"delete",
"(",
")",
")",
"{",
"$",
"this",
"->",
"Session",
"->",
"setFlash",
"(",
"__",
"(",
"'The afip factura has been deleted.'",
")",
")",
";",
"}",
"else",
"{",
"$",
"this",
"->",
"Session",
"->",
"setFlash",
"(",
"__",
"(",
"'The afip factura could not be deleted. Please, try again.'",
")",
")",
";",
"}",
"return",
"$",
"this",
"->",
"redirect",
"(",
"array",
"(",
"'action'",
"=>",
"'index'",
")",
")",
";",
"}"
] | delete method
@throws NotFoundException
@param string $id
@return void | [
"delete",
"method"
] | train | https://github.com/alevilar/ristorantino-vendor/blob/6b91a1e20cc0ba09a1968d77e3de6512cfa2d966/Printers/Controller/AfipFacturasController.php#L135-L147 |
tttptd/laravel-responder | src/Traits/MakesApiRequests.php | MakesApiRequests.seeSuccess | protected function seeSuccess($data = null, $status = 200)
{
$response = $this->seeSuccessResponse($data, $status);
$this->seeSuccessData($response->getData(true)['data']);
return $this;
} | php | protected function seeSuccess($data = null, $status = 200)
{
$response = $this->seeSuccessResponse($data, $status);
$this->seeSuccessData($response->getData(true)['data']);
return $this;
} | [
"protected",
"function",
"seeSuccess",
"(",
"$",
"data",
"=",
"null",
",",
"$",
"status",
"=",
"200",
")",
"{",
"$",
"response",
"=",
"$",
"this",
"->",
"seeSuccessResponse",
"(",
"$",
"data",
",",
"$",
"status",
")",
";",
"$",
"this",
"->",
"seeSuccessData",
"(",
"$",
"response",
"->",
"getData",
"(",
"true",
")",
"[",
"'data'",
"]",
")",
";",
"return",
"$",
"this",
";",
"}"
] | Assert that the response is a valid success response.
@param mixed $data
@param int $status
@return $this | [
"Assert",
"that",
"the",
"response",
"is",
"a",
"valid",
"success",
"response",
"."
] | train | https://github.com/tttptd/laravel-responder/blob/0e4a32701f0de755c1f1af458045829e1bd6caf6/src/Traits/MakesApiRequests.php#L25-L31 |
tttptd/laravel-responder | src/Traits/MakesApiRequests.php | MakesApiRequests.seeSuccessEquals | protected function seeSuccessEquals($data = null, $status = 200)
{
$response = $this->seeSuccessResponse($data, $status);
$this->seeJsonEquals($response->getData(true));
return $this;
} | php | protected function seeSuccessEquals($data = null, $status = 200)
{
$response = $this->seeSuccessResponse($data, $status);
$this->seeJsonEquals($response->getData(true));
return $this;
} | [
"protected",
"function",
"seeSuccessEquals",
"(",
"$",
"data",
"=",
"null",
",",
"$",
"status",
"=",
"200",
")",
"{",
"$",
"response",
"=",
"$",
"this",
"->",
"seeSuccessResponse",
"(",
"$",
"data",
",",
"$",
"status",
")",
";",
"$",
"this",
"->",
"seeJsonEquals",
"(",
"$",
"response",
"->",
"getData",
"(",
"true",
")",
")",
";",
"return",
"$",
"this",
";",
"}"
] | Assert that the response is a valid success response.
@param mixed $data
@param int $status
@return $this | [
"Assert",
"that",
"the",
"response",
"is",
"a",
"valid",
"success",
"response",
"."
] | train | https://github.com/tttptd/laravel-responder/blob/0e4a32701f0de755c1f1af458045829e1bd6caf6/src/Traits/MakesApiRequests.php#L40-L46 |
tttptd/laravel-responder | src/Traits/MakesApiRequests.php | MakesApiRequests.seeSuccessResponse | protected function seeSuccessResponse($data = null, $status = 200):JsonResponse
{
$response = app(Responder::class)->success($data, $status);
$this->seeStatusCode($response->getStatusCode())->seeJson([
'success' => true,
'status' => $response->getStatusCode()
])->seeJsonStructure(['data']);
return $response;
} | php | protected function seeSuccessResponse($data = null, $status = 200):JsonResponse
{
$response = app(Responder::class)->success($data, $status);
$this->seeStatusCode($response->getStatusCode())->seeJson([
'success' => true,
'status' => $response->getStatusCode()
])->seeJsonStructure(['data']);
return $response;
} | [
"protected",
"function",
"seeSuccessResponse",
"(",
"$",
"data",
"=",
"null",
",",
"$",
"status",
"=",
"200",
")",
":",
"JsonResponse",
"{",
"$",
"response",
"=",
"app",
"(",
"Responder",
"::",
"class",
")",
"->",
"success",
"(",
"$",
"data",
",",
"$",
"status",
")",
";",
"$",
"this",
"->",
"seeStatusCode",
"(",
"$",
"response",
"->",
"getStatusCode",
"(",
")",
")",
"->",
"seeJson",
"(",
"[",
"'success'",
"=>",
"true",
",",
"'status'",
"=>",
"$",
"response",
"->",
"getStatusCode",
"(",
")",
"]",
")",
"->",
"seeJsonStructure",
"(",
"[",
"'data'",
"]",
")",
";",
"return",
"$",
"response",
";",
"}"
] | Assert that the response is a valid success response.
@param mixed $data
@param int $status
@return JsonResponse | [
"Assert",
"that",
"the",
"response",
"is",
"a",
"valid",
"success",
"response",
"."
] | train | https://github.com/tttptd/laravel-responder/blob/0e4a32701f0de755c1f1af458045829e1bd6caf6/src/Traits/MakesApiRequests.php#L70-L80 |
tttptd/laravel-responder | src/Traits/MakesApiRequests.php | MakesApiRequests.seeSuccessData | protected function seeSuccessData($data = null)
{
collect($data)->each(function ($value, $key) {
if (is_array($value)) {
$this->seeSuccessData($value);
} else {
$this->seeJson([$key => $value]);
}
});
return $this;
} | php | protected function seeSuccessData($data = null)
{
collect($data)->each(function ($value, $key) {
if (is_array($value)) {
$this->seeSuccessData($value);
} else {
$this->seeJson([$key => $value]);
}
});
return $this;
} | [
"protected",
"function",
"seeSuccessData",
"(",
"$",
"data",
"=",
"null",
")",
"{",
"collect",
"(",
"$",
"data",
")",
"->",
"each",
"(",
"function",
"(",
"$",
"value",
",",
"$",
"key",
")",
"{",
"if",
"(",
"is_array",
"(",
"$",
"value",
")",
")",
"{",
"$",
"this",
"->",
"seeSuccessData",
"(",
"$",
"value",
")",
";",
"}",
"else",
"{",
"$",
"this",
"->",
"seeJson",
"(",
"[",
"$",
"key",
"=>",
"$",
"value",
"]",
")",
";",
"}",
"}",
")",
";",
"return",
"$",
"this",
";",
"}"
] | Assert that the response data contains given values.
@param mixed $data
@return $this | [
"Assert",
"that",
"the",
"response",
"data",
"contains",
"given",
"values",
"."
] | train | https://github.com/tttptd/laravel-responder/blob/0e4a32701f0de755c1f1af458045829e1bd6caf6/src/Traits/MakesApiRequests.php#L88-L99 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.