2016-06-04
@used-by mc()
@used-by register()
@return array(string => mixed)
760140
protected function customerData() {return dfc($this, function() {$c = $this->c(); return df_clean([
		'dob' => $c->dob()
		,'email' => $c->email() ?: df_next_increment('customer_entity') . '@none.com'
		,'firstname' => $c->nameFirst()
		/**
		 *	if ($customer->getForceConfirmed() || $customer->getPasswordHash() == '') {
		 *		$customer->setConfirmation(null);
		 *	}
		 *	elseif (!$customer->getId() && $customer->isConfirmationRequired()) {
		 *		$customer->setConfirmation($customer->getRandomConfirmationKey());
		 *	}
		 * https://github.com/magento/magento2/blob/6fa09047a6d4a1ec71494fadec5a42284ba7cc1d/app/code/Magento/Customer/Model/ResourceModel/Customer.php#L133
		 */
		,'force_confirmed' => true
		,'gender' => $c->gender()
		,'lastname' => $c->nameLast()
		,'middlename' => $c->nameMiddle()
		,'password' => $c->password()
		,'taxvat' => df_is_customer_attribute_required('taxvat') ? '000000000000' : ''
		,$this->fId() => $c->id()
	]);});}
467559
public function toArray(): array
    {
        return array_filter([
            'field' => 'uuid.type' === $this->field
                ? null
                : $this->field,
            'values' => $this->values,
            'application_type' => self::AT_LEAST_ONE === $this->applicationType
                ? null
                : $this->applicationType,
            'filter_type' => self::TYPE_FIELD === $this->filterType
                ? null
                : $this->filterType,
            'filter_terms' => $this->filterTerms,
        ], function ($element) {
            return
            !(
                is_null($element) ||
                (is_array($element) && empty($element))
            );
        });
    }
578495
public function managerGetRegistrations()
    {
        $registrations = $this->getRegistrations();

        $regInfo = [];
        /** @var Registration $reg */
        foreach ($registrations as $reg) {
            $regInfo[] = [
                'id'                    => $reg->getId(),
                'invoke'                => $reg->getInvokeType(),
                'thruway_multiregister' => $reg->getAllowMultipleRegistrations(),
                'disclose_caller'       => $reg->getDiscloseCaller(),
                'session'               => $reg->getSession()->getSessionId(),
                'authid'                => $reg->getSession()->getAuthenticationDetails()->getAuthId(),
                'statistics'            => $reg->getStatistics()
            ];
        }
    }
778341
public function toArray()
    {
        return array(

            'callableName'             => $this->callableName,
            'methodName'               => $this->methodName,
            'realCallableName'         => $this->realCallableName,
            'jobPrefix'                => $this->jobPrefix,
            'realCallableNameNoPrefix' => $this->realCallableNameNoPrefix,
            'description'              => $this->description,
            'iterations'               => $this->iterations,
            'minimumExecutionTime'     => $this->minimumExecutionTime,
            'timeout'                  => $this->timeout,
            'servers'                  => $this->servers,
            'defaultMethod'            => $this->defaultMethod,
        );
    }
846140
public function toString()
    {
        $uses = $this->getIterator();
        $string = '';
        foreach ($uses as $use) {
            $string .= $use->toString();
        }

        return $string;
    }
153394
public function getData(): array
    {
        return [
            $this->serverOriginScheme,
            $this->serverOriginHost,
            $this->serverOriginPort,
            $this->isPreFlightCanBeCached,
            $this->preFlightCacheMaxAge,
            $this->isForceAddMethods,
            $this->isForceAddHeaders,
            $this->isUseCredentials,
            $this->areAllOriginsAllowed,
            $this->allowedOrigins,
            $this->areAllMethodsAllowed,
            $this->allowedLcMethods,
            $this->allowedMethodsList,
            $this->areAllHeadersAllowed,
            $this->allowedLcHeaders,
            $this->allowedHeadersList,
            $this->exposedHeadersList,
            $this->isCheckHost,
        ];
    }
167661
protected function getUseClauseVariables()
    {
        $begin = strpos($code = $this->getCode(), '(', $this->getUseIndex()) + 1;

        return explode(',', substr($code, $begin, strpos($code, ')', $begin) - $begin));
    }
