backup: live-stand vor erstem git-deployment

This commit is contained in:
2026-06-29 11:04:33 +02:00
commit 90368b8a29
699 changed files with 162032 additions and 0 deletions

View File

@@ -0,0 +1,79 @@
<?php
namespace DynCom\mysyde\common\classes;
use DynCom\mysyde\common\interfaces\CriteriaHelperInterface;
use DynCom\mysyde\common\interfaces\GenericCollectionInterface;
use DynCom\mysyde\common\traits\genericCollectionTrait;
/**
* Class PageCollection
* @package DynCom\mysyde\common\classes
*/
class PageCollection implements GenericCollectionInterface
{
use genericCollectionTrait;
/**
* @param PageConfig $config
* @param CriteriaHelperInterface $criteriaValidationService
*/
public function __construct(PageConfig $config, CriteriaHelperInterface $criteriaValidationService)
{
$this->elements = new \SplObjectStorage();
$this->config = $config;
$this->criteriaValidationService = $criteriaValidationService;
$this->entryClassName = $config->getModelClassName();
}
/**
* @return PageCollection
*/
public function getEmptyCollection()
{
return new self($this->config, $this->criteriaValidationService);
}
/**
* @param mixed $instance
* @param bool $idCheck
*
* @return bool
*/
public function add($instance, $idCheck = FALSE)
{
return $this->_addPage($instance, $idCheck);
}
/**
* @param Page $page
* @param bool $idCheck
* @return bool
*/
protected function _addPage(Page $page, $idCheck = FALSE)
{
return $this->_add($page, $idCheck);
}
/**
* @param mixed $instance
* @param bool $idCheck
*
* @return bool
*/
public function remove($instance, $idCheck = FALSE)
{
return $this->_removePage($instance, $idCheck);
}
/**
* @param Page $page
* @param bool $idCheck
* @return bool
*/
protected function _removePage(Page $page, $idCheck = FALSE)
{
return $this->_remove($page, $idCheck);
}
}