Get params from type.

@param string $type
@param string $name default: '*'
@return array type, namespace, class, name
10253
protected static function _params($type, $name = "*") {
		if (!$name) {
			$name = '*';
		}
		$library = $namespace = $class = '*';

		if (strpos($type, '.') !== false) {
			$parts = explode('.', $type);
			$type = array_shift($parts);

			switch (count($parts)) {
				case 1:
					list($class) = $parts;
				break;
				case 2:
					list($namespace, $class) = $parts;
				break;
				default:
					$class = array_pop($parts);
					$namespace = join('\\', $parts);
				break;
			}
		}
		if (strpos($name, '.') !== false) {
			$parts = explode('.', $name);
			$library = array_shift($parts);
			$name = array_pop($parts);
			$namespace = $parts ? join('\\', $parts) : "*";
		}
		return compact('library', 'namespace', 'type', 'class', 'name');
	}
145210
public function getParam($name)
    {
        if ( ! is_string($name) || ! isset($this->data[$name])) {
            return null;
        }

        return $this->data[$name];
    }
250544
protected function normalizeType(string $type) : string
    {
        $type = ltrim($type, '\\');
        foreach (self::module()->namespaces as $name => $namespace) {
            if (strpos($type, $namespace->getClassNamespace()) !== false) {
                return $name . substr($type, strlen($namespace->getClassNamespace()) + 1);
            }
        }

        return null;
    }
133318
public function getStub($type, $name)
    {
        if (in_array($name, $this->ignores)) {
            return;
        }

        $type = $this->getInputType($type, $name);

        return Stub::create('/form/'.$type.'.stub', [
            'name' => $name,
            'label' => ucwords(str_replace('_', ' ', $name)),
        ])->render();
    }
704808
public static function input($name, $type = INPUT_SERVER)
    {
        //====================================================================//
        // Standard Safe Reading
        $result = filter_input($type, $name);
        if (null !== $result) {
            return $result;
        }
        //====================================================================//
        // Fallback Reading
        if ((INPUT_SERVER === $type) && isset($_SERVER[$name])) {
            return $_SERVER[$name];
        }
        if ((INPUT_GET === $type) && isset($_GET[$name])) {
            return $_GET[$name];
        }

        return null;
    }
1292612
protected function getDefinitionFile($type, $name)
    {
        if (array_key_exists($name, $this->definitionFiles)) {
            return $this->definitionFiles[$name];
        }

        $this->definitionFiles[$name] = null;
        $this->definitionFiles[$name] = $this->findDefinitionFileByComposer($name);

        if (null !== $this->definitionFiles[$name]) {
            return $this->definitionFiles[$name];
        }

        $this->definitionFiles[$name] = $this->findDefinitionFileByName($name);

        if (null !== $this->definitionFiles[$name]) {
            return $this->definitionFiles[$name];
        }

        $this->definitionFiles[$name] = $this->findDefinitionFileByRegex($type, $name);

        return $this->definitionFiles[$name];
    }
207645
public function getContent($type, $name)
    {
        $finder = $this->listFiles($type)->name($name . '.*');

        if (!$finder->count()) {
            throw new Exception(sprintf(
                'No content directory find for type "%s" and name "%s" (in "%s").',
                $type,
                $name,
                $this->directory
            ));
        }

        foreach ($finder as $file) {
            return $this->load($file);
        }

        return null;
    }
257707
static public function getNamespaces($type=null)
	{
	    static::initNamespace();
	    
	    if ($type) {
	        $nss = [];
	        foreach (static::$namespaces as $k => $v) {
	            $nss[$k] = $v . ucfirst($type) . '\\';
	        }
	        return $nss;
	    } else {
	        return static::$namespaces;
	    }
	}
1260923
public function getValues($name)
    {
        $return = [];
        $items  = $this->getItems();

        foreach ($items as $type) {
            $method = 'get' . ucfirst($name);
            if (method_exists($type, $method)) {
                $return[] = $type->$method();
            } else {
                $return[] = $type->{$name};
            }
        }

        return $return;
    }
986085
private function createTypeMessage(string $type, string $name = null): string
    {
        return ((null !== $name) ? ($type . ' (named "' . $name . '")') : ($type));
    }
723141
public function argument($type, $name) {
        $argument = new Argument($type, $name);
        $this->addArgument($argument);

        return $argument;
    }
402454
protected function _createListTerm( $name, $type )
	{
		switch( $this->getOperator() )
		{
			case '==':
				return $name . ' IN ' . $this->_createValueList( $type, (array) $this->getValue() );
			case '!=':
				return $name . ' NOT IN ' . $this->_createValueList( $type, (array) $this->getValue() );
			default:
				$terms = array();

				foreach( (array) $this->getValue() as $val ) {
					$terms[] = $this->_createTerm( $name, $type, $val );
				}

				return '(' . implode( ' OR ', $terms ) . ')';
		}
	}
539833
protected static function getMorphs($name, $type, $id)
    {
        $type = $type ?: $name.'_type';

        $id = $id ?: $name.'_id';

        return [$type, $id];
    }
1031727
public function getParam($name)
        {
            $name = (string) $name;

            if (!array_key_exists($name, $this->_params)) {
                return null;
            }

            return $this->_params[$name];
        }
552058
protected function getParams($name = null)
    {
        $queues = !is_null($name) ? [$name] : $this->getQueues();
        $params = [
            config('queue.default'),
        ];
        if (empty($queues)) {
            return $params;
        }
        $queue = implode(',', $queues);
        if ($this->isCli()) {
            array_push($params, '--queue ' . $queue);
        } else {
            $params['--queue'] = $queue;
        }

        unset($queues);


        return $params;
    }
262634
public static function getType($name, &$type=null) {
		if( !isset(static::$types[$name]) ) {
			throw new Exception('unknownType_'.$name);
		}
		$type	= &static::$types[$name];
		return $type;
	}
680400
public function getQuery(string $name, string $type = null, $default = null)
    {
        $value = $this->getUserData($this->uri->getQueries(), $name);

        if ($type) {
            $value = $this->validateType($value, $type, $default);
        }

        return $value;
    }