Apple_Push_API\MIME_Builder::close PHP Method

close() public method

Close a file added to the MIME request.
public close ( ) : string
return string
    public function close()
    {
        $close = '--' . $this->boundary . '--';
        $this->debug_content .= $close;
        return $close;
    }

Usage Example

Beispiel #1
0
 /**
  * Parses the API response and checks for errors.
  * TODO The exporter has an abstracted article class. Should we have
  * something similar here? That way this method could live there.
  *
  * @param string $article
  * @param array $bundles
  * @param array $meta
  * @return string
  * @since 0.2.0
  */
 private function build_content($article, $bundles = array(), $meta = null)
 {
     $bundles = array_unique($bundles);
     $content = '';
     if ($meta) {
         $content .= $this->mime_builder->add_metadata($meta);
     }
     $content .= $this->mime_builder->add_json_string('my_article', 'article.json', $article);
     foreach ($bundles as $bundle) {
         $content .= $this->mime_builder->add_content_from_file($bundle);
     }
     $content .= $this->mime_builder->close();
     return $content;
 }
All Usage Examples Of Apple_Push_API\MIME_Builder::close