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

Class: MediaSearch_Config_Interface

Source Location: /MediaSearch/Config/Interface.php

Interface Overview




Author(s):

Copyright:

  • Copyright (c) 2009 Sven Strittmatter

Constants

Methods



Class Details

[line 28]


Tags:

copyright:  Copyright (c) 2009 Sven Strittmatter
todo:  Write apidoc.


[ Top ]


Class Methods


method addParseOption [line 86]

void addParseOption( $option)

With this method you can add some parse options. These are objects

which impplements MediaSearch_Config_ParseOptions_Interface. With this oarse options you can implement things like: You have a text file config and you want to load each line of the file as config value. To achieve this you can implement a parse option which explodes the given string by line break character.

Parse options are called in the order you addded them. The first parse object receives the origin config string as input to process. The following parse options get the return value of the previous parse option.




Tags:

access:  public


Parameters:


[ Top ]

method get [line 109]

mixed get( [string $name = null])

Returns a config value from the loaded and parsed configuration by its index. The index could be a string or integer. Thats depending on the implemention of the config file types and your parse options.



Tags:

access:  public


Parameters:

string   $name   Default is null.

[ Top ]

method getFileName [line 70]

void getFileName( )

Returns the file name of the config file.



Tags:

access:  public


[ Top ]

method getRawData [line 51]

void getRawData( )

Returns the string from the loaded config file.



Tags:

access:  public


[ Top ]

method hasParseOptions [line 99]

bool hasParseOptions( )

Returns if the config file has parse options added.



Tags:

access:  public


[ Top ]

method parseData [line 57]

void parseData( )

Parses the config string. Depending on the config type.



Tags:

access:  public


[ Top ]

method removeParseOptions [line 92]

void removeParseOptions( )

Removes all parse options.



Tags:

access:  public


[ Top ]

method setFileName [line 64]

void setFileName( string $fileName)

Expects the full filepath to the config file you want to load.



Tags:

access:  public


Parameters:

string   $fileName  

[ Top ]


Class Constants

TYPE_JSON =  'json'

[line 40]

Specifies the file extions for json configurations.


[ Top ]

TYPE_PHP =  'php'

[line 36]

Specifies the file extions for php configurations.


[ Top ]

TYPE_SQL =  'sql'

[line 44]

Specifies the file extions for sql configurations.


[ Top ]

TYPE_TEXT =  'txt'

[line 32]

Specifies the file extions for text configurations.


[ Top ]



Documentation generated on Mon, 17 Aug 2009 14:53:13 +0200 by phpDocumentor 1.4.2