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


PHP Asset::verify方法代码示例

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


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

示例1: verify

 public function verify()
 {
     if (true !== ($r = parent::verify())) {
         return $r;
     }
     $model = self::$models[get_class($this)];
     if (!isset($this->parent)) {
         $this->parent = null;
     }
     if (!isset($this->iri)) {
         $this->iri = null;
     }
     $cs = $model->locateObject('[scheme:' . $this->kind . ']', null, 'scheme');
     $this->referenceObject('scheme', $cs);
     if (!isset($this->fragment)) {
         $this->fragment = $cs->singular;
     }
     $root = '/' . $cs->relativeURI;
     $parent = $this->parent;
     if (substr($parent, 1, 0) == '/') {
         $parent = substr($parent, 1);
     }
     if (!strncmp($parent, $root, strlen($root))) {
         $parent = substr($parent, strlen($root));
     }
     if (strlen($parent)) {
         if (null === ($uuid = UUID::isUUID($parent))) {
             $uuid = $model->createClassificationPath($cs, $parent);
         }
         if (null === $uuid && strlen($parent)) {
             return 'Referenced parent path "' . $this->parent . '" is invalid';
         }
     } else {
         $this->parent = $parent = null;
         $uuid = $cs->uuid;
     }
     $this->referenceObject('parent', $uuid);
     if (!isset($this->slug) || !strlen($this->slug)) {
         $this->slug = $this->uuid;
     }
     $p = $this->parent;
     $uri = array($this->slug);
     $ancestors = array();
     while ($p !== null) {
         $ancestors[] = $p;
         $data = $model->dataForUUID($p);
         array_unshift($uri, $data['slug']);
         $p = isset($data['parent']) ? $data['parent'] : null;
     }
     $this->relativeURI = implode('/', $uri);
     $this->iri[] = $root . implode('/', $uri);
     $this->ancestors = $ancestors;
     return true;
 }
开发者ID:nexgenta,项目名称:media,代码行数:54,代码来源:classification.php

示例2: verify

 public function verify()
 {
     $model = self::$models[get_class($this)];
     if (isset($this->show)) {
         if (null !== ($uuid = UUID::isUUID($this->show)) || null !== ($uuid = $model->uuidForCurie($this->show))) {
             $this->referenceObject('show', $uuid);
         } else {
             return "Referenced show '" . $this->show . "' does not exist yet.";
         }
     }
     return parent::verify();
 }
开发者ID:nexgenta,项目名称:media,代码行数:12,代码来源:show.php

示例3: verify

 public function verify()
 {
     $model = self::$models[get_class($this)];
     if (isset($this->episode)) {
         if (null !== ($uuid = UUID::isUUID($this->episode)) || null !== ($uuid = $model->uuidForCurie($this->episode))) {
             $this->referenceObject('episode', $uuid);
         } else {
             return "Referenced episode '" . $this->episode . "' does not exist yet.";
         }
     }
     if (true !== ($r = $this->verifyCredits())) {
         return $r;
     }
     return parent::verify();
 }
开发者ID:nexgenta,项目名称:media,代码行数:15,代码来源:version.php

示例4: verify

 public function verify()
 {
     $model = self::$models[get_class($this)];
     return parent::verify();
 }
开发者ID:nexgenta,项目名称:media,代码行数:5,代码来源:scheme.php


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