Add a class to the CLI application
@param $param
@return null|\Symfony\Component\Console\Command\Command
356907
private function add($param, $requireInstall = false, callable $callback = null)
    {
        // Handle array input
        if (is_array($param)) {
            foreach ($param as $item) {
                $this->add($item, $requireInstall, $callback);
            }

            return null;
        }

        // If we're not installed, only register commands that are marked to handle that
        if ($requireInstall && !$this->installed()) {
            return null;
        }

        // Inflate the passed command
        $command = is_string($param) ? $this->app->make($param) : $param;

        // Make sure we have a command instance
        if (!$command || !$command instanceof SymfonyCommand) {
            throw new \InvalidArgumentException('Invalid command provided.');
        }

        // Handle callback function
        if ($callback) {
            $command = $callback($command);

            if (!$command) {
                return null;
            }
        }

        // Add the cli command
        return $this->cli->add($command);
    }
542053
public static function maker( $param, $param2 = null )
	{
		if ( !is_null( $param2 ) )
		{
			return static::create( $param, $param2 );
		}
		
		$param = explode( ' ', $param );
		
		$element = array_shift( $param );
		
		return static::create( $element, implode( ' ', $param ) );
	}
766584
public static function getInstance($param = null)
    {
        if (self::$instance === null) {
            if (isset($param['type'])) {
                $type = $param['type'];
                unset($param['type']);
            } else {
                throw new \LogicException('Config Type was not specified in the param array $param[\'type\']');
            }

            self::$instance = ConfigFactory::make($type, $param);
        }

        // return singelton instance
        return self::$instance;
    }
901937
public function fromParameter($param)
    {
        $object = new \StdClass;

        if (is_string($param)) {
            
            foreach (self::$prefixMap as $prefix => $setter) {
                $regex = "/(?<=~" . $prefix . ").*/m";

                if (preg_match($regex, $param, $matches)) {
                    $end    = stripos($matches[0], '~');

                    if ($end !== false) {
                        $part = substr($matches[0], 0, $end);
                    } else {
                        $part = $matches[0];
                    }

                    $key = self::$prefixToPropertyMap[$prefix];

                    if ($prefix == self::PREFIX_ROUNDS) {
                        $part = (int) $part;
                    }

                    $object->$key = $part;

                    if (method_exists($this, $setter)) {
                        $this->$setter($part);
                    }
                }
            }
        }

        return $object;
    }
1275882
public function getParam($param = null)
    {
        if (null === $param) {
            return $this->params;
        }

        return isset($this->params[$param]) ? $this->params[$param] : null;
    }
113407
protected final function getArg(ReflectionParameter $param, CacheInterface $cache = null)
   {
           return !$param->isOptional()
               && ($type = $param->getType()) && !$type->isBuiltin()
                ? $this->resolve($type->__toString(), $cache)
                : null;
   }
1293049
public function add(SymfonyCommand $command)
    {
        if ($command instanceof Command) {
            $command->setLaravel($this->laravel);
        }

        return $this->addToParent($command);
    }
1186842
public function execute($commandName, $params = [])
    {
        $className = str_replace(' ', '', ucwords(str_replace('-', ' ', $commandName))) . 'Command';
        $clearCommandName = $this->getNamespace() . "\\console\\" . $className;
        if (!class_exists($clearCommandName)) $clearCommandName = '\\app\\console\\' . $className;
        if (!class_exists($clearCommandName)) $clearCommandName = 'PhpDevil\\framework\\console\\commands\\' . $className;
        if (!class_exists($clearCommandName)) die("\nCommand " . $commandName . " not found");
        (new $clearCommandName)->execute($params);
    }
699807
public function init($param)
    {

        if (empty($param)) return false;

        $this->header = '';

        $param_list = new ParamList();
        foreach ($param as $key => $value) {
            if (property_exists($this, $key)) $this->$key = $value;
            elseif (property_exists($param_list, strtolower(str_replace('-', '_', $key)))) {
                if (is_string($value)) {
                    $this->header[] = new SingleParam($key, $value);
                } elseif (is_array($value)) {
                    $this->header[] = new MultiParam($key, $value);
                }
            }

        }


        return true;
    }
1290542
function action_submit ($param = null)
  {
    if (!isset($this->model))
      throw new FlashMessageException('Can\'t insert/update a NULL model.', FlashType::ERROR);

    throw new FlashMessageException('Can\'t automatically insert/update an object of type ' . gettype ($this->model),
      FlashType::ERROR);
  }
546754
public static function load($param) {
        global $DB;
        if (is_object($param)) {
            $event = new calendar_event($param);
        } else {
            $event = $DB->get_record('event', array('id' => (int)$param), '*', MUST_EXIST);
            $event = new calendar_event($event);
        }
        return $event;
    }
830669
public function bind(array $param) {
		$ref    = new \ReflectionClass('mysqli_stmt');
		$method = $ref->getMethod("bind_param");
		$method->invokeArgs($this->result, $param);
	}
572891
public function getResponseParam($param) {
    if (isset($this->notifyParams[$param])) {
      return $this->notifyParams[$param];
    }
    return NULL;
  }
545456
public function interfaceInjection($reflectionParam)
    {
        $constructorArgs = null;
        /*
         | Check if constructor dependency is Interface or not.
         | if interface we will check definition for the interface
         | and inject into controller constructor
         */
        if (!$reflectionParam->IsInstantiable() && $reflectionParam->isInterface()) {
            $aliases = $this->definition['definition.config']['register.alias'];
            $interface = Inflector::getClassName($reflectionParam->getName());

            if (array_key_exists($interface, $aliases)) {
                $constructorArgs = $this->container->makeInstance($aliases[$interface]);
            }
        }

        return $constructorArgs;
    }
9325
private function _clanById(string $param): Clan
    {
        $curlClient = curl_init(
            self::BASE_URL .
            self::CLANS_URL .
            '/' .
            \urlencode($param)
        );
        curl_setopt($curlClient, CURLOPT_HTTPHEADER, $this->_curlHeader);
        curl_setopt($curlClient, CURLOPT_RETURNTRANSFER, true);
        $result = json_decode(curl_exec($curlClient), true);
        return Clan::create($result);
    }
709010
public function get($param)
    {
        return array_key_exists($param, $this->data) ? $this->data[$param] : null;
    }
234613
function setClass( $value, $params=FALSE ) {
    $this->class['value']  = $value;
    $this->class['params'] = $this->_setParams( $params );
  }