FOSSology  4.4.0
Open Source License Compliance by Open Source Software
parseFolderPath Class Reference
Collaboration diagram for parseFolderPath:
Collaboration graph

Public Member Functions

 __construct ($page, $url)
 
 countFiles ()
 
 parseFolderPath ()
 
 _createRtnArray ($list, $matches)
 
 setPage ($page)
 

Public Attributes

 $page
 
 $host
 
 $filesWithLicense
 

Private Attributes

 $test
 

Detailed Description

Parse the part of the page that has the folder path and mini menu.

Parameters
string$pagethe xhtml page to parse
Returns
array of assocative arrays. Each associative array uses the folder or leaf name for the key and the value is a link (if there is one.)

Can return an empty array indicating nothing on the page to browse.

Version
"$Id: parseFolderPath.php 2866 2010-03-10 19:32:44Z rrando $" Created on Aug 21, 2008

Definition at line 22 of file parseFolderPath.php.

Member Function Documentation

◆ _createRtnArray()

parseFolderPath::_createRtnArray (   $list,
  $matches 
)

clean up the links to be usable

Parameters
array$list,thelist to clean up
int$matches,thesize of the list
Returns
array, the cleaned up list_bucket_files
Todo:
fix the docs above to much more detailed.

Definition at line 117 of file parseFolderPath.php.

◆ countFiles()

parseFolderPath::countFiles ( )

function countFiles()

Parse the part of the page that has the folder path and mini menu, return the count of 'Folder' items found.

Returns
int the count of items found, can be 0.

Definition at line 53 of file parseFolderPath.php.

◆ parseFolderPath()

parseFolderPath::parseFolderPath ( )

function parseFolderPath

Parse the part of the page that has the folder path and mini-menu, this method only parses the folder path, see parseMiniMenu.

Returns
array of assocative arrays. Each assocative array is ordered by folder names with the last key being the leafname, which can be and empty directory. Usually no link is associated with the leaf node, so it's typically NULL.

An empty array is returned if no license paths on that page.

Definition at line 78 of file parseFolderPath.php.


The documentation for this class was generated from the following file: