diff -r fc78844c8a76 -r 99ad73ef7385 vendor/bundles/Pagerfanta/View/ViewFactoryInterface.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/vendor/bundles/Pagerfanta/View/ViewFactoryInterface.php Fri Oct 21 17:10:54 2011 +0200 @@ -0,0 +1,90 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Pagerfanta\View; + +use Pagerfanta\PagerfantaInterface; + +/** + * ViewFactoryInterface. + * + * @author Pablo Díez + * + * @api + */ +interface ViewFactoryInterface +{ + /** + * Sets a view. + * + * @param string $name The view name. + * @param ViewInterface $view The view. + */ + function set($name, ViewInterface $view); + + /** + * Returns whether a view exists or not. + * + * @param string $name The name. + * + * @return Boolean Whether a view exists or not. + * + * @api + */ + function has($name); + + /** + * Adds views. + * + * @param array $views An array of views. + * + * @api + */ + function add(array $views); + + /** + * Returns a view. + * + * @param string $name The name. + * + * @return ViewInterface The view. + * + * @throws \InvalidArgumentException If the view does not exist. + * + * @api + */ + function get($name); + + /** + * Returns all the views. + * + * @return array The views. + */ + function all(); + + /** + * Removes a view. + * + * @param string $name The name. + * + * @throws \InvalidArgumentException If the view does not exist. + * + * @api + */ + function remove($name); + + /** + * Clears the views. + * + * @api + */ + function clear(); +}