public function getPlans($page = '')
    {
        $planObjects = [];
        $plans = $this->getPlanResource()->getAll($page);

        if ($plans instanceof \Exception) {
            throw $plans;
        }

        foreach ($plans as $plan) {
            $planObject = new Plan($this->getPlanResource());
            $planObjects[] = $planObject->_setAttributes($plan);
        }

        return $planObjects;
    }
public function getPlans($page = '')
    {
        $planObjects = [];
        $plans = $this->getPlanResource()->getAll($page);

        if ($plans instanceof \Exception) {
            throw $plans;
        }

        foreach ($plans as $plan) {
            $planObject = new Plan($this->getPlanResource());
            $planObjects[] = $planObject->_setAttributes($plan);
        }

        return $planObjects;
    }
public function getPlans ( $ page = '' ) { $ planObjects = [ ] ; $ plans = $ this -> getPlanResource ( ) -> getAll ( $ page ) ; if ( $ plans instanceof \ Exception ) { throw $ plans ; } foreach ( $ plans as $ plan ) { $ planObject = new Plan ( $ this -> getPlanResource ( ) ) ; $ planObjects [ ] = $ planObject -> _setAttributes ( $ plan ) ; } return $ planObjects ; }
Get all plans.

@param string $page

@throws \Exception|mixed

@return \Exception|mixed
Get all plans .