src/bbn/appui/project.php
public function repository_from_url(string $url, bool $obj = false){
    $repository = '';
    $repositories = $this->repositories();

    foreach ( $repositories as $i => $d ){
      if ( (strpos($url, $i) === 0) &&
        (\strlen($i) > \strlen($repository) )
      ){
        $repository = $i;
      }
    }
    if ( !empty($repository) ){
      return empty($obj) ? $repository : $repositories[$repository];
    }
    return false;
  }
public function repository_from_url(string $url, bool $obj = false){
    $repository = '';
    $repositories = $this->repositories();

    foreach ( $repositories as $i => $d ){
      if ( (strpos($url, $i) === 0) &&
        (\strlen($i) > \strlen($repository) )
      ){
        $repository = $i;
      }
    }
    if ( !empty($repository) ){
      return empty($obj) ? $repository : $repositories[$repository];
    }
    return false;
  }
public function repository_from_url ( string $ url , bool $ obj = false ) { $ repository = '' ; $ repositories = $ this -> repositories ( ) ; foreach ( $ repositories as $ i => $ d ) { if ( ( strpos ( $ url , $ i ) === 0 ) && ( \ strlen ( $ i ) > \ strlen ( $ repository ) ) ) { $ repository = $ i ; } } if ( ! empty ( $ repository ) ) { return empty ( $ obj ) ? $ repository : $ repositories [ $ repository ] ; } return false ; }
Returns the repository's name or object from an URL.

@param string $url
@param bool $obj
@return bool|int|string
Returns the repository s name or object from an URL .