PHP class constructor , how to initalize pictuer “blob” type?
Posted
by
Iman25
on Stack Overflow
See other posts from Stack Overflow
or by Iman25
Published on 2012-04-05T05:26:08Z
Indexed on
2012/04/05
5:30 UTC
Read the original article
Hit count: 428
I have class and I want to initalize column that stores pictuer with type "blob" but I'm not sure how? take a look at the lat line of the code public function __construct( $data=array() ) {
if ( isset( $data['id'] ) ) $this->id = (int) $data['id'];
if ( isset( $data['date'] ) ) $this->date= (int) $data['date'];
if ( isset( $data['topic'] ) ) $this->topic = preg_replace ( "/[^\.\,\-\_\'\"\@\?\!\:\$ a-zA-Z0-9()]/", "", $data['topic'] );
if ( isset( $data['author'] ) ) $this->author = preg_replace ( "/[^\.\,\-\_\'\"\@\?\!\:\$ a-zA-Z0-9()]/", "", $data['author'] );
if ( isset( $data['content'] ) ) $this->content = $data['content'];
if ( isset( $data['picture'] ) ) $this->picture ="Here sholud be the Type" $data['picture'];
}
© Stack Overflow or respective owner