class_directory

Class Directory

Dépendances:

Structure XML:

<?xml version="1.0" encoding="ISO-8859-1"?>
  
<directory>
  
  <server>
    <host>http://host.com</host>
    <seed>http://host.com/rss1.xml</seed>
    <seed>http://host.com/rss2.xml</seed>
    <seed>http://host.com/rssx.xml</seed>
    ...
    <contact>admin@host.com</contact>
  </server>
  
  <server>
    <host>http://host2.com</host>
    <seed>http://host2.com/rss1.xml</seed>
    <seed>http://host2.com/rss2.xml</seed>
    <seed>http://host2.com/rssx.xml</seed>
    ...
    <contact>admin@host2.com</contact>
  </server>
  
  ...
  
</directory>

Structure DBO:

Table host

+--------------+--------------+------+-----+---------+----------------+
| Field        | Type         | Null | Key | Default | Extra          |
+--------------+--------------+------+-----+---------+----------------+
| host_id      | int(11)      | NO   | PRI | NULL    | auto_increment | 
| host_contact | varchar(120) | YES  |     | NULL    |                | 
| host_url     | varchar(120) | NO   |     |         |                | 
+--------------+--------------+------+-----+---------+----------------+

Table seed

+----------+--------------+------+-----+---------+----------------+
| Field    | Type         | Null | Key | Default | Extra          |
+----------+--------------+------+-----+---------+----------------+
| seed_id  | int(11)      | NO   | PRI | NULL    | auto_increment | 
| seed_url | varchar(256) | NO   | UNI |         |                | 
| id_host  | int(11)      | NO   |     |         |                | 
+----------+--------------+------+-----+---------+----------------+

Déclarations Publiques:

Import/Export

loadFromXml(string: file_name)
loadFromDbo(string: url, user, pass, db_name)
 
exportToXml(string: file_name)
exportToDbo(string: url, user, pass, db_name)

Manipulation

setEntitesSource(string: DBO | XML)
setOutputFormat(string: HOST_LIST | SEED_LIST | SEED_BY_HOST)
setOutputQuery(string: query)
  
getArrayDirectory();

Annuaire Dynamique:

Flux statique:

http://host.com/rss.xml

Flux dynamique:

http://host.com/rss.php?search=city

Parser build'in:

http://host.com/rss.php?search={HITS}

{HITS}: balise remplacée selon setEntitesSource.


2009-06-07