本文整理汇总了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;
}
示例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();
}
示例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();
}
示例4: verify
public function verify()
{
$model = self::$models[get_class($this)];
return parent::verify();
}