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


PHP App::Get方法代码示例

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


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

示例1: connect

 public function connect()
 {
     $this->dataDirectory = App::Get()->settings['puny_datastore_localfile_dir'];
     // Ensure we can write to the directory
     if (!is_writeable($this->dataDirectory)) {
         throw new Exception("Puny can not write to the specified data directory");
     }
 }
开发者ID:fornava,项目名称:oodt,代码行数:8,代码来源:Puny_LocalFileDataStore.class.php

示例2: __construct

 /**
  * If authorization config file exists, require(file_name) file
  */
 public function __construct()
 {
     // Set LDAP constants
     define("AUTH_BASE_DN", App::Get()->settings['authorization_ldap_base_dn']);
     define("AUTH_GROUPS_DN", App::Get()->settings['authorization_ldap_group_dn']);
     define("AUTH_LDAP_HOST", App::Get()->settings['authorization_ldap_host']);
     define("AUTH_LDAP_PORT", App::Get()->settings['authorization_ldap_port']);
 }
开发者ID:fornava,项目名称:oodt,代码行数:11,代码来源:LDAPAuthorizationProvider.class.php

示例3: connect

 public function connect()
 {
     $dbname = App::Get()->settings['puny_datastore_mongo_db'];
     $coll = App::Get()->settings['puny_datastore_mongo_collection'];
     $this->link = new Mongo();
     $this->dbname = $this->link->selectDB($dbname);
     $this->collection = $this->dbname->{$coll};
 }
开发者ID:fornava,项目名称:oodt,代码行数:8,代码来源:Puny_MongoDataStore.class.php

示例4: hook_before_view

/**
 * hook_before_view
 * 
 * This hook is executed before the contents of the main view are processed.
 */
function hook_before_view()
{
    require_once 'scripts/widgets/BreadcrumbsWidget.php';
    $module = App::Get()->loadModule();
    // Include JavaScript files to be shown with every view in this module
    App::Get()->response->addJavascript($module->moduleStatic . '/js/jquery-1.4.2-min.js');
    App::Get()->response->addJavascript($module->moduleStatic . '/js/jcorner.jquery.js');
    // Include CAS-Browser default CSS stylesheets to be shown with every view in this module
    App::Get()->response->addStylesheet($module->moduleStatic . '/css/cas-browser.css');
    App::Get()->response->addStylesheet($module->moduleStatic . '/css/dataTables.css');
}
开发者ID:fornava,项目名称:oodt,代码行数:16,代码来源:hooks.php

示例5: connect

 /**
  * (non-PHPdoc)
  * @see Puny_DataStore::connect()
  * @throws PDOException
  */
 public function connect()
 {
     $this->host = App::Get()->settings['puny_datastore_pdo_host'];
     $this->username = App::Get()->settings['puny_datastore_pdo_username'];
     $this->password = App::Get()->settings['puny_datastore_pdo_password'];
     $this->dbname = App::Get()->settings['puny_datastore_pdo_dbname'];
     $this->driver = App::Get()->settings['puny_datastore_pdo_driver'];
     $this->tablePrefix = App::Get()->settings['puny_datastore_pdo_tablePrefix'];
     $dsn = $this->driver . ':host=' . $this->host . ';dbname=' . $this->dbname;
     $this->link = new PDO($dsn, $this->username, $this->password);
 }
开发者ID:fornava,项目名称:oodt,代码行数:16,代码来源:Puny_PdoDataStore.class.php

示例6: render

 public function render($bEcho = true)
 {
     $str = '';
     $str .= "<table id=\"productTypeSearch\" class=\"dataTable\">\n\t\t\t  <thead>\n\t\t\t    <tr>";
     // Display the Column Headers
     foreach (App::Get()->settings['browser_pt_search_met'] as $metKey) {
         $str .= "<th>" . ucwords($metKey) . "</th>";
     }
     if (isset(App::Get()->settings['browser_pt_hidden_search_met'])) {
         foreach (App::Get()->settings['browser_pt_hidden_search_met'] as $metKey) {
             $str .= "<th class=\"hidden\">{$metKey}</th>";
         }
     }
     $str .= "</tr></thead><tbody>";
     // Display the Data
     foreach ($this->productTypes as $ptKey => $ptMetadata) {
         if (isset(App::Get()->settings['browser_product_type_ignores']) && in_array($ptKey, App::Get()->settings['browser_product_type_ignores'])) {
             continue;
         }
         $str .= "<tr>";
         foreach (App::Get()->settings['browser_pt_search_met'] as $metKey) {
             if ($metKey == App::Get()->settings['browser_pt_search_linkkey']) {
                 $str .= "<td><a href=\"{$this->urlBase}/products/{$ptKey}\">{$ptMetadata[$metKey][0]}</a>";
                 if (count($ptMetadata[$metKey]) == 2) {
                     $str .= "&nbsp({$ptMetadata[$metKey][1]})";
                 }
                 $str .= "</td>";
             } else {
                 if (count($ptMetadata[$metKey]) > 1) {
                     $str .= "<td>" . implode(", ", $ptMetadata[$metKey]) . "</td>";
                 } else {
                     $str .= "<td>{$ptMetadata[$metKey][0]}</td>";
                 }
             }
         }
         if (isset(App::Get()->settings['browser_pt_hidden_search_met'])) {
             foreach (App::Get()->settings['browser_pt_hidden_search_met'] as $metKey) {
                 if (count($ptMetadata[$metKey]) > 1) {
                     $str .= "<td class=\"hidden\">" . implode(", ", $ptMetadata[$metKey]) . "</td>";
                 } else {
                     $str .= "<td class=\"hidden\">{$ptMetadata[$metKey][0]}</td>";
                 }
             }
         }
         $str .= "</tr>\r\n";
     }
     $str .= "</tbody></table>";
     $str .= "<br>";
     if ($bEcho) {
         echo $str;
     } else {
         return $str;
     }
 }
开发者ID:fornava,项目名称:oodt,代码行数:54,代码来源:ProductTypeListWidget.php

示例7: render

 public function render($bEcho = true)
 {
     $str = '';
     $references = $this->client->getProductReferences($this->product);
     if (isset($references['faultCode'])) {
         $str .= "<div class=\"error\">";
         $str .= "Error encountered while attempting to retrieve product references.<br/>";
         $str .= "FAULT CODE: {$references['faultCode']}<br/>";
         $str .= "FAULT STRING: {$references['faultString']}<br/>";
         $str .= "</div>";
         if ($bEcho) {
             echo $str;
         } else {
             return $str;
         }
     }
     $referenceCounter = 0;
     $str .= "<table class=\"pdw_downloadTable\">";
     foreach ($references as $reference) {
         $fileName = end(explode("/", $reference['dataStoreReference']));
         $fileSize = $reference['fileSize'];
         $fileSizeStr = "";
         $fileSize > 1024 * 1024 ? $fileSizeStr = number_format($fileSize / (1024 * 1024), 1) . " MB" : ($fileSize > 1024 ? $fileSizeStr = number_format($fileSize / 1024, 1) . " KB" : ($fileSizeStr = $fileSize . " bytes"));
         $str .= "<tr>";
         $str .= "<td>";
         if ($reference['mimeType'] == 'image/jpeg') {
             $str .= "<img class=\"tn\" src=\"" . $this->dataDeliveryUrl . "/data?refIndex={$referenceCounter}&productID={$this->product->getID()}\">";
         } else {
             $str .= "<img class=\"tn\" src=\"" . App::Get()->request->moduleStatic . "/img/download-icon.gif\"/>";
         }
         $str .= "</td>";
         $str .= "<td style=\"vertical-align:top;\">" . urldecode($fileName) . " <br/><span id=\"product_download_span\">{$fileSizeStr}</span><br/>";
         $str .= "Mime Type: {$reference['mimeType']}<br/>";
         if ($reference['mimeType'] == 'image/jpeg') {
             $str .= "&nbsp;<a href=\"" . $this->dataDeliveryUrl . "/data?refIndex={$referenceCounter}&productID={$this->product->getID()}\" target=\"_new\">view</a> &nbsp;";
             $str .= "<a href=\"getImage.php?productID={$this->product->getID()}&refNumber={$referenceCounter}&fileName={$fileName}\">save</a>&nbsp;";
         } else {
             $str .= "<a href=\"" . $this->dataDeliveryUrl . "/data?refIndex={$referenceCounter}&productID={$this->product->getID()}\">save</a> &nbsp;";
         }
         $str .= "</td>";
         $str .= "</tr>";
         $referenceCounter++;
     }
     $str .= "</table>";
     if ($bEcho) {
         echo $str;
     } else {
         return $str;
     }
 }
