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
| <?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
| <?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 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 |
NewerOlder