public function get($format)
    {
        switch ($format) {
            case 'json':
                return $this->toJson();
                break;
            case 'serialize':
                return $this->serialize();
                break;
            case 'array':
                return $this->toArray();
                break;
            case 'xml':
                return $this->toXml();
                break;
            default:
                return $this;
        }
    }
public function get($format)
    {
        switch ($format) {
            case 'json':
                return $this->toJson();
                break;
            case 'serialize':
                return $this->serialize();
                break;
            case 'array':
                return $this->toArray();
                break;
            case 'xml':
                return $this->toXml();
                break;
            default:
                return $this;
        }
    }
public function get ( $ format ) { switch ( $ format ) { case 'json' : return $ this -> toJson ( ) ; break ; case 'serialize' : return $ this -> serialize ( ) ; break ; case 'array' : return $ this -> toArray ( ) ; break ; case 'xml' : return $ this -> toXml ( ) ; break ; default : return $ this ; } }
Returns the result by format

@param  string $format
@return mixed
Returns the result by format