小程序名称设置及改名.

@param string $nickname       昵称
@param string $idCardMediaId  身份证照片素材ID
@param string $licenseMediaId 组织机构代码证或营业执照素材ID
@param string $otherStuffs    其他证明材料素材ID
438784
public function setNickname(
        string $nickname,
        string $idCardMediaId = '',
        string $licenseMediaId = '',
        array $otherStuffs = []
    ) {
        $params = [
            'nick_name' => $nickname,
            'id_card' => $idCardMediaId,
            'license' => $licenseMediaId,
        ];

        for ($i = \count($otherStuffs) - 1; $i >= 0; --$i) {
            $params['naming_other_stuff_'.($i + 1)] = $otherStuffs[$i];
        }

        return $this->httpPostJson('wxa/setnickname', $params);
    }
307236
public function formatAID(string $affiliateID, string $format = '#########'): string
    {
        return str_pad($this->stripNonNumeric($affiliateID) * 1, strlen($format), '0', STR_PAD_LEFT);
    }
638724
function _get_license_by_id( $id, $sync_licenses = true ) {
            $this->_logger->entrance();

            if ( ! FS_Plugin_License::is_valid_id( $id ) ) {
                return false;
            }

            /**
             * When running from the network level admin and opted-in from the network,
             * check if the license exists in the network user licenses collection.
             *
             * @author Vova Feldman (@svovaf)
             * @since  2.0.0
             */
            if ( fs_is_network_admin() &&
                 $this->is_network_registered() &&
                 ( ! is_object( $this->_user ) || $this->_storage->network_user_id != $this->_user->id )
            ) {
                $licenses = $this->get_user_licenses( $this->_storage->network_user_id );

                foreach ( $licenses as $license ) {
                    if ( $id == $license->id ) {
                        return $license;
                    }
                }
            }

            if ( ! $this->has_any_license() && $sync_licenses ) {
                $this->_sync_licenses( $id );
            }

            if ( is_array( $this->_licenses ) ) {
                foreach ( $this->_licenses as $license ) {
                    if ( $id == $license->id ) {
                        return $license;
                    }
                }
            }

            return false;
        }
543893
public static function login($uid,$nickname){
        if(empty($uid) && empty($nickname)){
            return false;
        }
        $session_prefix = config('thinkcms.session_prefix');
        $user           = [
                            'uid'       => $uid,
                            'nickname'  => $nickname,
                            'time'      => time()
                        ];
        session($session_prefix.'user', $user);
        session($session_prefix.'user_sign', self::data_auth_sign($user));
        return true;
    }
496698
private function getMedia($timetable, $externalStopPointId = false)
    {
        $seasonCategory = $this->getSeasonCategory(
            $timetable->getLineConfig()->getSeason()->getPerimeter()->getExternalNetworkId(),
            $timetable->getExternalRouteId(),
            $timetable->getLineConfig()->getSeason()->getId(),
            $externalStopPointId
        );

        $media = new Media();
        $media->setCategory($seasonCategory);
        $media->setCompany($this->mediaDataCollector->getCompany());

        return $media;
    }
991585
public boolean hasExternalProjection( String alias,
                                          String externalNodeKey ) {
        return this.snapshot.get().hasExternalProjection(alias, externalNodeKey);
    }
1360951
def delete_license(license_id):
    

    response = utils.checked_api_call(pnc_api.licenses, 'delete', id=license_id)
    if response:
        return utils.format_json(response.content)
162060
public void externalEntityDecl(
        String name,
        String publicId,
        String systemId)
        throws SAXException
    {
        if (m_firstTagNotEmitted)
        {
            flush();
        }
        m_handler.externalEntityDecl(name, publicId, systemId);
    }
281506
def provider_id_slot(self, other):
        
        if other:
            pid = other.provider_id()
            for i, provider in enumerate(self.providers):
                if provider.provider_id() == pid:
                    return i

        return None
604661
public function morphOne($related, $name, $type = null, $id = null, $localKey = null)
    {
        $instance = $this->newRelatedInstance($related);

        [$type, $id] = $this->getMorphs($name, $type, $id);

        $table = $instance->getTable();

        $localKey = $localKey ?: $this->getKeyName();

        return $this->newMorphOne($instance->newQuery(), $this, $table.'.'.$type, $table.'.'.$id, $localKey);
    }
84951
public function remove($id_or_external_id) {
    if (count($this) === 0) {
      return true;
    }
    $this->_set_items(array_filter($this->_get_items(), function($item) use ($id_or_external_id) {
      return !($item->id == $id_or_external_id || $item->external_id == $id_or_external_id);
    }));
  }
872204
function createImageAliasKey( $alias )
    {
        $keyData = array( $alias['name'],
                          $alias['reference'],
                          $alias['mime_type'] );
        if ( $alias['reference'] )
        {
            $referenceAlias = $this->alias( $alias['reference'] );
            if ( $referenceAlias )
                $keyData[] = $referenceAlias['alias_key'];
        }
        foreach ( $alias['filters'] as $filter )
        {
            $filterData = $filter['name'];
            if ( is_array( $filter['data'] ) )
                $filterData .= '=' . implode( ',', $filter['data'] );
            $keyData[] = $filterData;
        }

        $key = eZSys::ezcrc32( implode( "\n", $keyData ) );

        return $key;
    }
1070542
public function nickname($nickname = null)
    {
        if (is_null($nickname)) {
            return $this->nickname;
        }

        $this->nickname = $nickname;

        return $this;
    }
1361600
protected function aliasAction($alias)
    {
        $request = $this->getRequest();
        $request->setActionName($alias);
        $request->setParam($request->getActionKey(), $alias);
    }
822440
public function isEqual($other)
    {
        return !($other instanceof self) ?
            false :
            ($this->id === $other->id && $this->customerId === $other->customerId);
    }
531988
public function getRubricByAlias($alias, $regionId, array $additionalFields = array())
    {
        return $this->getSingle(
            'catalog/rubric/get',
            'Rubric',
            array('alias' => $alias, 'region_id' => (int)$regionId, 'fields' => self::getArray($additionalFields))
        );
    }
636564
private function getDefinitionId($id, ContainerBuilder $container)
    {
        $seen = array();
        while ($container->hasAlias($id)) {
            if (isset($seen[$id])) {
                throw new ServiceCircularReferenceException($id, array_keys($seen));
            }
            $seen[$id] = true;
            $id = $container->normalizeId($container->getAlias($id));
        }

        return $id;
    }