Update Faker

0 views
Skip to first unread message

Temika

unread,
Aug 5, 2024, 5:49:35 AM8/5/24
to daytorackaa
Fakeris a PHP library that generates fake data for you. Whether you need to bootstrap your database, create good-looking XML documents, fill-in your persistence to stress test it, or anonymize data taken from a production service, Faker is for you.

You can check available Faker locales in the source code, under the Provider directory. The localization of Faker is an ongoing process, for which we need your help. Don't hesitate to create localized providers to your own locale and submit a PR!


You may want to always get the same generated data - for instance when using Faker for unit testing purposes. The generator offers a seed() method, which seeds the random number generator. Calling the same script twice with the same seed produces the same results.


A Faker\Generator alone can't do much generation. It needs Faker\Provider objects to delegate the data generation to them. Faker\Factory::create() actually creates a Faker\Generator bundled with the default providers. Here is what happens under the hood:


Whenever you try to access a property on the $faker object, the generator looks for a method with the same name in all the providers attached to it. For instance, calling $faker->name triggers a call to Faker\Provider\Person::name(). And since Faker starts with the last provider, you can easily override existing formatters: just add a provider containing methods named after the formatters you want to override.


That means that you can easily add your own providers to a Faker\Generator instance. A provider is usually a class extending \Faker\Provider\Base. This parent class allows you to use methods like lexify() or randomNumber(); it also gives you access to formatters of other providers, through the protected $generator property. The new formatters are the public methods of the provider class.


As part of the stories of the year collection, this piece is being resurfaced along with others in the coming days as ESPN Digital and Print Media closes out the year. Check out the full list here.


wo years ago, around the time that League of Legends became the most popular computer game in the world, chat rooms from Berlin to Beijing started to buzz about a mysterious Korean known as GoJeonPa who was tearing up the online ranks. No one had heard of him; many assumed he was a professional gamer slumming it in his spare time. Before long, word spread that GoJeonPa was actually a high schooler who lived on the outskirts of Seoul. By the beginning of 2013, he was the top player on the Korean server.


That spring, SK Telecom, one of several Korean companies that sponsor competitive gaming teams, announced it was forming a second League squad and had signed GoJeonPa. The teenager, whose real name was Lee Sang-hyeok, changed his gamer tag to Faker. When he debuted on the professional circuit in April 2013, the online chatter was deafening.


SK Telecom's first opponent was CJ Blaze, one of the most popular teams in Korea. The match was broadcast on Ongamenet, a cable network devoted to eSports. At the beginning of the game, when the teams selected their characters, or champions, Faker appeared on screen. Reed-thin, with delicate features and an elfin haircut, he chose Nidalee, a female warrior who can mutate into a cougar.


Because League is a five-on-five game shot from a bird's-eye point of view -- unlike first-person shooters like Call of Duty -- the game is tailor-made for spectators. As a studio audience looked on, Faker gingerly approached one of his opponents, an older, well-known player named Ambition. Ambition backed under a tower to upgrade one of his abilities, a process that momentarily froze his champion. Then, in a sequence so abrupt I had to pause and rewatch the clip several times, Faker evolved into cougar form, leaped under the tower and executed Ambition. Before the crowd could react, he sprang away.


"My mind is being blown," said Christopher "MonteCristo" Mykles, one of the studio analysts. "I don't know what to say about this." The audience members stared blankly at the screen, mouths agape. They looked as if they had just witnessed a crime.


Over the next 12 months, SK Telecom went on an unprecedented winning streak. In Faker's first season as a pro, the team reached the Korean semifinals. The next season, it went all the way to the world championship. In front of a sold-out crowd at LA's Staples Center -- plus 32 million online viewers -- Faker and his teammates swept a Chinese squad to take the Summoner's Cup and a $1 million prize. After returning home, they continued to steamroll the competition, winning 15 games in a row.


In Seoul, where eSports are more popular with teenagers than baseball, Faker became a household name. He starred in a commercial for SK Telecom, striding toward the camera in slow motion. The Internet birthed a hashtag, #thingsfakerdoes. Some League fans nicknamed him the Unkillable Demon King; others simply referred to him as God. "I think of him on the same level as Michael Jordan and Tiger Woods -- people who brought their respective industries to the next level," says Jeon Yong Jun, a veteran announcer, or caster. "He was the first true global superstar."


