Retrieve initial attributes for a single entity.

@param string $id

@return array
328579
public function get(string $id = null): array
    {
        if ($this->has($id)) {
            return $this->cache[$id];
        }

        return [];
    }
457070
protected function _getById($id) {
		$model = $this->_config['model'];
		return $model::find('first', ['conditions' => [$model::key() => $id]]);
	}
626021
public function fetchById($id)
    {
        $data = parent::fetchById($id);
        if ($data) {
            foreach (array_keys($this->subAttributeList) as $subKey) {
                $data[$subKey] = $this->fetchSubAttributeById($id, $subKey);
            }
        }
        return $data;
    }
685349
public function findById($id)
    {
        $post = get_post($id);
        if (!is_null($post)) {
            return self::getEntity($post);
        }
    }
444209
public function find($id) : ?array
    {
        $identifier = $this->getIdentifier();

        $identifierValues = is_array($id) ? $id : [$id];

        $criteria = array_combine($identifier, $identifierValues);

        if ($criteria === false) {
            throw new RuntimeException('array_combine failed. Make sure you passed a value for each identifier.');
        }

        return $this->findOneBy($criteria);
    }
1354393
public function editAction($id)
    {
        $this->registerBreadcrubms()->addItem($this->get("translator")->trans("Edit"));

        $entity = $this->getRepository()->find($id);

        if (!$entity) {
            throw $this->createNotFoundException('Unable to find ' . $this->getEntityName() . '.');
        }

        $editForm = $this->createEditForm($entity);

        return [
            'entity' => $entity,
            'form' => $editForm->createView(),
        ];
    }
627852
public function get($id)
    {
        try {
            $em = $this->entityManager->getDoctrineEntityManager();
            $accessEntity = $em->getRepository($this->getEntityClass())->findOneBy(array(
                'id' => $id,
            ));
            
            if ($accessEntity !== null) {
                return $accessEntity;
            }
            
            return false;
        } catch (\Exception $e) {
            throw new Exception('Cannot load the entity from the database for the given id "' . $id . '".', 0, $e);
        }
    }
1013000
public function read(string $id) :? array
    {
        static $stmt;
        if (!isset($stmt)) {
            $stmt = $this->pdo->prepare("SELECT * FROM cesession_session WHERE id = :id");
        }
        $stmt->execute(compact('id'));
        if ($data = $stmt->fetch(\PDO::FETCH_ASSOC)) {
            $this->exists = true;
            $data['data'] = base64_decode($data['data']);
            return $data;
        }
        $this->exists = false;
        return null;
    }
1017658
public function fetchEntityById($id)
    {
        $select = $this->tableGateway->getSql()->select();
        $select->where->equalTo($this->tableGateway->getPrimaryKey(), $id);

        return $this->tableGateway->fetchEntity($select);
    }
840959
private function getPrefixAndSid($id)
    {
        if (count($parts = explode('.', $id)) < 2) {
            return array(null, $id);
        }

        $sid    = array_pop($parts);
        $prefix = implode('.', $parts);

        return array($prefix, $sid);
    }
639446
public function getElement( $id )
	{
		$result = array();

		if ( isset( $this->elements[ $id ] ) )
		{
			foreach ( $this->elements[ $id ] as $key => &$element )
			{
				if ( isset( $element['parent'] ) ) continue;
				$element['parent'] = 'xbrl';
			}
			unset( $element );

			$result = $this->elements[ $id ];
		}

		if ( ! isset( $this->tupleRefs[ $id ] ) )
		{
			return $result;
		}
		// The rest of this needs sorting
		$tuple = $this->tupleRefs[ $id ];
		$tupleId = key( $tuple );

		if ( ! isset( $this->elements[ $tupleId ] ) )
		{
			return $result;
		}

		// $fact = array();

		foreach ( $tuple[ $tupleId ] as $index )
		{
			foreach ( $this->elements[ $tupleId ][ $index ]['tuple_elements'][ $id ] as $key => $entry )
			{
				if ( ! isset( $entry['tupleid'] ) )
				{
					$entry['tupleid'] = $tupleId;
				}
				$result[ $entry['guid'] ] = $entry;
			}
		}

		return $result;
	}
505628
public function read( $id )
	{
		$this->inital_session_id = $id;
		
		if ( $data = \DB::select( $this->table )->where( 'id', $id )->one( $this->database ) )
		{
			$session_data = unserialize( $data->content );
			
			foreach( $this->index_fields as $field ) 
			{
				$session_data[$field] = $data->$field;
			}
			
			return $session_data;
		}
		
		return array();
	}
1352928
protected function foreignIDFilter($id = null)
    {
        if ($id === null) {
            $id = $this->getForeignID();
        }

        // Apply relation filter
        $key = "\"{$this->joinTable}\".\"{$this->foreignKey}\"";
        if (is_array($id)) {
            return ["$key IN (" . DB::placeholders($id) . ")"  => $id];
        }
        if ($id !== null) {
            return [$key => $id];
        }
        return null;
    }
824908
public function get(int $id)
    {
        if ($id === null) {
            return null;
        }

        if (isset($this->entities[$id])) {
            return $this->entities[$id];
        }

        // Entities are mutable
        // Search through the previously null-id entities
        // in case an id has been set now.
        foreach ($this->nullIdEntities as $entity) {
            if ($entity->getId() === $id) {
                return $entity;
            }
        }

        return null;
    }
818053
public static function get($id){
		$class_name = get_called_class();
		if( !isset(self::$instances[$class_name]) ){
			self::$instances[$class_name] = [];
		}
		if( !isset(self::$instances[$class_name][$id]) ){
			self::$instances[$class_name][$id] = new $class_name($id);
		}
		return self::$instances[$class_name][$id];
	}
573648
public function getEntity($id = null)
    {
        if (null === $id) {
            $entity           = new ContactSource();
            $defaultUtmSource = $this->getRepository()->getDefaultUTMSource();
            $entity->setUtmSource($defaultUtmSource);

            return $entity;
        }

        if ('clone' == $this->dispatcher->getContainer()->get('request')->attributes->get('objectAction')) {
            $entity           = parent::getEntity($id);
            $defaultUtmSource = $this->getRepository()->getDefaultUTMSource();
            $entity->setUtmSource($defaultUtmSource);

            return $entity;
        }

        return parent::getEntity($id);
    }
1341831
private function getDefinition($id)
    {
        $id = $this->getDefinitionId($id);

        return null === $id ? null : $this->container->getDefinition($id);
    }