Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <blockquote> <p><code>schnalle:</code> this is bad practice. this is madness.<br> <code>the_noob:</code> madness ...?<br> <code>the_noob:</code> <em>(shouts)</em> THIS ... IS ... LITTLEFRAMEWORKIMBUILDING!<br> <code>the_noob:</code> <em>(kicks separation of code and presentation down the well)</em></p> </blockquote> <p>i don't really get what you want to do, but just pass the title as a parameter to the constructor ...</p> <pre><code>&lt;?php class Title { public function __construct($title) { echo '&lt;html&gt;&lt;head&gt;&lt;title&gt;' . htmlspecialchars($title) . '&lt;/title&gt;&lt;/head&gt;&lt;body&gt;'; } public function __destruct() { echo '&lt;/body&gt;&lt;/html&gt;'; } } ?&gt; </code></pre> <p>if you really want your objects to print something, i'd suggest the magic __tostring() method, so you can simply <code>echo</code> your object. but for html tags ... still not useful.</p> <p>i wish you luck with your framework, but you're either a genius <em>(not likely)</em> or a guy making the same mistakes (almost) every beginner did (before MVC arrived).</p> <blockquote> <p><strong>edit:</strong> i can't help you. you want direct output when the object is created, but need to get data into the object before it is created. so you try to workaround something ugly in making it even uglier. it just doesn't work that way!<br> you're trying to build a new, better kind of car by attaching wheels to a living donkey, then complain because it somehow didn't work out as you expected (donkey on wheels! wheooo!), and now you ask the community how to attach taillights in a way that makes the donkey/car go faster.</p> </blockquote>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload