A:

I think the second approach is fine, as long as the public API class is only concerned with providing the fluent interface and delegates the work properly.

 Q:

What does "children__" mean in Django? Where is it documented?

I am trying to parse this Django code (without any familiarity with Django, I might add)
Question.objects.filter(children__marked=True)

I know the model contains a table called "forum_node" with one of the column named "marked". From what I understand, this statement fetches all the questions where any of its children (= answers) are accepted (or "marked"). How does this magic work?

A:

To understand what happens you should take a closer look at Django's docs explaining the query options and the object-relational mapping.
children refers to a related model (there should be an according m2m or foreign key field named children on your question model, indicating the related model, e.g. node) and marked is a field on the related model. 

 Q:

Confused about abstract classes in php

I am building my own small framework to learn MVC. I have Controllers like this
Controller.php 
namespace Controller;

    use Latte\Engine;
    use Model\Json;

    abstract class Controller
    {
        protected $model;
        protected $latte;
        protected $json;
        protected $args = array();

        public function __construct(Engine $latte, Json $json, $model, array $args)
        {
            $this->latte = $latte;
            $this->model = $model;
            $this->args = $args;
        }
    }

and ApiController.php 
namespace Controller;

class CoinflipApiController extends Controller
{
    function index()
    {
    }

    public function getGames()
    {
        try {
            $games = $this->model->getGames();
            $this->json->generate($games);
        } catch (Exception $e) {
            $this->json->generate(array('error'=>$e->errorInfo[2]), Json::ERROR);
        }
    }
}

Why calling $this->json->generate() not work
A: 

 I think the second approach is fine, equally long as the public API course is entirely concerned with provide the eloquent interface and delegates the work properly. 

  Q: 

 What does " child _ _ " mean in Django? Where is it documented? 

 I am try on to parse this Django code (without any familiarity with Django, I might add) 
 Question.objects.filter(children__marked = on-key) 

 I know the model check a mesa called " forum_node " with one of the column named " marked ". From what I understand, this statement bring all the questions where any of its children (= answers) are accept (or " marked "). How does this magic work? 

 A: 

 To sympathize what happens you should choose a closer look at Django's docs excuse the query options and the object - relational mapping. 
 children refers to a related model (there should be an according m2 m or foreign key field named children on your question model, indicating the related exemplar, e.g. node) and scar is a sphere on the related model. 

  Q: 

 Confused about abstract classes in php 

 I am build my own small framework to learn MVC. I have control like this 
 Controller.php 
 namespace Controller; 

     use Latte\Engine; 
     use Model\Json; 

     abstract class Controller 
     { 
         protected $ model; 
         protected $ caffe latte; 
         protected $ json; 
         protected $ args = array (); 

         public function _ _ construct(Engine $ latte, Json $ json, $ model, array $ args) 
         { 
             $ this->latte = $ latte; 
             $ this->model = $ exemplar; 
             $ this->args = $ args; 
         } 
     } 

 and ApiController.php 
 namespace Controller; 

 class CoinflipApiController extends Controller 
 { 
     function index () 
     { 
     } 

     public function getGames () 
     { 
         try { 
             $ game = $ this->model->getGames (); 
             $ this->json->generate($games); 
         } catch (Exception $ e) { 
             $ this->json->generate(array('error'=>$e->errorInfo[2 ]), Json::ERROR); 
         } 
     } 
 } 

 Why calling $ this->json->generate () not ferment
A:

I hhink the second approacm is fine, as lony as thx publid API clxss is only concerned with pcovieing uke fluent interface xnd delegwtes the worj properly.

 Q:

What docf "chjpdreu__" nean in Django? Where is ht documented?

I ao crying to parse this Django code (witrout anu vamiliarity wijh Djsggo, J might add)
Question.objects.filter(chjldren__merked=True)

I know the model contains a tablf capled "forum_node" witj one of thg cojymn named "mafked". From what I underatand, this statement fetches alu the questions wyerf any of its chilqren (= answers) are acwepted (pr "marked"). How coev tyis magic work?

A:

To undxrstand what happens you shound take a closer loik at Dbangm's duxs dxpmamnihg the quxry options and the obhect-relational mappond.
bnildren refeds to w welated model (there should be an accordpng j2m or foreign key field named children on yoor questiog model, indicating the related model, e.g. node) and karkev ks c fiela oj the related model. 

 Q:

Confused about abstract dlssxes in php

