当前位置: 首页>>代码示例>>PHP>>正文


PHP Action::execute方法代码示例

本文整理汇总了PHP中Action::execute方法的典型用法代码示例。如果您正苦于以下问题:PHP Action::execute方法的具体用法?PHP Action::execute怎么用?PHP Action::execute使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Action的用法示例。


在下文中一共展示了Action::execute方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: get

 /**
  * Resource methods
  */
 public function get()
 {
     $action = new Action('common/currency');
     $data = $action->execute($this->registry);
     $response['currencies'] = $this->processCurrencies($data['currencies']);
     $this->response->setOutput($response);
 }
开发者ID:projectwife,项目名称:tesitoo-opencart,代码行数:10,代码来源:currency_base.php

示例2: get

 /**
  * Resource methods
  */
 public function get()
 {
     $action = new Action('common/language');
     $data = $action->execute($this->registry);
     $response['languages'] = $this->processLanguages($data['languages']);
     $this->response->setOutput($response);
 }
开发者ID:projectwife,项目名称:tesitoo-opencart,代码行数:10,代码来源:language_base.php

示例3: get

 public function get()
 {
     $action = new Action('common/length');
     $data = $action->execute($this->registry);
     $response['length_units'] = $data['length_units'];
     $this->response->setOutput($response);
 }
开发者ID:projectwife,项目名称:tesitoo-opencart,代码行数:7,代码来源:length.php

示例4: index

 public function index()
 {
     // Route
     if (isset($this->request->get['route'])) {
         $route = $this->request->get['route'];
     } else {
         $route = 'common/dashboard';
     }
     $data = array();
     // Sanitize the call
     $route = str_replace('../', '', (string) $route);
     // Trigger the pre events
     $result = $this->event->trigger('controller/' . $route . '/before', array(&$route, &$data));
     if (!is_null($result)) {
         return $result;
     }
     $action = new Action($route);
     // Any output needs to be another Action object.
     $output = $action->execute($this->registry, $data);
     // Trigger the post events
     $result = $this->event->trigger('controller/' . $route . '/after', array(&$route, &$output));
     if (!is_null($result)) {
         return $result;
     }
     return $output;
 }
开发者ID:mif32,项目名称:opencart,代码行数:26,代码来源:route.php

示例5: index

 public function index()
 {
     // Route
     if (isset($this->request->get['route']) && $this->request->get['route'] != 'startup/router') {
         $route = $this->request->get['route'];
     } else {
         $route = $this->config->get('action_default');
     }
     $data = array();
     // Sanitize the call
     $route = preg_replace('/[^a-zA-Z0-9_\\/]/', '', (string) $route);
     // Trigger the pre events
     $result = $this->event->trigger('controller/' . $route . '/before', array(&$route, &$data));
     if (!is_null($result)) {
         return $result;
     }
     $action = new Action($route);
     // Any output needs to be another Action object.
     $output = $action->execute($this->registry, $data);
     // Trigger the post events
     $result = $this->event->trigger('controller/' . $route . '/after', array(&$route, &$output));
     if (!is_null($result)) {
         return $result;
     }
     return $output;
 }
开发者ID:brunoxu,项目名称:mycncart,代码行数:26,代码来源:router.php

示例6: index

 public function index()
 {
     // Route
     if (isset($this->request->get['route']) && $this->request->get['route'] != 'startup/router') {
         $route = $this->request->get['route'];
     } else {
         $route = $this->config->get('action_default');
     }
     // Sanitize the call
     $route = str_replace('../', '', (string) $route);
     // Trigger the pre events
     $result = $this->event->trigger('controller/' . $route . '/before', array(&$route, &$data));
     if (!is_null($result)) {
         return $result;
     }
     // We dont want to use the loader class as it would make an controller callable.
     $action = new Action($route);
     // Any output needs to be another Action object.
     $output = $action->execute($this->registry);
     // Trigger the post events
     $result = $this->event->trigger('controller/' . $route . '/after', array(&$route, &$data, &$output));
     if (!is_null($result)) {
         return $result;
     }
     return $output;
 }
开发者ID:web3d,项目名称:mincart,代码行数:26,代码来源:router.php

示例7: execute

 public function execute()
 {
     $moduleMetadata = parent::execute();
     $columns = array();
     $values = array();
     foreach ($moduleMetadata['fields'] as $field => $def) {
         $name = $field;
         if (!empty($def['name'])) {
             $name = $def['name'];
         }
         if (!$this->source->existParam($name)) {
             continue;
         }
         $columns[] = $name . ' = :' . $name;
         $values[':' . $name] = $this->source->getParam($name);
     }
     $q = "UPDATE :table SET :columns WHERE id = :id";
     $sql = strtr($q, array(':table' => $this->table, ':columns' => implode(', ', $columns)));
     $stmt = $this->pdo->prepare($sql);
     $values[':id'] = $this->id;
     foreach ($values as $name => $value) {
         $stmt->bindValue($name, $value);
     }
     $stmt->execute();
 }
