Gumbo_Load_Setting
Gumbo_List | --Gumbo_Setting | --Gumbo_Load_Setting
Load Setting Class
Author(s): |
Michael Luster <mluster79@yahoo.com> |
License: | New BSD License |
Copyright: | Copyright (c) 2007, iBayou, Michael Luster |
Link: | http://sourceforge.net/projects/phpgumbo |
Version: | 0.0.1 |
Implements interfaces:
Inherited Methods
- Gumbo_List::__construct()
- Gumbo_List::add()
- Gumbo_List::exists()
- Gumbo_List::get()
- Gumbo_List::getAll()
- Gumbo_List::getIterator()
- Gumbo_List::remove()
- Gumbo_List::removeValue()
- Gumbo_List::reset()
- Gumbo_List::size()
- Gumbo_List::__get()
- Gumbo_List::__isset()
- Gumbo_List::__set()
- Gumbo_List::__unset()
Class Methods
Constructor
The settings parameter will construct a new object from the array, overriding the default settings. If the value is not set, the default will be used. The array should contain key=>value pairs, where the key references a property of the object. The key should exclude the underscore of the property name. For example:
- array ("ext"=>"html")
Parameter(s):
- (array) $settings :: list of settings in key=>val pairs
- throws:
Gumbo_Exception Overrides
[ Top ]public void add ( string $key, [mixed $val] ) [line 98]Adds a key=>value pair to the setting
Parameter(s):
- (string) $key
- (mixed) $val
- throws:
Gumbo_Exception Overrides
[ Top ]public void addDir ( string $dir ) [line 164]Adds a directory path to the list (additional arguments may be accepted)
Parameter(s):
- (string) $dir
- throws:
Gumbo_Exception Implementation of:
[ Top ]public bool getClass ( ) [line 425]Returns if the setting is for a class load
Implementation of:
[ Top ]public bool getInclude ( ) [line 457]Returns if the include function should be used instead of require
Implementation of:
[ Top ]public bool getOnce ( ) [line 449]Returns if the file should be loaded once
Implementation of:
[ Top ]public string getPath ( ) [line 481]Returns the path to start searching from
Implementation of:
[ Top ]public string getSeparator ( ) [line 473]Returns the stretch separator character
Implementation of:
[ Top ]public bool getStretch ( ) [line 465]Returns if the file name should stretch
Implementation of:
[ Top ]public void remove ( string $key ) [line 128]Removes the setting
Parameter(s):
- (string) $key
- throws:
Gumbo_Exception Overrides
[ Top ]public void setClass ( bool $val ) [line 203]Sets the setting to load a class file
Parameter(s):
- (bool) $val
- throws:
Gumbo_Exception Implementation of:
[ Top ]public void setDirs ( array|string $dirs ) [line 233]Adds a list of directories to the list
There are three ways to set the Directory paths. The first method passes a string, with either a single directory or list of directories separated by the PATH_SEPARATOR constant. The second passes an array, with each element value a different directory. The third involves either of the first two methods, but multiple arguments.
- $this->setDirs ("path1:path2:path3/path4");
- $this->setDirs (array ("path1", "path2", "path3/path4"));
- $this->setDirs ("path1", array ("path2"), "path3/path4:path5");
Parameter(s):
- (array|string) $dirs :: ...[]
- throws:
Gumbo_Exception Implementation of:
[ Top ]public void setExtension ( string $ext ) [line 278]Sets the file extension (leading "." not necessary)
Parameter(s):
- (string) $ext
- throws:
Gumbo_Exception Implementation of:
[ Top ]public void setInclude ( bool $include ) [line 316]Sets to use include instead of require
Parameter(s):
- (bool) $include
- throws:
Gumbo_Exception Implementation of:
[ Top ]public void setOnce ( bool $once ) [line 297]Sets the load only once setting
Parameter(s):
- (bool) $once
- throws:
Gumbo_Exception Implementation of:
[ Top ]public void setPath ( string $path ) [line 378]Sets the path to start searching from.
Possible values:
- include: search the include path (default)
- home: start from Gumbo home directory
- absolute: ignores starting point and uses dirs as absolute paths
Parameter(s):
- (string) $path
- throws:
Gumbo_Exception Implementation of:
[ Top ]public void setRemove ( string $remove ) [line 404]Sets a string pattern to remove from the file name before search
Parameter(s):
- (string) $remove
- throws:
Gumbo_Exception Implementation of:
[ Top ]public void setSeparator ( string $sep ) [line 354]Sets the stretch separator character
Parameter(s):
- (string) $sep
- throws:
Gumbo_Exception Implementation of:
[ Top ]public void setStretch ( bool $stretch ) [line 335]Sets to stretch the file name as additional directory paths
Parameter(s):
- (bool) $stretch
- throws:
Gumbo_Exception Implementation of:
[ Top ]