public function findByIdentifier($identifier) {
    foreach ($this->packages as $package) {
      if (S::startsWith($package->getIdentifier(), $identifier)) {
        return $package;
      }
    }
  }
public function findByIdentifier($identifier) {
    foreach ($this->packages as $package) {
      if (S::startsWith($package->getIdentifier(), $identifier)) {
        return $package;
      }
    }
  }
public function findByIdentifier ( $ identifier ) { foreach ( $ this -> packages as $ package ) { if ( S :: startsWith ( $ package -> getIdentifier ( ) , $ identifier ) ) { return $ package ; } } }
Returns a package by Identifier

the first package with the identifier beginning with $identifier is returned
(but normally packages should be identifier-unique)
@return Package|NULL
Returns a package by Identifier