View Source

<ac:macro ac:name="unmigrated-inline-wiki-markup"><ac:plain-text-body><![CDATA[{zone-template-instance:ZFPROP:Proposal Zone Template}

{zone-data:component-name}
Zend_Service_Linkback
{zone-data}

{zone-data:proposer-list}
[Ben Scholzen|mailto:mail@dasprids.de]
[Ryan Mauger|mailto:ryan@rmauger.co.uk]
{zone-data}

{zone-data:liaison}
TBD
{zone-data}

{zone-data:revision}
1.0 - 6 May 2009: Initial Draft.
{zone-data}

{zone-data:overview}
Zend_Service_Linkback is to provide client and server implementations of the 3 linkback protocols.
This will allow developers to easily add this functionality to Zend Framework powered applications.

{zone-data}

{zone-data:references}
* [Linkback Wikipedia Entry|http://en.wikipedia.org/wiki/Linkback]
* [Pingback specification|http://www.hixie.ch/specs/pingback/pingback]
* [Trackback specification|http://www.sixapart.com/pronet/docs/trackback_spec]
{zone-data}

{zone-data:requirements}
* The component *will* provide Server and Client implementations for sending and receiving linkbacks of the 3 protocols
* The Server and Client implementations *will* adhere to the specifications set out in the references.
* The Server *will* provide an interface to allow user models to be compatible with Zend_Service_Linkback.
* The Client *will* provide functionality to send the three types of linkback.
{zone-data}

{zone-data:dependencies}
* Zend_Http_Client
* Zend_Controller_Request_Http
* Zend_Controller_Response_Http
* optionally Zend_Uri
{zone-data}

{zone-data:operation}
...
{zone-data}

{zone-data:milestones}
* Milestone 1: Working prototype partially supporting use cases checked into user branch.
* Milestone 2: Component is approved.
* Milestone 2: Working prototype checked into the incubator supporting all use cases.
* Milestone 3: Unit tests exist, work, and are checked into SVN.
* Milestone 4: Initial documentation exists.
{zone-data}

{zone-data:class-list}
* Zend_Service_Linkback_Server
* Zend_Service_Linkback_Backend_IBackend
* Zend_Service_Linkback_Backend_RefBack
* Zend_Service_Linkback_Backend_Trackback
* Zend_Service_Linkback_Backend_Pingback
* Zend_Service_Linkback_IHandler
* Zend_Service_Linkback_Client
{zone-data}

{zone-data:use-cases}
||UC-01||
Users Blog Controller
{code}
<?php
class BlogController extends Zend_Controller_Action
{
//...
public function articleAction()
{
$pingBackServer = new Zend_Service_Linkback('Pingback');
$pingBackServer->registerHeaders('/xmlrpc/ping', $this->_response, $this->view);
$trackBackServer = new Zend_Service_Linkback('Trackback');
$trackBackServer->registerHeaders('/xmlrpc/track', $this->_response, $this->view);
}
//...
}
{code}
Users Server Controller
{code}
<?php
class XmlrpcController extends Zend_Controller_Action
{
//...
public function pingAction()
{
$pingBackServer = new Zend_Service_Linkback('Pingback');
$articleModel = new My_Article_Model();
$pingBackServer->handleRequest($articleModel, $this->_request);
}

public function trackAction()
{
$trackBackServer = new Zend_Service_Linkback('Trackback');
$articleModel = new My_Article_Model();
$trackBackServer->handleRequest($articleModel, $this->_request);
}
//...
}
{code}
Users Article Model
{code}
<?php
class My_Article_Model implements Zend_Service_Linkback_IHandler
{
public function acceptPing($source, $target, $title)
{
//...
}
}
{code}
{zone-data}

{zone-data:skeletons}
!Zend_Service_Linkback.png|align=centre!
{zone-data}

{zone-template-instance}]]></ac:plain-text-body></ac:macro>