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


PHP PersistableFilter::__construct方法代码示例

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


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

示例1: fatalError

 /**
  * Constructor
  *
  * @param $filterGroup FilterGroup
  * @param $displayName string
  *
  * NB: The input side of the transformation must always
  * be an XML format. See the XMLTypeDescription class for
  * more details how to enable XML validation.
  */
 function __construct($filterGroup, $displayName = 'XSL Transformation')
 {
     // Check that we only get xml input, the output type is arbitrary.
     if (!substr($filterGroup->getInputType(), 0, 5) == 'xml::') {
         fatalError('XSL filters need XML as input.');
     }
     // Instantiate the settings of this filter
     import('lib.pkp.classes.filter.FilterSetting');
     $this->addSetting(new FilterSetting('xsl', null, null));
     $this->addSetting(new FilterSetting('xslType', null, null));
     $this->addSetting(new FilterSetting('resultType', null, null, FORM_VALIDATOR_OPTIONAL_VALUE));
     $this->setDisplayName($displayName);
     parent::__construct($filterGroup);
 }
开发者ID:PublishingWithoutWalls,项目名称:pkp-lib,代码行数:24,代码来源:XSLTransformationFilter.inc.php

示例2: assert

 /**
  * Constructor
  * @param $filterGroup FilterGroup
  */
 function __construct($filterGroup, $mode = null)
 {
     // Initialize the adapter.
     parent::__construct($filterGroup);
     // Extract information from the input/output types.
     // Find out whether this filter is injecting or
     // extracting meta-data.
     $metadataTypeDescription = null;
     /* @var $metadataTypeDescription MetadataTypeDescription */
     $dataObjectTypeDescription = null;
     /* @var $dataObjectTypeDescription ClassTypeDescription */
     $inputType =& $this->getInputType();
     $outputType =& $this->getOutputType();
     if (is_null($mode)) {
         if (is_a($inputType, 'MetadataTypeDescription')) {
             $mode = METADATA_DOA_INJECTION_MODE;
         } else {
             $mode = METADATA_DOA_EXTRACTION_MODE;
         }
     }
     $this->_mode = $mode;
     if ($mode == METADATA_DOA_INJECTION_MODE) {
         // We are in meta-data injection mode (or both input and output are meta-data descriptions).
         $metadataTypeDescription =& $inputType;
         /* @var $metadataTypeDescription MetadataTypeDescription */
         assert(is_a($outputType, 'ClassTypeDescription'));
         $dataObjectTypeDescription =& $outputType;
         /* @var $dataObjectTypeDescription ClassTypeDescription */
     } else {
         // We are in meta-data extraction mode.
         assert(is_a($outputType, 'MetadataTypeDescription'));
         $metadataTypeDescription =& $outputType;
         assert(is_a($inputType, 'ClassTypeDescription'));
         $dataObjectTypeDescription =& $inputType;
     }
     // Extract information from the input/output types.
     $this->_metadataSchemaName = $metadataTypeDescription->getMetadataSchemaClass();
     $this->_assocType = $metadataTypeDescription->getAssocType();
     $this->_dataObjectName = $dataObjectTypeDescription->getTypeName();
     // Set the display name.
     if ($mode == METADATA_DOA_INJECTION_MODE) {
         $this->setDisplayName('Inject metadata into a(n) ' . $this->getDataObjectClass());
     } else {
         $this->setDisplayName('Extract metadata from a(n) ' . $this->getDataObjectClass());
     }
 }
开发者ID:PublishingWithoutWalls,项目名称:pkp-lib,代码行数:50,代码来源:MetadataDataObjectAdapter.inc.php

示例3: array

 /**
  * Constructor
  * @param $filterGroup FilterGroup
  * @param $supportedPublicationTypes array
  */
 function __construct(&$filterGroup, $supportedPublicationTypes = array())
 {
     // All NLM citation filters require XSL functionality
     // that is only present in PHP5.
     $this->setData('phpVersionMin', '5.0.0');
     $this->_supportedPublicationTypes = $supportedPublicationTypes;
     // Instantiate the "isOptional" setting
     // which is common to all NLM citation filters.
     // It contains the information whether a filter
     // will be used automatically within a given context
     // or whether the user will have to use it
     // explicitly (e.g. when parsing citations for
     // an article, conference paper or monograph).
     $isOptional = new BooleanFilterSetting('isOptional', 'metadata.filters.settings.isOptional.displayName', 'metadata.filters.settings.isOptional.validationMessage');
     $this->addSetting($isOptional);
     parent::__construct($filterGroup);
 }
开发者ID:PublishingWithoutWalls,项目名称:pkp-lib,代码行数:22,代码来源:Nlm30CitationSchemaFilter.inc.php

示例4:

 /**
  * Constructor
  * @param $filterGroup FilterGroup
  */
 function __construct($filterGroup)
 {
     $this->setDisplayName('MODS 3.4');
     parent::__construct($filterGroup);
 }
开发者ID:PublishingWithoutWalls,项目名称:pkp-lib,代码行数:9,代码来源:Mods34DescriptionXmlFilter.inc.php

示例5:

 /**
  * Constructor
  * @param $filterGroup FilterGroup
  * @param $displayName string
  */
 function __construct(&$filterGroup, $displayName = null)
 {
     $this->setDisplayName($displayName);
     parent::__construct($filterGroup);
 }
开发者ID:PublishingWithoutWalls,项目名称:pkp-lib,代码行数:10,代码来源:CompositeFilter.inc.php

示例6: import

 /**
  * Constructor
  * @param $filterGroup FilterGroup
  */
 function __construct($filterGroup)
 {
     import('lib.pkp.classes.filter.FilterSetting');
     $this->addSetting(new FilterSetting('some-key', null, null));
     parent::__construct($filterGroup);
 }
开发者ID:PublishingWithoutWalls,项目名称:pkp-lib,代码行数:10,代码来源:PersistableTestFilter.inc.php

示例7:

 /**
  * Constructor
  * @param $filterGroup FilterGroup
  */
 function __construct($filterGroup)
 {
     parent::__construct($filterGroup);
 }
开发者ID:PublishingWithoutWalls,项目名称:pkp-lib,代码行数:8,代码来源:TemplateBasedFilter.inc.php


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