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


PHP owa_coreAPI::displayImage方法代码示例

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


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

示例1: performAction

 /**
  * Invokes controller to perform controller
  *
  * @param $action string
  * 
  */
 public static function performAction($action, $params = array())
 {
     // Load action from service map
     $service = owa_coreAPI::serviceSingleton();
     $action_map = $service->getMapValue('actions', $action);
     // create the controller object
     if ($action_map) {
         $controller = owa_lib::simpleFactory($action_map['class_name'], $action_map['file'], $params);
     } else {
         // attempt to use old style convention
         $controller = owa_coreAPI::moduleFactory($action, 'Controller', $params);
     }
     if (!$controller || !method_exists($controller, 'doAction')) {
         owa_coreAPI::debug("No controller is associated with {$action}.");
         return;
     }
     // call the doAction method which is part of the abstract controller class
     // inherited by all other controller classes
     $data = $controller->doAction();
     // Display view if controller calls for one.
     if (!empty($data['view']) || !empty($data['action'])) {
         // Redirect to a view
         if ($data['view_method'] == 'redirect') {
             return owa_lib::redirectToView($data);
             // return an image . Will output headers and binary data.
         } elseif ($data['view_method'] == 'image') {
             return owa_coreAPI::displayImage($data);
         } else {
             return owa_coreAPI::displayView($data);
         }
     } elseif (!empty($data['do'])) {
         return owa_lib::redirectToView($data);
     }
 }
开发者ID:ashutoshdev,项目名称:Open-Web-Analytics,代码行数:40,代码来源:owa_coreAPI.php

示例2: performAction

 /**
  * Invokes controller to perform controller
  *
  * @param $action string
  * 
  */
 public static function performAction($action, $params = array())
 {
     // Load
     $controller = owa_coreAPI::moduleFactory($action, 'Controller', $params);
     if (!$controller || !method_exists($controller, 'doAction')) {
         owa_coreAPI::debug("No controller is associated with {$action}.");
         return;
     }
     $data = $controller->doAction();
     // Display view if controller calls for one.
     if (!empty($data['view']) || !empty($data['action'])) {
         //
         if ($data['view_method'] == 'delegate') {
             return owa_coreAPI::displayView($data);
             // Redirect to a view
         } elseif ($data['view_method'] == 'redirect') {
             owa_lib::redirectToView($data);
             return;
             // return an image . Will output headers and binary data.
         } elseif ($data['view_method'] == 'image') {
             return owa_coreAPI::displayImage($data);
         } else {
             return owa_coreAPI::displayView($data);
         }
     } elseif (!empty($data['do'])) {
         //print_r($data);
         owa_lib::redirectToView($data);
         return;
     }
 }
开发者ID:nishantmendiratta,项目名称:Open-Web-Analytics,代码行数:36,代码来源:owa_coreAPI.php


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