Encontra o status de compra no BD

@param int $id
@return Status
764172
public function findById($id)
    {
        $rowset = $this->getTableGateway()->select(function (Select $select) use($id) {
            $select->columns($this->columns)
            ->where(array(
                'id' => $id
            ))
            ->limit(1);
        });
        $row = $rowset->current();
        if (! $row) {
            return NULL;
        }
        return $row;
    }
963937
public function resolveId($id = null)
    {
        if ($id === null) {
            $id = $this->owner->getId();
        }
        if (isset($this->owner->htmlOptions['id'])) {
            $id = $this->owner->htmlOptions['id'];
        } else {
            $this->owner->htmlOptions['id'] = $id;
        }
        return $id;
    }
1022578
protected function getStaticValueIdsSql($id)
    {
        return (new Query())
            ->select('id')
            ->from(StaticValue::tableName())
            ->where(['property_id' => $id])
            ->createCommand()
            ->getRawSql();
    }
895773
public function getStatus($id = null)
    {
        if ($this->isSuccess()) {
            if (!$id) {
                $result = $this->getResult();
                return $result[0]['status'];
            }

            foreach ($this->getResult() as $row) {
                if ($row['id'] == $id) {
                    return $row['status'];
                }
            }
        }

        return false;
    }
102450
public function cancel(string $id)
    {
        // Log Debug
        $this->flow->getLogger()->debug("Cancelling Invoice $id");

        return $this->make(
            $this->flow->send(
                'post',
                $this->endpoint . '/cancel',
                [
                    $this->id => $id,
                ]
            )
        );
    }
1028187
public function actionInstall($id)
    {
        $model = $this->findAvailableModule($id);
        if (!$model->validate()) {
            return $this->message('模块的设置错误: ' . array_values($model->firstErrors)[0]);
        }
        if (!empty($_POST)) {
            if ($model->install(false)) {
                return $this->flash('模块安装成功!', 'success', ['index']);
            } elseif (!$model->hasErrors()) {
                return $this->flash('模块安装失败!', 'error');
            }
        }
        return $this->render('install', [
            'model' => $model
        ]);
    }
1150051
public function checkInvoiceStatus($id)
    {
        try {
            $url      = $this->server_root . str_replace("[id]", $id, $this->api_uri_check_payment);
            $data     = $this->createHTTPData($url , array());
            $client   = new Client();
            $response = $client->get($url, $data);
            $body     = (string) $response->getBody();
            return json_decode($body , true);
        } catch (ClientException $e) {
            if ($e->hasResponse()) {
                return $e->getResponse();
            }
        } catch (Exception $e){
            return $e->getTraceAsString();
        }
    }
718566
public function getColor( $id )
	{
		$color = $this->colors[$id % count( $this->colors )];
		return $color;
	}
1064341
public function detailById(int $id)
    {
        $all = $this->detail($id);

        return $this->checkAndReturnSingleResult($all);
    }
507030
public function getById($id)
    {
        $database = DatabaseLayer::getInstance();
        $select = $database->select($this->getTableName(), $this->getTableAlias());
        $select->fields($this->getTableAlias());
        $select->condition($this->getIDField(), $id);
        $results = $select->execute(get_called_class());
        $result = end($results);
        return $result;
    }
772210
public function getById($id)
    {
        $model = $this
            ->prepareQuery()
            ->where($this->model->getTable() . '.id', $id)
            ->first();

        if (empty($model))
            return null;

        $model = $this->addPermissionsForModel($model);

        return $this->formatModel($model);
    }
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;
    }
94230
public function getCommonAction($id)
    {
        $id = (integer)$id;
        if (array_key_exists($id, $this->commonActions)) {
            return $this->commonActions[$id];
        }
        return null;
    }
457070
protected function _getById($id) {
		$model = $this->_config['model'];
		return $model::find('first', ['conditions' => [$model::key() => $id]]);
	}
1273150
public function read($id)
    {
        $page = $this->service->read($id);

        return $this->checkSatisfaction($page);
    }
334211
public function removeAction($id)
    {
        $em = $this->getDoctrine()->getManager();
        $cart = $this->getCurrentCart();
        $repository = $em->getRepository('EcommerceBundle:CartItem');
        $item = $repository->find($id);

        if (!$item || false === $cart->hasItem($item)) {
            // Write flash message
            return $this->redirect($this->generateUrl('ecommerce_checkout_detail'));
        }

        // Update models
        $cart->removeItem($item);
        $cart->setTotalItems(count($cart->getItems()));
        $em->flush();
        // Write flash message

        return $this->redirect($this->generateUrl('ecommerce_checkout_detail'));
    }
583300
public function get($id)
    {
        $resolved = $this->getResolved($id);

        return $resolved ? $resolved->getInnerExtension() : null;
    }