Return single resource

@param  mixed $id
@return mixed
553790
public function get($id) {
		$e = $this->getEntity();
		
		if (! $e)
			return $this->createResponse($this->getNameManager()->getTableNames(), 401, "Tables");
		
		if (! $e->get($id))
			return $this->createResponse($id, 401, "{$this->getNameManager()->entityName} not found");
		
		return $this->createResponse($e->getArrayCopy(), 0, $this->getNameManager()->entityName);
	}
241532
public function get($id) {
		$source = $id;
		while (is_string($source) && isset($this->getter[$source])) {
			$source = $this->getter[$source];
		}
		if (!is_string($source)) {
			if ($source instanceof \Closure) {
				$source->bindTo($this);
				return $source();
			} elseif (is_object($source)) {
				return $source;
			} else {
				throw new NotFoundException("Class $id not found");
			}
		}
		if (isset($this->instance[$source])) {
			if (!isset($this->multi[$source])) {
				return $this->instance[$source];
			} elseif ($this->multi[$source] === self::MULTI_CLONE) {
				return clone $this->instance[$source];
			}
		}
		if (!class_exists($source)) {
			throw new NotFoundException("Class $id not found");
		}
		// Check cyclic dependency
		if (isset($this->creating[$source])) {
			throw new CyclicDependencyException("Found cyclic dependency of $id");
		}
		$this->creating[$source] = true;
		$ref = new ReflectionClass($source);
		if (!$ref->isInstantiable()) {
			throw new InvalidClassException("Can not create instance of $id");
		}
		// constructor
		$constructor = $ref->getConstructor();
		if ($constructor !== null) {
			// Read comment for getter
			$comment = $constructor->getDocComment();
			$is_autowire = preg_match_all('/@Autowired\s+([\w\\\\]+)\s+([\w\\\\]+)\s+/', $comment, $autowire_matches);
			$getter = [];
			if ($is_autowire && count($autowire_matches[1]) > 0) {
				foreach ($autowire_matches[1] as $k => $v) {
					$getter[$v] = $autowire_matches[2][$k];
				}
			}
			$params = $constructor->getParameters();
			$init_params = [];
			foreach ($params as $param) {
				if ($param->isOptional()) {
					$init_params[] = $param->getDefaultValue();
				} elseif (isset($getter[$param->getName()])) {
					$typeName = $getter[$param->getName()];
					$init_params[] = $this->get($typeName);
				} elseif ($param->hasType()) {
					$type = $param->getType();
					if (class_exists('ReflectionNamedType') && $type instanceof \ReflectionNamedType) {
						$typeName = $type->getName();
					} else {
						$typeName = $type->__toString();
					}
					if ($type->isBuiltin()) {
						$value = null;
						settype($value, $typeName);
						$init_params[] = $value;
					} else {
						$init_params[] = $this->get($typeName);
					}
				} else {
					$init_params[] = null;
				}
			}
			$instance = $ref->newInstance(...$init_params);
		} else {
			$instance = $ref->newInstance();
		}
		// properties
		$properties = $ref->getProperties();
		foreach ($properties as $property) {
			if ($property->isStatic()) {
				continue;
			}
			// Using getter and setter
			$propertyName = $property->getName();
			$setter = 'set' . ucfirst($propertyName);
			$getter = 'get' . ucfirst($propertyName);
			if (method_exists($instance, $setter) && method_exists($instance, $getter)) {
				if ($instance->$getter() === null) {
					$setter_ref = $ref->getMethod($setter);
					$is_autowire = preg_match('/@Autowired\s+([\w\\\\]+)\s+/', $setter_ref->getDocComment(), $autowire);
					if ($is_autowire) {
						$instance->$setter($this->get($autowire[1]));
					} else {
						$params = $setter_ref->getParameters();
						$param = $params[0];
						if ($param->hasType()) {
							$type = $param->getType();
							if (class_exists('ReflectionNamedType') && $type instanceof \ReflectionNamedType) {
								$typeName = $type->getName();
							} else {
								$typeName = $type->__toString();
							}
							$instance->$setter($this->get($typeName));
						}
					}
				}
			} else {
				$comment = $property->getDocComment();
				$is_autowire = preg_match('/@Autowired\s+([\w\\\\]+)\s+/', $comment, $autowire);
				if ($is_autowire) {
					$is_public = $property->isPublic();
					if (!$is_public) {
						$property->setAccessible(true);
					}
					if ($property->getValue($instance) === null) {
						$property->setValue($instance, $this->get($autowire[1]));
					}
					if (!$is_public) {
						$property->setAccessible(false);
					}
				}
			}
		}
		// put into instance
		if (!isset($this->multi[$source]) || $this->multi[$source] === self::MULTI_CLONE) {
			$this->instance[$source] = $instance;
		}
		unset($this->creating[$source]);
		return $instance;
	}
1325397
public function fetchById($id)
    {
        $data = $this->getProvider()->fetchById($id);
        return $this->resultAsModel($data);
    }
311893
public function find($id)
    {
        $data = $this->client->get(Inflector::pluralize($this->getResourceName()).'/'.$id);

        return $this->fromArray(reset($data));
    }
371081
public function getById($id)
    {
        $query = $this->createQuery();
        $query->where(
            $query->buildAndSet([$this->getModel()->getTableKey(), '=', $id])
        );
        $result = $this->database->query($query);

        $model = null;
        if ($result) {
            $result = $result->fetchAll(\PDO::FETCH_ASSOC);
            $entities = $this->handleResult($result);
            $model = current($entities);
        }
        return $model;
    }
118678
public function get($id)
    {
        if (null === $id) {
            return;
        }

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

        $node = $this->repository->find($id);

        if (empty($node) or $node->isDeleted()) {
            return null;
        }

        return $node;
    }
142015
public function get($id) {
		$result = $this->getBackend()->get($id);
		
		if ($result !== null) {
			return json_decode($result);
		}
	}
590268
public function get($id)
    {
        foreach ($this->items as $item) {
            if ($item->id === $id) {
                return $item;
            }
        }
        return null;
    }
14937
public function getById($id)
    {
        return new View(
            $this->getContext(),
            new ResourcePathServiceOperation($this->getContext(),$this->getResourcePath(),"getById",array($id))
        );
    }
275003
public function get($id) {
        return $this->request("GET", self::URL_PLANS . $id . "/", $api_key = $this->culqi->api_key);
    }
936119
public function show($id)
    {
        $request = $this->makeRequest('show');
        $model = $this->service->get($id);
        return $this->maybeMakeResource('single', $model);

    }
1213219
public function getAction($id)
    {
        $view = $this->responseGetById(
            $id,
            function($id) {
                return $this->getDoctrine()
                    ->getRepository(self::$entityName)
                    ->find($id);
            }
        );

        return $this->handleView($view);
    }
919473
public static function factory($id)
    {
        $id = (string)$id;
        if (!isset(static::$resources[$id])) {
            static::$resources[$id] = new static($id);
        }
        return static::$resources[$id];
    }
1246851
public function itemGet($id) {
		$list = $this->itemsGet(array($id));
		$item = reset($list);
		return $item;
	}
807257
public function getOrFail($id)
    {
        if (!$this->storage->offsetExists($id)) {
            throw new ResourceNotFoundException("Model with id #$id not found.");
        }
        return $this->deserializeFromStorage($this->storage->offsetGet($id));
    }
341341
public function getRequest($id)
    {
        if (!isset($this->request[$id])) {
            return null;
        }

        return $this->request[$id];
    }
583300
public function get($id)
    {
        $resolved = $this->getResolved($id);

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