Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- use yii\base\Component;
- use yii\base\Behavior;
- class api extends Components {
- }
- class APIBehavior extends Behavior
- {
- function login(){}
- }
- class Container extends Components {
- private $endpoint1;
- public function init (){
- $this->endpoint1 = new api;
- $this->endpoint1->addBehaviour('auth', new APIBehavior);
- }
- }
- class EContainer extends Container {
- private $endpoint2;
- public function init (){
- $this->endpoint2 = new api;
- $this->endpoint2->addBehaviour('auth', new APIBehavior);
- }
- public function request(){
- }
- }
Add Comment
Please, Sign In to add comment