Merged in feature/from-pantheon (pull request #16)

code from pantheon

* code from pantheon
This commit is contained in:
Tony Volpe
2024-01-10 17:03:02 +00:00
parent 054b4fffc9
commit 4eb982d7a8
16492 changed files with 3475854 additions and 0 deletions

View File

@@ -0,0 +1,45 @@
<?php
namespace Yoast\WP\SEO\Values\Robots;
/**
* Class Directive
*/
class Directive {
/**
* Paths list.
*
* @var array All paths affected by this directive.
*/
private $paths;
/**
* Sets up the path array
*/
public function __construct() {
$this->paths = [];
}
/**
* Adds a path to the directive path list.
*
* @param string $path A path to add in the path list.
*
* @return void
*/
public function add_path( $path ) {
if ( ! \in_array( $path, $this->paths, true ) ) {
$this->paths[] = $path;
}
}
/**
* Returns all paths.
*
* @return array
*/
public function get_paths() {
return $this->paths;
}
}