public function transform($transformMode = '')
    {
        $planObject = [
            'plan_code'           => $this->plan_code,
            'name'                => $this->name,
            'description'         => $this->description,
            'amount'              => $this->amount,
            'interval'            => $this->interval,
            'currency'            => $this->currency,
            'hosted_page'         => $this->hosted_page,
            'hosted_page_url'     => $this->hosted_page_url,
            'hosted_page_summary' => $this->hosted_page_summary,
            'subscription_count'  => count($this->subscriptions),
        ];
        switch ($transformMode) {
            case ModelInterface::TRANSFORM_TO_JSON_ARRAY:
                return json_encode($planObject);
            default:
                return $planObject;
        }
    }
public function transform($transformMode = '')
    {
        $planObject = [
            'plan_code'           => $this->plan_code,
            'name'                => $this->name,
            'description'         => $this->description,
            'amount'              => $this->amount,
            'interval'            => $this->interval,
            'currency'            => $this->currency,
            'hosted_page'         => $this->hosted_page,
            'hosted_page_url'     => $this->hosted_page_url,
            'hosted_page_summary' => $this->hosted_page_summary,
            'subscription_count'  => count($this->subscriptions),
        ];
        switch ($transformMode) {
            case ModelInterface::TRANSFORM_TO_JSON_ARRAY:
                return json_encode($planObject);
            default:
                return $planObject;
        }
    }
public function transform ( $ transformMode = '' ) { $ planObject = [ 'plan_code' => $ this -> plan_code , 'name' => $ this -> name , 'description' => $ this -> description , 'amount' => $ this -> amount , 'interval' => $ this -> interval , 'currency' => $ this -> currency , 'hosted_page' => $ this -> hosted_page , 'hosted_page_url' => $ this -> hosted_page_url , 'hosted_page_summary' => $ this -> hosted_page_summary , 'subscription_count' => count ( $ this -> subscriptions ) , ] ; switch ( $ transformMode ) { case ModelInterface :: TRANSFORM_TO_JSON_ARRAY : return json_encode ( $ planObject ) ; default : return $ planObject ; } }
Outward presentation of object.

@param $transformMode

@return mixed
Outward presentation of object .