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


PHP ParamConverter::getClass方法代码示例

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


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

示例1: supports

 /**
  * {@inheritdoc}
  */
 public function supports(ParamConverter $configuration)
 {
     if (null === $configuration->getClass()) {
         return false;
     }
     return 'Bluemesa\\Bundle\\CoreBundle\\Entity\\DatePeriod' === $configuration->getClass();
 }
开发者ID:BlueMesa,项目名称:CoreBundle,代码行数:10,代码来源:DatePeriodParamConverter.php

示例2: supports

 /**
  * {@inheritdoc}
  */
 public function supports(ParamConverter $configuration)
 {
     if (null === $configuration->getClass()) {
         return false;
     }
     return isset(self::$supportedTypes[$configuration->getClass()]);
 }
开发者ID:RuntyCybin,项目名称:csymfony,代码行数:10,代码来源:PsrServerRequestParamConverter.php

示例3: supports

 public function supports(ParamConverter $configuration)
 {
     if (null === $configuration->getClass()) {
         return false;
     }
     return in_array($configuration->getClass(), $this->supportedTypes);
 }
开发者ID:WellCommerce,项目名称:CoreBundle,代码行数:7,代码来源:AbstractEntityParamConverter.php

示例4: supports

 /**
  * @param ParamConverter $configuration
  * @return bool
  */
 public function supports(ParamConverter $configuration)
 {
     if (null === $configuration->getClass()) {
         return false;
     }
     return 'CiTron\\Project\\Entity\\Project' === $configuration->getClass();
 }
开发者ID:ci-tron,项目名称:ci-tron,代码行数:11,代码来源:ProjectParamConverter.php

示例5: supports

 /**
  * Checks if the object is supported.
  *
  * @param ParamConverter $configuration Should be an instance of ParamConverter
  *
  * @return bool True if the object is supported, else false
  */
 public function supports(ParamConverter $configuration)
 {
     if (null === $configuration->getClass()) {
         return false;
     }
     return $configuration->getClass() === Category::class;
 }
开发者ID:karion,项目名称:mydrinks,代码行数:14,代码来源:CategoryConverter.php

示例6: supports

 public function supports(ParamConverter $configuration)
 {
     if (null === $configuration->getClass()) {
         return false;
     }
     $class = $configuration->getClass();
     return $class == 'Staffim\\DTOBundle\\Collection\\Pagination';
 }
开发者ID:anyx,项目名称:StaffimDTOBundle,代码行数:8,代码来源:PaginationParamConverter.php

示例7: supports

 public function supports(ParamConverter $configuration)
 {
     if (null === $configuration->getClass()) {
         return false;
     }
     $supportedTypes = [SearchRequest::class, SearchRequestInterface::class];
     return in_array($configuration->getClass(), $supportedTypes);
 }
开发者ID:WellCommerce,项目名称:SearchBundle,代码行数:8,代码来源:SearchRequestParamConverter.php

示例8: apply

 public function apply(Request $request, ParamConverter $configuration)
 {
     $result = null;
     if ($configuration->getClass() == 'Symfony\\Component\\HttpFoundation\\File\\UploadedFile') {
         $result = $this->parseFile($configuration->getName(), $request);
     } else {
         $result = $this->parser->parseClass($configuration->getClass(), $request->getContent());
     }
     $request->attributes->set($configuration->getName(), $result);
     return true;
 }
开发者ID:freefair,项目名称:rest-bundle,代码行数:11,代码来源:RequestBodyConverter.php

示例9: supports

 /**
  * Checks if the object is supported.
  *
  * @param ParamConverter $configuration Should be an instance of ParamConverter
  *
  * @return bool True if the object is supported, else false
  */
 public function supports(ParamConverter $configuration)
 {
     if (null === $configuration->getClass()) {
         return false;
     }
     if (array_key_exists($configuration->getClass(), $this->targetEntitiesArray)) {
         return true;
     } else {
         return false;
     }
 }
开发者ID:bakicdj,项目名称:EDBlogBundle,代码行数:18,代码来源:AbstractConverter.php

示例10: supports

 /**
  * @inheritdoc
  */
 public function supports(ParamConverter $configuration)
 {
     if ($configuration->getClass() === null) {
         return false;
     }
     try {
         $class = new \ReflectionClass($configuration->getClass());
     } catch (\ReflectionException $e) {
         return false;
     }
     return $this->reader->getClassAnnotation($class, RequestAnnotation::class) !== null;
 }
开发者ID:nikita2206,项目名称:symfony-request-converter,代码行数:15,代码来源:RequestParamConverter.php

示例11: supports

 /**
  * @inheritdoc
  */
 public function supports(ParamConverter $configuration)
 {
     // Check, if option class was set in configuration
     if (null === $configuration->getClass()) {
         return false;
     }
     // Get the manager for the passed class (by default, the default entity manager)
     $manager = $this->getDoctrine()->getManagerForClass($configuration->getClass());
     // Check that the manager has the correct Class
     if ('WCS\\CantineBundle\\Entity\\Eleve' !== $manager->getClassMetadata($configuration->getClass())->getName()) {
         return false;
     }
     return true;
 }
开发者ID:WildCodeSchool,项目名称:projet-gesty,代码行数:17,代码来源:EleveParamConverter.php

示例12: supports

 /**
  * @param \Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter $configuration
  * @return bool
  */
 public function supports(ParamConverter $configuration)
 {
     if (!$configuration instanceof ParamConverter) {
         return false;
     }
     if (!class_exists($configuration->getClass()) && !interface_exists($configuration->getClass())) {
         return false;
     }
     $implements = class_implements($configuration->getClass());
     if (in_array('FSi\\Bundle\\AdminBundle\\Admin\\Element', $implements)) {
         return true;
     }
     return false;
 }
开发者ID:kbedn,项目名称:admin-bundle,代码行数:18,代码来源:AdminElementParamConverter.php

示例13: supports

 /**
  * {@inheritdoc}
  */
 function supports(ParamConverter $configuration)
 {
     if (null === $this->registry || !count($this->registry->getManagers())) {
         return false;
     }
     if (null === $configuration->getClass()) {
         return false;
     }
     $em = $this->registry->getManagerForClass($configuration->getClass());
     if ('SensorBundle\\Entity\\Measure' !== $em->getClassMetadata($configuration->getClass())->getName()) {
         return false;
     }
     return true;
 }
开发者ID:rybus,项目名称:mogette-ui,代码行数:17,代码来源:SensorByPeriodConverter.php

示例14: supports

 /**
  * {@inheritdoc}
  */
 public function supports(ParamConverter $configuration)
 {
     if (!$configuration->getClass()) {
         return false;
     }
     return true;
 }
开发者ID:jcart,项目名称:framework-extra-bundle,代码行数:10,代码来源:EncodedParamConverter.php

示例15: supports

 /**
  * {@inheritdoc}
  */
 public function supports(ParamConverter $configuration)
 {
     if (!($class = $configuration->getClass())) {
         return false;
     }
     return 'DTO' === strtoupper(substr($class, -3));
 }
开发者ID:thesoftwarefactoryuk,项目名称:SenNetwork,代码行数:10,代码来源:DataTransferObjectParamConverter.php


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