public function library($pathname, &$caller = false, $exposeToView = false) {

        $name = $this->getName($pathname);
        $path = $this->getPath($pathname);
        
        // If a reference to the calling object was passed, set an instance of
        // the library as one of its members.
        if ($caller) {
            
            // If no namespace is given, default to Cora namespace.
            if ($this->getPathBackslash($pathname) == '') {
                $lib = '\\Cora\\'.$name;
            }
            else {
                $lib = $pathname;
            }
            
            $libObj = new $lib($caller);

            // Set library to be available within a class via "$this->$libraryName"
            $caller->$name = $libObj;

            // Set library to also be available via "$this->load->$libraryName"
            // This is so this library will be available within View files as $libraryName.
            if ($exposeToView)
                $caller->setData($name, $libObj);
        }

    }
public function library($pathname, &$caller = false, $exposeToView = false) {

        $name = $this->getName($pathname);
        $path = $this->getPath($pathname);
        
        // If a reference to the calling object was passed, set an instance of
        // the library as one of its members.
        if ($caller) {
            
            // If no namespace is given, default to Cora namespace.
            if ($this->getPathBackslash($pathname) == '') {
                $lib = '\\Cora\\'.$name;
            }
            else {
                $lib = $pathname;
            }
            
            $libObj = new $lib($caller);

            // Set library to be available within a class via "$this->$libraryName"
            $caller->$name = $libObj;

            // Set library to also be available via "$this->load->$libraryName"
            // This is so this library will be available within View files as $libraryName.
            if ($exposeToView)
                $caller->setData($name, $libObj);
        }

    }
public function library ( $ pathname , & $ caller = false , $ exposeToView = false ) { $ name = $ this -> getName ( $ pathname ) ; $ path = $ this -> getPath ( $ pathname ) ; // If a reference to the calling object was passed, set an instance of // the library as one of its members. if ( $ caller ) { // If no namespace is given, default to Cora namespace. if ( $ this -> getPathBackslash ( $ pathname ) == '' ) { $ lib = '\\Cora\\' . $ name ; } else { $ lib = $ pathname ; } $ libObj = new $ lib ( $ caller ) ; // Set library to be available within a class via "$this->$libraryName" $ caller -> $ name = $ libObj ; // Set library to also be available via "$this->load->$libraryName" // This is so this library will be available within View files as $libraryName. if ( $ exposeToView ) $ caller -> setData ( $ name , $ libObj ) ; } }
Include specified library. - Depreciated. Now let's autoloading handle the file include.

if a reference to the calling class is passed in, then the specified library
will be invoked and a reference passed back to the calling class.

If $exposeToView is set to true along with a reference to the calling class,
then the library will be loaded into the calling controller's Data field
for use within a View file.
Include specified library . - Depreciated . Now let s autoloading handle the file include .