apidoc
[ class tree: apidoc ] [ index: apidoc ] [ all elements ]

Class: File_Archive_Predicate_Duplicate

Source Location: /File_Archive-1.5.5/File/Archive/Predicate/Duplicate.php

Class Overview

File_Archive_Predicate
   |
   --File_Archive_Predicate_Duplicate

Evaluates to true if a for the files for which a newer version


Variables

Methods


Inherited Variables

Inherited Methods

Class: File_Archive_Predicate

File_Archive_Predicate::isTrue()
Indicates whether the current file from the reader should be kept

Class Details

[line 45]
Evaluates to true if a for the files for which a newer version

can be found in a specified archive Comparison is by default made on dates of the files, or position in the archive (if two files have the same date or the date of a file is not specified).



[ Top ]


Class Variables

$newest = array()

[line 51]

  • Var: Key is the filename, value is an array of date (index 0) and position in the archive (index) 1 of the newest entry with this filename

Type:   array


[ Top ]

$pos =  0

[line 56]

  • Var: The current position of the file in the source

Type:   int


[ Top ]



Method Detail

File_Archive_Predicate_Duplicate (Constructor)   [line 64]

File_Archive_Predicate_Duplicate File_Archive_Predicate_Duplicate( &$source, File_Archive_Reader $source)


Parameters:

File_Archive_Reader   $source   —  The source will be inspected to find the date of old files The predicate should then be used on the same source to remove the old duplicate files
   &$source   — 

[ Top ]

compare   [line 90]

int compare( $a, $b)

Compare the dates of two files. null is considered infinitely old
  • Return: < 0 if $a can be considered older than $b = 0 if $a and $b can be considered same age > 0 if $a can be considered newer than $b

Parameters:

   $a   — 
   $b   — 

[ Top ]

isTrue   [line 97]

void isTrue( &$source)

  • See: File_Archive_Predicate::isTrue()

Overrides File_Archive_Predicate::isTrue() (Indicates whether the current file from the reader should be kept)

Parameters:

   &$source   — 

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:48:27 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.