Get counter goal

@see http://api.yandex.ru/metrika/doc/beta/management/goals/goal.xml

@param int $id
@param int $counterId
@return Models\Goal
548042
public function getGoal($id, $counterId)
    {
        $resource = 'counter/' . $counterId . '/goal/' . $id;
        $response = $this->sendGetRequest($resource);
        $goalResponse = new Models\GetGoalResponse($response);
        return $goalResponse->getGoal();
    }
193218
protected function getAbstractId($id)
    {
        if (isset($this->aliases[$id])) {
            $id = $this->aliases[$id];
        }

        return $id;
    }
228555
public function getStrategy($id)
    {
        if (isset($this->strategies[$id])) {
            return $this->strategies[$id];
        }

        if (!isset($this->availableStrategies[$id])) {
            throw new InvalidArgumentException("Auth strategy '$id' does not exist or has not been registered.");
        }

        $class = $this->availableStrategies[$id];
        $strategy = new $class($this);
        $this->strategies[$id] = $strategy;

        return $strategy;
    }
202524
public function actionTaskdelete($id)
    {

        $task = Project::getTaskModel($id);
        $projectid = $task->projectID;
        $task->delete();

        return $this->redirect(['tasklist', 'projectid' => $projectid]);
    }
1343117
public function campaignStatByReferrals($id)
    {
        if (empty($id)) {
            return $this->handleError('Empty campaign id');
        }

        $requestResult = $this->sendRequest('campaigns/' . $id . '/referrals');

        return $this->handleResult($requestResult);
    }
451831
public static function fetchById( $id )
    {
        $states = self::fetchByConditions( array( "ezcobj_state.id=$id" ), 1, 0 );
        $state = count( $states ) > 0 ? $states[0] : false;
        return $state;
    }
1111985
public function addGoal($counterId, Models\Goal $goal)
    {
        $resource = 'counter/' . $counterId . '/goals';
        $response = $this->sendPostRequest($resource, ["goal" => $goal->toArray()]);
        $goalResponse = new Models\AddGoalResponse($response);
        return $goalResponse->getGoal();
    }
269450
public function projectCount($id) {
        // I know eloquent does this, but having trouble so hand crafting using DB
        $record =  DB::table('projects')->where('status_id', '=', $id)->get();
        return count($record);
    }
224279
public function isTeamAdmin($id)
    {
        $team = $this->teams->find($id);

        if ($team) {
            return (int) $team->user_id === (int) $this->id;
        }

        return false;
    }
212147
public function getSourceIdFor(int $targetId): int
    {
        if (!array_key_exists($targetId, $this->mapInverse)) {
            throw new \RuntimeException('Not mapped');
        }
        return $this->mapInverse[$targetId];
    }
1321679
public function fetch($id)
    {
        try {
            $this->stopWatch->start('cache');
            $value = $this->cache->fetch($id);
            $this->stopWatch->stop('cache');
        }
        catch (\Exception $ex) {
            $value = false;
        }

        $this->collect('fetch', $id, $value != false, $value);

        return $value;
    }
1133098
public function acquireCounteragentWithDocument($counteragentOrgId, $myDepartmentId, InvitationDocument $invitationDocument = null, $messageToContragent = null)
    {
        return $this->diadocApi->acquireCounteragentWithDocument($this->orgId, $counteragentOrgId, $myDepartmentId, $invitationDocument, $messageToContragent);
    }
388662
public function getPlatformById($id)
    {
        $id = (int) $id;
        $id = max(0, $id);

        return $this->request('platforms/'.$id);
    }
666467
public function getById($id)
    {
        $action = $this->adapter->get(sprintf('%s/actions/%d', $this->endpoint, $id));

        $action = json_decode($action);

        $this->meta = null;

        return new ActionEntity($action->action);
    }
1194095
public static function plan_request_review($id) {
        $params = self::validate_parameters(self::plan_request_review_parameters(), array(
            'id' => $id
        ));

        $plan = api::read_plan($id);
        self::validate_context($plan->get_context());

        return api::plan_request_review($plan);
    }
708731
public static function approve_plan($id) {
        $params = self::validate_parameters(self::approve_plan_parameters(), array(
            'id' => $id,
        ));

        $plan = api::read_plan($id);
        self::validate_context($plan->get_context());

        return api::approve_plan($plan);
    }
1165370
public function deleteGrant($counterId, $userLogin)
    {
        $resource = 'counter/' . $counterId . '/grant/' . $userLogin;
        $response = $this->sendDeleteRequest($resource);
        return $response;
    }