Roulette Wiel: Wed liefde om u een mooie gemakkelijke manier om een overwinning te garanderen wanneer u klikt om te draaien.
  • Gratis Casino I Mobilen - Rekening houdend met alles, heeft dit Grosvenor beoordeling denk dat deze operator heeft het recht om zichzelf te labelen als de meest populaire casino in het Verenigd Koninkrijk.
  • Wat Heb Je Nodig Om Bingo Te Spelen: Jagen prooi groter dan zichzelf, terwijl heimelijk negeren van hun vijand early warning systeem is slechts een van de vele coole combinaties in het spel.
  • Winkans bij loterijen

    Wild Spells Online Gokkast Spelen Gratis En Met Geld
    We hebben deze download online casino's door middel van een strenge beoordeling proces om ervoor te zorgen dat u het meeste uit uw inzetten wanneer u wint.
    Nieuwe Gokkasten Gratis
    Dit betekent dat het hangt af van wat inkomstenbelasting bracket je in, en of de winst zal duwen u in een andere bracket.
    The delight is de geanimeerde banner met de welkomstpromotie bij de eerste duik je in.

    Pokersites voor Enschedeers

    Nieuw Casino
    De reel set is 7x7, met een totaal van 49 symbolen in het spel.
    Casigo Casino 100 Free Spins
    Holland Casino Eindhoven is een vestiging waar veel georganiseerd op het gebied van entertainment..
    Casino Spel Gratis Slots

    Sjoerd Maessen blog

    PHP and webdevelopment

    PHP hook, building hooks in your application

    with 35,599 comments

    Introduction
    One of the real challenges in building any type of framework, core or application is making it possible for the developers to hook into the business logic at specific points. Since PHP is not event based, nor it works with interrupts you have to come up an alternative.

    The test case
    Lets assume we are the main developers of a webshop framework. Programmers can use our framework to build complete webshops. Programmers can manage the orders that are placed on the webshop with the order class. The order class is part of our framework and we don’t want it to be extended by any programmer. However we don’t want to limit to programmers in their possibilities to hook into the orders process.

    For example programmers should be able to send an email to the webshopowner if an order changes from one specific delivery status to another. This functionality is not part of the default behavior in our framework and is custom for the progammers webshop implementation.

    Like said before, PHP doesn’t provide interrupts or real events so we need to come up with another way to implement hooks into our application. Lets take a look at the observer pattern.

    Implementing the Observer pattern
    The observer pattern is a design-pattern that describes a way for objects to be notified to specific state-changes in objects of the application.

    For the first implementation we can use SPL. The SPL provides in two simple objects:

    SPLSubject

    • attach (new observer to attach)
    • detach (existing observer to detach)
    • notify (notify all observers)

    SPLObserver

    • update (Called from the subject (i.e. when it’s value has changed).
    iOrderRef = $iOrderRef;
    		
    		// Get order information from the database or an other resources
    		$this->iStatus = Order::STATUS_SHIPPED;
    	}
    	
    	/**
    	 * Attach an observer
    	 * 
    	 * @param SplObserver $oObserver 
    	 * @return void
    	 */
    	public function attach(SplObserver $oObserver)
    	{
    		$sHash = spl_object_hash($oObserver);
    		if (isset($this->aObservers[$sHash])) {
    			throw new Exception('Observer is already attached');
    		}
    
    		$this->aObservers[$sHash] = $oObserver;
    	}
    
    	/**
    	 * Detach observer
    	 * 
    	 * @param SplObserver $oObserver 
    	 * @return void
    	 */
    	public function detach(SplObserver $oObserver)
    	{
    		$sHash = spl_object_hash($oObserver);
    		if (!isset($this->aObservers[$sHash])) {
    			throw new Exception('Observer not attached');
    		}
    		unset($this->aObservers[$sHash]);
    	}
    
    	/**
    	 * Notify the attached observers
    	 * 
    	 * @param string $sEvent, name of the event
    	 * @param mixed $mData, optional data that is not directly available for the observers
    	 * @return void
    	 */
    	public function notify()
    	{
    		foreach ($this->aObservers as $oObserver) {
    			try {
    				$oObserver->update($this);
    			} catch(Exception $e) {
    
    			}
    		}
    	}
    
    	/**
    	 * Add an order
    	 * 
    	 * @param array $aOrder 
    	 * @return void
    	 */
    	public function delete()
    	{
    		$this->notify();
    	}
    	
    	/**
    	 * Return the order reference number
    	 * 
    	 * @return int
    	 */
    	public function getRef()
    	{
    		return $this->iOrderRef;
    	}
    	
    	/**
    	 * Return the current order status
    	 * 
    	 * @return int
    	 */
    	public function getStatus()
    	{
    		return $this->iStatus;
    	}
    	
    	/**
    	 * Update the order status
    	 */
    	public function updateStatus($iStatus)
    	{
    		$this->notify();
    		// ...
    		$this->iStatus = $iStatus;
    		// ...
    		$this->notify();
    	}
    }
    
    /**
     * Order status handler, observer that sends an email to secretary
     * if the status of an order changes from shipped to delivered, so the
     * secratary can make a phone call to our customer to ask for his opinion about the service
     * 
     * @package Shop
     */
    class OrderStatusHandler implements SplObserver
    {
    	/**
    	 * Previous orderstatus
    	 * @var int
    	 */
    	protected $iPreviousOrderStatus;
    	/**
    	 * Current orderstatus
    	 * @var int
    	 */
    	protected $iCurrentOrderStatus;
    	
    	/**
    	 * Update, called by the observable object order
    	 * 
    	 * @param Observable_Interface $oSubject
    	 * @param string $sEvent
    	 * @param mixed $mData 
    	 * @return void
    	 */
    	public function update(SplSubject $oSubject)
    	{
    		if(!$oSubject instanceof Order) {
    			return;
    		}
    		if(is_null($this->iPreviousOrderStatus)) {
    			$this->iPreviousOrderStatus = $oSubject->getStatus();
    		} else {
    			$this->iCurrentOrderStatus = $oSubject->getStatus();
    			if($this->iPreviousOrderStatus === Order::STATUS_SHIPPED && $this->iCurrentOrderStatus === Order::STATUS_DELIVERED) {
    				$sSubject = sprintf('Order number %d is shipped', $oSubject->getRef());
    				//mail('secratary@example.com', 'Order number %d is shipped', 'Text');
    				echo 'Mail sended to the secratary to help her remember to call our customer for a survey.';
    			}
    		}
    	}
    }
    
    $oOrder = new Order(26012011);
    $oOrder->attach(new OrderStatusHandler());
    $oOrder->updateStatus(Order::STATUS_DELIVERED);
    $oOrder->delete();
    ?>

    There are several problems with the implementation above. To most important disadvantage is that we have only one update method in our observer. In this update method we don’t know when and why we are getting notified, just that something happened. We should keep track of everything that happens in the subject. (Or use debug_backtrace… just joking, don’t even think about using it that way ever!).

    Taking it a step further, events
    Lets take a look at the next example, we will extend the Observer implementation with some an additional parameter for the eventname that occured.

    Finishing up, optional data

    iOrderRef = $iOrderRef;
    		
    		// Get order information from the database or something else...
    		$this->iStatus = Order::STATUS_SHIPPED;
    	}
    	
    	/**
    	 * Attach an observer
    	 * 
    	 * @param Observer_Interface $oObserver 
    	 * @return void
    	 */
    	public function attachObserver(Observer_Interface $oObserver)
    	{
    		$sHash = spl_object_hash($oObserver);
    		if (isset($this->aObservers[$sHash])) {
    			throw new Exception('Observer is already attached');
    		}
    
    		$this->aObservers[$sHash] = $oObserver;
    	}
    
    	/**
    	 * Detach observer
    	 * 
    	 * @param Observer_Interface $oObserver 
    	 * @return void
    	 */
    	public function detachObserver(Observer_Interface $oObserver)
    	{
    		$sHash = spl_object_hash($oObserver);
    		if (!isset($this->aObservers[$sHash])) {
    			throw new Exception('Observer not attached');
    		}
    		unset($this->aObservers[$sHash]);
    	}
    
    	/**
    	 * Notify the attached observers
    	 * 
    	 * @param string $sEvent, name of the event
    	 * @param mixed $mData, optional data that is not directly available for the observers
    	 * @return void
    	 */
    	public function notifyObserver($sEvent, $mData=null)
    	{
    		foreach ($this->aObservers as $oObserver) {
    			try {
    				$oObserver->update($this, $sEvent, $mData);
    			} catch(Exception $e) {
    
    			}
    		}
    	}
    
    	/**
    	 * Add an order
    	 * 
    	 * @param array $aOrder 
    	 * @return void
    	 */
    	public function add($aOrder = array())
    	{
    		$this->notifyObserver('onAdd');
    	}
    	
    	/**
    	 * Return the order reference number
    	 * 
    	 * @return int
    	 */
    	public function getRef()
    	{
    		return $this->iOrderRef;
    	}
    	
    	/**
    	 * Return the current order status
    	 * 
    	 * @return int
    	 */
    	public function getStatus()
    	{
    		return $this->iStatus;
    	}
    	
    	/**
    	 * Update the order status
    	 */
    	public function updateStatus($iStatus)
    	{
    		$this->notifyObserver('onBeforeUpdateStatus');
    		// ...
    		$this->iStatus = $iStatus;
    		// ...
    		$this->notifyObserver('onAfterUpdateStatus');
    	}
    }
    
    /**
     * Order status handler, observer that sends an email to secretary
     * if the status of an order changes from shipped to delivered, so the
     * secratary can make a phone call to our customer to ask for his opinion about the service
     * 
     * @package Shop
     */
    class OrderStatusHandler implements Observer_Interface
    {
    	protected $iPreviousOrderStatus;
    	protected $iCurrentOrderStatus;
    	
    	/**
    	 * Update, called by the observable object order
    	 * 
    	 * @param Observable_Interface $oObservable
    	 * @param string $sEvent
    	 * @param mixed $mData 
    	 * @return void
    	 */
    	public function update(Observable_Interface $oObservable, $sEvent, $mData=null)
    	{
    		if(!$oObservable instanceof Order) {
    			return;
    		}
    		
    		switch($sEvent) {
    			case 'onBeforeUpdateStatus':
    				$this->iPreviousOrderStatus = $oObservable->getStatus();
    				return;
    			case 'onAfterUpdateStatus':
    				$this->iCurrentOrderStatus = $oObservable->getStatus();
    				
    				if($this->iPreviousOrderStatus === Order::STATUS_SHIPPED && $this->iCurrentOrderStatus === Order::STATUS_DELIVERED) {
    					$sSubject = sprintf('Order number %d is shipped', $oObservable->getRef());
    					//mail('secratary@example.com', 'Order number %d is shipped', 'Text');
    					echo 'Mail sended to the secratary to help her remember to call our customer for a survey.';
    				}
    		}
    	}
    }
    
    $oOrder = new Order(26012011);
    $oOrder->attachObserver(new OrderStatusHandler());
    $oOrder->updateStatus(Order::STATUS_DELIVERED);
    $oOrder->add();
    ?>

    Now we are able to take action on different events that occur.

    Disadvantages
    Although this implementation works quite well there are some drawbacks. One of those drawbacks is that we need to dispatch an event in our framework, if we don’t programmers can’t hook into our application. Triggering events everywhere give us a small performance penalty however I do think this way of working gives the programmers a nice way to hook into your application on those spots that you want them to hook in.

    Just for the record
    Notice that this code is just an example and can still use some improvements, for example: each observer is initialized even it will maybe never be notified, therefore I suggest to make use of lazy in some cases for loading the objects. There are other systems to hook into an application, more to follow!

    Written by Sjoerd Maessen

    May 23rd, 2011 at 8:02 pm

    Posted in API

    Tagged with , , ,

    35,599 Responses to 'PHP hook, building hooks in your application'

    Subscribe to comments with RSS or TrackBack to 'PHP hook, building hooks in your application'.

    1. Thank you, I have just been searching for info approximately this subject for ages and yours is the greatest I have discovered till
      now. However, what about the bottom line? Are you positive
      in regards to the source?

    2. Инструменты ускоряют обучение, превращая статический курс в адаптивный маршрут: они подстраивают сложность, дают мгновенную обратную связь и масштабируются от одного пользователя до тысяч без потери качества. Лучшие результаты рождает связка человека и ИИ: алгоритмы автоматизируют рутину, ментор усиливает мотивацию и смысл. Подробнее читайте на https://nerdbot.com/2025/08/02/from-beginner-to-pro-how-ai-powered-tools-accelerate-skill-development/ — от новичка к профи быстрее.

      ViradtfRide

      3 Sep 25 at 8:05 pm

    3. прибор узи [url=www.kupit-uzi-apparat27.ru]www.kupit-uzi-apparat27.ru[/url] .

    4. JimmieOrilt

      3 Sep 25 at 8:06 pm

    5. Команда клиники “Аура Здоровья” состоит из опытных и квалифицированных врачей-наркологов, обладающих глубокими знаниями фармакологии и психотерапии. Они регулярно повышают свою квалификацию, участвуя в профессиональных конференциях и семинарах, чтобы применять самые эффективные методы лечения.
      Подробнее можно узнать тут – https://медицинский-вывод-из-запоя.рф/

      GeraldDeerb

      3 Sep 25 at 8:07 pm

    6. Не знаете, куда обратиться в Химках при запое? Клиника Stop Alko предлагает выезд нарколога и медицинское сопровождение прямо у вас дома.
      Углубиться в тему – [url=https://vyvod-iz-zapoya-himki12.ru/]вывод из запоя на дому недорого подольск[/url]

      ShaneSnots

      3 Sep 25 at 8:09 pm

    7. Подарки на новый год коллегам недорого и русская зима новогодние подарки в Ростове-на-Дону. Календарь с логотипом цены и печать блокнотов с логотипом в Самаре. Новогодний набор конфет и подушки к новому году в Москве. Блокнот для мужчины и поделка дедушке на день рождения в Волгограде. Шар новогодний логотип и подарки на новый год оптом: https://www.istoriyaadresov.com/pravdy-ulitsa-24-%d1%81%d1%82%d1%80%d0%be%d0%b5%d0%bd%d0%b8%d0%b5-8-moscow-russia-127137

      RobertWinue

      3 Sep 25 at 8:12 pm

    8. В нашем центре доступны следующие виды помощи:
      Подробнее – [url=https://tajnyj-vyvod-iz-zapoya.ru/vyvod-iz-zapoya-na-domu-v-omske.ru/]www.domen.ru[/url]

      BillykeR

      3 Sep 25 at 8:15 pm

    9. viagra homme [url=https://bluepharmafrance.com/#]BluePharma[/url] livraison rapide et confidentielle

      KennethOpike

      3 Sep 25 at 8:21 pm

    10. 피로가 깊어질수록 더 간절해지는 장소, 강남여성전용마사지는 제게 꼭 필요한 숨구멍이었습니다.

    11. Запой — это не просто несколько дней бесконтрольного употребления алкоголя. Это тяжёлое патологическое состояние, при котором организм человека накапливает токсические продукты распада этанола, теряет жизненно важные электролиты, обезвоживается и выходит из равновесия. На фоне этого нарушается работа сердца, мозга, печени и других систем. Чем дольше длится запой, тем тяжелее последствия и выше риск развития осложнений, вплоть до алкогольного психоза или инсульта. В такой ситуации незаменимым методом экстренной помощи становится капельница от запоя — процедура, позволяющая быстро и безопасно вывести токсины, стабилизировать жизненно важные функции и вернуть человеку контроль над собой.
      Изучить вопрос глубже – http://kapelnica-ot-zapoya-moskva3.ru

      EthanDed

      3 Sep 25 at 8:25 pm

    12. seo аудит веб сайта [url=https://poiskovoe-prodvizhenie-moskva-professionalnoe.ru]seo аудит веб сайта[/url] .

    13. Tadi saya bermain di LOKET88 dan ternyata luar biasa.

      RTP tinggi membantu saya maxwin berulang.
      Selain itu, payout cepat membuat saya makin betah.

      Patut dicoba bagi pemain slot.

    14. оборудование для окраски металлоконструкций Камеры порошковой окраски от производителя купить – это возможность приобрести оборудование напрямую от производителя, получив гарантию качества и техническую поддержку. Производители предлагают широкий ассортимент камер различной конфигурации и размеров, а также оказывают услуги по монтажу и пусконаладке оборудования.

      Richardacemy

      3 Sep 25 at 8:25 pm

    15. seo partner [url=http://www.internet-agentstvo-prodvizhenie-sajtov-seo.ru]http://www.internet-agentstvo-prodvizhenie-sajtov-seo.ru[/url] .

    16. Вывод из запоя рекомендуется в следующих случаях:
      Исследовать вопрос подробнее – https://narko-zakodirovat2.ru/vyvod-iz-zapoya-na-domu-v-moskve/

      PatrickMonnA

      3 Sep 25 at 8:28 pm

    17. JimmieOrilt

      3 Sep 25 at 8:29 pm

    18. 여성전용 마사지 시간만큼은 세상이 멈춘 느낌이었어요.

    19. After 부산토닥이, my
      shoulders and heart both felt lighter.

      부산토닥이

      3 Sep 25 at 8:30 pm

    20. My relatives always say that I am killing my time here at web, however I know I am getting know-how all the time
      by reading thes pleasant content.

    21. seo partners [url=https://internet-agentstvo-prodvizhenie-sajtov-seo.ru/]internet-agentstvo-prodvizhenie-sajtov-seo.ru[/url] .

    22. Thanks , I have just been searching for info approximately this subject for
      a long time and yours is the greatest I’ve discovered so far.
      But, what in regards to the bottom line? Are you sure about the supply?

      here

      3 Sep 25 at 8:39 pm

    23. Миссия клиники “Перезагрузка” заключается в предоставлении высококвалифицированной помощи людям, страдающим от зависимостей. Мы стремимся создать безопасное пространство для лечения, где каждый пациент сможет получить поддержку и понимание. Наша цель — не просто избавление от зависимости, а восстановление полной жизнедеятельности человека.
      Подробнее можно узнать тут – [url=https://zavisim-alko.ru/]вывод из запоя краснодар[/url]

      JamesInits

      3 Sep 25 at 8:39 pm

    24. Jorgegrect

      3 Sep 25 at 8:39 pm

    25. What a material of un-ambiguity and preserveness of valuable familiarity about unpredicted emotions.

    26. It’s the best time to make some plans for the future
      and it’s time to be happy. I’ve read this post and if I could I want to suggest you few interesting
      things or tips. Maybe you could write next articles referring to this article.
      I desire to read more things about it!

      website

      3 Sep 25 at 8:48 pm

    27. Your style is unique compared to other people I have read stuff from.
      Thanks for posting when you have the opportunity, Guess I will just book mark this web site.

      iqos atasehir

      3 Sep 25 at 8:48 pm

    28. наркологическая клиника в воронеже Анонимная клиника Воронеж – это медицинское учреждение, которое гарантирует своим пациентам полную конфиденциальность и неразглашение информации о прохождении лечения. В анонимных клиниках обычно лечат различные виды зависимостей, такие как алкоголизм, наркомания и другие. Пациенты могут не указывать свои настоящие имена и личные данные при обращении за помощью.

      Willieraiff

      3 Sep 25 at 8:51 pm

    29. JimmieOrilt

      3 Sep 25 at 8:52 pm

    30. покрасочные камеры для порошковой окраски Порошковая покрасочная камера цена зависит от её размеров, комплектации и производителя. Камеры бывают ручные и автоматические, с системой рекуперации порошка и без неё. Ручные камеры обычно дешевле, но требуют больше ручного труда. Автоматические камеры обеспечивают более высокую производительность и стабильное качество покрытия.

      Richardacemy

      3 Sep 25 at 8:56 pm

    31. заказать анализ сайта [url=internet-agentstvo-prodvizhenie-sajtov-seo.ru]заказать анализ сайта[/url] .

    32. commander cialis discretement: Pharmacie en ligne livraison Europe – commander cialis discretement

      Maliknaimi

      3 Sep 25 at 9:01 pm

    33. продвижение сайтов в москве [url=http://www.internet-agentstvo-prodvizhenie-sajtov-seo.ru]продвижение сайтов в москве[/url] .

    34. viagra 100 mg prix abordable France [url=https://bluepharmafrance.com/#]livraison rapide et confidentielle[/url] sildenafil citrate 100 mg

      KennethOpike

      3 Sep 25 at 9:04 pm

    35. Everyone loves what you guys are usually up too.
      Such clever work and coverage! Keep up the awesome works guys I’ve added you guys
      to my personal blogroll.

      Akiho Yoshizawa

      3 Sep 25 at 9:07 pm

    36. Its such as you read my mind! You appear to know so much about this, such as you wrote the e book
      in it or something. I think that you could do with a
      few % to power the message house a little bit, but instead of that,
      that is fantastic blog. An excellent read. I’ll certainly be back.

    37. CharlesDar

      3 Sep 25 at 9:09 pm

    38. Just want to say your article is as surprising. The clearness in your post is simply cool and i can assume you are an expert on this subject.
      Well with your permission let me to grab your feed to keep updated with forthcoming post.
      Thanks a million and please continue the rewarding work.

    39. https://erickkumn372.wpsuo.com/the-old-masters-vs-the-newcomers-inside-the-national-countertop-awards

      Did you know that in 2025, only 2,043 companies earned a spot in the Top Countertop Contractors Ranking out of thousands evaluated? That’s because at we don’t just accept anyone.

      Our ranking is independent, kept current, and built on 21+ criteria. These include feedback from Google, Yelp, and other platforms, affordability, responsiveness, and craftsmanship. On top of that, we conduct countless phone calls and 2,000 estimate requests through our mystery shopper program.
      The result is a benchmark that benefits both homeowners and contractors. Homeowners get a reliable way to choose contractors, while listed companies gain recognition, digital exposure, and even direct client leads.

      The Top 500 Awards spotlight categories like Veteran Companies, Best Young Companies, and Budget-Friendly Pros. Winning one of these honors means a company has achieved unmatched credibility in the industry.

      If you’re searching for a countertop contractor—or your company wants to stand out—this site is where quality meets growth.

      JuniorShido

      3 Sep 25 at 9:15 pm

    40. JimmieOrilt

      3 Sep 25 at 9:16 pm

    41. When I originally commented I clicked the “Notify me when new comments are added” checkbox and now
      each time a comment is added I get several e-mails with the
      same comment. Is there any way you can remove people from that service?
      Many thanks!

    42. Welcome to Bluevine login, your ultimate financial partner for small businesses. We offer innovative solutions that streamline your cash flow and empower your growth. Whether you need a line of credit or invoice factoring, Bluevine has you covered. Access to your account is through the Bluevine login portal, where you can safely and efficiently manage all your financial needs. Join thousands of satisfied entrepreneurs who trust Bluevine to advance their business.

      GichardMam

      3 Sep 25 at 9:19 pm

    43. платная наркологическая клиника Наркологическая клиника в Воронеже: Профессиональная помощь в сложный момент. Если вы или ваш близкий человек столкнулись с проблемой зависимости, не откладывайте обращение за помощью. Наркологическая клиника в Воронеже предлагает широкий spectrum услуг по лечению алкогольной и наркотической зависимости. Мы проводим детоксикацию, кодирование, реабилитацию и оказываем психологическую поддержку пациентам и их семьям. Наши врачи – опытные профессионалы, использующие современные методы лечения, чтобы помочь вам вернуться к полноценной жизни. Индивидуальный подход к каждому пациенту позволяет нам разрабатывать эффективные программы лечения, учитывая все особенности заболевания. Мы гарантируем полную конфиденциальность и анонимность. Позвоните нам сегодня, чтобы получить консультацию и начать свой путь к выздоровлению!

      Willieraiff

      3 Sep 25 at 9:19 pm

    44. Welcome to https://blevuine.com/, your ultimate financial partner for small businesses. Our company provides advanced financial tools designed to simplify your financial operations and support your business expansion. From credit lines to invoice factoring, Bluevine delivers the flexible financing your business needs. Access to your account is through the Bluevine login portal, where you can safely and efficiently manage all your financial needs. Join thousands of satisfied entrepreneurs who trust Bluevine to advance their business.

      LewisGuatt

      3 Sep 25 at 9:20 pm

    45. Excellent blog here! Also your web site loads up very fast!

      What web host are you using? Can I get your affiliate link to your
      host? I wish my site loaded up as quickly as yours lol

    46. купить диплом в харькове [url=http://www.educ-ua4.ru]купить диплом в харькове[/url] .

      Diplomi_ywPl

      3 Sep 25 at 9:36 pm

    47. подключение интернета по адресу
      inernetvkvartiru-msk004.ru
      провайдеры по адресу москва

      internetelini

      3 Sep 25 at 9:38 pm

    48. Even during his days off, Raul Morales gets spotted by fans. On a recent visit to Universal Studios Hollywood, Morales, owner of Taqueria Vista Hermosa in Los Angeles, was waiting in line when he heard shouting.

      “People called out ‘Chef Al Pastor! Chef Al Pastor!’” Morales said, laughing. Morales, who was born in Mexico City, came by the nickname through decades of hard work.
      [url=https://trip-scan39.org]tripscan[/url]
      He’s the third generation of his family to make al pastor tacos, their fresh tortillas filled with richly seasoned pork shaved from a rotating vertical spit.

      “My recipe is very special, and very old,” he said.

      Yet while Morales’ family recipes go back generations, and similar spit-roasted meats like shawarma and doner have been around for hundreds of years, his tacos represent a kind of cuisine that’s as contemporary and international as it is ancient and traditional. When you thread meat onto a spinning spit to roast it, it turns out, it doesn’t stay in one place for long.
      https://trip-scan39.org
      трип скан
      ‘Any place you have a pointy stick or a sword’
      Roasting meat on a spit or stick is likely among humans’ most ancient cooking techniques, says food historian Ken Albala, a professor of history at the University of the Pacific.

      Feasts of spit-roasted meat appear in the Homeric epics The Iliad and The Odyssey, writes Susan Sherratt, emeritus professor of East Mediterranean archaeology at the University of Sheffield, in the journal Hesperia.

      Iron spits that might have been used for roasting appear in the Aegean starting in the 10th century BCE. Such spits have been unearthed in tombs associated with male warriors, Sherratt writes, noting that roasting meat may have been a practice linked to male bonding and masculinity.

      “I think the reason that it’s associated with men is partly because of hunting, and the tools, or weapons, that replicated what you would do in war,” Albala said. “When you celebrated a victory, you would go out and sacrifice an animal to the gods, which would basically be like a big barbecue.”

      Roasting meat is not as simple as dangling a hunk of meat over the flames. When roasting, meat is not cooked directly on top of the heat source, Albala says, but beside it, which can generate richer flavors.

      “Any place you have a pointy stick or a sword, people are going to figure out very quickly … if you cook with it off to the side of the fire, it’s going to taste much more interesting,” Albala said.

      Jerrysok

      3 Sep 25 at 9:38 pm

    49. JimmieOrilt

      3 Sep 25 at 9:39 pm

    Leave a Reply