Noherczeg\Breadcrumb\Breadcrumb::inputToArray PHP Method

inputToArray() private method

private inputToArray ( $input = null )
    private function inputToArray($input = null)
    {
        $this->checkFromArgs($input);
        // PHP array
        $guaranteed_array = $this->safeArrayAssignment($input);
        // JSON array
        if (is_string($input) && json_decode($input) != null) {
            $guaranteed_array = array_values((array) json_decode($input));
            // URI string
        } elseif (is_string($input)) {
            $guaranteed_array = preg_split('/\\//', $input, -1, PREG_SPLIT_NO_EMPTY);
        }
        return $guaranteed_array;
    }