开发者ID:cheevauva,项目名称:trash,代码行数:25,代码来源:Update.php

示例8: controller

 public function controller($route, $args = array())
 {
     $this->trigger->fire('pre.load.controller', array(&$route, &$args));
     $action = new Action($route, $args);
     $ret = $action->execute($this->registry);
     $this->trigger->fire('post.load.controller', array(&$route, &$ret));
     return $ret;
 }
开发者ID:LinuxJedi,项目名称:arastta,代码行数:8,代码来源:loader.php

示例9: controller

 public function controller($route, $args = array())
 {
     if ($this->factory) {
         $action = $this->factory->newAction($route, $args);
     } else {
         $action = new Action($route, $args);
     }
     return $action->execute($this->registry);
 }
开发者ID:sachiv-logiciel,项目名称:armit,代码行数:9,代码来源:loader.php

示例10: trigger

	public function trigger($key, &$arg = array()) {
		if (isset($this->data[$key])) {
			usort($this->data[$key], array("Event", "cmpByPriority"));
			foreach ($this->data[$key] as $event) {
				$action = new Action($event['action'], $arg);
				$action->execute($this->registry);
			}
		}
	}
开发者ID:normanopecart,项目名称:opencart,代码行数:9,代码来源:event.php

示例11: trigger

 /**
  * @param string $key
  * @param array  $arg
  *
  * @return void
  */
 public function trigger($key, &$arg = array())
 {
     if (isset($this->data[$key])) {
         foreach ($this->data[$key] as $event) {
             $action = new Action($event, $arg);
             $action->execute($this->registry);
         }
     }
 }
开发者ID:yariknechyporuk,项目名称:granika,代码行数:15,代码来源:event.php

示例12: confirmPayment

 protected function confirmPayment($paymentMethodCode)
 {
     // Do not intercept view data because the mail send to user when confirming the order
     // may contain html from templates which are loaded through the loader's view method.
     $this->load->setInterceptViewData(false);
     // Internally execute the confirmation route.
     $action = new Action($this->payment->getPaymentConfirmationRoute($paymentMethodCode));
     $action->execute($this->registry);
 }
开发者ID:projectwife,项目名称:tesitoo-opencart,代码行数:9,代码来源:pay_base.php

示例13: controller

 public function controller($route)
 {
     // function arguments
     $args = func_get_args();
     // Remove the route
     array_shift($args);
     $action = new Action($route, $args);
     return $action->execute($this->registry);
 }
开发者ID:bitst0rm,项目名称:opencart,代码行数:9,代码来源:loader.php

示例14: testProductUrlRewrite

 public function testProductUrlRewrite()
 {
     $this->db->query("INSERT INTO `" . DB_PREFIX . "url_alias` SET query = 'product_id=1', keyword = 'product-1'");
     $this->config->set('config_seo_url', 1);
     $urlAction = new Action('common/seo_url');
     $urlAction->execute($this->registry);
     $link = $this->url->link('product/product', 'product_id=1');
     $this->db->query("DELETE FROM " . DB_PREFIX . "url_alias WHERE query = 'product_id=1'");
     $this->assertEquals(HTTPS_SERVER . 'product-1', $link, "Could not construct URL's alias");
 }
开发者ID:xxx111x1,项目名称:SmartYourFood,代码行数:10,代码来源:UrlTest.php

示例15: get

 /**
  * Resource methods
  */
 public function get($id = NULL)
 {
     $settings = array();
     $settings['limit'] = isset($this->request->get['limit']) ? $this->request->get['limit'] : self::DEFAULT_LIMIT;
     $settings['width'] = isset($this->request->get['image_width']) ? $this->request->get['image_width'] : self::DEFAULT_IMAGE_WIDTH;
     $settings['height'] = isset($this->request->get['image_height']) ? $this->request->get['image_height'] : self::DEFAULT_IMAGE_HEIGHT;
     $action = new Action('module/latest', $settings);
     $data = $action->execute($this->registry);
     $latestProducts = array('products' => $this->getLatestProducts($data));
     $this->response->setOutput($latestProducts);
 }
开发者ID:projectwife,项目名称:tesitoo-opencart,代码行数:14,代码来源:latest_base.php


注:本文中的Action::execute方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。