src/FS/Folder/Lister.php
public function setExtensions( $extensions = array() )
	{
		if( !is_array( $extensions ) )
			throw new InvalidArgumentException( 'Extensions must be given as Array.' );

		$pattern	= "";
		if( count( $extensions ) )
		{
			$extensions	= implode( "|", array_values( $extensions ) );
			$pattern	= '@\.'.$extensions.'$@i';
		}
		$this->pattern	= $pattern;
	}
public function setExtensions( $extensions = array() )
	{
		if( !is_array( $extensions ) )
			throw new InvalidArgumentException( 'Extensions must be given as Array.' );

		$pattern	= "";
		if( count( $extensions ) )
		{
			$extensions	= implode( "|", array_values( $extensions ) );
			$pattern	= '@\.'.$extensions.'$@i';
		}
		$this->pattern	= $pattern;
	}
public function setExtensions ( $ extensions = array ( ) ) { if ( ! is_array ( $ extensions ) ) throw new InvalidArgumentException ( 'Extensions must be given as Array.' ) ; $ pattern = "" ; if ( count ( $ extensions ) ) { $ extensions = implode ( "|" , array_values ( $ extensions ) ) ; $ pattern = '@\.' . $ extensions . '$@i' ; } $ this -> pattern = $ pattern ; }
Sets Filter for Extensions.
Caution! Method overwrites Pattern if already set.
Caution! Flag 'showFiles' needs to be set to TRUE.
@access		public
@param		array		$extensions			List of allowed File Extensions.
@return		void
Sets Filter for Extensions . Caution! Method overwrites Pattern if already set . Caution! Flag showFiles needs to be set to TRUE .