Created
June 8, 2014 13:36
-
-
Save eminetto/a38dc854af21e32447e4 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 | |
namespace Application\Model; | |
class Post | |
{ | |
public $id; | |
public $title; | |
public $description; | |
public $post_date; | |
//usado pelo TableGateway | |
public function exchangeArray($data) | |
{ | |
$this->id = (!empty($data['id'])) ? $data['id'] : null; | |
$this->title = (!empty($data['title'])) ? $data['title'] : null; | |
$this->description = (!empty($data['description'])) ? $data['description'] : null; | |
$this->post_date = (!empty($data['post_date'])) ? $data['post_date'] : null; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment