MetaWeblog
class MetaWeblog (View source)
MetaWeblog client
Properties
protected | $user | Username | |
protected | $pass | Password | |
protected | $encoding | Messages encoding (will be applied to - almost - every string!) |
Methods
Class constructor
Set the blog id
Set encoding
Get blog id
Get current encoding
Get the RPC client object
Retrieve a post from weblog
Get [$howmany] posts from blog
Create new post using xmlrpc
Edit post using remote server xmlrpc interface, referenced by postId
Delete a post referenced by postId
Retrieve a list of categories from weblog
upload a new media to weblog using metaWeblog.newMediaObject call
get template
get template
Returns information about all the blogs a given user is a member of
Send the request via RpcClient
Re-encode text
Details
at line 83
__construct(string $address, string $user = false, string $pass = false)
Class constructor
at line 116
final MetaWeblog
setId(int $id)
Set the blog id
at line 136
final MetaWeblog
setEncoding(string $encoding)
Set encoding
at line 149
final int
getId()
Get blog id
at line 160
final string
getEncoding()
Get current encoding
at line 171
final RpcClient
getRpcClient()
Get the RPC client object
at line 190
array
getPost(int $id)
Retrieve a post from weblog
at line 238
array
getRecentPosts(int $howmany = 10)
Get [$howmany] posts from blog
at line 299
int
newPost($struct, $publish = true)
Create new post using xmlrpc
Minimum $struct elements to compose new post are: - title string the post title - description string the post content
If one or both not defined, method will throw an "Invalid post struct" error.
at line 365
int
editPost($postId, $struct, $publish = true)
Edit post using remote server xmlrpc interface, referenced by postId
at line 435
bool
deletePost(int $postId, int $appkey = false, int $publish = false)
Delete a post referenced by postId
at line 483
array
getCategories()
Retrieve a list of categories from weblog
at line 533
bool
newMediaObject(string $name, string $mimetype, mixed $content, int $overwrite = false)
upload a new media to weblog using metaWeblog.newMediaObject call
at line 591
array
getTemplate(string $template_type, string $appkey = false)
get template
at line 644
bool
setTemplate(string $template, string $template_type, string $appkey = false)
get template
at line 697
array
getUsersBlogs(int $appkey = false)
Returns information about all the blogs a given user is a member of
at line 744
protected mixed
sendRpcRequest(string $method, array $params)
Send the request via RpcClient
at line 783
static protected mixed
sanitizeText(mixed $mixed, string $encoding)
Re-encode text