Explode dotted OID to an array of sub ID's.

@param string $oid OID in dotted format
@return \GMP[] Array of GMP numbers
357792
protected static function _explodeDottedOID(string $oid): array
    {
        $subids = [];
        if (strlen($oid)) {
            foreach (explode(".", $oid) as $subid) {
                $n = @gmp_init($subid, 10);
                if (false === $n) {
                    throw new \UnexpectedValueException(
                        "'$subid' is not a number.");
                }
                $subids[] = $n;
            }
        }
        return $subids;
    }
38533
static public function disassemble( $jid ){
		if( !self::isValid( $jid ) )
			throw new InvalidArgumentException( 'Given JID is not valid.' );
		$matches	= array();
		preg_match_all( self::$regexJid, $jid, $matches );
		return array(
			'domain'	=> $matches[2][0],
			'node'		=> $matches[1][0],
			'resource'	=> $matches[3][0]
		);
	}
204531
public function exportById($id): array
    {
        $entryType = Craft::$app->sections->getEntryTypeById((int) $id);

        return $this->export($entryType);
    }
68418
public function getSubtree($id)
    {
        $primaryKey = $this->mapper->getPrimaryKey($this->getTable());
        $entities = $this->getSubtreeData($id, $primaryKey);
        $children = array();
        foreach ($entities as $entity) {
            $key = $entity->ancestor->id;
            if (!isset($children[$key])) {
                $children[$key] = array();
            }
            $children[$key][] = $entity;
        }

        return $this->getChildNodes($id, $children, $entities, $primaryKey);
    }
1363415
static public function getAllIdChilds($id)
    {
        $map = self::getMapParentId();
        
        $childId = array();
        
        if (isset( $map[$id] ))
        {
            foreach ($map[$id] as $val)
            {
                $childId = array_merge($childId,self::getAllIdChilds($val));
            }
            unset($val);
            
            return $childId;
        }
        else
        {
            return array( $id );
        }              
    }
1068198
protected function exportNodes($oids) {
    if (sizeof($oids) > 0) {
      $persistenceFacade = $this->getPersistenceFacade();
      $permissionManager = $this->getPermissionManager();

      // get document definition
      $docFile = $this->getDownloadFile();
      $type = $oids[0]->getType();

      $mapper = $persistenceFacade->getMapper($type);
      $attributes = $mapper->getAttributes();

      $translateValues = StringUtil::getBoolean($this->getRequestValue('translateValues'));

      // process nodes
      $fileHandle = fopen($docFile, "a");
      foreach ($oids as $oid) {
        if ($permissionManager->authorize($oid, '', PersistenceAction::READ)) {
          $node = $persistenceFacade->load($oid);
          $values = [];
          foreach ($attributes as $attribute) {
            $inputType = $attribute->getInputType();
            $value = $node->getValue($attribute->getName());
            // translate values if requested
            if ($translateValues) {
              $value = ValueListProvider::translateValue($value, $inputType);
            }
            $values[] = $value;
          }
          fputcsv($fileHandle, $values);
        }
      }
      fclose($fileHandle);
    }
  }
1131576
public function normalizeID($id)
    {
        $primary_keys = $this->getPrimaryKey();

        if (!is_array($id)) {
            $key = $primary_keys[0];
            $id = [$key => $id];
        }

        $result = [];
        foreach ($primary_keys as $key) {
            if (!isset($id[$key])) {
                throw new Exception\UnexpectedPropertyValueException('Illegal id value');
            }

            $result[$key] = $id[$key];
        }

        return $result;
    }
1026549
public function findAll($id)
    {
        $result = array();
        $root = $this->findById($id);

        if ($root !== false) {
            $result = array_merge($result, array($root));
        }

        return array_merge($result, $this->findParentNodesByChildId($id));
    }
1144126
public static function getIdValue(array $id) 
    {
        self::formatScalarValues($id);
        if (\is_array($id)) {
            RecursiveDeleteHelper::deleteKeys($id, [Serializer::CLASS_IDENTIFIER_KEY]);
        }

        return $id;
    }
50892
protected function buildId($id)
    {
        $parts = explode('.', $id);
        $parts = array_map(function ($part) {
            return str_slug($part, '_');
        }, $parts);
        $id = implode('.', $parts);

        return $id;
    }
903101
public static function fromString(string $id): self
    {
        list($contentId, $versionNo) = explode(':', $id);

        return new self((int) $contentId, (int) $versionNo);
    }
271523
public function get_key($keyid)
    {
        $list = $this->list_keys($keyid);

        if (is_array($list)) {
            return $list[key($list)];
        }

        // error
        return $list;
    }
650494
protected function _getPidRecursive($ppid) {
		if (!$ppid) {
			return array();
		}
		$allPids = $pids = array_filter(preg_split('/\s+/', `ps -o pid --no-heading --ppid $ppid`));

		foreach ($pids as $pid) {
			$allPids = array_merge($allPids, $this->_getPidRecursive($pid));
		}
		return $allPids;
	}
25295
public function getAccountChildrenIds($id)
  {
    $ids = array();

    $this->Account->byParent($id)->each(function($Account) use (&$ids)
    {
      if($Account->is_group)
      {
        $ids = array_merge($ids, $this->getAccountChildrenIds($Account->id));
      }

      array_push($ids, $Account->id);
    });

    return $ids;
  }
1347165
public function realWalk1d($oid) {

        $arrayData = $this->realWalk($oid);

        $result = array();

        foreach ($arrayData as $_oid => $value) {

            $oidPrefix = substr($_oid, 0, strrpos($_oid, '.'));

            if (!isset($result[$oidPrefix])) {
                $result[$oidPrefix] = Array();
            }
            $aIndexOid = str_replace($oidPrefix . ".", "", $_oid);
            $result[$oidPrefix][$aIndexOid] = $this->parseSnmpValue($value);
        }

        return $result;
    }
959984
private static function _curveSize(string $oid)
    {
        if (!array_key_exists($oid,
            ECPublicKeyAlgorithmIdentifier::MAP_CURVE_TO_SIZE)) {
            return null;
        }
        return ECPublicKeyAlgorithmIdentifier::MAP_CURVE_TO_SIZE[$oid];
    }
711234
public function getNode($nodeId)
    {
        static $instance = array();
        if (isset($instance[$nodeId]))
            return $instance[$nodeId];
        $nodes = $this->nodeSet;
        if (empty($nodes))
            return NULL;
        foreach ($nodes as $node):
            if ($node->getId() == $nodeId):
                $instance[$nodeId] = &$node;
                break;
            endif;
        endforeach;
        return NULL;
    }