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

Class Methods

public Gumbo_Load_Setting __construct ( [array $settings] ) [line 50]

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:

  1. array ("ext"=>"html")
will set the $_ext value.

Parameter(s):

  • (array) $settings :: list of settings in key=>val pairs
  • throws:  Gumbo_Exception
Overrides
Gumbo_Setting::__construct()

[ 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
Gumbo_Setting::add()

[ 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:
Gumbo_Interface_Load_Setting::addDir()

[ Top ]
public bool getClass ( ) [line 425]

Returns if the setting is for a class load

Implementation of:
Gumbo_Interface_Load_Setting::getClass()

[ Top ]
public array getDirs ( ) [line 433]

Returns the list of directory paths

Implementation of:
Gumbo_Interface_Load_Setting::getDirs()

[ Top ]
public string getExtension ( ) [line 441]

Returns the file extension

Implementation of:
Gumbo_Interface_Load_Setting::getExtension()

[ Top ]
public bool getInclude ( ) [line 457]

Returns if the include function should be used instead of require

Implementation of:
Gumbo_Interface_Load_Setting::getInclude()

[ Top ]
public bool getOnce ( ) [line 449]

Returns if the file should be loaded once

Implementation of:
Gumbo_Interface_Load_Setting::getOnce()

[ Top ]
public string getPath ( ) [line 481]

Returns the path to start searching from

Implementation of:
Gumbo_Interface_Load_Setting::getPath()

[ Top ]
public string getRemove ( ) [line 489]

Returns the remove string pattern

Implementation of:
Gumbo_Interface_Load_Setting::getRemove()

[ Top ]
public string getSeparator ( ) [line 473]

Returns the stretch separator character

Implementation of:
Gumbo_Interface_Load_Setting::getSeparator()

[ Top ]
public bool getStretch ( ) [line 465]

Returns if the file name should stretch

Implementation of:
Gumbo_Interface_Load_Setting::getStretch()

[ Top ]
public void remove ( string $key ) [line 128]

Removes the setting

Parameter(s):

  • (string) $key
  • throws:  Gumbo_Exception
Overrides
Gumbo_List::remove()

[ 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:
Gumbo_Interface_Load_Setting::setClass()

[ 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.

  1. $this->setDirs ("path1:path2:path3/path4");
  2. $this->setDirs (array ("path1", "path2", "path3/path4"));
  3. $this->setDirs ("path1", array ("path2"), "path3/path4:path5");

Parameter(s):

  • (array|string) $dirs :: ...[]
  • throws:  Gumbo_Exception
Implementation of:
Gumbo_Interface_Load_Setting::setDirs()

[ Top ]
public void setExtension ( string $ext ) [line 278]

Sets the file extension (leading "." not necessary)

Parameter(s):

  • (string) $ext
  • throws:  Gumbo_Exception
Implementation of:
Gumbo_Interface_Load_Setting::setExtension()

[ Top ]
public void setInclude ( bool $include ) [line 316]

Sets to use include instead of require

Parameter(s):

  • (bool) $include
  • throws:  Gumbo_Exception
Implementation of:
Gumbo_Interface_Load_Setting::setInclude()

[ Top ]
public void setOnce ( bool $once ) [line 297]

Sets the load only once setting

Parameter(s):

  • (bool) $once
  • throws:  Gumbo_Exception
Implementation of:
Gumbo_Interface_Load_Setting::setOnce()

[ 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:
Gumbo_Interface_Load_Setting::setPath()

[ 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:
Gumbo_Interface_Load_Setting::setRemove()

[ Top ]
public void setSeparator ( string $sep ) [line 354]

Sets the stretch separator character

Parameter(s):

  • (string) $sep
  • throws:  Gumbo_Exception
Implementation of:
Gumbo_Interface_Load_Setting::setSeparator()

[ 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:
Gumbo_Interface_Load_Setting::setStretch()

[ Top ]