Source for file Abstract.php
Documentation is available at Abstract.php
* "THE BEER-WARE LICENSE" (Revision 42):
* "Sven Strittmatter" <ausserirdisch@sven-space.de> wrote this file.
* As long as you retain this notice you can do whatever you want with
* this stuff. If we meet some day, and you think this stuff is worth it,
* you can buy me a beer in return.
* @package MediaSearch_File
* @copyright Copyright (c) 2009 Sven Strittmatter
* @see MediaSearch_Interface_Visitable
require_once('MediaSearch/Interface/Visitable.php');
* An abstract file implemetnation. Thats part of tee composite pattern
* (see GoF for more information) used to build a file tree.
* @package MediaSearch_File
* @copyright Copyright (c) 2009 Sven Strittmatter
* Holds the SplFileInfo object.
* Requires a filename as string or an SplFileInfo object of a file.
* If a string as parameter is passed a SplFileInfo object will be
* @throws InvalidArgumentException If neither a filename string or a SplFileInfo is provided.
* @param mixed $fileInfo SplFileInfo or string
$this->fileInfo = new SplFileInfo($fileInfo);
} else if ($fileInfo instanceof SplFileInfo) {
$message = 'This class needs either a filepath string or a ';
$message .= 'SplFileInfo instance as constructor paremetr!';
throw new InvalidArgumentException($message);
|