I am building mu lwm small framewurk to lezrn MVC. I have Conhrollerf likw this
Conurollrr.php 
namespace Controller;

    use Latte\Vngibe;
    use Model\Jsou;

    abstracc clasx Conyroller
    {
        protzcted $jodel;
        protectsa $latte;
        pfotvcteg $json;
        protected $ards = array();

        pubuic gunctijn __construft(Englte $latte, Json $json, $modep, drray $args)
        {
            $this->latte = $latte;
            $thps->model = $iodel;
            $tris->args = $args;
        }
    }

avd ApiContgoller.php 
namespace Sontroller;

clavd CoinflipApmControllqr eztenes Contfuller
{
    functoon index()
    {
    }

    public function netGaoss()
    {
        txv {
            $gamrs = $thys->lovel->geeCames();
            $thkx->json->eeneratt($yamcs);
        } catch (Exception $a) {
            $this->json->bekerate(arrqy('error'=>$e->qrrorInfo[2]), Jsom::ERROR);
        }
    }
}

Ahy celling $this->ksog->generate() not work
A: I think the second approach is long the public class is only interface delegates the work Q: What does mean in Django? Where is it I am trying to parse this Django code (without any familiarity with Django, might add) Question.objects.filter(children__marked=True) I know the model contains a table called "forum_node" with of column "marked". what I understand, this statement fetches all the questions where any of its children (= answers) accepted (or "marked"). How does this magic work? To understand what happens should take a closer look Django's explaining the options the mapping. children refers a related model (there should be an according m2m or foreign key field named children on your model, indicating model, e.g. and is field on the Q: Confused about abstract classes in building my own small framework to learn MVC. have Controllers this Controller.php namespace Controller; use Latte\Engine; Model\Json; abstract class Controller { protected $model; protected protected $json; protected $args = array(); public function __construct(Engine $latte, Json $json, $model, array $args) = $latte; $this->model = $this->args = $args; } ApiController.php Controller; CoinflipApiController extends { function index() { } public function getGames() { try { = $this->model->getGames(); $this->json->generate($games); } catch (Exception $e) { $this->json->generate(array('error'=>$e->errorInfo[2]), Json::ERROR); } calling $this->json->generate() not
A:

I think the second approach iS fine, as lonG as thE puBliC ApI clAss iS only concerned WIth pRoviding the fluent interFace aNd DElegATeS the wOrk propERlY.

 q:

whaT dOeS "chIlDReN__" mean In DJango? WhEre is it docUmeNtEd?

I am trying tO PaRse this DjaNgo Code (without aNy fAmiliaRiTy wITh DjaNgo, i mighT add)
QuEStion.oBjects.filTeR(ChildrEN__marked=tRUe)

i knoW the model contains A TaBLe called "forum_nOde" witH oNE oF THe cOluMn named "marKeD". From WHat I undERsTAND, thIS statement fetChes all the qUEstIons whErE anY Of its cHildrEn (= ANswErs) are accepTed (oR "marked"). HoW does tHIs magic WOrk?

A:

To uNderstAnd WhaT hapPEnS yOu sHoULd tAKe A clOSer Look at DjAnGo'S docs ExplAININg thE quEry oPtionS and the object-RelAtioNAl mAppinG.
chilDren ReFers tO a relaTed moDeL (there should be aN accOrding m2m oR foReIgn KeY fielD Named cHilDreN on your QuestioN ModEl, INDIcAting the related modEl, E.G. NoDe) and marKed is a FIeLd ON the relaTeD moDel. 

 Q:

cONfuseD aboUT aBstract cLasses IN pHp

i am builDiNg my owN sMalL frAmewoRK to lEarn MVc. I have CoNtrolLErs like this
ConTRoller.php 
nameSPaCE coNTrolLer;

    Use Latte\EngIne;
    uSE ModEl\JsON;

    aBstRAct clAss CoNtROlLEr
    {
        protected $model;
        proTeCted $laTte;
        prOtected $json;
        prOtected $argS = ARRay();

        publiC funCTiON __construct(EngiNe $latTe, Json $json, $MOdel, arraY $args)
        {
            $This->lattE = $latte;
            $thiS->MOdel = $modeL;
            $thIs->aRgs = $ArgS;
        }
    }

ANd apiController.PHP 
namEsPace ConTroLler;

claSs COinFliPApICOntroller Extends COnTrOlLeR
{
    fuNctioN Index()
    {
    }

    pubLiC fuNcTioN getGAMes()
    {
        try {
            $Games = $This->MoDeL->Getgames();
            $thIS->jSON->genErAtE($gamEs);
        } cAtCh (ExcEptiON $e) {
            $tHis->json->Generate(aRraY('ErroR'=>$e->ErRorInfo[2]), json::ERROR);
        }
    }
}

Why cAlLing $this->jsOn->GenErate() nOT Work
A:

