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


PHP eZExtension::findExtensionType方法代码示例

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


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

示例1: instance

 /**
  * Returns a shared instance of the eZShopAccountHandler class
  * as defined in shopaccount.ini[HandlerSettings]Repositories
  * and ExtensionRepositories.
  *
  * @return eZDefaultShopAccountHandler Or similar clases.
  */
 static function instance()
 {
     $accountHandler = null;
     if ( eZExtension::findExtensionType( array( 'ini-name' => 'shopaccount.ini',
                                                 'repository-group' => 'HandlerSettings',
                                                 'repository-variable' => 'Repositories',
                                                 'extension-group' => 'HandlerSettings',
                                                 'extension-variable' => 'ExtensionRepositories',
                                                 'type-group' => 'AccountSettings',
                                                 'type-variable' => 'Handler',
                                                 'alias-group' => 'AccountSettings',
                                                 'alias-variable' => 'Alias',
                                                 'subdir' => 'shopaccounthandlers',
                                                 'type-directory' => false,
                                                 'extension-subdir' => 'shopaccounthandlers',
                                                 'suffix-name' => 'shopaccounthandler.php' ),
                                          $out ) )
     {
         $filePath = $out['found-file-path'];
         include_once( $filePath );
         $class = $out['type'] . 'ShopAccountHandler';
         $accountHandler = new $class( );
     }
     else
     {
         $accountHandler = new eZDefaultShopAccountHandler();
     }
     return $accountHandler;
 }
开发者ID:nottavi,项目名称:ezpublish,代码行数:36,代码来源:ezshopaccounthandler.php

示例2: create

 static function create( $analyzerName )
 {
     $analyzerData = eZImageAnalyzer::analyzerData();
     if ( !isset( $analyzerData['handlers'][$analyzerName] ) )
     {
         if ( eZExtension::findExtensionType( array( 'ini-name' => 'image.ini',
                                                     'repository-group' => 'AnalyzerSettings',
                                                     'repository-variable' => 'RepositoryList',
                                                     'extension-group' => 'AnalyzerSettings',
                                                     'extension-variable' => 'ExtensionList',
                                                     'extension-subdir' => 'imageanalyzer',
                                                     'alias-group' => 'AnalyzerSettings',
                                                     'alias-variable' => 'ImageAnalyzerAlias',
                                                     'suffix-name' => 'imageanalyzer.php',
                                                     'type-directory' => false,
                                                     'type' => $analyzerName ),
                                              $result ) )
         {
             $filepath = $result['found-file-path'];
             include_once( $filepath );
             $className = $result['type'] . 'imageanalyzer';
             $analyzerData['handlers'][$analyzerName] = array( 'classname' => $className,
                                                               'filepath' => $filepath );
         }
         else
         {
             eZDebug::writeWarning( "Could not locate Image Analyzer for $analyzerName", __METHOD__ );
         }
     }
     if ( isset( $analyzerData['handlers'][$analyzerName] ) )
     {
         $analyzer = $analyzerData['handlers'][$analyzerName];
         $className = $analyzer['classname'];
         if ( class_exists( $className ) )
         {
             return new $className();
         }
         else
         {
             eZDebug::writeWarning( "The Image Analyzer class $className was not found, cannot create analyzer", __METHOD__ );
         }
     }
     return false;
 }
开发者ID:robinmuilwijk,项目名称:ezpublish,代码行数:44,代码来源:ezimageanalyzer.php

示例3: metaData

    function metaData()
    {
        $metaData = "";
        $binaryINI = eZINI::instance( 'binaryfile.ini' );

        $handlerSettings = $binaryINI->variable( 'HandlerSettings', 'MetaDataExtractor' );

        if ( isset( $handlerSettings[$this->MimeType] ) )
        {
            // Check if plugin exists
            if ( eZExtension::findExtensionType( array( 'ini-name' => 'binaryfile.ini',
                                                    'repository-group' => 'HandlerSettings',
                                                    'repository-variable' => 'Repositories',
                                                    'extension-group' => 'HandlerSettings',
                                                    'extension-variable' => 'ExtensionRepositories',
                                                    'type-directory' => false,
                                                    'type' => $handlerSettings[$this->MimeType],
                                                    'subdir' => 'plugins',
                                                    'extension-subdir' => 'plugins',
                                                    'suffix-name' => 'parser.php' ),
                                             $out ) )
            {
                $filePath = $out['found-file-path'];
                include_once( $filePath );
                $class = $handlerSettings[$this->MimeType] . 'Parser';

                $parserObject = new $class( );
                $fileInfo = $this->storedFileInfo();

                $file = eZClusterFileHandler::instance( $fileInfo['filepath'] );
                if ( $file->exists() )
                {
                    $fetchedFilePath = $file->fetchUnique();
                    $metaData = $parserObject->parseFile( $fetchedFilePath );
                    $file->fileDeleteLocal( $fetchedFilePath );
                }
            }
            else
            {
                eZDebug::writeWarning( "Plugin for $this->MimeType was not found", 'eZBinaryFile' );
            }
        }
        else
        {
            eZDebug::writeWarning( "Mimetype $this->MimeType not supported for indexing", 'eZBinaryFile' );
        }

        return $metaData;
    }
开发者ID:robinmuilwijk,项目名称:ezpublish,代码行数:49,代码来源:ezbinaryfile.php


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