<?php
-namespace WP_CLI;
+namespace WP_CLI\Fetchers;
-abstract class Fetcher {
+abstract class Base {
/**
* @param string $msg The message to display when an item is not found
<?php
-namespace WP_CLI;
+namespace WP_CLI\Fetchers;
-class FetcherComment extends Fetcher {
+class Comment extends Base {
protected $msg = "Could not find the comment with ID %d.";
<?php
-namespace WP_CLI;
+namespace WP_CLI\Fetchers;
-class FetcherPlugin extends Fetcher {
+class Plugin extends Base {
protected $msg = "The '%s' plugin could not be found.";
<?php
-namespace WP_CLI;
+namespace WP_CLI\Fetchers;
-class FetcherPost extends Fetcher {
+class Post extends Base {
protected $msg = "Could not find the post with ID %d.";
<?php
-namespace WP_CLI;
+namespace WP_CLI\Fetchers;
-class FetcherTheme extends Fetcher {
+class Theme extends Base {
protected $msg = "The '%s' theme could not be found.";
<?php
-namespace WP_CLI;
+namespace WP_CLI\Fetchers;
-class FetcherUser extends Fetcher {
+class User extends Base {
protected $msg = "Invalid user ID or login: '%s'";
);
public function __construct() {
- $this->fetcher = new \WP_CLI\FetcherComment;
+ $this->fetcher = new \WP_CLI\Fetchers\Comment;
}
/**
parent::__construct();
- $this->fetcher = new \WP_CLI\FetcherPlugin;
+ $this->fetcher = new \WP_CLI\Fetchers\Plugin;
}
protected function get_upgrader_class( $force ) {
);
public function __construct() {
- $this->fetcher = new \WP_CLI\FetcherPost;
+ $this->fetcher = new \WP_CLI\Fetchers\Post;
}
/**
function __construct() {
parent::__construct();
- $this->fetcher = new \WP_CLI\FetcherTheme;
+ $this->fetcher = new \WP_CLI\Fetchers\Theme;
}
protected function get_upgrader_class( $force ) {
);
public function __construct() {
- $this->fetcher = new \WP_CLI\FetcherUser;
+ $this->fetcher = new \WP_CLI\Fetchers\User;
}
/**