Version 4 by Ryan Mauger
on May 06, 2009 09:04.

compared with
Version 5 by Ryan Mauger
on May 06, 2009 15:08.

Key
This line was removed.
This word was removed. This word was added.
This line was added.

Changes (6)

View Page History
* Zend_Service_Linkback_IHandler
* Zend_Service_Linkback_Client
!Zend_Service_Linkback.png|align=centre!
{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 funciton acceptPing($source, $target, $title)
{
//...
}
}
{code}
{zone-data}

{zone-data:skeletons}
{code}

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