for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Oc\Page;
/**
* Class BlockService
*
* @package Oc\Page
* @author Nick Lubisch <[email protected]>
*/
class BlockService
{
* @var BlockRepository
private $blockRepository;
* BlockService constructor.
* @param BlockRepository $blockRepository
public function __construct(BlockRepository $blockRepository)
$this->blockRepository = $blockRepository;
}
* Fetch by.
* @param array $where
* @return BlockEntity[]
public function fetchBy(array $where = [])
return $this->blockRepository->fetchBy($where);
* Creates a page in the database.
* @param BlockEntity $entity
* @return BlockEntity
public function create(BlockEntity $entity)
return $this->blockRepository->create($entity);
* Update a page in the database.
public function update(BlockEntity $entity)
return $this->blockRepository->update($entity);
* Removes a page from the database.
public function remove(BlockEntity $entity)
return $this->blockRepository->remove($entity);