miniflux-legacy/vendor/PicoFeed/Writer.php

23 lines
515 B
PHP
Raw Normal View History

2013-06-29 03:50:15 +02:00
<?php
namespace PicoFeed;
abstract class Writer
{
public $items = array();
2013-06-29 03:50:15 +02:00
abstract public function execute($filename = '');
public function checkRequiredProperties($properties, $container)
2013-06-29 03:50:15 +02:00
{
foreach ($properties as $property) {
2013-06-29 03:50:15 +02:00
if ((is_object($container) && ! isset($container->$property)) || (is_array($container) && ! isset($container[$property]))) {
2013-06-29 03:50:15 +02:00
throw new \RuntimeException('Required property missing: '.$property);
}
}
}
}