Last active
April 14, 2017 22:53
-
-
Save ryanburnette/79b3b08917b89efa11d99bbba4b3a155 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class PostMeta { | |
public function __construct() { | |
$this->container = HtmlGenerator\HtmlTag::createElement('div') | |
->addClass('post-meta'); | |
$this->post_title = $this->container | |
->addElement('div') | |
->addClass('post-title') | |
->addClass('hidden'); | |
$this->post_date = $this->container | |
->addElement('div') | |
->addClass('post-date') | |
->addClass('hidden'); | |
$this->post_author = $this->container | |
->addElement('div') | |
->addClass('post-author') | |
->addClass('hidden'); | |
$this->post_authors = $this->container | |
->addElement('div') | |
->addClass('post-authors') | |
->addClass('hidden'); | |
$this->post_header_ad = $this->container | |
->addElement('div') | |
->addClass('post-header-ad') | |
->addClass('hidden'); | |
} | |
public function title($title) { | |
$this->post_title | |
->removeClass('hidden') | |
->text($title); | |
} | |
public function generate() { | |
return $this->container; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment