sexta-feira, 11 de fevereiro de 2011

Stupid Fucking Iterator

    /*
     * OK; before you read the following code know what I am trying to do.
     * I needed to get the list of child catagories from the root node so that
     * the root node didn't appear in the selection box. But for some stupid
     * fucking reason the stupid fucking DBA wont let me access the items using
     * indices and I instead have to use their stupid fucking Iterator
     * implementation. So there.
     */
    $firstList = $this->getRootNode()->getChildren();
    foreach ($firstList as $node)
    {
        $nodes = $node->getChildren();
        break;                // WTF?
    }

Nenhum comentário:

Postar um comentário