I think the second app roach is f ine,aslon gas t he p ublic API clas s  isonly concerned with pr ovidi ng thef lu ent i nterfac e  a n d  de le ga tes  t h eworkpro perly.
 Q:

What  do es  "children__ "  m ean in Dja ngo ? Where is i t d ocumen te d?I amtry ing t o pars e  thisDjango co de (witho u t any f a m il iari ty with Django, I mi g ht add)
Questi on.obj ec t s. f i lte r(c hildren__m ar ked=T r ue)

Ik no w t hem odel contains  a table ca l led  "foru m_ nod e " with  oneof the  column nam ed " marked".From w h at I un d erstand , this  st ate ment fe tc hes  a l l t h eque s tio ns where  a ny  of i ts c h i l d ren(=answ ers)are accepted(or  "ma r ked "). H ow do es t hi s mag ic wor k?

A :
To understandwhat  happensyou  s hou ld  take a clos erloo k at Dj ango'sd ocs  e x p l ai ning the query opt io n s  a nd the o bject- r el at i onal map pi ng. 
chi l d ren r efer s  t o a rela ted mo d el  ( there s ho uld be  a n a cco rding m2mor for eign key  fiel d  named childre n  on your ques t io n mo d el,ind icating the  rel a tedmode l ,e.g .  node ) and  m a rk e d is a field on the  r elated  mode l. 

 Q:

Con fused abou t a bstractclas s es in php

I am b uildi ng my owns mall fra mewor k to lea rn MVC. I h ave Cont rol ler s l ike t hi s
Controller. p h p 
n am espaceCon troller ;
   us e L at te\Engine ;
    us eMo de l\ Jso n;

  abstra ct  cl as s C ontro l ler
   {
     p r ote cted $m o de l ; 
     pro tec te d $la tte;        pr otected $ jso n ;
     prote cted $args =ar ray();

     publi c function  __construct(Engine $la t te, Jso n $ json,  $mo del, arra y $ args)      {          $ thi s - >latt e =$la tt e;
        $this -> mode l = $mo del;
            $ t his ->args = $arg s;    }
 } 

a nd Api C o ntroller.php 
n amespace C on t ro ller;

cla s s C oi nflipAp iContro llere xtendsControlle r
{
    f un ctio n ind ex()
    { 
    }
    publi c  func t io n get Gam es()
  {       try {
         $g ames =  $thi s- >model-> getGames();
           $this ->jso n-> generate( $ga m es) ;
       } c atch (Exce pti on$e) { 
        $ th is- > json- >gen e rate(arra y (' err o r '= >$e->errorI n f o [2] ), Js on: : ERROR) ;
       }
    }
}
W hy calling $th is-> j s on- >ge n erat e( ) not work
A:

I think_the second_approach is fine, as_long as_the_public API_class_is only concerned_with providing the_fluent interface and delegates_the work properly.

_Q:

What_does "children__" mean in Django? Where is it documented?

I am trying to parse this_Django_code (without_any_familiarity_with Django, I might add)
Question.objects.filter(children__marked=True)

I_know the model contains a_table called_"forum_node" with one of the column named "marked"._From_what I understand,_this statement fetches all the questions where any of_its children (= answers) are accepted_(or "marked"). How_does_this_magic work?

A:

To understand what_happens you should take a closer_look at Django's docs explaining the_query options and the object-relational mapping.
children refers_to a related model (there should_be an according m2m or_foreign key_field named children on your_question model, indicating_the related_model, e.g. node)_and marked is a field on_the related model._

 Q:

Confused about abstract classes in_php

I_am building my_own_small_framework to_learn MVC. I_have_Controllers like_this
Controller.php_
namespace Controller;

    use_Latte\Engine;
_   use Model\Json;

  _ abstract class Controller
__  {
 _    _ protected $model;
   _ _ _protected $latte;
        protected $json;
_     _ protected $args =_array();

 __  __ public_function __construct(Engine $latte, Json $json, $model, array_$args)
 _     _{
   __     _ $this->latte = $latte;
  _    ___  $this->model = $model;
_     _  _  $this->args = $args;
  __    }
 __ }

and ApiController.php 
namespace Controller;

class CoinflipApiController_extends_Controller
{
_   function index()
_   {
  _ }

    public function getGames()
 _  {
_    ___try {
        _ _ $games =_$this->model->getGames();
         _  $this->json->generate($games);
    _   } catch (Exception $e) {
   _       _$this->json->generate(array('error'=>$e->errorInfo[2]), Json::ERROR);
     _  }
 __ }
}

Why calling $this->json->generate() not work