Changeset 60771 for trunk/src/wp-includes/SimplePie/src/Restriction.php
- Timestamp:
- 09/16/2025 10:45:37 PM (2 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/SimplePie/src/Restriction.php
r59141 r60771 1 1 <?php 2 2 3 /** 4 * SimplePie 5 * 6 * A PHP-Based RSS and Atom Feed Framework. 7 * Takes the hard work out of managing a complete RSS/Atom solution. 8 * 9 * Copyright (c) 2004-2022, Ryan Parman, Sam Sneddon, Ryan McCue, and contributors 10 * All rights reserved. 11 * 12 * Redistribution and use in source and binary forms, with or without modification, are 13 * permitted provided that the following conditions are met: 14 * 15 * * Redistributions of source code must retain the above copyright notice, this list of 16 * conditions and the following disclaimer. 17 * 18 * * Redistributions in binary form must reproduce the above copyright notice, this list 19 * of conditions and the following disclaimer in the documentation and/or other materials 20 * provided with the distribution. 21 * 22 * * Neither the name of the SimplePie Team nor the names of its contributors may be used 23 * to endorse or promote products derived from this software without specific prior 24 * written permission. 25 * 26 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS 27 * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY 28 * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS 29 * AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 30 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 31 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 32 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 33 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 34 * POSSIBILITY OF SUCH DAMAGE. 35 * 36 * @package SimplePie 37 * @copyright 2004-2016 Ryan Parman, Sam Sneddon, Ryan McCue 38 * @author Ryan Parman 39 * @author Sam Sneddon 40 * @author Ryan McCue 41 * @link http://simplepie.org/ SimplePie 42 * @license http://www.opensource.org/licenses/bsd-license.php BSD License 43 */ 3 // SPDX-FileCopyrightText: 2004-2023 Ryan Parman, Sam Sneddon, Ryan McCue 4 // SPDX-License-Identifier: BSD-3-Clause 5 6 declare(strict_types=1); 44 7 45 8 namespace SimplePie; … … 51 14 * 52 15 * This class can be overloaded with {@see \SimplePie\SimplePie::set_restriction_class()} 53 *54 * @package SimplePie55 * @subpackage API56 16 */ 57 17 class Restriction 58 18 { 19 public const RELATIONSHIP_ALLOW = 'allow'; 20 public const RELATIONSHIP_DENY = 'deny'; 21 59 22 /** 60 23 * Relationship ('allow'/'deny') 61 24 * 62 * @var s tring25 * @var self::RELATIONSHIP_*|null 63 26 * @see get_relationship() 64 27 */ … … 68 31 * Type of restriction 69 32 * 70 * @var string 33 * @var string|null 71 34 * @see get_type() 72 35 */ … … 76 39 * Restricted values 77 40 * 78 * @var string 41 * @var string|null 79 42 * @see get_value() 80 43 */ … … 86 49 * For documentation on all the parameters, see the corresponding 87 50 * properties and their accessors 51 * 52 * @param ?self::RELATIONSHIP_* $relationship 88 53 */ 89 public function __construct( $relationship = null, $type = null,$value = null)54 public function __construct(?string $relationship = null, ?string $type = null, ?string $value = null) 90 55 { 91 56 $this->relationship = $relationship; … … 108 73 * Get the relationship 109 74 * 110 * @return string|null Either 'allow' or 'deny'75 * @return ?self::RELATIONSHIP_* 111 76 */ 112 77 public function get_relationship()
Note: See TracChangeset
for help on using the changeset viewer.