This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace Api\Factory; | |
| use Zend\ServiceManager\FactoryInterface; | |
| use Zend\ServiceManager\ServiceLocatorInterface; | |
| use Api\Controller\DbResolver; | |
| use Zend\Authentication\Adapter\DbTable as AuthAdapter; | |
| class AuthAdapterFactory implements FactoryInterface |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class Namespace_modulename_IndexController extends Mage_Core_Controller_Front_Action{ | |
| public function indexAction() { | |
| //Basic parameters that need to be provided for oAuth authentication | |
| //on Magento | |
| $params = array( | |
| 'siteUrl' => 'http://localhost/magento/oauth', | |
| 'requestTokenUrl' => 'http://localhost/magento/oauth/initiate', | |
| 'accessTokenUrl' => 'http://localhost/magento/oauth/token', | |
| 'authorizeUrl' => 'http://localhost/magento/admin/oAuth_authorize',//This URL is used only if we authenticate as Admin user type |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace ''''''; | |
| use Zend\Db\TableGateway\AbstractTableGateway; | |
| use Zend\Db\Sql\Select; | |
| class TestFile extends AbstractTableGateway | |
| { | |
| public function __construct($adapter) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $method = $_SERVER['REQUEST_METHOD']; | |
| if (isset($_SERVER['HTTP_ORIGIN'])) { | |
| drupal_add_http_header('Access-Control-Allow-Origin', $_SERVER['HTTP_ORIGIN']); | |
| } | |
| if (isset($_SERVER['HTTP_ACCESS_CONTROL_REQUEST_HEADERS'])) { | |
| drupal_add_http_header('Access-Control-Allow-Headers', $_SERVER['HTTP_ACCESS_CONTROL_REQUEST_HEADERS']); | |
| } | |
| if (isset($_SERVER['HTTP_ACCESS_CONTROL_REQUEST_METHOD'])) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| First off I'm assuming xampp is installed to C:\xampp | |
| 1. Open a command prompt and go to C:\xampp\php | |
| 2. Type "pear update-channels" (updates channel definitions) | |
| 3. Type "pear upgrade" (upgrades all existing packages and pear) | |
| 4. Type "pear channel-discover components.ez.no" (this is needed for PHPUnit) | |
| 5. Type "pear channel-discover pear.symfony-project.com" (also needed by PHPUnit) | |
| 6. Type "pear channel-discover pear.phpunit.de" (This IS phpunit) | |
| 7. Type "pear install --alldeps phpunit/PHPUnit" (installs PHPUnit and all dependencies) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 1. Install ABT Bundle | |
| 2. Download android latest files(android versions) using SDK Manager. | |
| 3. Download JDK and set environment variable | |
| 4. Download Apache ant and set environment variable | |
| 5. Download Phone gap | |
| Create android phone gap apps using command prompt. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Implementation of hook_menu(). | |
| * Registers a form-based page that you can access at "http://localhost/mypage" | |
| */ | |
| function mymodule_menu(){ | |
| return array( | |
| 'mypage' => array( | |
| 'title' => 'A page to test ajax', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| calcRoute : function (batches, directionsService, directionsDisplay) { | |
| var combinedResults; | |
| var unsortedResults = [{}]; // to hold the counter and the results themselves as they come back, to later sort | |
| var directionsResultsReturned = 0; | |
| for (var k = 0; k < batches.length; k++) { | |
| var lastIndex = batches[k].length - 1; | |
| var start = batches[k][0].location; | |
| var end = batches[k][lastIndex].location; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * @file | |
| * Javascript functions for getdirections module | |
| * | |
| * @author Bob Hutchinson http://drupal.org/user/52366 | |
| * code derived from gmap_direx module | |
| * this is for googlemaps API version 3 | |
| * with adaptations from econym.org.uk | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Installation of PHPUnit. | |
| Open a command prompt and go to C:\xampp\php | |
| Type "php go-pear.phar" (Installs new PEAR) | |
| Type "pear update-channels" (updates channel definitions) | |
| Type "pear upgrade --alldeps" (upgrades all existing packages and pear) | |
| Type "pear channel-discover components.ez.no" (this is needed for PHPUnit) |
OlderNewer