Returns HTML Tag by its ID or throws Exception.
@access		public
@param		string			$id					ID of Tag to return
@param		bool			$throwException		Flag: throw Exception if not found, otherwise return empty String
@return		DOMElement
327653
public function getTagById( $id, $throwException = TRUE )
	{
		$xpath	= new DomXPath( $this->document );
		$query	= "//*[@id = '$id']";
		$tags	= $this->getTagsByXPath( $query );
		if( $tags )
			return $tags[0];
		if( $throwException )
			throw new RuntimeException( 'No Tag with ID "'.$id.'" found.' );
		return NULL;
	}
37796
protected function _getNodeById( $id )
	{
		$conn = $this->_dbm->acquire( $this->_dbname );

		try
		{
			$stmt = $conn->create( str_replace( ':cond', '1=1', $this->_config['get'] ) );
			$stmt->bind( 1, $id, MW_DB_Statement_Abstract::PARAM_INT );
			$stmt->bind( 2, 0, MW_DB_Statement_Abstract::PARAM_INT );
			$result = $stmt->execute();

			if( ( $row = $result->fetch() ) === false ) {
				throw new MW_Tree_Exception( sprintf( 'No node with ID "%1$d" found', $id ) );
			}

			$node = $this->_createNode( $row );

			$this->_dbm->release( $conn, $this->_dbname );
		}
		catch( Exception $e )
		{
			$this->_dbm->release( $conn, $this->_dbname );
			throw $e;
		}

		return $node;
	}
189960
public function show($id = null)
    {
        // Check the ID
        if (!isset($id)) {
            throw new \InvalidArgumentException('Undefined ID', 400);
        }

        // Get record
        $item = $this->model->find($id);

        // Abort if the record is not found
        if (!$item) {
            throw new \Exception('Element not found', 404);
        }

        // Return response
        return [
            'success' => true,
            'data' => $item
        ];
    }
1176977
public function getContentIdByBlockId($id)
    {
        $dbHandler = $this->getConnection();
        $query = $dbHandler->createSelectQuery();
        $query
            ->select($dbHandler->quoteColumn('contentobject_id'))
            ->from($dbHandler->quoteTable('ezcontentobject_tree'))
            ->innerJoin(
                $dbHandler->quoteTable('ezm_block'),
                $query->expr->eq(
                    $dbHandler->quoteColumn('node_id', 'ezm_block'),
                    $dbHandler->quoteColumn('node_id', 'ezcontentobject_tree')
                )
            )
            ->where(
                $query->expr->eq(
                    $dbHandler->quoteColumn('id', 'ezm_block'),
                    $query->bindValue($id, null, PDO::PARAM_STR)
                )
            );

        $stmt = $query->prepare();
        $stmt->execute();

        $contentId = $stmt->fetchColumn();

        if ($contentId === false) {
            throw new NotFoundException('Block', $id);
        }

        return $contentId;
    }
1233797
protected function getBlock($id)
    {
        $block = $this->blockManager->findOneBy(['id' => $id]);

        if (null === $block) {
            throw new NotFoundHttpException(sprintf('Block (%d) not found', $id));
        }

        return $block;
    }
