當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Reference::getRefId方法代碼示例

本文整理匯總了PHP中Reference::getRefId方法的典型用法代碼示例。如果您正苦於以下問題:PHP Reference::getRefId方法的具體用法?PHP Reference::getRefId怎麽用?PHP Reference::getRefId使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Reference的用法示例。


在下文中一共展示了Reference::getRefId方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: setClasspathRef

 /**
  * Reference to a classpath to use when loading the files.
  *
  * @param Reference $r
  *
  * @throws BuildException
  */
 public function setClasspathRef(Reference $r)
 {
     if ($this->isReference()) {
         throw $this->tooManyAttributes();
     }
     $this->classpathId = $r->getRefId();
     $this->createClasspath()->setRefid($r);
 }
開發者ID:TheTypoMaster,項目名稱:SPHERE-Framework,代碼行數:15,代碼來源:Mapper.php

示例2: getCheckedRef

 /**
  * Performs the check for circular references and returns the referenced object.
  *
  * @param $requiredClass
  * @param $dataTypeName
  *
  * @throws BuildException
  *
  * @return mixed
  */
 public function getCheckedRef($requiredClass, $dataTypeName)
 {
     if (!$this->checked) {
         // should be in stack
         $stk = array();
         $stk[] = $this;
         $this->dieOnCircularReference($stk, $this->getProject());
     }
     $o = $this->ref->getReferencedObject($this->getProject());
     if (!$o instanceof $requiredClass) {
         throw new BuildException($this->ref->getRefId() . " doesn't denote a " . $dataTypeName);
     } else {
         return $o;
     }
 }
開發者ID:TheTypoMaster,項目名稱:SPHERE-Framework,代碼行數:25,代碼來源:DataType.php

示例3: setClasspathRef

 /**
  * Reference to a classpath to use when loading the files.
  */
 public function setClasspathRef(Reference $r)
 {
     $this->classpathId = $r->getRefId();
     $this->createClasspath()->setRefid($r);
 }
開發者ID:kalaspuffar,項目名稱:php-orm-benchmark,代碼行數:8,代碼來源:TypedefTask.php

示例4: setRefid

 /**
  * @param Reference $r
  * @throws BuildException
  */
 public function setRefid(Reference $r)
 {
     if (count($this->parameters) !== 0 || $this->className !== null) {
         throw $this->tooManyAttributes();
     }
     $o = $r->getReferencedObject($this->getProject());
     if ($o instanceof PhingFilterReader) {
         $this->setClassName($o->getClassName());
         $this->setClasspath($o->getClassPath());
         foreach ($o->getParams() as $p) {
             $this->addParam($p);
         }
     } else {
         $msg = $r->getRefId() . " doesn\\'t refer to a PhingFilterReader";
         throw new BuildException($msg);
     }
     parent::setRefid($r);
 }
開發者ID:Ingewikkeld,項目名稱:phing,代碼行數:22,代碼來源:PhingFilterReader.php

示例5: setRefid

 function setRefid(Reference $r)
 {
     if (count($this->filterReaders) !== 0) {
         throw $this->tooManyAttributes();
     }
     // change this to get the objects from the other reference
     $o = $r->getReferencedObject($this->getProject());
     if ($o instanceof FilterChain) {
         $this->filterReaders = $o->getFilterReaders();
     } else {
         throw new BuildException($r->getRefId() . " doesn't refer to a FilterChain");
     }
     parent::setRefid($r);
 }
開發者ID:umesecke,項目名稱:phing,代碼行數:14,代碼來源:FilterChain.php


注:本文中的Reference::getRefId方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。