Created
June 24, 2013 21:25
-
-
Save whisher/5853740 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//I've made like | |
namespace FbswitBlog\Controller\Plugin; | |
use Zend\Mvc\Controller\Plugin\AbstractPlugin; | |
use FbswitBlog\Service\Category as CategoryService; | |
use FbswitBlog\Service\ContentNodes as ContentNodesService; | |
use FbswitBlog\Service\Page as PageService; | |
class FbswitBlogService extends AbstractPlugin | |
{ | |
protected $categoryService; | |
protected $contentNodesService; | |
protected $pageService; | |
public function getCategoryService() | |
{ | |
return $this->categoryService; | |
} | |
public function setCategoryService(CategoryService $service) | |
{ | |
$this->categoryService = $service; | |
return $this; | |
} | |
public function getContentNodesService() | |
{ | |
return $this->contentNodesService; | |
} | |
public function setContentNodesService(ContentNodesService $service) | |
{ | |
$this->contentNodesService = $service; | |
return $this; | |
} | |
public function getPagesService() | |
{ | |
return $this->pageService; | |
} | |
public function setPagesService(PageService $service) | |
{ | |
$this->pageService = $service; | |
return $this; | |
} | |
} | |
//but I ended up with a more raisonable :) | |
namespace FbswitBlog\Controller\Plugin; | |
use Zend\Mvc\Controller\Plugin\AbstractPlugin; | |
use FbswitBlog\Service\Page as PageService; | |
class FbswitPageService extends AbstractPlugin | |
{ | |
protected $pageService; | |
public function get() | |
{ | |
return $this->pageService; | |
} | |
public function set(PageService $service) | |
{ | |
$this->pageService = $service; | |
return $this; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment