Find a Customer by id.

@param mixed $id The customer id

@return CanalTP\NmmPortalBundle\Entity\Customer
1088
private function findCustomerById ($id) {
        $customer = $this->getDoctrine()
            ->getManager()
            ->getRepository('CanalTPNmmPortalBundle:Customer')
            ->find($id);

        return $customer;
    }
693726
public function load($id = null)
    {
        if(is_null($id) && Mage::getSingleton('customer/session')->isLoggedIn()) {
            $this->customer = Mage::getSingleton('customer/session')->getCustomer();
        } else if(is_int($id)){
            
            $this->customer = Mage::getModel('customer/customer')->load($id);
            
            // TODO: Implement
        }

        if(!$this->customer->getId()) {
            return $this;
        }

        if(!($socialconnectLid = $this->customer->getInchooSocialconnectLid()) ||
                !($socialconnectLtoken = $this->customer->getInchooSocialconnectLtoken())) {
            return $this;
        }

        $this->setAccessToken($socialconnectLtoken);
        $this->_load();

        return $this;
    }
405555
protected function getUserByRecaller($id)
	{
		$this->viaRemember = ! is_null($user = $this->provider->retrieveByID($id));

		return $user;
	}
246273
protected function byId($id)
    {
        //在QueryRelate 中的 __call中也没有找到first，需要用getQuery()，它指向的是Query\Builder
        $model = $this->queryRelate->where($this->repository->getModel()->getKeyName(), $id)->getQuery()->first();

        $this->resetQueryRelate();

        return $model;
    }
565748
public function find($id)
    {
        $response = $this->ontraport->get(
            $this->getSingularNamespace(), $this->toArray(compact('id'))
        );

        return $this->ontraport->item($this, $response);
    }
577265
public function findById($id)
    {
        if ($id === null) {
            throw new \Exception('The parameter $id is mandatory');
        }

        //get all the business entities
        $businessEntities = $this->getBusinessClasses();

        //the result
        $businessEntity = null;

        //parse the business entities
        foreach ($businessEntities as $tempBusinessEntity) {
            //look for the same id
            if ($tempBusinessEntity->getId() === $id) {
                $businessEntity = $tempBusinessEntity;
                //business entity was found, there is no need to continue
                continue;
            }
        }

        return $businessEntity;
    }
196786
public function customers($id)
    {
        $customers = $this->execute(
            self::HTTP_GET,
            self::DOMUSERP_API_OPERACIONAL . '/setorcomercial/' . $id . '/clientes'
        );

        return $customers;
    }
1343314
public function find($id)
    {
        if (! is_numeric($id) && is_string($id)) {
            return $this->findBySlug($id);
        }

        return $this->plugger
            ->setModel($this)
            ->setAdapter(Post::class)
            ->plugIn(get_post($id))
            ->getConnected()
            ->first();
    }
996714
public function find($id)
    {
        if (is_numeric($id)) {
            return $this->findBy('id', $id);
        }

        return $this->findBy('slug', $id);
    }
20558
public function find(int $id)
    {
        return $this->cache->tags($this->getModel())->remember($id, 60, function () use ($id) {
            return $this->repository->find($id);
        });
    }
809750
public function load($id = null)
    {
        if(is_null($id) && Mage::getSingleton('customer/session')->isLoggedIn()) {
            $this->customer = Mage::getSingleton('customer/session')->getCustomer();
        } else if(is_int($id)) {
            $this->customer = Mage::getModel('customer/customer')->load($id);
            
            // TODO: Implement
        }

        if(!$this->customer->getId()) {
            return $this;
        }

        if(!($socialconnectLid = $this->customer->getInchooSocialconnectTid()) ||
                !($socialconnectTtoken = $this->customer->getInchooSocialconnectTtoken())) {
            return $this;
        }

        $this->setAccessToken($socialconnectTtoken);
        $this->_load();

        return $this;
    }
952750
public function getById($id)
    {
        $modelResult = $this->getRequest()->request(
            'GET',
            $this->getRequestUrl(sprintf('models/%s', $id))
        );

        return $this->getModelFromResult($modelResult);
    }
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;
    }
87042
public function getByID($id)
    {
        $site = $this->entityManager->getRepository('Concrete\Core\Entity\Site\Site')
            ->find($id);
        $factory = new Factory($this->config);
        if (is_object($site)) {
            return $factory->createEntity($site);
        }
    }
1363569
protected function getUser($id)
    {
        if (!isset($this->retrievedUsers[$id])) {
            $user = $this->userMapper->findById($id);
            $this->retrievedUsers[$id] = $user;
        }

        return $this->retrievedUsers[$id];
    }
457070
protected function _getById($id) {
		$model = $this->_config['model'];
		return $model::find('first', ['conditions' => [$model::key() => $id]]);
	}
148973
public function find($id)
    {
        $query = $this->getQuery();
        $query->where($query->expr->eq('id', $query->bindValue($id, null, PDO::PARAM_INT)));
        $banner = $query->fetch();

        return $banner;
    }