This shows the execution order given JavaScript's Call Stack, Event Loop, and any asynchronous APIs provided in the JS execution environment (in this example; Web APIs in a Browser environment)
Given the code
<?php | |
/** | |
* Supply a user id and an access token | |
* Jelled explains how to obtain a user id and access token in the link provided | |
* @link http://jelled.com/instagram/access-token | |
*/ | |
$userid = ""; | |
$accessToken = ""; | |
// Get our data | |
function fetchData($url){ |
<?php | |
/** | |
* @package Faiyaz_Custom_WC_Status | |
* @version 1.6 | |
*/ | |
/* | |
Plugin Name: Custom WooCommerce Status | |
Description: This is a custom plugin for woocommerce. This will add some custom bulk action in order listing. | |
Author: Faiyaz Alam | |
Version: 1.0 |
syntax: | |
COMPOSER_MEMORY_LIMIT=-1 php-path composer-path update | |
example: | |
1) COMPOSER_MEMORY_LIMIT=-1 ea-php72 /opt/cpanel/composer/bin/composer update | |
2) COMPOSER_MEMORY_LIMIT=-1 /opt/cpanel/ea-php72/root/usr/bin/php /opt/cpanel/composer/bin/composer update |
Here is a sample command: | |
/usr/local/bin/ea-php72 /home/atunp/public_html/bin/console app:test |
git clone repo-url tmp && mv tmp/.git . && rm -rf tmp && git reset --hard | |
Explaination: | |
1) Do git clone in a tmp directory from current directory | |
2) move .git from tmp to the parent directory of tmp directory | |
3) reset git from the current directory |
//Controller | |
public function indexAction(Request $request) { | |
$products = new DataObject\Product\Listing(); | |
$paginator = new \Zend\Paginator\Paginator($products); | |
$paginator->setCurrentPageNumber($request->get('page')); | |
$paginator->setItemCountPerPage(20); | |
return $this->renderTemplate('Controller/index.html.twig', [ | |
'paginator' => $paginator | |
<?php | |
/** | |
* Insert a value or key/value pair after a specific key in an array. If key doesn't exist, value is appended | |
* to the end of the array. | |
* | |
* @param array $array | |
* @param string $key | |
* @param array $new | |
* |
<VirtualHost *:80> | |
ServerName pim553bundle.local | |
DocumentRoot /var/www/html/pimcore/web | |
<Directory /var/www/html/pimcore/web/> | |
Options FollowSymLinks MultiViews | |
AllowOverride All | |
Order allow,deny | |
allow from all | |
</Directory> | |
</VirtualHost> |
//In service file: /var/www/html/pimcore/src/AppBundle/Resources/config/services.yml | |
AppBundle\EventListener\TestListener: | |
tags: | |
- { name: kernel.event_listener, event: kernel.request } | |
//In listner file: /var/www/html/pf/src/AppBundle/EventListener/UserListener.php | |
use Symfony\Component\HttpKernel\Event\GetResponseEvent; | |
class TestListener { |