ck->current_node_is( 'DIV' ); * * // Is the current node any element/tag? * $stack->current_node_is( '#tag' ); * * @see WP_HTML_Tag_Processor::get_token_type * @see WP_HTML_Tag_Processor::get_token_name * * @since 6.7.0 * * @access private * * @param string $identity Check if the current node has this name or type (depending on what is provided). * @return bool Whether there is a current element that matches the given identity, whether a token name or type. */ public function current_node_is( string $identity ): bool { $current_node = end( $this->stack ); if ( false === $current_node ) { return false; } $current_node_name = $current_node->node_name; return ( $current_node_name === $identity || ( '#doctype' === $identity && 'html' === $current_node_name ) || ( '#tag' === $identity && ctype_upper( $current_node_name ) ) ); } /** * Returns whether an element is in a specific scope. * * @since 6.4.0 * * @see https://html.spec.whatwg.org/#has-an-element-in-the-specific-scope * * @param string $tag_name Name of tag check. * @param string[] $termination_list List of elements that terminate the search. * @return bool Whether the element was found in a specific scope. */ public function has_element_in_specific_scope( string $tag_name, $termination_list ): bool { foreach ( $this->walk_up() as $node ) { if ( $node->node_name === $tag_name ) { return true; } if ( '(internal: H1 through H6 - do not use)' === $tag_name && in_array( $node->node_name, array( 'H1', 'H2', 'H3', 'H4', 'H5', 'H6' ), true ) ) { return true; } switch ( $node->node_name ) { case 'HTML': return false; } if ( in_array( $node->node_name, $termination_list, true ) ) { return false; } } return false; } /** * Returns whether a particular element is in scope. * * @since 6.4.0 * * @see https://html.spec.whatwg.org/#has-an-element-in-scope * * @param string $tag_name Name of tag to check. * @return bool Whether given element is in scope. */ public function has_element_in_scope( string $tag_name ): bool { return $this->has_element_in_specific_scope( $tag_name, array( /* * Because it's not currently possible to encounter * one of the termination elements, they don't need * to be listed here. If they were, they would be * unreachable and only waste CPU cycles while * scanning through HTML. */ ) ); } /** * Returns whether a particular element is in list item scope. * * @since 6.4.0 * @since 6.5.0 Implemented: no longer throws on every invocation. * * @see https://html.spec.whatwg.org/#has-an-element-in-list-item-scope * * @param string $tag_name Name of tag to check. * @return bool Whether given element is in scope. */ public function has_element_in_list_item_scope( string $tag_name ): bool { return $this->has_element_in_specific_scope( $tag_name, array( // There are more elements that belong here which aren't currently supported. 'OL', 'UL', ) ); } /** * Returns whether a particular element is in button scope. * * @since 6.4.0 * * @see https://html.spec.whatwg.org/#has-an-element-in-button-scope * * @param string $tag_name Name of tag to check. * @return bool Whether given element is in scope. */ public function has_element_in_button_scope( string $tag_name ): bool { return $this->has_element_in_specific_scope( $tag_name, array( 'BUTTON' ) ); } /** * Returns whether a particular element is in table scope. * * @since 6.4.0 * * @see https://html.spec.whatwg.org/#has-an-element-in-table-scope * * @throws WP_HTML_Unsupported_Exception Always until this function is implemented. * * @param string $tag_name Name of tag to check. * @return bool Whether given element is in scope. */ public function has_element_in_table_scope( string $tag_name ): bool { throw new Gutenberg_HTML_Unsupported_Exception_6_7( 'Cannot process elements depending on table scope.' ); return false; // The linter requires this unreachable code until the function is implemented and can return. } /** * Returns whether a particular element is in select scope. * * This test differs from the others like it, in that its rules are inverted. * Instead of arriving at a match when one of any tag in a termination group * is reached, this one terminates if any other tag is reached. * * > The stack of open elements is said to have a particular element in select scope when it has * > that element in the specific scope consisting of all element types except the following: * > - optgroup in the HTML namespace * > - option in the HTML namespace * * @since 6.4.0 Stub implementation (throws). * @since 6.7.0 Full implementation. * * @see https://html.spec.whatwg.org/#has-an-element-in-select-scope * * @param string $tag_name Name of tag to check. * @return bool Whether the given element is in SELECT scope. */ public function has_element_in_select_scope( string $tag_name ): bool { foreach ( $this->walk_up() as $node ) { if ( $node->node_name === $tag_name ) { return true; } if ( 'OPTION' !== $node->node_name && 'OPTGROUP' !== $node->node_name ) { return false; } } return false; } /** * Returns whether a P is in BUTTON scope. * * @since 6.4.0 * * @see https://html.spec.whatwg.org/#has-an-element-in-button-scope * * @return bool Whether a P is in BUTTON scope. */ public function has_p_in_button_scope(): bool { return $this->has_p_in_button_scope; } /** * Pops a node off of the stack of open elements. * * @since 6.4.0 * * @see https://html.spec.whatwg.org/#stack-of-open-elements * * @return bool Whether a node was popped off of the stack. */ public function pop(): bool { $item = array_pop( $this->stack ); if ( null === $item ) { return false; } if ( 'context-node' === $item->bookmark_name ) { $this->stack[] = $item; return false; } $this->after_element_pop( $item ); return true; } /** * Pops nodes off of the stack of open elements until one with the given tag name has been popped. * * @since 6.4.0 * * @see WP_HTML_Open_Elements::pop * * @param string $tag_name Name of tag that needs to be popped off of the stack of open elements. * @return bool Whether a tag of the given name was found and popped off of the stack of open elements. */ public function pop_until( string $tag_name ): bool { foreach ( $this->walk_up() as $item ) { if ( 'context-node' === $item->bookmark_name ) { return true; } $this->pop(); if ( '(internal: H1 through H6 - do not use)' === $tag_name && in_array( $item->node_name, array( 'H1', 'H2', 'H3', 'H4', 'H5', 'H6' ), true ) ) { return true; } if ( $tag_name === $item->node_name ) { return true; } } return false; } /** * Pushes a node onto the stack of open elements. * * @since 6.4.0 * * @see https://html.spec.whatwg.org/#stack-of-open-elements * * @param WP_HTML_Token $stack_item Item to add onto stack. */ public function push( Gutenberg_HTML_Token_6_7 $stack_item ): void { $this->stack[] = $stack_item; $this->after_element_push( $stack_item ); } /** * Removes a specific node from the stack of open elements. * * @since 6.4.0 * * @param WP_HTML_Token $token The node to remove from the stack of open elements. * @return bool Whether the node was found and removed from the stack of open elements. */ public function remove_node( Gutenberg_HTML_Token_6_7 $token ): bool { if ( 'context-node' === $token->bookmark_name ) { return false; } foreach ( $this->walk_up() as $position_from_end => $item ) { if ( $token->bookmark_name !== $item->bookmark_name ) { continue; } $position_from_start = $this->count() - $position_from_end - 1; array_splice( $this->stack, $position_from_start, 1 ); $this->after_element_pop( $item ); return true; } return false; } /** * Steps through the stack of open elements, starting with the top element * (added first) and walking downwards to the one added last. * * This generator function is designed to be used inside a "foreach" loop. * * Example: * * $html = 'We are here'; * foreach ( $stack->walk_down() as $node ) { * echo "{$node->node_name} -> "; * } * > EM -> STRONG -> A -> * * To start with the most-recently added element and walk towards the top, * see WP_HTML_Open_Elements::walk_up(). * * @since 6.4.0 */ public function walk_down() { $count = count( $this->stack ); for ( $i = 0; $i < $count; $i++ ) { yield $this->stack[ $i ]; } } /** * Steps through the stack of open elements, starting with the bottom element * (added last) and walking upwards to the one added first. * * This generator function is designed to be used inside a "foreach" loop. * * Example: * * $html = 'We are here'; * foreach ( $stack->walk_up() as $node ) { * echo "{$node->node_name} -> "; * } * > A -> STRONG -> EM -> * * To start with the first added element and walk towards the bottom, * see WP_HTML_Open_Elements::walk_down(). * * @since 6.4.0 * @since 6.5.0 Accepts $above_this_node to start traversal above a given node, if it exists. * * @param WP_HTML_Token|null $above_this_node Optional. Start traversing above this node, * if provided and if the node exists. */ public function walk_up( ?Gutenberg_HTML_Token_6_7 $above_this_node = null ) { $has_found_node = null === $above_this_node; for ( $i = count( $this->stack ) - 1; $i >= 0; $i-- ) { $node = $this->stack[ $i ]; if ( ! $has_found_node ) { $has_found_node = $node === $above_this_node; continue; } yield $node; } } /* * Internal helpers. */ /** * Updates internal flags after adding an element. * * Certain conditions (such as "has_p_in_button_scope") are maintained here as * flags that are only modified when adding and removing elements. This allows * the HTML Processor to quickly check for these conditions instead of iterating * over the open stack elements upon each new tag it encounters. These flags, * however, need to be maintained as items are added and removed from the stack. * * @since 6.4.0 * * @param WP_HTML_Token $item Element that was added to the stack of open elements. */ public function after_element_push( Gutenberg_HTML_Token_6_7 $item ): void { /* * When adding support for new elements, expand this switch to trap * cases where the precalculated value needs to change. */ switch ( $item->node_name ) { case 'BUTTON': $this->has_p_in_button_scope = false; break; case 'P': $this->has_p_in_button_scope = true; break; } if ( null !== $this->push_handler ) { ( $this->push_handler )( $item ); } } /** * Updates internal flags after removing an element. * * Certain conditions (such as "has_p_in_button_scope") are maintained here as * flags that are only modified when adding and removing elements. This allows * the HTML Processor to quickly check for these conditions instead of iterating * over the open stack elements upon each new tag it encounters. These flags, * however, need to be maintained as items are added and removed from the stack. * * @since 6.4.0 * * @param WP_HTML_Token $item Element that was removed from the stack of open elements. */ public function after_element_pop( Gutenberg_HTML_Token_6_7 $item ): void { /* * When adding support for new elements, expand this switch to trap * cases where the precalculated value needs to change. */ switch ( $item->node_name ) { case 'BUTTON': $this->has_p_in_button_scope = $this->has_element_in_button_scope( 'P' ); break; case 'P': $this->has_p_in_button_scope = $this->has_element_in_button_scope( 'P' ); break; } if ( null !== $this->pop_handler ) { ( $this->pop_handler )( $item ); } } /** * Wakeup magic method. * * @since 6.6.0 */ public function __wakeup() { throw new \LogicException( __CLASS__ . ' should never be unserialized' ); } }
Warning: Cannot modify header information - headers already sent by (output started at /htdocs/wp-content/plugins/gutenberg/lib/compat/wordpress-6.7/html-api/class-gutenberg-html-open-elements-6-7.php:1) in /htdocs/wp-includes/feed-rss2.php on line 8
Infrastructure Archives - Or Noir Africa https://ornoirafrica.com/tag/infrastructure/ Tous sur le Pétrole, Gaz, Énergie & Mines en Afrique Fri, 14 Jul 2023 15:05:27 +0000 fr-FR hourly 1 https://wordpress.org/?v=6.7.1 https://i0.wp.com/ornoirafrica.com/wp-content/uploads/2023/01/cropped-Or-Noir-Africa-Logotype-300x300-1.jpeg?fit=32%2C32&ssl=1 Infrastructure Archives - Or Noir Africa https://ornoirafrica.com/tag/infrastructure/ 32 32 152426274 Egypte : Le gouvernement dévoile la première plateforme pétrolière produite localement https://ornoirafrica.com/egypte-le-gouvernement-devoile-la-premiere-plateforme-petroliere-produite-localement/?utm_source=rss&utm_medium=rss&utm_campaign=egypte-le-gouvernement-devoile-la-premiere-plateforme-petroliere-produite-localement Fri, 14 Jul 2023 15:05:27 +0000 https://ornoirafrica.com/?p=4159 Le ministre égyptien du pétrole et des ressources minérales, Tarek EL-Molla a rendu publique la première plateforme pétrolière fabriquée localement par l’egyptian petroleum HH ring manufacturing SAE co  une joint venture regroupant le groupe chinois Honghua Group Ltd et l’Egyptian Général Pétroleum Corporation (EGPC).