开发者ID:fornava,项目名称:oodt,代码行数:50,代码来源:ProductDownloadWidget.php

示例8: getResponse

 public function getResponse()
 {
     $this->setAuthenticationProviderInstance();
     $this->setAuthorizationProviderInstance();
     // Interpret the request uri of the current request
     $uri = App::Get()->settings['site_root'] != '/' ? substr($_SERVER['REQUEST_URI'], strlen(App::Get()->settings['site_root'])) : $_SERVER['REQUEST_URI'];
     $this->request = new Org_Apache_Oodt_Balance_Core_ApplicationRequest($this->settings, $uri);
     // Initialize a response object for the request
     $this->response = new Org_Apache_Oodt_Balance_Core_ApplicationResponse($this->settings, $this->request);
     // Process the response
     $this->response->process();
     // Return the processed response object
     return $this->response;
 }
开发者ID:fornava,项目名称:oodt,代码行数:14,代码来源:Application.class.php

示例9: processAsView

 protected function processAsView()
 {
     // Determine the view to use
     list($thePage) = explode('index.php', parse_url($this->uri, PHP_URL_PATH));
     // we only care about URL path info
     $thePage = ltrim($thePage, '/');
     if ($thePage == '') {
         $thePage = 'index';
     }
     $parts = explode('/', $thePage);
     // Determine whether a module is being requested
     $module = App::Get()->isModule($thePage);
     if ($module) {
         $this->isModule = true;
         $this->modulePath = $module->modulePath;
         $this->moduleRoot = $module->moduleRoot;
         $this->moduleStatic = $module->moduleStatic;
         array_shift($parts);
     }
     // Starting with the full request string, test for the existance of
     // a corresponding view. If none is found in the HOME
     // directory, chop off the last segment and try again. Add the chopped
     // segment to the "segments" array since it is likely a parameter.
     $partCount = count($parts);
     // check for view at least once
     do {
         $testPath = implode('/', $parts);
         $homeTest = ($this->isModule ? "{$this->modulePath}/views" : $this->config['views_dir']) . '/' . $testPath . '.php';
         $homeIdxTest = ($this->isModule ? "{$this->modulePath}/views" : $this->config['views_dir']) . '/' . $testPath . '/index.php';
         if (is_file($homeTest)) {
             $this->viewPath = $homeTest;
             break;
         }
         if (is_file($homeIdxTest)) {
             $this->viewPath = $homeIdxTest;
             break;
         }
         // If here, neither is a valid view, so chop the last segment
         $this->segments[] = $parts[$partCount - 1];
         array_pop($parts);
         $partCount--;
     } while ($partCount > 0);
     // If no view has been found by this point, display a 404 message
     if (!$this->viewPath) {
         $this->viewPath = dirname(dirname(__FILE__)) . "/views/error/404.php";
     }
     // Reverse the segments array so that params appear in the proper order
     $this->segments = array_reverse($this->segments);
 }
开发者ID:fornava,项目名称:oodt,代码行数:49,代码来源:ApplicationRequest.class.php

示例10: displayAttributes

function displayAttributes($userAttr)
{
    $str = '';
    foreach ($userAttr as $key => $keyValue) {
        foreach (App::Get()->settings['attr_titles'] as $attrTitle => $value) {
            if ($key === $value) {
                $str .= '<div class="span-13 prepend-1"><h4 align="left">';
                $str .= $attrTitle;
                $str .= '</h4></div>';
                $str .= '<div class="span-5"><h6 align="left">';
                $str .= $keyValue;
                $str .= '</h6></div>';
            }
        }
    }
    return $str;
}
开发者ID:fornava,项目名称:oodt,代码行数:17,代码来源:index.php

