Skip to content

Commit

Permalink
Added remaining models & relations
Browse files Browse the repository at this point in the history
  • Loading branch information
bfanger committed Jun 20, 2018
1 parent 7131e48 commit 8277f45
Show file tree
Hide file tree
Showing 10 changed files with 240 additions and 90 deletions.
5 changes: 4 additions & 1 deletion src/Model/Comment.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,11 @@ class Comment extends Base implements ArrayAccess
public $approved;
public $useragent;
public $type;

public $parent_id;
public $user_id;


public $user;

/**
* @var Post
Expand Down
17 changes: 17 additions & 0 deletions src/Model/CommentMeta.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php

namespace Sledgehammer\Wordpress\Model;

use Sledgehammer\Core\Base;

class CommentMeta extends Base
{
public $id;
public $key;
public $value;

/**
* @var Comment The associated Comment
*/
public $comment;
}
22 changes: 22 additions & 0 deletions src/Model/Link.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php

namespace Sledgehammer\Wordpress\Model;

use Sledgehammer\Core\Base;

class Link extends Base
{
public $id;
public $url;
public $name;
public $image;
public $target;
public $description;
public $visible;
public $owner;
public $rating;
public $updated;
public $rel;
public $notes;
public $rss;
}
3 changes: 0 additions & 3 deletions src/Model/Post.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
namespace Sledgehammer\Wordpress\Model;

use ArrayAccess;
use Generated\PostMeta;
use Generated\Taxonomy;
use Generated\User;
use Sledgehammer\Core\Base;
use Sledgehammer\Wordpress\Meta;

Expand Down
17 changes: 17 additions & 0 deletions src/Model/PostMeta.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php

namespace Sledgehammer\Wordpress\Model;

use Sledgehammer\Core\Base;

class PostMeta extends Base
{
public $id;
public $key;
public $value;

/**
* @var Post The associated Post
*/
public $post;
}
25 changes: 25 additions & 0 deletions src/Model/Taxonomy.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php

namespace Sledgehammer\Wordpress\Model;

use Sledgehammer\Core\Base;
use Sledgehammer\Core\Collection;

class Taxonomy extends Base
{
public $id;
public $taxonomy;
public $description;
public $parent_id;
public $count;

/**
* @var Term The associated Term
*/
public $term;

/**
* @var Collection|Post[] A collection with the associated Posts
*/
public $posts;
}
2 changes: 0 additions & 2 deletions src/Model/Term.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
namespace Sledgehammer\Wordpress\Model;

use ArrayAccess;
use Generated\TermMeta;
use Generated\Taxonomy;
use Sledgehammer\Core\Collection;
use Sledgehammer\Core\Base;
use Sledgehammer\Wordpress\Meta;
Expand Down
17 changes: 17 additions & 0 deletions src/Model/TermMeta.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php

namespace Sledgehammer\Wordpress\Model;

use Sledgehammer\Core\Base;

class TermMeta extends Base
{
public $id;
public $key;
public $value;

/**
* @var Term The associated Term
*/
public $term;
}
17 changes: 17 additions & 0 deletions src/Model/UserMeta.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php

namespace Sledgehammer\Wordpress\Model;

use Sledgehammer\Core\Base;

class UserMeta extends Base
{
public $id;
public $key;
public $value;

/**
* @var User The associated User
*/
public $user;
}
Loading

0 comments on commit 8277f45

Please sign in to comment.