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

Class: MediaSearch_Config_Sql

Source Location: /MediaSearch/Config/Sql.php

Class Overview

MediaSearch_Config_Abstract
   |
   --MediaSearch_Config_Sql

A concrete implemetation for SQL config files. The file can contain any SQL statement. The filename extensions need to be .sql.


Author(s):

Copyright:

  • Copyright (c) 2009 Sven Strittmatter

Implements interfaces:

Variables

Constants

Methods


Inherited Constants

Inherited Variables

Inherited Methods

Class: MediaSearch_Config_Abstract

MediaSearch_Config_Abstract::__construct()
The constructor requires the full filename to the config file.
MediaSearch_Config_Abstract::addParseOption()
MediaSearch_Config_Abstract::addParseOptions()
Adds multiple parse options in an array.
MediaSearch_Config_Abstract::applayParseOptions()
Apply the added parse options to the data parsed by parseData().
MediaSearch_Config_Abstract::createConfig()
Factory method which creates a proper config file implementation depending on its type. The type is determined by the filename extension (@see MediaSearch_File_Util::getExtension()).
MediaSearch_Config_Abstract::get()
MediaSearch_Config_Abstract::getFileName()
MediaSearch_Config_Abstract::getRawData()
MediaSearch_Config_Abstract::hasParseOptions()
MediaSearch_Config_Abstract::loadRawData()
Loads the data by file_get_contents() from file.
MediaSearch_Config_Abstract::parseData()
The default parse behaviour is copying the loaded file string with no modification to parsed data.
MediaSearch_Config_Abstract::removeParseOptions()
MediaSearch_Config_Abstract::setFileName()

Class Details

[line 43]
A concrete implemetation for SQL config files. The file can contain any SQL statement. The filename extensions need to be .sql.

This type of config also implement MediaSearch_Interface_Command. Thatt means that you can execute the configuration on a database. To do this its neccessary to provide a proper PDO and Database name to the config object.




Tags:

copyright:  Copyright (c) 2009 Sven Strittmatter


[ Top ]


Class Variables

$databaseName =

[line 61]

The database name the PDO should work on.



Tags:

access:  protected

Type:   string


[ Top ]

$pdoConnection =

[line 54]

Optional PDO connection obejct. NEccessary for executing the config object on a database.



Tags:

access:  protected

Type:   PDO


[ Top ]



Class Methods


method execute [line 87]

execute( )

MediaSearch_Interface_Command implementation.

Executes the loaded SQL config on the database setted by setPdo().




Tags:

todo:  Specify the return type of PDO!
throws:  RuntimeException On any error executing the SQL on the PDO.
access:  public


[ Top ]

method setPdo [line 71]

void setPdo( $pdo, string $databaseName)

Sets PDO object and a database name. Thats neccessary if you want to execute the loaded SQL config on a databse.



Tags:

access:  public


Parameters:

PDO   $pdo  
string   $databaseName  

[ Top ]


Class Constants

TRACE_LELVEL =  12

[line 45]


[ Top ]



Documentation generated on Mon, 17 Aug 2009 14:54:05 +0200 by phpDocumentor 1.4.2