L’infrastructure est typiquement une foreuse pétrolière d’une capacité mécanique de 2 000 chevaux. L’engin est concu pour réaliser des activés de forage à terre exclusivement. L’ouvrage permettra ainsi l’exécution » des programmes de creusement et d’excavation dans les zones terrestre ».

La concrétisation de ce projet entièrement géré par l’Egyptian Petroleum HH ring a eu, par ailleurs d’autres retombés plus pratiques.

]]>
4159
Gaz naturel : Signature d’un accord entre le Maroc et la SFI https://ornoirafrica.com/gaz-naturel-signature-dun-accord-entre-le-maroc-et-la-sfi/?utm_source=rss&utm_medium=rss&utm_campaign=gaz-naturel-signature-dun-accord-entre-le-maroc-et-la-sfi Thu, 22 Jun 2023 12:10:09 +0000 https://ornoirafrica.com/?p=3939 Cet accord entre ces deux parties vise a accompagner le Maroc dans sa transition énergétique de son objectif de 52% de sa capacité électrique installée à partir d’énergies renouvelables d’ici 2030.

Avec sa faible teneur en Carbonne et sa polyvalence, le gaz naturel est un élément essentiel de la stratégie de transition énergétique et de décarbonation du Maroc, car il permettra une plus grande pénétration des énergies renouvelables intermittentes dans le réseau et apportera plus de stabilité et d’efficacité au système électrique national. Le gaz naturel est également essentiel pour décarboner l’industrie et se substituer au fioul et à d’ autres combustibles encore utilisés pour la production d’électricité  et de l’industrie énergivores.

