Exemplo n.º 1
0
 /**
  * @param String $email
  * @param String $senha
  * @param String $url
  */
 function Post($postId = false, $blog = false)
 {
     if ($postId) {
         $post = new Read($blog, 'read');
         $post->setField('id', $postId);
         $post = $post->exec()->posts->post;
         $this->postId = $postId;
         $this->blog = $blog;
         $this->date = (string) $post->attributes()->date;
         $this->format = (string) $post->attributes()->format;
         $this->generator = (string) $post->attributes()->generator;
         $this->group = (string) $post->attributes()->group;
         $this->private = (string) $post->attributes()->private;
         $this->sendToTwitter = (string) $post->attributes()->{'send-to-twitter'};
         $this->slug = (string) $post->attributes()->slug;
         $this->state = (string) $post->attributes()->state;
         $this->type = (string) $post->attributes()->type;
         foreach ($post->tag as $value) {
             $this->tags[] = (string) $value;
         }
         return $post;
     }
 }