PHP Classes

File: src/Collection/FilterCollection.php

Recommend this page to a friend!
  Classes of Derek McLean   HTML Forms   src/Collection/FilterCollection.php   Download  
File: src/Collection/FilterCollection.php
Role: Class source
Content type: text/plain
Description: Class source
Class: HTML Forms
Generate and validate submitted HTML forms
Author: By
Last change:
Date: 6 years ago
Size: 742 bytes
 

Contents

Class file image Download
<?php
/**
 * User: delboy1978uk
 * Date: 27/11/2016
 * Time: 13:41
 */

namespace Del\Form\Collection;

use
Del\Form\Filter\FilterInterface;
use
InvalidArgumentException;

class
FilterCollection extends AbstractCollection implements CollectionInterface
{
   
/**
     * @param FilterInterface $filter Pass in a filter
     * @return $this
     */
   
public function append($filter)
    {
        if (!
$filter instanceof FilterInterface) {
            throw new
InvalidArgumentException('You can only append a Del\Form\Filter\FilterInterface.');
        }
       
parent::append($filter);
        return
$this;
    }

   
/**
     * @return FilterInterface
     */
   
public function current()
    {
        return
parent::current();
    }
}