public function setPhotos($data) {
if ($this->getType()!='photo') {
return;
}
$aPhotos = array();
if(is_array($data)){
foreach($data AS $pId => $sPhoto){
$sFileName = substr($sPhoto["full"], strrpos($sPhoto["full"], '/')+1);
$aPhoto = array(
"pId"> $pId,
"thumb"=>substr($sPhoto["full"], 0, -strlen($sFileName)).'s_'.$sFileName,
"full"=>$sPhoto["full"]
);
$aPhotos[]=$aPhoto;
}
}
$this->extractExtra();
$this->aExtra['photos']=$aPhotos;
$this->setExtra($this->aExtra);
}
public function getPhotos() {
if ($this->getType()!='photo') {
return null;
}
$this->extractExtra();
if (isset($this->aExtra['photos'])) {
$aPhotos=$this->aExtra['photos'];
return $aPhotos;
}
return null;
}