public function fetchPhoto(AnCommandContext $context)
    {
        $data = $context->data;

        $data->append(array(
            'photo_id' => $this->photo_id,
        ));

        $photo_id = (array) AnConfig::unbox($data->photo_id);

        if (!empty($photo_id)) {
            $photo = $this->actor->photos->fetchSet(array('id' => $photo_id));

            if (count($photo) === 0) {
                $photo = null;
            }

            $this->photos = $this->photo = $photo;
        }

        return $this->photo;
    }
public function fetchPhoto(AnCommandContext $context)
    {
        $data = $context->data;

        $data->append(array(
            'photo_id' => $this->photo_id,
        ));

        $photo_id = (array) AnConfig::unbox($data->photo_id);

        if (!empty($photo_id)) {
            $photo = $this->actor->photos->fetchSet(array('id' => $photo_id));

            if (count($photo) === 0) {
                $photo = null;
            }

            $this->photos = $this->photo = $photo;
        }

        return $this->photo;
    }
public function fetchPhoto ( AnCommandContext $ context ) { $ data = $ context -> data ; $ data -> append ( array ( 'photo_id' => $ this -> photo_id , ) ) ; $ photo_id = ( array ) AnConfig :: unbox ( $ data -> photo_id ) ; if ( ! empty ( $ photo_id ) ) { $ photo = $ this -> actor -> photos -> fetchSet ( array ( 'id' => $ photo_id ) ) ; if ( count ( $ photo ) === 0 ) { $ photo = null ; } $ this -> photos = $ this -> photo = $ photo ; } return $ this -> photo ; }
Fetches a photo object given photo_id as a GET request.

@param object POST data
Fetches a photo object given photo_id as a GET request .