Welcome Guest, Not a member yet? Register   Sign In
How to create a new library and use it with controller?
#2

Example:

PHP Code:
<?php

namespace App\Libraries;

/**
 * Class ExampleLibrary
 *
 * @package App\Libraries
 *          
 * in your controller or where you load the library
 *          
 * use App\Libraries\Example;
 */
class ExampleLibrary
{

    
/**
     * Class properties go here.
     * -------------------------------------------------------------------
     * public, private, protected, static and const.
     */


    /**
     * __construct ()
     * -------------------------------------------------------------------
     *
     * Class    Constructor
     *
     * NOTE: Not needed if not setting values or extending a Class.
     *
     */
    
public function __construct()
    {

    }

    
// -------------------------------------------------------------------

}   // End of ExampleLibrary Library Class.

/**
 * -----------------------------------------------------------------------
 * Filename: ExampleLibrary.php
 * Location: ./app/Libraries/ExampleLibrary.php
 * -----------------------------------------------------------------------
 */ 
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply


Messages In This Thread
RE: How to create a new library and use it with controller? - by InsiteFX - 04-19-2021, 09:00 PM



Theme © iAndrew 2016 - Forum software by © MyBB