89718
public static function getInstance($id)
    {
        $instance = NULL;
        if (array_key_exists($id, self::$_instances))
        {
            $instance = self::$_instances[$id];
        }
        else
        {
            $instance = self::$_current_instance;
        }

        if (is_null($instance))
        {
            throw new \Exception('No instance found for datatable, you should set a datatable id in your
            action with "setDatatableId" using the id from your view ');
        }

        return $instance;
    }
298107
public function find($id)
    {
        if (empty($id)) {
            throw new \Exception('ID must be set');
        }

        $response = $this->restClient->get($this->endpoint . '/' . $id);

        return $response['body'];
    }
897678
public static function setHTML($id, $html)
    {
        $js = '$("'.$id.'").html('.json_encode($html).');';
        return self::execHeader($js);
    }
712528
public function raw($id)
    {
        try {
            return parent::raw($id);
        } catch (UnknownIdentifierException $e) {
            throw new ContainerNotFoundException(
                $e->getMessage(),
                $e->getCode(),
                $e
            );
        } catch (\Throwable $e) {
            throw new ContainerException(
                $e->getMessage(),
                $e->getCode(),
                $e
            );
        }
    }
714330
public function getPathForDocument($id)
    {
        if(!$this->validateId($id)) {
            throw new \Exception(sprintf('`%s` is not a valid document ID.', $id));
        }

        return $this->path . DIRECTORY_SEPARATOR . $this->getFilename($id);
    }
859923
public function getTaskWithHttpInfo($id)
    {
        $returnType = '\Wodby\Api\Model\Task';
        $request = $this->getTaskRequest($id);

        try {
            $options = $this->createHttpClientOption();
            try {
                $response = $this->client->send($request, $options);
            } catch (RequestException $e) {
                throw new ApiException(
                    "[{$e->getCode()}] {$e->getMessage()}",
                    $e->getCode(),
                    $e->getResponse() ? $e->getResponse()->getHeaders() : null,
                    $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null
                );
            }

            $statusCode = $response->getStatusCode();

            if ($statusCode < 200 || $statusCode > 299) {
                throw new ApiException(
                    sprintf(
                        '[%d] Error connecting to the API (%s)',
                        $statusCode,
                        $request->getUri()
                    ),
                    $statusCode,
                    $response->getHeaders(),
                    $response->getBody()
                );
            }

            $responseBody = $response->getBody();
            if ($returnType === '\SplFileObject') {
                $content = $responseBody; //stream goes to serializer
            } else {
                $content = $responseBody->getContents();
                if ($returnType !== 'string') {
                    $content = json_decode($content);
                }
            }

            return [
                ObjectSerializer::deserialize($content, $returnType, []),
                $response->getStatusCode(),
                $response->getHeaders()
            ];

        } catch (ApiException $e) {
            switch ($e->getCode()) {
                case 200:
                    $data = ObjectSerializer::deserialize(
                        $e->getResponseBody(),
                        '\Wodby\Api\Model\Task',
                        $e->getResponseHeaders()
                    );
                    $e->setResponseObject($data);
                    break;
            }
            throw $e;
        }
    }
386953
public function show($id)
    {
        if(Request::isAjax()){
            $user = null;
            $message = '';

            try{
                $user = Sentry::findUserById($id);
            }catch(Exception $e){
                $message = $e->getMessage();
            }


            Response::headers()->set('Content-Type', 'application/json');
            Response::setBody(json_encode(
                array(
                    'success'   => !is_null($user),
                    'data'      => !is_null($user) ? $user->toArray() : $user,
                    'message'   => $message,
                    'code'      => is_null($user) ? 404 : 200
                )
            ));
        }else{

        }
    }
605875
public Response getTemplate(String id) throws RequestException, LocalOperationException {
        Request request = new Request(this);
        return new Response(request.get("/templates/" + id));
    }
929361
public function find($id)
    {
        if (!($object = $this->getDoctrineEntityRepository()->find($id))) {
            $this->throwException(sprintf('The resource \'%s\' was not found', $id), 'not-found');
        }

        return $object;
    }
1069513
public function hasTagById( $id )
	{
		$xpath	= new DomXPath( $this->document );
		$query	= "//*[@id = '$id']";
		$nodes	= $xpath->query( $query );
		return (bool) $nodes->length;
	}
731740
public function getTitle( $throwException = TRUE )
	{
		$nodes	= $this->document->getElementsByTagName( "title" );
		if( $nodes->length )
			return $nodes->item(0)->textContent;
		$tags	= $this->getMetaTags( TRUE );
		if( isset( $tags['dc.title'] ) )
			return $tags['dc.title'];
		if( $throwException )
			throw new RuntimeException( 'Neither Title Tag not Title Meta Tag found.' );
		return "";
	}
1093642
public function show($id)
    {
        $template = $this->client->get(sprintf('templates/%d.json', $id));

        return new Template($this->response($template));
    }