48419
public function toArray(): array
    {
        return [
            'uuid' => $this->tokenUUID->toArray(),
            'app_uuid' => $this->appUUID->toArray(),
            'created_at' => $this->createdAt,
            'updated_at' => $this->updatedAt,
            'indices' => array_map(function (IndexUUID $indexUUID) {
                return $indexUUID->toArray();
            }, $this->indices),
            'endpoints' => $this->endpoints,
            'plugins' => $this->plugins,
            'ttl' => $this->ttl,
            'metadata' => $this->metadata,
        ];
    }
951101
public function toArray()
    {
        return [
            'prefix' => $this->prefix,
            'entity' => $this->entity,
            'lower_entities' => $this->getLowerEntities(),
            'lower_singular_entity' => $this->getLowerSingularEntity(),
            'studly_entity' => $this->getStudlyEntity(),
            'studly_plural_entity' => $this->getStudlyPluralEntity(),
            'prefix_dot' => $this->getPrefixDot(),
            'prefix_slash' => $this->getPrefixSlash(),
        ];
    }
242728
public function toArray()
    {
        $returnValue = parent::toArray();
        //$returnValue['ca'] = "deprecated";
        $returnValue['contextId'] = $this->contextIdentifier;
        $returnValue['contextLabel'] = $this->contextLabel;
        $returnValue['variableIdentifier'] = $this->identifier;
        

        return (array) $returnValue;
    }
658778
public function getStubStmts(): array
    {
        foreach ($this->classLikes as $classLike) {
            $this->resolveClassLike($classLike);
        }

        if ($this->allAreGlobal($this->namespaces) && $this->allAreGlobal($this->classLikeNamespaces)) {
            return array_merge(
                $this->reduceStmts($this->classLikeNamespaces),
                $this->reduceStmts($this->namespaces),
                $this->globalNamespace->stmts,
                $this->globalExpressions
            );
        }

        return array_merge(
            $this->classLikeNamespaces,
            $this->namespaces,
            $this->globalNamespace->stmts ? [$this->globalNamespace] : [],
            $this->globalExpressions ? [new Namespace_(null, $this->globalExpressions)] : []
        );
    }
156095
public static function all() {

		if(true === isset(static :: $method['data'])) {
			return static :: $method['data'];
		}

		parse_str(static :: getBody(), $vars);

		return [

			'get' 	 	=> $_GET,
			'post'	 	=> $_POST,
			'put' 	 	=> static :: isMethod('put') 	 ? 	$vars : [],
			'delete' 	=> static :: isMethod('delete')  ? 	$vars : [],
			'patch'  	=> static :: isMethod('patch') 	 ? 	$vars : [],
			'connect'  	=> static :: isMethod('connect') ? 	$vars : [],
			'head'  	=> static :: isMethod('head')	 ? 	$vars : [],
			'options'  	=> static :: isMethod('options') ? 	$vars : [],
			'trace'  	=> static :: isMethod('trace') 	 ? 	$vars : []
		];
	}
95691
public function scopes()
    {
        if (!$this->namespace) {
            return $this->parent->scopes();
        }

        return array_values(array_filter($this->parent->scopes(), function ($scope) {
            return strpos($scope, $this->namespace.'::') === 0;
        }));
    }
1132298
public function variables()
    {
        return [
            'id'         => $this->elementId,
            'tools'      => $this->tools->render(),
            'items'      => $this->getItems(),
            'useCreate'  => $this->useCreate,
            'useSave'    => $this->useSave,
            'useRefresh' => $this->useRefresh,
        ];
    }
603184
public function getScopes(): array
    {
        if ($this->scopes === null) {
            $event = new RegisterScopesEvent([
                'scopes' => [
                    self::GLOBAL_SCOPE
                ]
            ]);

            $this->trigger(
                self::EVENT_REGISTER_SCOPES,
                $event
            );

            $this->scopes = $event->scopes;
        }

        return $this->scopes;
    }
739606
public static function getAll()
    {
        Base::checkOpen();
        if (Base::driver() == "file") {
            return $_SESSION;
        }
        $session = Base::getSessionObject();
        $data_str = $session->read($session->getId());
        if ($data_str === null) {
            return [];
        }
        return unserialize($data_str);
    }
53976
public function toArray(): array
    {
        return [
            'name'      => $this->name,
            'path'      => $this->path,
            'method'    => $this->method,
            'handler'   => $this->handler,
            'binds'     => $this->bindVars,
            'params'    => $this->params,
            'options'   => $this->options,
            //
            'pathVars'  => $this->pathVars,
            'pathStart' => $this->pathStart,
            'pathRegex' => $this->pathRegex,
            //
            'chains'    => $this->chains,
        ];
    }