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


PHP eZURI::getTransformURIMode方法代码示例

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


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

示例1: while

 }
 while (is_object($var5) and method_exists($var5, 'templateValue')) {
     $var5 = $var5->templateValue();
 }
 while (is_object($var5) and method_exists($var5, 'templateValue')) {
     $var5 = $var5->templateValue();
 }
 $var1 = 'content/edit/' . $var3 . '/f/' . $var5;
 unset($var3, $var5);
 if (!isset($var1)) {
     $var1 = NULL;
 }
 while (is_object($var1) and method_exists($var1, 'templateValue')) {
     $var1 = $var1->templateValue();
 }
 eZURI::transformURI($var1, false, eZURI::getTransformURIMode());
 $var = $var1;
 unset($var1);
 if (!isset($var)) {
     $var = NULL;
 }
 while (is_object($var) and method_exists($var, 'templateValue')) {
     $var = $var->templateValue();
 }
 $text .= $var;
 unset($var);
 $text .= '">
     <img src="/design/standard/images/edit.gif" width="16" height="16" alt="Modifier" title="';
 unset($var);
 unset($var1);
 unset($var3);
开发者ID:legende91,项目名称:ez,代码行数:31,代码来源:latest_content-219d23fc2ae485315994f3777f625e64.php

示例2: addNode

 public static function addNode(xrowSitemap $sitemap, eZContentObjectTreeNode $node)
 {
     $site_ini = eZINI::instance('site.ini');
     $ini = eZINI::instance('xrowsitemap.ini');
     if (self::excludeNode($node)) {
         return false;
     }
     $extensions = array();
     $meta = xrowMetaDataFunctions::fetchByNode($node);
     if ($meta and $meta->sitemap_use == '0') {
         return false;
     } elseif ($meta === false and $ini->variable('Settings', 'AlwaysAdd') == 'disabled') {
         return false;
     }
     /*if ( $ini->hasVariable( 'ExtraAttributeFilter_1', 'Value' ) )
       {
           $offlineNummer = $ini->variable( 'ExtraAttributeFilter_1', 'Value' );
           if(in_array($offlineNummer,$node->attribute('object')->attribute('state_id_array')))
           {
               return false;
           }
       }*/
     if ($ini->hasVariable('SitemapSettings', 'GalleryClasses') and $node->attribute('parent') instanceof eZContentObjectTreeNode and in_array($node->attribute('parent')->attribute('class_identifier'), $ini->variable('SitemapSettings', 'GalleryClasses')) and in_array($node->attribute('class_identifier'), $ini->variable('SitemapSettings', 'ImageClasses'))) {
         return false;
     }
     $extensions[] = new xrowSitemapItemModified($node->attribute('modified_subnode'));
     $url = $node->attribute('url_alias');
     $urlAlias = $url;
     // $urlAlias is kept 'as is' to be able to generate these links
     eZURI::transformURI($urlAlias, true);
     if ($ini->hasVariable('SitemapSettings', 'CreateAlternateLink')) {
         if ($ini->hasVariable('SitemapSettings', 'MobileSiteAccessName') && $ini->hasVariable('SitemapSettings', 'MobileSiteAccessName') != '') {
             $mobileSiteAccess = $ini->variable('SitemapSettings', 'MobileSiteAccessName');
             $mobileURL = 'http://' . self::domain() . '/' . $mobileSiteAccess . $urlAlias;
         }
         if ($ini->hasVariable('SitemapSettings', 'MobileDomainName') && $ini->hasVariable('SitemapSettings', 'MobileDomainName') != '') {
             $mobileDomain = $ini->variable('SitemapSettings', 'MobileDomainName');
             $mobileURL = 'http://' . $mobileDomain . $urlAlias;
         }
         $extensions[] = new xrowSitemapItemAlternateLink($mobileURL);
     }
     $transformURIMode = eZURI::getTransformURIMode();
     // force URL to be generated in 'full mode' if MatchOrder != uri
     if ($site_ini->variable('SiteAccessSettings', 'MatchOrder') != 'uri') {
         $transformURIMode = 'full';
     }
     eZURI::transformURI($url, true, $transformURIMode);
     // only the URI mode is fully compatible with this $url generation
     if ($site_ini->variable('SiteAccessSettings', 'MatchOrder') == 'uri') {
         if ($site_ini->variable('SiteAccessSettings', 'RemoveSiteAccessIfDefaultAccess') == 'enabled' or $ini->variable('Settings', 'HideSiteaccessAlways') == 'true') {
             $url = 'http://' . self::domain() . $url;
         } else {
             $url = 'http://' . self::domain() . '/' . $GLOBALS['eZCurrentAccess']['name'] . $url;
         }
     }
     if ($ini->hasVariable('SitemapSettings', 'GalleryClasses') and in_array($node->attribute('class_identifier'), $ini->variable('SitemapSettings', 'GalleryClasses'))) {
         $imageextensions = self::fetchImages($node);
         if (!empty($imageextensions)) {
             $extensions = array_merge($extensions, $imageextensions);
         }
     }
     if ($ini->hasVariable('SitemapSettings', 'VideoClasses') and in_array($node->attribute('class_identifier'), $ini->variable('SitemapSettings', 'VideoClasses'))) {
         $extensions[] = self::getVideoConverter()->addVideo($node);
     }
     if ($meta and $meta->change) {
         $extensions[] = new xrowSitemapItemFrequency($meta->change);
     }
     if ($meta and $meta->priority !== null) {
         $extensions[] = new xrowSitemapItemPriority($meta->priority);
     } elseif (self::addPriority()) {
         $rootDepth = self::rootNode()->attribute('depth');
         $prio = 1 - ($node->attribute('depth') - $rootDepth) / 10;
         if ($prio > 0) {
             $extensions[] = new xrowSitemapItemPriority($prio);
         }
     }
     $sitemap->add($url, $extensions);
 }
