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


PHP self::getDao方法代码示例

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


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

示例1: getById

 /**
  * @param integer $id
  * @return Glossary
  */
 public static function getById($id)
 {
     $glossary = new self();
     $glossary->setId(intval($id));
     $glossary->getDao()->getById();
     return $glossary;
 }
开发者ID:solverat,项目名称:pimcore,代码行数:11,代码来源:Glossary.php

示例2: get

 /**
  * @param string $key
  * @param boolean $returnObject
  * @return mixed|null
  */
 public static function get($key, $returnObject = FALSE)
 {
     $cacheKey = $key . '~~~';
     if (array_key_exists($cacheKey, self::$nameIdMappingCache)) {
         $entry = self::getById(self::$nameIdMappingCache[$cacheKey]);
         if ($returnObject) {
             return $entry;
         }
         return $entry instanceof Configuration ? $entry->getData() : NULL;
     }
     $configurationEntry = new self();
     try {
         $configurationEntry->getDao()->getByKey($key);
     } catch (\Exception $e) {
         return NULL;
     }
     if ($configurationEntry->getId() > 0) {
         self::$nameIdMappingCache[$cacheKey] = $configurationEntry->getId();
         $entry = self::getById($configurationEntry->getId());
         if ($returnObject) {
             return $entry;
         }
         return $entry instanceof Configuration ? $entry->getData() : NULL;
     }
 }
开发者ID:dachcom-digital,项目名称:pimcore-lucene-search,代码行数:30,代码来源:Configuration.php

示例3: getById

 /**
  * @param integer $id
  * @return Redirect
  */
 public static function getById($id)
 {
     $redirect = new self();
     $redirect->setId(intval($id));
     $redirect->getDao()->getById();
     return $redirect;
 }
开发者ID:solverat,项目名称:pimcore,代码行数:11,代码来源:Redirect.php

示例4: getBySourceId

 /**
  * Static helper to get the dependencies for the given sourceId & type
  *
  * @param integer $id
  * @param string $type
  * @return Dependency
  */
 public static function getBySourceId($id, $type)
 {
     $d = new self();
     $d->setSourceId($id);
     $d->setSourceType($type);
     $d->getDao()->getBySourceId();
     return $d;
 }
开发者ID:pimcore,项目名称:pimcore,代码行数:15,代码来源:Dependency.php

示例5: getById

 /**
  * @static
  * @param $id
  * @return Element\Note
  */
 public static function getById($id)
 {
     try {
         $note = new self();
         $note->getDao()->getById($id);
         return $note;
     } catch (\Exception $e) {
         return null;
     }
 }
开发者ID:emanuel-london,项目名称:pimcore,代码行数:15,代码来源:Note.php

示例6: getByAddress

 /**
  * @param $addr
  * @return null|Blacklist
  */
 public static function getByAddress($addr)
 {
     try {
         $address = new self();
         $address->getDao()->getByAddress($addr);
         return $address;
     } catch (\Exception $e) {
         return null;
     }
 }
开发者ID:ChristophWurst,项目名称:pimcore,代码行数:14,代码来源:Blacklist.php

示例7: getByName

 /**
  * @param $name
  * @return Config
  * @throws \Exception
  */
 public static function getByName($name)
 {
     try {
         $tag = new self();
         $tag->getDao()->getByName($name);
     } catch (\Exception $e) {
         return null;
     }
     return $tag;
 }
开发者ID:emanuel-london,项目名称:pimcore,代码行数:15,代码来源:Config.php

示例8: getByPrimary

 /**
  * @param $cid
  * @param $ctype
  * @param $workflowId
  * @return null|WorkflowState
  */
 public static function getByPrimary($cid, $ctype, $workflowId)
 {
     try {
         $workflowState = new self();
         $workflowState->getDao()->getByPrimary($cid, $ctype, $workflowId);
         return $workflowState;
     } catch (\Exception $e) {
         return null;
     }
 }
开发者ID:pimcore,项目名称:pimcore,代码行数:16,代码来源:WorkflowState.php

示例9: getByName

 /**
  * @param $name
  * @return null|Config
  */
 public static function getByName($name)
 {
     try {
         $letter = new self();
         $letter->getDao()->getByName($name);
     } catch (\Exception $e) {
         return null;
     }
     return $letter;
 }
开发者ID:jansarmir,项目名称:pimcore,代码行数:14,代码来源:Config.php

示例10: getById

 /**
  * @static
  * @param $id
  * @return Pimcore\Model\Element\Tag
  */
 public static function getById($id)
 {
     try {
         $tag = new self();
         $tag->getDao()->getById($id);
         return $tag;
     } catch (\Exception $e) {
         return null;
     }
 }
开发者ID:pokleh,项目名称:pimcore,代码行数:15,代码来源:Tag.php

示例11: getByName

 /**
  * @param $name
  * @return GroupConfig
  */
 public static function getByName($name)
 {
     try {
         $config = new self();
         $config->setName($name);
         $config->getDao()->getByName();
         return $config;
     } catch (\Exception $e) {
     }
 }
开发者ID:sfie,项目名称:pimcore,代码行数:14,代码来源:GroupConfig.php

示例12: getById

 /**
  * Static helper to retrieve an instance of Document\DocType by the given ID
  *
  * @param integer $id
  * @return DocType
  */
 public static function getById($id)
 {
     $docType = new self();
     $docType->setId(intval($id));
     try {
         $docType->getDao()->getById();
     } catch (\Exception $e) {
         return null;
     }
     return $docType;
 }
开发者ID:sfie,项目名称:pimcore,代码行数:17,代码来源:DocType.php

示例13: getById

 /**
  * @param $id
  * @return null|Persona
  */
 public static function getById($id)
 {
     try {
         $persona = new self();
         $persona->setId(intval($id));
         $persona->getDao()->getById();
         return $persona;
     } catch (\Exception $e) {
         return null;
     }
 }
开发者ID:sfie,项目名称:pimcore,代码行数:15,代码来源:Persona.php

示例14: getByName

 /**
  * @param string $name
  * @return WebsiteSetting
  */
 public static function getByName($name, $siteId = null)
 {
     // create a tmp object to obtain the id
     $setting = new self();
     try {
         $setting->getDao()->getByName($name, $siteId);
     } catch (\Exception $e) {
         \Logger::error($e);
         return null;
     }
     return $setting;
 }
开发者ID:solverat,项目名称:pimcore,代码行数:16,代码来源:WebsiteSetting.php

示例15: getByDate

 /**
  * @param $category
  * @param $action
  * @param $label
  * @param $day
  * @param $month
  * @param $year
  * @return Event
  */
 public static function getByDate($category, $action, $label, $day, $month, $year)
 {
     $event = new self();
     try {
         $event->getDao()->getByDate($category, $action, $label, $day, $month, $year);
     } catch (\Exception $e) {
         $event->setTimestamp(mktime(1, 0, 0, $month, $day, $year));
         $event->setCategory($category);
         $event->setAction($action);
         $event->setLabel($label);
     }
     return $event;
 }
开发者ID:sfie,项目名称:pimcore,代码行数:22,代码来源:Event.php


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