<?php
// SPDX-FileCopyrightText: 2004-2023 Ryan Parman, Sam Sneddon, Ryan McCue
// SPDX-License-Identifier: BSD-3-Clause
declare(strict_types=1);
namespace SimplePie;
/**
* Handles `<media:restriction>` as defined in Media RSS
*
* Used by {@see \SimplePie\Enclosure::get_restriction()} and {@see \SimplePie\Enclosure::get_restrictions()}
*
* This class can be overloaded with {@see \SimplePie\SimplePie::set_restriction_class()}
*/
class Restriction
{
public const RELATIONSHIP_ALLOW = 'allow';
public const RELATIONSHIP_DENY = 'deny';
/**
* Relationship ('allow'/'deny')
*
* @var self::RELATIONSHIP_*|null
* @see get_relationship()
*/
public $relationship;
/**
* Type of restriction
*
* @var string|null
* @see get_type()
*/
public $type;
/**
* Restricted values
*
* @var string|null
* @see get_value()
*/
public $value;
/**
* Constructor, used to input the data
*
* For documentation on all the parameters, see the corresponding
* properties and their accessors
*
* @param ?self::RELATIONSHIP_* $relationship
*/
public function __construct(?string $relationship = null, ?string $type = null, ?string $value = null)
{
$this->relationship = $relationship;
$this->type = $type;
$this->value = $value;
}
/**
* String-ified version
*
* @return string
*/
public function __toString()
{
// There is no $this->data here
return md5(serialize($this));
}
/**
* Get the relationship
*
* @return ?self::RELATIONSHIP_*
*/
public function get_relationship()
{
if ($this->relationship !== null) {
return $this->relationship;
}
return null;
}
/**
* Get the type
*
* @return string|null
*/
public function get_type()
{
if ($this->type !== null) {
return $this->type;
}
return null;
}
/**
* Get the list of restricted things
*
* @return string|null
*/
public function get_value()
{
if ($this->value !== null) {
return $this->value;
}
return null;
}
}
class_alias('SimplePie\Restriction', 'SimplePie_Restriction');
| nama | waktu | ukuran | owner | perm | aksi |
|---|---|---|---|---|---|
| .. | |||||
| Cache/ | 2026-10-22 10:47 | 45.36 KB | 76129f60960:kunden | dxwrx-rx-r | |
| Content/ | 2026-10-22 10:47 | 7.47 KB | 76129f60960:kunden | dxwrx-rx-r | |
| HTTP/ | 2026-10-22 10:47 | 33.25 KB | 76129f60960:kunden | dxwrx-rx-r | |
| Net/ | 2026-10-22 10:47 | 7.21 KB | 76129f60960:kunden | dxwrx-rx-r | |
| Parse/ | 2026-10-22 10:47 | 25.13 KB | 76129f60960:kunden | dxwrx-rx-r | |
| XML/ | 2026-10-22 10:47 | 7.56 KB | 76129f60960:kunden | dxwrx-rx-r | |
| Author.php | 2026-10-22 10:47 | 1.86 KB | 76129f60960:kunden | -xw-x--x-- | |
| Cache.php | 2026-10-22 10:47 | 3.17 KB | 76129f60960:kunden | -xw-x--x-- | |
| Caption.php | 2026-10-22 10:47 | 3.03 KB | 76129f60960:kunden | -xw-x--x-- | |
| Category.php | 2026-10-22 10:47 | 2.41 KB | 76129f60960:kunden | -xw-x--x-- | |
| Copyright.php | 2026-10-22 10:47 | 1.67 KB | 76129f60960:kunden | -xw-x--x-- | |
| Credit.php | 2026-10-22 10:47 | 2.09 KB | 76129f60960:kunden | -xw-x--x-- | |
| Enclosure.php | 2026-10-22 10:47 | 31.39 KB | 76129f60960:kunden | -xw-x--x-- | |
| Exception.php | 2026-10-22 10:47 | 355 B | 76129f60960:kunden | -xw-x--x-- | |
| File.php | 2026-10-22 10:47 | 18.94 KB | 76129f60960:kunden | -xw-x--x-- | |
| Gzdecode.php | 2026-10-22 10:47 | 8.31 KB | 76129f60960:kunden | -xw-x--x-- | |
| IRI.php | 2026-10-22 10:47 | 33.99 KB | 76129f60960:kunden | -xw-x--x-- | |
| Item.php | 2026-10-22 10:47 | 128.54 KB | 76129f60960:kunden | -xw-x--x-- | |
| Locator.php | 2026-10-22 10:47 | 16.31 KB | 76129f60960:kunden | -xw-x--x-- | |
| Misc.php | 2026-10-22 10:47 | 68.16 KB | 76129f60960:kunden | -xw-x--x-- | |
| Parser.php | 2026-10-22 10:47 | 34.05 KB | 76129f60960:kunden | -xw-x--x-- | |
| Rating.php | 2026-10-22 10:47 | 1.75 KB | 76129f60960:kunden | -xw-x--x-- | |
| Registry.php | 2026-10-22 10:47 | 7.71 KB | 76129f60960:kunden | -xw-x--x-- | |
| RegistryAware.php | 2026-10-22 10:47 | 447 B | 76129f60960:kunden | -xw-x--x-- | |
| Restriction.php | 2026-10-22 10:47 | 2.31 KB | 76129f60960:kunden | -xw-x--x-- | |
| Sanitize.php | 2026-10-22 10:47 | 29.64 KB | 76129f60960:kunden | -xw-x--x-- | |
| SimplePie.php | 2026-10-22 10:47 | 125.05 KB | 76129f60960:kunden | -xw-x--x-- | |
| Source.php | 2026-10-22 10:47 | 23.18 KB | 76129f60960:kunden | -xw-x--x-- | |