开发者ID:rantoniazzi,项目名称:xrowmetadata,代码行数:78,代码来源:xrowsitemaptools.php

示例3: urlTransformation

    function urlTransformation( $operatorName, &$node, $tpl, &$resourceData,
                                $element, $lastElement, $elementList, $elementTree, &$parameters )
    {
        $ini = eZINI::instance();
        $shareTemplates = $ini->hasVariable( 'TemplateSettings', 'ShareCompiledTemplates' ) ?
                            $ini->variable( 'TemplateSettings', 'ShareCompiledTemplates' ) == 'enabled' :
                            false;

        $useTmp = false;

        $newElements = array();
        $values = array();
        $paramCount = 0;
        $tmpCount = 0;
        switch( $operatorName )
        {
            case $this->URLName:
            {
                if ( !$shareTemplates && eZTemplateNodeTool::isConstantElement( $parameters[0] ) )
                {
                    $url = eZTemplateNodeTool::elementConstantValue( $parameters[0] );

                    $serverURL = isset( $parameters[2] ) ? eZTemplateNodeTool::elementConstantValue( $parameters[2] ) : eZURI::getTransformURIMode();

                    eZURI::transformURI( $url, false, $serverURL );

                    $url = $this->applyQuotes( $url, $parameters[1] );
                    return array( eZTemplateNodeTool::createStringElement( $url ) );
                }
                else if ( $shareTemplates && eZTemplateNodeTool::isConstantElement( $parameters[0] ) )
                {
                    $url = eZTemplateNodeTool::elementConstantValue( $parameters[0] );

                    $values[] = array( eZTemplateNodeTool::createStringElement( $url ) );

                    if ( isset( $parameters[2] ) )
                    {
                        $values[] = $parameters[2];
                        $parameter = "%2%";
                    }
                    else
                    {
                        $parameter = "eZURI::getTransformURIMode()";
                    }

                    $code = <<<CODEPIECE

%tmp1% = %1%;
eZURI::transformURI( %tmp1%, false, $parameter );

CODEPIECE;
                    unset( $parameter );
                    $useTmp = true;
                    ++$tmpCount;

                }
                else
                {
                    $values[] = $parameters[0];

                    if ( isset( $parameters[2] ) )
                    {
                        $values[] = $parameters[2];
                        $parameter = "%2%";
                    }
                    else
                    {
                        $parameter = "eZURI::getTransformURIMode()";
                    }

                    $code = <<<CODEPIECE

eZURI::transformURI( %1%, false, $parameter );

CODEPIECE;
                    unset( $parameter );
                }

                ++$paramCount;
            } break;

            case $this->URLRootName:
            {
                if ( !$shareTemplates && eZTemplateNodeTool::isConstantElement( $parameters[0] ) )
                {
                    $url = eZTemplateNodeTool::elementConstantValue( $parameters[0] );

                    if ( preg_match( "#^[a-zA-Z0-9]+:#", $url ) or
                         substr( $url, 0, 2 ) == '//' )
                        $url = '/';
                    else if ( strlen( $url ) > 0 and
                              $url[0] != '/' )
                        $url = '/' . $url;

                    $serverURL = isset( $parameters[2] ) ? eZTemplateNodeTool::elementConstantValue( $parameters[2] ) : eZURI::getTransformURIMode();

                    // Same as "ezurl" without "index.php" and the siteaccess name in the returned address.
                    eZURI::transformURI( $url, true, $serverURL );

                    $url = $this->applyQuotes( $url, $parameters[1] );
//.........这里部分代码省略.........
开发者ID:robinmuilwijk,项目名称:ezpublish,代码行数:101,代码来源:ezurloperator.php

示例4: while

     $var1 = NULL;
 }
 while (is_object($var1) and method_exists($var1, 'templateValue')) {
     $var1 = $var1->templateValue();
 }
 while (is_object($var1) and method_exists($var1, 'templateValue')) {
     $var1 = $var1->templateValue();
 }
 if (preg_match("#^[a-zA-Z0-9]+:#", $var1) or substr($var1, 0, 2) == '//') {
     $var1 = '/';
 } else {
     if (strlen($var1) > 0 and $var1[0] != '/') {
         $var1 = '/' . $var1;
     }
 }
 eZURI::transformURI($var1, true, eZURI::getTransformURIMode());
 $var1 = '"' . $var1 . '"';
 $var = $var1;
 unset($var1);
 if (!isset($var)) {
     $var = NULL;
 }
 while (is_object($var) and method_exists($var, 'templateValue')) {
     $var = $var->templateValue();
 }
 $text .= $var;
 unset($var);
 $text .= ' width="';
 unset($var);
 unset($var);
 $var = (array_key_exists($rootNamespace, $vars) and array_key_exists('image', $vars[$rootNamespace])) ? $vars[$rootNamespace]['image'] : null;
开发者ID:legende91,项目名称:ez,代码行数:31,代码来源:ezimage-f47c6e85f7f5182923d33e6699450ca3.php


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