En 2022 le Maroc est parvenu a optimiser les infrastructures régionales existantes pour accéder pour la première fois au marché international du GNL. La seconde phase de cette stratégie consiste à renforcer des infrastructures gazières domestiques pour sécuriser l’approvisionnement en gaz et de connecter les sources d’entrée au bassin des consommation.

IFC, membre du groupe  de la banque mondiale assistera le ministère dans les études de la faisabilité la structuration et la gestion d’un processus d’appel d’offres transparent et concurrentiel conformément aux lois nationale, afin de choisir un ou plusieurs partenaires pour développer financer et exploiter l’infrastructure.

Ce partenariat permettra au Maroc d’accélérer le déploiement de modèles innovants, a l’instar des partenariats public-privé. Pour rappel avec cette nouvelle initiative, IFC aidera le gouvernement a mettre à jour l’infrastructure gazière nécessaire à cout et moyen terme pour tenir compte des derniers développements nationaux et internationaux.

]]>
3939
Algérie : Petrofac confirme la signature d’un contrat EPC de 1,5 milliard de dollars https://ornoirafrica.com/algerie-petrofac-confirme-la-signature-dun-contrat-epc-de-15-milliard-de-dollars/?utm_source=rss&utm_medium=rss&utm_campaign=algerie-petrofac-confirme-la-signature-dun-contrat-epc-de-15-milliard-de-dollars Mon, 12 Jun 2023 10:21:03 +0000 https://ornoirafrica.com/?p=3810 Petrofac  avoir conclu un accord définitif avec STEP polymers SPA  pour la conception et la construction de son complexe petrochimique dans la zone industrielle d’Arzew en Algérie . Comme annoncé précédemment, Petrofac livrera le projet de 1,5 milliard de dollars Américain  avec son partenaire de coentreprise China Huanqiu Contracting / engineering  Corporation  (HQC) , la part de Petrofac étant évaluée à plus de 1 milliard de dollars américains. Le contrat a été signé lors d’une cérémonie officielle à Alger par des représentants de Petrofac, HQC et STEP.

Le directeur du groupe Petrofac , Tarek  Kawash affirme que  » ce contrat s’appuie sur leurs 25 années  d’expérience dans la fourniture en toute sécurité d’infrastructures énergétique en Algérie ,ainsi l’utilisation de la main d’œuvre locale.

]]>
3810