當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。