示例11: render

 public function render($bEcho = true)
 {
     $module = App::Get()->loadModule();
     $str = '';
     $str .= '<form action="' . $module->moduleRoot . '/queryScript.do" method="POST">';
     $str .= '<input type="hidden" name="Types[0]" value="*"/>';
     $str .= '<input type="hidden" name="Criteria[0][CriteriaType]" value="Term"/>';
     $str .= '<input type="hidden" name="Criteria[0][ElementName]" value="*"/>';
     $str .= '<input type="text" name ="Criteria[0][Value]"/>';
     $str .= '<input type="submit" value="Search"/>';
     $str .= '</form>';
     if ($bEcho) {
         echo $str;
     } else {
         return $st;
     }
 }
开发者ID:fornava,项目名称:oodt,代码行数:17,代码来源:BasicSearchWidget.php

示例12: render

 public function render($bEcho = true)
 {
     $str = '';
     $data = App::Get()->response->data('breadcrumbs');
     if (!empty($data)) {
         foreach ($data as $bc) {
             if (is_array($bc)) {
                 $str .= '<span class="crumb link"><a href="' . $bc[1] . '">' . $bc[0] . "</a></span>{$this->separator}";
             } else {
                 $str .= '<span class="crumb text">' . $bc . '</span>';
             }
         }
     }
     if ($bEcho) {
         echo $str;
     } else {
         return $str;
     }
 }
开发者ID:fornava,项目名称:oodt,代码行数:19,代码来源:BreadcrumbsWidget.php

示例13: manageAttribute

function manageAttribute()
{
    $userAttr = App::Get()->getAuthenticationProvider()->retrieveUserAttributes(App::Get()->getAuthenticationProvider()->getCurrentUsername(), App::Get()->settings['profile_modify_attributes']);
    $str = '';
    foreach ($userAttr as $key => $keyValue) {
        foreach (App::Get()->settings['attr_titles'] as $attrTitle => $value) {
            if ($key != App::Get()->settings['username_attr']) {
                if ($key === $value) {
                    $str .= '<div class="span-3 prepend-1"><label for="';
                    $str .= $key . '"> ' . $attrTitle;
                    $str .= '</label></div>';
                    $str .= '<div class="span-12"><input class="profile_input" type="text" maxlength="100" id=';
                    $str .= $key . ' name=' . $key . ' value=' . $keyValue;
                    $str .= '></div>';
                    $str .= '<br class="space"/>';
                }
            }
        }
    }
    return $str;
}
开发者ID:fornava,项目名称:oodt,代码行数:21,代码来源:manage.php

示例14: render

 public function render($bEcho = true)
 {
     $str = '';
     $module = App::Get()->loadModule($this->moduleName);
     // Display the appropriate information about the user
     if ($this->isLoggedIn) {
         $str .= "Logged in as ";
         if ($this->profileLink) {
             $str .= '<a href="' . $module->moduleRoot . '/">' . $this->username . '</a>&nbsp;|&nbsp;' . '<a href="' . $module->moduleRoot . '/logout.do">Log Out</a>';
         } else {
             $str .= $this->username . '&nbsp;|&nbsp;' . '<a href="' . $module->moduleRoot . '/logout.do">Log Out</a>';
         }
     } else {
         $str .= '<a href="' . $module->moduleRoot . '/login">Log In</a>';
     }
     if ($bEcho) {
         echo $str;
     } else {
         return $str;
     }
 }
开发者ID:fornava,项目名称:oodt,代码行数:21,代码来源:UserStatusWidget.php

示例15:

/typesearch/">Browse Across Types</a></li>
		</ul>
		<hr class="space"/>
		
		<div id="section_filter_tools_container">
			<div id="section_filter_tools_buttons">
				<input type="button" id="showFilters" value=<?php 
echo '"' . $filterButtonValue . '"';
?>
 />
			</div>
			<div id="section_filter_tools">
				<div id="filter_widget">
					Filter: <?php 
$crossTypeWidget->render();
?>
				</div>
			</div>
		</div>
		
		<br/>
		<div id="loading_icon_container">
		<img src="<?php 
echo App::Get()->request->moduleStatic . '/img/loading.gif';
?>
"/>
		</div>
		<div id="cas_browser_product_list"></div>
	</div>
</div>
</div>
开发者ID:fornava,项目名称:oodt,代码行数:31,代码来源:typesearch.php


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