It was perhaps only natural that such a prodigy emerged from Korea, which has dominated the eSports world for more than a decade, churning out gaming wunderkinder the way the Eastern bloc used to produce gymnasts. But no superpower can stay on top forever. Last fall a wave of Korean League stars announced they were leaving the country, lured by huge offers in China. In what became known as the Korean Exodus, two of the best squads, backed by Samsung, were razed, and three SKT starters left. When a Chinese team made a massive offer to Faker -- nearly $1 million, according to some reports -- it seemed inevitable that Korea's reign over League of Legends had come to an end.


ONE NIGHT IN April, SK Telecom is playing Samsung Galaxy at Ongamenet's studio in downtown Seoul. To get to the set, you take a series of escalators through a massive department store, gliding past racks of futuristic beauty products and kimchi refrigerators as you ascend to the roof. Just outside the studio's doors, a young nurse named Kim Han Sol is standing in 4-inch heels, wearing a leather skirt and a black flat-brim that says FAKER in all caps. "He's the most impactful player," she says, absentmindedly stroking one of her thick pigtails as if petting a cat. Kim vividly remembers Faker's first game, against CJ Blaze. "I was very happy. There were a lot of expectations, and he fulfilled them all."


After Faker won back-to-back MVP awards in 2013 and 2014, his supremacy was indisputable. But last spring, SKT started losing -- and backlash began to foment. Headlines on eSports websites asked whether the team's empire had fallen; forums exploded into arguments over whether the 18-year-old star was past his prime. Although most League experts pinned the squad's decline on Faker's teammates, by the end of 2014, when SKT lost in the playoffs, everyone agreed: God had come back to earth. In October, another Korean team, Samsung Galaxy White, hoisted the championship cup.


When I walk into OGN's studio, I'm struck by how closely it resembles a game show set. Teams play in glass booths that face the crowd, and two sets of announcers -- Koreans and English speakers, dressed in checkered blazers and ties -- sit between them, in front of a giant screen displaying the game. OGN's head producer, Crisis Wi, says the channel is the country's most popular cable network among males in their teens and 20s. A recent match drew 500,000 viewers online.


After a slow start this year, SKT brings a hot streak to the match tonight. If the team wins the spring finals in a few weeks, it'll advance to the Mid-Season Invitational in Tallahassee, Florida, where it'll face victors from other regions. (The world championship is slated for October.) Meanwhile, Samsung, which was gutted by the Korean Exodus, has lost eight of its past nine matches. About an hour before the game, the team's new players trudge into their booth, keyboards in hand. Clad in white leather jackets, with matching black glasses and feathery bangs, they look like the world's least intimidating motorcycle gang.


- Former Korean pro Jang Gun-WoongAs I watch from the back of the set, Erik "DoA" Lonnquist, the American play-by-play announcer, walks by and spots Faker behind the stage. "There he is," he says, pointing. "The man, the myth, the legend. The tiny Korean kid." Sensing a rare opportunity to speak to God alone, I hustle across the set. It's warm in the studio, but Faker is wearing a red SK Telecom parka. At 5-foot-8 and 119 pounds, his frame barely fills out the uniform; his cheekbones are so sharp, they cast shadows across his face. He tells my translator he's about to head backstage to get his makeup done. The network slathers the players in luminous foundation, which makes them look like bloodless extras in a vampire movie. I ask Faker whether he hates it, and he says no. "My skin is not so good," he says.


When the Buff Girl, who hypes up the audience before games, skips by and says hello, Faker blushes. (In League, to "buff" a character is to increase its powers.) I try another question: Is he afraid of losing? "I don't get nervous anymore," he replies. One of his managers suddenly appears. She asks my translator whether we're discussing SK Telecom's strategy. Before he can say no, Faker is gone.


Because Samsung is so weak, SKT doesn't even play its star tonight; it subs in his backup, Easyhoon. In recent weeks, there have been rumblings online that Easyhoon -- bespectacled, with sloping bangs and a melancholy expression -- is just as good as God. "Faker is better overall," DoA says when I pose the question to him later. "But the argument can be made that Easyhoon is as useful." Two rows behind me, I see Kim, the nurse, coloring in a sign with a marker. It says: Easyhoon is dreamy.


When the game begins, it quickly becomes obvious that Samsung is overmatched. In League, the teams spawn from opposite corners on the map, and the main objective is to destroy the opponent's castle, or nexus. Along the way, champions harvest gold and power by slaying neutral creatures, accruing weapons and taking out their enemies. At its highest level, League is a deeply tactical game, but it's easy for neophytes to enjoy. Kills are good. Multiple kills are better. SKT easily wins both games.

3a8082e126
Reply all
Reply to author
Forward
0 new messages