for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php namespace FlatPlan\Components;
use FlatPlan\Components\Image;
class Gallery extends AbstractComponent {
protected $items = array();
protected $roles = ['gallery', 'mosaic'];
/**
* @param string $role
* @param string $bannerType
* @return void
*/
public function __construct($role)
{
$this->setRole($role);
}
public function setItem($items)
if (is_array($items)) {
foreach ($items as $item) {
if ($item instanceof AbstractComponent) {
array_push($this->items, $item);
} else if ($items instanceof AbstractComponent) {
array_push($this->items, $items);
private function getItems()
return $this->items;
protected function getComponent()
$component = new \stdClass();
$component->role = $this->getRole();
$component->items = $this->getItems();
return $component;