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