Skip to content
This repository has been archived by the owner on Feb 16, 2022. It is now read-only.

The repository class can not use two functions of one class #151

Open
huiyonghkw opened this issue May 31, 2017 · 0 comments
Open

The repository class can not use two functions of one class #151

huiyonghkw opened this issue May 31, 2017 · 0 comments

Comments

@huiyonghkw
Copy link

classA.php

use A\B\C\ClassB;

classA
{
    public $b;

    public function __construct(ClassB $b)
    {
        $this->b = $b;
    }

    public function func1()
    {
       $this->b->update(1, ["a"=>1, "b" => 2]);

       $this->func2();
    }

    public function func2()
    {
        $this->b->where(1)->where('a'=>'1')->get();
    }

}

like above function func2$this->b can not use where fucntion to query

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant