CI_Loader::add_package_path()

add_package_path($path[, $view_cascade = TRUE])

Parameters:
  • $path (string) – Path to add
  • $view_cascade (bool) – Whether to use cascading views
Returns:

CI_Loader instance (method chaining)

Return type:

CI_Loader

Adding a package path instructs the Loader class to prepend a given path for subsequent requests for resources. As an example, the “Foo Bar” application package above has a library named Foo_bar.php. In our controller, we’d do the following:

$this->load->add_package_path(APPPATH.'third_party/foo_bar/')
        ->library('foo_bar');
doc_CodeIgniter
2016-10-15 16:31:42
Comments
Leave a Comment

Please login to continue.