Back to BaseController class

Method setPath

protected void
setPath
(mixed $type, mixed $path)
Sets an entire array of search paths for resources.
Parameters
  • string $type The type of path to set, typically 'view' or 'model'.
  • string $path The new set of search paths. If null or false, resets to the current directory only.
Returns
  • void
Since
  • 3.0

Method setPath - Source code

/**
 * Sets an entire array of search paths for resources.
 *
 * @param   string  $type  The type of path to set, typically 'view' or 'model'.
 * @param   string  $path  The new set of search paths. If null or false, resets to the current directory only.
 *
 * @return  void
 *
 * @since   3.0
 */
protected function setPath($type, $path)
{
    // Clear out the prior search dirs
    $this->paths[$type] = array();
    // Actually add the user-specified directories
    $this->addPath($type, $path);
}