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


PHP eZSys::indexFileName方法代码示例

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


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

示例1: init

 function init()
 {
     if ($this->hasKickstartData()) {
         $data = $this->kickstartData();
         return $this->kickstartContinueNextStep();
     }
     if (file_exists('.htaccess')) {
         return true;
     }
     return eZSys::indexFileName() == '';
     // If in virtual host mode, continue (return true)
 }
开发者ID:legende91,项目名称:ez,代码行数:12,代码来源:ezstep_security.php

示例2: while

            }
        } else {
            $step = $stepData->step(0);
            //step contains file and class
        }
    }
}
$done = false;
$result = null;
while (!$done && $step != null) {
    // Some common variables for all steps
    $tpl->setVariable("script", eZSys::serverVariable('PHP_SELF'));
    $siteBasics = $GLOBALS['eZSiteBasics'];
    $useIndex = $siteBasics['validity-check-required'];
    if ($useIndex) {
        $script = eZSys::wwwDir() . eZSys::indexFileName();
    } else {
        $script = eZSys::indexFile() . "/setup/{$partName}";
    }
    $tpl->setVariable('script', $script);
    $tpl->setVariable("version", array("text" => eZPublishSDK::version(), "major" => eZPublishSDK::majorVersion(), "minor" => eZPublishSDK::minorVersion(), "release" => eZPublishSDK::release(), "alias" => eZPublishSDK::alias()));
    if ($persistenceList === null) {
        $persistenceList = eZSetupFetchPersistenceList();
    }
    $tpl->setVariable('persistence_list', $persistenceList);
    // Try to include the relevant file
    $includeFile = $baseDir . 'steps/ezstep_' . $step['file'] . '.php';
    $stepClass = false;
    if (file_exists($includeFile)) {
        include_once $includeFile;
        $className = 'eZStep' . $step['class'];
开发者ID:legende91,项目名称:ez,代码行数:31,代码来源:ezsetup.php

示例3: createSiteaccessUrls

    function createSiteaccessUrls( $params )
    {
        $urlList = array();

        $siteaccessList = $params['siteaccess_list'];
        $accessType = $params['access_type'];
        $accessTypeValue = $params['access_type_value'];

        $excludePortList = isset( $params['exclude_port_list'] ) ? $params['exclude_port_list'] : array();

        $hostname = false;

        if ( isset( $params['host'] ) && $params['host'] !== '' )
            $hostname = $this->extractHostname( $params['host'] );

        if ( !$hostname )
            $hostname = eZSys::hostname();

        $indexFile = eZSys::wwwDir() . eZSys::indexFileName();

        switch( $accessType )
        {
            case 'port':
                {
                    $port = $accessTypeValue;

                    // build urls
                    foreach( $siteaccessList as $siteaccess )
                    {
                        // skip ports which are already in use
                        while( in_array( $port, $excludePortList ) )
                            ++$port;

                        $urlList[$siteaccess]['url'] = "$hostname:$port" . $indexFile;
                        $urlList[$siteaccess]['port'] = $port;
                        ++$port;
                    }
                }
                break;
            case 'host':
            case 'hostname':
                {
                    $prependSiteAccess = isset( $params['host_prepend_siteaccess'] ) && is_bool( $params['host_prepend_siteaccess'] ) ? $params['host_prepend_siteaccess'] : true;

                    $hostname = $this->extractHostname( $accessTypeValue );

                    if ( !$hostname )
                        $hostname = $accessTypeValue;

                    foreach( $siteaccessList as $siteaccess )
                    {
                        if ( $prependSiteAccess )
                        {
                            // replace undescores with dashes( '_' -> '-' );
                            $hostPrefix = preg_replace( '/(_)/', '-', $siteaccess);

                            // create url and host
                            $urlList[$siteaccess]['url'] = $hostPrefix . '.' . $hostname . $indexFile;
                            $urlList[$siteaccess]['host'] = $hostPrefix . '.' . $hostname;
                        }
                        else
                        {
                            // create url and host
                            $urlList[$siteaccess]['url'] = $hostname . $indexFile;
                            $urlList[$siteaccess]['host'] = $hostname;
                        }
                    }
                }
                break;
            case 'url':
            case 'uri':
                {
                    foreach( $siteaccessList as $siteaccess )
                    {
                        $urlList[$siteaccess]['url'] = $hostname . $indexFile . '/' . $siteaccess;
                    }
                }
                break;

            default:
                break;
        }

        return $urlList;
    }
开发者ID:nottavi,项目名称:ezpublish,代码行数:85,代码来源:ezsiteinstaller.php

示例4: while

            //step contains file and class
        }
    }
}
$done = false;
$result = null;
while (!$done && $step != null) {
    // Some common variables for all steps
    $uriPrefix = '';
    if (strpos(eZSys::serverVariable('PHP_SELF'), '/ezsetup')) {
        $uriPrefix = '/ezsetup';
    }
    $siteBasics = $GLOBALS['eZSiteBasics'];
    $useIndex = $siteBasics['validity-check-required'];
    if ($useIndex) {
        $script = eZSys::wwwDir() . eZSys::indexFileName() . $uriPrefix;
    } else {
        $script = eZSys::indexFile() . "{$uriPrefix}/setup/{$partName}";
    }
    $tpl->setVariable('script', $script);
    $tpl->setVariable("version", array("text" => eZPublishSDK::version(), "major" => eZPublishSDK::majorVersion(), "minor" => eZPublishSDK::minorVersion(), "release" => eZPublishSDK::release(), "alias" => eZPublishSDK::alias()));
    if ($persistenceList === null) {
        $persistenceList = eZSetupFetchPersistenceList();
    }
    $tpl->setVariable('persistence_list', $persistenceList);
    // Try to include the relevant file
    $includeFile = $baseDir . 'steps/ezstep_' . $step['file'] . '.php';
    $stepClass = false;
    if (file_exists($includeFile)) {
        include_once $includeFile;
        $className = 'eZStep' . $step['class'];
开发者ID:jordanmanning,项目名称:ezpublish,代码行数:31,代码来源:ezsetup.php


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