#35 ✓resolved
S. Shehzed

method and it's children organizational confusion

Reported by S. Shehzed | December 5th, 2010 @ 03:43 AM | in v0.20

make Method, Method_Isearching, Method_Tagging, and Method_Scripting into drivers. Method will be parent main drive(r) while the other three will be the children.

Comments and changes to this ticket

  • S. Shehzed

    S. Shehzed December 5th, 2010 @ 04:00 AM

    Follow driver_example. Children have access to parent's methods, but not one another's (obviously).

    The main driver extends CI_Driver_Library. Children extend CI_Driver. If you want common or semi-common methods and variables among children methods you can use interfaces.

    __constructor() should have:

    $this->valid_drivers[] = 'Blah_One';
    $this->valid_drivers[] = 'Blah_Two';
    

    Don't need to load children. Just load the parent: $this->load->driver('Document');

    Structure of files should be:
    Base directory: ParentName
    File in directory: ParentName.
    Directory in base, alongside file above: drivers
    Files in drivers:
    - ParentName_One - ParentName_Two

    Will call children by doing this:
    $this->ParentName->One->method();

  • S. Shehzed

    S. Shehzed December 12th, 2010 @ 01:50 AM

    • State changed from “active” to “resolved”

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

GOT COLD BEER! POUR BEER IN FROSTY MUG! DRINK BEER! REPEAT! HOPE COOKS SOURCE NO STEAL DRUNK HULK RECIPE!

Shared Ticket Bins

People watching this ticket

Pages